home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / auucp+-1.02 / fuucp_plus_src.lzh / lib / tmpfile.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-21  |  570 b   |  30 lines

  1.  
  2. /*
  3.  *  TMPFILE.C
  4.  *
  5.  *  $Header: Beta:src/uucp/src/lib/RCS/tmpfile.c,v 1.1 90/02/02 12:08:29 dillon Exp Locker: dillon $
  6.  *
  7.  *  (C) Copyright 1989-1990 by Matthew Dillon,  All Rights Reserved.
  8.  *
  9.  *  create a temporary file
  10.  *
  11.  *  template limited to 16 chars
  12.  */
  13.  
  14. #include <stdio.h>
  15. #include "config.h"
  16.  
  17. Prototype char *TmpFileName(const char *);
  18.  
  19. char *
  20. TmpFileName(template)
  21. const char *template;
  22. {
  23.     static char Template[256];
  24.     static unsigned short Idx;
  25.  
  26.     sprintf(Template, "%s-%08lx.TMP", template, (long)FindTask(NULL) + Idx++);
  27.     return(Template);
  28. }
  29.  
  30.