From 72f67fa810715220c1134a345903146569417190 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 22 Dec 1993 19:15:16 -0200 Subject: eliminacao da funcao findenclosedconstant, cuja tarefa agora e' realizada pelo analizador lexico --- table.c | 53 +---------------------------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) (limited to 'table.c') diff --git a/table.c b/table.c index 8b425e2f..62ad696a 100644 --- a/table.c +++ b/table.c @@ -3,7 +3,7 @@ ** Module to control static tables */ -char *rcs_table="$Id: $"; +char *rcs_table="$Id: table.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $"; #include #include @@ -115,57 +115,6 @@ int lua_findsymbol (char *s) return lua_ntable++; } -/* -** Given a constant string, eliminate its delimeters (" or '), search it at -** constant table and return its index. If not found, allocate at end of -** the table, checking oveflow and return its index. -** -** For each allocation, the function allocate a extra char to be used to -** mark used string (it's necessary to deal with constant and string -** uniformily). The function store at the table the second position allocated, -** that represents the beginning of the real string. On error, return -1. -** -*/ -int lua_findenclosedconstant (char *s) -{ - int i, j, l=strlen(s); - char *c = calloc (l, sizeof(char)); /* make a copy */ - - c++; /* create mark space */ - - /* introduce scape characters */ - for (i=1,j=0; i= MAXCONSTANT-1) - { - lua_error ("lua: constant string table overflow"); - return -1; - } - lua_constant[lua_nconstant++] = c; - return (lua_nconstant-1); -} - /* ** Given a constant string, search it at constant table and return its index. ** If not found, allocate at end of the table, checking oveflow and return -- cgit v1.2.3-55-g6feb