| 1 |
#ifdef RCSID |
| 2 |
static char RCSid[] = |
| 3 |
"$Header: d:/cvsroot/tads/tads3/vmbifreg.cpp,v 1.2 1999/05/17 02:52:29 MJRoberts Exp $"; |
| 4 |
#endif |
| 5 |
|
| 6 |
/* |
| 7 |
* Copyright (c) 1998, 2002 Michael J. Roberts. All Rights Reserved. |
| 8 |
* |
| 9 |
* Please see the accompanying license file, LICENSE.TXT, for information |
| 10 |
* on using and copying this software. |
| 11 |
*/ |
| 12 |
/* |
| 13 |
Name |
| 14 |
vmbifregn.cpp - built-in function set registry, with the extended local |
| 15 |
I/O function set (tads-io, tads-io-ext) PLUS network I/O (tads-net) |
| 16 |
Function |
| 17 |
Defines the built-in functions that are linked in to this implementation |
| 18 |
of the VM. This version of the registry includes tads-io-ext, the extended |
| 19 |
I/O function set, plus tads-net, the network I/O set. This is used to |
| 20 |
build hybrid interpreters that can run games built on any of the I/O |
| 21 |
sets: the standard text-only set, HTML TADS, or network TADS. |
| 22 |
Notes |
| 23 |
|
| 24 |
Modified |
| 25 |
03/02/2005 MJRoberts - Creation |
| 26 |
*/ |
| 27 |
|
| 28 |
#include "vmbifreg.h" |
| 29 |
|
| 30 |
/* ------------------------------------------------------------------------ */ |
| 31 |
/* |
| 32 |
* Include the function set vector definitions. Define |
| 33 |
* VMBIF_DEFINE_VECTOR so that the headers all generate vector |
| 34 |
* definitions. |
| 35 |
*/ |
| 36 |
#define VMBIF_DEFINE_VECTOR |
| 37 |
|
| 38 |
#include "vmbiftad.h" |
| 39 |
#include "vmbiftio.h" |
| 40 |
#include "vmbift3.h" |
| 41 |
#include "vmbiftix.h" |
| 42 |
#include "vmbifnet.h" |
| 43 |
|
| 44 |
// !!! INCLUDE HOST-SPECIFIC FUNCTION SET HEADERS HERE ("vmbifxxx.h") |
| 45 |
|
| 46 |
/* done with the vector definition */ |
| 47 |
#undef VMBIF_DEFINE_VECTOR |
| 48 |
|
| 49 |
#define MAKE_ENTRY(entry_name, cls) \ |
| 50 |
{ entry_name, countof(cls::bif_table), cls::bif_table, \ |
| 51 |
&cls::attach, &cls::detach } |
| 52 |
|
| 53 |
/* ------------------------------------------------------------------------ */ |
| 54 |
/* |
| 55 |
* The function set registration table. Each entry in the table |
| 56 |
* provides the definition of one function set, keyed by the function |
| 57 |
* set's universally unique identifier. |
| 58 |
*/ |
| 59 |
vm_bif_entry_t G_bif_reg_table[] = |
| 60 |
{ |
| 61 |
/* T3 VM system function set, v1 */ |
| 62 |
MAKE_ENTRY("t3vm/010006", CVmBifT3), |
| 63 |
|
| 64 |
/* T3 VM Testing interface, v1 */ |
| 65 |
MAKE_ENTRY("t3vmTEST/010000", CVmBifT3Test), |
| 66 |
|
| 67 |
/* TADS generic data manipulation functions */ |
| 68 |
MAKE_ENTRY("tads-gen/030008", CVmBifTADS), |
| 69 |
|
| 70 |
/* TADS input/output functions */ |
| 71 |
MAKE_ENTRY("tads-io/030007", CVmBifTIO), |
| 72 |
|
| 73 |
/* TADS extended input/output functions (if the platform supports them) */ |
| 74 |
MAKE_ENTRY("tads-io-ext/030000", CVmBifTIOExt), |
| 75 |
|
| 76 |
/* TADS network functions */ |
| 77 |
MAKE_ENTRY("tads-net/030001", CVmBifNet), |
| 78 |
|
| 79 |
// !!! ADD ANY HOST-SPECIFIC FUNCTION SETS HERE |
| 80 |
|
| 81 |
/* end of table marker */ |
| 82 |
{ 0, 0, 0 } |
| 83 |
}; |
| 84 |
|
| 85 |
/* we don't need the MAKE_ENTRY macro any longer */ |
| 86 |
#undef MAKE_ENTRY |
| 87 |
|