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 /liolib.c | |
parent | e907c711c04b3e09164e7654623e1f48a689f5cc (diff) | |
download | lua-78edc241e95d467e2b6c9a26b5311a62c7b04459.tar.gz lua-78edc241e95d467e2b6c9a26b5311a62c7b04459.tar.bz2 lua-78edc241e95d467e2b6c9a26b5311a62c7b04459.zip |
details about debug info.
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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"); |