Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
12,781 additions
and
12,727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_AUXLIB_H_ | ||
#define _SQSTD_AUXLIB_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API void sqstd_seterrorhandlers(HSQUIRRELVM v); | ||
SQUIRREL_API void sqstd_printcallstack(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /* _SQSTD_AUXLIB_H_ */ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_AUXLIB_H_ | ||
#define _SQSTD_AUXLIB_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API void sqstd_seterrorhandlers(HSQUIRRELVM v); | ||
SQUIRREL_API void sqstd_printcallstack(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /* _SQSTD_AUXLIB_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTDBLOB_H_ | ||
#define _SQSTDBLOB_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API SQUserPointer sqstd_createblob(HSQUIRRELVM v, SQInteger size); | ||
SQUIRREL_API SQRESULT sqstd_getblob(HSQUIRRELVM v,SQInteger idx,SQUserPointer *ptr); | ||
SQUIRREL_API SQInteger sqstd_getblobsize(HSQUIRRELVM v,SQInteger idx); | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_bloblib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTDBLOB_H_*/ | ||
|
||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTDBLOB_H_ | ||
#define _SQSTDBLOB_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API SQUserPointer sqstd_createblob(HSQUIRRELVM v, SQInteger size); | ||
SQUIRREL_API SQRESULT sqstd_getblob(HSQUIRRELVM v,SQInteger idx,SQUserPointer *ptr); | ||
SQUIRREL_API SQInteger sqstd_getblobsize(HSQUIRRELVM v,SQInteger idx); | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_bloblib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTDBLOB_H_*/ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTDIO_H_ | ||
#define _SQSTDIO_H_ | ||
|
||
#ifdef __cplusplus | ||
|
||
#define SQSTD_STREAM_TYPE_TAG 0x80000000 | ||
|
||
struct SQStream { | ||
virtual ~SQStream() {} | ||
virtual SQInteger Read(void *buffer, SQInteger size) = 0; | ||
virtual SQInteger Write(void *buffer, SQInteger size) = 0; | ||
virtual SQInteger Flush() = 0; | ||
virtual SQInteger Tell() = 0; | ||
virtual SQInteger Len() = 0; | ||
virtual SQInteger Seek(SQInteger offset, SQInteger origin) = 0; | ||
virtual bool IsValid() = 0; | ||
virtual bool EOS() = 0; | ||
}; | ||
|
||
extern "C" { | ||
#endif | ||
|
||
#define SQ_SEEK_CUR 0 | ||
#define SQ_SEEK_END 1 | ||
#define SQ_SEEK_SET 2 | ||
|
||
typedef void* SQFILE; | ||
|
||
SQUIRREL_API SQFILE sqstd_fopen(const SQChar *,const SQChar *); | ||
SQUIRREL_API SQInteger sqstd_fread(SQUserPointer, SQInteger, SQInteger, SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fwrite(const SQUserPointer, SQInteger, SQInteger, SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fseek(SQFILE , SQInteger , SQInteger); | ||
SQUIRREL_API SQInteger sqstd_ftell(SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fflush(SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fclose(SQFILE); | ||
SQUIRREL_API SQInteger sqstd_feof(SQFILE); | ||
|
||
SQUIRREL_API SQRESULT sqstd_createfile(HSQUIRRELVM v, SQFILE file,SQBool own); | ||
SQUIRREL_API SQRESULT sqstd_getfile(HSQUIRRELVM v, SQInteger idx, SQFILE *file); | ||
|
||
//compiler helpers | ||
SQUIRREL_API SQRESULT sqstd_loadfile(HSQUIRRELVM v,const SQChar *filename,SQBool printerror); | ||
SQUIRREL_API SQRESULT sqstd_dofile(HSQUIRRELVM v,const SQChar *filename,SQBool retval,SQBool printerror); | ||
SQUIRREL_API SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v,const SQChar *filename); | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_iolib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTDIO_H_*/ | ||
|
||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTDIO_H_ | ||
#define _SQSTDIO_H_ | ||
|
||
#ifdef __cplusplus | ||
|
||
#define SQSTD_STREAM_TYPE_TAG 0x80000000 | ||
|
||
struct SQStream { | ||
virtual ~SQStream() {} | ||
virtual SQInteger Read(void *buffer, SQInteger size) = 0; | ||
virtual SQInteger Write(void *buffer, SQInteger size) = 0; | ||
virtual SQInteger Flush() = 0; | ||
virtual SQInteger Tell() = 0; | ||
virtual SQInteger Len() = 0; | ||
virtual SQInteger Seek(SQInteger offset, SQInteger origin) = 0; | ||
virtual bool IsValid() = 0; | ||
virtual bool EOS() = 0; | ||
}; | ||
|
||
extern "C" { | ||
#endif | ||
|
||
#define SQ_SEEK_CUR 0 | ||
#define SQ_SEEK_END 1 | ||
#define SQ_SEEK_SET 2 | ||
|
||
typedef void* SQFILE; | ||
|
||
SQUIRREL_API SQFILE sqstd_fopen(const SQChar *,const SQChar *); | ||
SQUIRREL_API SQInteger sqstd_fread(SQUserPointer, SQInteger, SQInteger, SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fwrite(const SQUserPointer, SQInteger, SQInteger, SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fseek(SQFILE , SQInteger , SQInteger); | ||
SQUIRREL_API SQInteger sqstd_ftell(SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fflush(SQFILE); | ||
SQUIRREL_API SQInteger sqstd_fclose(SQFILE); | ||
SQUIRREL_API SQInteger sqstd_feof(SQFILE); | ||
|
||
SQUIRREL_API SQRESULT sqstd_createfile(HSQUIRRELVM v, SQFILE file,SQBool own); | ||
SQUIRREL_API SQRESULT sqstd_getfile(HSQUIRRELVM v, SQInteger idx, SQFILE *file); | ||
|
||
//compiler helpers | ||
SQUIRREL_API SQRESULT sqstd_loadfile(HSQUIRRELVM v,const SQChar *filename,SQBool printerror); | ||
SQUIRREL_API SQRESULT sqstd_dofile(HSQUIRRELVM v,const SQChar *filename,SQBool retval,SQBool printerror); | ||
SQUIRREL_API SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v,const SQChar *filename); | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_iolib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTDIO_H_*/ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_MATH_H_ | ||
#define _SQSTD_MATH_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_mathlib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTD_MATH_H_*/ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_MATH_H_ | ||
#define _SQSTD_MATH_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_mathlib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTD_MATH_H_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_STRING_H_ | ||
#define _SQSTD_STRING_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef unsigned int SQRexBool; | ||
typedef struct SQRex SQRex; | ||
|
||
typedef struct { | ||
const SQChar *begin; | ||
SQInteger len; | ||
} SQRexMatch; | ||
|
||
SQUIRREL_API SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error); | ||
SQUIRREL_API void sqstd_rex_free(SQRex *exp); | ||
SQUIRREL_API SQBool sqstd_rex_match(SQRex* exp,const SQChar* text); | ||
SQUIRREL_API SQBool sqstd_rex_search(SQRex* exp,const SQChar* text, const SQChar** out_begin, const SQChar** out_end); | ||
SQUIRREL_API SQBool sqstd_rex_searchrange(SQRex* exp,const SQChar* text_begin,const SQChar* text_end,const SQChar** out_begin, const SQChar** out_end); | ||
SQUIRREL_API SQInteger sqstd_rex_getsubexpcount(SQRex* exp); | ||
SQUIRREL_API SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *subexp); | ||
|
||
SQUIRREL_API SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen,SQChar **output); | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_stringlib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTD_STRING_H_*/ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_STRING_H_ | ||
#define _SQSTD_STRING_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef unsigned int SQRexBool; | ||
typedef struct SQRex SQRex; | ||
|
||
typedef struct { | ||
const SQChar *begin; | ||
SQInteger len; | ||
} SQRexMatch; | ||
|
||
SQUIRREL_API SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error); | ||
SQUIRREL_API void sqstd_rex_free(SQRex *exp); | ||
SQUIRREL_API SQBool sqstd_rex_match(SQRex* exp,const SQChar* text); | ||
SQUIRREL_API SQBool sqstd_rex_search(SQRex* exp,const SQChar* text, const SQChar** out_begin, const SQChar** out_end); | ||
SQUIRREL_API SQBool sqstd_rex_searchrange(SQRex* exp,const SQChar* text_begin,const SQChar* text_end,const SQChar** out_begin, const SQChar** out_end); | ||
SQUIRREL_API SQInteger sqstd_rex_getsubexpcount(SQRex* exp); | ||
SQUIRREL_API SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *subexp); | ||
|
||
SQUIRREL_API SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen,SQChar **output); | ||
|
||
SQUIRREL_API SQRESULT sqstd_register_stringlib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /*_SQSTD_STRING_H_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_SYSTEMLIB_H_ | ||
#define _SQSTD_SYSTEMLIB_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API SQInteger sqstd_register_systemlib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /* _SQSTD_SYSTEMLIB_H_ */ | ||
/* see copyright notice in squirrel.h */ | ||
#ifndef _SQSTD_SYSTEMLIB_H_ | ||
#define _SQSTD_SYSTEMLIB_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
SQUIRREL_API SQInteger sqstd_register_systemlib(HSQUIRRELVM v); | ||
|
||
#ifdef __cplusplus | ||
} /*extern "C"*/ | ||
#endif | ||
|
||
#endif /* _SQSTD_SYSTEMLIB_H_ */ |
Oops, something went wrong.