Merge ncurses vendor changes (v5_1_20000701->v5_1_20001009) onto mainline
This commit is contained in:
parent
6e0da8f8c9
commit
5702016eec
@ -52,7 +52,7 @@
|
||||
#include <term_entry.h>
|
||||
#include <tic.h>
|
||||
|
||||
MODULE_ID("$Id: comp_scan.c,v 1.44 2000/06/10 21:59:21 tom Exp $")
|
||||
MODULE_ID("$Id: comp_scan.c,v 1.47 2000/09/24 01:15:17 tom Exp $")
|
||||
|
||||
/*
|
||||
* Maximum length of string capability we'll accept before raising an error.
|
||||
@ -82,6 +82,10 @@ static char separator; /* capability separator */
|
||||
static int pushtype; /* type of pushback token */
|
||||
static char pushname[MAX_NAME_SIZE + 1];
|
||||
|
||||
#if NCURSES_EXT_FUNCS
|
||||
bool _nc_disable_period = FALSE; /* used by tic -a option */
|
||||
#endif
|
||||
|
||||
static int last_char(void);
|
||||
static int next_char(void);
|
||||
static long stream_pos(void);
|
||||
@ -151,7 +155,7 @@ _nc_get_token(void)
|
||||
|
||||
_nc_set_type(pushname);
|
||||
DEBUG(3, ("pushed-back token: `%s', class %d",
|
||||
_nc_curr_token.tk_name, pushtype));
|
||||
_nc_curr_token.tk_name, pushtype));
|
||||
|
||||
pushtype = NO_PUSHBACK;
|
||||
pushname[0] = '\0';
|
||||
@ -178,10 +182,10 @@ _nc_get_token(void)
|
||||
ch = next_char();
|
||||
|
||||
if (ch == '.'
|
||||
#ifdef NCURSES_EXT_FUNCS
|
||||
&& !_nc_disable_period
|
||||
#if NCURSES_EXT_FUNCS
|
||||
&& !_nc_disable_period
|
||||
#endif
|
||||
) {
|
||||
) {
|
||||
dot_flag = TRUE;
|
||||
DEBUG(8, ("dot-flag set"));
|
||||
|
||||
@ -196,12 +200,12 @@ _nc_get_token(void)
|
||||
|
||||
/* have to make some punctuation chars legal for terminfo */
|
||||
if (!isalnum(ch)
|
||||
#ifdef NCURSES_EXT_FUNCS
|
||||
&& !(ch == '.' && _nc_disable_period)
|
||||
#if NCURSES_EXT_FUNCS
|
||||
&& !(ch == '.' && _nc_disable_period)
|
||||
#endif
|
||||
&& !strchr(terminfo_punct, (char) ch)) {
|
||||
&& !strchr(terminfo_punct, (char) ch)) {
|
||||
_nc_warning("Illegal character (expected alphanumeric or %s) - %s",
|
||||
terminfo_punct, unctrl(ch));
|
||||
terminfo_punct, unctrl(ch));
|
||||
_nc_panic_mode(separator);
|
||||
goto start_token;
|
||||
}
|
||||
@ -338,7 +342,7 @@ _nc_get_token(void)
|
||||
case '@':
|
||||
if ((ch = next_char()) != separator)
|
||||
_nc_warning("Missing separator after `%s', have %s",
|
||||
buffer, unctrl(ch));
|
||||
buffer, unctrl(ch));
|
||||
_nc_curr_token.tk_name = buffer;
|
||||
type = CANCEL;
|
||||
break;
|
||||
@ -391,30 +395,30 @@ _nc_get_token(void)
|
||||
switch (type) {
|
||||
case BOOLEAN:
|
||||
_tracef("Token: Boolean; name='%s'",
|
||||
_nc_curr_token.tk_name);
|
||||
_nc_curr_token.tk_name);
|
||||
break;
|
||||
|
||||
case NUMBER:
|
||||
_tracef("Token: Number; name='%s', value=%d",
|
||||
_nc_curr_token.tk_name,
|
||||
_nc_curr_token.tk_valnumber);
|
||||
_nc_curr_token.tk_name,
|
||||
_nc_curr_token.tk_valnumber);
|
||||
break;
|
||||
|
||||
case STRING:
|
||||
_tracef("Token: String; name='%s', value=%s",
|
||||
_nc_curr_token.tk_name,
|
||||
_nc_visbuf(_nc_curr_token.tk_valstring));
|
||||
_nc_curr_token.tk_name,
|
||||
_nc_visbuf(_nc_curr_token.tk_valstring));
|
||||
break;
|
||||
|
||||
case CANCEL:
|
||||
_tracef("Token: Cancel; name='%s'",
|
||||
_nc_curr_token.tk_name);
|
||||
_nc_curr_token.tk_name);
|
||||
break;
|
||||
|
||||
case NAMES:
|
||||
|
||||
_tracef("Token: Names; value='%s'",
|
||||
_nc_curr_token.tk_name);
|
||||
_nc_curr_token.tk_name);
|
||||
break;
|
||||
|
||||
case EOF:
|
||||
@ -571,7 +575,7 @@ _nc_trans_string(char *ptr, char *last)
|
||||
|
||||
default:
|
||||
_nc_warning("Illegal character %s in \\ sequence",
|
||||
unctrl(ch));
|
||||
unctrl(ch));
|
||||
*(ptr++) = (char) ch;
|
||||
} /* endswitch (ch) */
|
||||
} /* endelse (ch < '0' || ch > '7') */
|
||||
@ -621,7 +625,7 @@ _nc_push_token(int tokclass)
|
||||
_nc_get_type(pushname);
|
||||
|
||||
DEBUG(3, ("pushing token: `%s', class %d",
|
||||
_nc_curr_token.tk_name, pushtype));
|
||||
_nc_curr_token.tk_name, pushtype));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -736,7 +740,7 @@ next_char(void)
|
||||
} while
|
||||
(bufstart != NULL && line[0] == '#');
|
||||
|
||||
if (bufstart == NULL)
|
||||
if (bufstart == NULL || *bufstart == 0)
|
||||
return (EOF);
|
||||
|
||||
while (iswhite(*bufptr))
|
||||
@ -749,10 +753,19 @@ next_char(void)
|
||||
if ((len = strlen(bufptr)) > 1) {
|
||||
if (bufptr[len - 1] == '\n'
|
||||
&& bufptr[len - 2] == '\r') {
|
||||
bufptr[len - 2] = '\n';
|
||||
bufptr[len - 1] = '\0';
|
||||
len--;
|
||||
bufptr[len - 1] = '\n';
|
||||
bufptr[len] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we don't have a trailing newline, it's because the line is simply
|
||||
* too long. Give up. (FIXME: We could instead reallocate the line
|
||||
* buffer and allow arbitrary-length lines).
|
||||
*/
|
||||
if (len == 0 || (bufptr[len - 1] != '\n'))
|
||||
return (EOF);
|
||||
}
|
||||
|
||||
first_column = (bufptr == bufstart);
|
||||
@ -782,7 +795,7 @@ end_of_stream(void)
|
||||
/* are we at end of input? */
|
||||
{
|
||||
return ((yyin ? feof(yyin) : (bufptr && *bufptr == '\0'))
|
||||
? TRUE : FALSE);
|
||||
? TRUE : FALSE);
|
||||
}
|
||||
|
||||
/* comp_scan.c ends here */
|
||||
|
@ -50,9 +50,9 @@
|
||||
#include <curses.priv.h>
|
||||
#include <term.h> /* cur_term */
|
||||
|
||||
MODULE_ID("$Id: lib_raw.c,v 1.7 2000/02/13 01:01:26 tom Exp $")
|
||||
MODULE_ID("$Id: lib_raw.c,v 1.8 2000/09/02 18:08:48 tom Exp $")
|
||||
|
||||
#if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE)
|
||||
#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
#define __INTERNAL_CAPS_VISIBLE
|
||||
#include <term_entry.h>
|
||||
|
||||
MODULE_ID("$Id: lib_termcap.c,v 1.36 2000/02/13 01:01:26 tom Exp $")
|
||||
MODULE_ID("$Id: lib_termcap.c,v 1.37 2000/09/16 20:30:16 tom Exp $")
|
||||
|
||||
/*
|
||||
some of the code in here was contributed by:
|
||||
@ -208,19 +208,3 @@ tgetstr(NCURSES_CONST char *id, char **area)
|
||||
}
|
||||
returnPtr(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* char *
|
||||
* tgoto(string, x, y)
|
||||
*
|
||||
* Retained solely for upward compatibility. Note the intentional
|
||||
* reversing of the last two arguments.
|
||||
*
|
||||
*/
|
||||
|
||||
char *
|
||||
tgoto(const char *string, int x, int y)
|
||||
{
|
||||
T((T_CALLED("tgoto(%s,%d,%d)"), string, x, y));
|
||||
returnPtr(tparm((NCURSES_CONST char *) string, y, x));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user