Changed all the licence notices in all the files.
[pspp-builds.git] / src / groff-font.c
index e4df2cff7c94788222323fc06eab5d610b251750..d321f2d7f0e563dc55e737173f772a4895c78ba1 100644 (file)
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include "font.h"
-#include <assert.h>
+#include "error.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -48,12 +48,6 @@ static void add_kern (struct font_desc * font, int ch1, int ch2, int adjust);
 /* Typical whitespace characters for tokenizing. */
 static const char whitespace[] = " \t\n\r\v";
 
-void
-groff_init (void)
-{
-  space_index = font_char_name_to_index ("space");
-}
-
 /* Some notes on the groff_font(8) manpage:
 
    DESC file format: A typical PostScript `res' would be 72000, with
@@ -92,7 +86,7 @@ groff_read_font (const char *fn)
   char *key;
 
   /* 0=kernpairs section, 1=charset section. */
-  int charset;
+  int charset = 0;
 
   /* Index for previous line. */
   int prev_index = -1;
@@ -447,6 +441,20 @@ static struct
   }
 hash;
 
+void
+groff_init (void)
+{
+  space_index = font_char_name_to_index ("space");
+}
+
+void
+groff_done (void)
+{
+  free (hash.tab) ;
+  pool_destroy(hash.ar);
+}
+
+
 /* Searches for NAME in the global character code table, returns the
    index if found; otherwise inserts NAME and returns the new
    index. */