home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip21.zip / cmsmvs / cms.c next >
C/C++ Source or Header  |  1996-04-05  |  893b  |  36 lines

  1. /*
  2.  
  3.  Copyright (C) 1990-1996 Mark Adler, Richard B. Wales, Jean-loup Gailly,
  4.  Kai Uwe Rommel, Onno van der Linden, George Petrov and Igor Mandrichenko.
  5.  Permission is granted to any individual or institution to use, copy, or
  6.  redistribute this software so long as all of the original files are included,
  7.  that it is not sold for profit, and that this copyright notice is retained.
  8.  
  9. */
  10.  
  11. /*
  12.  * VM/CMS specific things.
  13.  */
  14.  
  15. #include "zip.h"
  16.  
  17. int procname(n)
  18. char *n;                /* name to process */
  19. /* Process a name or sh expression to operate on (or exclude).  Return
  20.    an error code in the ZE_ class. */
  21. {
  22.   FILE *stream;
  23.  
  24.   if (strcmp(n, "-") == 0)   /* if compressing stdin */
  25.     return newname(n, 0);
  26.   else {
  27.      if ((stream = fopen(n, "r")) != (FILE *)NULL)
  28.         {
  29.         fclose(stream);
  30.         return newname(n, 0);
  31.         }
  32.      else return ZE_MISS;
  33.   }
  34.   return ZE_OK;
  35. }
  36.