lundump.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. ** $Id: lundump.h,v 1.17 1999/12/02 18: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 SOURCE "<%.255s:%d>"
  24. #define IN " in %p " SOURCE
  25. #define INLOC tf,tf->source->str,tf->lineDefined
  26. /* format for numbers in listings and error messages */
  27. #ifndef NUMBER_FMT
  28. #define NUMBER_FMT "%.16g" /* LUA_NUMBER */
  29. #endif
  30. /* a multiple of PI for testing native format */
  31. /* multiplying by 1E8 gives non-trivial integer values */
  32. #define TEST_NUMBER 3.14159265358979323846E8
  33. #endif