version 1.4, 1997/07/25 22:00:44 |
version 1.5, 2000/08/02 04:10:47 |
|
|
{ |
{ |
register FILE *f; |
register FILE *f; |
char fname[BUFSIZ]; |
char fname[BUFSIZ]; |
|
char *home; |
static char prof[] = ".indent.pro"; |
static char prof[] = ".indent.pro"; |
|
|
if (strlen(getenv("HOME")) + sizeof(prof) > sizeof(fname)) { |
home = getenv("HOME"); |
warnx("%s/%s: %s", getenv("HOME"), prof, strerror(ENAMETOOLONG)); |
if (home != NULL && *home != '\0') { |
return; |
if (strlen(home) + sizeof(prof) > sizeof(fname)) { |
} |
warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG)); |
sprintf(fname, "%s/%s", getenv("HOME"), prof); |
return; |
if ((f = fopen(option_source = fname, "r")) != NULL) { |
} |
scan_profile(f); |
sprintf(fname, "%s/%s", home, prof); |
(void) fclose(f); |
if ((f = fopen(option_source = fname, "r")) != NULL) { |
|
scan_profile(f); |
|
(void) fclose(f); |
|
} |
} |
} |
if ((f = fopen(option_source = prof, "r")) != NULL) { |
if ((f = fopen(option_source = prof, "r")) != NULL) { |
scan_profile(f); |
scan_profile(f); |