What is the _REAL_ SunSparc1 sound-format?!?
franck boissiere
ccettix!boissier at cs.utexas.edu
Thu Jun 14 21:32:53 AEST 1990
>From article <8823 at brazos.Rice.edu>, by andrew at ambra.dk (Leif Andrew Rump):
>
> main()
> {
> char tmp;
>
> while ((tmp = getchar()) != EOF)
> printf("%c", (tmp < 0) ? tmp : 128 - tmp);
> }
>
> I don't understand the: (tmp < 0) ? 128 - tmp : tmp; part. If I don't do
You'd better use bit masks rather than arithmetics. tmp & 128 means
something (i.e. the eighth bit is set) and tmp & 127 means only the seven
first bits are meaningful
Franck BOISSIERE boissier at irisa.irisa.fr
Prototyping Lab Manager boissier at ccettix.UUCP
C.C.E.T.T. B.P. 59 boissier%irisa.irisa.fr at uunet.uu.net
35512 CESSON SEVIGNE CEDEX FRANCE
More information about the Comp.sys.sun
mailing list