home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / GAMES / infocom_src.lha / machine.h < prev    next >
Text File  |  1993-07-15  |  17KB  |  694 lines

  1. /*
  2. **    File:    machine.h
  3. **
  4. **    (C)opyright 1987-1992 InfoTaskforce.
  5. */
  6.  
  7. /*
  8. **    Compiler Customisation Variables:
  9. **
  10. **        INTERPRETER        : Interpreter Number - indicates the type of the
  11. **                          target machine.
  12. **        MODE_BITS        : The bits to set in the "mode_bits" byte of the
  13. **                          game file header to indicate target system
  14. **                          capabilities.
  15. **        SCREEN_WIDTH    : Number of Characters per Screen Line.
  16. **        SCREEN_HEIGHT    : Number of Screen Lines.
  17. **        READ_STRING        : String used by fopen to open a file in read mode.
  18. **        WRITE_STRING    : String used by fopen to open a file in write mode.
  19. **        APPEND_STRING    : String used by fopen to open a file in append mode.
  20. **        Void            : Defines the "void" type.
  21. **        HUGE            : Used in the type definition of pointers.
  22. **                          This is included for MSDOS and other Intel 80x86
  23. **                          C Compilers with segment based memory models.
  24. **        MALLOC            : Name of the memory allocation routine.
  25. **        FREE            : Name of the memory deallocation routine.
  26. **        main            : Name of the initial C procedure ( LSC Only ).
  27. **        TIME_FUNCTION    : Time function ( returning a long ) used to seed
  28. **                          the random number generator.
  29. **        ONE_SECOND        : The value used by "TIME_FUNCTION" to indicate the
  30. **                          passing of one second of real time.
  31. **        INIT_SIGNAL        : Routine to perform any special initialisation for
  32. **                          signal trapping routines.
  33. **        SIGNAL_QUIT        : Routine to perform any signal cleanup and/or handling.
  34. **                          An integer is passed to this routine to specify
  35. **                          the action required.
  36. **
  37. **        INIT_IO            : Routine to perform any special initialisation for
  38. **                          the I/O routines.
  39. **        EXIT_IO            : Routine to restore any I/O modes when the
  40. **                          program exits.
  41. **        PUT_CHAR        : Routine to send a character to "stdout".
  42. **        GOTO_XY            : Routine to move the cursor to a given screen position.
  43. **        GET_X            : Routine to get the cursor's x-coordinate.
  44. **        GET_Y            : Routine to get the cursor's y-coordinate.
  45. **        USE_WINDOW        : Routine used to set a screen window's scroll region.
  46. **        GET_CH            : Routine to get a character from "stdin" without echo.
  47. **        KBD_HIT            : Routine to detect whether there is a character waiting
  48. **                          to be read from "stdin".
  49. **        ERASE_TO_EOLN    : Routine to Erase the current Screen Line.
  50. **        ERASE_WINDOW    : Routine to Erase several consecutive Screen Lines.
  51. **        SAVE_CURSOR        : Routine to Save the Current Cursor Position.
  52. **        RESTORE_CURSOR    : Routine to Restore the Current Cursor Position.
  53. **        RCFILE            : String containing name of initialization file.
  54. */
  55.  
  56. #ifndef    __MACHINE__
  57.  
  58. #define        __MACHINE__
  59.  
  60. /*
  61. **    If "ANSI_COLOR" is defined, then "ANSI_ESCAPE" and "WANT_COLOR"
  62. **    should also be defined.
  63. */
  64.  
  65. #ifdef    ANSI_COLOR
  66. #define        ANSI_ESCAPE
  67. #define        WANT_COLOR
  68. #endif    /* ANSI_COLOR */
  69.  
  70. /*
  71. **    If "SYS_V" or "BSD" is defined, then "UNIX" should also be defined.
  72. **    If "MSC" or "TURBOC" is defined, then "MSDOS" should also be defined.
  73. */
  74.  
  75. #ifdef    SYS_V
  76. #ifndef    UNIX
  77. #define        UNIX
  78. #endif    /* UNIX */
  79. #endif    /* SYS_V */
  80.  
  81. #ifdef    BSD
  82. #ifndef    UNIX
  83. #define        UNIX
  84. #endif    /* UNIX */
  85. #endif    /* BSD */
  86.  
  87. #ifdef    MSC
  88. #ifndef    MSDOS
  89. #define        MSDOS
  90. #endif    /* MSDOS */
  91. #endif    /* MSC */
  92.  
  93. #ifdef    TURBOC
  94. #ifndef    MSDOS
  95. #define        MSDOS
  96. #endif    /* MSDOS */
  97. #endif    /* TURBOC */
  98.  
  99. /*
  100. **    If CURSES_COLOR is defined, define CURSES, and, if appropriate, 
  101. **    define WANT_COLOR
  102. */
  103.  
  104. #ifdef    CURSES_COLOR
  105. #define    CURSES
  106. #ifdef    SYS_V
  107. /* Color is only available on later releases of UNIX System V curses */
  108. #define    WANT_COLOR
  109. #endif    /* SYS_V */
  110. #endif    /* WANT_COLOR */
  111.  
  112. /*
  113. **    UNIX Constants
  114. */
  115.  
  116. #ifdef    UNIX
  117.  
  118. #ifdef    SYS_V
  119. #include    <malloc.h>
  120. #include    <termio.h>
  121. #endif    /* SYS_V */
  122.  
  123. #ifdef    BSD
  124. char        *malloc () ;
  125. #include    <sys/ioctl.h>
  126. #endif    /* BSD */
  127.  
  128. #include    <time.h>
  129.  
  130. #define        SCREEN_WIDTH    80
  131. #define        SCREEN_HEIGHT    24
  132. #define        READ_STRING        "r"
  133. #define        WRITE_STRING    "w"
  134. #define        APPEND_STRING    "a"
  135. #ifdef __STDC__
  136. #define        Void            void
  137. #else
  138. #define        Void            int
  139. #endif
  140. #define        MALLOC(s)        malloc(s)
  141. #define        FREE(p)            free((char *)p)
  142. #define        TIME_FUNCTION    time((long *)0)
  143. #define        ONE_SECOND        1
  144. #define        INIT_SIGNAL        unix_signal_init
  145. #define        SIGNAL_QUIT        unix_signal_quit
  146. #define        RCFILE            ".infocomrc"
  147.  
  148. #ifdef    TERMCAP
  149.  
  150. extern int    tcap_get_x () ;
  151. extern int    tcap_get_y () ;
  152.  
  153. #define        INTERPRETER        OS_9
  154. #define        MODE_BITS        UNDERLINE
  155. #define        INIT_IO            tcap_init_io
  156. #define        EXIT_IO            tcap_exit_io
  157. #define        PUT_CHAR        tcap_putchar
  158. #define        GOTO_XY            tcap_goto_xy
  159. #define        GET_X            tcap_get_x
  160. #define        GET_Y            tcap_get_y
  161. #define        USE_WINDOW        null_io
  162. #define        GET_CH            getchar
  163. #define        KBD_HIT            default_kbd_hit
  164. #define        ERASE_TO_EOLN    tcap_erase_to_eoln
  165. #define        ERASE_WINDOW    tcap_erase_window
  166. #define        SAVE_CURSOR        tcap_save_cursor
  167. #define        RESTORE_CURSOR    tcap_restore_cursor
  168. #else    /* TERMCAP */
  169. #ifdef    TERMINFO
  170.  
  171. #include <curses.h>
  172. #include <term.h>
  173.  
  174. extern int    tinfo_get_x () ;
  175. extern int    tinfo_get_y () ;
  176.  
  177. #define        INTERPRETER        OS_9
  178. #define        MODE_BITS        UNDERLINE
  179. #define        INIT_IO            tinfo_init_io
  180. #define        EXIT_IO            tinfo_exit_io
  181. #define        PUT_CHAR        tinfo_putchar
  182. #define        GOTO_XY            tinfo_goto_xy
  183. #define        GET_X            tinfo_get_x
  184. #define        GET_Y            tinfo_get_y
  185. #define        USE_WINDOW        null_io
  186. #define        GET_CH            getchar
  187. #define        KBD_HIT            default_kbd_hit
  188. #define        ERASE_TO_EOLN    tinfo_erase_to_eoln
  189. #define        ERASE_WINDOW    tinfo_erase_window
  190. #define        SAVE_CURSOR        tinfo_save_cursor
  191. #define        RESTORE_CURSOR    tinfo_restore_cursor
  192. #else    /* TERMINFO */
  193. #ifdef    CURSES
  194.  
  195. #include    <curses.h>
  196.  
  197. /*
  198. **    Some versions of curses apparently do not have cbreak()
  199. */
  200.  
  201. extern int    curses_get_ch () ;
  202. extern int    curses_get_x () ;
  203. extern int    curses_get_y () ;
  204.  
  205. #define        INTERPRETER        OS_9
  206. #define        MODE_BITS        UNDERLINE
  207. #define        INIT_IO            curses_init_io
  208. #define        EXIT_IO            curses_exit_io
  209. #define        PUT_CHAR        curses_putchar
  210. #define        GOTO_XY            curses_goto_xy
  211. #define        GET_X            curses_get_x
  212. #define        GET_Y            curses_get_y
  213. #define        USE_WINDOW        null_io
  214. #define        GET_CH            curses_get_ch
  215. #define        KBD_HIT            default_kbd_hit
  216. #define        ERASE_TO_EOLN    curses_erase_to_eoln
  217. #define        ERASE_WINDOW    curses_erase_window
  218. #define        SAVE_CURSOR        default_save_cursor
  219. #define        RESTORE_CURSOR    default_restore_cursor
  220. #else    /* CURSES */
  221. #ifdef    ANSI_ESCAPE
  222.  
  223. extern int    ansi_get_x () ;
  224. extern int    ansi_get_y () ;
  225.  
  226. #define        INTERPRETER        OS_9
  227. #define        MODE_BITS        UNDERLINE
  228. #define        INIT_IO            ansi_init_io
  229. #define        EXIT_IO            ansi_exit_io
  230. #define        PUT_CHAR        ansi_putchar
  231. #define        GOTO_XY            ansi_goto_xy
  232. #define        GET_X            ansi_get_x
  233. #define        GET_Y            ansi_get_y
  234. #define        USE_WINDOW        null_io
  235. #define        GET_CH            getchar
  236. #define        KBD_HIT            default_kbd_hit
  237. #define        ERASE_TO_EOLN    ansi_erase_to_eoln
  238. #define        ERASE_WINDOW    ansi_erase_window
  239. #define        SAVE_CURSOR        ansi_save_cursor
  240. #define        RESTORE_CURSOR    ansi_restore_cursor
  241. #else    /* ANSI_ESCAPE */
  242. #define        INTERPRETER        OS_9
  243. #define        MODE_BITS        0
  244. #define        INIT_IO            unix_init_io
  245. #define        EXIT_IO            unix_exit_io
  246. #define        PUT_CHAR        default_putchar
  247. #define        GOTO_XY            default_goto_xy
  248. #define        GET_X            default_get_x
  249. #define        GET_Y            default_get_y
  250. #define        USE_WINDOW        null_io
  251. #define        GET_CH            getchar
  252. #define        KBD_HIT            default_kbd_hit
  253. #define        ERASE_TO_EOLN    null_io
  254. #define        ERASE_WINDOW    null_io
  255. #define        SAVE_CURSOR        default_save_cursor
  256. #define        RESTORE_CURSOR    default_restore_cursor
  257. #endif    /* ANSI_ESCAPE */
  258. #endif    /* CURSES */
  259. #endif    /* TERMINFO */
  260. #endif    /* TERMCAP */
  261.  
  262. #endif    /* UNIX */
  263.  
  264. /*
  265. **    Lightspeed C Version 2.01 Constants (Macintosh)
  266. */
  267.  
  268. #ifdef    LSC
  269.  
  270. #include    <storage.h>
  271. #include    <time.h>
  272.  
  273. #define        INTERPRETER        OS_9
  274. #define        MODE_BITS        UNDERLINE
  275. #define        SCREEN_WIDTH    80
  276. #define        SCREEN_HEIGHT    24
  277. #define        READ_STRING        "rb"
  278. #define        WRITE_STRING    "wb"
  279. #define        APPEND_STRING    "a"
  280. #define        Void            int
  281. #define        MALLOC(s)        mlalloc(s)
  282. #define        FREE(p)            free((char *)p)
  283. #define        main            _main
  284. #define        TIME_FUNCTION    time((long *)0)
  285. #define        ONE_SECOND        100
  286. #define        INIT_SIGNAL        default_signal_init
  287. #define        SIGNAL_QUIT        default_signal_quit
  288.  
  289. #define        INIT_IO            lsc_init_io
  290. #define        EXIT_IO            null_io
  291. #define        PUT_CHAR        lsc_putchar
  292. #define        GOTO_XY            gotoxy
  293. #define        GET_X            getxpos
  294. #define        GET_Y            getypos
  295. #define        USE_WINDOW        lsc_use_window
  296. #define        GET_CH            getch
  297. #define        KBD_HIT            kbhit
  298. #define        ERASE_TO_EOLN    lsc_erase_to_eoln
  299. #define        ERASE_WINDOW    lsc_erase_window
  300. #define        SAVE_CURSOR        default_save_cursor
  301. #define        RESTORE_CURSOR    default_restore_cursor
  302.  
  303. #endif    /* LSC */
  304.  
  305. /*
  306. **    THINK C Version 4.0 Constants (Macintosh)
  307. */
  308.  
  309. #ifdef    THINKC
  310.  
  311. #include    <console.h>
  312. #include    <stdlib.h>
  313. #include    <time.h>
  314.  
  315. #define        INTERPRETER        OS_9
  316. #define        MODE_BITS        UNDERLINE
  317. #define        SCREEN_WIDTH    80
  318. #define        SCREEN_HEIGHT    24
  319. #define        READ_STRING        "rb"
  320. #define        WRITE_STRING    "wb"
  321. #define        APPEND_STRING    "a"
  322. #define        Void            int
  323. #define        MALLOC(s)        malloc(s)
  324. #define        FREE(p)            free((void *)p)
  325. #define        main            _main
  326. #define        TIME_FUNCTION    time((time_t *)0)
  327. #define        ONE_SECOND        100
  328. #define        INIT_SIGNAL        default_signal_init
  329. #define        SIGNAL_QUIT        default_signal_quit
  330.  
  331. #define        INIT_IO            thinkc_init_io
  332. #define        EXIT_IO            thinkc_exit_io
  333. #define        PUT_CHAR        thinkc_putchar
  334. #define        GOTO_XY            thinkc_goto_xy
  335. #define        GET_X            thinkc_get_x
  336. #define        GET_Y            thinkc_get_y
  337. #define        USE_WINDOW        thinkc_use_window
  338. #define        GET_CH            getchar
  339. #define        KBD_HIT            default_kbd_hit
  340. #define        ERASE_TO_EOLN    thinkc_erase_to_eoln
  341. #define        ERASE_WINDOW    thinkc_erase_window
  342. #define        SAVE_CURSOR        default_save_cursor
  343. #define        RESTORE_CURSOR    default_restore_cursor
  344.  
  345. #endif    /* THINKC */
  346.  
  347. /*
  348. **    MS-DOS Constants.
  349. **
  350. **    There are 3 different sets of MS-DOS constants defined here.
  351. **    Those for Microsoft C (#define MSC), those for Borland C/Turbo C
  352. **    (#define TURBOC), and a generic set. If neither MSC nor TURBOC
  353. **    are defined then the generic set of constants will be used.
  354. **
  355. **    No "MALLOC" ( or "FREE" ) functions are defined in the generic
  356. **    version, hence attempting to compile this version will produce
  357. **    errors. The generic version uses ansi video routines which should
  358. **    work with most MS-DOS ANSI.SYS files. If your ANSI.SYS does not support
  359. **    the <ESC>[nJ sequence, then "SIMPLE_ANSI_ESCAPE" should also be defined.
  360. **
  361. **    Windowed scrolling is implemented using the INT 10h interrupt
  362. **    function in "msdos_putchar()". This is done using the "int86 ()"
  363. **    function defined in <dos.h>:
  364. **
  365. **        int
  366. **        int86 ( intno,inregs,outregs )
  367. **        int            intno ;
  368. **        union REGS    *inregs ;
  369. **        union REGS    *outregs ;
  370. **
  371. **    If your compiler does not support these features, please add an
  372. **    extra definition rather than modifying the generic definition.
  373. */
  374.  
  375. #ifdef    MSDOS
  376.  
  377. #define WANT_COLOR
  378.  
  379. #include    <dos.h>
  380.  
  381. #define        INTERPRETER        OS_9
  382. #define        MODE_BITS        UNDERLINE
  383. #define        SCREEN_WIDTH    80
  384. #define        SCREEN_HEIGHT    25
  385. #define        READ_STRING        "rb"
  386. #define        WRITE_STRING    "wb"
  387. #define        APPEND_STRING    "a"
  388.  
  389. #define        TIME_FUNCTION    time((long *)0)
  390. #define        ONE_SECOND        1
  391. #define        INIT_SIGNAL        msdos_signal_init
  392. #define        SIGNAL_QUIT        msdos_signal_quit
  393. #define        RCFILE            "infocom.rc"
  394.  
  395. #ifdef    MSC
  396.  
  397. #include    <malloc.h>
  398.  
  399. extern int    msc_get_x () ;
  400. extern int    msc_get_y () ;
  401.  
  402. #define        Void            void
  403. #define        HUGE            huge
  404. #define        MALLOC(s)        halloc((long)((s/BLOCK_SIZE)+1),(size_t)BLOCK_SIZE)
  405. #define        FREE(p)            hfree((void *)p)
  406.  
  407. #define        INIT_IO            msc_init_io
  408. #define        EXIT_IO            msc_exit_io
  409. #define        PUT_CHAR        msc_putchar
  410. #define        GOTO_XY            msc_goto_xy
  411. #define        GET_X            msc_get_x
  412. #define        GET_Y            msc_get_y
  413. #define        USE_WINDOW        null_io
  414. #define        GET_CH            getch
  415. #define        KBD_HIT            kbhit
  416. #define        ERASE_TO_EOLN    msc_erase_to_eoln
  417. #define        ERASE_WINDOW    msc_erase_window
  418. #define        SAVE_CURSOR        default_save_cursor
  419. #define        RESTORE_CURSOR    default_restore_cursor
  420.  
  421. #endif    /* MSC */
  422.  
  423. #ifdef    TURBOC
  424.  
  425. #include    <alloc.h>
  426.  
  427. extern int    tc_get_x () ;
  428. extern int    tc_get_y () ;
  429.  
  430. #define        Void            void
  431. #define        HUGE            huge
  432. #define        MALLOC(s)        farmalloc((unsigned long)s)
  433. #define        FREE(p)            farfree((void *)p)
  434.  
  435. #define        INIT_IO            tc_init_io
  436. #define        EXIT_IO            null_io
  437. #define        PUT_CHAR        tc_putchar
  438. #define        GOTO_XY            tc_goto_xy
  439. #define        GET_X            tc_get_x
  440. #define        GET_Y            tc_get_y
  441. #define        USE_WINDOW        null_io
  442. #define        GET_CH            tc_getch
  443. #define        KBD_HIT            kbhit
  444. #define        ERASE_TO_EOLN    tc_erase_to_eoln
  445. #define        ERASE_WINDOW    tc_erase_window
  446. #define        SAVE_CURSOR        default_save_cursor
  447. #define        RESTORE_CURSOR    default_restore_cursor
  448.  
  449. #endif    /* TURBOC */
  450.  
  451. #ifndef    MSC
  452. #ifndef    TURBOC
  453.  
  454. #define        ANSI_ESCAPE
  455.  
  456. extern int    ansi_get_x () ;
  457. extern int    ansi_get_y () ;
  458.  
  459. #define        Void            int
  460. #define        HUGE
  461. #define        MALLOC(s)        ((char *)0)
  462. #define        FREE(p)            (p)
  463.  
  464. #define        INIT_IO            ansi_init_io
  465. #define        EXIT_IO            ansi_exit_io
  466. #define        PUT_CHAR        msdos_putchar
  467. #define        GOTO_XY            ansi_goto_xy
  468. #define        GET_X            ansi_get_x
  469. #define        GET_Y            ansi_get_y
  470. #define        USE_WINDOW        null_io
  471. #define        GET_CH            getch
  472. #define        KBD_HIT            kbhit
  473. #define        ERASE_TO_EOLN    ansi_erase_to_eoln
  474. #define        ERASE_WINDOW    ansi_erase_window
  475. #define        SAVE_CURSOR        ansi_save_cursor
  476. #define        RESTORE_CURSOR    ansi_restore_cursor
  477.  
  478. #endif    /* TURBOC */
  479. #endif    /* MSC */
  480.  
  481. #endif    /* MSDOS */
  482.  
  483. #ifdef OSK
  484. #define        SCREEN_WIDTH    80
  485. #define        SCREEN_HEIGHT    24
  486. #define        READ_STRING        "r"
  487. #define        WRITE_STRING    "w"
  488. #define        APPEND_STRING    "a"
  489. #ifdef __STDC__
  490. #define        Void            void
  491. #else
  492. #define        Void            int
  493. #endif
  494. #define        MALLOC(s)        malloc(s)
  495. #define        FREE(p)            free((char *)p)
  496. #define        TIME_FUNCTION    osk_time()
  497. #define        ONE_SECOND        1
  498. #define        INIT_SIGNAL        osk_signal_init
  499. #define        SIGNAL_QUIT        osk_signal_quit
  500. #define        RCFILE            ".infocomrc"
  501.  
  502. #ifdef    TERMCAP
  503.  
  504. extern int    tcap_get_x () ;
  505. extern int    tcap_get_y () ;
  506.  
  507. #define        INTERPRETER        OS_9
  508. #define        MODE_BITS        UNDERLINE
  509. #define        INIT_IO            tcap_init_io
  510. #define        EXIT_IO            tcap_exit_io
  511. #define        PUT_CHAR        tcap_putchar
  512. #define        GOTO_XY            tcap_goto_xy
  513. #define        GET_X            tcap_get_x
  514. #define        GET_Y            tcap_get_y
  515. #define        USE_WINDOW        null_io
  516. #define        GET_CH            getchar
  517. #define        KBD_HIT            default_kbd_hit
  518. #define        ERASE_TO_EOLN    tcap_erase_to_eoln
  519. #define        ERASE_WINDOW    tcap_erase_window
  520. #define        SAVE_CURSOR        tcap_save_cursor
  521. #define        RESTORE_CURSOR    tcap_restore_cursor
  522.  
  523. #endif /* TERMCAP */
  524.  
  525. #ifdef    CURSES
  526.  
  527. #include    <effo/curses.h>
  528.  
  529. /*
  530. **    Some versions of curses apparently do not have cbreak()
  531. */
  532.  
  533. extern int    curses_get_ch () ;
  534. extern int    curses_get_x () ;
  535. extern int    curses_get_y () ;
  536.  
  537. #define        INTERPRETER        OS_9
  538. #define        MODE_BITS        UNDERLINE
  539. #define        INIT_IO            curses_init_io
  540. #define        EXIT_IO            curses_exit_io
  541. #define        PUT_CHAR        curses_putchar
  542. #define        GOTO_XY            curses_goto_xy
  543. #define        GET_X            curses_get_x
  544. #define        GET_Y            curses_get_y
  545. #define        USE_WINDOW        null_io
  546. #define        GET_CH            curses_get_ch
  547. #define        KBD_HIT            default_kbd_hit
  548. #define        ERASE_TO_EOLN    curses_erase_to_eoln
  549. #define        ERASE_WINDOW    curses_erase_window
  550. #define        SAVE_CURSOR        default_save_cursor
  551. #define        RESTORE_CURSOR    default_restore_cursor
  552.  
  553. #endif    /* CURSES */
  554.  
  555.  
  556. #ifdef KWINDOWS
  557.  
  558. #define        INTERPRETER        OS_9
  559. #define        MODE_BITS        UNDERLINE
  560. #define        INIT_IO            kwin_init_io
  561. #define        EXIT_IO            kwin_exit_io
  562. #define        PUT_CHAR        kwin_putchar
  563. #define        GOTO_XY            kwin_goto_xy
  564. #define        GET_X            kwin_get_x
  565. #define        GET_Y            kwin_get_y
  566. #define        USE_WINDOW        kwin_use_window
  567. #define        GET_CH            kwin_get_ch
  568. #define        KBD_HIT            kwin_kbd_hit
  569. #define        ERASE_TO_EOLN    kwin_erase_eoln
  570. #define        ERASE_WINDOW    kwin_erase_win
  571. #define        SAVE_CURSOR        default_save_cursor
  572. #define        RESTORE_CURSOR    default_restore_cursor
  573. #endif  /* KWINDOWS */
  574.  
  575. #endif  /* OSK */
  576.  
  577. /*
  578. **    Default Constant Settings
  579. */
  580.  
  581. #ifndef    INTERPRETER
  582. #define        INTERPRETER        OS_9
  583. #endif    /* INTERPRETER */
  584.  
  585. #ifndef    MODE_BITS
  586. #define        MODE_BITS        0
  587. #endif    /* MODE_BITS */
  588.  
  589. #ifndef    SCREEN_WIDTH
  590. #define        SCREEN_WIDTH    80
  591. #endif    /* SCREEN_WIDTH */
  592.  
  593. #ifndef    SCREEN_HEIGHT
  594. #define        SCREEN_HEIGHT    24
  595. #endif    /* SCREEN_HEIGHT */
  596.  
  597. #ifndef    READ_STRING
  598. #define        READ_STRING        "r"
  599. #endif    /* READ_STRING */
  600.  
  601. #ifndef    WRITE_STRING
  602. #define        WRITE_STRING    "w"
  603. #endif    /* WRITE_STRING */
  604.  
  605. #ifndef    APPEND_STRING
  606. #define        APPEND_STRING    "a"
  607. #endif    /* APPEND_STRING */
  608.  
  609. #ifndef    Void
  610. #define        Void            int
  611. #endif    /* Void */
  612.  
  613. #ifndef    HUGE
  614. #define        HUGE
  615. #endif    /* HUGE */
  616.  
  617. #ifndef    MALLOC
  618. #define        MALLOC(s)        malloc(s)
  619. #endif    /* MALLOC */
  620.  
  621. #ifndef    FREE
  622. #define        FREE(p)            free((char *)p)
  623. #endif    /* FREE */
  624.  
  625. #ifndef    TIME_FUNCTION
  626. #define        TIME_FUNCTION    -1L
  627. #endif    /* TIME_FUNCTION */
  628.  
  629. #ifndef    ONE_SECOND
  630. #define        ONE_SECOND        1
  631. #endif    /* ONE_SECOND */
  632.  
  633. #ifndef    INIT_SIGNAL
  634. #define        INIT_SIGNAL        default_signal_init
  635. #endif    /* INIT_SIGNAL */
  636.  
  637. #ifndef    SIGNAL_QUIT
  638. #define        SIGNAL_QUIT        default_signal_quit
  639. #endif    /* SIGNAL_QUIT */
  640.  
  641. #ifndef    INIT_IO
  642. #define        INIT_IO            null_io
  643. #endif    /* INIT_IO */
  644.  
  645. #ifndef    EXIT_IO
  646. #define        EXIT_IO            null_io
  647. #endif    /* EXIT_IO */
  648.  
  649. #ifndef    PUT_CHAR
  650. #define        PUT_CHAR        default_putchar
  651. #endif    /* PUT_CHAR */
  652.  
  653. #ifndef    GOTO_XY
  654. #define        GOTO_XY            default_goto_xy
  655. #endif    /* GOTO_XY */
  656.  
  657. #ifndef    GET_X
  658. #define        GET_X            default_get_x
  659. #endif    /* GET_X */
  660.  
  661. #ifndef    GET_Y
  662. #define        GET_Y            default_get_y
  663. #endif    /* GET_Y */
  664.  
  665. #ifndef    USE_WINDOW
  666. #define        USE_WINDOW        null_io
  667. #endif    /* USE_WINDOW */
  668.  
  669. #ifndef    GET_CH
  670. #define        GET_CH            getchar
  671. #endif    /* GET_CH */
  672.  
  673. #ifndef    KBD_HIT
  674. #define        KBD_HIT            default_kbd_hit
  675. #endif    /* KBD_HIT */
  676.  
  677. #ifndef    ERASE_TO_EOLN
  678. #define        ERASE_TO_EOLN    null_io
  679. #endif    /* ERASE_TO_EOLN */
  680.  
  681. #ifndef    ERASE_WINDOW
  682. #define        ERASE_WINDOW    null_io
  683. #endif    /* ERASE_WINDOW */
  684.  
  685. #ifndef    SAVE_CURSOR
  686. #define        SAVE_CURSOR        default_save_cursor
  687. #endif    /* SAVE_CURSOR */
  688.  
  689. #ifndef    RESTORE_CURSOR
  690. #define        RESTORE_CURSOR    default_restore_cursor
  691. #endif    /* RESTORE_CURSOR */
  692.  
  693. #endif    /* __MACHINE__ */
  694.