1 /* 2 ATP QWK MAIL READER FOR READING AND REPLYING TO QWK MAIL PACKETS. 3 Copyright (C) 1992, 1993, 1997 Thomas McWilliams 4 Copyright (C) 1990 Rene Cougnenc 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 20 21 /* 22 atptypes.h 23 */ 24 25 #ifndef _ATPTYPES_H 26 #define _ATPTYPES_H 1 27 28 #undef TRUE 29 #undef FALSE 30 31 struct fentry { 32 char *findpt; 33 struct fentry *fnext; 34 }; 35 36 struct MyIndex { 37 38 long LastRead; /* Last Message Read, Used once... */ 39 long MaxMsg; /* Max Messages allowed in conf. (future use) */ 40 long MsgNum; /* Number of This message */ 41 long Offset; /* Offset in the Conference file */ 42 unsigned long Size; /* Size of the message,with Header */ 43 }; 44 45 /* the enum read_command numbers are not arbitrary in the lower 2 bits */ 46 typedef enum { 47 NEXT = 0, AGAIN, PREVIOUS, FIND = 4, SCAN = 8, QUICK = 12, 48 KILL = 5, NUKE = 9, CROSS = 13, PRIVATE = 17 49 } read_command_t; 50 51 /* tokens for strings gathered from the atprc file */ 52 typedef enum { 53 usr1nm, editr, archivr, unarchvr, qwklst, bltlst, spellr 54 } atprc_str_t ; 55 56 /* character set modes */ 57 typedef enum { 58 CHR7BIT, ISOLAT1, CHRDOS 59 } atp_CODE_T; 60 61 typedef enum { 62 ENTER, REPLY, CHANGE, XPOST 63 } reply_type_t ; 64 65 typedef enum { 66 update_last_read_ptr, reset_last_read_ptr 67 } update_command_t; 68 69 /* 70 * The following enums are access constants to track who can 71 * change certain variables. Note that these access constants are 72 * arbitrary values; there is no particular significance to the 73 * magic numbers other than the hope that they are unique and not 74 * likely to occur accidentally i.e. not TRUE, FALSE, -1, 0, etc. 75 */ 76 77 typedef enum { 78 pmPurge_D = -632, pmPurge_CT, pmMkIndex, pmLoad 79 } pmail_access_t ; 80 81 typedef enum { 82 ss_getwinders = -773, ss_init_screen, ss_TTYinfo 83 } scrn_access_t ; 84 85 typedef enum { 86 fd_ReadNext = 1129, fd_PurgeAdjust 87 } fdone_access_t; 88 89 typedef enum { 90 scnf_GetConf = 1833 91 } scnf_access_t; 92 93 typedef enum { 94 rexist_AddReply = -51, rexist_ActvConf, rexist_Chk4RepCnf 95 } rexist_access_t; 96 97 typedef enum { 98 tm_PurgeAdjust = 16901, tm_AddReply 99 } totmsg_access_t; 100 101 typedef enum { 102 ip_ReadSeek = -7021, ip_PurgeAdjust 103 } indxptr_access_t; 104 105 typedef enum { 106 cb_RdCn_main_init = 226, cb_DoLoad_MkIndex, cb_Read 107 } curbrd_access_t ; 108 109 /* end of access constants */ 110 111 112 /* arbitrary and constants used by OpenRepFile() */ 113 typedef enum { 114 add_reply = 1492, pack_them = 1609 115 } pakrep_t; 116 117 typedef enum { 118 wm_hello, wm_news, wm_goodbye, wm_newfiles, wm_door_id, wm_bulletin 119 } welcome_msg_t; 120 121 typedef enum { 122 usrnm, boardnm 123 } cntrl_str_t ; 124 125 #ifndef BYTE_DECL 126 typedef unsigned char byte; 127 #define BYTE_DECL 128 #endif 129 130 #ifndef CNF_NAM_SIZ 131 typedef char conf_name[16]; 132 #define CNF_NAM_SIZ sizeof(conf_name) 133 #endif 134 135 #ifdef __LCLINT__ 136 typedef bool atp_BOOL_T ; 137 #else 138 typedef enum { FALSE = 0 , TRUE = 1 } atp_BOOL_T; 139 #endif 140 141 typedef enum { ATP_ERROR = -1, ATP_OK = 0 } atp_ERROR_T; 142 143 #define YES TRUE 144 #define NO FALSE 145 146 #define SUCCESS 0 147 #define FAILURE -1 148 149 #ifndef RETSIGTYPE 150 #define RETSIGTYPE void 151 #endif 152 153 #endif 154