lundump.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. */
  6. #ifndef lundump_h
  7. #define lundump_h
  8. #include "lobject.h"
  9. #include "lzio.h"
  10. TProtoFunc* luaU_undump1 (ZIO* Z); /* load one chunk */
  11. void luaU_badconstant (char* s, int i, TObject* o, TProtoFunc* tf);
  12. /* handle cases that cannot happen */
  13. double luaU_str2d (char* b, char* where);
  14. /* convert number from text */
  15. /* definitions for headers of binary files */
  16. #define VERSION 0x32 /* last format change was in 3.2 */
  17. #define VERSION0 0x32 /* last major change was in 3.2 */
  18. #define ID_CHUNK 27 /* binary files start with ESC... */
  19. #define SIGNATURE "Lua" /* ...followed by this signature */
  20. /* formats for error messages */
  21. #define SOURCE "<%s:%d>"
  22. #define IN " in %p " SOURCE
  23. #define INLOC tf,tf->source->str,tf->lineDefined
  24. /* format for numbers in listings and error messages */
  25. #ifndef NUMBER_FMT
  26. #define NUMBER_FMT "%.16g" /* LUA_NUMBER */
  27. #endif
  28. /* a multiple of PI for testing native format */
  29. /* multiplying by 1E8 gives non-trivial integer values */
  30. #define TEST_NUMBER 3.14159265358979323846E8
  31. #endif