Author: yamakenz
Date: Sun Jul 22 05:14:34 2007
New Revision: 4774
Modified:
trunk/scm/anthy-utf8.scm
trunk/scm/anthy.scm
trunk/scm/byeoru.scm
trunk/scm/canna.scm
trunk/scm/init.scm
trunk/scm/key.scm
trunk/scm/mana.scm
trunk/scm/skk.scm
trunk/uim/uim-scm.c
Log:
* uim/uim-scm.c
- (uim_scm_init): Remove require-module for srfi-23 and siod
* scm/init.scm
- Add require-extension for srfi-60 and siod
- Undefine SIOD-compatible bit-and, bit-or, bit-xor, bit-not
* scm/key.scm
* scm/anthy.scm
* scm/anthy-utf8.scm
* scm/canna.scm
* scm/mana.scm
* scm/skk.scm
* scm/byeoru.scm
- Replace SIOD-compatible bit-* with SRFI-60 bitwise-*
Modified: trunk/scm/anthy-utf8.scm
==============================================================================
--- trunk/scm/anthy-utf8.scm (original)
+++ trunk/scm/anthy-utf8.scm Sun Jul 22 05:14:34 2007
@@ -1326,8 +1326,8 @@
(define anthy-separator
(lambda (ac)
- (let ((attr (bit-or preedit-separator
- preedit-underline)))
+ (let ((attr (bitwise-ior preedit-separator
+ preedit-underline)))
(if anthy-show-segment-separator?
(cons attr anthy-segment-separator)
#f))))
@@ -1409,7 +1409,7 @@
(not (anthy-utf8-context-prediction-index ac)))
(anthy-utf8-input-state-preedit ac)
(let ((cand (anthy-utf8-get-prediction-string ac)))
- (list (cons (bit-or preedit-reverse preedit-cursor) cand))))))
+ (list (cons (bitwise-ior preedit-reverse preedit-cursor) cand))))))
(define anthy-utf8-converting-state-preedit
(lambda (ac)
@@ -1420,8 +1420,8 @@
(append-map
(lambda (seg-idx cand-idx)
(let* ((attr (if (= seg-idx cur-seg)
- (bit-or preedit-reverse
- preedit-cursor)
+ (bitwise-ior preedit-reverse
+ preedit-cursor)
preedit-underline))
(cand (if (> cand-idx anthy-candidate-type-halfwidth-alnum)
(anthy-utf8-lib-get-nth-candidate ac-id seg-idx
cand-idx)
Modified: trunk/scm/anthy.scm
==============================================================================
--- trunk/scm/anthy.scm (original)
+++ trunk/scm/anthy.scm Sun Jul 22 05:14:34 2007
@@ -1321,8 +1321,8 @@
(define anthy-separator
(lambda (ac)
- (let ((attr (bit-or preedit-separator
- preedit-underline)))
+ (let ((attr (bitwise-ior preedit-separator
+ preedit-underline)))
(if anthy-show-segment-separator?
(cons attr anthy-segment-separator)
#f))))
@@ -1404,7 +1404,7 @@
(not (anthy-context-prediction-index ac)))
(anthy-input-state-preedit ac)
(let ((cand (anthy-get-prediction-string ac)))
- (list (cons (bit-or preedit-reverse preedit-cursor) cand))))))
+ (list (cons (bitwise-ior preedit-reverse preedit-cursor) cand))))))
(define anthy-converting-state-preedit
(lambda (ac)
@@ -1415,8 +1415,8 @@
(append-map
(lambda (seg-idx cand-idx)
(let* ((attr (if (= seg-idx cur-seg)
- (bit-or preedit-reverse
- preedit-cursor)
+ (bitwise-ior preedit-reverse
+ preedit-cursor)
preedit-underline))
(cand (if (> cand-idx anthy-candidate-type-halfwidth-alnum)
(anthy-lib-get-nth-candidate ac-id seg-idx cand-idx)
Modified: trunk/scm/byeoru.scm
==============================================================================
--- trunk/scm/byeoru.scm (original)
+++ trunk/scm/byeoru.scm Sun Jul 22 05:14:34 2007
@@ -1769,7 +1769,7 @@
(and (not (ustr-cursor-at-beginning? convl))
(cons preedit-underline
(apply string-append (ustr-former-seq convl))))
- (cons (bit-or preedit-reverse underline preedit-cursor)
+ (cons (bitwise-ior preedit-reverse underline preedit-cursor)
(apply string-append (ustr-former-seq convr)))
(and (not (ustr-cursor-at-end? convr))
(cons preedit-underline
Modified: trunk/scm/canna.scm
==============================================================================
--- trunk/scm/canna.scm (original)
+++ trunk/scm/canna.scm Sun Jul 22 05:14:34 2007
@@ -950,7 +950,7 @@
(define canna-separator
(lambda (cc)
- (let ((attr (bit-or preedit-separator preedit-underline)))
+ (let ((attr (bitwise-ior preedit-separator preedit-underline)))
(if canna-show-segment-separator?
(cons attr canna-segment-separator)
#f))))
@@ -1041,8 +1041,8 @@
(append-map
(lambda (seg-idx cand-idx)
(let* ((attr (if (= seg-idx cur-seg)
- (bit-or preedit-reverse
- preedit-cursor)
+ (bitwise-ior preedit-reverse
+ preedit-cursor)
preedit-underline))
(cand (if (> cand-idx canna-candidate-type-katakana)
(canna-lib-get-nth-candidate cc-id seg-idx cand-idx)
Modified: trunk/scm/init.scm
==============================================================================
--- trunk/scm/init.scm (original)
+++ trunk/scm/init.scm Sun Jul 22 05:14:34 2007
@@ -34,7 +34,13 @@
;; configuration for special platforms such as embedded environments
;; -- YamaKen 2005-01-29
-(require-extension (srfi 23 34))
+(require-extension (srfi 23 34 60) (siod))
+
+;; Disable SIOD compatibilities.
+(undefine bit-and)
+(undefine bit-or)
+(undefine bit-xor)
+(undefine bit-not)
(define enable-action? #t)
Modified: trunk/scm/key.scm
==============================================================================
--- trunk/scm/key.scm (original)
+++ trunk/scm/key.scm Sun Jul 22 05:14:34 2007
@@ -49,22 +49,22 @@
;
(define shift-key-mask
(lambda (state)
- (= (bit-and state 1) 1)))
+ (= (bitwise-and state 1) 1)))
(define control-key-mask
(lambda (state)
- (= (bit-and state 2) 2)))
+ (= (bitwise-and state 2) 2)))
(define alt-key-mask
(lambda (state)
- (= (bit-and state 4) 4)))
+ (= (bitwise-and state 4) 4)))
(define meta-key-mask
(lambda (state)
- (= (bit-and state 8) 8)))
+ (= (bitwise-and state 8) 8)))
(define super-key-mask
(lambda (state)
- (= (bit-and state 64) 64)))
+ (= (bitwise-and state 64) 64)))
(define hyper-key-mask
(lambda (state)
- (= (bit-and state 128) 128)))
+ (= (bitwise-and state 128) 128)))
(define modifier-key-mask
(lambda (state)
@@ -193,8 +193,8 @@
(rest (cdr parsed)))
(cond
((modifier-key? prefix 0)
- (let ((key-state (bit-or key-state
- (cdr (assq prefix key-state-alist)))))
+ (let ((key-state (bitwise-ior key-state
+ (cdr (assq prefix key-state-alist)))))
(parse-key-str rest translators key key-state)))
((translator-prefix? prefix)
(let* ((translator
@@ -205,15 +205,17 @@
(list translated-key key-state))))
((eq? prefix 'IgnoreShift)
(lambda (key key-state)
- (let ((translated-key-state (bit-and key-state
- (bit-not 1))))
+ (let ((translated-key-state
+ (bitwise-and key-state
+ (bitwise-not 1))))
(list key translated-key-state))))
((eq? prefix 'IgnoreRegularShift)
(lambda (key key-state)
- (let ((translated-key-state (if (ichar-graphic? key)
- (bit-and key-state
- (bit-not 1))
- key-state)))
+ (let ((translated-key-state
+ (if (ichar-graphic? key)
+ (bitwise-and key-state
+ (bitwise-not 1))
+ key-state)))
(list key translated-key-state))))))
(translators (cons translator
translators)))
Modified: trunk/scm/mana.scm
==============================================================================
--- trunk/scm/mana.scm (original)
+++ trunk/scm/mana.scm Sun Jul 22 05:14:34 2007
@@ -1240,8 +1240,8 @@
(define mana-separator
(lambda (mc)
- (let ((attr (bit-or preedit-separator
- preedit-underline)))
+ (let ((attr (bitwise-ior preedit-separator
+ preedit-underline)))
(if mana-show-segment-separator?
(cons attr mana-segment-separator)
#f))))
@@ -1279,8 +1279,8 @@
(append-map
(lambda (seg-idx cand-idx)
(let* ((attr (if (= seg-idx cur-seg)
- (bit-or preedit-reverse
- preedit-cursor)
+ (bitwise-ior preedit-reverse
+ preedit-cursor)
preedit-underline))
(cand (mana-get-nth-candidate mc seg-idx cand-idx))
(seg (list (cons attr cand))))
Modified: trunk/scm/skk.scm
==============================================================================
--- trunk/scm/skk.scm (original)
+++ trunk/scm/skk.scm Sun Jul 22 05:14:34 2007
@@ -750,7 +750,7 @@
(not (skk-context-candidate-window sc))))
(im-pushback-preedit
sc
- (bit-or skk-preedit-attr-conv-body preedit-cursor)
+ (bitwise-ior skk-preedit-attr-conv-body preedit-cursor)
(if skk-show-annotation-in-preedit?
(skk-lib-eval-candidate (skk-get-current-candidate sc))
(skk-lib-eval-candidate
@@ -758,7 +758,7 @@
(skk-get-current-candidate sc)))))
(im-pushback-preedit
sc
- (bit-or skk-preedit-attr-conv-body preedit-cursor)
+ (bitwise-ior skk-preedit-attr-conv-body preedit-cursor)
""))
(im-pushback-preedit
sc skk-preedit-attr-conv-okuri
Modified: trunk/uim/uim-scm.c
==============================================================================
--- trunk/uim/uim-scm.c (original)
+++ trunk/uim/uim-scm.c Sun Jul 22 05:14:34 2007
@@ -1097,9 +1097,7 @@
uim_scm_callf("provide", "s", "debug");
#endif
- scm_require_module("srfi-23");
scm_require_module("srfi-34");
- scm_require_module("siod");
uim_scm_set_verbose_level(vlevel);
}