[bitc-dev] bug in character decode routines

Jonathan S. Shapiro shap at eros-os.org
Wed May 17 13:45:26 EDT 2006


Technically, I believe that space is not considered printable.

shap

On Wed, 2006-05-17 at 13:18 -0400, Swaroop Sridhar wrote:
> 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.
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev



More information about the bitc-dev mailing list