X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_scan.c;h=e747effcae6df501bf46ea7517642fb847abb819;hp=140960a8c239b5f6fcbf799fa79a4fb991e74a73;hb=dfaa1a3001fd447819f5edc2e523acc1a04f1440;hpb=8f527f87c0b979d9c2598ef5c3394463af288468;ds=sidebyside diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 140960a8..e747effc 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -51,7 +51,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.82 2008/08/04 20:25:03 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.84 2009/05/09 16:37:42 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -61,19 +61,13 @@ MODULE_ID("$Id: comp_scan.c,v 1.82 2008/08/04 20:25:03 tom Exp $") #define iswhite(ch) (ch == ' ' || ch == '\t') -NCURSES_EXPORT_VAR(int) -_nc_syntax = 0; /* termcap or terminfo? */ -NCURSES_EXPORT_VAR(long) -_nc_curr_file_pos = 0; /* file offset of current line */ -NCURSES_EXPORT_VAR(long) -_nc_comment_start = 0; /* start of comment range before name */ -NCURSES_EXPORT_VAR(long) -_nc_comment_end = 0; /* end of comment range before name */ -NCURSES_EXPORT_VAR(long) -_nc_start_line = 0; /* start line of current entry */ - -NCURSES_EXPORT_VAR(struct token) -_nc_curr_token = +NCURSES_EXPORT_VAR (int) _nc_syntax = 0; /* termcap or terminfo? */ +NCURSES_EXPORT_VAR (long) _nc_curr_file_pos = 0; /* file offset of current line */ +NCURSES_EXPORT_VAR (long) _nc_comment_start = 0; /* start of comment range before name */ +NCURSES_EXPORT_VAR (long) _nc_comment_end = 0; /* end of comment range before name */ +NCURSES_EXPORT_VAR (long) _nc_start_line = 0; /* start line of current entry */ + +NCURSES_EXPORT_VAR (struct token) _nc_curr_token = { 0, 0, 0 }; @@ -91,8 +85,7 @@ static int pushtype; /* type of pushback token */ static char *pushname; #if NCURSES_EXT_FUNCS -NCURSES_EXPORT_VAR(bool) -_nc_disable_period = FALSE; /* used by tic -a option */ +NCURSES_EXPORT_VAR (bool) _nc_disable_period = FALSE; /* used by tic -a option */ #endif /***************************************************************************** @@ -300,7 +293,7 @@ eat_escaped_newline(int ch) ((tok_ptr - tok_buf) < (TOK_BUF_SIZE - 2)) #define AddCh(ch) \ - *tok_ptr++ = ch; \ + *tok_ptr++ = (char) ch; \ *tok_ptr = '\0' /* @@ -519,7 +512,7 @@ _nc_get_token(bool silent) ch = *after_name; *after_name = '\0'; _nc_set_type(tok_buf); - *after_name = ch; + *after_name = (char) ch; } /* @@ -604,7 +597,7 @@ _nc_get_token(bool silent) case '#': found = 0; while (isalnum(ch = next_char())) { - numbuf[found++] = ch; + numbuf[found++] = (char) ch; if (found >= sizeof(numbuf) - 1) break; } @@ -637,7 +630,8 @@ _nc_get_token(bool silent) /* just to get rid of the compiler warning */ type = UNDEF; if (!silent) - _nc_warning("Illegal character - '%s'", unctrl((chtype) ch)); + _nc_warning("Illegal character - '%s'", + unctrl((chtype) ch)); } } /* end else (first_column == FALSE) */ } /* end else (ch != EOF) */ @@ -868,7 +862,7 @@ _nc_trans_string(char *ptr, char *last) if (!ignored) { if (_nc_curr_col <= 1) { - push_back(ch); + push_back((char) ch); ch = '\n'; break; }