Browse Source

fewer #include's in luaconf.h

Roberto Ierusalimschy 20 years ago
parent
commit
b5b230d95c
6 changed files with 12 additions and 10 deletions
  1. 2 1
      lapi.c
  2. 2 1
      ldo.c
  3. 2 1
      lobject.c
  4. 2 1
      ltable.c
  5. 1 5
      luaconf.h
  6. 3 1
      lvm.c

+ 2 - 1
lapi.c

@@ -1,11 +1,12 @@
 /*
-** $Id: lapi.c,v 2.27 2005/02/18 12:40:02 roberto Exp roberto $
+** $Id: lapi.c,v 2.28 2005/02/23 17:30:22 roberto Exp roberto $
 ** Lua API
 ** See Copyright Notice in lua.h
 */
 
 
 #include <assert.h>
+#include <math.h>
 #include <stdarg.h>
 #include <string.h>
 

+ 2 - 1
ldo.c

@@ -1,10 +1,11 @@
 /*
-** $Id: ldo.c,v 2.13 2004/12/03 20:35:33 roberto Exp roberto $
+** $Id: ldo.c,v 2.14 2005/02/18 12:40:02 roberto Exp roberto $
 ** Stack and Call structure of Lua
 ** See Copyright Notice in lua.h
 */
 
 
+#include <setjmp.h>
 #include <stdlib.h>
 #include <string.h>
 

+ 2 - 1
lobject.c

@@ -1,11 +1,12 @@
 /*
-** $Id: lobject.c,v 2.7 2004/11/24 19:16:03 roberto Exp roberto $
+** $Id: lobject.c,v 2.8 2005/01/10 18:17:39 roberto Exp roberto $
 ** Some generic functions over Lua objects
 ** See Copyright Notice in lua.h
 */
 
 #include <ctype.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 

+ 2 - 1
ltable.c

@@ -1,5 +1,5 @@
 /*
-** $Id: ltable.c,v 2.14 2005/01/05 18:20:51 roberto Exp roberto $
+** $Id: ltable.c,v 2.15 2005/01/10 18:17:39 roberto Exp roberto $
 ** Lua tables (hash)
 ** See Copyright Notice in lua.h
 */
@@ -18,6 +18,7 @@
 ** Hence even when the load factor reaches 100%, performance remains good.
 */
 
+#include <math.h>
 #include <string.h>
 
 #define ltable_c

+ 1 - 5
luaconf.h

@@ -1,5 +1,5 @@
 /*
-** $Id: luaconf.h,v 1.31 2005/03/08 13:27:36 roberto Exp roberto $
+** $Id: luaconf.h,v 1.32 2005/03/08 18:00:16 roberto Exp roberto $
 ** Configuration file for Lua
 ** See Copyright Notice in lua.h
 */
@@ -223,7 +223,6 @@ __inline int l_lrint (double flt)
 
 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199900L)
 /* on machines compliant with C99, you can try `lrint' */
-#include <math.h>
 #define lua_number2int(i,d)	((i)=lrint(d))
 
 #else
@@ -237,7 +236,6 @@ __inline int l_lrint (double flt)
 
 
 /* function to convert a lua_Number to a string */
-#include <stdio.h>
 #define lua_number2str(s,n)	sprintf((s), LUA_NUMBER_FMT, (n))
 /* maximum size of previous conversion */
 #define MAX_NUMBER2STR	32 /* 16 digits, sign, point and \0  (+ some extra) */
@@ -260,7 +258,6 @@ __inline int l_lrint (double flt)
 #define num_eq(a,b)	((a)==(b))
 #define num_lt(a,b)	((a)<(b))
 #define num_le(a,b)	((a)<=(b))
-#include <math.h>
 #define num_mod(a,b)	((a) - floor((a)/(b))*(b))
 #define num_pow(a,b)	pow(a,b)
 
@@ -277,7 +274,6 @@ __inline int l_lrint (double flt)
 */
 #ifndef __cplusplus
 /* default handling with long jumps */
-#include <setjmp.h>
 #define L_THROW(L,c)	longjmp((c)->b, 1)
 #define L_TRY(L,c,a)	if (setjmp((c)->b) == 0) { a }
 #define l_jmpbuf	jmp_buf

+ 3 - 1
lvm.c

@@ -1,10 +1,12 @@
 /*
-** $Id: lvm.c,v 2.28 2005/03/07 18:27:34 roberto Exp roberto $
+** $Id: lvm.c,v 2.29 2005/03/08 18:00:16 roberto Exp roberto $
 ** Lua virtual machine
 ** See Copyright Notice in lua.h
 */
 
 
+#include <math.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>