This is m_scratch.c in view mode; [Download] [Up]
/* m_scratch.c - construct a scratch file */ #include "../h/mh.h" #include <stdio.h> char *m_scratch (file, template) register char *file, *template; { register char *cp; static char buffer[BUFSIZ], tmpfil[BUFSIZ]; (void) sprintf (tmpfil, "%sXXXXXX", template); (void) mktemp (tmpfil); if ((cp = r1bindex (file, '/')) == file) (void) strcpy (buffer, tmpfil); else (void) sprintf (buffer, "%.*s%s", cp - file, file, tmpfil); (void) unlink (buffer); return buffer; }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.