aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lauxlib.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 0a7475b1..0fa745e4 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.9 1998/03/06 16:54:42 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.10 1998/03/06 18:47:42 roberto Exp roberto $
3** Auxiliar functions for building Lua libraries 3** Auxiliar functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -7,6 +7,7 @@
7 7
8#include <stdarg.h> 8#include <stdarg.h>
9#include <stdio.h> 9#include <stdio.h>
10#include <string.h>
10 11
11/* Please Notice: This file uses only the oficial API of Lua 12/* Please Notice: This file uses only the oficial API of Lua
12** Any function declared here could be written as an application 13** Any function declared here could be written as an application
@@ -18,6 +19,14 @@
18 19
19 20
20 21
22int luaL_findstring (char *name, char *list[]) {
23 int i;
24 for (i=0; list[i]; i++)
25 if (strcmp(list[i], name) == 0)
26 return i;
27 return -1; /* name not found */
28}
29
21void luaL_argerror (int numarg, char *extramsg) 30void luaL_argerror (int numarg, char *extramsg)
22{ 31{
23 char *funcname; 32 char *funcname;