[uim-commit] r2545 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Dec 12 00:20:31 PST 2005


Author: yamaken
Date: 2005-12-12 00:20:20 -0800 (Mon, 12 Dec 2005)
New Revision: 2545

Modified:
   branches/r5rs/sigscheme/TODO
   branches/r5rs/sigscheme/eval.c
   branches/r5rs/sigscheme/main.c
   branches/r5rs/sigscheme/operations-siod.c
   branches/r5rs/sigscheme/operations-srfi60.c
   branches/r5rs/sigscheme/operations.c
Log:
* sigscheme/operations-srfi60.c
  - (BITWISE_OPERATION_BODY): Replace SigScm_Error() with ERR()
* sigscheme/operations.c
  - (ScmOp_eqvp): Ditto
* sigscheme/operations-siod.c
  - (SigScm_SetVerboseLevel): Ditto
* sigscheme/main.c
  - (main): Ditto
* sigscheme/eval.c
  - (call, Scm_eval, ScmExp_let, ScmExp_letstar, ScmExp_letrec,
    ScmExp_do, ScmExp_unquote, ScmExp_unquote_splicing,
    ScmOp_scheme_report_environment, ScmOp_null_environment): Ditto
* sigscheme/TODO
  - Update


Modified: branches/r5rs/sigscheme/TODO
===================================================================
--- branches/r5rs/sigscheme/TODO	2005-12-12 08:16:33 UTC (rev 2544)
+++ branches/r5rs/sigscheme/TODO	2005-12-12 08:20:20 UTC (rev 2545)
@@ -47,8 +47,6 @@
 * Simplify argument extraction by DECLARE_FUNCTION, ASSERT_*P, POP_ARG and
   NO_MORE_ARG macros in all procedure and syntaxes
 
-* Replace all Scm_ErrorObj() in procedures and syntaxes with ERR_OBJ
-
 ==============================================================================
 Namings and Cosmetic things:
 

Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c	2005-12-12 08:16:33 UTC (rev 2544)
+++ branches/r5rs/sigscheme/eval.c	2005-12-12 08:20:20 UTC (rev 2545)
@@ -396,7 +396,7 @@
     /* Collect mandatory arguments. */
     mand_count = type & SCM_FUNCTYPE_MAND_MASK;
     if (mand_count > SCM_FUNCTYPE_MAND_MAX)
-        SigScm_Error("Corrupted function: typecode=0x%x", type);
+        ERR("corrupted function: typecode=0x%x", type);
     for (i = 0; i < mand_count; i++) {
         argbuf[i] = MUST_POP_ARG(args);
         if (!suppress_eval)
@@ -452,7 +452,7 @@
         return (*func)(argbuf[0], argbuf[1], argbuf[2], argbuf[3], argbuf[4], argbuf[5], argbuf[6]);
 #endif
     default:
-        SigScm_Error("Corrupted function: typecode=0x%x", type);
+        ERR("corrupted function: typecode=0x%x", type);
     }
     return SCM_INVALID;
 }
@@ -484,7 +484,7 @@
 #if SCM_STRICT_R5RS
     /* () is allowed by default for efficiency */
     if (NULLP(obj))
-        SigScm_Error("() is not a valid R5RS form. use '() instead");
+        ERR("eval: () is not a valid R5RS form. use '() instead");
 #endif
     switch (SCM_TYPE(obj)) {
     case ScmSymbol:
@@ -1155,7 +1155,7 @@
     ========================================================================*/
 
     if (NULLP(args))
-        SigScm_Error("let : invalid form");
+        ERR("let: invalid form");
     bindings = POP_ARG(args);
 
     /* named let */
@@ -1163,7 +1163,7 @@
         named_let_sym = bindings;
 
         if (NULLP(args))
-            SigScm_Error("let : invalid named let form");
+            ERR("let: invalid named let form");
         bindings = POP_ARG(args);
     }
 
@@ -1217,7 +1217,7 @@
                      ...)
     ========================================================================*/
     if (!CONSP(bindings) && !NULLP(bindings))
-        SigScm_Error("let* : syntax error");
+        ERR("let*: syntax error");
 
     for (; CONSP(bindings); bindings = CDR(bindings)) {
         binding = CAR(bindings);
@@ -1262,7 +1262,7 @@
                      ...)
     ========================================================================*/
     if (!CONSP(bindings) && !NULLP(bindings))
-        SigScm_Error("letrec : syntax error");
+        ERR("letrec: syntax error");
 
     /* extend env by placeholder frame for subsequent lambda evaluations */
     frame = CONS(SCM_NULL, SCM_NULL);
