[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile ports.h ports.c ioext...
From: |
Marius Vollmer |
Subject: |
guile/guile-core/libguile ports.h ports.c ioext... |
Date: |
Sun, 26 Aug 2001 14:54:11 -0700 |
CVSROOT: /cvs
Module name: guile
Changes by: Marius Vollmer <address@hidden> 01/08/26 14:54:11
Modified files:
guile-core/libguile: ports.h ports.c ioext.c gc.c fports.c
Log message:
Replaced "scm_t_portable" with "scm_port_table" which was an artifact
from the great "scm_*_t -> scm_t_" renaming.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ports.h.diff?cvsroot=OldCVS&tr1=1.78&tr2=1.79&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ports.c.diff?cvsroot=OldCVS&tr1=1.154&tr2=1.155&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ioext.c.diff?cvsroot=OldCVS&tr1=1.86&tr2=1.87&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/gc.c.diff?cvsroot=OldCVS&tr1=1.213&tr2=1.214&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/fports.c.diff?cvsroot=OldCVS&tr1=1.102&tr2=1.103&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/fports.c
diff -u guile/guile-core/libguile/fports.c:1.102
guile/guile-core/libguile/fports.c:1.103
--- guile/guile-core/libguile/fports.c:1.102 Mon Jul 16 03:22:38 2001
+++ guile/guile-core/libguile/fports.c Sun Aug 26 14:54:11 2001
@@ -209,9 +209,9 @@
{
long i;
- for (i = 0; i < scm_t_portable_size; i++)
+ for (i = 0; i < scm_port_table_size; i++)
{
- SCM port = scm_t_portable[i]->port;
+ SCM port = scm_port_table[i]->port;
if (SCM_FPORTP (port))
{
Index: guile/guile-core/libguile/gc.c
diff -u guile/guile-core/libguile/gc.c:1.213
guile/guile-core/libguile/gc.c:1.214
--- guile/guile-core/libguile/gc.c:1.213 Fri Aug 24 16:57:12 2001
+++ guile/guile-core/libguile/gc.c Sun Aug 26 14:54:11 2001
@@ -2821,9 +2821,9 @@
scm_c_hook_init (&scm_after_gc_c_hook, 0, SCM_C_HOOK_NORMAL);
/* Initialise the list of ports. */
- scm_t_portable = (scm_t_port **)
- malloc (sizeof (scm_t_port *) * scm_t_portable_room);
- if (!scm_t_portable)
+ scm_port_table = (scm_t_port **)
+ malloc (sizeof (scm_t_port *) * scm_port_table_room);
+ if (!scm_port_table)
return 1;
#ifdef HAVE_ATEXIT
Index: guile/guile-core/libguile/ioext.c
diff -u guile/guile-core/libguile/ioext.c:1.86
guile/guile-core/libguile/ioext.c:1.87
--- guile/guile-core/libguile/ioext.c:1.86 Mon Jul 9 00:36:47 2001
+++ guile/guile-core/libguile/ioext.c Sun Aug 26 14:54:11 2001
@@ -300,11 +300,11 @@
SCM_VALIDATE_INUM_COPY (1,fd,int_fd);
- for (i = 0; i < scm_t_portable_size; i++)
+ for (i = 0; i < scm_port_table_size; i++)
{
- if (SCM_OPFPORTP (scm_t_portable[i]->port)
- && ((scm_t_fport *) scm_t_portable[i]->stream)->fdes == int_fd)
- result = scm_cons (scm_t_portable[i]->port, result);
+ if (SCM_OPFPORTP (scm_port_table[i]->port)
+ && ((scm_t_fport *) scm_port_table[i]->stream)->fdes == int_fd)
+ result = scm_cons (scm_port_table[i]->port, result);
}
return result;
}
Index: guile/guile-core/libguile/ports.c
diff -u guile/guile-core/libguile/ports.c:1.154
guile/guile-core/libguile/ports.c:1.155
--- guile/guile-core/libguile/ports.c:1.154 Mon Jul 9 00:36:47 2001
+++ guile/guile-core/libguile/ports.c Sun Aug 26 14:54:11 2001
@@ -425,10 +425,10 @@
/* The port table --- an array of pointers to ports. */
-scm_t_port **scm_t_portable;
+scm_t_port **scm_port_table;
-long scm_t_portable_size = 0; /* Number of ports in scm_t_portable. */
-long scm_t_portable_room = 20; /* Size of the array. */
+long scm_port_table_size = 0; /* Number of ports in scm_port_table. */
+long scm_port_table_room = 20; /* Size of the array. */
/* Add a port to the table. */
@@ -438,22 +438,22 @@
{
scm_t_port *entry;
- if (scm_t_portable_size == scm_t_portable_room)
+ if (scm_port_table_size == scm_port_table_room)
{
/* initial malloc is in gc.c. this doesn't use scm_must_malloc etc.,
since it can never be freed during gc. */
- void *newt = realloc ((char *) scm_t_portable,
+ void *newt = realloc ((char *) scm_port_table,
(size_t) (sizeof (scm_t_port *)
- * scm_t_portable_room * 2));
+ * scm_port_table_room * 2));
if (newt == NULL)
scm_memory_error ("scm_add_to_port_table");
- scm_t_portable = (scm_t_port **) newt;
- scm_t_portable_room *= 2;
+ scm_port_table = (scm_t_port **) newt;
+ scm_port_table_room *= 2;
}
entry = (scm_t_port *) scm_must_malloc (sizeof (scm_t_port), FUNC_NAME);
entry->port = port;
- entry->entry = scm_t_portable_size;
+ entry->entry = scm_port_table_size;
entry->revealed = 0;
entry->stream = 0;
entry->file_name = SCM_BOOL_F;
@@ -464,8 +464,8 @@
entry->rw_active = SCM_PORT_NEITHER;
entry->rw_random = 0;
- scm_t_portable[scm_t_portable_size] = entry;
- scm_t_portable_size++;
+ scm_port_table[scm_port_table_size] = entry;
+ scm_port_table_size++;
return entry;
}
@@ -480,20 +480,20 @@
scm_t_port *p = SCM_PTAB_ENTRY (port);
long i = p->entry;
- if (i >= scm_t_portable_size)
+ if (i >= scm_port_table_size)
SCM_MISC_ERROR ("Port not in table: ~S", scm_list_1 (port));
if (p->putback_buf)
scm_must_free (p->putback_buf);
scm_must_free (p);
/* Since we have just freed slot i we can shrink the table by moving
the last entry to that slot... */
- if (i < scm_t_portable_size - 1)
+ if (i < scm_port_table_size - 1)
{
- scm_t_portable[i] = scm_t_portable[scm_t_portable_size - 1];
- scm_t_portable[i]->entry = i;
+ scm_port_table[i] = scm_port_table[scm_port_table_size - 1];
+ scm_port_table[i]->entry = i;
}
SCM_SETPTAB_ENTRY (port, 0);
- scm_t_portable_size--;
+ scm_port_table_size--;
}
#undef FUNC_NAME
@@ -507,7 +507,7 @@
"is only included in @code{--enable-guile-debug} builds.")
#define FUNC_NAME s_scm_pt_size
{
- return SCM_MAKINUM (scm_t_portable_size);
+ return SCM_MAKINUM (scm_port_table_size);
}
#undef FUNC_NAME
@@ -520,10 +520,10 @@
{
long i;
SCM_VALIDATE_INUM_COPY (1,index,i);
- if (i < 0 || i >= scm_t_portable_size)
+ if (i < 0 || i >= scm_port_table_size)
return SCM_BOOL_F;
else
- return scm_t_portable[i]->port;
+ return scm_port_table[i]->port;
}
#undef FUNC_NAME
#endif
@@ -728,8 +728,8 @@
SCM_DEFER_INTS;
scm_block_gc++;
ports = SCM_EOL;
- for (i = 0; i < scm_t_portable_size; i++)
- ports = scm_cons (scm_t_portable[i]->port, ports);
+ for (i = 0; i < scm_port_table_size; i++)
+ ports = scm_cons (scm_port_table[i]->port, ports);
scm_block_gc--;
SCM_ALLOW_INTS;
@@ -757,9 +757,9 @@
{
long i = 0;
SCM_VALIDATE_REST_ARGUMENT (ports);
- while (i < scm_t_portable_size)
+ while (i < scm_port_table_size)
{
- SCM thisport = scm_t_portable[i]->port;
+ SCM thisport = scm_port_table[i]->port;
int found = 0;
SCM ports_ptr = ports;
@@ -872,10 +872,10 @@
{
size_t i;
- for (i = 0; i < scm_t_portable_size; i++)
+ for (i = 0; i < scm_port_table_size; i++)
{
- if (SCM_OPOUTPORTP (scm_t_portable[i]->port))
- scm_flush (scm_t_portable[i]->port);
+ if (SCM_OPOUTPORTP (scm_port_table[i]->port))
+ scm_flush (scm_port_table[i]->port);
}
return SCM_UNSPECIFIED;
}
Index: guile/guile-core/libguile/ports.h
diff -u guile/guile-core/libguile/ports.h:1.78
guile/guile-core/libguile/ports.h:1.79
--- guile/guile-core/libguile/ports.h:1.78 Mon Jul 9 00:36:47 2001
+++ guile/guile-core/libguile/ports.h Sun Aug 26 14:54:11 2001
@@ -130,8 +130,8 @@
size_t putback_buf_size; /* allocated size of putback_buf. */
} scm_t_port;
-extern scm_t_port **scm_t_portable;
-extern long scm_t_portable_size; /* Number of ports in scm_t_portable. */
+extern scm_t_port **scm_port_table;
+extern long scm_port_table_size; /* Number of ports in scm_port_table. */
#define SCM_READ_BUFFER_EMPTY_P(c_port) (c_port->read_pos >= c_port->read_end)
@@ -219,7 +219,7 @@
extern scm_t_ptob_descriptor *scm_ptobs;
extern long scm_numptob;
-extern long scm_t_portable_room;
+extern long scm_port_table_room;