diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-03-05 17:45:01 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-03-05 17:45:01 -0300 |
commit | 78edc241e95d467e2b6c9a26b5311a62c7b04459 (patch) | |
tree | 70a0a7dbbc44c6b3c05adb506100b237e3a99caf | |
parent | e907c711c04b3e09164e7654623e1f48a689f5cc (diff) | |
download | lua-78edc241e95d467e2b6c9a26b5311a62c7b04459.tar.gz lua-78edc241e95d467e2b6c9a26b5311a62c7b04459.tar.bz2 lua-78edc241e95d467e2b6c9a26b5311a62c7b04459.zip |
details about debug info.
-rw-r--r-- | ldo.c | 4 | ||||
-rw-r--r-- | liolib.c | 8 | ||||
-rw-r--r-- | llex.c | 5 |
3 files changed, 9 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.36 1999/02/26 15:48:55 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.37 1999/03/04 21:17:26 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -367,7 +367,7 @@ int lua_dofile (char *filename) { | |||
367 | if (f == NULL) | 367 | if (f == NULL) |
368 | return 2; | 368 | return 2; |
369 | if (filename == NULL) | 369 | if (filename == NULL) |
370 | strcpy(name, "@stdin"); | 370 | strcpy(name, "@(stdin)"); |
371 | else | 371 | else |
372 | sprintf(name, "@%.*s", MAXFILENAME, filename); | 372 | sprintf(name, "@%.*s", MAXFILENAME, filename); |
373 | c = fgetc(f); | 373 | c = fgetc(f); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 1.31 1999/02/22 14:17:24 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 1.32 1999/03/04 21:17:26 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -488,7 +488,9 @@ static void errorfb (void) { | |||
488 | default: { | 488 | default: { |
489 | if (linedefined == 0) | 489 | if (linedefined == 0) |
490 | sprintf(buff+strlen(buff), "main of %.50s", buffchunk); | 490 | sprintf(buff+strlen(buff), "main of %.50s", buffchunk); |
491 | else if (linedefined > 0) | 491 | else if (linedefined < 0) |
492 | sprintf(buff+strlen(buff), "%.50s", buffchunk); | ||
493 | else | ||
492 | sprintf(buff+strlen(buff), "function <%d:%.50s>", | 494 | sprintf(buff+strlen(buff), "function <%d:%.50s>", |
493 | linedefined, buffchunk); | 495 | linedefined, buffchunk); |
494 | chunkname = NULL; | 496 | chunkname = NULL; |
@@ -497,7 +499,7 @@ static void errorfb (void) { | |||
497 | if ((currentline = lua_currentline(func)) > 0) | 499 | if ((currentline = lua_currentline(func)) > 0) |
498 | sprintf(buff+strlen(buff), " at line %d", currentline); | 500 | sprintf(buff+strlen(buff), " at line %d", currentline); |
499 | if (chunkname) | 501 | if (chunkname) |
500 | sprintf(buff+strlen(buff), " [in %.50s]", buffchunk); | 502 | sprintf(buff+strlen(buff), " [%.50s]", buffchunk); |
501 | strcat(buff, "\n"); | 503 | strcat(buff, "\n"); |
502 | } | 504 | } |
503 | func = lua_rawgetglobal("_ALERT"); | 505 | func = lua_rawgetglobal("_ALERT"); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.30 1999/02/25 19:13:56 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.31 1999/03/04 21:17:26 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -48,8 +48,7 @@ void luaX_syntaxerror (LexState *ls, char *s, char *token) { | |||
48 | luaL_chunkid(buff, zname(ls->lex_z), MAXSRC); | 48 | luaL_chunkid(buff, zname(ls->lex_z), MAXSRC); |
49 | if (token[0] == '\0') | 49 | if (token[0] == '\0') |
50 | token = "<eof>"; | 50 | token = "<eof>"; |
51 | luaL_verror("%.100s;\n last token read: `%.50s' " | 51 | luaL_verror("%.100s;\n last token read: `%.50s' at line %d in %.50s", |
52 | "at line %d from %.50s", | ||
53 | s, token, ls->linenumber, buff); | 52 | s, token, ls->linenumber, buff); |
54 | } | 53 | } |
55 | 54 | ||