version 1.8, 2001/09/19 10:58:07 |
version 1.9, 2002/05/29 18:33:39 |
|
|
goto dupit; |
goto dupit; |
if ((p = getenv("HOME")) != NULL && *p != '\0' && |
if ((p = getenv("HOME")) != NULL && *p != '\0' && |
(strlen(p) + strlen(FILENAME) + 1) < sizeof(path)) { |
(strlen(p) + strlen(FILENAME) + 1) < sizeof(path)) { |
(void)strcpy(path, p); |
(void)strlcpy(path, p, sizeof path); |
(void)strcat(path, "/"); |
(void)strlcat(path, "/", sizeof path); |
(void)strcat(path, FILENAME); |
(void)strlcat(path, FILENAME, sizeof path); |
if ((fd = open(p = path, O_RDWR|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR)) >= 0) |
if ((fd = open(p = path, O_RDWR|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR)) >= 0) |
goto dupit; |
goto dupit; |
} |
} |