diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-20 19:20:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-12-20 19:20:36 -0200 |
commit | 8cb8594a3bcfdc1447aebfcd0ac85db9af5ca490 (patch) | |
tree | 13d09f704662cafa2597e77c92611b468e4741c9 /inout.c | |
parent | fe8338335dfb4bf37e6b164cb55bfcc94ec6563d (diff) | |
download | lua-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.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.14 1994/12/13 15:54:21 roberto Exp roberto $"; | 8 | char *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 */ |
23 | int lua_linenumber; | 23 | Word lua_linenumber; |
24 | int lua_debug; | 24 | Bool lua_debug; |
25 | int lua_debugline = 0; | 25 | Word lua_debugline = 0; |
26 | 26 | ||
27 | 27 | ||
28 | /* Internal variables */ | 28 | /* Internal variables */ |
@@ -34,12 +34,12 @@ int lua_debugline = 0; | |||
34 | typedef struct FuncStackNode { | 34 | typedef 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 | ||
41 | static FuncStackNode *funcStack = NULL; | 41 | static FuncStackNode *funcStack = NULL; |
42 | static int nfuncstack=0; | 42 | static Word nfuncstack=0; |
43 | 43 | ||
44 | static FILE *fp; | 44 | static FILE *fp; |
45 | static char *st; | 45 | static 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 | */ |
122 | void lua_pushfunction (char *file, int function) | 122 | void 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 | } |