TMS3401
0
Run-Time
Support
6.3
Character
Typing
and Conversion
Macros
These macros determine the types
of
characters contained in variables, arrays,
constants, etc. The
library file ctype.h must be included in
your
file
to
use the
functions. The character typing macros
are:
isalnum
isalpha
isascii
iscntrl
isdigit
islower
isprint
ispunct
isspace
isupper
isxdigit
Detects alphanumeric ASCII characters.
Detects alphabetic
ASCII characters.
Detects
ASCII characters.
Detects control characters.
Detects numeric characters.
Detects lowercase alphabetic
ASCII characters.
Detects printable
ASCII characters.
Detects
ASCII punctuation characters.
Detects
ASCII spacebar, tab (horizontal
or
vertical), carriage
return, form feed, and newline characters.
Detects uppercase
ASCII alphabetic characters.
Detects hexadecimal
digit
characters.
Conversion
of
uppercase characters to lowercase, and vice versa, and conver-
sion
of
non-ASCII
characters to ASCII can be done
with
the
following
mac-
ros.
Include the library file ctype.h
to
use them.
tolower
toupper
toascii
Converts uppercase alphabetic characters
to
lowercase.
Converts lowercase alphabetic characters
to
uppercase.
Converts
non-ASCII
characters
to
ASCII characters.
6.4
Miscellaneous
Functions
setjmp
longjmp
Saves calling function's context in environment buffer.
Restores context
of
calling function from environment buffer.
6-3