X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_scan.c;h=17c42df59aa91d5d794310f5cab22a8a7156f836;hp=5c67ffc872277c3a74f8a308c4c15f849b60f22e;hb=03f728e5bb3630a54fffc4a2ff2f8dbfcce9088e;hpb=8e25fff6a5f576b6dc35eb02b9783fa58680d07b diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 5c67ffc8..17c42df5 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -50,7 +50,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.92 2011/07/30 21:36:33 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.94 2011/10/22 15:46:43 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -257,12 +257,12 @@ next_char(void) } static void -push_back(char c) +push_back(int c) /* push a character back onto the input stream */ { if (bufptr == bufstart) _nc_syserr_abort("Can't backspace off beginning of line"); - *--bufptr = c; + *--bufptr = (char) c; _nc_curr_col--; } @@ -750,7 +750,7 @@ _nc_trans_string(char *ptr, char *last) if (!(is7bits(c) && isprint(c))) { _nc_warning("Illegal ^ character - '%s'", unctrl(UChar(c))); } - if (c == '?') { + if (c == '?' && (_nc_syntax != SYN_TERMCAP)) { *(ptr++) = '\177'; if (_nc_tracing) _nc_warning("Allow ^? as synonym for \\177"); @@ -782,7 +782,7 @@ _nc_trans_string(char *ptr, char *last) /* allow the digit; it'll do less harm */ } } else { - push_back((char) c); + push_back(c); break; } } @@ -878,7 +878,7 @@ _nc_trans_string(char *ptr, char *last) if (!ignored) { if (_nc_curr_col <= 1) { - push_back((char) c); + push_back(c); c = '\n'; break; }