[tex-live] isascii() comment

Nelson H. F. Beebe beebe at math.utah.edu
Fri Apr 17 17:13:33 CEST 2015


List traffic this week has discussed the use of isascii() in some
parts of TeX Live.

I just made experiments on about 40 flavors of Unix to see how it is
implemented, and found that on about half of the systems, it is an
external function, and on the others, expands to (equivalent) code
like one of these:

	return ((((c) & ~0x7f) == 0));
	
	return (((unsigned)(c) <= 0177));

	return (((unsigned)(c) < 0x80));

Both macro and function implementations are often found on the same
platform, with cc using the macro form, and c89 and c99 using the
function form.

POSIX documents isascii() as a function, whereas ISO C 89, 99, and
2011 have no mention of it whatever.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------


More information about the tex-live mailing list