diff options
Diffstat (limited to 'src/lundump.h')
-rw-r--r-- | src/lundump.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/lundump.h b/src/lundump.h index 3f905cb0..446d2de9 100644 --- a/src/lundump.h +++ b/src/lundump.h @@ -1,5 +1,5 @@ /* -** $Id: lundump.h,v 1.15 1999/07/02 19:34:26 lhf Exp $ +** $Id: lundump.h,v 1.21 2000/10/31 16:57:23 lhf Exp $ ** load pre-compiled Lua chunks ** See Copyright Notice in lua.h */ @@ -10,27 +10,23 @@ #include "lobject.h" #include "lzio.h" -TProtoFunc* luaU_undump1 (ZIO* Z); /* load one chunk */ -void luaU_badconstant (char* s, int i, TObject* o, TProtoFunc* tf); - /* handle cases that cannot happen */ -double luaU_str2d (char* b, char* where); - /* convert number from text */ +/* load one chunk */ +Proto* luaU_undump (lua_State* L, ZIO* Z); + +/* find byte order */ +int luaU_endianess (void); /* definitions for headers of binary files */ -#define VERSION 0x32 /* last format change was in 3.2 */ -#define VERSION0 0x32 /* last major change was in 3.2 */ +#define VERSION 0x40 /* last format change was in 4.0 */ +#define VERSION0 0x40 /* last major change was in 4.0 */ #define ID_CHUNK 27 /* binary files start with ESC... */ #define SIGNATURE "Lua" /* ...followed by this signature */ /* formats for error messages */ -#define SOURCE "<%s:%d>" -#define IN " in %p " SOURCE -#define INLOC tf,tf->source->str,tf->lineDefined - -/* format for numbers in listings and error messages */ -#ifndef NUMBER_FMT -#define NUMBER_FMT "%.16g" /* LUA_NUMBER */ -#endif +#define SOURCE_FMT "<%d:%.99s>" +#define SOURCE tf->lineDefined,tf->source->str +#define IN_FMT " in %p " SOURCE_FMT +#define IN tf,SOURCE /* a multiple of PI for testing native format */ /* multiplying by 1E8 gives non-trivial integer values */ |