fixed -I option

This commit is contained in:
ceriel 1990-06-28 18:06:16 +00:00
parent 56858bb480
commit 266d247470
3 changed files with 14 additions and 37 deletions

View file

@ -177,21 +177,14 @@ deleted, is now a debug-flag
register char *new = text;
if (++inc_total > inc_max) {
char **n = (char **)
Malloc((10+inc_max)*sizeof(char *));
for (i = 0; i < inc_max; i++) {
n[i] = inctable[i];
}
free((char *) inctable);
inctable = n;
inc_max += 10;
inctable = (char **)
Realloc(inctable,(inc_max+=10)*sizeof(char *));
}
i = inc_pos++;
while (new) {
for (i = inc_pos++; i <= inc_total; i++) {
char *tmp = inctable[i];
inctable[i++] = new;
inctable[i] = new;
new = tmp;
}
}

View file

@ -131,20 +131,12 @@ DoOption(text)
register char *new = text;
if (++nDEF > mDEF) {
char **n = (char **)
Malloc((unsigned)((10+mDEF)*sizeof(char *)));
for (i = 0; i < mDEF; i++) {
n[i] = DEFPATH[i];
}
free((char *) DEFPATH);
DEFPATH = n;
mDEF += 10;
DEFPATH = (char **)
Realloc(DEFPATH,(mDEF+=10)*sizeof(char *));
}
i = ndirs++;
while (new) {
register char *tmp = DEFPATH[i];
for (i = ndirs++; i <= nDEF; i++) {
char *tmp = DEFPATH[i];
DEFPATH[i++] = new;
new = tmp;

View file

@ -89,21 +89,13 @@ do_option(text)
register char *new = text;
if (++inc_total > inc_max) {
char **n = (char **)
Malloc((10 + inc_max) * sizeof(char *));
for (i = 0; i < inc_max; i++) {
n[i] = inctable[i];
}
free((char *) inctable);
inctable = n;
inc_max += 10;
inctable = (char **)
Realloc(inctable,(inc_max+=10)*sizeof(char *));
}
i = inc_pos++;
while (new) {
register char *tmp = inctable[i];
for(i = inc_pos++; i <= inc_total; i++) {
char *tmp = inctable[i];
inctable[i++] = new;
new = tmp;
}