@@ -1405,7 +1405,7 @@
             if (obj != SCM_INVALID_REF) {
                 SET(obj, CAR(vals));
             } else {
-                SigScm_Error("do : broken env");
+                ERR("do: broken env");
             }
         }
     }
@@ -1543,7 +1543,7 @@
 {
     DECLARE_FUNCTION("unquote", SyntaxFixed1);
 
-    SigScm_Error("unquote outside quasiquote");
+    ERR("unquote outside quasiquote");
     return SCM_NULL;
 }
 
@@ -1551,7 +1551,7 @@
 {
     DECLARE_FUNCTION("unquote-splicing", SyntaxFixed1);
 
-    SigScm_Error("unquote-splicing outside quasiquote");
+    ERR("unquote-splicing outside quasiquote");
     return SCM_NULL;
 }
 
@@ -1636,10 +1636,10 @@
         ERR_OBJ("version must be 5 but got", version);
 
 #if SCM_STRICT_R5RS
-    SigScm_Error("scheme-report-environment :" SCM_ERRMSG_NON_R5RS_ENV);
+    ERR("scheme-report-environment:" SCM_ERRMSG_NON_R5RS_ENV);
 #else
     CDBG((SCM_DBG_COMPAT,
-          "scheme-report-environment : warning:" SCM_ERRMSG_NON_R5RS_ENV));
+          "scheme-report-environment: warning:" SCM_ERRMSG_NON_R5RS_ENV));
 #endif
 
     return SCM_INTERACTION_ENV;
@@ -1655,10 +1655,10 @@
         ERR_OBJ("version must be 5 but got", version);
 
 #if SCM_STRICT_R5RS
-    SigScm_Error("null-environment :" SCM_ERRMSG_NON_R5RS_ENV);
+    ERR("null-environment:" SCM_ERRMSG_NON_R5RS_ENV);
 #else
     CDBG((SCM_DBG_COMPAT,
-          "null-environment : warning:" SCM_ERRMSG_NON_R5RS_ENV));
+          "null-environment: warning:" SCM_ERRMSG_NON_R5RS_ENV));
 #endif
 
     return SCM_INTERACTION_ENV;

Modified: branches/r5rs/sigscheme/main.c
===================================================================
--- branches/r5rs/sigscheme/main.c	2005-12-12 08:16:33 UTC (rev 2544)
+++ branches/r5rs/sigscheme/main.c	2005-12-12 08:20:20 UTC (rev 2545)
@@ -188,7 +188,7 @@
 #else
         repl();
 #endif
-        /*        SigScm_Error("usage : sscm <filename>"); */
+        /* ERR("usage: sscm <filename>"); */
     }
 
     SigScm_Finalize();

Modified: branches/r5rs/sigscheme/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/operations-siod.c	2005-12-12 08:16:33 UTC (rev 2544)
+++ branches/r5rs/sigscheme/operations-siod.c	2005-12-12 08:20:20 UTC (rev 2545)
@@ -235,7 +235,8 @@
 void SigScm_SetVerboseLevel(long level)
 {
     if (level < 0)
-        SigScm_Error("SigScm_SetVerboseLevel : negative value has been given");
+        ERR("SigScm_SetVerboseLevel: positive value required but got: %d",
+            level);
 
     if (sscm_verbose_level == level)
         return;

Modified: branches/r5rs/sigscheme/operations-srfi60.c
===================================================================
--- branches/r5rs/sigscheme/operations-srfi60.c	2005-12-12 08:16:33 UTC (rev 2544)
+++ branches/r5rs/sigscheme/operations-srfi60.c	2005-12-12 08:20:20 UTC (rev 2545)
@@ -64,7 +64,7 @@
             result = (SCM_INT_VALUE(left) op SCM_INT_VALUE(right));          \
             break;                                                           \
         default:                                                             \
-            SigScm_Error(opstr " : (internal error) unrecognized state specifier: %d", *state); \
+            ERR(opstr ": (internal error) unrecognized state specifier: %d", *state); \
         }                                                                    \
         return Scm_NewInt(result);                                           \
     } while (/* CONSTCOND */ 0)

Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c	2005-12-12 08:16:33 UTC (rev 2544)
+++ branches/r5rs/sigscheme/operations.c	2005-12-12 08:20:20 UTC (rev 2545)
@@ -97,7 +97,7 @@
 
 #if SCM_DEBUG
     case ScmFreeCell:
-        SigScm_Error("eqv? : cannnot compare freecell, gc broken?");
+        ERR("eqv?: cannnot compare freecell, gc broken?");
         break;
 #endif
 



More information about the uim-commit mailing list