diff --git a/display.c b/display.c index e62d07f..a45fc3e 100644 --- a/display.c +++ b/display.c @@ -1368,15 +1368,14 @@ cursorRight(Buffer *buf, int n) { int i, delta = 1, cpos, vpos2; Line *l = buf->currentLine; - Lineprop *p; if (buf->firstLine == NULL) return; if (buf->pos == l->len && !(l->next && l->next->bpos)) return; i = buf->pos; - p = l->propBuf; #ifdef USE_M17N + Lineprop *p = l->propBuf; while (i + delta < l->len && p[i + delta] & PC_WCHAR2) delta++; #endif @@ -1419,13 +1418,12 @@ cursorLeft(Buffer *buf, int n) { int i, delta = 1, cpos; Line *l = buf->currentLine; - Lineprop *p; if (buf->firstLine == NULL) return; i = buf->pos; - p = l->propBuf; #ifdef USE_M17N + Lineprop *p = l->propBuf; while (i - delta > 0 && p[i - delta] & PC_WCHAR2) delta++; #endif diff --git a/etc.c b/etc.c index aeb65ec..0df0888 100644 --- a/etc.c +++ b/etc.c @@ -253,8 +253,10 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor) char *es = NULL; #endif int do_copy = FALSE; +#ifdef USE_M17N int i; int plen = 0, clen; +#endif if (prop_size < s->length) { prop_size = (s->length > LINELEN) ? s->length : LINELEN; @@ -429,7 +431,6 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor) } #endif - plen = get_mclen(str); mode = get_mctype(str) | effect; #ifdef USE_ANSI_COLOR if (color) { @@ -439,6 +440,7 @@ checkType(Str s, Lineprop **oprop, Linecolor **ocolor) #endif *(prop++) = mode; #ifdef USE_M17N + plen = get_mclen(str); if (plen > 1) { mode = (mode & ~PC_WCHAR1) | PC_WCHAR2; for (i = 1; i < plen; i++) { diff --git a/file.c b/file.c index aeb3bf4..04c2872 100644 --- a/file.c +++ b/file.c @@ -8164,7 +8164,6 @@ int save2tmp(URLFile uf, char *tmpf) { FILE *ff; - int check; clen_t linelen = 0, trbyte = 0; MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; static JMP_BUF env_bak; @@ -8181,8 +8180,8 @@ save2tmp(URLFile uf, char *tmpf) goto _end; } TRAP_ON; - check = 0; #ifdef USE_NNTP + int check = 0; if (uf.scheme == SCM_NEWS) { char c; while (c = UFgetc(&uf), !iseos(uf.stream)) { diff --git a/linein.c b/linein.c index 22b4ac8..b58cad6 100644 --- a/linein.c +++ b/linein.c @@ -77,8 +77,6 @@ static Str strCurrentBuf; static int use_hist; #ifdef USE_M17N static void ins_char(Str str); -#else -static void ins_char(char c); #endif char * diff --git a/table.c b/table.c index a8e6598..0a43156 100644 --- a/table.c +++ b/table.c @@ -419,7 +419,7 @@ suspend_or_pushdata(struct table *tbl, char *line) #ifdef USE_M17N #define PUSH_TAG(str,n) Strcat_charp_n(tagbuf, str, n) #else -#define PUSH_TAG(str,n) Strcat_char(tagbuf, *str) +#define PUSH_TAG(str,n) Strcat_char(tagbuf, *str), (void)n #endif int visible_length_offset = 0;