3
"$Header: d:/cvsroot/tads/tads3/vmbifreg.cpp,v 1.2 1999/05/17 02:52:29 MJRoberts Exp $";
7
* Copyright (c) 1998, 2002 Michael J. Roberts. All Rights Reserved.
9
* Please see the accompanying license file, LICENSE.TXT, for information
10
* on using and copying this software.
14
vmbifreg_core.cpp - core built-in function set registry (no UI)
16
Defines the built-in functions that are linked in to this
17
implementation of the VM. This is the "core" set, which includes the
18
normal TADS 3 sets but excludes the user interface (specifically, we
19
exclude tads-io, the console I/O function set that is part of the standard
20
TADS 3 function set complement).
22
This core function set is specifically designed to be extended by the
23
host application, since it is expected that applications will want to add
24
one or more new function sets to provide a user interface. To extend this
25
registration table with application-specific function sets, follow these
28
1. Make a copy of this file (DO NOT MODIFY THE ORIGINAL).
30
2. Remove this file (and/or derived files, such as object files) from
31
your makefile, and add your modified version instead.
33
3. In the table below, add an entry for each of your extra function
34
sets. (Of course, for each of your added function sets, you must
35
implement the function set and link the implementation into your host
36
application executable.)
41
04/05/02 MJRoberts - creation (from vmbifreg.cpp)
46
/* ------------------------------------------------------------------------ */
48
* Include the function set vector definitions. Define
49
* VMBIF_DEFINE_VECTOR so that the headers all generate vector
52
#define VMBIF_DEFINE_VECTOR
57
// Include the header for our sample t3core function set
60
// !!! INCLUDE HOST-SPECIFIC FUNCTION SET HEADERS HERE ("vmbifxxx.h")
62
/* done with the vector definition */
63
#undef VMBIF_DEFINE_VECTOR
65
#define MAKE_ENTRY(entry_name, entry_table) \
66
{ entry_name, sizeof(entry_table)/sizeof(entry_table[0]), entry_table }
68
/* ------------------------------------------------------------------------ */
70
* The function set registration table. Each entry in the table
71
* provides the definition of one function set, keyed by the function
72
* set's universally unique identifier.
74
vm_bif_entry_t G_bif_reg_table[] =
76
/* T3 VM system function set, v1 */
77
MAKE_ENTRY("t3vm/010003", G_bif_t3),
79
/* T3 VM Testing interface, v1 */
80
MAKE_ENTRY("t3vmTEST/010000", G_bif_t3_test),
82
/* TADS generic data manipulation functions */
83
MAKE_ENTRY("tads-gen/030005", G_bif_tadsgen),
85
// Our sample function set for the t3core build
86
MAKE_ENTRY("core-sample/010000", G_bif_sample),
88
// !!! ADD ANY HOST-SPECIFIC FUNCTION SETS HERE
90
/* end of table marker */
94
/* we don't need the MAKE_ENTRY macro any longer */