1 /*
2 Name
3   osunix3.c - extra unix support routines for TADS 3
4 Function
5   Defines some routines for TADS 3 on Unix.  These routines are not
6   required by TADS, but rather are required by the Unix osifc
7   implementation.  In particular, the Unix osifc implementation makes some
8   calls to TADS 2 portable functions, which are not available in TADS 3
9   executables; to avoid linking errors, we provide these dummy
10   implementations.
11 
12   IMPORTANT: This file should be linked only when building a program
13   that links in TADS 3 ONLY.  This should NOT be linked when the TADS 2 VM
14   is linked in as well.  So, this file should be linked in to essentially
15   everything except the combined v2+v3 interpreter.  For anything that
16   links in the TADS 2 VM, do NOT link with this file.
17 Notes
18 
19 Modified
20   08/19/00 MJRoberts  - Creation
21 */
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 
26 #include "voc.h"
27 
28 /*
29  *   The unix OS files require the symbol 'main_voc_ctx', which is the
30  *   context structure pointer that the OS routine that intercepts crash
31  *   signals passes to fiosav().  This global is irrelevant for tads 3, but
32  *   is required for linking the unix OS code, so provide a dummy
33  *   definition.
34  */
35 voccxdef *main_voc_ctx = 0;
36 
37 
38 /*
39  *   The Unix osifc implementation calls fiosav(), the TADS 2 function that
40  *   saves the current game, if a crash (such as a SEGV) occurs.  This
41  *   function was TADS 2-specific, and is not present in TADS 3; this dummy
42  *   implementation provides the symbol to avoid linker errors.  This is a
43  *   dummy version - it doesn't do anything; the only loss of functionality
44  *   is that the TADS 3 interpreter will not actually save the current game
45  *   if the interpreter crashes.
46  */
fiosav(voccxdef * vctx,char * fname,char * game_fname)47 int fiosav(voccxdef *vctx, char *fname, char *game_fname)
48 {
49     /* indicate failure */
50     return 1;
51 }
52 
53