home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / main / BBS / ODOORS62.ZIP / OpenDoor.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-24  |  43.8 KB  |  1,096 lines

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