aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-12-28 11:44:54 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-12-28 11:44:54 -0200
commit766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f (patch)
tree96fbaa15baec33d4f14b27df79778e766ef46f57 /llex.c
parent4c94d8cc2cbeac74ae3618b1322c3f3d3ec166ea (diff)
downloadlua-766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f.tar.gz
lua-766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f.tar.bz2
lua-766e67ef3b2af42f800b281e0fa0f57c7e3d2e3f.zip
to avoid warnings about "typecast" (Visual C++)
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/llex.c b/llex.c
index 941e6b8a..a0b63fe1 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.25 1998/12/03 15:45:15 roberto Exp $ 2** $Id: llex.c,v 1.26 1998/12/27 20:25:20 roberto Exp roberto $
3** Lexical Analizer 3** Lexical Analizer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -61,7 +61,7 @@ void luaX_error (LexState *ls, char *s) {
61 61
62void luaX_token2str (int token, char *s) { 62void luaX_token2str (int token, char *s) {
63 if (token < 255) { 63 if (token < 255) {
64 s[0] = token; 64 s[0] = (char)token;
65 s[1] = '\0'; 65 s[1] = '\0';
66 } 66 }
67 else 67 else
@@ -138,7 +138,7 @@ static void readname (LexState *LS, char *buff)
138 buff[PRAGMASIZE] = 0; 138 buff[PRAGMASIZE] = 0;
139 luaX_syntaxerror(LS, "pragma too long", buff); 139 luaX_syntaxerror(LS, "pragma too long", buff);
140 } 140 }
141 buff[i++] = LS->current; 141 buff[i++] = (char)LS->current;
142 next(LS); 142 next(LS);
143 } 143 }
144 buff[i] = 0; 144 buff[i] = 0;
@@ -344,7 +344,7 @@ int luaX_lex (LexState *LS) {
344 c = 10*c + (LS->current-'0'); 344 c = 10*c + (LS->current-'0');
345 next(LS); 345 next(LS);
346 } while (++i<3 && isdigit(LS->current)); 346 } while (++i<3 && isdigit(LS->current));
347 if (c > (unsigned char)c) 347 if (c != (unsigned char)c)
348 luaX_error(LS, "escape sequence too large"); 348 luaX_error(LS, "escape sequence too large");
349 save(c); 349 save(c);
350 } 350 }