HuntnGather – Blame information for rev 41
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
33 | office | 1 | /////////////////////////////////////////////////////////////////////////// |
2 | // Copyright (C) 2021 Wizardry and Steamworks - License: MIT // |
||
3 | /////////////////////////////////////////////////////////////////////////// |
||
4 | |||
5 | #if !defined TRUE |
||
6 | #define TRUE 1; |
||
7 | #endif |
||
8 | |||
9 | #if !defined FALSE |
||
10 | #define FALSE 0; |
||
11 | #endif |
||
12 | |||
13 | #define ASYNC_BUF 8192 |
||
14 | #define MAX_MEM 262144 |
||
15 | #define LINE_BUF 256 |
||
16 | #define DEFAULT_DATABASE_FILE "S:gather.db" |
||
17 | |||
38 | office | 18 | typedef struct { |
19 | void **array; |
||
20 | int length; |
||
21 | } VECTOR; |
||
22 | |||
33 | office | 23 | typedef enum FS_TYPE { |
24 | UNKNOWN, |
||
25 | REGULAR, |
||
26 | DIRECTORY |
||
27 | } FS_TYPE; |
||
28 | |||
29 | typedef struct { |
||
30 | int dirs; |
||
31 | int files; |
||
32 | int lines; |
||
33 | int size; |
||
34 | } dbStats; |
||
35 | |||
36 | typedef struct { |
||
37 | char *name; |
||
38 | char *path; |
||
39 | } dbEntry; |
||
40 | |||
38 | office | 41 | typedef struct { |
42 | char *string; |
||
43 | int length; |
||
44 | } dbLine; |
||
45 | |||
33 | office | 46 | typedef enum OPERATION { |
47 | NONE, |
||
48 | GATHER, |
||
49 | REMOVE, |
||
50 | CREATE |
||
51 | } OPERATION; |
||
52 | |||
53 | extern int PROGRAM_RUN; |
||
54 | extern int PROGRAM_VERBOSE; |
||
55 | |||
56 | #if defined ___AmigaOS___ |
||
57 | extern LONG StringLenMax(char *a, char *b); |
||
37 | office | 58 | extern BOOL PathCompare(char *path, char *look); |
59 | extern BOOL RemoveFile(char *name); |
||
60 | extern BOOL StringMatch(char *a, char *b); |
||
33 | office | 61 | #else |
62 | extern int StrlenMax(char *a, char *b); |
||
37 | office | 63 | extern int PathCompare(char *path, char *look); |
64 | extern int RemoveFile(char *name); |
||
65 | extern int StringMatch(char *a, char *b); |
||
33 | office | 66 | #endif |
67 | |||
68 | #if defined ___AsyncIO___ |
||
69 | extern void SkipLine(struct AsyncFile *fp); |
||
38 | office | 70 | extern dbLine *PeekLine(struct AsyncFile *fp); |
71 | extern dbLine *ReadLine(struct AsyncFile *fp); |
||
33 | office | 72 | #else |
37 | office | 73 | extern void SkipLine(FILE *fp); |
38 | office | 74 | extern dbLine *PeekLine(FILE *fp); |
75 | extern dbLine *ReadLine(FILE *fp); |
||
33 | office | 76 | #endif |
37 | office | 77 | |
78 | extern void StrUpr(char *); |
||
79 | extern FS_TYPE GetFsType(char *path); |
||
80 | extern int CountFileLines(char *dbFile); |
||
41 | office | 81 | extern int GetFileSize(char *dbFile); |
37 | office | 82 | extern char *PathToAbsolute(char *path); |
83 | extern char *CreateTemporaryFile(void); |
||
39 | office | 84 | extern VECTOR *CreateTemporaryFiles(int files); |
85 | extern void RemoveFiles(VECTOR *names); |
||
33 | office | 86 | extern void CopyFile(char *a, char *b); |
37 | office | 87 | |
38 | office | 88 | extern dbEntry* CreateDatabaseEntry(dbLine *line); |