home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / CLIBSRC.ZIP / TMPNAM.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  946 b   |  41 lines

  1. /*-----------------------------------------------------------------------*
  2.  * filename - tmpnam.c
  3.  *
  4.  * function(s)
  5.  *        tmpnam   - builds a unique file name
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 5.0
  10.  *
  11.  *      Copyright (c) 1987, 1992 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16.  
  17. #include <stdio.h>
  18. #include <_stdio.h>
  19. #include <RtlData.h>
  20.  
  21. #if !defined( _RTLDLL )
  22. extern unsigned _tmpnum;
  23. #endif
  24.  
  25. /*---------------------------------------------------------------------*
  26.  
  27. Name            tmpnam - builds a unique file name
  28.  
  29. Usage           char *tmpnam(char *s);
  30.  
  31. Prototype in    stdio.h
  32.  
  33. Return value    a unique temporary file name
  34.  
  35. *---------------------------------------------------------------------*/
  36.  
  37. char * _FARFUNC tmpnam(char *s)
  38. {
  39.     return (__tmpnam(s, &_RTLInstanceData(_tmpnum)));
  40. }
  41.