version 1.2, 1996/06/26 05:34:27 |
version 1.3, 1996/10/28 00:36:23 |
|
|
#include <ctype.h> |
#include <ctype.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
#include <errno.h> |
#include "indent_globs.h" |
#include "indent_globs.h" |
|
|
/* profile types */ |
/* profile types */ |
|
|
char fname[BUFSIZ]; |
char fname[BUFSIZ]; |
static char prof[] = ".indent.pro"; |
static char prof[] = ".indent.pro"; |
|
|
|
if (strlen(getenv("HOME")) + sizeof(prof) > sizeof(fname)) { |
|
warnx("%s/%s: %s", getenv("HOME"), prof, strerror(ENAMETOOLONG)); |
|
return; |
|
} |
sprintf(fname, "%s/%s", getenv("HOME"), prof); |
sprintf(fname, "%s/%s", getenv("HOME"), prof); |
if ((f = fopen(option_source = fname, "r")) != NULL) { |
if ((f = fopen(option_source = fname, "r")) != NULL) { |
scan_profile(f); |
scan_profile(f); |