Re: XForms: input filter

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 25 Mar 98 05:48:23 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> This one is for entering an hex number.
> [...]
> if (isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BTW, this can be replaced with the C library call isxdigit() on many,
if not most machines.

CTYPE(3V) C LIBRARY FUNCTIONS CTYPE(3V)

NAME
ctype, conv, isalpha, isupper, islower, isdigit, isxdigit,
isalnum, isspace, ispunct, isprint, iscntrl, isascii,
isgraph, toupper, tolower, toascii - character classifica-
tion and conversion macros and functions

[...]
isxdigit(c) c is a hexadecimal digit [0-9], [A-F],
or [a-f].

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/