diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 74f5e1d01..ce8f005a2 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 17 01:40:56 1996 Gary Houston + + * 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 * ports.h (scm_port_table): remove file_name member for now, it seems diff --git a/libguile/fports.c b/libguile/fports.c index 9494a87e8..5e7218d1d 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -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)) diff --git a/libguile/gc.c b/libguile/gc.c index a9022bd84..a9125e96c 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -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; diff --git a/libguile/ioext.c b/libguile/ioext.c index bc309ee5f..9f1959c39 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -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; diff --git a/libguile/ports.c b/libguile/ports.c index f2e595417..dba81b757 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -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(); diff --git a/libguile/ports.h b/libguile/ports.h index d5e1b3459..d453073ce 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -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; };