[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 15/18: Cosmetic changes to vports.c
From: |
Andy Wingo |
Subject: |
[Guile-commits] 15/18: Cosmetic changes to vports.c |
Date: |
Wed, 06 Apr 2016 17:27:08 +0000 |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit b51c34e8722783036c503fb1fc35d292bff8be63
Author: Andy Wingo <address@hidden>
Date: Mon Apr 4 22:43:45 2016 +0200
Cosmetic changes to vports.c
* libguile/vports.c (soft_port_flush): Rename from sf_flush, and similar
changes following.
---
libguile/vports.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/libguile/vports.c b/libguile/vports.c
index c08df2e..03697f0 100644
--- a/libguile/vports.c
+++ b/libguile/vports.c
@@ -49,11 +49,11 @@
*/
-static scm_t_bits scm_tc16_sfport;
+static scm_t_bits scm_tc16_soft_port;
static void
-sf_flush (SCM port)
+soft_port_flush (SCM port)
{
scm_t_port *pt = SCM_PTAB_ENTRY (port);
SCM stream = SCM_PACK (pt->stream);
@@ -62,11 +62,10 @@ sf_flush (SCM port)
if (scm_is_true (f))
scm_call_0 (f);
-
}
static void
-sf_write (SCM port, const void *data, size_t size)
+soft_port_write (SCM port, const void *data, size_t size)
{
SCM p = SCM_PACK (SCM_STREAM (port));
@@ -84,7 +83,7 @@ sf_write (SCM port, const void *data, size_t size)
/* places a single char in the input buffer. */
static int
-sf_fill_input (SCM port)
+soft_port_fill_input (SCM port)
{
SCM p = SCM_PACK (SCM_STREAM (port));
SCM ans;
@@ -94,7 +93,7 @@ sf_fill_input (SCM port)
ans = scm_call_0 (SCM_SIMPLE_VECTOR_REF (p, 3)); /* get char. */
if (scm_is_false (ans) || SCM_EOF_OBJECT_P (ans))
return EOF;
- SCM_ASSERT (SCM_CHARP (ans), ans, SCM_ARG1, "sf_fill_input");
+ SCM_ASSERT (SCM_CHARP (ans), ans, SCM_ARG1, "soft_port_fill_input");
pti = SCM_PORT_GET_INTERNAL (port);
c = SCM_CHAR (ans);
@@ -124,7 +123,7 @@ sf_fill_input (SCM port)
static int
-sf_close (SCM port)
+soft_port_close (SCM port)
{
SCM p = SCM_PACK (SCM_STREAM (port));
SCM f = SCM_SIMPLE_VECTOR_REF (p, 4);
@@ -137,7 +136,7 @@ sf_close (SCM port)
static int
-sf_input_waiting (SCM port)
+soft_port_input_waiting (SCM port)
{
SCM p = SCM_PACK (SCM_STREAM (port));
if (SCM_SIMPLE_VECTOR_LENGTH (p) >= 6)
@@ -209,7 +208,7 @@ SCM_DEFINE (scm_make_soft_port, "make-soft-port", 2, 0, 0,
SCM_ASSERT ((vlen == 5) || (vlen == 6), pv, 1, FUNC_NAME);
SCM_VALIDATE_STRING (2, modes);
- z = scm_c_make_port (scm_tc16_sfport, scm_i_mode_bits (modes),
+ z = scm_c_make_port (scm_tc16_soft_port, scm_i_mode_bits (modes),
SCM_UNPACK (pv));
scm_port_non_buffer (SCM_PTAB_ENTRY (z));
@@ -221,12 +220,13 @@ SCM_DEFINE (scm_make_soft_port, "make-soft-port", 2, 0, 0,
static scm_t_bits
scm_make_sfptob ()
{
- scm_t_bits tc = scm_make_port_type ("soft", sf_fill_input, sf_write);
+ scm_t_bits tc = scm_make_port_type ("soft", soft_port_fill_input,
+ soft_port_write);
- scm_set_port_flush (tc, sf_flush);
- scm_set_port_close (tc, sf_close);
+ scm_set_port_flush (tc, soft_port_flush);
+ scm_set_port_close (tc, soft_port_close);
scm_set_port_needs_close_on_gc (tc, 1);
- scm_set_port_input_waiting (tc, sf_input_waiting);
+ scm_set_port_input_waiting (tc, soft_port_input_waiting);
return tc;
}
@@ -234,7 +234,7 @@ scm_make_sfptob ()
void
scm_init_vports ()
{
- scm_tc16_sfport = scm_make_sfptob ();
+ scm_tc16_soft_port = scm_make_sfptob ();
#include "libguile/vports.x"
}
- [Guile-commits] branch wip-port-refactor created (now 8399e7a), Andy Wingo, 2016/04/06
- [Guile-commits] 08/18: Remove port equal functions, Andy Wingo, 2016/04/06
- [Guile-commits] 06/18: Remove port mark functions, Andy Wingo, 2016/04/06
- [Guile-commits] 14/18: Fix POLLOUT assignment from port buffers, Andy Wingo, 2016/04/06
- [Guile-commits] 02/18: display-{application, -backtrace} delegate to Scheme, Andy Wingo, 2016/04/06
- [Guile-commits] 13/18: Flush buffered reads / writes before seeking, Andy Wingo, 2016/04/06
- [Guile-commits] 15/18: Cosmetic changes to vports.c,
Andy Wingo <=
- [Guile-commits] 01/18: Fix frame->stack-vector when no stack is active, Andy Wingo, 2016/04/06
- [Guile-commits] 07/18: Remove port free functions; just close instead, Andy Wingo, 2016/04/06
- [Guile-commits] 16/18: When making soft port, parse handlers into struct, Andy Wingo, 2016/04/06
- [Guile-commits] 12/18: Whitespace fixes, Andy Wingo, 2016/04/06
- [Guile-commits] 05/18: Move line-buffing machinery to ports.c, Andy Wingo, 2016/04/06
- [Guile-commits] 10/18: Custom binary port internals refactor, Andy Wingo, 2016/04/06
- [Guile-commits] 04/18: Use symbols instead of _IONBF values as args to setvbuf, Andy Wingo, 2016/04/06
- [Guile-commits] 03/18: Move setvbuf impl to ports.[ch], Andy Wingo, 2016/04/06
- [Guile-commits] 09/18: Cosmetic changes to r6rs-ports.c, Andy Wingo, 2016/04/06
- [Guile-commits] 17/18: Port close functions return void, Andy Wingo, 2016/04/06