OpenDoor.h 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. /* OpenDoors Online Software Programming Toolkit
  2. * (C) Copyright 1991 - 1999 by Brian Pirie.
  3. *
  4. * Oct-2001 door32.sys/socket modifications by Rob Swindell (www.synchro.net)
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library 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 GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. *
  20. *
  21. * File: OpenDoor.h
  22. *
  23. * Description: C/C++ definition of the OpenDoors API. Any program source file
  24. * that uses OpenDoors must #include this file.
  25. *
  26. * Revisions: Date Ver Who Change
  27. * ---------------------------------------------------------------
  28. * Dec 02, 1995 6.00 BP New file header format.
  29. * Dec 09, 1995 6.00 BP Added od_multiline_edit() prototype.
  30. * Dec 12, 1995 6.00 BP Cleaned up, added DLL definitions.
  31. * Dec 12, 1995 6.00 BP Moved ODPLAT_??? to OpenDoor.h.
  32. * Dec 21, 1995 6.00 BP Add ability to use already open port.
  33. * Dec 22, 1995 6.00 BP Added od_connect_speed.
  34. * Dec 23, 1995 6.00 BP Added EDIT_FLAG_SHOW_SIZE.
  35. * Dec 30, 1995 6.00 BP Added ODCALL for calling convention.
  36. * Jan 01, 1996 6.00 BP BCC32 compatibility changes.
  37. * Jan 01, 1996 6.00 BP Added new mulitline editor options.
  38. * Jan 01, 1996 6.00 BP Added od_disable_dtr, DIS_DTR_DISABLE.
  39. * Jan 03, 1996 6.00 BP Further BCC32 compatiblity changes.
  40. * Jan 04, 1996 6.00 BP Added od_get_input() and related defs.
  41. * Jan 07, 1996 6.00 BP Added OD_GLOBAL_CONV.
  42. * Jan 19, 1996 6.00 BP Removed some unused stuff.
  43. * Jan 19, 1996 6.00 BP Added od_internal_debug.
  44. * Jan 23, 1996 6.00 BP Added od_exiting and ERR_UNSUPPORTED.
  45. * Jan 30, 1996 6.00 BP New extern "C" decl for od_control.
  46. * Jan 30, 1996 6.00 BP Replaced od_yield() with od_sleep().
  47. * Jan 31, 1996 6.00 BP Added DIS_NAME_PROMPT.
  48. * Jan 31, 1996 6.00 BP Added tODMilliSec, OD_NO_TIMEOUT.
  49. * Jan 31, 1996 6.00 BP Added timeout for od_get_input().
  50. * Feb 02, 1996 6.00 BP Add RA 2.50-related od_control vars.
  51. * Feb 03, 1996 6.00 BP Added more editor options.
  52. * Feb 06, 1996 6.00 BP Added od_silent_mode.
  53. * Feb 08, 1996 6.00 BP Added editor buffer grow option.
  54. * Feb 13, 1996 6.00 BP Added od_get_input() flags parameter.
  55. * Feb 14, 1996 6.00 BP Recognize Borland's __WIN32__ define.
  56. * Feb 17, 1996 6.00 BP Added OD_KEY_F1 thru OD_KEY_F10.
  57. * Feb 19, 1996 6.00 BP Changed version number to 6.00.
  58. * Feb 27, 1996 6.00 BP Added od_max_key_latency.
  59. * Mar 03, 1996 6.10 BP Begin version 6.10.
  60. * Mar 03, 1996 6.10 BP Fixed OD_COMPONENT for medium mem mod.
  61. * Mar 06, 1996 6.10 BP Added TRIBBS.SYS support.
  62. * Mar 06, 1996 6.10 BP Added COM_DOOR32.
  63. * Mar 11, 1996 6.10 BP Added OD_VERSION.
  64. * Mar 13, 1996 6.10 BP Added od_get_cursor().
  65. * Mar 13, 1996 6.10 BP Added od_local_win_col.
  66. * Mar 14, 1996 6.10 BP Added od_config_callback.
  67. * Mar 21, 1996 6.10 BP Added od_control_get().
  68. * Apr 08, 1996 6.10 BP Added command-line parsing callbacks.
  69. * Oct 19, 2001 6.20 RS Added door32.sys and socket support.
  70. * Oct 19, 2001 6.21 RS Fixed socket disconnect bug.
  71. */
  72. /* Only parse OpenDoor.h once. */
  73. #ifndef _INC_OPENDOOR
  74. #define _INC_OPENDOOR
  75. /* ========================================================================= */
  76. /* Version and platform definitions. */
  77. /* ========================================================================= */
  78. /* OpenDoors API version number. */
  79. #define OD_VERSION 0x624
  80. #define DIRSEP '\\'
  81. #define DIRSEP_STR "\\"
  82. /* OpenDoors target platform. */
  83. #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
  84. #define ODPLAT_WIN32
  85. #undef ODPLAT_DOS
  86. #ifdef OD_WIN32_STATIC
  87. #pragma message("Compiling for Win32 static version of OpenDoors")
  88. #else /* !OD_WIN32_STATIC */
  89. #pragma message("Compiling for Win32 DLL version of OpenDoors")
  90. #define OD_DLL
  91. #endif /* !OD_WIN32_STATIC */
  92. #else /* !WIN32 */
  93. #if defined(__unix__) || defined(__NetBSD__) || defined(__APPLE__)
  94. #define ODPLAT_NIX
  95. #undef ODPLAT_DOS
  96. #undef DIRSEP
  97. #define DIRSEP '/'
  98. #undef DIRSEP_STR
  99. #define DIRSEP_STR "/"
  100. #else
  101. #define ODPLAT_DOS
  102. #undef ODPLAT_WIN32
  103. #pragma message("Compiling for DOS version of OpenDoors")
  104. #endif /* !NIX */
  105. #endif /* !WIN32 */
  106. /* Include any other headers required by OpenDoor.h. */
  107. #ifdef ODPLAT_WIN32
  108. #include "windows.h"
  109. #endif /* ODPLAT_WIN32 */
  110. /* For DLL versions, definitions of function or data that is exported from */
  111. /* a module or imported into a module. */
  112. #ifdef OD_DLL
  113. #if defined(_MSC_VER) || defined(__BORLANDC__)
  114. #define OD_EXPORT __declspec(dllexport)
  115. #else /* !_MSC_VER || __BORLANDC__ */
  116. #define OD_EXPORT _export
  117. #endif /* !_MSC_VER */
  118. #define OD_IMPORT DECLSPEC_IMPORT
  119. #else /* !OD_DLL */
  120. #define OD_EXPORT
  121. #define OD_IMPORT
  122. #endif /* !OD_DLL */
  123. /* Definition of function naming convention used by OpenDoors. */
  124. #ifdef __cplusplus
  125. #define OD_NAMING_CONVENTION extern "C"
  126. #else /* !__cplusplus */
  127. #define OD_NAMING_CONVENTION
  128. #endif /* !__cplusplus */
  129. /* Definition of function calling convention used by OpenDoors. */
  130. #ifdef ODPLAT_WIN32
  131. #define ODCALL WINAPI
  132. #define ODVCALL WINAPIV
  133. #define OD_GLOBAL_CONV WINAPI
  134. #else /* !ODPLAT_WIN32 */
  135. #define ODCALL
  136. #define ODVCALL
  137. #define OD_GLOBAL_CONV
  138. #endif /* !ODPLAT_WIN32 */
  139. /* OpenDoors API function declaration type. */
  140. #ifdef BUILDING_OPENDOORS
  141. #define ODAPIDEF OD_NAMING_CONVENTION OD_EXPORT
  142. #else /* !BUILDING_OPENDOORS */
  143. #define ODAPIDEF OD_NAMING_CONVENTION OD_IMPORT
  144. #endif /* !BUILDING_OPENDOORS */
  145. /* OpenDoors API global variable definition and declaration types. */
  146. #define OD_API_VAR_DEFN OD_NAMING_CONVENTION OD_EXPORT
  147. #ifdef BUILDING_OPENDOORS
  148. #define OD_API_VAR_DECL extern OD_EXPORT
  149. #else /* !BUILDING_OPENDOORS */
  150. #define OD_API_VAR_DECL extern OD_IMPORT
  151. #endif /* !BUILDING_OPENDOORS */
  152. /* Explicitly far pointers. */
  153. #ifdef ODPLAT_DOS
  154. #define ODFAR far
  155. #else /* !ODPLAT_DOS */
  156. #define ODFAR
  157. #endif /* !ODPLAT_DOS */
  158. /* ========================================================================= */
  159. /* Primitive data types. */
  160. /* ========================================================================= */
  161. /* Portable types that are the same size across all platforms */
  162. #ifndef ODPLAT_WIN32
  163. #ifndef BYTE
  164. typedef unsigned char BYTE; /* Unsigned, 8 bits. */
  165. #endif
  166. #ifndef WORD
  167. typedef unsigned short WORD; /* Unsigned, 16 bits. */
  168. #endif
  169. #ifndef DWORD
  170. typedef unsigned long DWORD; /* Unsigned, 32 bits. */
  171. #endif
  172. #ifndef CHAR
  173. typedef char CHAR; /* Native character representation. */
  174. #endif
  175. #define DWORD_DEFINED
  176. #define WORD_DEFINED
  177. #endif /* !ODPLAT_WIN32 */
  178. typedef signed char INT8; /* Signed, 8 bits. */
  179. typedef signed short int INT16; /* Signed, 16 bits. */
  180. #ifndef ODPLAT_WIN32 /* avoid type redefinition from basetsd.h */
  181. typedef signed long int INT32; /* Signed, 32 bits. */
  182. #endif
  183. /* Types that vary in size depending on platform. These are guranteed to be */
  184. /* at least the given size, but may be larger if this platform can */
  185. /* represent a larger value more efficiently (or as efficiently). */
  186. #ifndef ODPLAT_WIN32
  187. typedef int INT; /* Integer, at least 16 bits. */
  188. typedef unsigned int UINT; /* Unsigned integer, at least 16 bits. */
  189. #ifndef BOOL
  190. typedef char BOOL; /* Boolean value, at least 1 bit. */
  191. #endif /* !BOOL */
  192. #endif /* !ODPLAT_WIN32 */
  193. /* TRUE and FALSE manifest constants, for use with BOOL data type. */
  194. #ifndef FALSE
  195. #define FALSE 0
  196. #endif /* !FALSE */
  197. #ifndef TRUE
  198. #define TRUE 1
  199. #endif /* !TRUE */
  200. /* ========================================================================= */
  201. /* OpenDoors complex data types and defines. */
  202. /* ========================================================================= */
  203. /* Millisecond time type. */
  204. typedef DWORD tODMilliSec;
  205. /* Special value tODMilliSec value for no timeouts. */
  206. #ifdef ODPLAT_WIN32
  207. #define OD_NO_TIMEOUT INFINITE
  208. #else /* !ODPLAT_WIN32 */
  209. #define OD_NO_TIMEOUT 0xffffffffL
  210. #endif /* !ODPLAT_WIN32 */
  211. /* Multi-line editor defintions. */
  212. /* Editor text formats. */
  213. typedef enum
  214. {
  215. FORMAT_PARAGRAPH_BREAKS
  216. ,FORMAT_LINE_BREAKS
  217. ,FORMAT_FTSC_MESSAGE
  218. ,FORMAT_NO_WORDWRAP
  219. } tODEditTextFormat;
  220. /* Menu callback function return values. */
  221. typedef enum
  222. {
  223. EDIT_MENU_DO_NOTHING
  224. ,EDIT_MENU_EXIT_EDITOR
  225. } tODEditMenuResult;
  226. /* Editor flags. */
  227. #define EFLAG_NORMAL 0x00000000
  228. /* Optional multi-line editor settings. */
  229. typedef struct
  230. {
  231. INT nAreaLeft;
  232. INT nAreaTop;
  233. INT nAreaRight;
  234. INT nAreaBottom;
  235. tODEditTextFormat TextFormat;
  236. tODEditMenuResult (*pfMenuCallback)(void *pUnused);
  237. void * (*pfBufferRealloc)(void *pOriginalBuffer, UINT unNewSize);
  238. DWORD dwEditFlags;
  239. char *pszFinalBuffer;
  240. UINT unFinalBufferSize;
  241. } tODEditOptions;
  242. /* Editor return values. */
  243. #define OD_MULTIEDIT_ERROR 0
  244. #define OD_MULTIEDIT_SUCCESS 1
  245. /* Input event information. */
  246. /* Input event types. */
  247. typedef enum
  248. {
  249. EVENT_CHARACTER
  250. ,EVENT_EXTENDED_KEY
  251. } tODInputEventType;
  252. /* Extended key codes. */
  253. #define OD_KEY_F1 0x3b
  254. #define OD_KEY_F2 0x3c
  255. #define OD_KEY_F3 0x3d
  256. #define OD_KEY_F4 0x3e
  257. #define OD_KEY_F5 0x3f
  258. #define OD_KEY_F6 0x40
  259. #define OD_KEY_F7 0x41
  260. #define OD_KEY_F8 0x42
  261. #define OD_KEY_F9 0x43
  262. #define OD_KEY_F10 0x44
  263. #define OD_KEY_UP 0x48
  264. #define OD_KEY_DOWN 0x50
  265. #define OD_KEY_LEFT 0x4b
  266. #define OD_KEY_RIGHT 0x4d
  267. #define OD_KEY_INSERT 0x52
  268. #define OD_KEY_DELETE 0x53
  269. #define OD_KEY_HOME 0x47
  270. #define OD_KEY_END 0x4f
  271. #define OD_KEY_PGUP 0x49
  272. #define OD_KEY_PGDN 0x51
  273. #define OD_KEY_F11 0x85
  274. #define OD_KEY_F12 0x86
  275. #define OD_KEY_SHIFTTAB 0x0f
  276. /* Input event structure. */
  277. typedef struct
  278. {
  279. tODInputEventType EventType;
  280. BOOL bFromRemote;
  281. char chKeyPress;
  282. } tODInputEvent;
  283. /* Third option (in addition to TRUE and FALSE) for tri-state options. */
  284. #define MAYBE 2
  285. /* od_spawnvpe() flags. */
  286. #define P_WAIT 0
  287. #define P_NOWAIT 1
  288. #define CURRENT 0
  289. #define IRET 1
  290. /* od_edit_str() flags. */
  291. #define EDIT_FLAG_NORMAL 0x0000
  292. #define EDIT_FLAG_NO_REDRAW 0x0001
  293. #define EDIT_FLAG_FIELD_MODE 0x0002
  294. #define EDIT_FLAG_EDIT_STRING 0x0004
  295. #define EDIT_FLAG_STRICT_INPUT 0x0008
  296. #define EDIT_FLAG_PASSWORD_MODE 0x0010
  297. #define EDIT_FLAG_ALLOW_CANCEL 0x0020
  298. #define EDIT_FLAG_FILL_STRING 0x0040
  299. #define EDIT_FLAG_AUTO_ENTER 0x0080
  300. #define EDIT_FLAG_AUTO_DELETE 0x0100
  301. #define EDIT_FLAG_KEEP_BLANK 0x0200
  302. #define EDIT_FLAG_PERMALITERAL 0x0400
  303. #define EDIT_FLAG_LEAVE_BLANK 0x0800
  304. #define EDIT_FLAG_SHOW_SIZE 0x1000
  305. /* od_edit_str() return values. */
  306. #define EDIT_RETURN_ERROR 0
  307. #define EDIT_RETURN_CANCEL 1
  308. #define EDIT_RETURN_ACCEPT 2
  309. #define EDIT_RETURN_PREVIOUS 3
  310. #define EDIT_RETURN_NEXT 4
  311. /* od_popup_menu() flag values. */
  312. #define MENU_NORMAL 0x0000
  313. #define MENU_ALLOW_CANCEL 0x0001
  314. #define MENU_PULLDOWN 0x0002
  315. #define MENU_KEEP 0x0004
  316. #define MENU_DESTROY 0x0008
  317. /* od_autodetect() flag values. */
  318. #define DETECT_NORMAL 0x0000
  319. /* od_scroll() flags. */
  320. #define SCROLL_NORMAL 0x0000
  321. #define SCROLL_NO_CLEAR 0x0001
  322. /* OpenDoors status line settings */
  323. #define STATUS_NORMAL 0
  324. #define STATUS_NONE 8
  325. #define STATUS_ALTERNATE_1 1
  326. #define STATUS_ALTERNATE_2 2
  327. #define STATUS_ALTERNATE_3 3
  328. #define STATUS_ALTERNATE_4 4
  329. #define STATUS_ALTERNATE_5 5
  330. #define STATUS_ALTERNATE_6 6
  331. #define STATUS_ALTERNATE_7 7
  332. /* OpenDoors color definitions. */
  333. #define D_BLACK 0
  334. #define D_BLUE 1
  335. #define D_GREEN 2
  336. #define D_CYAN 3
  337. #define D_RED 4
  338. #define D_MAGENTA 5
  339. #define D_BROWN 6
  340. #define D_GREY 7
  341. #define L_BLACK 8
  342. #define L_BLUE 9
  343. #define L_GREEN 10
  344. #define L_CYAN 11
  345. #define L_RED 12
  346. #define L_MAGENTA 13
  347. #define L_YELLOW 14
  348. #define L_WHITE 15
  349. #define B_BLACK L_BLACK
  350. #define B_BLUE L_BLUE
  351. #define B_GREEN L_GREEN
  352. #define B_CYAN L_CYAN
  353. #define B_RED L_RED
  354. #define B_MAGENTA L_MAGENTA
  355. #define B_BROWN L_YELLOW
  356. #define B_GREY L_WHITE
  357. /* Door information file formats (od_control.od_info_type). */
  358. #define DORINFO1 0 /* DORINFO?.DEF */
  359. #define EXITINFO 1 /* QBBS 2.6? EXITINFO.BBS & DORINFO?.DEF */
  360. #define RA1EXITINFO 2 /* RA 1.?? EXITINFO.BBS & DORINFO?.DEF */
  361. #define CHAINTXT 3 /* CHAIN.TXT */
  362. #define SFDOORSDAT 4 /* SFDOORS.DAT */
  363. #define CALLINFO 5 /* CALLINFO.BBS */
  364. #define DOORSYS_GAP 6 /* GAP/PC-Board DOOR.SYS */
  365. #define DOORSYS_DRWY 7 /* DoorWay DOOR.SYS */
  366. #define QBBS275EXITINFO 8 /* QuickBBS 2.75+ EXITINFO.BBS */
  367. #define CUSTOM 9 /* User-defined custom format */
  368. #define DOORSYS_WILDCAT 10 /* WildCat! DOOR.SYS */
  369. #define RA2EXITINFO 11 /* RA 2.00+ EXITINFO.BBS */
  370. #define TRIBBSSYS 12 /* TRIBBS.SYS */
  371. #define DOOR32SYS 13 /* DOOR32.SYS */
  372. #define NO_DOOR_FILE 100 /* No door information file was found */
  373. /* Error type (od_control.od_error). */
  374. #define ERR_NONE 0 /* No error yet */
  375. #define ERR_MEMORY 1 /* Unable to allocate enough memory */
  376. #define ERR_NOGRAPHICS 2 /* Function requires ANSI/AVATAR/RIP mode */
  377. #define ERR_PARAMETER 3 /* Invalid value was passed to a function */
  378. #define ERR_FILEOPEN 4 /* Unable to open file */
  379. #define ERR_LIMIT 5 /* An internal limit has been exceeded */
  380. #define ERR_FILEREAD 6 /* Unable to read from file */
  381. #define ERR_NOREMOTE 7 /* Function may not be called in local mode */
  382. #define ERR_GENERALFAILURE 8 /* Percise cause of failure is unknown */
  383. #define ERR_NOTHINGWAITING 9 /* A request for data when none was ready */
  384. #define ERR_NOMATCH 10 /* No match was found */
  385. #define ERR_UNSUPPORTED 11 /* Not supported in this version */
  386. /* od_control.od_errorlevel indicies. */
  387. #define ERRORLEVEL_ENABLE 0
  388. #define ERRORLEVEL_CRITICAL 1
  389. #define ERRORLEVEL_NOCARRIER 2
  390. #define ERRORLEVEL_HANGUP 3
  391. #define ERRORLEVEL_TIMEOUT 4
  392. #define ERRORLEVEL_INACTIVITY 5
  393. #define ERRORLEVEL_DROPTOBBS 6
  394. #define ERRORLEVEL_NORMAL 7
  395. /* Special od_popup_menu() return values. */
  396. #define POPUP_ERROR -1
  397. #define POPUP_ESCAPE 0
  398. #define POPUP_LEFT -2
  399. #define POPUP_RIGHT -3
  400. /* od_get_input() flags. */
  401. #define GETIN_NORMAL 0x0000
  402. #define GETIN_RAW 0x0001
  403. #define GETIN_RAWCTRL 0x0002
  404. /* od_control.od_box_chars array indicies. */
  405. #define BOX_UPPERLEFT 0
  406. #define BOX_TOP 1
  407. #define BOX_UPPERRIGHT 2
  408. #define BOX_LEFT 3
  409. #define BOX_LOWERLEFT 4
  410. #define BOX_LOWERRIGHT 5
  411. #define BOX_BOTTOM 6
  412. #define BOX_RIGHT 7
  413. /* od_control.od_okaytopage settings. */
  414. #define PAGE_DISABLE 0
  415. #define PAGE_ENABLE 1
  416. #define PAGE_USE_HOURS 2
  417. /* Method used for serial I/O (od_control.od_com_method). */
  418. #define COM_FOSSIL 1
  419. #define COM_INTERNAL 2
  420. #define COM_WIN32 3
  421. #define COM_DOOR32 4
  422. #define COM_SOCKET 5
  423. #define COM_STDIO 6
  424. /* Flow control method (od_control.od_com_flow_control). */
  425. #define COM_DEFAULT_FLOW 0
  426. #define COM_RTSCTS_FLOW 1
  427. #define COM_NO_FLOW 2
  428. /* Optional component initialization functions. */
  429. ODAPIDEF void ODCALL ODConfigInit(void);
  430. ODAPIDEF void ODCALL ODLogEnable(void);
  431. ODAPIDEF void ODCALL ODMPSEnable(void);
  432. /* Optional OpenDoors component settings. */
  433. typedef void(ODFAR OD_COMPONENT)(void);
  434. #define INCLUDE_CONFIG_FILE (OD_COMPONENT *)ODConfigInit
  435. #define NO_CONFIG_FILE NULL
  436. #define INCLUDE_LOGFILE (OD_COMPONENT *)ODLogEnable
  437. #define NO_LOGFILE NULL
  438. #define INCLUDE_MPS (OD_COMPONENT *)ODMPSEnable
  439. #define NO_MPS NULL
  440. /* Built-in personality defintion functions. */
  441. ODAPIDEF void ODCALL pdef_opendoors(BYTE btOperation);
  442. ODAPIDEF void ODCALL pdef_pcboard(BYTE btOperation);
  443. ODAPIDEF void ODCALL pdef_ra(BYTE btOperation);
  444. ODAPIDEF void ODCALL pdef_wildcat(BYTE btOperation);
  445. /* Personality proc type. */
  446. typedef void(ODFAR OD_PERSONALITY_PROC)(BYTE);
  447. /* Personality identifiers. */
  448. #define PER_OPENDOORS (void *)pdef_opendoors
  449. #define PER_PCBOARD (void *)pdef_pcboard
  450. #define PER_RA (void *)pdef_ra
  451. #define PER_WILDCAT (void *)pdef_wildcat
  452. /* od_control.od_disable flags. */
  453. #define DIS_INFOFILE 0x0001
  454. #define DIS_CARRIERDETECT 0x0002
  455. #define DIS_TIMEOUT 0x0004
  456. #define DIS_LOCAL_OVERRIDE 0x0008
  457. #define DIS_BPS_SETTING 0x0010
  458. #define DIS_LOCAL_INPUT 0x0020
  459. #define DIS_SYSOP_KEYS 0x0040
  460. #define DIS_DTR_DISABLE 0x0080
  461. #define DIS_NAME_PROMPT 0x0100
  462. /* Event status settings. */
  463. #define ES_DELETED 0
  464. #define ES_ENABLED 1
  465. #define ES_DISABLED 2
  466. /* Personality proceedure operations. */
  467. #define PEROP_DISPLAY1 0
  468. #define PEROP_DISPLAY2 1
  469. #define PEROP_DISPLAY3 2
  470. #define PEROP_DISPLAY4 3
  471. #define PEROP_DISPLAY5 4
  472. #define PEROP_DISPLAY6 5
  473. #define PEROP_DISPLAY7 6
  474. #define PEROP_DISPLAY8 7
  475. #define PEROP_UPDATE1 10
  476. #define PEROP_UPDATE2 11
  477. #define PEROP_UPDATE3 12
  478. #define PEROP_UPDATE4 13
  479. #define PEROP_UPDATE5 14
  480. #define PEROP_UPDATE6 15
  481. #define PEROP_UPDATE7 16
  482. #define PEROP_UPDATE8 17
  483. #define PEROP_INITIALIZE 20
  484. #define PEROP_CUSTOMKEY 21
  485. #define PEROP_DEINITIALIZE 22
  486. /* ========================================================================= */
  487. /* The OpenDoors control structure (od_control) */
  488. /* ========================================================================= */
  489. /* Force byte alignment, if possible */
  490. #ifdef __TURBOC__
  491. #if(__TURBOC__ >= 0x295)
  492. #pragma option -a-
  493. #endif /* __TURBOC__ >= 0x295 */
  494. #endif /* __TURBOC__ */
  495. #if defined(_MSC_VER) || defined(WIN32)
  496. #pragma pack(1)
  497. #endif /* _MSC_VER */
  498. typedef struct
  499. {
  500. /* Location or name of door information file (if one is to be used). */
  501. char info_path[60];
  502. /* Serial port settings. */
  503. DWORD baud;
  504. DWORD od_connect_speed;
  505. INT16 od_com_address;
  506. BYTE od_com_irq;
  507. BYTE od_com_method;
  508. BYTE od_com_flow_control;
  509. WORD od_com_rx_buf;
  510. WORD od_com_tx_buf;
  511. BYTE od_com_fifo_trigger;
  512. BOOL od_com_no_fifo;
  513. BOOL od_no_fossil;
  514. BOOL od_use_socket;
  515. INT16 port;
  516. DWORD od_open_handle;
  517. /* Caller and system information. */
  518. char system_name[40];
  519. char sysop_name[40];
  520. INT32 system_calls;
  521. char system_last_caller[36];
  522. char timelog_start_date[9];
  523. INT16 timelog_busyperhour[24];
  524. INT16 timelog_busyperday[7];
  525. char user_name[36];
  526. char user_location[26];
  527. char user_password[16];
  528. char user_dataphone[16];
  529. char user_homephone[16];
  530. char user_lasttime[6];
  531. char user_lastdate[9];
  532. BYTE user_attribute;
  533. BYTE user_flags[4];
  534. DWORD user_net_credit;
  535. DWORD user_pending;
  536. WORD user_messages;
  537. DWORD user_lastread;
  538. WORD user_security;
  539. DWORD user_numcalls;
  540. DWORD user_uploads;
  541. DWORD user_downloads;
  542. DWORD user_upk;
  543. DWORD user_downk;
  544. DWORD user_todayk;
  545. WORD user_time_used;
  546. WORD user_screen_length;
  547. BYTE user_last_pwdchange;
  548. BYTE user_attrib2;
  549. WORD user_group;
  550. BYTE event_status;
  551. char event_starttime[6];
  552. BYTE event_errorlevel;
  553. BYTE event_days;
  554. BYTE event_force;
  555. char event_last_run[9];
  556. BYTE user_netmailentered;
  557. BYTE user_echomailentered;
  558. char user_logintime[6];
  559. char user_logindate[9];
  560. INT16 user_timelimit;
  561. INT32 user_loginsec;
  562. INT32 user_credit;
  563. WORD user_num;
  564. INT16 user_readthru;
  565. INT16 user_numpages;
  566. INT16 user_downlimit;
  567. char user_timeofcreation[6];
  568. char user_logonpassword[16];
  569. BYTE user_wantchat;
  570. BYTE user_ansi;
  571. INT16 user_deducted_time;
  572. char user_menustack[50][9];
  573. BYTE user_menustackpointer;
  574. char user_handle[36];
  575. char user_comment[81];
  576. char user_firstcall[9];
  577. BYTE user_combinedrecord[200];
  578. char user_birthday[9];
  579. char user_subdate[9];
  580. BYTE user_screenwidth;
  581. BYTE user_language;
  582. BYTE user_date_format;
  583. char user_forward_to[36];
  584. BYTE user_error_free;
  585. BYTE sysop_next;
  586. BYTE user_emsi_session;
  587. char user_emsi_crtdef[41];
  588. char user_emsi_protocols[41];
  589. char user_emsi_capabilities[41];
  590. char user_emsi_requests[41];
  591. char user_emsi_software[41];
  592. BYTE user_hold_attr1;
  593. BYTE user_hold_attr2;
  594. BYTE user_hold_len;
  595. char user_reasonforchat[78];
  596. char user_callsign[12];
  597. WORD user_msg_area;
  598. WORD user_file_area;
  599. char user_protocol;
  600. WORD user_file_group;
  601. BYTE user_last_birthday_check;
  602. char user_sex;
  603. DWORD user_xi_record;
  604. WORD user_msg_group;
  605. BYTE user_avatar;
  606. char user_org[51];
  607. char user_address[3][51];
  608. INT32 user_pwd_crc;
  609. INT32 user_logon_pwd_crc;
  610. char user_last_cost_menu[9];
  611. WORD user_menu_cost;
  612. BYTE user_rip;
  613. BYTE user_rip_ver;
  614. BYTE user_attrib3;
  615. BOOL user_expert;
  616. char system_last_handle[36];
  617. /* Door information file statistics. */
  618. BYTE od_info_type;
  619. BYTE od_extended_info;
  620. WORD od_node;
  621. BYTE od_ra_info;
  622. /* Current program settings. */
  623. BOOL od_always_clear;
  624. BOOL od_force_local;
  625. BOOL od_chat_active;
  626. BOOL od_current_statusline;
  627. INT16 od_error;
  628. BYTE od_last_input;
  629. BOOL od_logfile_disable;
  630. char od_logfile_name[80];
  631. WORD od_maxtime;
  632. INT16 od_maxtime_deduction;
  633. BOOL od_okaytopage;
  634. INT16 od_pagestartmin;
  635. INT16 od_pageendmin;
  636. BOOL od_page_pausing;
  637. INT16 od_page_statusline;
  638. BOOL od_user_keyboard_on;
  639. BOOL od_update_status_now;
  640. INT16 od_cur_attrib;
  641. /* OpenDoors customization settings. */
  642. char od_box_chars[8];
  643. char od_cfg_text[48][33];
  644. char od_cfg_lines[25][33];
  645. OD_COMPONENT *od_config_file;
  646. const char * od_config_filename;
  647. void (*od_config_function)(char *keyword, char *options);
  648. char od_color_char;
  649. char od_color_delimiter;
  650. char od_color_names[12][33];
  651. BOOL od_clear_on_exit;
  652. void (*od_cmd_line_handler)(char *pszKeyword, char *pszOptions);
  653. void (*od_cmd_line_help_func)(void);
  654. void (*od_default_personality)(BYTE operation);
  655. BOOL od_default_rip_win;
  656. WORD od_disable;
  657. char od_disable_dtr[40];
  658. BOOL od_disable_inactivity;
  659. BOOL od_emu_simulate_modem;
  660. BYTE od_errorlevel[8];
  661. BOOL od_full_color;
  662. BOOL od_full_put;
  663. WORD od_in_buf_size;
  664. INT16 od_inactivity;
  665. INT16 od_inactive_warning;
  666. BOOL od_internal_debug;
  667. tODMilliSec od_max_key_latency;
  668. char od_list_pause;
  669. char od_list_stop;
  670. OD_COMPONENT *od_logfile;
  671. char *od_logfile_messages[14];
  672. OD_COMPONENT *od_mps;
  673. BOOL od_nocopyright;
  674. BOOL od_noexit;
  675. BOOL od_no_ra_codes;
  676. BYTE od_page_len;
  677. char od_prog_copyright[40];
  678. char od_prog_name[40];
  679. char od_prog_version[40];
  680. DWORD od_reg_key;
  681. char od_reg_name[36];
  682. BOOL od_silent_mode;
  683. BOOL od_status_on;
  684. BOOL od_spawn_freeze_time;
  685. BOOL od_swapping_disable;
  686. BOOL od_swapping_noems;
  687. char od_swapping_path[80];
  688. /* Custom function hooks. */
  689. void (*od_no_file_func)(void);
  690. void (*od_before_exit)(void);
  691. void (*od_cbefore_chat)(void);
  692. void (*od_cafter_chat)(void);
  693. void (*od_cbefore_shell)(void);
  694. void (*od_cafter_shell)(void);
  695. void (*od_config_callback)(void);
  696. void (*od_help_callback)(void);
  697. void (*od_ker_exec)(void);
  698. void (*od_local_input)(INT16 key);
  699. void (*od_time_msg_func)(char *string);
  700. /* OpenDoors function key customizations. */
  701. WORD key_chat;
  702. WORD key_dosshell;
  703. WORD key_drop2bbs;
  704. WORD key_hangup;
  705. WORD key_keyboardoff;
  706. WORD key_lesstime;
  707. WORD key_lockout;
  708. WORD key_moretime;
  709. WORD key_status[9];
  710. WORD key_sysopnext;
  711. /* Additional function keys. */
  712. BYTE od_num_keys;
  713. INT16 od_hot_key[16];
  714. INT16 od_last_hot;
  715. void (*od_hot_function[16])(void);
  716. /* OpenDoors prompt customizations. */
  717. char * od_after_chat;
  718. char * od_after_shell;
  719. char * od_before_chat;
  720. char * od_before_shell;
  721. char * od_chat_reason;
  722. char * od_continue;
  723. char od_continue_yes;
  724. char od_continue_no;
  725. char od_continue_nonstop;
  726. char * od_day[7];
  727. char * od_hanging_up;
  728. char * od_exiting;
  729. char * od_help_text;
  730. char * od_help_text2;
  731. char * od_inactivity_timeout;
  732. char * od_inactivity_warning;
  733. char * od_month[12];
  734. char * od_no_keyboard;
  735. char * od_no_sysop;
  736. char * od_no_response;
  737. char * od_no_time;
  738. char * od_offline;
  739. char * od_paging;
  740. char * od_press_key;
  741. char * od_sending_rip;
  742. char * od_status_line[3];
  743. char * od_sysop_next;
  744. char * od_time_left;
  745. char * od_time_warning;
  746. char * od_want_chat;
  747. char * od_cmd_line_help;
  748. /* OpenDoors color customizations. */
  749. BYTE od_chat_color1;
  750. BYTE od_chat_color2;
  751. BYTE od_list_comment_col;
  752. BYTE od_list_name_col;
  753. BYTE od_list_offline_col;
  754. BYTE od_list_size_col;
  755. BYTE od_list_title_col;
  756. BYTE od_local_win_col;
  757. BYTE od_continue_col;
  758. BYTE od_menu_title_col;
  759. BYTE od_menu_border_col;
  760. BYTE od_menu_text_col;
  761. BYTE od_menu_key_col;
  762. BYTE od_menu_highlight_col;
  763. BYTE od_menu_highkey_col;
  764. /* Platform-specific settings. */
  765. #ifdef ODPLAT_WIN32
  766. HICON od_app_icon;
  767. int od_cmd_show;
  768. #endif /* ODPLAT_WIN32 */
  769. } tODControl;
  770. /* Restore original structure alignment, if possible. */
  771. #if defined(_MSC_VER) || defined(WIN32)
  772. #pragma pack()
  773. #endif /* _MSC_VER */
  774. /* The od_control external variable. */
  775. #ifdef __cplusplus
  776. extern "C" {
  777. #endif /* __cplusplus */
  778. OD_API_VAR_DECL tODControl
  779. #ifndef _WIN32 /* warning C4229: anachronism used : modifiers on data are ignored */
  780. OD_GLOBAL_CONV
  781. #endif
  782. od_control;
  783. #ifdef __cplusplus
  784. }
  785. #endif /* __cplusplus */
  786. /* ========================================================================= */
  787. /* OpenDoors API function prototypes. */
  788. /* ========================================================================= */
  789. /* Programs interface with OpenDoors by calling any of the OpenDoors API
  790. * functions. A summary of these functions appears below, followed by the
  791. * function definition prototypes. Full information on these functions is
  792. * provided by the OpenDoors manual. Functions denoted (ANS/AVT) require ANSI
  793. * or AVATAR display modes to be active.
  794. *
  795. * OUTPUT FUNCTIONS - TEXT DISPLAY
  796. * od_printf() - Performs formatted output, with color settings
  797. * od_disp_str() - Displays a normal, nul-terminated string.
  798. * od_disp() - Sends chars to modem, with/without local echo
  799. * od_disp_emu() - Displays a string, translating ANSI/AVT codes
  800. * od_repeat() - Efficiently displays a character repeatedly
  801. * od_putch() - Displays a single character.
  802. *
  803. * OUTPUT FUNCTIONS - COLOUR AND CURSOR CONTROL
  804. * od_set_color() - Sets color according to fore/background values
  805. * od_set_attrib() - Sets color to specified IBM-PC attribute
  806. * od_set_cursor() - Positions cursor on screen (ANS/AVT)
  807. * od_get_cursor() - Estimates the current cursor position on screen
  808. *
  809. * OUTPUT FUNCTIONS - SCREEN MANIPULATION
  810. * od_clr_scr() - Clears the screen
  811. * od_save_screen() - Saves the contents of entire screen
  812. * od_restore_screen() - Restores the contents of entire screen
  813. *
  814. * OUTPUT FUNCTIONS - BLOCK MANIPULATION
  815. * od_clr_line() - Clears the remainder of the current line
  816. * od_gettext() - Gets the contents a block of screen (ANS/AVT)
  817. * od_puttext() - Displays block stored by gettext() (ANS/AVT)
  818. * od_scroll() - Scrolls a portion of the screen (ANS/AVT)
  819. *
  820. * OUTPUT FUNCTIONS - WINDOWS & MENUS
  821. * od_draw_box() - Draws a box on the screen (ANS/AVT)
  822. * od_window_create() - Creates a window, storing underlying (ANS/AVT)
  823. * od_window_remove() - Removes window, restoring underlying (ANS/AVT)
  824. * od_popup_menu() - Displays popup menu with "light" bar (ANS/AVT)
  825. *
  826. * OUTPUT FUNCTIONS - FILE DISPLAY
  827. * od_send_file() - Displays an ASCII/ANSI/AVATAR/RIP file
  828. * od_hotkey_menu() - Displays ASC/ANS/AVATAR/RIP menu, with hotkeys
  829. * od_list_files() - Lists files avail for download using FILES.BBS
  830. *
  831. * INPUT FUNCTIONS
  832. * od_get_answer() - Inputs a key, allowing only specified responses
  833. * od_get_key() - Inputs a key, optionally waiting for next key
  834. * od_get_input() - Obtains next input, with translation
  835. * od_input_str() - Inputs string of specified length from keyboard
  836. * od_edit_str() - Fancy formatted string input function (ANS/AVT)
  837. * od_clear_keybuffer() - Removes any waiting keys in keyboard buffer
  838. * od_multiline_edit() - Edits text that spans multiple lines (ANS/AVT)
  839. * od_key_pending() - Returns TRUE if a key is waiting to be processed
  840. *
  841. * COMMON DOOR ACTIVITY FUNCTIONS
  842. * od_page() - Allows user to page sysop
  843. * od_spawn() - Suspends OpenDoors & starts another program
  844. * od_spawnvpe() - Like od_spawn, but with more options
  845. * od_log_write() - Writes a logfile entry
  846. * od_parse_cmd_line() - Handles standard command-line parameters
  847. *
  848. * SPECIAL CONTROL FUNCTIONS
  849. * od_init() - Forces OpenDoors initialization
  850. * od_color_config() - Translates color description to color value
  851. * od_add_personality() - Adds another local interface personality
  852. * od_set_statusline() - Sets the current status line setting
  853. * od_autodetect() - Determines the remote system terminal type
  854. * od_kernel() - Call when not calling other functions
  855. * od_exit() - Ends OpenDoors program
  856. * od_carrier() - Indicates whether remote connection is present
  857. * od_set_dtr() - Raises / lowers the DTR signal to the modem
  858. * od_chat() - Manually starts chat mode
  859. * od_sleep() - Yield to other processes
  860. * od_control_get() - Returns a pointer to the od_control structure.
  861. */
  862. ODAPIDEF BOOL ODCALL od_add_personality(const char *pszName, BYTE btOutputTop,
  863. BYTE btOutputBottom,
  864. OD_PERSONALITY_PROC *pfPerFunc);
  865. ODAPIDEF void ODCALL od_autodetect(INT nFlags);
  866. ODAPIDEF BOOL ODCALL od_carrier(void);
  867. ODAPIDEF void ODCALL od_chat(void);
  868. ODAPIDEF void ODCALL od_clear_keybuffer(void);
  869. ODAPIDEF void ODCALL od_clr_line(void);
  870. ODAPIDEF void ODCALL od_clr_scr(void);
  871. ODAPIDEF BYTE ODCALL od_color_config(char *pszColorDesc);
  872. ODAPIDEF tODControl * ODCALL od_control_get(void);
  873. ODAPIDEF void ODCALL od_disp(const char *pachBuffer, INT nSize, BOOL bLocalEcho);
  874. ODAPIDEF void ODCALL od_disp_emu(const char *pszToDisplay, BOOL bRemoteEcho);
  875. ODAPIDEF void ODCALL od_disp_str(const char *pszToDisplay);
  876. ODAPIDEF BOOL ODCALL od_draw_box(BYTE btLeft, BYTE btTop, BYTE btRight,
  877. BYTE btBottom);
  878. ODAPIDEF WORD ODCALL od_edit_str(char *pszInput, char *pszFormat, INT nRow,
  879. INT nColumn, BYTE btNormalColour,
  880. BYTE btHighlightColour, char chBlank,
  881. WORD nFlags);
  882. ODAPIDEF void ODCALL od_exit(INT nErrorLevel, BOOL bTermCall);
  883. ODAPIDEF char ODCALL od_get_answer(const char *pszOptions);
  884. ODAPIDEF void ODCALL od_get_cursor(INT *pnRow, INT *pnColumn);
  885. ODAPIDEF BOOL ODCALL od_get_input(tODInputEvent *pInputEvent,
  886. tODMilliSec TimeToWait, WORD wFlags);
  887. ODAPIDEF BOOL ODCALL od_key_pending(void);
  888. ODAPIDEF char ODCALL od_get_key(BOOL bWait);
  889. ODAPIDEF BOOL ODCALL od_gettext(INT nLeft, INT nTop, INT nRight,
  890. INT nBottom, void *pBlock);
  891. ODAPIDEF char ODCALL od_hotkey_menu(char *pszFileName, char *pszHotKeys,
  892. BOOL bWait);
  893. ODAPIDEF void ODCALL od_init(void);
  894. ODAPIDEF void ODCALL od_input_str(char *pszInput, INT nMaxLength,
  895. unsigned char chMin, unsigned char chMax);
  896. ODAPIDEF void ODCALL od_kernel(void);
  897. ODAPIDEF BOOL ODCALL od_list_files(char *pszFileSpec);
  898. ODAPIDEF BOOL ODCALL od_log_write(char *pszMessage);
  899. ODAPIDEF INT ODCALL od_multiline_edit(char *pszBufferToEdit,
  900. UINT unBufferSize, tODEditOptions *pEditOptions);
  901. ODAPIDEF void ODCALL od_page(void);
  902. #ifdef ODPLAT_WIN32
  903. ODAPIDEF void ODCALL od_parse_cmd_line(LPSTR pszCmdLine);
  904. #else /* !ODPLAT_WIN32 */
  905. ODAPIDEF void ODCALL od_parse_cmd_line(INT nArgCount,
  906. char *papszArguments[]);
  907. #endif /* !ODPLAT_WIN32 */
  908. ODAPIDEF INT ODCALL od_popup_menu(char *pszTitle, char *pszText,
  909. INT nLeft, INT nTop, INT nLevel, WORD uFlags);
  910. ODAPIDEF void ODVCALL od_printf(const char *pszFormat, ...);
  911. ODAPIDEF void ODCALL od_putch(char chToDisplay);
  912. ODAPIDEF BOOL ODCALL od_puttext(INT nLeft, INT nTop, INT nRight,
  913. INT nBottom, void *pBlock);
  914. ODAPIDEF void ODCALL od_repeat(char chValue, BYTE btTimes);
  915. ODAPIDEF BOOL ODCALL od_restore_screen(void *pBuffer);
  916. ODAPIDEF BOOL ODCALL od_save_screen(void *pBuffer);
  917. ODAPIDEF BOOL ODCALL od_scroll(INT nLeft, INT nTop, INT nRight,
  918. INT nBottom, INT nDistance, WORD nFlags);
  919. ODAPIDEF BOOL ODCALL od_send_file(const char *pszFileName);
  920. ODAPIDEF BOOL ODCALL od_send_file_section(char *pszFileName, char *pszSectionName);
  921. ODAPIDEF void ODCALL od_set_attrib(INT nColour);
  922. ODAPIDEF void ODCALL od_set_color(INT nForeground, INT nBackground);
  923. ODAPIDEF void ODCALL od_set_cursor(INT nRow, INT nColumn);
  924. ODAPIDEF void ODCALL od_set_dtr(BOOL bHigh);
  925. ODAPIDEF BOOL ODCALL od_set_personality(const char *pszName);
  926. ODAPIDEF void ODCALL od_set_statusline(INT nSetting);
  927. ODAPIDEF void ODCALL od_sleep(tODMilliSec Milliseconds);
  928. ODAPIDEF BOOL ODCALL od_spawn(const char *pszCommandLine);
  929. ODAPIDEF INT16 ODCALL od_spawnvpe(INT16 nModeFlag, char *pszPath,
  930. char *papszArg[], char *papszEnv[]);
  931. ODAPIDEF void * ODCALL od_window_create(INT nLeft, INT nTop, INT nRight,
  932. INT nBottom, char *pszTitle, BYTE btBorderCol,
  933. BYTE btTitleCol, BYTE btInsideCol, INT nReserved);
  934. ODAPIDEF BOOL ODCALL od_window_remove(void *pWinInfo);
  935. /* ========================================================================= */
  936. /* Definitions for compatibility with previous versions. */
  937. /* ========================================================================= */
  938. /* Alternative spelling for the word color (colour). */
  939. #define od_chat_colour1 od_chat_color1
  940. #define od_chat_colour2 od_chat_color2
  941. #define od_colour_char od_color_char
  942. #define od_colour_delimiter od_color_delimiter
  943. #define od_colour_names od_color_names
  944. #define od_full_colour od_full_color
  945. #define od_colour_config od_color_config
  946. #define od_set_colour od_set_color
  947. /* Definitions for renamed od_control members and manifest constants. */
  948. #define key_help key_status[6]
  949. #define key_nohelp key_status[0]
  950. #define user_credit user_net_credit
  951. #define caller_netmailentered user_netmailentered
  952. #define caller_echomailentered user_echomailentered
  953. #define caller_logintime user_logintime
  954. #define caller_logindate user_logindate
  955. #define caller_timelimit user_timelimit
  956. #define caller_loginsec user_loginsec
  957. #define caller_credit user_credit
  958. #define caller_userrecord user_num
  959. #define caller_readthru user_readthru
  960. #define caller_numpages user_numpages
  961. #define caller_downlimit user_downlimit
  962. #define caller_timeofcreation user_timeofcreation
  963. #define caller_logonpassword user_logonpassword
  964. #define caller_wantchat user_wantchat
  965. #define caller_ansi user_ansi
  966. #define ra_deducted_time user_deducted_time
  967. #define ra_menustack user_menustack
  968. #define ra_menustackpointer user_menustackpointer
  969. #define ra_userhandle user_handle
  970. #define ra_comment user_comment
  971. #define ra_firstcall user_firstcall
  972. #define ra_combinedrecord user_combinedrecord
  973. #define ra_birthday user_birthday
  974. #define ra_subdate user_subdate
  975. #define ra_screenwidth user_screenwidth
  976. #define ra_msg_area user_msg_area
  977. #define ra_file_area user_file_area
  978. #define ra_language user_language
  979. #define ra_date_format user_date_format
  980. #define ra_forward_to user_forward_to
  981. #define ra_error_free user_error_free
  982. #define ra_sysop_next sysop_next
  983. #define ra_emsi_session user_emsi_session
  984. #define ra_emsi_crtdef user_emsi_crtdef
  985. #define ra_emsi_protocols user_emsi_protocols
  986. #define ra_emsi_capabilities user_emsi_capabilities
  987. #define ra_emsi_requests user_emsi_requests
  988. #define ra_emsi_software user_emsi_software
  989. #define ra_hold_attr1 user_hold_attr1
  990. #define ra_hold_attr2 user_hold_attr2
  991. #define ra_hold_len user_hold_len
  992. #define caller_usernum user_num
  993. #define caller_callsign user_callsign
  994. #define caller_sex user_sex
  995. #define od_avatar user_avatar
  996. #define B_YELLOW L_YELLOW
  997. #define B_WHITE L_WHITE
  998. #define od_rbbs_node od_node
  999. #define STATUS_USER1 STATUS_ALTERNATE_1
  1000. #define STATUS_USER2 STATUS_ALTERNATE_2
  1001. #define STATUS_USER3 STATUS_ALTERNATE_3
  1002. #define STATUS_USER4 STATUS_ALTERNATE_4
  1003. #define STATUS_SYSTEM STATUS_ALTERNATE_5
  1004. #define STATUS_HELP STATUS_ALTERNATE_7
  1005. #define od_registered_to od_control.od_reg_name
  1006. #define od_registration_key od_control.od_reg_key
  1007. #define od_program_name od_control.od_prog_name
  1008. #define od_log_messages od_control.od_logfile_messages
  1009. #define od_config_text od_control.od_cfg_text
  1010. #define od_config_lines od_control.od_cfg_lines
  1011. #define od_config_colours od_control.od_colour_names
  1012. #define od_config_colors od_control.od_colour_names
  1013. #define config_file od_config_file
  1014. #define config_filename od_config_filename
  1015. #define config_function od_config_function
  1016. #define default_personality od_default_personality
  1017. #define logfile od_logfile
  1018. #define mps od_mps
  1019. #define od_kernal od_kernel
  1020. /* Obsolete functions. */
  1021. #define od_init_with_config(filename,function)\
  1022. od_control.config_file=INCLUDE_CONFIG_FILE;\
  1023. od_control.config_filename=filename;\
  1024. od_control.config_function=function;\
  1025. od_init()
  1026. ODAPIDEF BOOL ODCALL od_log_open(void);
  1027. ODAPIDEF void ODCALL od_emulate(register char in_char);
  1028. #endif /* _INC_OPENDOOR */