aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-07-18 11:34:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-07-18 11:34:45 -0300
commit5ba556d27a0114d43941335fab4968c51dd1cef5 (patch)
tree1e1749cfd73a4e23ada67f530b3fe89da8511f70
parent81dd13f4c6a70f08d83f7b7360e4e15cf79dd573 (diff)
downloadlua-5ba556d27a0114d43941335fab4968c51dd1cef5.tar.gz
lua-5ba556d27a0114d43941335fab4968c51dd1cef5.tar.bz2
lua-5ba556d27a0114d43941335fab4968c51dd1cef5.zip
using curly brackets to mark blocks of '#if/#else/#endif's
-rw-r--r--luaconf.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/luaconf.h b/luaconf.h
index ace3adae..3755e7c7 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.138 2010/05/27 12:06:42 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.139 2010/05/28 14:27:07 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*/
@@ -76,7 +76,7 @@
76** hierarchy or if you want to install your libraries in 76** hierarchy or if you want to install your libraries in
77** non-conventional directories. 77** non-conventional directories.
78*/ 78*/
79#if defined(_WIN32) 79#if defined(_WIN32) /* { */
80/* 80/*
81** In Windows, any exclamation mark ('!') in the path is replaced by the 81** In Windows, any exclamation mark ('!') in the path is replaced by the
82** path of the directory of the executable file of the current process. 82** path of the directory of the executable file of the current process.
@@ -89,7 +89,7 @@
89#define LUA_CPATH_DEFAULT \ 89#define LUA_CPATH_DEFAULT \
90 LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll" 90 LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll"
91 91
92#else /* _WIN32 */ 92#else /* }{ */
93#define LUA_ROOT "/usr/local/" 93#define LUA_ROOT "/usr/local/"
94#define LUA_LDIR LUA_ROOT "share/lua/5.2/" 94#define LUA_LDIR LUA_ROOT "share/lua/5.2/"
95#define LUA_CDIR LUA_ROOT "lib/lua/5.2/" 95#define LUA_CDIR LUA_ROOT "lib/lua/5.2/"
@@ -98,7 +98,7 @@
98 LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua" 98 LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua"
99#define LUA_CPATH_DEFAULT \ 99#define LUA_CPATH_DEFAULT \
100 LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" 100 LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so"
101#endif /* _WIN32 */ 101#endif /* } */
102 102
103 103
104/* 104/*
@@ -122,19 +122,19 @@
122** the libraries, you may want to use the following definition (define 122** the libraries, you may want to use the following definition (define
123** LUA_BUILD_AS_DLL to get it). 123** LUA_BUILD_AS_DLL to get it).
124*/ 124*/
125#if defined(LUA_BUILD_AS_DLL) 125#if defined(LUA_BUILD_AS_DLL) /* { */
126 126
127#if defined(LUA_CORE) || defined(LUA_LIB) 127#if defined(LUA_CORE) || defined(LUA_LIB) /* { */
128#define LUA_API __declspec(dllexport) 128#define LUA_API __declspec(dllexport)
129#else 129#else /* }{ */
130#define LUA_API __declspec(dllimport) 130#define LUA_API __declspec(dllimport)
131#endif 131#endif /* } */
132 132
133#else /* LUA_BUILD_AS_DLL */ 133#else /* }{ */
134 134
135#define LUA_API extern 135#define LUA_API extern
136 136
137#endif /* LUA_BUILD_AS_DLL */ 137#endif /* } */
138 138
139 139
140/* more often than not the libs go together with the core */ 140/* more often than not the libs go together with the core */
@@ -156,7 +156,7 @@
156** give a warning about it. To avoid these warnings, change to the 156** give a warning about it. To avoid these warnings, change to the
157** default definition. 157** default definition.
158*/ 158*/
159#if defined(luaall_c) 159#if defined(luaall_c) /* { */
160#define LUAI_FUNC static 160#define LUAI_FUNC static
161#define LUAI_DDEC static 161#define LUAI_DDEC static
162#define LUAI_DDEF static 162#define LUAI_DDEF static
@@ -167,11 +167,11 @@
167#define LUAI_DDEC LUAI_FUNC 167#define LUAI_DDEC LUAI_FUNC
168#define LUAI_DDEF /* empty */ 168#define LUAI_DDEF /* empty */
169 169
170#else /* luaall_c */ 170#else /* }{ */
171#define LUAI_FUNC extern 171#define LUAI_FUNC extern
172#define LUAI_DDEC extern 172#define LUAI_DDEC extern
173#define LUAI_DDEF /* empty */ 173#define LUAI_DDEF /* empty */
174#endif /* luaall_c */ 174#endif /* } */
175 175
176 176
177 177
@@ -283,14 +283,14 @@
283** your machine. Probably you do not need to change this. 283** your machine. Probably you do not need to change this.
284*/ 284*/
285/* avoid overflows in comparison */ 285/* avoid overflows in comparison */
286#if INT_MAX-20 < 32760 286#if INT_MAX-20 < 32760 /* { */
287#define LUAI_BITSINT 16 287#define LUAI_BITSINT 16
288#elif INT_MAX > 2147483640L 288#elif INT_MAX > 2147483640L /* }{ */
289/* int has at least 32 bits */ 289/* int has at least 32 bits */
290#define LUAI_BITSINT 32 290#define LUAI_BITSINT 32
291#else 291#else /* }{ */
292#error "you must define LUA_BITSINT with number of bits in an integer" 292#error "you must define LUA_BITSINT with number of bits in an integer"
293#endif 293#endif /* } */
294 294
295 295
296/* 296/*
@@ -303,16 +303,16 @@
303** good enough for your machine. Probably you do not need to change 303** good enough for your machine. Probably you do not need to change
304** this. 304** this.
305*/ 305*/
306#if LUAI_BITSINT >= 32 306#if LUAI_BITSINT >= 32 /* { */
307#define LUA_INT32 int 307#define LUA_INT32 int
308#define LUAI_UMEM size_t 308#define LUAI_UMEM size_t
309#define LUAI_MEM ptrdiff_t 309#define LUAI_MEM ptrdiff_t
310#else 310#else /* }{ */
311/* 16-bit ints */ 311/* 16-bit ints */
312#define LUA_INT32 long 312#define LUA_INT32 long
313#define LUAI_UMEM unsigned long 313#define LUAI_UMEM unsigned long
314#define LUAI_MEM long 314#define LUAI_MEM long
315#endif 315#endif /* } */
316 316
317 317
318/* 318/*
@@ -438,17 +438,17 @@
438 438
439/* On a Pentium, resort to a trick */ 439/* On a Pentium, resort to a trick */
440#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \ 440#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \
441 (defined(__i386) || defined (_M_IX86) || defined(__i386__)) 441 (defined(__i386) || defined (_M_IX86) || defined(__i386__)) /* { */
442 442
443/* On a Microsoft compiler, use assembler */ 443/* On a Microsoft compiler, use assembler */
444#if defined(_MSC_VER) 444#if defined(_MSC_VER) /* { */
445 445
446#define lua_number2int(i,n) __asm {__asm fld n __asm fistp i} 446#define lua_number2int(i,n) __asm {__asm fld n __asm fistp i}
447#define lua_number2integer(i,n) lua_number2int(i, n) 447#define lua_number2integer(i,n) lua_number2int(i, n)
448#define lua_number2uint(i,n) \ 448#define lua_number2uint(i,n) \
449 {__int64 l; __asm {__asm fld n __asm fistp l} i = (unsigned int)l;} 449 {__int64 l; __asm {__asm fld n __asm fistp l} i = (unsigned int)l;}
450 450
451#else /* _MSC_VER */ 451#else /* }{ */
452/* the next trick should work on any Pentium, but sometimes clashes 452/* the next trick should work on any Pentium, but sometimes clashes
453 with a DirectX idiosyncrasy */ 453 with a DirectX idiosyncrasy */
454 454
@@ -458,16 +458,16 @@ union luai_Cast { double l_d; long l_l; };
458#define lua_number2integer(i,n) lua_number2int(i, n) 458#define lua_number2integer(i,n) lua_number2int(i, n)
459#define lua_number2uint(i,n) lua_number2int(i, n) 459#define lua_number2uint(i,n) lua_number2int(i, n)
460 460
461#endif /* _MSC_VER */ 461#endif /* } */
462 462
463 463
464#else /* LUA_NUMBER_DOUBLE ... (Pentium) */ 464#else /* }{ */
465/* this option always works, but may be slow */ 465/* this option always works, but may be slow */
466#define lua_number2int(i,n) ((i)=(int)(n)) 466#define lua_number2int(i,n) ((i)=(int)(n))
467#define lua_number2integer(i,n) ((i)=(LUA_INTEGER)(n)) 467#define lua_number2integer(i,n) ((i)=(LUA_INTEGER)(n))
468#define lua_number2uint(i,n) ((i)=(unsigned LUA_INT32)(n)) 468#define lua_number2uint(i,n) ((i)=(unsigned LUA_INT32)(n))
469 469
470#endif /* LUA_NUMBER_DOUBLE ... (Pentium) */ 470#endif /* } */
471 471
472 472
473/* on several machines, coercion from unsigned to double is too slow, 473/* on several machines, coercion from unsigned to double is too slow,