| 1 | /* $Header: d:/cvsroot/tads/TADS2/trd.h,v 1.6 1999/07/11 00:46:35 MJRoberts Exp $ */ |
| 2 | |
| 3 | /* |
| 4 | * Copyright (c) 1997, 2002 Michael J. Roberts. All Rights Reserved. |
| 5 | * |
| 6 | * Please see the accompanying license file, LICENSE.TXT, for information |
| 7 | * on using and copying this software. |
| 8 | */ |
| 9 | /* |
| 10 | Name |
| 11 | trd.h - TADS runtime application definitions |
| 12 | Function |
| 13 | Defines structures and functions related to the TADS runtime application |
| 14 | Notes |
| 15 | |
| 16 | Modified |
| 17 | 04/11/99 CNebel - Move appctx definition to its own header. |
| 18 | 11/25/97 MJRoberts - Creation |
| 19 | */ |
| 20 | |
| 21 | #ifndef TRD_H |
| 22 | #define TRD_H |
| 23 | |
| 24 | #include "os.h" |
| 25 | #include "appctx.h" |
| 26 | |
| 27 | #ifdef __cplusplus |
| 28 | extern "C" { |
| 29 | #endif |
| 30 | |
| 31 | /* forward-declare structure types */ |
| 32 | struct runcxdef; |
| 33 | |
| 34 | /* |
| 35 | * Run-time version number |
| 36 | */ |
| 37 | #define TADS_RUNTIME_VERSION "2.5.17" |
| 38 | |
| 39 | /* |
| 40 | * Main run-time subsystem entrypoint. Runs the game specified in the |
| 41 | * argument vector; does not return until the game terminates. The |
| 42 | * application container context is optional; pass null if no context is |
| 43 | * required. |
| 44 | */ |
| 45 | int trdmain(int argc, char **argv, appctxdef *appctx, char *save_ext); |
| 46 | |
| 47 | /* |
| 48 | * Main debugger subsystem entrypoint. Works like trdmain(), but starts |
| 49 | * the game under the debugger. |
| 50 | */ |
| 51 | int tddmain(int argc, char **argv, appctxdef *appctx, char *save_ext); |
| 52 | |
| 53 | /* |
| 54 | * close and delete the swap file |
| 55 | */ |
| 56 | void trd_close_swapfile(struct runcxdef *runctx); |
| 57 | |
| 58 | |
| 59 | #ifdef __cplusplus |
| 60 | } |
| 61 | #endif |
| 62 | |
| 63 | /* |
| 64 | * Define default memory sizes if no one else has. |
| 65 | */ |
| 66 | #ifndef TRD_HEAPSIZ |
| 67 | # define TRD_HEAPSIZ 4096 |
| 68 | #endif |
| 69 | #ifndef TRD_STKSIZ |
| 70 | # define TRD_STKSIZ 200 |
| 71 | #endif |
| 72 | #ifndef TRD_UNDOSIZ |
| 73 | # define TRD_UNDOSIZ (16 * 1024) |
| 74 | #endif |
| 75 | |
| 76 | |
| 77 | #ifndef TDD_HEAPSIZ |
| 78 | # define TDD_HEAPSIZ 4096 |
| 79 | #endif |
| 80 | #ifndef TDD_STKSIZ |
| 81 | # define TDD_STKSIZ 200 |
| 82 | #endif |
| 83 | #ifndef TDD_UNDOSIZ |
| 84 | # define TDD_UNDOSIZ (16 * 1024) |
| 85 | #endif |
| 86 | #ifndef TDD_POOLSIZ |
| 87 | # define TDD_POOLSIZ (2 * 1024) |
| 88 | #endif |
| 89 | #ifndef TDD_LCLSIZ |
| 90 | # define TDD_LCLSIZ 0 |
| 91 | #endif |
| 92 | |
| 93 | /* |
| 94 | * If the OS headers haven't defined any system-specific option usage |
| 95 | * messages, set up a dummy list. The usage display routine will show |
| 96 | * messages starting from the lower number up to and including the higher |
| 97 | * number; by default we'll make the ending number lower than the starting |
| 98 | * number so that we don't display any messages at all. |
| 99 | */ |
| 100 | #ifndef ERR_TRUS_OS_FIRST |
| 101 | # define ERR_TRUS_OS_FIRST 100 |
| 102 | # define ERR_TRUS_OS_LAST 99 |
| 103 | #endif |
| 104 | |
| 105 | |
| 106 | #endif /* TRD_H */ |
| 107 |