Defdrive. Microware C Compiler
Διαφήμιση
Διαφήμιση
Defdrive
Name
Defdrive
— get default system drive
Synopsis
char * defdrive
(void);
Description
A call to defdrive returns a pointer to a string containing the name of the default system drive. The method used is to consult the "Init" module for the default directory name. The name is copied to a static data area and a pointer to it is returned.
Diagnostics
-1 is returned if the "Init" module cannot be linked to.
Dup
Chapter 3. C System Calls
The permissions allowed are defined in the include file as follows:
#define S_IPRM
#define S_IREAD
0xff
0x01
#define S_IWRITE 0x02
#define S_IEXEC 0x04
#define S_IOREAD 0x08
#define S_IOWRITE 0x10
#define S_IOEXEC 0x20
#define S_ISHARE 0x40
/* mask for permission bits */
/* owner read */
/* owner write */
/* owner execute */
/* public read */
/* public write */
/* public execute */
/* sharable */
Directories may not be created with this call; use "mknod()" instead.
Diagnostics
This call returns -1 if there are too many files open. If the pathname cannot be searched, if permission to write is denied, or if the file exists and is a directory.
See Also
Name
Dup
— duplicate an open path number
21
Chapter 3. C System Calls
Synopsis
dup
(int pn);
Assembler Equivalent
os9 I$DUP
Description
Dup takes the path number, "pn", as returned from "open()" or "creat()" and returns another path number associated with the same file.
Diagnostics
A -1 is returned is the call fails because there are too many files open or the path nmber is invalid.
See Also
Exit
Name
Exit, _Exit
— task termination
Synopsis
exit
(int status);
_exit
(int status);
Assembler Equivalent
os9 F$EXIT
Description
Exit is the normal means of terminating a task. Exit does any cleaning up operations required before terminating, such as flushing out any file buffers (see
Standard i/o), but _exit does not.
A task finishing normally, that is returning from "main()", is equivalent to a call -
"exit(0)".
The status passed to exit is available to the parent task if it is executing a "wait".
22
Λήψη
Διαφήμιση