diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-02 14:03:33 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-02 14:03:33 -0300 |
commit | 3ec4f4eb86f1644c82d6a140b889de2c2a4f6d6a (patch) | |
tree | 68bdbb5cc932620817cf504b5b2e4ab327577c17 | |
parent | 367139c6d952272cff1f114e7323299478681ffd (diff) | |
download | lua-3ec4f4eb86f1644c82d6a140b889de2c2a4f6d6a.tar.gz lua-3ec4f4eb86f1644c82d6a140b889de2c2a4f6d6a.tar.bz2 lua-3ec4f4eb86f1644c82d6a140b889de2c2a4f6d6a.zip |
small corrections to avoid warnings.
-rw-r--r-- | fallback.c | 20 | ||||
-rw-r--r-- | mathlib.c | 4 | ||||
-rw-r--r-- | opcode.c | 4 |
3 files changed, 15 insertions, 13 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_fallback="$Id: fallback.c,v 1.11 1995/02/06 19:34:03 roberto Exp roberto $"; | 6 | char *rcs_fallback="$Id: fallback.c,v 1.12 1995/05/02 18:43:03 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -28,15 +28,15 @@ static void funcFB (void); | |||
28 | ** Warning: This list must be in the same order as the #define's | 28 | ** Warning: This list must be in the same order as the #define's |
29 | */ | 29 | */ |
30 | struct FB luaI_fallBacks[] = { | 30 | struct FB luaI_fallBacks[] = { |
31 | {"error", {LUA_T_CFUNCTION, errorFB}}, | 31 | {"error", {LUA_T_CFUNCTION, {errorFB}}}, |
32 | {"index", {LUA_T_CFUNCTION, indexFB}}, | 32 | {"index", {LUA_T_CFUNCTION, {indexFB}}}, |
33 | {"gettable", {LUA_T_CFUNCTION, gettableFB}}, | 33 | {"gettable", {LUA_T_CFUNCTION, {gettableFB}}}, |
34 | {"arith", {LUA_T_CFUNCTION, arithFB}}, | 34 | {"arith", {LUA_T_CFUNCTION, {arithFB}}}, |
35 | {"order", {LUA_T_CFUNCTION, orderFB}}, | 35 | {"order", {LUA_T_CFUNCTION, {orderFB}}}, |
36 | {"concat", {LUA_T_CFUNCTION, concatFB}}, | 36 | {"concat", {LUA_T_CFUNCTION, {concatFB}}}, |
37 | {"settable", {LUA_T_CFUNCTION, gettableFB}}, | 37 | {"settable", {LUA_T_CFUNCTION, {gettableFB}}}, |
38 | {"gc", {LUA_T_CFUNCTION, GDFB}}, | 38 | {"gc", {LUA_T_CFUNCTION, {GDFB}}}, |
39 | {"function", {LUA_T_CFUNCTION, funcFB}} | 39 | {"function", {LUA_T_CFUNCTION, {funcFB}}} |
40 | }; | 40 | }; |
41 | 41 | ||
42 | #define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB)) | 42 | #define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB)) |
@@ -3,7 +3,7 @@ | |||
3 | ** Mathematics library to LUA | 3 | ** Mathematics library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_mathlib="$Id: mathlib.c,v 1.8 1995/01/04 18:49:54 roberto Exp $"; | 6 | char *rcs_mathlib="$Id: mathlib.c,v 1.9 1995/02/06 19:36:43 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> /* NULL */ | 8 | #include <stdio.h> /* NULL */ |
9 | #include <math.h> | 9 | #include <math.h> |
@@ -11,7 +11,9 @@ char *rcs_mathlib="$Id: mathlib.c,v 1.8 1995/01/04 18:49:54 roberto Exp $"; | |||
11 | #include "lualib.h" | 11 | #include "lualib.h" |
12 | #include "lua.h" | 12 | #include "lua.h" |
13 | 13 | ||
14 | #ifndef PI | ||
14 | #define PI 3.14159265358979323846 | 15 | #define PI 3.14159265358979323846 |
16 | #endif | ||
15 | #define TODEGREE(a) ((a)*180.0/PI) | 17 | #define TODEGREE(a) ((a)*180.0/PI) |
16 | #define TORAD(a) ((a)*PI/180.0) | 18 | #define TORAD(a) ((a)*PI/180.0) |
17 | 19 | ||
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 3.37 1995/05/02 18:43:03 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.38 1995/05/16 17:23:58 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
@@ -446,7 +446,7 @@ int lua_dostring (char *string) | |||
446 | */ | 446 | */ |
447 | lua_Object lua_setfallback (char *name, lua_CFunction fallback) | 447 | lua_Object lua_setfallback (char *name, lua_CFunction fallback) |
448 | { | 448 | { |
449 | static Object func = {LUA_T_CFUNCTION, luaI_setfallback}; | 449 | static Object func = {LUA_T_CFUNCTION, {luaI_setfallback}}; |
450 | adjustC(0); | 450 | adjustC(0); |
451 | lua_pushstring(name); | 451 | lua_pushstring(name); |
452 | lua_pushcfunction(fallback); | 452 | lua_pushcfunction(fallback); |