* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
TR(TRACE_IEVENT, ("pulling %s from %d", _nc_tracechar(sp, ch), head));
if (peek == head) {
h_inc();
peek = head;
TR(TRACE_IEVENT, ("pulling %s from %d", _nc_tracechar(sp, ch), head));
if (peek == head) {
h_inc();
peek = head;
/* ungetch in reverse order */
#ifdef NCURSES_WGETCH_EVENTS
rc = recur_wgetnstr(win, buf);
/* ungetch in reverse order */
#ifdef NCURSES_WGETCH_EVENTS
rc = recur_wgetnstr(win, buf);
- (void) recur_wgetnstr(win, buf);
- safe_ungetch(sp, '\n');
+ if (recur_wgetnstr(win, buf) != ERR)
+ safe_ungetch(sp, '\n');
#endif
for (bufp = buf + strlen(buf); bufp > buf; bufp--)
safe_ungetch(sp, bufp[-1]);
#endif
for (bufp = buf + strlen(buf); bufp > buf; bufp--)
safe_ungetch(sp, bufp[-1]);
if (ptr->value != 0) { /* sequence terminated */
TR(TRACE_IEVENT, ("end of sequence"));
if (ptr->value != 0) { /* sequence terminated */
TR(TRACE_IEVENT, ("end of sequence"));