Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/goo/vms_unlink.c
blob: e2cf687de4b868aa2a6f4bf36b65f81c4f9c309d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * vms_unlink.c
 *
 * A UNIX-style unlink() function for VMS.
 *
 * Thanks to Patrick Moreau (pmoreau@cena.dgac.fr).
 */

#include <descrip.h>
#include <string.h>
#include <lib$routines.h>

int unlink(char *filename) {
  static struct dsc$descriptor_s file_desc;

  file_desc.dsc$w_length = strlen(filename);
  file_desc.dsc$b_dtype  = DSC$K_DTYPE_T;
  file_desc.dsc$b_class  = DSC$K_CLASS_S;
  file_desc.dsc$a_pointer= filename;

  return (lib$delete_file(&file_desc));
}