Portable representation of hex numbers.
authorhayashi <hayashi>
Mon, 9 Jul 2001 07:09:13 +0000 (07:09 +0000)
committerhayashi <hayashi>
Mon, 9 Jul 2001 07:09:13 +0000 (07:09 +0000)
ChangeLog
egg/wnnrpc.el

index b2b8aa9..00603fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2001-07-09  Yoshiki Hayashi <yoshiki@xemacs.org>
 
+       * egg/wnnrpc.el (wnn-hex): New macro.
+       (wnn-const): Use wnn-hex to represent hex number.
+
+2001-07-09  Yoshiki Hayashi <yoshiki@xemacs.org>
+
        * canna.el (canna-open): Use binary instead of no-conversion.
        * sj3.el (sj3-open): Ditto.
        * wnn.el (wnn-open): Ditto.
index 1d651c5..df0f096 100644 (file)
@@ -37,6 +37,8 @@
   (require 'egg-com)
   (defmacro wnn-file-string ()
     (string-as-unibyte (decode-coding-string "\e$B#W#n#n$N%U%!%$%k\e(B" 'euc-jp)))
+  (defmacro wnn-hex (n)
+    (string-to-number n 16))
   (defmacro wnn-const (c)
     "Macro for WNN constants."
     (cond ((eq c 'JS_VERSION)               0)
          ((eq c 'JS_HINSI_NUMBER)        116)
          ((eq c 'JS_HINSI_DICTS)         117)
          ((eq c 'JS_HINSI_TABLE_SET)     118)
-         ((eq c 'JS_ACCESS_ADD_HOST)         ?\xf00011)
-         ((eq c 'JS_ACCESS_ADD_USER)         ?\xf00012)
-         ((eq c 'JS_ACCESS_REMOVE_HOST)      ?\xf00013)
-         ((eq c 'JS_ACCESS_REMOVE_USER)      ?\xf00014)
-         ((eq c 'JS_ACCESS_ENABLE)           ?\xf00015)
-         ((eq c 'JS_ACCESS_DISABLE)          ?\xf00016)
-         ((eq c 'JS_ACCESS_GET_INFO)         ?\xf00017)
-         ((eq c 'JS_TEMPORARY_DIC_ADD)       ?\xf00021)
-         ((eq c 'JS_TEMPORARY_DIC_DELETE)    ?\xf00022)
-         ((eq c 'JS_AUTOLEARNING_WORD_ADD)   ?\xf00023)
-         ((eq c 'JS_SET_AUTOLEARNING_DIC)    ?\xf00024)
-         ((eq c 'JS_GET_AUTOLEARNING_DIC)    ?\xf00025)
-         ((eq c 'JS_IS_LOADED_TEMPORARY_DIC) ?\xf00026)
-         ((eq c 'JS_TEMPORARY_WORD_ADD)      ?\xf00027)
-         ((eq c 'JS_SET_HENKAN_ENV)          ?\xf00031)
-         ((eq c 'JS_GET_HENKAN_ENV)          ?\xf00032)
-         ((eq c 'JS_SET_HENKAN_HINSI)        ?\xf00033)
-         ((eq c 'JS_GET_HENKAN_HINSI)        ?\xf00034)
-         ((eq c 'JS_HENKAN_WITH_DATA)        ?\xf00035)
-         ((eq c 'JS_FI_DIC_ADD)              ?\xf00061)
-         ((eq c 'JS_FI_HINDO_FILE_CREATE)    ?\xf00062)
-         ((eq c 'JS_FI_KANREN)               ?\xf00065)
-         ((eq c 'JS_SET_FI_PRIORITY)         ?\xf00066)
-         ((eq c 'JS_OPTIMIZE_FI)             ?\xf00067)
-         ((eq c 'JS_HENKAN_IKEIJI)           ?\xf0006f)
-         ((eq c 'JS_LOCK)                    ?\xf00071)
-         ((eq c 'JS_UNLOCK)                  ?\xf00072)
-         ((eq c 'JS_FI_DIC_LIST)             ?\xf00081)
-         ((eq c 'JS_FI_DIC_LIST_ALL)         ?\xf00082)
-         ((eq c 'JS_FUZOKUGO_LIST)           ?\xf00083)
-
-         ((eq c 'JLIB_VERSION)       ?\x4003)
-         ((eq c 'JLIB_VERSION_WNN6)  ?\x4f00)
+         ((eq c 'JS_ACCESS_ADD_HOST)         (wnn-hex "f00011"))
+         ((eq c 'JS_ACCESS_ADD_USER)         (wnn-hex "f00012"))
+         ((eq c 'JS_ACCESS_REMOVE_HOST)      (wnn-hex "f00013"))
+         ((eq c 'JS_ACCESS_REMOVE_USER)      (wnn-hex "f00014"))
+         ((eq c 'JS_ACCESS_ENABLE)           (wnn-hex "f00015"))
+         ((eq c 'JS_ACCESS_DISABLE)          (wnn-hex "f00016"))
+         ((eq c 'JS_ACCESS_GET_INFO)         (wnn-hex "f00017"))
+         ((eq c 'JS_TEMPORARY_DIC_ADD)       (wnn-hex "f00021"))
+         ((eq c 'JS_TEMPORARY_DIC_DELETE)    (wnn-hex "f00022"))
+         ((eq c 'JS_AUTOLEARNING_WORD_ADD)   (wnn-hex "f00023"))
+         ((eq c 'JS_SET_AUTOLEARNING_DIC)    (wnn-hex "f00024"))
+         ((eq c 'JS_GET_AUTOLEARNING_DIC)    (wnn-hex "f00025"))
+         ((eq c 'JS_IS_LOADED_TEMPORARY_DIC) (wnn-hex "f00026"))
+         ((eq c 'JS_TEMPORARY_WORD_ADD)      (wnn-hex "f00027"))
+         ((eq c 'JS_SET_HENKAN_ENV)          (wnn-hex "f00031"))
+         ((eq c 'JS_GET_HENKAN_ENV)          (wnn-hex "f00032"))
+         ((eq c 'JS_SET_HENKAN_HINSI)        (wnn-hex "f00033"))
+         ((eq c 'JS_GET_HENKAN_HINSI)        (wnn-hex "f00034"))
+         ((eq c 'JS_HENKAN_WITH_DATA)        (wnn-hex "f00035"))
+         ((eq c 'JS_FI_DIC_ADD)              (wnn-hex "f00061"))
+         ((eq c 'JS_FI_HINDO_FILE_CREATE)    (wnn-hex "f00062"))
+         ((eq c 'JS_FI_KANREN)               (wnn-hex "f00065"))
+         ((eq c 'JS_SET_FI_PRIORITY)         (wnn-hex "f00066"))
+         ((eq c 'JS_OPTIMIZE_FI)             (wnn-hex "f00067"))
+         ((eq c 'JS_HENKAN_IKEIJI)           (wnn-hex "f0006f"))
+         ((eq c 'JS_LOCK)                    (wnn-hex "f00071"))
+         ((eq c 'JS_UNLOCK)                  (wnn-hex "f00072"))
+         ((eq c 'JS_FI_DIC_LIST)             (wnn-hex "f00081"))
+         ((eq c 'JS_FI_DIC_LIST_ALL)         (wnn-hex "f00082"))
+         ((eq c 'JS_FUZOKUGO_LIST)           (wnn-hex "f00083"))
+
+         ((eq c 'JLIB_VERSION)       (wnn-hex "4003"))
+         ((eq c 'JLIB_VERSION_WNN6)  (wnn-hex "4f00"))
 
          ((eq c 'WNN_C_LOCAL)            "!")
          ((eq c 'WNN_FT_DICT_FILE)         1)
 
          ((eq c 'WNN_UD_DICT)              2)
          ((eq c 'WNN_REV_DICT)             3)
-         ((eq c 'CWNN_REV_DICT)       ?\x103)
-         ((eq c 'BWNN_REV_DICT)       ?\x203)
+         ((eq c 'CWNN_REV_DICT)       (wnn-hex "103"))
+         ((eq c 'BWNN_REV_DICT)       (wnn-hex "203"))
          ((eq c 'WNN_COMPACT_DICT)         5)
          ((eq c 'WNN_FI_SYSTEM_DICT)       6)
          ((eq c 'WNN_FI_USER_DICT)         7)