home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / os2 / dwnsrs57.zip / DOWNSORT.H < prev    next >
C/C++ Source or Header  |  1993-06-15  |  8KB  |  174 lines

  1. /* ===================================== */
  2. /* Header file for DOWNSORT : DOWNSORT.H */
  3. /* ===================================== */
  4.  
  5. /* used in Maximus CBCS structures */
  6.  
  7. #ifndef __32BIT__
  8.   #define _HUGE  huge                   /* migration! */
  9. #else
  10.   #define _HUGE                         /* empty */
  11. #endif
  12.  
  13. #define MAXANAME    10
  14. #define MAXFN       13
  15. #define MAXRCD    2048
  16. #define MAXDESC    (MAXRCD-MAXFN-3)
  17. #define MAXPATH    128
  18. #define MAXTIT      20
  19.  
  20. #define QMARK       '?'
  21. #define ALPHA       'A'
  22. #define TIMESTAMP   'D'
  23. #define FONT        'F'
  24. #define GROUP       'G'
  25. #define HELP        'H'
  26. #define INCLUDE     'I'
  27. #define KEEPSEQ     'K'
  28. #define LONGLIST    'L'
  29. #define QUIET       'Q'
  30. #define TRUNC       'T'
  31. #define VERBOSE     'V'
  32. #define WRAP        'W'
  33. #define EXCLPRIV    'X'
  34.  
  35. #define AVA_A      1                 /* ^A  */
  36. #define AVA_B      2                 /* ^B  */
  37. #define AVA_C      3                 /* ^C  */
  38. #define AVA_D      4                 /* ^D  */
  39. #define AVA_E      5                 /* ^E  */
  40. #define AVA_F      6                 /* ^F  */
  41. #define AVA_G      7                 /* ^G  */
  42. #define AVA_H      8                 /* ^H  */
  43. #define AVA_I      9                 /* ^I  */
  44. #define AVA_J      10                /* ^J  */
  45. #define AVA_K      11                /* ^K  */
  46. #define AVA_L      12                /* ^L  */
  47. #define AVA_M      13                /* ^M  */
  48. #define AVA_N      14                /* ^N  */
  49. #define AVA_V      22                /* ^V  */
  50. #define AVA_W      23                /* ^W  */
  51. #define AVA_Y      25                /* ^Y  */
  52.  
  53. #define DAYS_30     '+'
  54. #define DAYS_7      '*'
  55.  
  56. #define FONT0       0
  57. #define FONT1       1
  58. #define FONT2       2
  59. #define FONT3       3
  60. #define FONT4       4
  61. #define LINE1       0
  62. #define LINE2       1
  63. #define LINE3       2
  64. #define LINE4       3
  65. #define LINE5       4
  66.  
  67. /* (foreground) COLORS */
  68.  
  69. #define O_BLINK   0x80
  70. #define O_BRIGHT  0x08
  71. #define O_LIGHT   0x08
  72.  
  73. #define O_BLACK   0x00
  74. #define O_BLUE    0x01
  75. #define O_GREEN   0x02
  76. #define O_CYAN    0x03
  77. #define O_RED     0x04
  78. #define O_MAGENTA 0x05
  79. #define O_BROWN   0x06
  80. #define O_GRAY    0x07
  81. #define O_YELLOW  (O_BRIGHT+O_BROWN)
  82. #define O_WHITE   (O_BRIGHT+O_GRAY)
  83.  
  84. typedef struct _filechain {             /* file information           */
  85.         struct _filechain *next_element;  /* pointer to next element  */
  86.         struct _downpath _HUGE *parea;  /* pointer to area-structure  */
  87.         char   *fdesc;                  /* ptr to file description    */
  88.         char   *fpath;                  /* ptr to file path           */
  89.         ULONG  size;                    /* file size                  */
  90.         ULONG  attr;                    /* attribute                  */
  91.         FDATE  wdate;                   /* file date (last write)     */
  92.         FTIME  wtime;                   /* file time (last write)     */
  93.         FDATE  cdate;                   /* file date (creation)       */
  94.         FTIME  ctime;                   /* file time (creation)       */
  95.         USHORT fseq;                    /* FILES.BBS sequence number  */
  96.         short int priv;                 /* file privilege             */
  97.         unsigned int dl_b:1,            /* unlimited download (bytes) */
  98.                      dl_t:1,            /* unlimited download (time)  */
  99.                      cmt:1;             /* files.bbs comment entry    */
  100.         char   fname[MAXFN];            /* filename                   */
  101.           } FILECHAIN;
  102.  
  103. typedef struct _downpath {              /* download area information  */
  104.         struct _filechain *newest;      /* pointer to most recent file*/
  105.         ULONG  byte_count;              /* Area byte count area summ. */
  106.         short  int priv;                /* Area Privilege             */
  107.         short  int anum;                /* Area sequence number       */
  108.         USHORT file_count;  /* Area file count area summ. */
  109.         char   name[MAXANAME];          /* MAX Area name              */
  110.         char   ename[MAXANAME];         /* edited right aligned       */
  111.         char   pname[80];               /* Download-pathname          */
  112.         char   filesbbs[80];            /* Path to FILES.BBS          */
  113.         char   adesc[80];               /* Filearea description       */
  114.           } DOWNPATH;
  115.  
  116. #define P_BBS  0                        /* Symbolic parameter table   */
  117. #define P_FIL  1                        /* entry index values         */
  118. #define P_GBL  2                        /* for the different lists    */
  119. #define P_NEW  3                        /* New acquisitions           */
  120. #define P_ALL  4                        /* All files                  */
  121. #define P_IPF  5                        /* OS/2 1.3 IPF format        */
  122. #define P_DUP  6                        /* Duplicate files            */
  123. #define P_ORP  7                        /* Orphan list                */
  124. #define P_OK   8                        /* OK-file                    */
  125. #define P_IP2  9                        /* OS/2 2.0+ IPF format       */
  126. #define P_EMI 10                        /* Availability list          */
  127. #define P_MAX 10                        /* indicates highest index!   */
  128.  
  129. typedef struct _listparm {              /* list parameters            */
  130.         short int priv[10];             /* max file priv to list      */
  131.         short int tfont;                /* title font                 */
  132.         unsigned short int max_fil;     /* maximum # of files to list */
  133.         char *incl_fspec;               /* ptr to include-filespec    */
  134.         char longflag;                  /* long OK-file               */
  135.         char sortflag;                  /* file seq. (name/date/keep) */
  136.         char wrapflag;                  /* wrap/truncate              */
  137.         char exclflag;                  /* privilege exclude flag     */
  138.         char listflag;                  /* max list length in number  */
  139.                                         /*   or in days, weeks, months*/
  140.         char name[9];                   /* list filename              */
  141.         char ext[4];                    /* list extension             */
  142.           } LISTPARM;
  143.  
  144. /* externs for global variables */
  145.  
  146. extern char   PROGNAME[],PROGDESC[],AUTHOR[],CITY[],PHONE[],FIDO[];
  147. extern char   VERSION,SUBVERS,SUFFIX;
  148. extern char   MAX[],MSG_ARE[],MSG_CFG[],MSG_COA[],MSG_COF[],MSG_FNT[],
  149.               MSG_IEC[],MSG_KWD[],MSG_MEM[],MSG_MX1[],MSG_MX2[],
  150.               MSG_OPA[],MSG_OPI[],MSG_OPO[],MSG_ORP[],MSG_SRT[],MSG_RST[],
  151.               MSG_TRL[],MSG_REC[],MSG_REP[],MSG_UNK[],
  152.               MSG_ZF[],MSG_ZY[],MSG_ZP[],
  153.               OPEN_FAIL[],FILPREFX[],
  154.               BY[],FN[],FS[],AC[],DT[],TM[],SZ[],DS[],FP[],SUMM[],
  155.               MO[],MP[],DF[],NDS[],ORPHAN[],OFFLINE[],
  156.               BAK[],DOT[],EMPTY[],WK[],DAYS[],MONTHS[],WEEKS[],WRITE[];
  157. extern char   today[],list_title[],buf2[],
  158.               filesbbs_path[],areadat_path[],cfg_path[];
  159. extern char   *priv_name[],*pre_title[],*sub_title[],*bot_lines[];
  160. extern char   non_dup_ext[][4], selected_area[][MAXANAME];
  161. extern char   wrap_flag,oper_mode,area_seq;
  162. extern char   strip_ava;
  163. extern int    area_IN_EX;
  164. extern int    MAX_level, ABS_MAX_priv;
  165. extern unsigned int area_total_count, file_total_count;
  166. extern unsigned int max_aname;
  167. extern unsigned short title_font, title_lines[];
  168. extern unsigned long byte_count;
  169. extern FILECHAIN  *first_element;
  170. extern LISTPARM    lp[];
  171. extern COUNTRYCODE c_code;
  172. extern COUNTRYINFO c_info;
  173.  
  174.