1 #ifndef __FB_H_DEFINED
2 #define __FB_H_DEFINED
3 
4 #ifndef __TYPEDEFS_H_DEFINED
5 #include "typedefs.h"
6 #include <huskylib/cvtdate.h>
7 #endif
8 
9 #define MAX_SEARCH_DAT    32
10 #define DMP_BUF_SIZE      2048
11 #define MAX_FN_LEN        12
12 
13 #define FF_FILE     0x01 /* Entry is a filename */
14 #define FF_OFFLINE  0x02 /* Entry is deleted */
15 #define FF_DELETED  0x04 /* File/comment is deleted */
16 #define FF_COMMENT  0x08 /* This is a comment (currently unused) */
17 #define FF_NOTIME   0x10 /* Don't deduct file from user's time limit */
18 #define FF_NOBYTES  0x20 /* Don't deduce file from user's DL bytes limit */
19 #define FF_DLCTR    0x40 /* Had a blank download counter */
20 
21 
22 /* Structure for FILES.IDX - each file is just a big array of these.  This  *
23  * is also the structure used for the master MAXFILES.IDX.                  */
24 
25 struct FIDX
26 {
27   /* Filename (NO TERMINATING NUL!) */
28 
29   byte name[MAX_FN_LEN];
30 
31   /* Record number in AREAS.DAT that this file area occupies */
32 
33   word anum;
34 
35   /* Offset into FILES.DAT (number of _fdat structs) that file occupies */
36 
37   word fpos;
38 };
39 
40 
41 
42 
43 /* Structure for FILES.DAT in each file directory */
44 
45 typedef struct _fdat
46 {
47   byte name[MAX_FN_LEN+1];    /* Name of the file                           */
48   byte struct_len;            /* Length of this structure.  USE THIS!       */
49 
50   word flag;                  /* See FF_XXXX definitions, above             */
51 
52   dword acs;                  /* Offset to ACS in FILES.DMP                 */
53   word  rsvd1;
54 
55   dword times_dl;             /* # of times this file has been DLed         */
56 
57   union stamp_combo fdate;    /* Date of actual file (modification)         */
58   union stamp_combo udate;    /* Date of upload (creation)                  */
59 
60   dword fsize;                /* File's size, in bytes                      */
61 
62   /* Offsets in FILES.DMP */
63 
64   dword uploader;             /* Uploader's name                            */
65   dword desc;                 /* File description (or comment if no file)   */
66   dword path;                 /* Path of file - 0 if in normal file dir     */
67   dword pwd;                  /* Password for file                          */
68 
69   char rsvd[10];              /* Reserved by Maximus for future use         */
70 } FDAT;
71 
72 
73 #endif /* !__FB_H_DEFINED */
74 
75