[uim-commit] r3059 - branches/r5rs/sigscheme/src
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Jan 31 20:05:51 PST 2006
Author: yamaken
Date: 2006-01-31 20:05:20 -0800 (Tue, 31 Jan 2006)
New Revision: 3059
Modified:
branches/r5rs/sigscheme/src/sigscheme.h
branches/r5rs/sigscheme/src/sigschemeinternal.h
branches/r5rs/sigscheme/src/storage-compact.h
branches/r5rs/sigscheme/src/storage-fatty.h
Log:
* sigscheme/src/sigscheme.h
- (SCM_CHARPORT_ERROR, SCM_BYTEPORT_ERROR, SCM_PORT_MALLOC,
SCM_PORT_CALLOC, SCM_PORT_REALLOC): Move to
- (SCM_ENSURE_LIVE_PORT): Enclose into #if SCM_USE_PORT
- (SCM_WRITE_SS): Enclose into #if SCM_USE_WRITER
* sigscheme/src/sigschemeinternal.h
- (SCM_CHARPORT_ERROR, SCM_BYTEPORT_ERROR, SCM_PORT_MALLOC,
SCM_PORT_CALLOC, SCM_PORT_REALLOC):
* Moved from sigscheme.h
* Enclose into #if SCM_USE_PORT
* sigscheme/src/storage-fatty.h
- (struct ScmCell_, scm_make_port): Replace ScmCharPort * with
struct ScmCharPort_ * to forward declaration
* sigscheme/src/storage-compact.h
- (scm_make_port, SCM_SAL_PORT_IMPL): Ditto
Modified: branches/r5rs/sigscheme/src/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/src/sigscheme.h 2006-02-01 03:48:31 UTC (rev 3058)
+++ branches/r5rs/sigscheme/src/sigscheme.h 2006-02-01 04:05:20 UTC (rev 3059)
@@ -206,23 +206,15 @@
#endif /* SCM_GCC4_READY_GC */
-
-/*
- * Port I/O Handling macros
- */
-#define SCM_CHARPORT_ERROR(cport, msg) (scm_plain_error(msg))
-#define SCM_BYTEPORT_ERROR(bport, msg) (scm_plain_error(msg))
-#define SCM_PORT_MALLOC(size) (scm_malloc(size))
-#define SCM_PORT_CALLOC(number, size) (scm_calloc(number, size))
-#define SCM_PORT_REALLOC(ptr, size) (scm_realloc(ptr, size))
-/* Above five macros must be defined before this inclusion. */
-#include "baseport.h"
-
+#if SCM_USE_PORT
#define SCM_ENSURE_LIVE_PORT(port) \
(SCM_PORT_IMPL(port) \
|| (scm_error_obj("(unknown)", "operated on closed port", port), 1))
+#endif
+#if SCM_USE_WRITER
#define SCM_WRITE_SS(port, obj) ((*scm_write_ss_func)(port, obj))
+#endif
/*===========================================================================
Type Definitions
Modified: branches/r5rs/sigscheme/src/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/src/sigschemeinternal.h 2006-02-01 03:48:31 UTC (rev 3058)
+++ branches/r5rs/sigscheme/src/sigschemeinternal.h 2006-02-01 04:05:20 UTC (rev 3059)
@@ -80,6 +80,19 @@
/*=======================================
Macro Declarations
=======================================*/
+#if SCM_USE_PORT
+/*
+ * Port I/O Handling macros
+ */
+#define SCM_CHARPORT_ERROR(cport, msg) (scm_plain_error(msg))
+#define SCM_BYTEPORT_ERROR(bport, msg) (scm_plain_error(msg))
+#define SCM_PORT_MALLOC(size) (scm_malloc(size))
+#define SCM_PORT_CALLOC(number, size) (scm_calloc(number, size))
+#define SCM_PORT_REALLOC(ptr, size) (scm_realloc(ptr, size))
+/* Above five macros must be defined before this inclusion. */
+#include "baseport.h"
+#endif /* SCM_USE_PORT */
+
/* trace stack for debugging */
#define MAKE_TRACE_FRAME(obj, env) CONS((obj), (env))
#define TRACE_FRAME_OBJ CAR
Modified: branches/r5rs/sigscheme/src/storage-compact.h
===================================================================
--- branches/r5rs/sigscheme/src/storage-compact.h 2006-02-01 03:48:31 UTC (rev 3058)
+++ branches/r5rs/sigscheme/src/storage-compact.h 2006-02-01 04:05:20 UTC (rev 3059)
@@ -735,7 +735,7 @@
ScmObj scm_make_closure(ScmObj exp, ScmObj env);
ScmObj scm_make_vector(ScmObj *vec, scm_int_t len);
ScmObj scm_make_immutable_vector(ScmObj *vec, scm_int_t len);
-ScmObj scm_make_port(ScmCharPort *cport, enum ScmPortFlag flag);
+ScmObj scm_make_port(struct ScmCharPort_ *cport, enum ScmPortFlag flag);
ScmObj scm_make_continuation(void);
#if !SCM_USE_VALUECONS
ScmObj scm_make_value_packet(ScmObj values);
@@ -978,7 +978,8 @@
/*
* Port
*/
-#define SCM_SAL_PORT_IMPL(a) ((ScmCharPort *) SCM_OTHERS_CAR_VAL((a), PORT))
+#define SCM_SAL_PORT_IMPL(a) \
+ ((struct ScmCharPort_ *)SCM_OTHERS_CAR_VAL((a), PORT))
#define SCM_SAL_PORT_FLAG(a) ((enum ScmPortFlag)SCM_OTHERS_CDR_VAL((a), PORT))
#define SCM_SAL_PORT_SET_IMPL(a, val) SCM_OTHERS_SET_CAR_VAL((a), PORT, (val))
#define SCM_SAL_PORT_SET_FLAG(a, val) SCM_OTHERS_SET_CDR_VAL((a), PORT, (val))
Modified: branches/r5rs/sigscheme/src/storage-fatty.h
===================================================================
--- branches/r5rs/sigscheme/src/storage-fatty.h 2006-02-01 03:48:31 UTC (rev 3058)
+++ branches/r5rs/sigscheme/src/storage-fatty.h 2006-02-01 04:05:20 UTC (rev 3059)
@@ -136,7 +136,7 @@
} vector;
struct {
- ScmCharPort *impl;
+ struct ScmCharPort_ *impl;
enum ScmPortFlag flag;
} port;
@@ -250,7 +250,7 @@
ScmObj scm_make_closure(ScmObj exp, ScmObj env);
ScmObj scm_make_vector(ScmObj *vec, scm_int_t len);
ScmObj scm_make_immutable_vector(ScmObj *vec, scm_int_t len);
-ScmObj scm_make_port(ScmCharPort *cport, enum ScmPortFlag flag);
+ScmObj scm_make_port(struct ScmCharPort_ *cport, enum ScmPortFlag flag);
ScmObj scm_make_continuation(void);
#if !SCM_USE_VALUECONS
ScmObj scm_make_value_packet(ScmObj values);
More information about the uim-commit
mailing list