X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2..86c5ebc87:/sbr/fmt_new.c?ds=inline diff --git a/sbr/fmt_new.c b/sbr/fmt_new.c index c1bc7c73..18f48987 100644 --- a/sbr/fmt_new.c +++ b/sbr/fmt_new.c @@ -2,8 +2,6 @@ /* * 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. @@ -30,10 +28,9 @@ char * new_fs (char *form, char *format, char *default_fs) { struct stat st; - register FILE *fp; + FILE *fp; - if (formats) - free (formats); + mh_xfree(formats); if (form) { if ((fp = fopen (etcpath (form), "r")) == NULL) @@ -60,6 +57,13 @@ new_fs (char *form, char *format, char *default_fs) } +void +free_fs (){ + free (formats); + formats = 0; +} + + /* * Expand escapes in format strings */