1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)unlink_.c	5.1	6/7/85
   7:  */
   8: 
   9: /*
  10:  * unlink (remove) a file
  11:  *
  12:  * calling sequence:
  13:  *	integer unlink
  14:  *	ierror = unlink(filename)
  15:  * where:
  16:  *	ierror will be a returned status (0 == OK)
  17:  *	filename is the file to be unlinked
  18:  */
  19: 
  20: #include "../libI77/f_errno.h"
  21: #include <sys/param.h>
  22: #ifndef MAXPATHLEN
  23: #define MAXPATHLEN  128
  24: #endif
  25: 
  26: long
  27: unlink_(fname, namlen)
  28: char *fname;
  29: long namlen;
  30: {
  31:     char buf[MAXPATHLEN];
  32: 
  33:     if (namlen >= sizeof buf)
  34:         return((long)(errno=F_ERARG));
  35:     g_char(fname, namlen, buf);
  36:     if (unlink(buf) != 0)
  37:         return((long)errno);
  38:     return(0L);
  39: }

Defined functions

unlink_ defined in line 26; never used

Defined macros

MAXPATHLEN defined in line 23; used 2 times
Last modified: 1985-06-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 666
Valid CSS Valid XHTML 1.0 Strict