small corrections to avoid warnings.
This commit is contained in:
20
fallback.c
20
fallback.c
@@ -3,7 +3,7 @@
|
|||||||
** TecCGraf - PUC-Rio
|
** TecCGraf - PUC-Rio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_fallback="$Id: fallback.c,v 1.11 1995/02/06 19:34:03 roberto Exp roberto $";
|
char *rcs_fallback="$Id: fallback.c,v 1.12 1995/05/02 18:43:03 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -28,15 +28,15 @@ static void funcFB (void);
|
|||||||
** Warning: This list must be in the same order as the #define's
|
** Warning: This list must be in the same order as the #define's
|
||||||
*/
|
*/
|
||||||
struct FB luaI_fallBacks[] = {
|
struct FB luaI_fallBacks[] = {
|
||||||
{"error", {LUA_T_CFUNCTION, errorFB}},
|
{"error", {LUA_T_CFUNCTION, {errorFB}}},
|
||||||
{"index", {LUA_T_CFUNCTION, indexFB}},
|
{"index", {LUA_T_CFUNCTION, {indexFB}}},
|
||||||
{"gettable", {LUA_T_CFUNCTION, gettableFB}},
|
{"gettable", {LUA_T_CFUNCTION, {gettableFB}}},
|
||||||
{"arith", {LUA_T_CFUNCTION, arithFB}},
|
{"arith", {LUA_T_CFUNCTION, {arithFB}}},
|
||||||
{"order", {LUA_T_CFUNCTION, orderFB}},
|
{"order", {LUA_T_CFUNCTION, {orderFB}}},
|
||||||
{"concat", {LUA_T_CFUNCTION, concatFB}},
|
{"concat", {LUA_T_CFUNCTION, {concatFB}}},
|
||||||
{"settable", {LUA_T_CFUNCTION, gettableFB}},
|
{"settable", {LUA_T_CFUNCTION, {gettableFB}}},
|
||||||
{"gc", {LUA_T_CFUNCTION, GDFB}},
|
{"gc", {LUA_T_CFUNCTION, {GDFB}}},
|
||||||
{"function", {LUA_T_CFUNCTION, funcFB}}
|
{"function", {LUA_T_CFUNCTION, {funcFB}}}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB))
|
#define N_FB (sizeof(luaI_fallBacks)/sizeof(struct FB))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
** Mathematics library to LUA
|
** Mathematics library to LUA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_mathlib="$Id: mathlib.c,v 1.8 1995/01/04 18:49:54 roberto Exp $";
|
char *rcs_mathlib="$Id: mathlib.c,v 1.9 1995/02/06 19:36:43 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <stdio.h> /* NULL */
|
#include <stdio.h> /* NULL */
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -11,7 +11,9 @@ char *rcs_mathlib="$Id: mathlib.c,v 1.8 1995/01/04 18:49:54 roberto Exp $";
|
|||||||
#include "lualib.h"
|
#include "lualib.h"
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
|
#ifndef PI
|
||||||
#define PI 3.14159265358979323846
|
#define PI 3.14159265358979323846
|
||||||
|
#endif
|
||||||
#define TODEGREE(a) ((a)*180.0/PI)
|
#define TODEGREE(a) ((a)*180.0/PI)
|
||||||
#define TORAD(a) ((a)*PI/180.0)
|
#define TORAD(a) ((a)*PI/180.0)
|
||||||
|
|
||||||
|
|||||||
4
opcode.c
4
opcode.c
@@ -3,7 +3,7 @@
|
|||||||
** TecCGraf - PUC-Rio
|
** TecCGraf - PUC-Rio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_opcode="$Id: opcode.c,v 3.37 1995/05/02 18:43:03 roberto Exp roberto $";
|
char *rcs_opcode="$Id: opcode.c,v 3.38 1995/05/16 17:23:58 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -446,7 +446,7 @@ int lua_dostring (char *string)
|
|||||||
*/
|
*/
|
||||||
lua_Object lua_setfallback (char *name, lua_CFunction fallback)
|
lua_Object lua_setfallback (char *name, lua_CFunction fallback)
|
||||||
{
|
{
|
||||||
static Object func = {LUA_T_CFUNCTION, luaI_setfallback};
|
static Object func = {LUA_T_CFUNCTION, {luaI_setfallback}};
|
||||||
adjustC(0);
|
adjustC(0);
|
||||||
lua_pushstring(name);
|
lua_pushstring(name);
|
||||||
lua_pushcfunction(fallback);
|
lua_pushcfunction(fallback);
|
||||||
|
|||||||
Reference in New Issue
Block a user