static void inpoptop(void) { if (inbuf && (inbufflags & INP_FREE)) free(inbuf); instacktop--; inbuf = instacktop->buf; inbufptr = inbufpush = instacktop->bufptr; inbufleft = instacktop->bufleft; inbufct = instacktop->bufct; inbufflags = instacktop->flags; if (!(inbufflags & INP_ALCONT)) return; if (instacktop->alias) { char *t = instacktop->alias->text; /* a real alias: mark it as unused. */ instacktop->alias->inuse = 0; if (*t && t[strlen(t) - 1] == ' ') { inalmore = 1; histbackword(); } } }
static void inpoptop(void) { if (!lexstop) { inbufflags &= ~(INP_ALCONT|INP_HISTCONT); while (inbufptr > inbuf) { inbufptr--; inbufct++; inbufleft++; /* * As elsewhere in input and history mechanisms: * unwinding aliases and unwinding history have different * implications as aliases are after the lexer while * history is before, but they're both pushed onto * the input stack. */ if ((inbufflags & (INP_ALIAS|INP_HIST|INP_RAW_KEEP)) == INP_ALIAS) zshlex_raw_back(); } } if (inbuf && (inbufflags & INP_FREE)) free(inbuf); instacktop--; inbuf = instacktop->buf; inbufptr = inbufpush = instacktop->bufptr; inbufleft = instacktop->bufleft; inbufct = instacktop->bufct; inbufflags = instacktop->flags; if (!(inbufflags & (INP_ALCONT|INP_HISTCONT))) return; if (instacktop->alias) { char *t = instacktop->alias->text; /* a real alias: mark it as unused. */ instacktop->alias->inuse = 0; if (*t && t[strlen(t) - 1] == ' ') { inalmore = 1; histbackword(); } } }