lundump.h 1.2 KB

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