home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / JOE_SOUR.LHA / Sources.lha / s!x / topdl / express.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-07  |  12.6 KB  |  477 lines

  1. #define SUCCESS 0
  2. #define PRIVATE 10
  3. #define LCFILES 9
  4. #define FAILURE -1
  5. #define NOTALLOWED 1
  6. #define NOTTESTED  2
  7. #define ABORT    -2 
  8. #define HISTORY 999
  9. #define MAXHIST 20
  10.  
  11. #define NOSCREENS 0
  12. #define BBSSCREENS 1
  13. #define NODESCREENS 2
  14.  
  15. #define KEYBOARD_TIMEOUT 300L
  16.  
  17. #ifndef FOREVER
  18. #       define FOREVER for(;;)
  19. #endif
  20.  
  21. #define FALSE 0
  22. #define TRUE  1
  23.  
  24. #define AWAIT_LOGON     0
  25. #define SYSOP_LOGON     1
  26. #define LOCAL_LOGON     2
  27. #define REMOTE_LOGON    3
  28. #define GOODBYE_LOGON   4
  29. #define SUSPEND_LOGON   5
  30.  
  31. #define STANDARD_LOGOFF 1
  32. #define SLEEP_LOGOFF    2
  33. #define OVERTIME_LOGOFF 3
  34. #define CARRIER_LOGOFF  4
  35. #define ILLEGAL_LOGOFF  5
  36.  
  37. #define ENV_IDLE        0
  38. #define ENV_DOWNLOADING 1
  39. #define ENV_UPLOADING   2
  40. #define ENV_DOORS       3
  41. #define ENV_MAIL        4
  42. #define ENV_STATS       5
  43. #define ENV_ACCOUNT     6
  44. #define ENV_ZOOM        7
  45. #define ENV_FILES       8
  46. #define ENV_BULLETINS   9
  47. #define ENV_VIEWING     10
  48. #define ENV_ACCOUNTSEQ  11
  49. #define ENV_LOGOFF      12
  50. #define ENV_SYSOP       13
  51. #define ENV_SHELL       14
  52. #define ENV_EMACS       15
  53. #define ENV_JOIN        16
  54. #define ENV_CHAT        17
  55. #define ENV_NOTACTIVE   18
  56. #define ENV_REQ_CHAT    19
  57. #define ENV_CONNECT     20
  58. #define ENV_LOGGINGON   21
  59. #define ENV_AWAITCONNECT 22
  60. #define ENV_SCANNING     23
  61. #define ENV_SHUTDOWN     24
  62. #define ENV_MULTICHAT    25
  63. #define ENV_SUSPEND      26
  64. #define ENV_RESERVE      27
  65. #define ENV_OLM          28
  66. #define ENV_FLAGFILES    29
  67. #define ENV_HYDRALINK    30
  68. #define ENV_RINGDETECT   31
  69.  
  70. #define SV_SYSOPLOG       154
  71. #define SV_LOCALLOG       155
  72. #define SV_ACCOUNTS       156
  73. #define SV_CHAT           157
  74. #define SV_NODEOFFHOOK    158
  75. #define SV_EXITNODE       159
  76. #define SV_INITMODEM      160
  77. #define SV_WHATSUP        161
  78. #define RESERVED_BLOCK10  162
  79. #define SV_INSTANT        170
  80. #define SV_RESERVE        171
  81. #define SV_CHATTOGGLE     172
  82. #define SV_AESHELL        174
  83. #define SV_CLIPBOARD      175
  84. #define SV_START          176
  85. #define SV_NEWMSG         177
  86. #define SV_QUIETNODE      178
  87. #define SV_SETNRAMS       179
  88. #define SV_RESERVENODE    180
  89. #define SV_MSGCPS         181//add this one
  90.  
  91. #define WAIT     600
  92. #define NOWAIT   FALSE
  93. #define YES      TRUE
  94. #define NO       FALSE
  95. #define ECHO     TRUE
  96. #define NOECHO   FALSE
  97. #define CSI      0x9B
  98. #define RIGHTARROW 2
  99. #define LEFTARROW 3
  100. #define UPARROW 4
  101. #define DOWNARROW 5
  102.  
  103. #define IOFLAG_FIL_IN   0
  104. #define IOFLAG_KBD_IN   1
  105. #define IOFLAG_SER_IN   2
  106. #define IOFLAG_FIL_OUT  3
  107. #define IOFLAG_PRT_OUT  4
  108. #define IOFLAG_SCR_OUT  5
  109. #define IOFLAG_SER_OUT  6
  110.  
  111. #define TIMEOUT  -3
  112. #define NO_CARRIER -4
  113. #define GOODBYE  -7
  114. #define EXITCHAT  -8
  115.  
  116. #define STAT_STARTUP    0
  117. #define STAT_LOGON      1
  118. #define STAT_LOGOFF     2
  119. #define STAT_GUEST_CALL 3
  120. #define STAT_NEW_CALL   4
  121. #define STAT_VALID_CALL 5
  122. #define STAT_MESSAGE    6
  123. #define STAT_LETTER     7
  124. #define STAT_UPLOAD     8
  125. #define STAT_DOWNLOAD   9
  126. #define STAT_NEW_MEMBER 10
  127. #define STAT_SHUTDOWN   11
  128.  
  129. ///ZModem Struct
  130. struct ZModem {
  131.  char    FileName[40], TitleBar[60], ZStat[60];
  132.  long    Filesize, Cps,  Eff, RecPos, ErrorPos, ResumePos;
  133.  ULONG   ApxTime, LastTime;
  134.  char    Pad[2];
  135. };
  136. ///
  137. /// TempSysopInfo
  138. struct TempSysopInfo {
  139.         UWORD           AccessLevel;
  140.         UWORD           RatioType;
  141.         UWORD           Ratio;
  142.         LONG            TimeTotal;
  143.         UBYTE           ConfAc[10];
  144.         };
  145. ///
  146. /// Struct for User.Data!
  147. struct User {
  148.  char    Name[31],Pass[9],Location[30],PhoneNumber[13];
  149.  USHORT  Slot_Number;
  150.  USHORT  Sec_Status,
  151.          Sec_Board,                   /* File or Byte Ratio */
  152.          Sec_Library,                 /* Ratio              */
  153.          Sec_Bulletin,                /* Computer Type      */
  154.          Messages_Posted; /* Note ConfYM = the last msg you actually read, ConfRead is the same ?? */
  155.  ULONG   NewSinceDate;
  156.  ULONG   ConfRead1, ConfRead2, ConfRead3, ConfRead4, ConfRead5,  ConfRead6,
  157.          ConfRead7, ConfRead8, ConfRead9;
  158.  char    Conference_Access[10];
  159.  USHORT  Uploads, Downloads, ConfRJoin, Times_Called;
  160.  long    Time_Last_On, Time_Used, Time_Limit, Time_Total;
  161.  ULONG   Bytes_Download, Bytes_Upload, Daily_Bytes_Limit, Daily_Bytes_Dld;
  162.  char    Expert;
  163.  ULONG   ConfYM1, ConfYM2, ConfYM3, ConfYM4, ConfYM5, ConfYM6, ConfYM7,
  164.          ConfYM8, ConfYM9;
  165.  long    BeginLogCall;
  166.  UBYTE   Protocol, UUCPA, LineLength, New_User;
  167.  }; // UUCPA == AnsiUserFlag!
  168. ///
  169. /// Struct for User.keys!
  170. struct UserKeys {                 /* changes to UserKeys (RTS) */
  171.  char    UserName[31];
  172.  long    Number;
  173.  UBYTE   New_User;
  174.  UWORD   UPcps,              /* highest upload cps rate */
  175.          DNcps,              /* highest dnload cps rate */
  176.          Userflags,          /*                         */
  177.          baud_rate;          /* last online baud rate   */
  178.  UBYTE   QFlag,
  179.          Who,
  180.          MailScan,
  181.          Language,
  182.          QuietNode,
  183.          MaxCalls,
  184.          Called,
  185.          ReplySkip;
  186.  char    Pad[1];             /* ?? should be 15         */
  187. };
  188. ///
  189. ///Struct for MailHeader
  190. struct MailHeader {
  191.         char    Status[1];
  192.         long    MsgNumb;
  193.         char    ToName[31],
  194.                 FromName[31],
  195.                 Subject[31];
  196.         long    MsgDate,
  197.                 Recv;
  198.         UBYTE   Conference;
  199.         };
  200. ///
  201. ///Unused struct so far...
  202. struct FNodeStatus {
  203.         char    FileUpload[32];
  204.         char    FileDownload[32];
  205.  
  206.         long    FileUpSize;
  207.         long    FileUpCurr;
  208.         long    FileDSize;
  209.         long    FileDCurr;
  210.         
  211.         int     CPSUp;
  212.         int     CPSDl;
  213.         };
  214. ///
  215. ///Struct for MailStat File
  216. struct MailStat {
  217.         long    LowestKey,
  218.                 HighMsgNum,
  219.                 LowestNotDel;
  220.         char Pad[6];
  221.         };
  222. ///
  223. ///Struct for Conf.DB File
  224. struct ConfBase
  225. {
  226.   char Handle[31];
  227.   ULONG NewSinceDate, ConfRead,ConfYM;
  228.   ULONG Bytes_Download,Bytes_Upload;
  229.   ULONG Daily_Bytes_Limit,Daily_Bytes_Dld;
  230.   USHORT Upload,Downloads,RatioType,Ratio,Messages_Posted;
  231.   UWORD Access;
  232.   UWORD Active;
  233. };
  234. ///
  235. ///struct for soon to be coming user.misc file...
  236. struct UserMisc
  237. {
  238.   char Handle[31];    //maybe not used....
  239.   ULONG ConfAxx;    //not sure yet...
  240.   ULONG MiscInfo;    //Not sure yet...
  241.   char MsgSentBy[76];    //MAX 75 Chars +1 Pad
  242.   char SentBy[46];    //MAX 45 + 1 Pad
  243.   
  244.   char  Pad[264];    //Just incase...
  245. };                  //Maybe used later on, not sure yet what i should
  246.                     //Put in here.... exactly 425 Bytes per User...
  247. ///
  248.  
  249. struct ConfCfg
  250. {
  251.  int  ConfNum;
  252.  char ConfName[100];
  253.  char ConfLoc[255];
  254.  char MsgLoc[255];
  255.  char Password[30];
  256.  BOOL SentBy;
  257.  BOOL MsgShared;
  258. };
  259.  
  260. ///erm... dunno .. some struct
  261. struct MyData
  262. {
  263.   int Type,Size,misc1,Version;
  264. };
  265. ///
  266. ///struct used for communicating with the ACP
  267. struct MasterData
  268. {
  269.    struct MyData   Code;
  270.    struct ConfBase Conf;
  271. };
  272. ///
  273.  
  274. /* Structure for the TOPCPS.DAT File */
  275.  
  276. struct topcps
  277. {
  278.     long    upCPS;
  279.     char    upNAME[40];
  280.     long    downCPS;
  281.     char    downNAME[40];
  282. };
  283.  
  284.  
  285. /* stupid defines , theres gotta be a better way , will have to 
  286.    consult the Lattice Manual */
  287.  
  288. #define AbortIO(x) AbortIO((struct IORequest *)x)
  289. #define CheckIO(x) CheckIO((struct IORequest *)x)
  290. #define WaitIO(x) WaitIO((struct IORequest *)x)
  291. #define SendIO(x) SendIO((struct IORequest *)x)
  292. #define DoIO(x) DoIO((struct IORequest *)x)
  293. #define BeginIO(x) BeginIO((struct IORequest *)x)
  294.  
  295. #define OpenDevice(a, b, c, d) OpenDevice(a, b, (struct IORequest *)c, d)
  296. #define CloseDevice(x) CloseDevice((struct IORequest *)x)
  297.  
  298. #define DeleteExtIO(x) DeleteExtIO((struct IORequest *)x)
  299.  
  300. #define Tell(x)  Seek(x,0L,OFFSET_CURRENT)
  301.  
  302. #undef PutStr
  303.  
  304. ///struct for the whole Config of the ACP...
  305. struct StartOption
  306. {
  307.   SHORT LeftEdge;
  308.   SHORT TopEdge;
  309.   SHORT Width;
  310.   SHORT Height;
  311.   int BitPlanes;
  312.   BOOL StatBar;
  313.   BOOL Interlace;
  314.   BOOL DupeCheck;
  315.   BOOL QLogon;
  316.   BOOL TakeCredits;
  317.   BOOL SeenIt;
  318.   BOOL TrapDoor;
  319.   BOOL Iconify;
  320.   BOOL Eall_level;
  321.   BOOL A2232;
  322.   BOOL Toggles[20];
  323.   char Logoff[80];
  324.   char ShutDown[80];
  325.   char CycleLock[80];
  326.   char RamPen[80];
  327.   char BBSConfig[80];
  328.   char FilesNot[80];
  329.   char UserData[80];
  330.   char UserKey[80];
  331.   char OffHook[80];
  332.   char NodeScreen[80];
  333.   APTR t;
  334.   APTR s;
  335.   char LocalPath[80];
  336. };
  337. ///
  338.  
  339. #define ACS_ACCOUNT_EDITING      0
  340. #define ACS_BULLETINS            1
  341. #define ACS_COMMENT_TO_SYSOP     2
  342. #define ACS_DOWNLOAD             3
  343. #define ACS_UPLOAD               4
  344. #define ACS_ENTER_MESSAGE        5
  345. #define ACS_FILE_LISTINGS        6
  346. #define ACS_JOIN_CONFERENCE      7
  347. #define ACS_NEW_FILES_SINCE      8
  348. #define ACS_PAGE_SYSOP           9
  349. #define ACS_READ_MSG             10
  350. #define ACS_REMOTE_SHELL         11
  351. #define ACS_DISPLAY_USER_STATS   12
  352. #define ACS_VIEW_A_FILE          13
  353. #define ACS_EDIT_USER_INFO       14
  354. #define ACS_EDIT_USER_NAME       15
  355. #define ACS_EDIT_USER_LOCATION   16
  356. #define ACS_EDIT_PHONE_NUMBER    17
  357. #define ACS_EDIT_PASSWORD        18
  358. #define ACS_ZIPPY_TEXT_SEARCH    19
  359. #define ACS_OVERRIDE_CHAT        20
  360. #define ACS_SYSOP_DOWNLOAD       21
  361. #define ACS_SYSOP_VIEW           22
  362. #define ACS_SYSOP_READ           23
  363. #define ACS_KEEP_UPLOAD_CREDIT   24
  364. #define ACS_OVERRIDE_TIMES       25
  365. #define ACS_CLEAR_SCREEN_MSG     26
  366. #define ACS_ALLOW_FREE_RESUMING  27
  367. #define ACS_ONE_TIME_BULLETINS   28
  368. #define ACS_DO_CALLERSLOG        29
  369. #define ACS_SENTBY_FILES         30
  370. #define ACS_DO_UD_LOG            31
  371. #define ACS_SCREEN_TO_FRONT      32
  372. #define ACS_DEFAULT_CHAT_ON      33
  373. #define ACS_EALL_LEVEL           34
  374. #define ACS_DUPE_FILECHECK       35
  375. #define ACS_MSG_EDIT             36
  376. #define ACS_NODE_LIST            37
  377. #define ACS_MSG_LEVEL            38
  378. #define ACS_MSG_EXPERATION       39
  379. #define ACS_DELETE_MSG           40
  380. #define ACS_ATTACH_FILES         41
  381. #define ACS_CUSTOMCOMMANDS       42
  382. #define ACS_JOIN_SUB_CONFERENCE  43
  383. #define ACS_ZOOM_MAIL            44
  384. #define ACS_MCI_MSG              45
  385. #define ACS_EDIT_DIRS            46
  386. #define ACS_EDIT_ANY             47
  387. #define ACS_BREAK_CHAT           48
  388. #define ACS_QUIET_NODE           49
  389. #define ACS_SYSOP_COMMANDS       50
  390. #define ACS_WHO_IS_ONLINE        51
  391. #define ACS_RELOGON              52
  392. #define ACS_ULSTATS              53
  393. #define ACS_XPR_RECEIVE          54
  394. #define ACS_XPR_SEND             55
  395. #define ACS_WILDCARDS            56
  396. #define ACS_CONFERENCE_ACCOUNTING 57
  397. #define ACS_PRI_MSGFILES         58
  398. #define ACS_PUB_MSGFILES         59
  399. #define ACS_DIR_IN_KBYTE         60
  400. #define ACS_STEALTH_MODE         61
  401. #define ACS_QUIET_NODEOK         62
  402. #define ACS_WHO_FILENAMES        63
  403.  
  404.  
  405. //#define ADD_BIT(x) newacs[x/16] |= ten[x%16]
  406. //#define REM_BIT(x) newacs[x/16] ^= ten[x%16]
  407. //#define GET_BIT(x) newacs[x/16] |  ten[x%16]
  408.  
  409. #define LVL_ACCOUNT_EDITING      0
  410. #define LVL_COMMENT_TO_SYSOP     1
  411. #define LVL_DOWNLOAD             2
  412. #define LVL_ENTER_MESSAGE        3
  413. #define LVL_FILE_LISTINGS        4
  414. #define LVL_JOIN_CONFERENCE      5
  415. #define LVL_NEW_FILES_SINCE      6
  416. #define LVL_PAGE_SYSOP           7
  417. #define LVL_READ_MSG             8
  418. #define LVL_DISPLAY_USER_STATS   9
  419. #define LVL_UPLOAD               10
  420. #define LVL_VIEW_A_FILE          11
  421. #define LVL_EDIT_USER_INFO       12
  422. #define LVL_REMOTE_SHELL         13
  423. #define LVL_ZIPPY_TEXT_SEARCH    14
  424. #define LVL_OVERRIDE_CHAT        15
  425. #define LVL_EDIT_USER_NAME       16
  426. #define LVL_EDIT_USER_LOCATION   17
  427. #define LVL_EDIT_PHONE_NUMBER    18
  428. #define LVL_EDIT_PASSWORD        19
  429. #define LVL_SENTBY_FILES         20
  430. #define LVL_DEFAULT_CHAT_ON      21
  431. #define LVL_CLEAR_SCREEN_MSG     22
  432. #define LVL_CAPITOLS_in_FILE     23
  433. #define LVL_CHAT_COLOR_SYSOP     24
  434. #define LVL_CHAT_COLOR_USER      25
  435. #define LVL_VARYING_LINK_RATE    26
  436. #define LVL_KEEP_UPLOAD_CREDIT   27
  437. #define LVL_ALLOW_FREE_RESUMING  28
  438. #define LVL_DO_CALLERSLOG        29
  439. #define LVL_DO_UD_LOG            30
  440. #define LVL_OVERRIDE_TIMES       41
  441. #define LVL_BULLETINS            42
  442. #define LVL_SYSOP_READ           43
  443. #define LVL_NODE_NUMBER          44
  444. #define LVL_SCREEN_TO_FRONT      45
  445. #define LVL_ZOO                  46
  446. #define LVL_PKAX                 47
  447. #define LVL_LHARC                48
  448. #define LVL_WARP                 49
  449. #define LVL_ZIP                  50
  450. #define LVL_WHO_IS_ONLINE        51
  451. #define LVL_WILDCARDS            56
  452. #define LVL_DIR_IN_KBYTE         60
  453. #define LVL_STEALTH_MODE         61
  454. #define LVL_QUIET_NODEOK         62
  455. #define LVL_WHO_FILENAMES        63
  456.  
  457. #define DEBUG_BEGIN             0
  458. #define DEBUG_DROPDTR           1
  459. #define DEBUG_AWAITING_CONNECT  2
  460. #define DEBUG_RESETING_NODE     3
  461. #define DEBUG_RESETING_MODEM    4
  462. #define DEBUG_MODEM_RESET       5
  463. #define DEBUG_CHECKING_SHUTDOWN 6
  464. #define DEBUG_CONNECT_TIMEOUT   7
  465. #define DEBUG_BAD_CONNECT       8
  466. #define DEBUG_SER_ROUTINES      9
  467. #define DEBUG_CON_ROUTINES     10
  468. #define DEBUG_CONNECT          11
  469. #define DEBUG_SYSOP_LOGON      12
  470. #define DEBUG_REMOTE_LOGON     13
  471. #define DEBUG_SUSPEND_LOGON    14
  472. #define DEBUG_LOCAL_LOGON      15
  473. #define DEBUG_LOGOFF_SCRIPT    16
  474.  
  475. #define CONSOLE_PORT 1
  476. #define SERIAL_PORT 2
  477.