Imported from ../lua-3.2.tar.gz.
[lua.git] / src / lundump.h
blob3f905cb0a7806dbe8b057e8f5fcef3b722ea1480
1 /*
2 ** $Id: lundump.h,v 1.15 1999/07/02 19:34:26 lhf Exp $
3 ** load pre-compiled Lua chunks
4 ** See Copyright Notice in lua.h
5 */
7 #ifndef lundump_h
8 #define lundump_h
10 #include "lobject.h"
11 #include "lzio.h"
13 TProtoFunc* luaU_undump1 (ZIO* Z); /* load one chunk */
14 void luaU_badconstant (char* s, int i, TObject* o, TProtoFunc* tf);
15 /* handle cases that cannot happen */
16 double luaU_str2d (char* b, char* where);
17 /* convert number from text */
19 /* definitions for headers of binary files */
20 #define VERSION 0x32 /* last format change was in 3.2 */
21 #define VERSION0 0x32 /* last major change was in 3.2 */
22 #define ID_CHUNK 27 /* binary files start with ESC... */
23 #define SIGNATURE "Lua" /* ...followed by this signature */
25 /* formats for error messages */
26 #define SOURCE "<%s:%d>"
27 #define IN " in %p " SOURCE
28 #define INLOC tf,tf->source->str,tf->lineDefined
30 /* format for numbers in listings and error messages */
31 #ifndef NUMBER_FMT
32 #define NUMBER_FMT "%.16g" /* LUA_NUMBER */
33 #endif
35 /* a multiple of PI for testing native format */
36 /* multiplying by 1E8 gives non-trivial integer values */
37 #define TEST_NUMBER 3.14159265358979323846E8
39 #endif