[uim-commit] r1650 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Wed Sep 28 05:44:00 PDT 2005
Author: yamaken
Date: 2005-09-28 05:43:57 -0700 (Wed, 28 Sep 2005)
New Revision: 1650
Modified:
branches/r5rs/sigscheme/error.c
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigschemeinternal.h
- (SigScm_ErrorPrintf, SigScm_VErrorPrintf, SigScm_ErrorNewline):
New function decl
* sigscheme/error.c
- (SigScm_ErrorPrintf, SigScm_VErrorPrintf, SigScm_ErrorNewline):
New function
Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c 2005-09-28 12:09:02 UTC (rev 1649)
+++ branches/r5rs/sigscheme/error.c 2005-09-28 12:43:57 UTC (rev 1650)
@@ -146,3 +146,38 @@
{
fprintf(SCM_PORTINFO_FILE(scm_current_error_port), SCM_ERR_HEADER);
}
+
+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)
+{
+ FILE *err;
+
+ if (scm_current_error_port) {
+ err = SCM_PORTINFO_FILE(scm_current_error_port);
+ vfprintf(err, fmt, args);
+#if SCM_VOLATILE_OUTPUT
+ fflush(err);
+#endif
+ }
+}
+
+void SigScm_ErrorNewline(void)
+{
+ FILE *err;
+
+ if (scm_current_error_port) {
+ err = SCM_PORTINFO_FILE(scm_current_error_port);
+ fputc('\n', err);
+#if SCM_VOLATILE_OUTPUT
+ fflush(err);
+#endif
+ }
+}
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-28 12:09:02 UTC (rev 1649)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-28 12:43:57 UTC (rev 1650)
@@ -262,5 +262,8 @@
/* error.c */
void SigScm_ShowErrorHeader(void);
+void SigScm_ErrorPrintf(const char *fmt, ...);
+void SigScm_VErrorPrintf(const char *fmt, va_list args);
+void SigScm_ErrorNewline(void);
#endif /* __SIGSCHEMEINTERNAL_H */
More information about the uim-commit
mailing list