Explorar o código

small changes in the format of debug information.

Roberto Ierusalimschy %!s(int64=30) %!d(string=hai) anos
pai
achega
ebcf546a55
Modificáronse 2 ficheiros con 13 adicións e 8 borrados
  1. 5 4
      iolib.c
  2. 8 4
      table.c

+ 5 - 4
iolib.c

@@ -3,7 +3,7 @@
 ** Input/output library to LUA
 ** Input/output library to LUA
 */
 */
 
 
-char *rcs_iolib="$Id: iolib.c,v 1.23 1995/10/11 20:50:56 roberto Exp roberto $";
+char *rcs_iolib="$Id: iolib.c,v 1.24 1995/10/17 14:12:45 roberto Exp roberto $";
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <ctype.h>
@@ -617,14 +617,15 @@ static void print_message (void)
     lua_funcinfo(func, &filename, &funcname, &objname, &linedefined);
     lua_funcinfo(func, &filename, &funcname, &objname, &linedefined);
     if (objname == NULL)
     if (objname == NULL)
       if (funcname)
       if (funcname)
-        fprintf(stderr, "\t%s\n", funcname);
+        fprintf(stderr, "\t%s", funcname);
       else
       else
       {
       {
         fprintf(stderr, "\tmain of %s\n", filename);
         fprintf(stderr, "\tmain of %s\n", filename);
+        continue;
       }
       }
     else
     else
-      fprintf(stderr, "\t%s:%s\n", objname, funcname);
-/*    fprintf(stderr, "\t(in file: %s)\n", filename); */
+      fprintf(stderr, "\t%s:%s", objname, funcname);
+    fprintf(stderr, "\t(defined in %s)\n", filename);
   }
   }
 }
 }
 
 

+ 8 - 4
table.c

@@ -3,7 +3,7 @@
 ** Module to control static tables
 ** Module to control static tables
 */
 */
 
 
-char *rcs_table="$Id: table.c,v 2.34 1995/10/13 15:16:25 roberto Exp roberto $";
+char *rcs_table="$Id: table.c,v 2.35 1995/10/17 11:58:41 roberto Exp roberto $";
 
 
 #include <string.h>
 #include <string.h>
 
 
@@ -277,12 +277,16 @@ void luaI_funcInfo (struct Object *func, char **filename, char **funcname,
   {
   {
     /* temporario: */
     /* temporario: */
     cfunc = func->value.f;
     cfunc = func->value.f;
-    *filename = "(?)";
-    *objname = 0;
+    *filename = "(C)";
     *linedefined = 0;
     *linedefined = 0;
     *funcname = lua_travsymbol(checkfunc);
     *funcname = lua_travsymbol(checkfunc);
-    if (*funcname == NULL)
+    if (*funcname)
+      *objname = 0;
+    else
+    {
       *funcname = luaI_travfallbacks(checkfunc);
       *funcname = luaI_travfallbacks(checkfunc);
+      *objname = "(FB)";
+    }
   }
   }
 }
 }