* ports.h (scm_port_table): put back file_name, it will be used to
authorGary Houston <ghouston@arglist.com>
Tue, 17 Sep 1996 02:09:50 +0000 (02:09 +0000)
committerGary Houston <ghouston@arglist.com>
Tue, 17 Sep 1996 02:09:50 +0000 (02:09 +0000)
support debugging.  Undo related changes in fports.c, ioext.c,
ports.c, gc.c.

libguile/ChangeLog
libguile/fports.c
libguile/gc.c
libguile/ioext.c
libguile/ports.c
libguile/ports.h

index 74f5e1d..ce8f005 100644 (file)
@@ -1,3 +1,9 @@
+Tue Sep 17 01:40:56 1996  Gary Houston  <ghouston@actrix.gen.nz>
+
+       * ports.h (scm_port_table): put back file_name, it will be used to
+       support debugging.  Undo related changes in fports.c, ioext.c,
+       ports.c, gc.c.
+
 Sun Sep 15 03:58:29 1996  Gary Houston  <ghouston@actrix.gen.nz>
 
        * ports.h (scm_port_table): remove file_name member for now, it seems
index 9494a87..5e7218d 100644 (file)
@@ -185,7 +185,7 @@ scm_open_file (filename, modes)
       if (SCM_BUF0 & (SCM_CAR (port) = scm_tc16_fport | scm_mode_bits (mode)))
        scm_setbuf0 (port);
       SCM_SETSTREAM (port, (SCM)f);
-      /* SCM_PTAB_ENTRY (port)->file_name = scm_makfrom0str (filename); */
+      SCM_PTAB_ENTRY (port)->file_name = scm_makfrom0str (file);
     }
   SCM_ALLOW_INTS;
   return port;
@@ -235,6 +235,7 @@ prinfport (exp, port, writing)
 #endif
 {
   /*
+  perhaps this isn't needed.
   SCM name;
   char * c;
   if (SCM_CLOSEDP (exp))
index a9022bd..a9125e9 100644 (file)
@@ -677,10 +677,8 @@ gc_mark_nimp:
        goto def;
       if (SCM_GC8MARKP (ptr))
        break;
-      /*
-       if (SCM_PTAB_ENTRY(ptr))
-          scm_gc_mark (SCM_PTAB_ENTRY(ptr)->file_name);
-          */
+      if (SCM_PTAB_ENTRY(ptr))
+       scm_gc_mark (SCM_PTAB_ENTRY(ptr)->file_name);
       ptr = (scm_ptobs[i].mark) (ptr);
       goto gc_mark_loop;
       break;
index bc309ee..9f1959c 100644 (file)
@@ -182,7 +182,7 @@ scm_sys_duplicate_port (oldpt, modes)
     if (SCM_BUF0 & (SCM_CAR (newpt) = scm_tc16_fport | scm_mode_bits (SCM_CHARS (modes))))
       scm_setbuf0 (newpt);
     SCM_SETSTREAM (newpt, (SCM)f);
-    /* SCM_PTAB_ENTRY (newpt)->file_name = SCM_PTAB_ENTRY (oldpt)->file_name;*/
+    SCM_PTAB_ENTRY (newpt)->file_name = SCM_PTAB_ENTRY (oldpt)->file_name;
   }
   SCM_ALLOW_INTS;
   return newpt;
index f2e5954..dba81b7 100644 (file)
@@ -380,7 +380,7 @@ scm_add_to_port_table (port)
   scm_port_table[scm_port_table_size]->port = port;
   scm_port_table[scm_port_table_size]->revealed = 0;
   scm_port_table[scm_port_table_size]->stream = 0;
-  /* scm_port_table[scm_port_table_size]->file_name = SCM_BOOL_F;*/
+  scm_port_table[scm_port_table_size]->file_name = SCM_BOOL_F;
   scm_port_table[scm_port_table_size]->line_number = 1;
   scm_port_table[scm_port_table_size]->column_number = 0;
   scm_port_table[scm_port_table_size]->representation = scm_regular_port;
@@ -746,8 +746,6 @@ scm_column_number  (port)
     return SCM_MAKINUM (SCM_COL (p));
 }
 
-/* !!! dubious feature */
-#if 0
 SCM_PROC (s_port_file_name, "port-file-name", 0, 1, 0, scm_port_file_name);
 #ifdef __STDC__
 SCM 
@@ -767,7 +765,6 @@ scm_port_file_name (port)
   else
     return SCM_PTAB_ENTRY (p)->file_name;
 }
-#endif
 
 #ifndef ttyname
 extern char * ttyname();
index d5e1b34..d453073 100644 (file)
@@ -71,11 +71,11 @@ struct scm_port_table
                                 */
 
   SCM stream;
-  /*  SCM file_name; */
+  SCM file_name;               /* debugging support.  */
   int unchr;                   /* pushed back character, if any */
 
-  int line_number;
-  int column_number;
+  int line_number;             /* debugging support.  */
+  int column_number;           /* debugging support.  */
 
   enum scm_port_representation_type representation;
 };