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