*/
#ifndef lint
-static char rcs_id[] = "$Id: canna.c,v 1.35.1.1 1997-03-06 12:45:30 morioka Exp $";
+static char rcs_id[] = "$Id: canna.c,v 1.35.1.2 1997-03-06 12:48:05 morioka Exp $";
#endif
#include <stdio.h>
static int Vcanna_underline;
static int Vcanna_inhibit_hankakukana; /* hir, 1994.12.5 */
+#ifndef CANNA_EMACS_DL
static Lisp_Object Vcanna_kakutei_string;
static Lisp_Object Vcanna_kakutei_yomi;
static Lisp_Object Vcanna_kakutei_romaji;
static Lisp_Object Vcanna_henkan_string;
+#endif
static int Vcanna_henkan_length;
static int Vcanna_henkan_revPos;
static int Vcanna_henkan_revLen;
+#ifndef CANNA_EMACS_DL
static Lisp_Object Vcanna_ichiran_string;
+#endif
static int Vcanna_ichiran_length;
static int Vcanna_ichiran_revPos;
static int Vcanna_ichiran_revLen;
+#ifndef CANNA_EMACS_DL
static Lisp_Object Vcanna_mode_string;
+#endif
static int IRCP_context;
}
else {
/* ³ÎÄꤷ¤¿Ê¸»úÎó */
+#ifndef CANNA_EMACS_DL
Vcanna_kakutei_string = make_string(buf, len);
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-kakutei-string"), make_string(buf, len));
+#endif
val = make_number(len);
/* ³ÎÄꤷ¤¿Ê¸»úÎó¤ÎÆɤߤξðÊó... */
+#ifndef CANNA_EMACS_DL
Vcanna_kakutei_yomi = Vcanna_kakutei_romaji = Qnil;
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-kakutei-yomi"), Qnil);
+ Fset(intern("canna-kakutei-romaji"), Qnil);
+#endif
if (ks->info & KanjiYomiInfo) {
unsigned char *p = buf + len + 1;
int yomilen = strlen(p);
if (len + yomilen + 1 < KEYTOSTRSIZE) {
int yomilen2;
+#ifndef CANNA_EMACS_DL
Vcanna_kakutei_yomi = make_string(p, yomilen); /* ÆÉ¤ß */
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-kakutei-yomi"), make_string(p, yomilen));
+#endif
p += yomilen + 1;
yomilen2 = strlen(p);
if (len + yomilen + yomilen2 + 2 < KEYTOSTRSIZE) {
+#ifndef CANNA_EMACS_DL
Vcanna_kakutei_romaji = make_string(p, yomilen2); /* ¥í¡¼¥Þ»ú */
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-kakutei-romaji"), make_string(p, yomilen2));
+#endif
}
}
}
/* ¸õÊäɽ¼¨¤Îʸ»úÎó¤Ç¤¹¡£*/
+#ifndef CANNA_EMACS_DL
Vcanna_henkan_string = Qnil;
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-henkan-string"), Qnil);
+#endif
if (ks->length >= 0) {
+#ifndef CANNA_EMACS_DL
Vcanna_henkan_string = make_string(ks->echoStr, ks->length);
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-henkan-string"),
+ make_string(ks->echoStr, ks->length));
+#endif
#ifdef CANNA_NEMACS
Vcanna_henkan_length = ks->length;
Vcanna_henkan_revPos = ks->revPos;
}
/* °ìÍ÷¤Î¾ðÊó */
+#ifndef CANNA_EMACS_DL
Vcanna_ichiran_string = Qnil;
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-ichiran-string"), Qnil);
+#endif
if (ks->info & KanjiGLineInfo && ks->gline.length >= 0) {
+#ifndef CANNA_EMACS_DL
Vcanna_ichiran_string = make_string(ks->gline.line, ks->gline.length);
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-ichiran-string"),
+ make_string(ks->gline.line, ks->gline.length));
+#endif
#ifdef CANNA_NEMACS
Vcanna_ichiran_length = ks->gline.length;
Vcanna_ichiran_revPos = ks->gline.revPos;
}
/* ¥â¡¼¥É¤Î¾ðÊó */
+#ifndef CANNA_EMACS_DL
Vcanna_mode_string = Qnil;
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-ichiran-string"), Qnil);
+#endif
if (ks->info & KanjiModeInfo) {
+#ifndef CANNA_EMACS_DL
Vcanna_mode_string = make_string(ks->mode, strlen(ks->mode));
+#else /* CANNA_EMACS_DL */
+ Fset(intern("canna-mode-string"),
+ make_string(ks->mode, strlen(ks->mode)));
+#endif
}
/* ¤½¤Î¾¤Î¾ðÊó */
static int Vcanna_key_Cntrl_Right = IROHA_KEY_Cntrl_Right;
static int Vcanna_key_Cntrl_Down = IROHA_KEY_Cntrl_Down;
-static Lisp_Object VCANNA; /* hir@nec, 1992.5.21 */
#ifdef CANNA_EMACS_DL
static struct Lisp_Subr *s_canna_key_proc;
static struct Lisp_Subr *s_canna_henkan_kakutei;
static struct Lisp_Subr *s_canna_henkan_end;
static struct Lisp_Subr *s_canna_henkan_quit;
+#else
+static Lisp_Object VCANNA; /* hir@nec, 1992.5.21 */
#endif
#ifndef CANNA_EMACS_DL
syms_of_canna ()
-#else /* CANNA_EMACS_DL */
-void
-emacs_canna_init ()
-#endif
{
DEFVAR_LISP ("CANNA", &VCANNA, ""); /* hir@nec, 1992.5.21 */
- VCANNA = Qt; /* hir@nec, 1992.5.21 */
+ VCANNA = Qt; /* hir@nec, 1992.5.21 */
-#ifndef CANNA_EMACS_DL
defsubr (&Scanna_key_proc);
defsubr (&Scanna_initialize);
defsubr (&Scanna_finalize);
defsubr (&Scanna_query_mode);
defsubr (&Scanna_set_bunsetsu);
#else /* CANNA_EMACS_DL */
+void
+emacs_canna_init ()
+{
+ Lisp_Object sym;
+
+ sym = intern("CANNA");
+ XSYMBOL (sym)->value = Qt;
+
s_canna_key_proc
= (struct Lisp_Subr *)xmalloc (sizeof (struct Lisp_Subr));
bcopy (&Scanna_key_proc, s_canna_key_proc, sizeof (struct Lisp_Subr));
defsubr (s_canna_set_bunsetsu);
#endif
+#ifndef CANNA_EMACS_DL
DEFVAR_LISP("canna-kakutei-string", &Vcanna_kakutei_string, "");
DEFVAR_LISP("canna-kakutei-yomi", &Vcanna_kakutei_yomi, "");
DEFVAR_LISP("canna-kakutei-romaji", &Vcanna_kakutei_romaji, "");
DEFVAR_LISP("canna-henkan-string", &Vcanna_henkan_string, "");
+#else /* CANNA_EMACS_DL */
+ sym = intern("canna-kakutei-string"); sym = Qnil;
+ sym = intern("canna-kakutei-yomi"); sym = Qnil;
+ sym = intern("canna-kakutei-romaji"); sym = Qnil;
+ sym = intern("canna-henkan-string"); sym = Qnil;
+#endif
DEFVAR_INT ("canna-henkan-length", &Vcanna_henkan_length, "");
DEFVAR_INT ("canna-henkan-revpos", &Vcanna_henkan_revPos, "");
DEFVAR_INT ("canna-henkan-revlen", &Vcanna_henkan_revLen, "");
+#ifndef CANNA_EMACS_DL
DEFVAR_LISP("canna-ichiran-string", &Vcanna_ichiran_string, "");
+#else /* CANNA_EMACS_DL */
+ sym = intern("canna-ichiran-string"); sym = Qnil;
+#endif
DEFVAR_INT ("canna-ichiran-length", &Vcanna_ichiran_length, "");
DEFVAR_INT ("canna-ichiran-revpos", &Vcanna_ichiran_revPos, "");
DEFVAR_INT ("canna-ichiran-revlen", &Vcanna_ichiran_revLen, "");
+#ifndef CANNA_EMACS_DL
DEFVAR_LISP("canna-mode-string", &Vcanna_mode_string, "");
-
+#else /* CANNA_EMACS_DL */
+ sym = intern("canna-mode-string"); sym = Qnil;
+#endif
DEFVAR_BOOL ("canna-empty-info", &Vcanna_empty_info, "For canna");
DEFVAR_BOOL ("canna-through-info", &Vcanna_through_info, "For canna");
DEFVAR_BOOL ("canna-underline", &Vcanna_underline, "For canna");