clibover.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 1,572 行 · 第 1/5 页

GML
1,572
字号
.note stdout
Standard Output: output to the
console
.ix '&KbIo' stdout
.ix stdout
.note stderr
.ix '&Errs' stderr
.ix stderr
Standard Error: output to the
console (used for error messages)
.if '&machsys' ne 'QNX' .do begin
.note stdaux
.ix stdaux
Standard Auxiliary: auxiliary port, available for use by a program
(not available in some Windows platforms)
.note stdprn
.ix stdprn
Standard Printer: available for use by a program
(not available in some Windows platforms)
.do end
.endnote
.np
These standard streams may be re-directed by use of the
.kw freopen
function.
.np
See also the section
.us File Manipulation Functions
for other functions which operate upon files.
.np
The functions referenced in the section
.us Operating System I/O Functions
may also be invoked (use the
.kw fileno
function to obtain the file &handle).
Since the stream functions may buffer input and output, these
functions should be used with caution to avoid unexpected results.
.np
.fdbeg
.fd *fun="clearerr" clear end-of-file and error indicators for stream
.fd *fun="fclose" close stream
.fd *fun="fcloseall" close all open streams
.fd *fun="fdopen" open stream, given &handle
.fd *fun="feof" test for end of file
.fd *fun="ferror" test for file error
.fd *fun="fflush" flush output buffer
.fd *fun="fgetc" get next character from file
.fd *fun="_fgetchar" equivalent to "fgetc" with the argument "stdin"
.fd *fun="fgetpos" get current file position
.fd *fun="fgets" get a string
.fd *fun="flushall" flush output buffers for all streams
.fd *fun="fopen" open a stream
.fd *fun="fprintf" format output
.fd *fun="fputc" write a character
.fd *fun="_fputchar" write a character to the "stdout" stream
.fd *fun="fputs" write a string
.fd *fun="fread" read a number of objects
.fd *fun="freopen" re-opens a stream
.fd *fun="fscanf" scan input according to format
.fd *fun="fseek" set current file position, relative
.fd *fun="fsetpos" set current file position, absolute
.fd *fun="_fsopen" open a shared stream
.fd *fun="ftell" get current file position
.fd *fun="fwrite" write a number of objects
.fd *fun="getc" read character
.fd *fun="getchar" get next character from "stdin"
.fd *fun="gets" get string from "stdin"
.fd *fun="_getw" read int from stream file
.fd *fun="perror" write error message to "stderr" stream
.fd *fun="printf" format output to "stdout"
.fd *fun="putc" write character to file
.fd *fun="putchar" write character to "stdout"
.fd *fun="puts" write string to "stdout"
.fd *fun="_putw" write int to stream file
.fd *fun="rewind" position to start of file
.fd *fun="scanf" scan input from "stdin" under format control
.fd *fun="setbuf" set buffer
.fd *fun="setvbuf" set buffering
.fd *fun="tmpfile" create temporary file
.fd *fun="ungetc" push character back on input stream
.fd *fun="vfprintf" same as "fprintf" but with variable arguments
.fd *fun="vfscanf" same as "fscanf" but with variable arguments
.fd *fun="vprintf" same as "printf" but with variable arguments
.fd *fun="vscanf" same as "scanf" but with variable arguments
.fdend
.np
See the section
.us Directory Functions
for functions which are related to directories.
.*======================================================================
.section Wide Character Stream I/O Functions
.*
.np
.ix '&StrIo'
.ix '&StrIo' '&Multibyte'
.ix '&StrIo' '&Wide'
The previous section describes some general aspects of stream
input/output.
The following describes functions dealing with streams containing
multibyte character sequences.
.np
After a stream is associated with an external file, but before any
operations are performed on it, the stream is without orientation.
Once a wide character input/output function has been applied to a
stream without orientation, the stream becomes
.us wide-oriented.
Similarly, once a byte input/output function has been applied to a
stream without orientation, the stream becomes
.us byte-oriented.
Only a successful call to
.kw freopen
can otherwise alter the orientation of a stream (it removes any
orientation).
You cannot mix byte input/output functions and wide character
input/output functions on the same stream.
.np
A file positioning function can cause the next wide character output
function to overwrite a partial multibyte character.
This can lead to the subsequent reading of a stream of multibyte
characters containing an invalid character.
.np
When multibyte characters are read from a stream, they are converted
to wide characters.
Similarly, when wide characters are written to a stream, they are
converted to multibyte characters.
.np
.fdbeg
.fd *fun="fgetwc" get next wide character from file
.fd *fun="_fgetwchar" equivalent to "fgetwc" with the argument "stdin"
.fd *fun="fgetws" get a wide character string
.fd *fun="fprintf" "C" and "S" extensions to the format specifier
.fd *fun="fputwc" write a wide character
.fd *fun="_fputwchar" write a character to the "stdout" stream
.fd *fun="fputws" write a wide character string
.fd *fun="fscanf" "C" and "S" extensions to the format specifier
.fd *fun="fwprintf" formatted wide character output
.fd *fun="fwscanf" scan wide character input according to format
.fd *fun="getwc" read wide character
.fd *fun="getwchar" get next wide character from "stdin"
.fd *fun="_getws" get wide character string from "stdin"
.fd *fun="putwc" write wide character to file
.fd *fun="putwchar" write wide character to "stdout"
.fd *fun="_putws" write wide character string to "stdout"
.fd *fun="ungetwc" push wide character back on input stream
.fd *fun="vfwprintf" same as "fwprintf" but with variable arguments
.fd *fun="vfwscanf" same as "fwscanf" but with variable arguments
.fd *fun="vswprintf" same as "swprintf" but with variable arguments
.fd *fun="vwprintf" same as "wprintf" but with variable arguments
.fd *fun="vwscanf" same as "wscanf" but with variable arguments
.fd *fun="_wfdopen" open stream, given &handle using a wide character "mode"
.fd *fun="_wfopen" open a stream using wide character arguments
.fd *fun="_wfreopen" re-opens a stream using wide character arguments
.fd *fun="_wfsopen" open a shared stream using wide character arguments
.fd *fun="_wperror" write error message to "stderr" stream
.fd *fun="wprintf" format wide character output to "stdout"
.fd *fun="wscanf" scan wide character input from "stdin" under format control
.fdend
.np
See the section
.us Directory Functions
for functions which are related to directories.
.*======================================================================
.section Process Primitive Functions
.*
.np
.ix '&Process'
.if '&machsys' eq 'QNX' .do begin
These functions deal with process creation, execution and termination,
signal handling, and timer operations.
.do end
.el .do begin
These functions deal with process creation, execution and termination,
signal handling, and timer operations.
.do end
.if '&machsys' ne 'PP' .do begin
.np
When a new process is started, it may replace the existing process
.begbull
.bull
.kw P_OVERLAY
is specified with the
.kw spawn...
functions
.bull
the
.kw exec...
routines are invoked
.endbull
.pc
or the existing process may be suspended while the new process
executes (control continues at the point following the place where the
new process was started)
.begbull
.bull
.kw P_WAIT
is specified with the
.kw spawn...
functions
.bull
.kw system
is used
.endbull
.do end
.np
.fdbeg
.fd *fun="abort" immediate termination of process, return code 3
.fd *fun="alarm" send calling process SIGALRM signal after specified time
.fd *fun="atexit" register exit routine
.fd *fun="_beginthread" start a new thread of execution
.fd *fun="cwait" wait for a child process to terminate
.fd *fun="delay" delay for number of milliseconds
.fd *fun="_endthread" end the current thread
.fd *fun="execl" chain to program
.fd *fun="execle" chain to program, pass environment
.fd *fun="execlp" chain to program
.fd *fun="execlpe" chain to program, pass environment
.fd *fun="execv" chain to program
.fd *fun="execve" chain to program, pass environment
.fd *fun="execvp" chain to program
.fd *fun="execvpe" chain to program, pass environment
.fd *fun="exit" exit process, set return code
.fd *fun="_Exit" exit process, set return code
.fd *fun="_exit" exit process, set return code
.fd *fun="fork" create a new process
.fd *fun="kill" send a signal to specified process
.fd *fun="onexit" register exit routine
.fd *fun="pause" suspend calling process until signal
.fd *fun="raise" signal an exceptional condition
.fd *fun="sigaction" examine or specify action for specific signal
.fd *fun="sigaddset" add specified signal to set
.fd *fun="sigdelset" delete specified signal from set
.fd *fun="sigemptyset" initialize signal set to exclude certain signals
.fd *fun="sigfillset" initialize signal set to include certain signals
.fd *fun="sigismember" test whether signal is a member of a set
.fd *fun="signal" set handling for exceptional condition
.fd *fun="sigpending" store set of pending signals
.fd *fun="sigprocmask" examine or change process's signal mask
.fd *fun="sigsuspend" replace process's signal mask and then suspend process
.fd *fun="sleep" delay for number of seconds
.fd *fun="spawnl" create process
.fd *fun="spawnle" create process, set environment
.fd *fun="spawnlp" create process
.fd *fun="spawnlpe" create process, set environment
.fd *fun="spawnv" create process
.fd *fun="spawnve" create process, set environment
.fd *fun="spawnvp" create process
.fd *fun="spawnvpe" create process, set environment
.fd *fun="system" execute system command
.fd *fun="wait" wait for any child process to terminate
.fd *fun="waitpid" wait for a child process to terminate
.fd *fun="_wexecl" chain to program
.fd *fun="_wexecle" chain to program, pass environment
.fd *fun="_wexeclp" chain to program
.fd *fun="_wexeclpe" chain to program, pass environment
.fd *fun="_wexecv" chain to program
.fd *fun="_wexecve" chain to program, pass environment
.fd *fun="_wexecvp" chain to program
.fd *fun="_wexecvpe" chain to program, pass environment
.fd *fun="_wspawnl" create process
.fd *fun="_wspawnle" create process, set environment
.fd *fun="_wspawnlp" create process
.fd *fun="_wspawnlpe" create process, set environment
.fd *fun="_wspawnv" create process
.fd *fun="_wspawnve" create process, set environment
.fd *fun="_wspawnvp" create process
.fd *fun="_wspawnvpe" create process, set environment
.fd *fun="_wsystem" execute system command
.fdend
.if '&machsys' ne 'PP' .do begin
.np
There are eight
.kw spawn...
and
.kw exec...
functions each.
The
.mono "..."
is one to three letters:
.begbull
.bull
"l" or "v" (one is required) to indicate the way
the process parameters are passed
.bull
"p" (optional) to indicate whether the
.bd PATH
environment variable is searched to locate the program for the process
.bull
"e" (optional) to indicate that the
environment variables are being passed
.endbull
.do end
.*======================================================================
.section Process Environment
.*
.np
.ix '&Process'
.if '&machsys' ne 'QNX' .do begin
These functions deal with process identification,
process groups, system identification, system time,
environment variables, and terminal identification.
.do end
.if '&machsys' eq 'QNX' .do begin
These functions deal with process identification, user identification,
process groups, system identification, system time and process time,
environment variables, terminal identification, and configurable
system variables.
.do end
.fdbeg
.fd *fun="_bgetcmd" get command line
.fd *fun="clearenv" delete environment variables
.fd *fun="confstr" get configuration-defined string values
.fd *fun="ctermid" return name of controlling te

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?