1: /*
   2: char id_unlink[] = "@(#)unlink_.c	1.2";
   3:  *
   4:  * unlink (remove) a file
   5:  *
   6:  * calling sequence:
   7:  *	integer unlink
   8:  *	ierror = unlink(filename)
   9:  * where:
  10:  *	ierror will be a returned status (0 == OK)
  11:  *	filename is the file to be unlinked
  12:  */
  13: 
  14: #include    "../libI77/fiodefs.h"
  15: #include    <sys/param.h>
  16: #ifndef MAXPATHLEN
  17: #define MAXPATHLEN  128
  18: #endif
  19: 
  20: ftnint
  21: unlink_(fname, namlen)
  22: char *fname;
  23: ftnlen namlen;
  24: {
  25:     char buf[MAXPATHLEN];
  26: 
  27:     if (namlen >= sizeof buf)
  28:         return((ftnint)(errno=F_ERARG));
  29:     g_char(fname, namlen, buf);
  30:     if (unlink(buf) != 0)
  31:         return((ftnint)errno);
  32:     return((ftnint) 0);
  33: }

Defined functions

unlink_ defined in line 20; never used

Defined macros

MAXPATHLEN defined in line 17; used 2 times
Last modified: 1983-07-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 609
Valid CSS Valid XHTML 1.0 Strict