MIURA Yasuyuki
kokos****@gmail*****
2008年 5月 17日 (土) 03:00:56 JST
はじめまして、三浦と申します。 http://wiki.monaos.org/pukiwiki.php?Reading%20Gauche にて ココサブ名義でひげぽんさん達とGaucheを読んでいます。 読んでいる過程で気づいたtypo等へのパッチです。動作自体は変わりません。 cvs HEADに対して変更を加え、make testしたところ全てのテストに通りました。 Index: src/boolean.c =================================================================== RCS file: /cvsroot/gauche/Gauche/src/boolean.c,v retrieving revision 1.24 diff -u -3 -p -r1.24 boolean.c --- src/boolean.c 10 May 2008 13:36:17 -0000 1.24 +++ src/boolean.c 16 May 2008 17:13:41 -0000 @@ -69,7 +69,7 @@ int Scm_EqualP(ScmObj x, ScmObj y) y = SCM_CDR(y); } while (SCM_PAIRP(x)&&SCM_PAIRP(y)); return Scm_EqualP(x, y); - } + } if (SCM_STRINGP(x)) { if (SCM_STRINGP(y)) { return Scm_StringEqual(SCM_STRING(x), SCM_STRING(y)); Index: src/load.c =================================================================== RCS file: /cvsroot/gauche/Gauche/src/load.c,v retrieving revision 1.119 diff -u -3 -p -r1.119 load.c --- src/load.c 10 May 2008 13:36:19 -0000 1.119 +++ src/load.c 16 May 2008 17:13:42 -0000 @@ -890,7 +890,7 @@ int Scm_Require(ScmObj feature, int flag } for (;;) { - q = Scm_Assoc(SCM_CDR(p), ldinfo.waiting, SCM_CMP_EQ); + q = Scm_Assq(SCM_CDR(p), ldinfo.waiting); if (SCM_FALSEP(q)) break; SCM_ASSERT(SCM_PAIRP(q)); p = Scm_Assoc(SCM_CDR(q), ldinfo.providing, SCM_CMP_EQUAL); @@ -1060,7 +1060,7 @@ ScmObj Scm_ResolveAutoload(ScmAutoload * if ((adata->locker == NULL || adata->locker == vm) && !SCM_FALSEP(Scm_Assoc(SCM_OBJ(adata->path), ldinfo.providing, - SCM_CMP_EQUAL))) { + SCM_CMP_EQUAL))){ return SCM_UNBOUND; } Index: src/number.c =================================================================== RCS file: /cvsroot/gauche/Gauche/src/number.c,v retrieving revision 1.160 diff -u -3 -p -r1.160 number.c --- src/number.c 10 May 2008 13:36:19 -0000 1.160 +++ src/number.c 16 May 2008 17:13:45 -0000 @@ -2620,7 +2620,7 @@ ScmObj Scm_Ash(ScmObj x, int cnt) ix >>= -cnt; } return Scm_MakeInteger(ix); - } else if (cnt < (SIZEOF_LONG*8-3)) { + } else if (cnt < SCM_SMALL_INT_SIZE) { if (ix < 0) { if (-ix < (SCM_SMALL_INT_MAX >> cnt)) { ix <<= cnt; @@ -2970,18 +2970,18 @@ ScmObj Scm_NumberToString(ScmObj obj, in char buf[FLT_BUF]; if (SCM_INTP(obj)) { - char buf[50], *pbuf = buf; + char *pbuf = buf; long value = SCM_INT_VALUE(obj); if (value < 0) { *pbuf++ = '-'; value = -value; /* this won't overflow */ } if (radix == 10) { - snprintf(pbuf, 49, "%ld", value); + snprintf(pbuf, FLT_BUF-1, "%ld", value); } else if (radix == 16) { - snprintf(pbuf, 49, (use_upper? "%lX" : "%lx"), value); + snprintf(pbuf, FLT_BUF-1, (use_upper? "%lX" : "%lx"), value); } else if (radix == 8) { - snprintf(pbuf, 49, "%lo", value); + snprintf(pbuf, FLT_BUF-1, "%lo", value); } else { /* sloppy way ... */ r = Scm_BignumToString(SCM_BIGNUM(Scm_MakeBignumFromSI(SCM_INT_VALUE(obj))), Index: src/gauche/load.h =================================================================== RCS file: /cvsroot/gauche/Gauche/src/gauche/load.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 load.h --- src/gauche/load.h 10 May 2008 13:36:25 -0000 1.4 +++ src/gauche/load.h 16 May 2008 17:13:45 -0000 @@ -42,7 +42,7 @@ * Loading Scheme files */ -/* Flags for Scm_VMLoad, Scm_Load, amd Scm_Requre. (not for Scm_VMLoadPort) */ +/* Flags for Scm_VMLoad, Scm_Load, and Scm_Require. (not for Scm_VMLoadPort) */ typedef enum { SCM_LOAD_QUIET_NOFILE = (1L<<0), /* do not signal an error if the file does not exist; just return #f. */ @@ -56,7 +56,7 @@ typedef enum { /* A structure to obtain a detailed result of loading. */ typedef struct ScmLoadPacketRec { ScmObj exception; /* OUT: exception object in case of LOAD_EVAL_ERROR */ - int loaded; /* OUT: TRUE iff file is successfully loaded. */ + int loaded; /* OUT: TRUE if file is successfully loaded. */ ScmObj paths; /* reserved */ } ScmLoadPacket; Index: src/gauche/scmconst.h =================================================================== RCS file: /cvsroot/gauche/Gauche/src/gauche/scmconst.h,v retrieving revision 1.5 diff -u -3 -p -r1.5 scmconst.h --- src/gauche/scmconst.h 10 May 2008 13:36:25 -0000 1.5 +++ src/gauche/scmconst.h 16 May 2008 17:13:45 -0000 @@ -42,7 +42,7 @@ SCM_EXTERN ScmObj Scm__ConstObjs[]; /* #define SCM_2_64_MINUS_1 (Scm__ConstObjs[1]) /* 2^64-1 */ #define SCM_2_63 (Scm__ConstObjs[2]) /* 2^63 */ #define SCM_MINUS_2_63 (Scm__ConstObjs[3]) /* -2^63 */ -#define SCM_2_53 (Scm__ConstObjs[4]) /* 2^52 */ +#define SCM_2_53 (Scm__ConstObjs[4]) /* 2^53 */ #define SCM_2_52 (Scm__ConstObjs[5]) /* 2^52 */ #define SCM_2_32 (Scm__ConstObjs[6]) /* 2^32 */ #define SCM_2_31 (Scm__ConstObjs[7]) /* 2^31 */ ====================== 三浦 康幸 kokos****@gmail***** -------------- next part -------------- 文字コード指定の無い添付文書を保管しました... 名前: patch.txt Descargar