summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2001-08-26 21:54:11 +0000
committerMarius Vollmer <mvo@zagadka.de>2001-08-26 21:54:11 +0000
commitf5fd8aa2a70c16729bd8df6e4f012ade202f66ce (patch)
treeff2ccab090e36c3b7519c894349204b953b37d76
parent7e8ef316ad8bae2a595ffb270f48cf054ae6bcc0 (diff)
downloadguile-f5fd8aa2a70c16729bd8df6e4f012ade202f66ce.tar.gz
Replaced "scm_t_portable" with "scm_port_table" which was an artifact
from the great "scm_*_t -> scm_t_" renaming.
-rw-r--r--libguile/fports.c4
-rw-r--r--libguile/gc.c6
-rw-r--r--libguile/ioext.c8
-rw-r--r--libguile/ports.c52
-rw-r--r--libguile/ports.h6
5 files changed, 38 insertions, 38 deletions
diff --git a/libguile/fports.c b/libguile/fports.c
index 9466214b2..886caadf6 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -209,9 +209,9 @@ scm_evict_ports (int fd)
{
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))
{
diff --git a/libguile/gc.c b/libguile/gc.c
index 457c0edce..d63562f44 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -2821,9 +2821,9 @@ scm_init_storage ()
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
diff --git a/libguile/ioext.c b/libguile/ioext.c
index 759e78c38..4cb28ad62 100644
--- a/libguile/ioext.c
+++ b/libguile/ioext.c
@@ -300,11 +300,11 @@ SCM_DEFINE (scm_fdes_to_ports, "fdes->ports", 1, 0, 0,
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;
}
diff --git a/libguile/ports.c b/libguile/ports.c
index ddcc4b9a6..266ac0ea4 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -425,10 +425,10 @@ SCM_DEFINE (scm_set_current_error_port, "set-current-error-port", 1, 0, 0,
/* 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_add_to_port_table (SCM port)
{
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 @@ scm_add_to_port_table (SCM port)
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_remove_from_port_table (SCM port)
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 @@ SCM_DEFINE (scm_pt_size, "pt-size", 0, 0, 0,
"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 @@ SCM_DEFINE (scm_pt_member, "pt-member", 1, 0, 0,
{
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_DEFINE (scm_port_for_each, "port-for-each", 1, 0, 0,
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 @@ SCM_DEFINE (scm_close_all_ports_except, "close-all-ports-except", 0, 0, 1,
{
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 @@ SCM_DEFINE (scm_flush_all_ports, "flush-all-ports", 0, 0, 0,
{
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;
}
diff --git a/libguile/ports.h b/libguile/ports.h
index 866b74d23..60877af8c 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -130,8 +130,8 @@ typedef struct
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 @@ typedef struct scm_t_ptob_descriptor
extern scm_t_ptob_descriptor *scm_ptobs;
extern long scm_numptob;
-extern long scm_t_portable_room;
+extern long scm_port_table_room;