version 1.1.1.1, 2012/02/21 23:37:58
|
version 1.1.1.2, 2014/06/15 19:53:38
|
Line 34 int open(const char *filename,int oflag, ...)
|
Line 34 int open(const char *filename,int oflag, ...)
|
char mode[3]; /* mode[0] ="w/r/a" mode[1]="+" */ |
char mode[3]; /* mode[0] ="w/r/a" mode[1]="+" */ |
mode[2]=0; |
mode[2]=0; |
if ( oflag==(O_WRONLY|O_CREAT) ) |
if ( oflag==(O_WRONLY|O_CREAT) ) |
mode[0]="w"; | mode[0]='w'; |
else if (oflag==O_RDONLY) |
else if (oflag==O_RDONLY) |
mode[0]="r"; | mode[0]='r'; |
return fopen(filename, mode); | return (int) fopen(filename, mode); |
| |
} |
} |
|
|
int close(int handle) |
int close(int handle) |