~ubuntu-branches/ubuntu/wily/gargoyle-free/wily-proposed

« back to all changes in this revision

Viewing changes to tads/tads3/vmbifreg_core.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Beucler
  • Date: 2009-09-11 20:09:43 UTC
  • Revision ID: james.westby@ubuntu.com-20090911200943-idgzoyupq6650zpn
Tags: upstream-2009-08-25
ImportĀ upstreamĀ versionĀ 2009-08-25

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
  vmbifreg_core.cpp - core built-in function set registry (no UI)
 
15
Function
 
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).
 
21
 
 
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
 
26
  steps:
 
27
 
 
28
  1.  Make a copy of this file (DO NOT MODIFY THE ORIGINAL).
 
29
 
 
30
  2.  Remove this file (and/or derived files, such as object files) from
 
31
  your makefile, and add your modified version instead.
 
32
 
 
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.)
 
37
 
 
38
Notes
 
39
  
 
40
Modified
 
41
  04/05/02 MJRoberts  - creation (from vmbifreg.cpp)
 
42
*/
 
43
 
 
44
#include "vmbifreg.h"
 
45
 
 
46
/* ------------------------------------------------------------------------ */
 
47
/*
 
48
 *   Include the function set vector definitions.  Define
 
49
 *   VMBIF_DEFINE_VECTOR so that the headers all generate vector
 
50
 *   definitions. 
 
51
 */
 
52
#define VMBIF_DEFINE_VECTOR
 
53
 
 
54
#include "vmbiftad.h"
 
55
#include "vmbift3.h"
 
56
 
 
57
// Include the header for our sample t3core function set
 
58
#include "vmcore.h"
 
59
 
 
60
// !!! INCLUDE HOST-SPECIFIC FUNCTION SET HEADERS HERE ("vmbifxxx.h")
 
61
 
 
62
/* done with the vector definition */
 
63
#undef VMBIF_DEFINE_VECTOR
 
64
 
 
65
#define MAKE_ENTRY(entry_name, entry_table) \
 
66
    { entry_name, sizeof(entry_table)/sizeof(entry_table[0]), entry_table }
 
67
 
 
68
/* ------------------------------------------------------------------------ */
 
69
/*
 
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.  
 
73
 */
 
74
vm_bif_entry_t G_bif_reg_table[] =
 
75
{
 
76
    /* T3 VM system function set, v1 */
 
77
    MAKE_ENTRY("t3vm/010003", G_bif_t3),
 
78
 
 
79
    /* T3 VM Testing interface, v1 */
 
80
    MAKE_ENTRY("t3vmTEST/010000", G_bif_t3_test),
 
81
    
 
82
    /* TADS generic data manipulation functions */
 
83
    MAKE_ENTRY("tads-gen/030005", G_bif_tadsgen),
 
84
 
 
85
    // Our sample function set for the t3core build
 
86
    MAKE_ENTRY("core-sample/010000", G_bif_sample),
 
87
 
 
88
    // !!! ADD ANY HOST-SPECIFIC FUNCTION SETS HERE
 
89
 
 
90
    /* end of table marker */
 
91
    { 0, 0, 0 }
 
92
};
 
93
 
 
94
/* we don't need the MAKE_ENTRY macro any longer */
 
95
#undef MAKE_ENTRY
 
96