home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / DWNSRS56.ZIP / DOWNSORT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-17  |  6.5 KB  |  162 lines

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