aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-08 15:09:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-08 15:09:16 -0300
commitb5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17 (patch)
tree9cc4873a1a80cb02137ec54abd21ce0a858b19b7
parent7d57ea70bc975922485d589c8a6d8dedaa0fba02 (diff)
downloadlua-b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17.tar.gz
lua-b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17.tar.bz2
lua-b5b230d95cdf0b7dbe94ec1a5a8433f93ac2de17.zip
fewer #include's in luaconf.h
-rw-r--r--lapi.c3
-rw-r--r--ldo.c3
-rw-r--r--lobject.c3
-rw-r--r--ltable.c3
-rw-r--r--luaconf.h6
-rw-r--r--lvm.c4
6 files changed, 12 insertions, 10 deletions
diff --git a/lapi.c b/lapi.c
index 17868b92..23488256 100644
--- a/lapi.c
+++ b/lapi.c
@@ -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
diff --git a/ldo.c b/ldo.c
index a96cc388..cf1bd65a 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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
diff --git a/lobject.c b/lobject.c
index 65e3153d..71607c34 100644
--- a/lobject.c
+++ b/lobject.c
@@ -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
diff --git a/ltable.c b/ltable.c
index 361facc8..d9c43a7f 100644
--- a/ltable.c
+++ b/ltable.c
@@ -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
diff --git a/luaconf.h b/luaconf.h
index c7734a24..62665d0d 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -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
diff --git a/lvm.c b/lvm.c
index 003e2a43..d2f91ff2 100644
--- a/lvm.c
+++ b/lvm.c
@@ -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