clibfunc.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 727 行 · 第 1/2 页
GML
727 行
.np
A valid file specification consists of an optional volume name (which is
always preceded by two backslashes), a series of optional directory names
(each preceded by one backslash), and a file name.
If a volume name or directory name precedes the file name, then the
file name must also be preceded by a backslash.
.np
Volume names, directory names, and file names can each contain up to
33 characters.
The maximum combined length of a file specification is 255 characters.
Case is ignored.
.do end
.el .if '&machsys' eq 'QNX' .do begin
.np
A valid file specification consists of an optional node name (which is
always preceded by two slashes), a series of optional directory names
(each preceded by one slash), and a file name.
If a node name or directory name precedes the file name, then the
file name must also be preceded by a slash.
.np
Directory names and file names can contain up to 48 characters.
Case is respected.
.do end
.el .do begin
.np
A valid file specification consists of an optional drive letter (which is
always followed by a colon), a series of optional directory names
separated by backslashes, and a file name.
.np
.us FAT File System:
Directory names and file names can contain up to eight characters
followed optionally by a period and a three letter extension.
The complete path (including drive, directories and file
name) cannot exceed 143 characters.
Case is ignored (lowercase letters are converted to uppercase
letters).
.np
.us HPFS File System:
Directory names and file names can contain up to 254 characters
in the OS/2 High Performance File System (HPFS).
However, the complete path (including drive, directories and file
name) cannot exceed 259 characters.
The period is a valid file name character and can appear in a file
name or directory name as many times as required; HPFS file names do
not require file extensions as in the FAT file system.
The HPFS preserves case in file names only in directory listings but
ignores case in file searches and other system operations (i.e, a
directory cannot have more than one file whose names differ only in
case).
.do end
.*-------------------------
.section File Access Limits
.bigterm
Whether the same file can be open multiple times (7.9.3).
.bigdesc
.np
It is possible to open a file multiple times.
.*-------------------------
.section Deleting Open Files
.bigterm
The effect of the
.kw remove
function on an open file (7.9.4.1).
.bigdesc
.np
The
.kw remove
function deletes a file, even if the file is open.
.*-------------------------
.section Renaming with a Name that Exists
.bigterm
The effect if a file with the new name exists prior to a call to the
.kw rename
function (7.9.4.2).
.bigdesc
.np
The
.kw rename
function
.if '&machsys' eq 'QNX' .do begin
will succeed if you attempt to rename a file using a name that exists.
.do end
.el .do begin
will fail if you attempt to rename a file using a name that exists.
.do end
.*-------------------------
.section Printing Pointer Values
.bigterm
The output for
.mono %p
conversion in the
.kw fprintf
function (7.9.6.1).
.bigdesc
.np
Two types of pointers are supported: near pointers (%hp), and
far pointers (%lp).
.if '&machsys' eq 'PP' .do begin
The
.kw fprintf
function produces hexadecimal values of the form XXXXXXXX for 32-bit near
pointers, and XXXX:XXXXXXXX (segment and offset separated by a colon) for
48-bit far pointers.
.do end
.el .do begin
The output for %p depends on the memory model being used.
.np
In 16-bit mode, the
.kw fprintf
function produces hexadecimal values of the form XXXX for 16-bit near
pointers, and XXXX:XXXX (segment and offset separated by a colon) for
32-bit far pointers.
.np
In 32-bit mode, the
.kw fprintf
function produces hexadecimal values of the form XXXXXXXX for 32-bit near
pointers, and XXXX:XXXXXXXX (segment and offset separated by a colon) for
48-bit far pointers.
.do end
.*-------------------------
.section Reading Pointer Values
.bigterm
The input for
.mono %p
conversion in the
.kw fscanf
function (7.9.6.2).
.bigdesc
.np
The
.kw fscanf
function converts hexadecimal values into the correct address when the %p
format specifier is used.
.*-------------------------
.section Reading Ranges
.bigterm
The interpretation of a
.mono -
character that is neither the first nor the last character in the
scanlist for
.mono %[
conversion in the
.kw fscanf
function (7.9.6.2).
.bigdesc
.np
The "&minus" character indicates a character range.
The character prior to the "&minus" is the first character in the range.
The character following the "&minus" is the last character in the range.
.*-------------------------
.section File Position Errors
.bigterm
The value to which the macro
.kw errno
is set by the
.kw fgetpos
or
.kw ftell
function on failure (7.9.9.1, 7.9.9.4).
.bigdesc
.np
When the function
.kw fgetpos
or
.kw ftell
fails, they set
.kw errno
to
.kw EBADF
if the file number is bad.
The constants are defined in the
.hdrfile errno.h
header file.
.*-------------------------
.section Messages Generated by the perror Function
.bigterm
The messages generated by the
.kw perror
function (7.9.10.4).
.bigdesc
.np
The
.kw perror
function generates the following messages.
.if '&machsys' eq 'PP' .do begin
.im strerror.pp
.do end
.el .if '&machsys' eq 'QNX' .do begin
.im strerror.qnx
.do end
.el .do begin
.im strerror.msg
.do end
.*-------------------------
.section Allocating Zero Memory
.bigterm
The behavior of the
.kw calloc
.ct,
.kw malloc
.ct,
or
.kw realloc
function if the size requested is zero (7.10.3).
.bigdesc
.np
The value returned will be
.kw NULL.
No actual memory is allocated.
.*-------------------------
.section The abort Function
.bigterm
The behavior of the
.kw abort
function with regard to open and temporary files (7.10.4.1).
.bigdesc
.np
The
.kw abort
function does not close any files that are open or temporary, nor
does it flush any output buffers.
.*-------------------------
.section The atexit Function
.bigterm
The status returned by the
.kw exit
function if the value of the argument is other than zero,
.kw EXIT_SUCCESS
.ct,
or
.kw EXIT_FAILURE
(7.10.4.3).
.bigdesc
.np
The
.kw exit
function returns the value of its argument to the operating system
regardless of its value.
.*-------------------------
.section Environment Names
.bigterm
The set of environment names and the method for altering the environment
list used by the
.kw getenv
function (7.10.4.4).
.bigdesc
.np
.if '&machsys' eq 'PP' .do begin
The set of environment names is unlimited.
.ix 'ENVIRON.INI'
Environment variables can be set in the system initialization file
"ENVIRON.INI".
There is no method provided by PenPoint for modifying the environment
list.
.do end
.el .if '&machsys' eq 'QNX' .do begin
The set of environment names is unlimited.
Environment variables can be set from the QNX command line using the
EXPORT or SET commands.
A program can modify its environment variables with the
.kw putenv
function.
Such modifications last only until the program terminates.
.do end
.el .do begin
The set of environment names is unlimited.
Environment variables can be set from the DOS command line using the
SET command.
A program can modify its environment variables with the
.kw putenv
function.
Such modifications last only until the program terminates.
.do end
.*-------------------------
.section The system Function
.bigterm
The contents and mode of execution of the string by the
.kw system
function (7.10.4.5).
.bigdesc
.np
The
.kw system
function
.if '&machsys' eq 'PP' .do begin
is not supported by PenPoint.
.do end
.el .if '&machsys' eq 'QNX' .do begin
always executes an executable binary or a shell file, using
.filename /bin/sh.
.do end
.el .do begin
executes an internal DOS, Windows, or OS/2 command, or an EXE, COM,
BAT or CMD file from within a C program rather than from the command
line.
The
.kw system
function
examines the
.kw COMSPEC
environment variable to find the command interpreter and passes the
argument string to the command interpreter.
.do end
.*-------------------------
.section The strerror Function
.bigterm
The contents of the error message strings returned by the
.kw strerror
function (7.11.6.2).
.bigdesc
.np
The
.kw strerror
function generates the following messages.
.if '&machsys' eq 'PP' .do begin
.im strerror.pp
.do end
.el .if '&machsys' eq 'QNX' .do begin
.im strerror.qnx
.do end
.el .do begin
.im strerror.msg
.do end
.*-------------------------
.section The Time Zone
.bigterm
The local time zone and Daylight Saving Time (7.12.1).
.bigdesc
.np
.if '&machsys' eq 'PP' .do begin
.ix 'ENVIRON.INI'
In the PenPoint SDK, the time zone is set in the system initialization
file "ENVIRON.INI".
For PenPoint 1.0, the default setting is "TZ=PST8PDT" (Pacific Standard Time
and Pacific Daylight Time, 8 hours later than Universal Coordinated Time).
For PenPoint 2.0, the default setting is "TZ=Toky-9" (Tokyo time, 9 hours
earlier than Universal Coordinated Time).
.do end
.el .if '&machsys' eq 'QNX' .do begin
The time zone is set in the system initialization file for your node,
( e.g.
.mono /etc/config/sysinit.2
). See the
.us QNX User's Guide.
.do end
.el .do begin
The default time zone is "Eastern Standard Time" (EST), and the
corresponding daylight saving time zone is "Eastern Daylight Saving Time"
(EDT).
.do end
.*-------------------------
.section The clock Function
.bigterm
The era for the
.kw clock
function (7.12.2.1).
.bigdesc
.np
The
.kw clock
function's era begins with a value of 0 when the program starts to execute.
.endbigterms
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?