version 1.11, 2002/10/07 13:57:10 |
version 1.12, 2003/04/01 04:51:16 |
|
|
|
|
home = getenv("HOME"); |
home = getenv("HOME"); |
if (home != NULL && *home != '\0') { |
if (home != NULL && *home != '\0') { |
if (strlen(home) + sizeof(prof) + 1 > sizeof(fname)) { |
if (snprintf(fname, sizeof fname, "%s/%s", home, prof) >= sizeof fname) { |
warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG)); |
warnx("%s/%s: %s", home, prof, strerror(ENAMETOOLONG)); |
return; |
return; |
} |
} |
sprintf(fname, "%s/%s", home, prof); |
|
if ((f = fopen(option_source = fname, "r")) != NULL) { |
if ((f = fopen(option_source = fname, "r")) != NULL) { |
scan_profile(f); |
scan_profile(f); |
(void) fclose(f); |
(void) fclose(f); |