[bitc-dev] bug in character decode routines

Swaroop Sridhar swaroop at cs.jhu.edu
Wed May 17 13:18:31 EDT 2006


Jonathan S. Shapiro wrote:
> On Wed, 2006-05-17 at 12:11 -0400, Swaroop Sridhar wrote:
> 
>>Jonathan S. Shapiro wrote:
>>
>>>I suspect the answer is that Swaroop is emitting character constants
>>>incorrectly -- the algorithm in this case should be:
>>>
>>>	if (c < 255 && isprint(c)) printf("'%c'", c);
>>>        else printf("%d", c);
>>
>>Character emission is now done according to this algorithm.
> 
> 
> If you haven't already, modify that test to read:
> 
> 	if (c < 255 && (isprint(c) || c == ' '))

I can make this change, but isprint() already checks for any printable 
character including space.

Swaroop.


More information about the bitc-dev mailing list