home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / util / cdro / 003 / tmpdir.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-19  |  371 b   |  22 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* Return the name of the default target directory */
  5.  
  6. char    *tmpdir()
  7. {
  8.     static char retbuf[BUFSIZ];
  9.  
  10.     if (getenv("TMPDIR") == NULL)
  11.     {
  12.         /* Default current directory */
  13.         strcpy (retbuf,".");
  14.     }
  15.     else
  16.     {
  17.         /* If TMPDIR is set use this as default */
  18.         strcpy (retbuf,getenv("TMPDIR"));
  19.     }
  20.     return (retbuf);
  21. }
  22.