lundump.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. ** $Id: lundump.h,v 1.19 2000/04/24 17:32:29 lhf Exp lhf $
  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. Proto* luaU_undump (lua_State* L, ZIO* Z);
  12. #define luaU_undump1 luaU_undump
  13. /* find byte order */
  14. int luaU_endianess (void);
  15. /* definitions for headers of binary files */
  16. #define VERSION 0x40 /* last format change was in 4.0 */
  17. #define VERSION0 0x40 /* last major change was in 4.0 */
  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 xSOURCE "<%d:%.255s>"
  22. #define SOURCE "<%.255s:%d>"
  23. #define IN " in %p " SOURCE
  24. #define INLOC tf,tf->source->str,tf->lineDefined
  25. /* format for numbers in listings and error messages */
  26. #ifndef NUMBER_FMT
  27. #define NUMBER_FMT "%.16g" /* LUA_NUMBER */
  28. #endif
  29. /* a multiple of PI for testing native format */
  30. /* multiplying by 1E8 gives non-trivial integer values */
  31. #define TEST_NUMBER 3.14159265358979323846E8
  32. #endif