home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / win100b.zip / wkt100.h < prev    next >
C/C++ Source or Header  |  1991-10-20  |  18KB  |  649 lines

  1. /*********************************************************************\
  2. * Header file for the Win600/Win100 programs
  3. *
  4. * Copyright 1990, 1991 by
  5. * William S. Hall
  6. * 3665  Benton Street, #66
  7. * Santa Clara, CA 95051
  8. *
  9. \*********************************************************************/
  10.  
  11. /* This trick insures that globals are declared in only one place */
  12. #if !defined(EXTERN)
  13. #define EXTERN extern
  14. #endif
  15.  
  16. /*********************************************************************\
  17. *
  18. * Miscellaneous constants
  19. *
  20. \*********************************************************************/
  21. #define MAXCOMPORTS    4
  22. #define MAXRCSTRLEN    80
  23. #define    LINE_ON        2
  24. #define LOCAL_ON    1
  25. #define BUFSIZE        128
  26. #define VK_SCROLL    0x91
  27. #define MAXPROTOLEN    16    /* max len of accumulated ANSI commands */
  28. #define SYMBOL_CHARSET  2
  29. #define EXE_NAME_MAX_SIZE 128
  30. /*********************************************************************\
  31. *
  32. * Structures
  33. *
  34. \*********************************************************************/
  35. /* current buffer descriptor */
  36. typedef struct curbuf_tag {
  37.     BYTE *ptr;    /* pointer to buffer */
  38.     int len;    /* remaining chars in buffer */
  39. } CURBUF;
  40. typedef CURBUF *PCURBUF;
  41.  
  42. /* currently active protocol paramters */
  43. typedef struct curproto_tag {
  44.     char type;           /* current type (alphanumeric or graphics) */
  45.     int (FAR *apf)(void);  /* alphanumeric protocol function */
  46.     int atype;           /* current alpha emulation type */
  47.     int gtype;           /* graphics type (alphagraphics, point plot, etc.) */
  48.     BYTE mask;           /* eight bit mask */
  49.     int (FAR *pf)(void); /* processing function (alphanumerics or graphics) */
  50.     void (FAR *spkeys)(int type); /* keyboard function */
  51. } CURPROTO;
  52.  
  53. /* main window parameters */
  54. typedef struct _MWND {
  55.     HWND hWnd;        /* window handle */
  56.     HBRUSH hBrush;    /* current background brush */
  57.     int TextColor, BGColor;    /* keep these together */
  58.     BOOL LFCR;
  59.     BOOL Cursor;
  60.     BOOL CursorType;
  61.     BOOL Reverse;
  62.     int PelSize;
  63.     BOOL BreakEnabled;
  64.     BOOL CurKeyMode;
  65.     BOOL DeleteKey;
  66.     BOOL AutoAnswer;
  67.     RECT rect;        /* current client rectangle */
  68.     BOOL ApplMode;       /* application or numeric keypad */
  69.     BOOL WarningBell;
  70.     WORD CharSet[4];
  71.     int ActiveCharSet;
  72.     BOOL ControlRep;
  73.     BOOL Wrap;
  74. #ifdef WIN600
  75.     BOOL DelNotLoY;
  76.     BOOL LockOutGraphCtrlCodes;
  77. #endif
  78. } MWND;
  79. typedef MWND *pMWND;
  80.  
  81. /* power-up conditions */
  82. typedef struct _INITDATA {
  83.     char portname[MAXCOMPORTS][5];    /* comm port strings in desired order */
  84.     short TermRows, TermCols;   /* terminal size */
  85.     WORD BaudRate;        /* comm parameters */
  86.     BYTE ByteSize;
  87.     BYTE Parity;
  88.     BYTE StopBits;
  89.     BYTE fParity;        /* check parity */
  90.     BYTE XonXoff;
  91.     WORD XoffLim;        /* Xoff limit */
  92.     BOOL LocalEcho;
  93.     BOOL Wrap;            /* wrap lines */
  94.     BOOL LFCR;
  95.     BOOL MarginBell;
  96.     BOOL Cursor;
  97.     BOOL CursorType;
  98.     int TextColor;
  99.     int BGColor;
  100.     BOOL WarningBell;
  101.     int AlphaEmulation;
  102.     BOOL ReverseVideo;
  103.     BOOL SmoothScroll;
  104.     short ScrollUnits;
  105.     BOOL LocalMode;
  106.     int AltKeypad;
  107.     BOOL BreakEnabled;
  108.     BOOL AutoAnswer;
  109.     BOOL DeleteKey;
  110.     int CursorKeys;
  111.     char Fontface[LF_FACESIZE];
  112.     short NFontWidth, NFontHeight;
  113.     short SFontWidth, SFontHeight;
  114.     BOOL ControlRep;
  115.     int EWidth;
  116. } INITDATA;
  117.  
  118. typedef struct _PARITYREC {
  119.     BYTE ByteSize;
  120.     BYTE Parity;
  121. } PARITYREC;
  122.  
  123. typedef struct GlobalBuf {
  124.     HANDLE hBuf;
  125.     LONG lBufSize;
  126.     LONG lBufHead;
  127.     LONG lBufTail;
  128. } GLOBALBUF;
  129. typedef GLOBALBUF *PGLOBALBUF;
  130.  
  131. /*********************************************************************\
  132. *
  133. * Function prototypes
  134. *
  135. \*********************************************************************/
  136. /* from win600.c */
  137. LONG FAR PASCAL MainWndProc(HWND,unsigned,WORD,LONG);
  138. BOOL FAR PASCAL MainHasResized(HWND hWnd, LONG lParam);
  139. BOOL FAR PASCAL ColorChange(HWND hWnd, LONG lParam);
  140. void NEAR DoGetMessage(void);
  141. void NEAR DoPeekMessage(void);
  142.  
  143. /* from win600nt.c */
  144. BOOL FAR InitProgram(HANDLE, HANDLE, LPSTR, int);
  145. void FAR MainWndCreate(HWND hWnd, LONG lParam);
  146.  
  147. /* from win600fn.c */
  148. void NEAR MainWndPaint(HWND hWnd, LPPAINTSTRUCT lpps);
  149. void CloseCommPort(HWND hWnd, int *pCid);
  150. int ShowMessage(HWND hWnd, int msgnum, WORD style);
  151. void BroadcastWinIniChange(void);
  152. void NEAR WndCommand(HWND, WORD, LONG);
  153. void WriteToComm(BYTE *buf, int len);
  154. void AnswerEnq(BYTE lead, int mode);
  155. void InvertScreen(BOOL flag);
  156. void NEAR WndTimer(HWND hWnd, WORD id);
  157. void IdentifyTerm(short id);
  158. void ReportCursorPos(int r, int c);
  159. void NEAR ProcessChars(BYTE ch, int count);
  160. void SetCols(WORD cols);
  161. void ShowAnswerBack(void);
  162. void NEAR CloseLogFile(void);
  163. void NEAR XCSpecialKeys(int item);
  164. void NEAR AGSpecialKeys(int item);
  165. void NEAR IPPSpecialKeys(int item);
  166. void FAR MakeCaret(BOOL make);
  167. void NEAR WriteClipData(void);
  168. void FAR SetAlphaParams(int type);
  169. void FAR SetGraphicsParams(int type);
  170. int FAR vt100(void);
  171. int FAR vt52(void);
  172. void FAR pushback(void);
  173. int FAR yywrap(void);
  174. void FAR _cdecl dbs(const char *fmt, ...);
  175.  
  176. /* from win600ms.c */
  177. BOOL OpenDlgBox(HWND hWnd, FARPROC fpProc, WORD boxnum);
  178. BOOL FAR PASCAL AboutBoxProc(HWND, unsigned, WORD, LONG);
  179. BOOL FAR PASCAL ModemBoxProc(HWND, unsigned, WORD, LONG);
  180. BOOL FAR PASCAL DisplayBoxProc(HWND, unsigned, WORD, LONG);
  181. BOOL FAR PASCAL GeneralBoxProc(HWND, unsigned, WORD, LONG);
  182. BOOL FAR PASCAL MiniBoxProc(HWND, unsigned, WORD, LONG);
  183. BOOL FAR PASCAL CopyBoxProc(HWND, unsigned, WORD, LONG);
  184. BOOL FAR PASCAL EditFunctionKeys(HWND, unsigned, WORD, LONG);
  185. BOOL FAR PASCAL LogFileBoxProc(HWND, unsigned, WORD, LONG);
  186. BOOL FAR PASCAL KeyboardBoxProc(HWND, unsigned, WORD, LONG);
  187. BOOL FAR PASCAL FontsBoxProc(HWND, unsigned, WORD, LONG);
  188.  
  189. /* from lex modules */
  190. void FAR vt52SetState(int state);
  191. void FAR vt100SetState(int state);
  192. void FAR VT52SpecialKeys(int item);
  193. void FAR ANSISpecialKeys(int item);
  194.  
  195. /*********************************************************************\
  196. *
  197. * Resource file constants
  198. *
  199. \*********************************************************************/
  200. /* String ids */
  201. #define IDS_APPNAME        100
  202. #define IDS_ICON        101
  203. #define IDS_TITLE        102
  204. #define IDS_ADDDEFAULTS        103
  205. #define IDS_COM1        104        /* sequential */
  206. #define IDS_COM2        105
  207. #define IDS_COM3        106
  208. #define IDS_COM4        107
  209. #define IDS_FIRSTPORT        108        /* sequential */
  210. #define IDS_SECONDPORT        109
  211. #define IDS_THIRDPORT        110
  212. #define IDS_FOURTHPORT        111
  213.  
  214. #define IDS_RXQUESIZE        112
  215. #define IDS_TXQUESIZE        113
  216. #define IDS_NOCOM        114
  217. #define IDS_CANNOTCLOSECOM    115
  218. #define IDS_ROWS        116
  219. #define IDS_COLS        117
  220. #define IDS_NOCOMSET        118
  221. #define IDS_BAUD        119
  222. #define IDS_PARITY        120
  223. #define IDS_STOPBITS        121
  224. #define IDS_BYTESIZE        122
  225. #define IDS_PARCHECK        123
  226. #define IDS_XONXOFF        124
  227. #define IDS_XOFFLIM        125
  228. #define IDS_LOCALECHO        126
  229. #define IDS_AUTOLFCR        127
  230. #define IDS_MARGINBELL        128
  231. #define IDS_CURSOR        129
  232. #define IDS_CURSORTYPE        130
  233. #define IDS_WARNINGBELL        131
  234. #define IDS_LINE        132
  235. #define IDS_LOCAL        133
  236. #define IDS_WRAP        134
  237. #define IDS_TEXTCOLOR        135
  238. #define IDS_BGCOLOR        136
  239. #define IDS_TERMTYPE        137
  240. #define IDS_REVERSEVIDEO    138
  241. #define IDS_SMOOTHSCROLL    139
  242. #define IDS_LOCALMODE        140
  243. #define IDS_TRYANOTHER        141
  244. #define IDS_LOGFILENAME        142
  245. #define IDS_LOGSESSION        143
  246. #define IDS_CLOSELOG        144
  247. #define IDS_FILEEXISTS        145
  248. #define IDS_OPENFILEERROR    146
  249. #define IDS_ALTKEYPAD        147
  250. #define IDS_BREAKKEYENABLED    148
  251. #define IDS_AUTOANSWER        149
  252. #define IDS_DELETEKEY        150
  253. #define IDS_CURSORKEYS        151
  254. #define IDS_ANSWERBACKKEY    152
  255. #define IDS_FONTFACE        153
  256. #define IDS_DEFAULTFONT        154
  257. #define IDS_NORMALWIDTH        155
  258. #define IDS_NORMALHEIGHT    156
  259. #define IDS_SMALLWIDTH        157
  260. #define IDS_SMALLHEIGHT        158
  261. #define IDS_SCROLLUNITS        159
  262. #define IDS_CONTROLREP        160
  263. #define IDS_EMULATIONWIDTH    161
  264.  
  265. /* dialog box strings */
  266. #define IDS_JUMP        200
  267. #define IDS_SMOOTH1        201
  268. #define IDS_SMOOTH2        202
  269. #define IDS_SMOOTH4        203
  270. #define IDS_SMOOTH8        204
  271. #define IDS_VT1007BIT        205
  272. #define IDS_VT1008BIT        206
  273. #define IDS_VT527BIT        207
  274. #define IDS_VT528BIT        208
  275. #define IDS_BLACK        220
  276. #define IDS_DARKRED        221
  277. #define IDS_DARKGREEN        222
  278. #define IDS_DARKYELLOW        223
  279. #define IDS_DARKBLUE        224
  280. #define IDS_DARKMAGENTA        225
  281. #define IDS_DARKCYAN        226
  282. #define IDS_DARKGRAY        227
  283. #define IDS_LIGHTGRAY        228
  284. #define IDS_LIGHTRED        229
  285. #define IDS_LIGHTGREEN        230
  286. #define IDS_LIGHTYELLOW        231
  287. #define IDS_LIGHTBLUE        232
  288. #define IDS_LIGHTMAGENTA    233
  289. #define IDS_LIGHTCYAN        234
  290. #define IDS_WHITE        235
  291.  
  292. /* help */
  293. #define IDS_WINHELPNAME    300
  294.  
  295. /* menu items */
  296. #define IDM_ABOUT    100
  297. #define IDM_LINE    101
  298. #define IDM_LOCAL    102
  299. #define IDM_SCROLL    103
  300. #define IDM_NORMAL    104
  301. #define IDM_REVERSE    105
  302. #define IDM_MINI    106
  303. #define IDM_MODEM    110
  304. #define IDM_DISPLAY    111
  305. #define IDM_GENERAL    112
  306. #define IDM_CLEARCOM    120
  307. #define IDM_COPYLINES    121
  308. #define IDM_EDITFKEYS    122
  309. #define IDM_GETFILE    123
  310. #define IDM_CLOSEFILE    124
  311. #define IDM_PASTE    125
  312. #define IDM_RECALLSAVED    126
  313. #define IDM_RECALLDEFAULT 127
  314. #define IDM_KEYBOARD    128
  315. #define IDM_FONTS    129
  316.  
  317. #define IDM_HELP_INDEX    150
  318. #define IDM_HELP_KEY    151
  319. #define IDM_HELP_COM    152
  320. #define IDM_HELP_PROC    153
  321. #define IDM_HELP_GLOS    154
  322. #define IDM_HELP_HELP    155
  323.  
  324. /* special keys .  Start these from 200 */
  325. #define IDM_UP        200
  326. #define IDM_DOWN    201
  327. #define IDM_RIGHT    202
  328. #define IDM_LEFT    203
  329. #define IDM_HOME    204
  330. #define IDM_END        205
  331. #define IDM_PRIOR    206
  332. #define IDM_NEXT    207
  333. #define IDM_CLEAR    208
  334. #define IDM_INSERT    209
  335. #define IDM_DELETE    210
  336.  
  337. #define IDM_S_UP    220
  338. #define IDM_S_DOWN    221
  339. #define IDM_S_RIGHT    222
  340. #define IDM_S_LEFT    223
  341. #define IDM_S_HOME    224
  342. #define IDM_S_END    225
  343. #define IDM_S_PRIOR    226
  344. #define IDM_S_NEXT    227
  345. #define IDM_S_CLEAR    228
  346. #define IDM_S_INSERT    229
  347. #define IDM_S_DELETE    230
  348.  
  349. #define IDM_C_UP    240
  350. #define IDM_C_DOWN    241
  351. #define IDM_C_RIGHT    242
  352. #define IDM_C_LEFT    243
  353. #define IDM_C_HOME    244
  354. #define IDM_C_END    245
  355. #define IDM_C_PRIOR    246
  356. #define IDM_C_NEXT    247
  357. #define IDM_C_CLEAR    248
  358. #define IDM_C_INSERT    249
  359. #define IDM_C_DELETE    250
  360.  
  361. #define IDM_CS_UP    260
  362. #define IDM_CS_DOWN    261
  363. #define IDM_CS_RIGHT    262
  364. #define IDM_CS_LEFT    263
  365. #define IDM_CS_HOME    264
  366. #define IDM_CS_END    265
  367. #define IDM_CS_PRIOR    266
  368. #define IDM_CS_NEXT    267
  369. #define IDM_CS_CLEAR    268
  370. #define IDM_CS_INSERT    269
  371. #define IDM_CS_DELETE    270
  372.  
  373. /* function keys */
  374. #define IDM_F1        300
  375. #define IDM_F2        301
  376. #define IDM_F3        302
  377. #define IDM_F4        303
  378. #define IDM_F5        304
  379. #define IDM_F6        305
  380. #define IDM_F7        306
  381. #define IDM_F8        307
  382. #define IDM_F9        308
  383. #define IDM_F10        309
  384. #define IDM_F11        310
  385. #define IDM_F12        311
  386.  
  387. #define IDM_S_F1    320
  388. #define IDM_S_F2    321
  389. #define IDM_S_F3    322
  390. #define IDM_S_F4    323
  391. #define IDM_S_F5    324
  392. #define IDM_S_F6    325
  393. #define IDM_S_F7    326
  394. #define IDM_S_F8    327
  395. #define IDM_S_F9    328
  396. #define IDM_S_F10    329
  397. #define IDM_S_F11    330
  398. #define IDM_S_F12    331
  399.  
  400. #define IDM_C_F1    340
  401. #define IDM_C_F2    341
  402. #define IDM_C_F3    342
  403. #define IDM_C_F4    343
  404. #define IDM_C_F5    344
  405. #define IDM_C_F6    345
  406. #define IDM_C_F7    346
  407. #define IDM_C_F8    347
  408. #define IDM_C_F9    348
  409. #define IDM_C_F10    349
  410. #define IDM_C_F11    350
  411. #define IDM_C_F12    351
  412.  
  413. #define IDM_CS_F1    360
  414. #define IDM_CS_F2    361
  415. #define IDM_CS_F3    362
  416. #define IDM_CS_F4    363
  417. #define IDM_CS_F5    364
  418. #define IDM_CS_F6    365
  419. #define IDM_CS_F7    366
  420. #define IDM_CS_F8    367
  421. #define IDM_CS_F9    368
  422. #define IDM_CS_F10    369
  423. #define IDM_CS_F11    370
  424. #define IDM_CS_F12    371
  425.  
  426. #define IDM_NUM0    400
  427. #define IDM_NUM1    401
  428. #define IDM_NUM2    402
  429. #define IDM_NUM3    403
  430. #define IDM_NUM4    404
  431. #define IDM_NUM5    405
  432. #define IDM_NUM6    406
  433. #define IDM_NUM7    407
  434. #define IDM_NUM8    408
  435. #define IDM_NUM9    409
  436. #define IDM_ADD        410
  437. #define IDM_SUBTRACT    411
  438. #define IDM_DECIMAL    412
  439. #define IDM_MULTIPLY    413
  440.  
  441. #define IDM_S_NUM0    420
  442. #define IDM_S_NUM1    421
  443. #define IDM_S_NUM2    422
  444. #define IDM_S_NUM3    423
  445. #define IDM_S_NUM4    424
  446. #define IDM_S_NUM5    425
  447. #define IDM_S_NUM6    426
  448. #define IDM_S_NUM7    427
  449. #define IDM_S_NUM8    428
  450. #define IDM_S_NUM9    429
  451. #define IDM_S_ADD    430
  452. #define IDM_S_SUBTRACT    431
  453. #define IDM_S_DECIMAL    432
  454. #define IDM_S_MULTIPLY    433
  455.  
  456. #define IDM_C_NUM0    440
  457. #define IDM_C_NUM1    441
  458. #define IDM_C_NUM2    442
  459. #define IDM_C_NUM3    443
  460. #define IDM_C_NUM4    444
  461. #define IDM_C_NUM5    445
  462. #define IDM_C_NUM6    446
  463. #define IDM_C_NUM7    447
  464. #define IDM_C_NUM8    448
  465. #define IDM_C_NUM9    449
  466. #define IDM_C_ADD    450
  467. #define IDM_C_SUBTRACT    451
  468. #define IDM_C_DECIMAL    452
  469. #define IDM_C_MULTIPLY    453
  470.  
  471. #define IDM_CS_NUM0    460
  472. #define IDM_CS_NUM1    461
  473. #define IDM_CS_NUM2    462
  474. #define IDM_CS_NUM3    463
  475. #define IDM_CS_NUM4    464
  476. #define IDM_CS_NUM5    465
  477. #define IDM_CS_NUM6    466
  478. #define IDM_CS_NUM7    467
  479. #define IDM_CS_NUM8    468
  480. #define IDM_CS_NUM9    469
  481. #define IDM_CS_ADD    470
  482. #define IDM_CS_SUBTRACT    471
  483. #define IDM_CS_DECIMAL    472
  484. #define IDM_CS_MULTIPLY    473
  485.  
  486. /* dialog box ids */
  487. #define DT_ABOUT     1
  488. #define DT_MODEM     2
  489. #define DT_DISPLAY      3
  490. #define DT_GENERAL    4
  491. #define DT_MINI        5
  492. #define DT_COPYLINES    6
  493. #define DT_EDITFKEYS    7
  494. #define DT_GETFILE    8
  495. #define DT_KEYBOARD    9
  496. #define DT_FONTS    10
  497.  
  498. /*************************************************************************
  499. **
  500. ** Communications Initialization Error Codes
  501. **
  502. *************************************************************************/
  503. #if RC_INVOKED
  504. #define IE_BADID    -1    /* Invalid or unsupported id       */
  505. #define IE_OPEN        -2    /* Device Already Open           */
  506. #define IE_NOPEN    -3    /* Device Not Open           */
  507. #define IE_MEMORY   -4    /* Unable to allocate queues       */
  508. #define IE_DEFAULT  -5    /* Error in default parameters       */
  509. #define IE_HARDWARE -10 /* Hardware Not Present           */
  510. #define IE_BYTESIZE -11 /* Illegal Byte Size           */
  511. #define IE_BAUDRATE -12 /* Unsupported BaudRate           */
  512. #endif
  513. /*********************************************************************\
  514. *
  515. * Default values
  516. *
  517. \*********************************************************************/
  518. #define DEFBAUD        1200
  519. #define DEFBYTESIZE    8
  520. #define DEFPARITY    NOPARITY
  521. #define DEFSTOP        1
  522. #define DEFPECHECK    FALSE
  523. #define DEFPECHAR    '?'
  524. #define DEFXONXOFF    TRUE
  525. #define DEFXONCHAR    DC1
  526. #define DEFXOFFCHAR    DC3
  527. #define DEFRXQUE    1024
  528. #define DEFTXQUE    128
  529. #define DEFXONLIM    32
  530. #define DEFXOFFLIM    64
  531. #define DEFLOCALECHO    FALSE
  532. #define DEFLFCR        FALSE
  533. #define DEFMBELL    FALSE
  534. #define DEFCURSOR    TRUE
  535. #define DEFCURSORTYPE    FALSE
  536. #define DEFWBELL    TRUE
  537. #define DEFROWS        24
  538. #define DEFCOLS        80
  539. #define DEFWRAP        0
  540. #define DEFTEXTCOLOR    15
  541. #define DEFBGCOLOR    0
  542. #define DEFTERMTYPE    100
  543. #define DEFEWIDTH    7
  544. #define DEFVIDEO    0
  545. #define DEFSCROLL    0
  546. #define DEFSCROLLUNITS    4
  547. #define MAXSCROLLUNITS    8
  548. #define DEFLOCALMODE    0
  549. #define DEFALTKEYPAD    0
  550. #define DEFCURSORKEYS    0
  551. #define DEFBREAKENABLED    TRUE
  552. #define DEFDELETEKEY    FALSE
  553. #define DEFAUTOANSWER    FALSE
  554. #define DEFCONTROLREP    0
  555.  
  556. /*********************************************************************\
  557. *
  558. * Global variables
  559. *
  560. \*********************************************************************/
  561. EXTERN SMT Smt;            /* smart terminal window data */
  562. EXTERN MWND MWnd;        /* main window structure */
  563. EXTERN INITDATA Initdata;    /* power up conditions */
  564. EXTERN CURPROTO curproto;    /* current protocol */
  565. EXTERN CURBUF ComBuf;        /* comm buffer parameters */
  566. EXTERN CURBUF CharBuf;        /* char buffer parameters */
  567. EXTERN CURBUF *pBuf;        /* pointer to current buffer */
  568. EXTERN char szAppName[10];    /* name of the application */
  569. EXTERN char szIcon[5];        /* icon string */
  570. EXTERN HWND hWndActive;        /* handle to active display window */
  571. EXTERN int cid;            /* active com port id*/
  572. EXTERN DCB CommData;        /* comm data structure */
  573. EXTERN int LineState;        /* current line and local echo state */
  574. EXTERN int LocalEcho;        /* local echo on or off */
  575. EXTERN BYTE Buffer[BUFSIZE];    /* comm buffer */
  576. EXTERN BOOL ScrollLock;        /* state of scroll lock key */
  577. EXTERN HANDLE hAccel;
  578. EXTERN void (NEAR *DoMessage)(void);  /* pointer to message function */
  579. EXTERN BOOL BreakState;
  580. EXTERN HANDLE hInst;
  581. EXTERN OFSTRUCT ofLogFile;
  582. EXTERN int hLogFile;
  583. EXTERN HWND hWndNext;
  584. EXTERN GLOBALBUF GB;
  585. EXTERN char szHelpName[EXE_NAME_MAX_SIZE + 1];
  586. EXTERN char szIniName[EXE_NAME_MAX_SIZE + 1];
  587. EXTERN HWND hWndText;
  588. #ifdef WIN600
  589. EXTERN HWND hWndGraph;
  590. #endif
  591.  
  592. #define BAUDRATETABLESIZE 9
  593. EXTERN WORD BaudRateTable[BAUDRATETABLESIZE]
  594. #if defined(INITIALIZE)
  595.     = {110,134,300,600,1200,2400,4800,9600,19200}
  596. #endif
  597. ;
  598.  
  599. #define PARITYTABLESIZE 8
  600. EXTERN PARITYREC ParityTable[PARITYTABLESIZE]
  601. #if defined(INITIALIZE)
  602.     = {8,NOPARITY,8,ODDPARITY,8,EVENPARITY,
  603.        7,NOPARITY,7,ODDPARITY,7,EVENPARITY,7,MARKPARITY,7,SPACEPARITY}
  604. #endif
  605. ;
  606.  
  607. #define XOFFLIMSIZE 5
  608. EXTERN WORD XoffSizeTable[]
  609. #if defined(INITIALIZE)
  610.     = {64,128,256,512,768}
  611. #endif
  612. ;
  613.  
  614. #define COLORTABLESIZE 16
  615. EXTERN DWORD ColorTable[]
  616. #if defined(INITIALIZE)
  617.     = {0x000000,0x000080,0x008000,0x008080,0x800000,0x800080,0x808000,0x808080,
  618.        0xc0c0c0,0x0000ff,0x00ff00,0x00ffff,0xff0000,0xff00ff,0xffff00,0xffffff}
  619. #endif
  620. ;
  621.  
  622. EXTERN char *szFKey[]
  623. #if defined(INITIALIZE)
  624.    = {"F1", "F2",  "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
  625.       "F11", "F12"}
  626. #endif
  627. ;
  628.  
  629. EXTERN char *szSFKey[]
  630. #if defined(INITIALIZE)
  631.      = {"SF1", "SF2", "SF3", "SF4", "SF5", "SF6", "SF7", "SF8", "SF9", "SF10", 
  632.     "SF11", "SF12"}
  633. #endif
  634. ;
  635.  
  636. EXTERN char *szCFKey[]
  637. #if defined(INITIALIZE)
  638.      = {"CF1", "CF2", "CF3", "CF4", "CF5", "CF6", "CF7", "CF8", "CF9", "CF10", 
  639.     "CF11", "CF12"}
  640. #endif
  641. ;
  642.  
  643. EXTERN char *szCSFKey[]
  644. #if defined(INITIALIZE)
  645.      = {"CSF1", "CSF2", "CSF3", "CSF4", "CSF5", "CSF6", "CSF7", "CSF8", "CSF9",
  646.     "CSF10", "CSF11", "CSF12"}
  647. #endif
  648. ;
  649.