diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-08 15:09:16 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-08 15:09:16 -0300 |
commit | b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17 (patch) | |
tree | 9cc4873a1a80cb02137ec54abd21ce0a858b19b7 | |
parent | 7d57ea70bc975922485d589c8a6d8dedaa0fba02 (diff) | |
download | lua-b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17.tar.gz lua-b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17.tar.bz2 lua-b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17.zip |
fewer #include's in luaconf.h
-rw-r--r-- | lapi.c | 3 | ||||
-rw-r--r-- | ldo.c | 3 | ||||
-rw-r--r-- | lobject.c | 3 | ||||
-rw-r--r-- | ltable.c | 3 | ||||
-rw-r--r-- | luaconf.h | 6 | ||||
-rw-r--r-- | lvm.c | 4 |
6 files changed, 12 insertions, 10 deletions
@@ -1,11 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.27 2005/02/18 12:40:02 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.28 2005/02/23 17:30:22 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
6 | 6 | ||
7 | 7 | ||
8 | #include <assert.h> | 8 | #include <assert.h> |
9 | #include <math.h> | ||
9 | #include <stdarg.h> | 10 | #include <stdarg.h> |
10 | #include <string.h> | 11 | #include <string.h> |
11 | 12 | ||
@@ -1,10 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.13 2004/12/03 20:35:33 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.14 2005/02/18 12:40:02 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
6 | 6 | ||
7 | 7 | ||
8 | #include <setjmp.h> | ||
8 | #include <stdlib.h> | 9 | #include <stdlib.h> |
9 | #include <string.h> | 10 | #include <string.h> |
10 | 11 | ||
@@ -1,11 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 2.7 2004/11/24 19:16:03 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.8 2005/01/10 18:17:39 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <ctype.h> | 7 | #include <ctype.h> |
8 | #include <stdarg.h> | 8 | #include <stdarg.h> |
9 | #include <stdio.h> | ||
9 | #include <stdlib.h> | 10 | #include <stdlib.h> |
10 | #include <string.h> | 11 | #include <string.h> |
11 | 12 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.14 2005/01/05 18:20:51 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.15 2005/01/10 18:17:39 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -18,6 +18,7 @@ | |||
18 | ** Hence even when the load factor reaches 100%, performance remains good. | 18 | ** Hence even when the load factor reaches 100%, performance remains good. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <math.h> | ||
21 | #include <string.h> | 22 | #include <string.h> |
22 | 23 | ||
23 | #define ltable_c | 24 | #define ltable_c |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.31 2005/03/08 13:27:36 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.32 2005/03/08 18:00:16 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -223,7 +223,6 @@ __inline int l_lrint (double flt) | |||
223 | 223 | ||
224 | #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199900L) | 224 | #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199900L) |
225 | /* on machines compliant with C99, you can try `lrint' */ | 225 | /* on machines compliant with C99, you can try `lrint' */ |
226 | #include <math.h> | ||
227 | #define lua_number2int(i,d) ((i)=lrint(d)) | 226 | #define lua_number2int(i,d) ((i)=lrint(d)) |
228 | 227 | ||
229 | #else | 228 | #else |
@@ -237,7 +236,6 @@ __inline int l_lrint (double flt) | |||
237 | 236 | ||
238 | 237 | ||
239 | /* function to convert a lua_Number to a string */ | 238 | /* function to convert a lua_Number to a string */ |
240 | #include <stdio.h> | ||
241 | #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) | 239 | #define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) |
242 | /* maximum size of previous conversion */ | 240 | /* maximum size of previous conversion */ |
243 | #define MAX_NUMBER2STR 32 /* 16 digits, sign, point and \0 (+ some extra) */ | 241 | #define MAX_NUMBER2STR 32 /* 16 digits, sign, point and \0 (+ some extra) */ |
@@ -260,7 +258,6 @@ __inline int l_lrint (double flt) | |||
260 | #define num_eq(a,b) ((a)==(b)) | 258 | #define num_eq(a,b) ((a)==(b)) |
261 | #define num_lt(a,b) ((a)<(b)) | 259 | #define num_lt(a,b) ((a)<(b)) |
262 | #define num_le(a,b) ((a)<=(b)) | 260 | #define num_le(a,b) ((a)<=(b)) |
263 | #include <math.h> | ||
264 | #define num_mod(a,b) ((a) - floor((a)/(b))*(b)) | 261 | #define num_mod(a,b) ((a) - floor((a)/(b))*(b)) |
265 | #define num_pow(a,b) pow(a,b) | 262 | #define num_pow(a,b) pow(a,b) |
266 | 263 | ||
@@ -277,7 +274,6 @@ __inline int l_lrint (double flt) | |||
277 | */ | 274 | */ |
278 | #ifndef __cplusplus | 275 | #ifndef __cplusplus |
279 | /* default handling with long jumps */ | 276 | /* default handling with long jumps */ |
280 | #include <setjmp.h> | ||
281 | #define L_THROW(L,c) longjmp((c)->b, 1) | 277 | #define L_THROW(L,c) longjmp((c)->b, 1) |
282 | #define L_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } | 278 | #define L_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } |
283 | #define l_jmpbuf jmp_buf | 279 | #define l_jmpbuf jmp_buf |
@@ -1,10 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.28 2005/03/07 18:27:34 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.29 2005/03/08 18:00:16 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
6 | 6 | ||
7 | 7 | ||
8 | #include <math.h> | ||
9 | #include <stdio.h> | ||
8 | #include <stdlib.h> | 10 | #include <stdlib.h> |
9 | #include <string.h> | 11 | #include <string.h> |
10 | 12 | ||