This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!r6rs | |
(import (rnrs) | |
(rnrs mutable-pairs)) | |
(define (make-queue) | |
(cons '() '())) | |
(define (queue-empty? queue) | |
(null? (car queue))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!r6rs | |
(import (rnrs)) | |
(define (test) | |
(call/cc | |
(lambda(cc) | |
(let ((in (make-custom-binary-input-port "consumer" cc #f #f #f))) | |
(get-u8 in))))) | |
(define (print . x) (for-each (lambda(x)(write x)(newline)) x)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gauche/win-compat.h b/src/gauche/win-compat.h | |
index d3823d2..5237aa6 100755 | |
--- a/src/gauche/win-compat.h | |
+++ b/src/gauche/win-compat.h | |
@@ -38,7 +38,7 @@ typedef unsigned long u_long; | |
#define _BSDTYPES_DEFINED | |
#endif /* _BSDTYPES_DEFINED */ | |
#ifndef _T | |
-#define _T(x) (x) /* MSVC unicode macro */ | |
+#define _T(x) TEXT(x) /* MSVC unicode macro */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/libsys.scm b/src/libsys.scm | |
index 05333c9..9530891 100644 | |
--- a/src/libsys.scm | |
+++ b/src/libsys.scm | |
@@ -383,7 +383,9 @@ | |
(define-cproc sys-remove (filename::<const-cstring>) ::<void> | |
(let* ([r::int]) | |
- (SCM_SYSCALL r (remove filename)) | |
+ (.if "defined(GAUCHE_WINDOWS) && defined(UNICODE)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r d14ae1e74bea sitelib/json.scm | |
--- a/sitelib/json.scm Thu Apr 17 09:23:24 2014 +0200 | |
+++ b/sitelib/json.scm Fri Apr 18 00:03:02 2014 +0900 | |
@@ -130,15 +130,47 @@ | |
(if (char=? (parse-results-token-value results) (string-ref str pos)) | |
(loop (+ pos 1) (parse-results-next results)) | |
(make-expected-result (parse-results-position starting-results) str)))))) | |
+ (define (interpret-string-unicode-escape-low-sarrogate results high) | |
+ (let ((ch (parse-results-token-value results))) | |
+ (unless (char=? ch #\\) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-library (bencoding) | |
(import (scheme base)) | |
(export bencoding-parse bencoding-construct) | |
(begin | |
(define-syntax let1 | |
(syntax-rules () | |
((_ var expr body0 body1 ...) | |
(let ((var expr)) body0 body1 ...)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/configure.ac b/configure.ac | |
index 16448ce..c900f48 100644 | |
--- a/configure.ac | |
+++ b/configure.ac | |
@@ -452,7 +452,7 @@ dnl Also adds -DUNICODE to CFLAGS enable Windows wchar API, | |
dnl if GAUCHE_CHAR_ENCODING is UTF_8. | |
dnl ALTERNATIVE_GOSH is no-console version of gosh; only built on Windows. | |
case "$host" in | |
- *mingw*) LIBS="$LIBS -lnetapi32 -lshlwapi -lws2_32" | |
+ *mingw*) LIBS="$LIBS -lnetapi32 -lshlwapi -lws2_32 -lkernel32" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define sync_mode true // 非同期モード。 これを false にすると動く。 | |
#include <windows.h> | |
#include <msxml2.h> | |
#include <comutil.h> | |
#include <cstdio> | |
#include <iostream> | |
#pragma comment(lib, "oleaut32.lib") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (traverse proc obj) | |
(let loop ((obj obj)) | |
(cond ((or (identifier? obj) (symbol? obj)) | |
(proc obj)) | |
((pair? obj) | |
(cons (loop (car obj)) (loop (cdr obj)))) | |
((vector? obj) | |
(vector-map loop obj)) | |
(else obj)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-library (lib1) | |
(import | |
(scheme base) | |
(picrin protocol)) | |
(begin | |
(define-protocol (SHOW t) | |
(show t)) | |
) | |
(export show SHOW)) |