X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Ffmt_new.c;fp=sbr%2Ffmt_new.c;h=4e5637871b3bccc022d2b4e2d2d55d058f1c9479;hp=7576ae42b53d880ff4ad3dcc5a12b360a7d65647;hb=714b5c530ece27ea2835a313013f5b770163403c;hpb=ced6090a330d3d83d0bce709f756aa3d7d65fea4 diff --git a/sbr/fmt_new.c b/sbr/fmt_new.c index 7576ae4..4e56378 100644 --- a/sbr/fmt_new.c +++ b/sbr/fmt_new.c @@ -16,7 +16,7 @@ static char *formats = 0; /* ** static prototypes */ -static void normalize (char *); +static void normalize(char *); /* @@ -24,34 +24,34 @@ static void normalize (char *); */ char * -new_fs (char *form, char *format, char *default_fs) +new_fs(char *form, char *format, char *default_fs) { struct stat st; register FILE *fp; if (formats) - free (formats); + free(formats); if (form) { - if ((fp = fopen (etcpath (form), "r")) == NULL) - adios (form, "unable to open format file"); + if ((fp = fopen(etcpath(form), "r")) == NULL) + adios(form, "unable to open format file"); - if (fstat (fileno (fp), &st) == -1) - adios (form, "unable to stat format file"); + if (fstat(fileno(fp), &st) == -1) + adios(form, "unable to stat format file"); - formats = mh_xmalloc ((size_t) st.st_size + 1); + formats = mh_xmalloc((size_t) st.st_size + 1); - if (read (fileno(fp), formats, (int) st.st_size) != st.st_size) - adios (form, "error reading format file"); + if (read(fileno(fp), formats, (int) st.st_size) != st.st_size) + adios(form, "error reading format file"); formats[st.st_size] = '\0'; - fclose (fp); + fclose(fp); } else { - formats = getcpy (format ? format : default_fs); + formats = getcpy(format ? format : default_fs); } - normalize (formats); /* expand escapes */ + normalize(formats); /* expand escapes */ return formats; } @@ -62,7 +62,7 @@ new_fs (char *form, char *format, char *default_fs) */ static void -normalize (char *cp) +normalize(char *cp) { char *dp;