home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
mint
/
mntlib16.lzh
/
MNTLIB16
/
MKDIR.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-03
|
492b
|
31 lines
/* mkdir: make a new directory
* written by Eric R. Smith and placed in the public domain
*/
#include <limits.h>
#include <osbind.h>
#include <mintbind.h>
#include "lib.h"
extern int errno;
extern int __mint;
int mkdir(_path, mode)
const char *_path;
unsigned mode;
{
int rv;
char path[PATH_MAX];
_unx2dos(_path, path);
rv = Dcreate(path);
if (rv < 0) {
errno = -rv;
return -1;
}
if (__mint >= 9) {
(void)Fchmod(path, mode);
}
return 0;
}