You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
265 B
C
16 lines
265 B
C
22 years ago
|
#include <unistd.h>
|
||
|
#include <fcntl.h>
|
||
|
#include "io_internal.h"
|
||
|
|
||
|
int io_createfile(int64* d,const char* s) {
|
||
|
long fd=open(s,O_WRONLY|O_CREAT|O_TRUNC,0600);
|
||
|
if (fd != -1) {
|
||
|
if (io_fd(fd)) {
|
||
|
*d=fd;
|
||
|
return 1;
|
||
|
}
|
||
|
close(fd);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|