File: unlink.c

package info (click to toggle)
cvs 2%3A1.12.13%2Breal-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 18,124 kB
  • sloc: ansic: 100,303; sh: 33,775; asm: 3,281; perl: 2,818; ada: 1,681; makefile: 1,581; yacc: 1,184; pascal: 1,082; cpp: 1,001; lisp: 35
file content (28 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <unixio.h>

/* UNIX-like file deletion, deletes previous VMS file versions so UNIX
   style locking through files dosen't lose.  */
#ifndef __VMS_VER
int vms_unlink(char *path)
#elif __VMS_VER < 70200000
int vms_unlink(char *path)
#else
int vms_unlink(char const*path)
#endif
{
  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;
}