version 1.4, 2001/01/29 01:58:07 |
version 1.5, 2001/05/03 12:57:22 |
|
|
lh = &(bheadp->b_list); |
lh = &(bheadp->b_list); |
else if ((flags & EFFILE) != 0) { |
else if ((flags & EFFILE) != 0) { |
buf[cpos] = '\0'; |
buf[cpos] = '\0'; |
wholelist = lh = make_file_list(buf, 0); |
wholelist = lh = make_file_list(buf); |
} else |
} else |
panic("broken complt call: flags"); |
panic("broken complt call: flags"); |
|
|
|
|
nhits = 0; |
nhits = 0; |
nxtra = HUGE; |
nxtra = HUGE; |
|
|
while (lh != NULL) { |
for (; lh != NULL; lh = lh->l_next) { |
for (i = 0; i < cpos; ++i) { |
if (memcmp(buf, lh->l_name, cpos) != 0) |
if (buf[i] != lh->l_name[i]) |
continue; |
break; |
if (nhits == 0) |
|
lh2 = lh; |
|
++nhits; |
|
if (lh->l_name[cpos] == '\0') |
|
nxtra = -1; |
|
else { |
|
bxtra = getxtra(lh, lh2, cpos, wflag); |
|
if (bxtra < nxtra) |
|
nxtra = bxtra; |
|
lh2 = lh; |
} |
} |
if (i == cpos) { |
|
if (nhits == 0) |
|
lh2 = lh; |
|
++nhits; |
|
if (lh->l_name[i] == '\0') |
|
nxtra = -1; |
|
else { |
|
bxtra = getxtra(lh, lh2, cpos, wflag); |
|
if (bxtra < nxtra) |
|
nxtra = bxtra; |
|
lh2 = lh; |
|
} |
|
} |
|
lh = lh->l_next; |
|
} |
} |
if (nhits == 0) |
if (nhits == 0) |
msg = " [No match]"; |
msg = " [No match]"; |
|
|
wholelist = lh = complete_function_list(buf, c); |
wholelist = lh = complete_function_list(buf, c); |
} else if ((flags & EFFILE) != 0) { |
} else if ((flags & EFFILE) != 0) { |
buf[cpos] = '\0'; |
buf[cpos] = '\0'; |
wholelist = lh = make_file_list(buf, 1); |
wholelist = lh = make_file_list(buf); |
/* |
/* |
* We don't want to display stuff up to the / for file |
* We don't want to display stuff up to the / for file |
* names preflen is the list of a prefix of what the |
* names preflen is the list of a prefix of what the |