$NetBSD: patch-ag,v 1.1 2009/12/15 13:11:18 taca Exp $ * Change CANNA to USE_CANNA. --- edit.c.orig 2008-12-18 13:41:32.000000000 +0900 +++ edit.c @@ -31,16 +31,16 @@ #include #include #include -#ifdef CANNA +#ifdef USE_CANNA #include -#endif /* CANNA */ +#endif /* USE_CANNA */ #include "cue.h" -#ifdef CANNA +#ifdef USE_CANNA static char *cannamode; static int cannamodelen = -1; -#endif /* CANNA */ +#endif /* USE_CANNA */ struct edit_state { struct state *state; @@ -56,11 +56,11 @@ struct edit_state { int complistent; int complistsize; struct abuf abuf; -#ifdef CANNA +#ifdef USE_CANNA int canna; jrKanjiStatus ks; char cannabuf[CHARBLOCK]; -#endif /* CANNA */ +#endif /* USE_CANNA */ }; static void @@ -89,10 +89,10 @@ edit_update(struct edit_state *e) break; } move(LINES - 1, 0); -#ifdef CANNA_XXX +#ifdef USE_CANNA_XXX if (e->canna) addstr(cannamode); -#endif /* CANNA */ +#endif /* USE_CANNA */ msglen = strlen(e->state->status); getyx(stdscr, y, x); width = COLS - x - 1; @@ -127,7 +127,7 @@ edit_update(struct edit_state *e) clrtoeol(); x += e->pos - off; move(y, x); -#ifdef CANNA +#ifdef USE_CANNA if (e->canna && e->ks.length) { /* XXX: e->ks.length -> width (hankana) */ if (x + (2 + e->ks.length) > COLS) { @@ -152,7 +152,7 @@ edit_update(struct edit_state *e) addnstr(p, e->ks.length - (e->ks.revPos + e->ks.revLen)); addstr("|\b"); } -#endif /* CANNA */ +#endif /* USE_CANNA */ } static void @@ -267,9 +267,9 @@ static int edit_control(struct edit_state *e, int ch) { int i; -#ifdef CANNA +#ifdef USE_CANNA jrKanjiStatusWithValue ksv; -#endif /* CANNA */ +#endif /* USE_CANNA */ switch (ch) { /* refresh */ @@ -355,7 +355,7 @@ edit_control(struct edit_state *e, int c } e->len = e->pos; break; -#ifdef CANNA +#ifdef USE_CANNA case CTRL('o'): if (e->canna) { e->canna = 0; @@ -380,7 +380,7 @@ edit_control(struct edit_state *e, int c jrKanjiControl(0, KC_SETMODEINFOSTYLE, 0); jrKanjiControl(0, KC_QUERYMODE, cannamode); break; -#endif /* CANNA */ +#endif /* USE_CANNA */ default: return 0; } @@ -426,7 +426,7 @@ edit_stline(struct state *state, char *b inp = inbuf; inp[0] = ch; inp[1] = '\0'; -#ifdef CANNA +#ifdef USE_CANNA if (e->canna) { i = jrKanjiString(0, ch, e->cannabuf, e->size - e->len, &e->ks); @@ -446,7 +446,7 @@ edit_stline(struct state *state, char *b e->cannabuf[i] = '\0'; inp = (u_char *)e->cannabuf; } -#endif /* CANNA */ +#endif /* USE_CANNA */ while ((ch = *inp) != '\0') { switch (ch) { case CTRL('g'):