+ T((T_CALLED("ungetch(%p,%s)"), (void *) sp, _nc_tracechar(sp, ch)));
+
+ if (sp != 0 && tail >= 0) {
+ if (head < 0) {
+ head = 0;
+ t_inc();
+ peek = tail; /* no raw keys */
+ } else {
+ h_dec();
+ }
+
+ sp->_fifo[head] = ch;
+ T(("ungetch %s ok", _nc_tracechar(sp, ch)));