1: /* m_scratch.c - construct a scratch file */
   2: 
   3: #include "../h/mh.h"
   4: #include <stdio.h>
   5: 
   6: 
   7: char   *m_scratch (file, template)
   8: register char  *file,
   9:                *template;
  10: {
  11:     register char  *cp;
  12:     static char buffer[BUFSIZ],
  13:         tmpfil[BUFSIZ];
  14: 
  15:     (void) sprintf (tmpfil, "%sXXXXXX", template);
  16:     (void) mktemp (tmpfil);
  17:     if ((cp = r1bindex (file, '/')) == file)
  18:     (void) strcpy (buffer, tmpfil);
  19:     else
  20:     (void) sprintf (buffer, "%.*s%s", cp - file, file, tmpfil);
  21:     (void) unlink (buffer);
  22: 
  23:     return buffer;
  24: }

Defined functions

m_scratch defined in line 7; never used
Last modified: 1985-09-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 526
Valid CSS Valid XHTML 1.0 Strict