clibfunc.gml

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

GML
727
字号
.*
.dm addindent begin
.  ..in +&*.
.dm addindent end
.*
.dm noindent begin
.  ..in -&*.
.dm noindent end
.*
.dm bigterms begin
.  .addindent 3
.dm bigterms end
.*
.dm bigterm begin
.  .noindent 3
.  :P.
.  :HP2.
.dm bigterm end
.*
.dm bigdesc begin
.  :eHP2.
.  .addindent 3
.  :P.
.dm bigdesc end
.*
.dm endbigterms begin
.  .noindent 3
.dm endbigterms end
.*----------------------------------------------------
.*
.chap Implementation-Defined Behavior of the C Library
.np
This appendix describes the behavior of
.if '&machsys' eq 'PP' .do begin
the &company C Library for Penpoint
.do end
.el .do begin
the 16-bit and 32-bit &company C libraries
.do end
when the ANSI/ISO C Language standard describes the behavior as
.us implementation-defined.
The term describing each behavior is taken directly from the ANSI/ISO
C Language standard.
The numbers in parentheses at the end of each term refers to the
section of the standard that discusses the behavior.
.*
.bigterms
.*----------------------------------------------------
.section NULL Macro
.bigterm
The null pointer constant to which the macro
.kw NULL
expands (7.1.6).
.bigdesc
.np
The macro
.kw NULL
expands to
.if '&machsys' eq 'PP' .do begin
0.
.do end
.el .do begin
0 in small data models and to 0L in large data models.
.do end
.*-------------------------
.section Diagnostic Printed by the assert Function
.bigterm
The diagnostic printed by and the termination behavior of the
.kw assert
function (7.2).
.bigdesc
.np
The
.kw assert
function prints a diagnostic message to
.kw stderr
and calls the
.kw abort
routine if the expression is false.
The diagnostic message has the following form:
.millust begin
Assertion failed: [expression], file [name], line [number]
.millust end
.*-------------------------
.section Character Testing
.bigterm
The sets of characters tested for by the
.kw isalnum
.ct,
.kw isalpha
.ct,
.kw iscntrl
.ct,
.kw islower
.ct,
.kw isprint
.ct,
and
.kw isupper
functions (7.3.1).
.bigdesc
.np
.begterm 18 $compact
.termhd1 Function
.termhd2 Characters Tested For
.term isalnum
Characters 0-9, A-Z, a-z
.term isalpha
Characters A-Z, a-z
.term iscntrl
ASCII 0x00-0x1f, 0x7f
.term islower
Characters a-z
.term isprint
ASCII 0x20-0x7e
.term isupper
Characters A-Z
.endterm
.*-------------------------
.section Domain Errors
.bigterm
The values returned by the mathematics functions on domain errors (7.5.1).
.bigdesc
.np
When a domain error occurs, the listed values are returned by the
following functions:
.begterm 18 $compact
.termhd1 Function
.termhd2 Value returned
.term acos
0.0
.term acosh
&minus HUGE_VAL
.term asin
0.0
.term atan2
0.0
.term atanh
&minus HUGE_VAL
.term log
&minus HUGE_VAL
.term log10
&minus HUGE_VAL
.term log2
&minus HUGE_VAL
.term pow(neg,frac)
0.0
.term pow(0.0,0.0)
1.0
.term pow(0.0,neg)
&minus HUGE_VAL
.term sqrt
0.0
.term y0
&minus HUGE_VAL
.term y1
&minus HUGE_VAL
.term yn
&minus HUGE_VAL
.endterm
.*-------------------------
.section Underflow of Floating-Point Values
.bigterm
Whether the mathematics functions set the integer expression
.kw errno
to the value of the macro
.kw ERANGE
on underflow range errors (7.5.1).
.bigdesc
.np
The integer expression
.kw errno
is not set to
.kw ERANGE
on underflow range errors in the mathematics functions.
.*-------------------------
.section The fmod Function
.bigterm
Whether a domain error occurs or zero is returned when the
.kw fmod
function has a second argument of zero (7.5.6.4).
.bigdesc
.np
Zero is returned when the second argument to
.kw fmod
is zero.
.*-------------------------
.section The signal Function
.bigterm
The set of signals for the
.kw signal
function (7.7.1.1).
.bigdesc
.np
.if '&machsys' eq 'PP' .do begin
Signals are not completely implemented under PenPoint.
Hence, the
.kw signal
function is not described in this book.
.do end
.el .do begin
See the description of the
.kw signal
function presented earlier in this book.
.if '&machsys' eq 'QNX' .do begin
Also see the
.kw QNX System Architecture
manual.
.do end
.do end
.*-------------------------
.bigterm
The semantics for each signal recognized by the
.kw signal
function (7.7.1.1).
.bigdesc
.np
.if '&machsys' eq 'PP' .do begin
Signals are not completely implemented under PenPoint.
Hence, the
.kw signal
function is not described in this book.
.do end
.el .do begin
See the description of the
.kw signal
function presented earlier in this book.
.if '&machsys' eq 'QNX' .do begin
Also see the
.kw QNX System Architecture
manual.
.do end
.do end
.*-------------------------
.bigterm
The default handling and the handling at program startup for each
signal recognized by the
.kw signal
function (7.7.1.1).
.bigdesc
.np
.if '&machsys' eq 'PP' .do begin
Signals are not completely implemented under PenPoint.
Hence, the
.kw signal
function is not described in this book.
.do end
.el .do begin
See the description of the
.kw signal
function presented earlier in this book.
.if '&machsys' eq 'QNX' .do begin
Also see the
.kw QNX System Architecture
manual.
.do end
.do end
.*-------------------------
.section Default Signals
.bigterm
If the equivalent of
.ix SIG_DFL
.kw signal
.ct ( sig, SIG_DFL );
is not executed prior to the call of a signal handler,
the blocking of the signal that is performed (7.7.1.1).
.bigdesc
.np
The equivalent of
.millust begin
signal( sig, SIG_DFL );
.millust end
.np
is executed prior to the call of a signal handler.
.*-------------------------
.section The SIGILL Signal
.bigterm
Whether the default handling is reset if the
.kw SIGILL
signal is received by a handler specified to the
.kw signal
function (7.7.1.1).
.bigdesc
.np
The equivalent of
.millust begin
signal( SIGILL, SIG_DFL );
.millust end
.np
is executed prior to the call of the signal handler.
.*-------------------------
.section Terminating Newline Characters
.bigterm
Whether the last line of a text stream requires a terminating new-line
character (7.9.2).
.bigdesc
.np
The last line of a text stream does not require a terminating new-line
character.
.*-------------------------
.section Space Characters
.bigterm
Whether space characters that are written out to a text stream immediately
before a new-line character appear when read in (7.9.2).
.bigdesc
.np
All characters written out to a text stream will appear when read in.
.*-------------------------
.section Null Characters
.bigterm
The number of null characters that may be appended to data written
to a binary stream (7.9.2).
.bigdesc
.np
No null characters are appended to data written to a binary stream.
.*-------------------------
.section File Position in Append Mode
.bigterm
Whether the file position indicator of an append mode stream is initially
positioned at the beginning or end of the file (7.9.3).
.bigdesc
.np
When a file is open in append mode, the file position indicator
initially points to the end of the file.
.*-------------------------
.section Truncation of Text Files
.bigterm
Whether a write on a text stream causes the associated file to be
truncated beyond that point (7.9.3).
.bigdesc
.np
Writing to a text stream does not truncate the file beyond that point.
.*-------------------------
.section File Buffering
.bigterm
The characteristics of file buffering (7.9.3).
.bigdesc
.np
.if '&machsys' eq 'PP' .do begin
Disk files accessed through the standard I/O functions are fully buffered.
The default buffer size is 512 bytes.
.do end
.el .if '&machsys' eq 'QNX' .do begin
Disk files accessed through the standard I/O functions are fully buffered.
The default buffer size is 1024 bytes for both 16 and 32-bit systems.
.do end
.el .do begin
Disk files accessed through the standard I/O functions are fully buffered.
The default buffer size is 512 bytes for 16-bit systems, and 4096 bytes
for 32-bit systems.
.do end
.*-------------------------
.section Zero-Length Files
.bigterm
Whether a zero-length file actually exists (7.9.3).
.bigdesc
.np
A file with length zero can exist.
.*-------------------------
.section File Names
.bigterm
The rules of composing valid file names (7.9.3).
.bigdesc
.if '&machsys' eq 'PP' .do begin

⌨️ 快捷键说明

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