clibover.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 1,572 行 · 第 1/5 页
GML
1,572 行
:cmt. QNX will do later A collection of headers and functions to aid in porting traditional
:cmt. QNX will do later UNIX code.
:cmt. QNX will do later .do end
.*
.note Miscellaneous Functions
.sk 0
This collection consists of the remaining functions.
.endnote
.np
The following subsections describe these function classes in more detail.
Each function in the class is noted with a brief description of its
purpose.
The chapter
.us Library Functions and Macros
provides a complete description of each function and macro.
.*
.*
.beglevel
.*======================================================================
.section Character Manipulation Functions
.*
.np
.ix '&CharTest'
These functions operate upon single characters of type
.id char.
The functions test characters in various ways and convert them between
upper and lowercase.
.if &unifnc eq 1 .do begin
.np
A set of functions that deal with Unicode characters is also provided.
These functions are identified by the "_u" prefix.
A Unicode character is a 16-bit item (unsigned short).
The Unicode character set is capable of representing 65536 unique
characters.
These Unicode functions operate on characters in the range 0x0000 to
0x00ff.
Unicode characters outside this range fail any is... test.
Only Unicode characters in the range L'A' to L'Z' and L'a' to L'z'
convert to upper/lower case.
.np
.do end
.fdbeg
.fd *fun="isalnum" test for letter or digit
.fd *fun="isalpha" test for letter
.fd *fun="isascii" test for ASCII character
.fd *fun="isblank" test for blank character
.fd *fun="iscntrl" test for control character
.fd *fun="iscsym" test for letter, underscore or digit
.fd *fun="iscsymf" test for letter or underscore
.fd *fun="isdigit" test for digit
.fd *fun="isgraph" test for printable character, except space
.fd *fun="islower" test for letter in lowercase
.fd *fun="isprint" test for printable character, including space
.fd *fun="ispunct" test for punctuation characters
.fd *fun="isspace" test for "white space" characters
.fd *fun="isupper" test for letter in uppercase
.fd *fun="isxdigit" test for hexadecimal digit
.fd *fun="tolower" convert character to lowercase
.fd *fun="toupper" convert character to uppercase
.fdend
.*======================================================================
.section Wide Character Manipulation Functions
.*
.np
.ix '&CharTest'
.ix '&Wide'
These functions operate upon wide characters of type
.id wchar_t.
The functions test wide characters in various ways and convert them
between upper and lowercase.
.fdbeg
.fd *fun="iswalnum" test for letter or digit
.fd *fun="iswalpha" test for letter
.fd *fun="iswascii" test for ASCII character
.fd *fun="iswblank" test for blank character
.fd *fun="iswcntrl" test for control character
.fd *fun="iswdigit" test for digit
.fd *fun="iswgraph" test for printable character, except space
.fd *fun="iswlower" test for letter in lowercase
.fd *fun="iswprint" test for printable character, including space
.fd *fun="iswpunct" test for punctuation characters
.fd *fun="iswspace" test for "white space" characters
.fd *fun="iswupper" test for letter in uppercase
.fd *fun="iswxdigit" test for hexadecimal digit
.fd *fun="wctype" construct a property value for a given "property"
.fd *fun="iswctype" test a character for a specific property
.fd *fun="towlower" convert character to lowercase
.fd *fun="towupper" convert character to uppercase
.fd *fun="wctrans" construct mapping value for a given "property"
.fd *fun="towctrans" convert a character based on a specific property
.fdend
.*======================================================================
.section Multibyte Character Manipulation Functions
.*
.np
.ix '&CharTest'
.ix '&Multibyte'
These functions operate upon multibyte characters.
The functions test wide characters in various ways and convert them
between upper and lowercase.
.fdbeg
.fd *fun="_fmbccmp" compare one multibyte character with another
.fd *fun="_fmbccpy" copy one multibyte character from one string to another
.fd *fun="_fmbcicmp" compare one multibyte character with another (case insensitive)
.fd *fun="_fmbclen" return number of bytes comprising multibyte character
.fd *fun="_fmblen" determine length of next multibyte character
.fd *fun="_fmbgetcode" get next single-byte or double-byte character from far string
.fd *fun="_fmbputchar" store single-byte or double-byte character into far string
.fd *fun="_fmbrlen" determine length of next multibyte character
.fd *fun="_fmbrtowc" convert far multibyte character to wide character
.fd *fun="_fmbsbtype" return type of byte in multibyte character string
.fd *fun="_fmbtowc" convert far multibyte character to wide character
.fd *fun="_ismbbalnum" test for isalnum or _ismbbkalnum
.fd *fun="_ismbbalpha" test for isalpha or _ismbbkalpha
.fd *fun="_ismbbgraph" test for isgraph or _ismbbkprint
.fd *fun="_ismbbkalnum" test for non-ASCII text symbol other than punctuation
.fd *fun="_ismbbkana" test for single-byte Katakana character
.fd *fun="_ismbbkalpha" test for non-ASCII text symbol other than digits or punctuation
.fd *fun="_ismbbkprint" test for non-ASCII text or non-ASCII punctuation symbol
.fd *fun="_ismbbkpunct" test for non-ASCII punctuation character
.fd *fun="_ismbblead" test for valid first byte of multibyte character
.fd *fun="_ismbbprint" test for isprint or _ismbbkprint
.fd *fun="_ismbbpunct" test for ispunct or _ismbbkpunct
.fd *fun="_ismbbtrail" test for valid second byte of multibyte character
.fd *fun="_ismbcalnum" test for _ismbcalpha or _ismbcdigit
.fd *fun="_ismbcalpha" test for a multibyte alphabetic character
.fd *fun="_ismbccntrl" test for a multibyte control character
.fd *fun="_ismbcdigit" test for a multibyte decimal-digit character '0' through '9'
.fd *fun="_ismbcgraph" test for a printable multibyte character except space
.fd *fun="_ismbchira" test for a double-byte Hiragana character
.fd *fun="_ismbckata" test for a double-byte Katakana character
.fd *fun="_ismbcl0" test for a double-byte non-Kanji character
.fd *fun="_ismbcl1" test for a JIS level 1 double-byte character
.fd *fun="_ismbcl2" test for a JIS level 2 double-byte character
.fd *fun="_ismbclegal" test for a valid multibyte character
.fd *fun="_ismbclower" test for a valid lowercase multibyte character
.fd *fun="_ismbcprint" test for a printable multibyte character including space
.fd *fun="_ismbcpunct" test for any multibyte punctuation character
.fd *fun="_ismbcspace" test for any multibyte space character
.fd *fun="_ismbcsymbol" test for valid multibyte symbol (punctuation and other special graphics)
.fd *fun="_ismbcupper" test for valid uppercase multibyte character
.fd *fun="_ismbcxdigit" test for any multibyte hexadecimal-digit character
:cmt. .fd *fun="_ismbdalnum" test for
:cmt. .fd *fun="_ismbdalpha" test for
:cmt. .fd *fun="_ismbdcntrl" test for
:cmt. .fd *fun="_ismbddigit" test for
:cmt. .fd *fun="_ismbdgraph" test for
:cmt. .fd *fun="_ismbdlower" test for
:cmt. .fd *fun="_ismbdprint" test for
:cmt. .fd *fun="_ismbdpunct" test for
:cmt. .fd *fun="_ismbdspace" test for
:cmt. .fd *fun="_ismbdupper" test for
:cmt. .fd *fun="_ismbdxdigit" test for
.fd *fun="_mbbtombc" return double-byte equivalent to single-byte character
.fd *fun="_mbbtype" determine type of byte in multibyte character
.fd *fun="_mbccmp" compare one multibyte character with another
.fd *fun="_mbccpy" copy one multibyte character from one string to another
.fd *fun="_mbcicmp" compare one multibyte character with another (case insensitive)
.fd *fun="_mbcjistojms" convert JIS code to shift-JIS code
.fd *fun="_mbcjmstojis" convert shift-JIS code to JIS code
.fd *fun="_mbclen" return number of bytes comprising multibyte character
.fd *fun="_mbctolower" convert double-byte uppercase character to double-byte lowercase character
.fd *fun="_mbctoupper" convert double-byte lowercase character to double-byte uppercase character
.fd *fun="_mbctohira" convert double-byte Katakana character to Hiragana character
.fd *fun="_mbctokata" convert double-byte Hiragana character to Katakana character
.fd *fun="_mbctombb" return single-byte equivalent to double-byte character
.fd *fun="_mbgetcode" get next single-byte or double-byte character from string
.fd *fun="mblen" determine length of next multibyte character
.fd *fun="_mbputchar" store single-byte or double-byte character into string
.fd *fun="mbrlen" determine length of next multibyte character
.fd *fun="mbrtowc" convert multibyte character to wide character
.fd *fun="_mbsbtype" return type of byte in multibyte character string
.fd *fun="mbsinit" determine if mbstate_t object describes an initial conversion state
.fd *fun="mbtowc" convert multibyte character to wide character
.fdend
.*======================================================================
.section Memory Manipulation Functions
.*
.np
.ix 'Memory Manipulation Functions'
These functions manipulate blocks of memory.
In each case, the address of the memory block and its size is passed
to the function.
.if '&machsys' ne 'PP' .do begin
The functions that begin with "_f" accept
.id far
pointers as their arguments allowing manipulation of any memory location
regardless of which memory model your program has been compiled for.
.do end
.fdbeg
.fd *fun="_fmemccpy" copy far memory block up to a certain character
.fd *fun="_fmemchr" search far memory block for a character value
.fd *fun="_fmemcmp" compare any two memory blocks (near or far)
.fd *fun="_fmemcpy" copy far memory block, overlap not allowed
.fd *fun="_fmemicmp" compare far memory, case insensitive
.fd *fun="_fmemmove" copy far memory block, overlap allowed
.fd *fun="_fmemset" set any memory block (near of far) to a character
.fd *fun="memccpy" copy memory block up to a certain character
.fd *fun="memchr" search memory block for a character value
.fd *fun="memcmp" compare memory blocks
.fd *fun="memcpy" copy memory block, overlap not allowed
.fd *fun="memicmp" compare memory, case insensitive
.fd *fun="memmove" copy memory block, overlap allowed
.fd *fun="memset" set memory block to a character
.fd *fun="movedata" copy memory block, with segment information
.fd *fun="swab" swap bytes of a memory block
.fd *fun="_wmemccpy" copy memory block up to a certain character
.fd *fun="wmemchr" search memory block for a wide character value
.fd *fun="wmemcmp" compare memory blocks
.fd *fun="wmemcpy" copy memory block, overlap not allowed
.fd *fun="_wmemicmp" compare memory, case insensitive
.fd *fun="wmemmove" copy memory block, overlap allowed
.fd *fun="wmemset" set memory block to a wide character
.fdend
.np
See the section
.us "String Manipulation Functions"
for descriptions of functions that manipulate strings of data.
See the section
.us "Wide String Manipulation Functions"
for descriptions of functions that manipulate wide strings of data.
.*======================================================================
.section String Manipulation Functions
.*
.np
.ix '&String'
A
.us string
is an array of characters (with type
.id char
.ct ) that is terminated with an extra null character
.mono ('\0').
Functions are passed only the address of the string since the size
can be determined by searching for the terminating character.
.if '&machsys' ne 'PP' .do begin
The functions that begin with "_f" accept
.id far
pointers as their arguments allowing manipulation of any memory location
regardless of which memory model your program has been compiled for.
.do end
.if &unifnc eq 1 .do begin
.np
A set of functions that manipulate strings of Unicode characters is
also provided.
These functions are identified by the "_u" prefix.
A Unicode character string is an array of zero or more adjacent
16-bit Unicode characters followed by a 16-bit null character
.mono (L'\0')
which marks the end of the string.
.np
.do end
.fdbeg
.fd *fun="bcmp" compare two byte strings
.fd *fun="bcopy" copy a byte string
.fd *fun="_bprintf" formatted transmission to fixed-length string
.fd *fun="bzero" zero a byte string
.fd *fun="_fstrcat" concatenate two far strings
.fd *fun="_fstrchr" locate character in far string
.fd *fun="_fstrcmp" compare two far strings
.fd *fun="_fstrcpy" copy far string
.fd *fun="_fstrcspn" get number of string characters not from a set of characters
.fd *fun="_fstricmp" compare two far strings with case insensitivity
.fd *fun="_fstrlen" length of a far string
.fd *fun="_fstrlwr" convert far string to lowercase
.fd *fun="_fstrncat" concatenate two far strings, up to a maximum length
.fd *fun="_fstrncmp" compare two far strings up to maximum length
.fd *fun="_fstrncpy" copy a far string, up to a maximum length
.fd *fun="_fstrnicmp" compare two far strings with case insensitivity up to a maximum length
.fd *fun="_fstrnset" fill far string with character to a maximum length
.fd *fun="_fstrpbrk" locate occurrence of a string within a second string
.fd *fun="_fstrrchr" locate last occurrence of character from a character set
.fd *fun="_fstrrev" reverse a far string in place
.fd *fun="_fstrset" fill far string with a character
.fd *fun="_fstrspn" find number of characters at start of string which are also in a second string
.fd *fun="_fstrstr" find first occurrence of string in second string
.fd *fun="_fstrtok" get next token from a far string
.fd *fun="_fstrupr" convert far string to uppercase
.fd *fun="sprintf" formatted transmission to string
.fd *fun="sscanf" scan from string under format control
.fd *fun="strcat" concatenate string
.fd *fun="strchr" locate character in string
.fd *fun="strcmp" compare two strings
.fd *fun="strcmpi" compare two strings with case insensitivity
.fd *fun="strcoll" compare two strings using "locale" collating sequence
.fd *fun="strcpy" copy a string
.fd *fun="strcspn" get number of string characters not from a set of characters
.fd *fun="_strdec" returns pointer to the previous character in string
.fd *fun="_strdup" allocate and duplicate a string
.fd *fun="strerror" get error message as string
.fd *fun="_stricmp" compare two strings with case insensitivity
.fd *fun="_strinc" return pointer to next character in string
.fd *fun="strlcat" concatenate string into a bounded buffer
.fd *fun="strlcpy" copy string into a bounded buffer
.fd *fun="strlen" string length
.fd *fun="_strlwr" convert string to lowercase
.fd *fun="strncat" concatenate two strings, up to a maximum length
.fd *fun="strncmp" compare two strings up to maximum length
.fd *fun="_strncnt" count the number of characters in the first "n" bytes
.fd *fun="strncpy" copy a string, up to a maximum length
.fd *fun="_strnextc" return integer value of the next character in string
.fd *fun="_strnicmp" compare two strings with case insensitivity up to a maximum length
.fd *fun="_strninc" increment character pointer by "n" characters
.fd *fun="_strnset" fill string with character to a maximum length
.fd *fun="strpbrk" locate occurrence of a string within a second string
.fd *fun="strrchr" locate last occurrence of character from a character set
.fd *fun="_strrev" reverse a string in place
.fd *fun="_strset" fill string with a character
.fd *fun="strspn" find number of characters at start of string which are also in a second string
.fd *fun="_strspnp" return pointer to first character of string not in set
.fd *fun="strstr" find first occurrence of string in second string
.fd *fun="strtok" get next token from string
.fd *fun="_strupr" convert string to uppercase
.fd *fun="strxfrm" transform string to locale's collating sequence
.fd *fun="_vbprintf" same as "_bprintf" but with variable arguments
.fd *fun="vsscanf" same as "sscanf" but with variable arguments
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?