fixed headers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4039
This commit is contained in:
David Anderson 2006-07-29 23:29:52 +00:00
parent 8f0e90ee29
commit 2f47baee55
3 changed files with 19 additions and 13 deletions

View File

@ -24,7 +24,7 @@ typedef int32_t cell_t;
* Information about the core plugin tables. * Information about the core plugin tables.
* These may or may not be present! * These may or may not be present!
*/ */
typedef struct sp_plugin_infotab_t typedef struct sp_plugin_infotab_s
{ {
const char *stringbase; /* base of string table */ const char *stringbase; /* base of string table */
uint32_t publics_num; /* number of publics */ uint32_t publics_num; /* number of publics */
@ -33,13 +33,13 @@ typedef struct sp_plugin_infotab_t
sp_file_natives_t *natives; /* native table */ sp_file_natives_t *natives; /* native table */
uint32_t pubvars_num; /* number of pubvars */ uint32_t pubvars_num; /* number of pubvars */
sp_file_pubvars_t *pubvars; /* pubvars table */ sp_file_pubvars_t *pubvars; /* pubvars table */
} sp_plugin_infotab_s; } sp_plugin_infotab_t;
/** /**
* Information about the plugin's debug tables. * Information about the plugin's debug tables.
* These are all present if one is present. * These are all present if one is present.
*/ */
typedef struct sp_plugin_debug_t typedef struct sp_plugin_debug_s
{ {
const char *stringbase; /* base of string table */ const char *stringbase; /* base of string table */
uint32_t files_num; /* number of files */ uint32_t files_num; /* number of files */
@ -48,7 +48,7 @@ typedef struct sp_plugin_debug_t
sp_fdbg_line_t *lines; /* lines table */ sp_fdbg_line_t *lines; /* lines table */
uint32_t syms_num; /* number of symbols */ uint32_t syms_num; /* number of symbols */
sp_fdbg_symbol_t *symbols; /* symbol table */ sp_fdbg_symbol_t *symbols; /* symbol table */
} sp_plugin_debug_s; } sp_plugin_debug_t;
#define SP_FA_SELF_EXTERNAL (1<<0) #define SP_FA_SELF_EXTERNAL (1<<0)
#define SP_FA_BASE_EXTERNAL (1<<1) #define SP_FA_BASE_EXTERNAL (1<<1)
@ -58,7 +58,7 @@ typedef struct sp_plugin_debug_t
* This differs from the on-disk structure to ensure * This differs from the on-disk structure to ensure
* that the format is properly read. * that the format is properly read.
*/ */
typedef struct sp_plugin_t typedef struct sp_plugin_s
{ {
uint8_t *base; /* base of memory */ uint8_t *base; /* base of memory */
uint8_t *pcode; /* p-code */ uint8_t *pcode; /* p-code */
@ -70,10 +70,10 @@ typedef struct sp_plugin_t
uint32_t allocflags; /* allocation flags */ uint32_t allocflags; /* allocation flags */
sp_plugin_infotab_t *info; /* base info table */ sp_plugin_infotab_t *info; /* base info table */
sp_plugin_debug_t *debug; /* debug info table */ sp_plugin_debug_t *debug; /* debug info table */
} sp_plugin_s; } sp_plugin_t;
struct sp_context_s; struct sp_context_s;
typedef int (*SPVM_NATIVE_FUNC)(sp_context_s *, cell_t *); typedef int (*SPVM_NATIVE_FUNC)(struct sp_context_s *, cell_t *);
/********************************************** /**********************************************
*** The following structures are bound to the VM/JIT. *** The following structures are bound to the VM/JIT.
@ -85,22 +85,22 @@ typedef int (*SPVM_NATIVE_FUNC)(sp_context_s *, cell_t *);
* By default, these point back to the string table * By default, these point back to the string table
* in the sp_plugin_infotab_t structure. * in the sp_plugin_infotab_t structure.
*/ */
typedef struct sp_public_t typedef struct sp_public_s
{ {
uint32_t offs; /* code offset */ uint32_t offs; /* code offset */
const char *name; /* name */ const char *name; /* name */
} sp_publics_s; } sp_public_t;
/** /**
* Offsets and names to public variables. * Offsets and names to public variables.
* The offset is relocated and the name by default * The offset is relocated and the name by default
* points back to the sp_plugin_infotab_t structure. * points back to the sp_plugin_infotab_t structure.
*/ */
typedef struct sp_pubvar_t typedef struct sp_pubvar_s
{ {
cell_t *offs; /* pointer to data */ cell_t *offs; /* pointer to data */
const char *name; /* name */ const char *name; /* name */
} sp_pubvar_t } sp_pubvar_t;
#define SP_NATIVE_NONE (0) /* Native is not yet found */ #define SP_NATIVE_NONE (0) /* Native is not yet found */
#define SP_NATIVE_OKAY (1) /* Native has been added */ #define SP_NATIVE_OKAY (1) /* Native has been added */
@ -111,7 +111,7 @@ typedef struct sp_pubvar_t
* point back to the sp_plugin_infotab_t structure. * point back to the sp_plugin_infotab_t structure.
* A native is NULL if unit * A native is NULL if unit
*/ */
typedef struct sp_native_t typedef struct sp_native_s
{ {
SPVM_NATIVE_FUNC pfn; /* function pointer */ SPVM_NATIVE_FUNC pfn; /* function pointer */
const char * name; /* name of function */ const char * name; /* name of function */
@ -190,7 +190,7 @@ typedef struct sp_context_s
int32_t err; /* error code */ int32_t err; /* error code */
uint32_t pushcount; /* push count */ uint32_t pushcount; /* push count */
/* context rebased database */ /* context rebased database */
sp_public_t *publics /* public functions table */ sp_public_t *publics; /* public functions table */
sp_pubvar_t *pubvars; /* public variables table */ sp_pubvar_t *pubvars; /* public variables table */
sp_native_t *natives; /* natives table */ sp_native_t *natives; /* natives table */
sp_debug_file_t *files; /* files */ sp_debug_file_t *files; /* files */

View File

@ -40,6 +40,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -174,6 +175,10 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> >
<File
RelativePath="..\test.c"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"

View File

@ -1,6 +1,7 @@
#ifndef _INCLUDE_SOURCEPAWN_VM_H_ #ifndef _INCLUDE_SOURCEPAWN_VM_H_
#define _INCLUDE_SOURCEPAWN_VM_H_ #define _INCLUDE_SOURCEPAWN_VM_H_
#include <stdio.h>
#include "sp_vm_types.h" #include "sp_vm_types.h"
/***************** /*****************