$NetBSD: patch-aa,v 1.1 2002/01/25 18:58:02 kleink Exp $ --- src/main.c.orig Thu Jun 25 10:26:00 1998 +++ src/main.c Fri Jan 25 19:35:40 2002 @@ -642,7 +642,6 @@ * Print Table of Contents page. */ int toc = 0; -char toc_fname[512]; FILE *toc_fp; char *toc_fmt_string; @@ -1429,19 +1428,10 @@ /* Table of Contents. */ if (toc) { - cp = tmpnam (toc_fname); - if (cp == NULL) + toc_fp = tmpfile (); + if (toc_fp == NULL) FATAL ((stderr, _("couldn't create toc file name: %s"), strerror (errno))); - - toc_fp = fopen (toc_fname, "w+b"); - if (toc_fp == NULL) - FATAL ((stderr, _("couldn't create toc file \"%s\": %s"), - toc_fname, strerror (errno))); - - if (remove (toc_fname) == 0) - /* Remove successfull, no need to remove file at exit. */ - toc_fname[0] = '\0'; } @@ -1519,10 +1509,6 @@ /* Clean up toc file. */ fclose (toc_fp); - - /* Do we have to remove the toc file? */ - if (toc_fname[0]) - (void) remove (toc_fname); } /* Give trailer a chance to dump itself. */