projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added test-anno, test-dist, test-msgchk, and test-rcvtty.
[mmh]
/
sbr
/
fmt_new.c
diff --git
a/sbr/fmt_new.c
b/sbr/fmt_new.c
index
003ec2b
..
44a18b3
100644
(file)
--- a/
sbr/fmt_new.c
+++ b/
sbr/fmt_new.c
@@
-2,10
+2,13
@@
/*
* fmt_new.c -- read format file/string and normalize
*
/*
* fmt_new.c -- read format file/string and normalize
*
- * $Id$
+ * This code is Copyright (c) 2002, by the authors of nmh. See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
*/
#include <h/mh.h>
*/
#include <h/mh.h>
+#include <h/utils.h>
#define QUOTE '\\'
#define QUOTE '\\'
@@
-37,8
+40,7
@@
new_fs (char *form, char *format, char *default_fs)
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");
- if (!(formats = malloc ((size_t) st.st_size + 1)))
- adios (form, "unable to allocate space for format");
+ 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");