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

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* Return the default command for unzipping files */
  5.  
  6. char    *unzip()
  7. {
  8.     extern    char    *cdrom();
  9.  
  10.     static    char    retbuf[BUFSIZ];
  11.  
  12.     if (getenv("UNZIP") == NULL)
  13.     {
  14.         sprintf (retbuf,"%s\\pkunzip -d",cdrom());
  15.     }
  16.     else
  17.     {
  18.         sprintf (retbuf,"%s",getenv("UNZIP"));
  19.     }
  20.  
  21.     return retbuf;
  22. }
  23.  
  24. /* Returns the default command for unarcing files */
  25.  
  26. char    *unarc()
  27. {
  28.     extern    char    *cdrom();
  29.  
  30.     static    char    retbuf[BUFSIZ];
  31.  
  32.     if (getenv("UNARC") == NULL)
  33.     {
  34.         sprintf (retbuf,"%s\\pkunpak",cdrom());
  35.     }
  36.     else
  37.     {
  38.         sprintf (retbuf,"%s",getenv("UNARC"));
  39.     }
  40.  
  41.     return retbuf;
  42. }