File: unlink.c

package info (click to toggle)
gcvs 1.0final-12
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,248 kB
  • ctags: 10,631
  • sloc: ansic: 71,709; cpp: 39,780; sh: 18,434; makefile: 1,915; yacc: 1,299; tcl: 1,283; perl: 910; lex: 249; csh: 185; lisp: 7
file content (22 lines) | stat: -rwxr-xr-x 343 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <unixio.h>

/* UNIX-like file deletion, deletes previous VMS file versions so UNIX
   style locking through files dosen't lose.  */
int unlink(char *path)
{
  int rs, junk_rs;

  rs = remove(path);
  while(remove(path) >= 0);

  return rs;
}

int link(char *from, char *to)
{
  int rs = -1;

  /* Link always fails */

  return rs;
}