home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
UNLINK.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
646b
|
39 lines
/* unlink.c: by ERS. This routine is in the public domain */
#include <limits.h>
#include <stdlib.h>
#include <errno.h>
#include <osbind.h>
#include <fcntl.h>
#include "lib.h"
/* remove provided for ansi compatibility */
#ifndef __GNUC__
int remove(filename)
const char *filename;
{
return unlink(filename);
}
#endif
#ifdef __GNUC__
asm(".text; .even; .globl _remove; _remove:"); /* dept of dirty tricks */
#endif
int
unlink(filename)
const char * filename;
{
char name[PATH_MAX];
int r;
_unx2dos(filename, name);
r = (int)Fdelete(name);
if (r < 0) {
errno = -r;
return -1;
}
return 0;
}