first implementation of "$if";

new function "findstring" (useful in good places)
This commit is contained in:
Roberto Ierusalimschy
1997-04-07 11:48:53 -03:00
parent 00050b8a6b
commit c9e3d32182
6 changed files with 139 additions and 73 deletions

View File

@@ -1,13 +1,25 @@
char *rcs_auxlib="$Id: auxlib.c,v 1.2 1997/03/18 15:30:50 roberto Exp roberto $";
char *rcs_auxlib="$Id: auxlib.c,v 1.3 1997/04/06 14:08:08 roberto Exp roberto $";
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "lua.h"
#include "auxlib.h"
#include "luadebug.h"
int luaI_findstring (char *name, char *list[])
{
int i;
for (i=0; list[i]; i++)
if (strcmp(list[i], name) == 0)
return i;
return -1; /* name not found */
}
void luaL_arg_check(int cond, int numarg, char *extramsg)
{
char *funcname;