1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-05 11:01:13 +02:00

zsh-workers/9618

This commit is contained in:
Tanaka Akira 2000-02-08 11:43:01 +00:00
parent a1e0eed861
commit 96ecd59d28

View file

@ -875,7 +875,7 @@ get_cadef(char *nam, char **args)
Cadef *p, *min, new; Cadef *p, *min, new;
int i, na = arrlen(args); int i, na = arrlen(args);
for (i = MAX_CACACHE, p = cadef_cache, min = NULL; *p && i--; p++) for (i = MAX_CACACHE, p = cadef_cache, min = NULL; *p && i; p++, i--)
if (*p && na == (*p)->ndefs && arrcmp(args, (*p)->defs)) { if (*p && na == (*p)->ndefs && arrcmp(args, (*p)->defs)) {
(*p)->lastt = time(0); (*p)->lastt = time(0);
@ -1003,6 +1003,7 @@ ca_inactive(Cadef d, char **xor)
struct castate { struct castate {
Cadef d; Cadef d;
int nopts;
Caarg def, ddef; Caarg def, ddef;
Caopt curopt; Caopt curopt;
int opt, arg, argbeg, optbeg, nargbeg, restbeg; int opt, arg, argbeg, optbeg, nargbeg, restbeg;
@ -1029,7 +1030,7 @@ ca_parse_line(Cadef d)
/* Free old state. */ /* Free old state. */
if (ca_alloced) { if (ca_alloced) {
int i = ca_laststate.d->nopts; int i = ca_laststate.nopts;
LinkList *p = ca_laststate.oargs; LinkList *p = ca_laststate.oargs;
freelinklist(ca_laststate.args, freestr); freelinklist(ca_laststate.args, freestr);
@ -1048,6 +1049,7 @@ ca_parse_line(Cadef d)
/* Default values for the state. */ /* Default values for the state. */
state.d = d; state.d = d;
state.nopts = d->nopts;
state.def = state.ddef = NULL; state.def = state.ddef = NULL;
state.curopt = NULL; state.curopt = NULL;
state.argbeg = state.optbeg = state.nargbeg = state.restbeg = state.argbeg = state.optbeg = state.nargbeg = state.restbeg =