Subject: Re: isprint() and isblank()
To: Matthias Buelow <>
From: Greywolf <>
List: tech-userlevel
Date: 01/20/2001 21:10:27
On Sun, 21 Jan 2001, Matthias Buelow wrote:

# Christos Zoulas writes:
# >Another less intrusive/uglier technique is to change isblank(c) to have
# >|| ((c) == '\t') with a comment that we will fix it properly in libc for
# >the next version. But we all know that the next version of libc will not
# >happen :-)
# >
# >Unfortunately this has the nasty side effect that c will be evaluated twice,
# >in isblank().
# which is not permissible by the C standard and would be a cure that
# kills the patient anyways.

What in the _world_ are you talking about?!?  It's perfectly reasonable to
do multiple comparisons/evaluations so long as you are not changing the
value of the thing being evaluated in the process.

i.e. if (((c) == 'a') || ((c) == 'b') || ((c) == '0xa9')) { ; }

is perfectly legal, even in the context of isblank, because nothing
is being modified between evaluations.

# mkb

*BSD: Microsoft ask you where you want to go.  BSD gets you there.