diff options
author | James Cloos <cloos@freedesktop.org> | 2011-08-30 03:35:26 -0700 |
---|---|---|
committer | James Cloos <cloos@freedesktop.org> | 2011-08-30 03:35:26 -0700 |
commit | f2a102d2e974ad0b6f7bd548b04c6fc39601d173 (patch) | |
tree | dd14e07964656a7fbf47a7f813f5f7ac7a93a9d2 /goo/vms_unlink.c |
xpdf-3.02xpdf-3.02
Diffstat (limited to 'goo/vms_unlink.c')
-rw-r--r-- | goo/vms_unlink.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/goo/vms_unlink.c b/goo/vms_unlink.c new file mode 100644 index 0000000..e2cf687 --- /dev/null +++ b/goo/vms_unlink.c @@ -0,0 +1,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)); +} |