- if (!(homedir = getenv("HOME")))
- homedir = DEFAULT_HOMEDIR;
- len = strlen(homedir) + strlen(CONFIGFILE_LOC) + 1;
- if (!(configfile = calloc(len, sizeof(char))))
- goto out_noopen;
- strncpy(configfile, homedir, strlen(homedir));
- strncat(configfile, CONFIGFILE_LOC, strlen(CONFIGFILE_LOC));
-
- if (!(fp = fopen(configfile, "r")))