version 1.2, 1996/06/26 05:40:49 |
version 1.3, 1996/10/15 23:47:22 |
|
|
register value_t *p; |
register value_t *p; |
register char *cp; |
register char *cp; |
FILE *f; |
FILE *f; |
char file[256]; |
char file[FILENAME_MAX]; |
|
|
for (p = vtable; p->v_name != NULL; p++) { |
for (p = vtable; p->v_name != NULL; p++) { |
if (p->v_type&ENVIRON) |
if (p->v_type&ENVIRON) |
|
|
* Read the .tiprc file in the HOME directory |
* Read the .tiprc file in the HOME directory |
* for sets |
* for sets |
*/ |
*/ |
strcpy(file, value(HOME)); |
if (strlen(value(HOME)) + sizeof("/.tiprc") > sizeof(file)) { |
strcat(file, "/.tiprc"); |
fprintf(stderr, "Home directory path too long: %s\n", |
if ((f = fopen(file, "r")) != NULL) { |
value(HOME)); |
register char *tp; |
} else { |
|
strcpy(file, value(HOME)); |
|
strcat(file, "/.tiprc"); |
|
if ((f = fopen(file, "r")) != NULL) { |
|
register char *tp; |
|
|
while (fgets(file, sizeof(file)-1, f) != NULL) { |
while (fgets(file, sizeof(file)-1, f) != NULL) { |
if (vflag) |
if (vflag) |
printf("set %s", file); |
printf("set %s", file); |
if (tp = rindex(file, '\n')) |
if (tp = strrchr(file, '\n')) |
*tp = '\0'; |
*tp = '\0'; |
vlex(file); |
vlex(file); |
|
} |
|
fclose(f); |
} |
} |
fclose(f); |
|
} |
} |
/* |
/* |
* To allow definition of exception prior to fork |
* To allow definition of exception prior to fork |
|
|
register char *cp; |
register char *cp; |
char *expand(); |
char *expand(); |
|
|
if (cp = index(s, '=')) { |
if (cp = strchr(s, '=')) { |
*cp = '\0'; |
*cp = '\0'; |
if (p = vlookup(s)) { |
if (p = vlookup(s)) { |
cp++; |
cp++; |
|
|
} |
} |
return; |
return; |
} |
} |
} else if (cp = index(s, '?')) { |
} else if (cp = strchr(s, '?')) { |
*cp = '\0'; |
*cp = '\0'; |
if ((p = vlookup(s)) && vaccess(p->v_access, READ)) { |
if ((p = vlookup(s)) && vaccess(p->v_access, READ)) { |
vprint(p); |
vprint(p); |