reorganized this a tad

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4037
This commit is contained in:
David Anderson
2006-07-28 05:34:12 +00:00
parent 95351749a6
commit 2c4d892469
3 changed files with 56 additions and 66 deletions
@@ -40,6 +40,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -115,6 +116,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
@@ -175,83 +177,75 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\libpawnc.c"
RelativePath="..\libpawnc.c"
>
</File>
<File
RelativePath=".\lstring.c"
RelativePath="..\lstring.c"
>
</File>
<File
RelativePath=".\memfile.c"
RelativePath="..\memfile.c"
>
</File>
<File
RelativePath=".\pawncc.c"
RelativePath="..\pawncc.c"
>
</File>
<File
RelativePath=".\sc1.c"
RelativePath="..\sc1.c"
>
</File>
<File
RelativePath=".\sc2.c"
RelativePath="..\sc2.c"
>
</File>
<File
RelativePath=".\sc3.c"
RelativePath="..\sc3.c"
>
</File>
<File
RelativePath=".\sc4.c"
RelativePath="..\sc4.c"
>
</File>
<File
RelativePath=".\sc5.c"
RelativePath="..\sc5.c"
>
</File>
<File
RelativePath=".\sc6.c"
RelativePath="..\sc6.c"
>
</File>
<File
RelativePath=".\sc7.c"
RelativePath="..\sc7.c"
>
</File>
<File
RelativePath=".\scexpand.c"
RelativePath="..\scexpand.c"
>
</File>
<File
RelativePath=".\sci18n.c"
RelativePath="..\sci18n.c"
>
</File>
<File
RelativePath=".\sclist.c"
RelativePath="..\sclist.c"
>
</File>
<File
RelativePath=".\scmemfil.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
Detect64BitPortabilityProblems="false"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\scstate.c"
RelativePath="..\scmemfil.c"
>
</File>
<File
RelativePath=".\scvars.c"
RelativePath="..\scstate.c"
>
</File>
<File
RelativePath=".\sp_file.c"
RelativePath="..\scvars.c"
>
</File>
<File
RelativePath="..\sp_file.c"
>
</File>
</Filter>
@@ -261,39 +255,35 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\amx.h"
RelativePath="..\amx.h"
>
</File>
<File
RelativePath=".\amxdbg.h"
RelativePath="..\amxdbg.h"
>
</File>
<File
RelativePath=".\lstring.h"
RelativePath="..\lstring.h"
>
</File>
<File
RelativePath=".\memfile.h"
RelativePath="..\memfile.h"
>
</File>
<File
RelativePath=".\osdefs.h"
RelativePath="..\osdefs.h"
>
</File>
<File
RelativePath=".\sc.h"
RelativePath="..\sc.h"
>
</File>
<File
RelativePath=".\sp_file.h"
RelativePath="..\sp_file.h"
>
</File>
<File
RelativePath=".\sp_file_headers.h"
>
</File>
<File
RelativePath=".\svnrev.h"
RelativePath="..\svnrev.h"
>
</File>
</Filter>
@@ -303,15 +293,15 @@
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\libpawnc.rc"
RelativePath="..\libpawnc.rc"
>
</File>
<File
RelativePath=".\sc5.scp"
RelativePath="..\sc5.scp"
>
</File>
<File
RelativePath=".\sc7.scp"
RelativePath="..\sc7.scp"
>
</File>
</Filter>
@@ -322,51 +312,51 @@
Name="Source Files"
>
<File
RelativePath=".\zlib\adler32.c"
RelativePath="..\zlib\adler32.c"
>
</File>
<File
RelativePath=".\zlib\compress.c"
RelativePath="..\zlib\compress.c"
>
</File>
<File
RelativePath=".\zlib\crc32.c"
RelativePath="..\zlib\crc32.c"
>
</File>
<File
RelativePath=".\zlib\deflate.c"
RelativePath="..\zlib\deflate.c"
>
</File>
<File
RelativePath=".\zlib\gzio.c"
RelativePath="..\zlib\gzio.c"
>
</File>
<File
RelativePath=".\zlib\infback.c"
RelativePath="..\zlib\infback.c"
>
</File>
<File
RelativePath=".\zlib\inffast.c"
RelativePath="..\zlib\inffast.c"
>
</File>
<File
RelativePath=".\zlib\inflate.c"
RelativePath="..\zlib\inflate.c"
>
</File>
<File
RelativePath=".\zlib\inftrees.c"
RelativePath="..\zlib\inftrees.c"
>
</File>
<File
RelativePath=".\zlib\trees.c"
RelativePath="..\zlib\trees.c"
>
</File>
<File
RelativePath=".\zlib\uncompr.c"
RelativePath="..\zlib\uncompr.c"
>
</File>
<File
RelativePath=".\zlib\zutil.c"
RelativePath="..\zlib\zutil.c"
>
</File>
</Filter>
@@ -374,43 +364,43 @@
Name="Header Files"
>
<File
RelativePath=".\zlib\crc32.h"
RelativePath="..\zlib\crc32.h"
>
</File>
<File
RelativePath=".\zlib\deflate.h"
RelativePath="..\zlib\deflate.h"
>
</File>
<File
RelativePath=".\zlib\inffast.h"
RelativePath="..\zlib\inffast.h"
>
</File>
<File
RelativePath=".\zlib\inffixed.h"
RelativePath="..\zlib\inffixed.h"
>
</File>
<File
RelativePath=".\zlib\inflate.h"
RelativePath="..\zlib\inflate.h"
>
</File>
<File
RelativePath=".\zlib\inftrees.h"
RelativePath="..\zlib\inftrees.h"
>
</File>
<File
RelativePath=".\zlib\trees.h"
RelativePath="..\zlib\trees.h"
>
</File>
<File
RelativePath=".\zlib\zconf.h"
RelativePath="..\zlib\zconf.h"
>
</File>
<File
RelativePath=".\zlib\zlib.h"
RelativePath="..\zlib\zlib.h"
>
</File>
<File
RelativePath=".\zlib\zutil.h"
RelativePath="..\zlib\zutil.h"
>
</File>
</Filter>
-152
View File
@@ -1,152 +0,0 @@
#ifndef _INCLUDE_SPFILE_HEADERS_H
#define _INCLUDE_SPFILE_HEADERS_H
#include <stddef.h>
#if defined __GNUC__ || defined HAVE_STDINT_
#include <stdint.h>
#else
#if !defined HAVE_STDINT_H
typedef unsigned __int64 uint64_t;
typedef __int64 int64_t;
typedef unsigned __int32 uint32_t;
typedef __int32 int32_t;
typedef unsigned __int16 uint16_t;
typedef __int16 int16_t;
typedef unsigned __int8 uint8_t;
typedef __int8 int8_t;
#define HAVE_STDINT_H
#endif
#endif
#define SPFILE_MAGIC 0x53504646 /* Source Pawn File Format (SPFF) */
#define SPFILE_VERSION 0x0100
//:TODO: better compiler/nix support
#if defined __linux__
#pragma pack(1) /* structures must be packed (byte-aligned) */
#else
#pragma pack(push)
#pragma pack(1) /* structures must be packed (byte-aligned) */
#endif
#define SPFILE_COMPRESSION_NONE 0
#define SPFILE_COMPRESSION_GZ 1
typedef struct sp_file_section_s
{
uint32_t nameoffs; /* rel offset into global string table */
uint32_t dataoffs;
uint32_t size;
} sp_file_section_t;
/**
* If compression is 0, then
* disksize may be 0 to mean that
* only the imagesize is needed.
*/
typedef struct sp_file_hdr_s
{
uint32_t magic; /* magic number */
uint16_t version; /* version code */
uint8_t compression;/* compression algorithm */
uint32_t disksize; /* size on disk */
uint32_t imagesize; /* size in memory */
uint8_t sections; /* number of sections */
uint32_t stringtab; /* offset to string table */
uint32_t dataoffs; /* offset to file proper (any compression starts here) */
} sp_file_hdr_t;
typedef enum
{
SP_FILE_NONE = 0,
SP_FILE_DEBUG = 1,
} sp_file_flags_t;
/* section is ".code" */
typedef struct sp_file_code_s
{
uint32_t codesize; /* codesize in bytes */
uint8_t cellsize; /* cellsize in bytes */
uint8_t codeversion; /* version of opcodes supported */
uint16_t flags; /* flags */
uint32_t main; /* address to "main" if any */
uint32_t code; /* rel offset to code */
} sp_file_code_t;
/* section is .data */
typedef struct sp_file_data_s
{
uint32_t datasize; /* size of data section in memory */
uint32_t memsize; /* total mem required (includes data) */
uint32_t data; /* file offset to data (helper) */
} sp_file_data_t;
/* section is .publics */
typedef struct sp_file_publics_s
{
uint32_t address; /* address rel to code section */
uint32_t name; /* index into nametable */
} sp_file_publics_t;
/* section is .natives */
typedef struct sp_file_natives_s
{
uint32_t name; /* name of native at index */
} sp_file_natives_t;
/* section is .pubvars */
typedef struct sp_file_pubvars_s
{
uint32_t address; /* address rel to dat section */
uint32_t name; /* index into nametable */
} sp_file_pubvars_t;
#if defined __linux__
#pragma pack() /* reset default packing */
#else
#pragma pack(pop) /* reset previous packing */
#endif
/**
* Debug information structures
*/
typedef struct sp_fdbg_file_s
{
uint32_t addr; /* address into code */
uint32_t name; /* offset into debug nametable */
} sp_fdbg_file_t;
typedef struct sp_fdbg_line_s
{
uint32_t addr; /* address into code */
uint32_t line; /* line number */
} sp_fdbg_line_t;
#define SP_SYM_VARIABLE 1 /* cell that has an address and that can be fetched directly (lvalue) */
#define SP_SYM_REFERENCE 2 /* VARIABLE, but must be dereferenced */
#define SP_SYM_ARRAY 3
#define SP_SYM_REFARRAY 4 /* an array passed by reference (i.e. a pointer) */
#define SP_SYM_FUNCTION 9
typedef struct sp_fdbg_symbol_s
{
int32_t addr; /* address rel to DAT or stack frame */
int16_t tagid; /* tag id */
uint32_t codestart; /* start scope validity in code */
uint32_t codeend; /* end scope validity in code */
uint8_t ident; /* variable type */
uint8_t vclass; /* scope class (local vs global) */
uint16_t dimcount; /* dimension count (for arrays) */
uint32_t name; /* offset into debug nametable */
} sp_fdbg_symbol_t;
typedef struct sp_fdbg_arraydim_s
{
int16_t tagid; /* tag id */
uint32_t size; /* size of dimension */
} sp_fdbg_arraydim_t;
/* section is .names */
typedef char * sp_file_nametab_t;
#endif //_INCLUDE_SPFILE_HEADERS_H