Reinhard Pagitsch
2005-10-14 07:03:24 UTC
Hello,
I have an other problem which I do not understand:
Here the code piece:
#define NOP 0xd3eeee
void WriteNOP(PerlIO* fh)
{
WriteTriplex(fh, NOP);
}
int WriteTriplex(PerlIO* fh, long triplex)
{
int i;
char buf[4] = { '\0' };
printf("The triplex: %x\n", triplex);
buf[0] = (char)triplex>>16;
buf[1] = (char)triplex>>8;
buf[2] = (char)triplex;
printf("The triplex: %s\n", buf);
return PerlIO_write(fh, buf, 3);
}
If I do this in the file I get FFFFEE and not as expected D3EEEE.
The printf statements but showing me the the correct output.
Does anyone know why?
regards,
Reinhard
I have an other problem which I do not understand:
Here the code piece:
#define NOP 0xd3eeee
void WriteNOP(PerlIO* fh)
{
WriteTriplex(fh, NOP);
}
int WriteTriplex(PerlIO* fh, long triplex)
{
int i;
char buf[4] = { '\0' };
printf("The triplex: %x\n", triplex);
buf[0] = (char)triplex>>16;
buf[1] = (char)triplex>>8;
buf[2] = (char)triplex;
printf("The triplex: %s\n", buf);
return PerlIO_write(fh, buf, 3);
}
If I do this in the file I get FFFFEE and not as expected D3EEEE.
The printf statements but showing me the the correct output.
Does anyone know why?
regards,
Reinhard