summaryrefslogtreecommitdiff
path: root/inout.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-12-20 19:20:36 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-12-20 19:20:36 -0200
commit8cb8594a3bcfdc1447aebfcd0ac85db9af5ca490 (patch)
tree13d09f704662cafa2597e77c92611b468e4741c9 /inout.c
parentfe8338335dfb4bf37e6b164cb55bfcc94ec6563d (diff)
downloadlua-8cb8594a3bcfdc1447aebfcd0ac85db9af5ca490.tar.gz
lua-8cb8594a3bcfdc1447aebfcd0ac85db9af5ca490.tar.bz2
lua-8cb8594a3bcfdc1447aebfcd0ac85db9af5ca490.zip
better control of integer types and their limits
Diffstat (limited to 'inout.c')
-rw-r--r--inout.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/inout.c b/inout.c
index e782045d..b2a50449 100644
--- a/inout.c
+++ b/inout.c
@@ -5,7 +5,7 @@
5** Also provides some predefined lua functions. 5** Also provides some predefined lua functions.
6*/ 6*/
7 7
8char *rcs_inout="$Id: inout.c,v 2.14 1994/12/13 15:54:21 roberto Exp roberto $"; 8char *rcs_inout="$Id: inout.c,v 2.15 1994/12/16 15:55:04 roberto Exp roberto $";
9 9
10#include <stdio.h> 10#include <stdio.h>
11#include <stdlib.h> 11#include <stdlib.h>
@@ -20,9 +20,9 @@ char *rcs_inout="$Id: inout.c,v 2.14 1994/12/13 15:54:21 roberto Exp roberto $";
20#include "lua.h" 20#include "lua.h"
21 21
22/* Exported variables */ 22/* Exported variables */
23int lua_linenumber; 23Word lua_linenumber;
24int lua_debug; 24Bool lua_debug;
25int lua_debugline = 0; 25Word lua_debugline = 0;
26 26
27 27
28/* Internal variables */ 28/* Internal variables */
@@ -34,12 +34,12 @@ int lua_debugline = 0;
34typedef struct FuncStackNode { 34typedef struct FuncStackNode {
35 struct FuncStackNode *next; 35 struct FuncStackNode *next;
36 char *file; 36 char *file;
37 int function; 37 Word function;
38 int line; 38 Word line;
39} FuncStackNode; 39} FuncStackNode;
40 40
41static FuncStackNode *funcStack = NULL; 41static FuncStackNode *funcStack = NULL;
42static int nfuncstack=0; 42static Word nfuncstack=0;
43 43
44static FILE *fp; 44static FILE *fp;
45static char *st; 45static char *st;
@@ -119,7 +119,7 @@ void lua_closestring (void)
119** Called to execute SETFUNCTION opcode, this function pushs a function into 119** Called to execute SETFUNCTION opcode, this function pushs a function into
120** function stack. 120** function stack.
121*/ 121*/
122void lua_pushfunction (char *file, int function) 122void lua_pushfunction (char *file, Word function)
123{ 123{
124 FuncStackNode *newNode; 124 FuncStackNode *newNode;
125 if (nfuncstack++ >= MAXFUNCSTACK) 125 if (nfuncstack++ >= MAXFUNCSTACK)
@@ -165,8 +165,8 @@ void lua_reportbug (char *s)
165 do 165 do
166 { 166 {
167 sprintf (strchr(msg,0), 167 sprintf (strchr(msg,0),
168 "\t-> function \"%s\" at file \"%s\":%d\n", 168 "\t-> function \"%s\" at file \"%s\":%u\n",
169 lua_constant[func->function]->str, func->file, line); 169 lua_constant[func->function]->str, func->file, line);
170 line = func->line; 170 line = func->line;
171 func = func->next; 171 func = func->next;
172 lua_popfunction(); 172 lua_popfunction();
@@ -175,7 +175,7 @@ void lua_reportbug (char *s)
175 else 175 else
176 { 176 {
177 sprintf (strchr(msg,0), 177 sprintf (strchr(msg,0),
178 "\n\tin statement begining at line %d of file \"%s\"", 178 "\n\tin statement begining at line %u of file \"%s\"",
179 lua_debugline, lua_filename()); 179 lua_debugline, lua_filename());
180 } 180 }
181 } 181 }