Skip to content

Instantly share code, notes, and snippets.

View shirok's full-sized avatar

Shiro Kawai shirok

View GitHub Profile
diff --git a/ChangeLog b/ChangeLog
index 6487bf4..ab6422d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-03-10 Shiro Kawai <[email protected]>
+
+ * src/vm.c (Scm_VMCallCC, throw_continuation): Be a bit clever to
+ extract arity of the captured continuation if possible. The info
+ may be lost by valid program transformation (e.g.
diff --git a/ext/termios/test.scm b/ext/termios/test.scm
index 0e4260f..10d502d 100644
--- a/ext/termios/test.scm
+++ b/ext/termios/test.scm
@@ -65,8 +65,6 @@
(define iport #f)
(define oport #f)
- (define pty-used #f)
-
diff --git a/ext/termios/test.scm b/ext/termios/test.scm
index 390b83f..0e4260f 100644
--- a/ext/termios/test.scm
+++ b/ext/termios/test.scm
@@ -65,17 +65,24 @@
(define iport #f)
(define oport #f)
+ (define pty-used #f)
+
;;
;; Implementation of John Nash's enciphering-deciphering machine described in
;; https://www.nsa.gov/Portals/70/documents/news-features/declassified-documents/nash-letters/nash_letters1.pdf
;;
(use gauche.sequence)
(use gauche.generator)
(use srfi-1)
(use srfi-43)
(use srfi-60)
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -273,7 +273,7 @@ char-data : gen-unicode.scm
char.$(OBJEXT) : char.c char_attr.c
-winmain.$(OBJEXT) : main.c
+winmain.$(OBJEXT) : main.c $(HEADERS)
symbol.$(OBJEXT) : builtin-syms.c
diff --git a/configure.ac b/configure.ac
index 9078aa3..2eae81d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -562,11 +562,15 @@ case $host in
# -no-cpp-precomp is not related to shared library, but needed to
# get src/{vm.c,char.c} compiled -skimu
# [Shiro] Darwin 1.3 and later needs different flags
+ CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
case $host_os in
diff --git a/test/control.scm b/test/control.scm
index 4631c41..69e9d46 100644
--- a/test/control.scm
+++ b/test/control.scm
@@ -49,9 +49,12 @@
(cond-expand
[gauche.sys.pthreads
(test* "job-wait, job-kill" '(killed foo)
- (let* ([job (make-job (^[] (sys-sleep 10)) :waitable #t)]
+ (let* ([gate (make-mtqueue :max-length 0)]
diff --git a/src/gauche/regexp.h b/src/gauche/regexp.h
index 298b86a..2c1a348 100644
--- a/src/gauche/regexp.h
+++ b/src/gauche/regexp.h
@@ -49,6 +49,11 @@ struct ScmRegexpRec {
int numSets; /* # of charsets in sets */
int flags; /* internal; CASE_FOLD, BOL_ANCHORED etc. */
ScmString *mustMatch;
+ ScmObj laset; /* lookahead set (char-set) or #f.
+ If not #f, it represents the condition that can
(use gauche.threads)
(define (runonce fn)
(let1 state (atom #f) ; once run, becomes (list result)
(values (^[] (atomic state boolean)) ;has-run?
(^[] (atomic-update! state (^_ #f))) ;reset
(^ args ;once
(car (atomic-update! state (^p (or p `(,(apply fn args))))))))))
(use srfi-1)
(use slib)
(require 'format)
(define (arabic->roman n) (if (< 0 n 4000) (format "~@R" n) (error "oob")))
(define roman->arabic
(let1 tab (map (^n `(,(format "~@R" n) . ,n)) (iota 3999 1))
(^r (cond [(assoc r tab string-ci=?) => cdr] [else (error "huh?")]))))