Expand file tree
/
Copy pathonelua.c
More file actions
Latest commit
121 lines (106 loc) · 2.18 KB
/
Copy pathonelua.c
File metadata and controls
121 lines (106 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
** Lua core, libraries, and interpreter in a single file.
** Compiling just this file generates a complete Lua stand-alone
** program:
**
** $ gcc -O2 -std=c99 -o lua onelua.c -lm
**
** or
**
** $ gcc -O2 -std=c89 -DLUA_USE_C89 -o lua onelua.c -lm
**
*/
/* default is to build the full interpreter */
#ifndefMAKE_LIB
#ifndefMAKE_LUAC
#ifndefMAKE_LUA
#defineMAKE_LUA
#endif
#endif
#endif
/*
** Choose suitable platform-specific features. Default is no
** platform-specific features. Some of these options may need extra
** libraries such as -ldl -lreadline -lncurses
*/
#if0
#defineLUA_USE_LINUX
#defineLUA_USE_MACOSX
#defineLUA_USE_POSIX
#defineLUA_ANSI
#endif
/* no need to change anything below this line ----------------------------- */
#include"lprefix.h"
#include<assert.h>
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<setjmp.h>
#include<signal.h>
#include<stdarg.h>
#include<stddef.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
/* setup for luaconf.h */
#defineLUA_CORE
#defineLUA_LIB
#defineltable_c
#definelvm_c
#include"luaconf.h"
/* do not export internal symbols */
#undef LUAI_FUNC
#undef LUAI_DDEC
#undef LUAI_DDEF
#defineLUAI_FUNC static
#defineLUAI_DDEC(def) /* empty */
#defineLUAI_DDEF static
/* core -- used by all */
#include"lzio.c"
#include"lctype.c"
#include"lopcodes.c"
#include"lmem.c"
#include"lundump.c"
#include"ldump.c"
#include"lstate.c"
#include"lgc.c"
#include"llex.c"
#include"lcode.c"
#include"lparser.c"
#include"ldebug.c"
#include"lfunc.c"
#include"lobject.c"
#include"ltm.c"
#include"lstring.c"
#include"ltable.c"
#include"ldo.c"
#include"lvm.c"
#include"lapi.c"
/* auxiliary library -- used by all */
#include"lauxlib.c"
/* standard library -- not used by luac */
#ifndefMAKE_LUAC
#include"lbaselib.c"
#include"lcorolib.c"
#include"ldblib.c"
#include"liolib.c"
#include"lmathlib.c"
#include"loadlib.c"
#include"loslib.c"
#include"lstrlib.c"
#include"ltablib.c"
#include"lutf8lib.c"
#include"linit.c"
#endif
/* lua */
#ifdefMAKE_LUA
#include"lua.c"
#endif
/* luac */
#ifdefMAKE_LUAC
#include"luac.c"
#endif