*** src/main.c.orig	Thu Jun 18 17:54:14 1998
--- src/main.c	Thu Jun 18 17:55:12 1998
***************
*** 603,613 ****
  {
  #define PREFIX "% "
    FILE * tmp_file;
!   char * tmp_filename;
    char buf [BUFSIZ];
  
!   tmp_filename = tmpnam (NULL);
!   tmp_file = fopen (tmp_filename, "w");
    if (!tmp_file)
      error (1, errno, _("cannot open file `%s'"), tmp_filename);
  
--- 603,613 ----
  {
  #define PREFIX "% "
    FILE * tmp_file;
!   char tmp_filename[40];
    char buf [BUFSIZ];
  
!   snprintf(tmp_filename, 40, "%s/a2ps.XXXXXXXX", P_tmpdir);
!   tmp_file = fdopen (mkstemp(tmp_filename), "w");
    if (!tmp_file)
      error (1, errno, _("cannot open file `%s'"), tmp_filename);
  
