[uim-commit] r1959 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Thu Nov 3 02:58:48 PST 2005
Author: yamaken
Date: 2005-11-03 02:58:44 -0800 (Thu, 03 Nov 2005)
New Revision: 1959
Modified:
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/io.c
branches/r5rs/sigscheme/sigscheme.h
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigschemeinternal.h
- (SigScm_PortPrintf, SigScm_VPortPrintf, SigScm_PortNewline,
SigScm_ErrorPrintf, SigScm_VErrorPrintf, SigScm_ErrorNewline):
Move to sigscheme.h
* sigscheme/sigscheme.h
- (SigScm_PortPrintf, SigScm_VPortPrintf, SigScm_PortNewline,
SigScm_ErrorPrintf, SigScm_VErrorPrintf, SigScm_ErrorNewline):
Moved from sigschemeinternal.h
* sigscheme/error.c
- (SigScm_PortPrintf, SigScm_VPortPrintf, SigScm_PortNewline,
SigScm_ErrorPrintf, SigScm_VErrorPrintf, SigScm_ErrorNewline):
Move to sigscheme.h
* sigscheme/io.c
- (SigScm_PortPrintf, SigScm_VPortPrintf, SigScm_PortNewline,
SigScm_ErrorPrintf, SigScm_VErrorPrintf, SigScm_ErrorNewline):
Moved from error.c
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-11-03 10:51:59 UTC (rev 1958)
+++ branches/r5rs/sigscheme/error.c 2005-11-03 10:58:44 UTC (rev 1959)
@@ -221,49 +221,3 @@
{
SigScm_ErrorPrintf(SCM_ERR_HEADER);
}
-
-/* TODO: move to io.c */
-void SigScm_PortPrintf(ScmObj port, const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- SigScm_VPortPrintf(port, fmt, args);
- va_end(args);
-}
-
-void SigScm_VPortPrintf(ScmObj port, const char *fmt, va_list args)
-{
- if (!FALSEP(port)) {
- SCM_PORT_VPRINTF(port, fmt, args);
-#if SCM_VOLATILE_OUTPUT
- SCM_PORT_FLUSH(port);
-#endif
- }
-}
-
-void SigScm_PortNewline(ScmObj port)
-{
- if (!FALSEP(port)) {
- SCM_PORT_PUTS(port, SCM_NEWLINE_STR);
- }
-}
-
-void SigScm_ErrorPrintf(const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- SigScm_VErrorPrintf(fmt, args);
- va_end(args);
-}
-
-void SigScm_VErrorPrintf(const char *fmt, va_list args)
-{
- SigScm_VPortPrintf(scm_current_error_port, fmt, args);
-}
-
-void SigScm_ErrorNewline(void)
-{
- SigScm_PortNewline(scm_current_error_port);
-}
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-11-03 10:51:59 UTC (rev 1958)
+++ branches/r5rs/sigscheme/io.c 2005-11-03 10:58:44 UTC (rev 1959)
@@ -128,6 +128,51 @@
return Scm_NewPort(ScmSingleByteCharPort_new(bport), flag);
}
+void SigScm_PortPrintf(ScmObj port, const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ SigScm_VPortPrintf(port, fmt, args);
+ va_end(args);
+}
+
+void SigScm_VPortPrintf(ScmObj port, const char *fmt, va_list args)
+{
+ if (!FALSEP(port)) {
+ SCM_PORT_VPRINTF(port, fmt, args);
+#if SCM_VOLATILE_OUTPUT
+ SCM_PORT_FLUSH(port);
+#endif
+ }
+}
+
+void SigScm_PortNewline(ScmObj port)
+{
+ if (!FALSEP(port)) {
+ SCM_PORT_PUTS(port, SCM_NEWLINE_STR);
+ }
+}
+
+void SigScm_ErrorPrintf(const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ SigScm_VErrorPrintf(fmt, args);
+ va_end(args);
+}
+
+void SigScm_VErrorPrintf(const char *fmt, va_list args)
+{
+ SigScm_VPortPrintf(scm_current_error_port, fmt, args);
+}
+
+void SigScm_ErrorNewline(void)
+{
+ SigScm_PortNewline(scm_current_error_port);
+}
+
/*=======================================
R5RS : 6.6 Input and Output
=======================================*/
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-11-03 10:51:59 UTC (rev 1958)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-11-03 10:58:44 UTC (rev 1959)
@@ -563,6 +563,12 @@
void SigScm_set_lib_path(const char *path);
ScmObj Scm_MakeSharedFilePort(FILE *file, const char *aux_info,
enum ScmPortFlag flag);
+void SigScm_PortPrintf(ScmObj port, const char *fmt, ...);
+void SigScm_VPortPrintf(ScmObj port, const char *fmt, va_list args);
+void SigScm_PortNewline(ScmObj port);
+void SigScm_ErrorPrintf(const char *fmt, ...);
+void SigScm_VErrorPrintf(const char *fmt, va_list args);
+void SigScm_ErrorNewline(void);
ScmObj ScmOp_call_with_input_file(ScmObj filepath, ScmObj proc);
ScmObj ScmOp_call_with_output_file(ScmObj filepath, ScmObj proc);
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-03 10:51:59 UTC (rev 1958)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-03 10:58:44 UTC (rev 1959)
@@ -348,13 +348,6 @@
/* error.c */
void SigScm_ShowErrorHeader(void);
-/* TODO: Move these functions to io.c */
-void SigScm_PortPrintf(ScmObj port, const char *fmt, ...);
-void SigScm_VPortPrintf(ScmObj port, const char *fmt, va_list args);
-void SigScm_PortNewline(ScmObj port);
-void SigScm_ErrorPrintf(const char *fmt, ...);
-void SigScm_VErrorPrintf(const char *fmt, va_list args);
-void SigScm_ErrorNewline(void);
void Scm_ErrorObj(const char *func_name, const char *msg, ScmObj obj);
/* operations.c */
More information about the uim-commit
mailing list