goren@bimacs.BITNET (goren yoram) (06/06/90)
I had to send the character \0 to my printer.
I tried :
fp = fopen ("PAR:", "w")
fprintf (fp, "aaa\000bbbb")
fprintf (fp, "aaa%cbbbb", 0x00)
The first sent until (not including) the \0, and the second just ignord it.
I also tried:
FileHandle *fh, *Open ()
unsinged char c;
c = 0;
fh = Open ("PAR:", O_WRONLY) (worked fine)
Write (fh, &c, 1L) (write failed)
and
int fd, open ()
fd = open ("PAR:", O_WRONLY) (worked fine)
write (fd, &c, 1L) (the program was stuck)
What did I do wrong, and what is the right way to send 0x00 to the printer?
(I use Aztec 3.6a, and a A1000 with 1.5 MB of memory)
Thanks,
Goren
BITNET goren@bimacs
Arpanet goren%bimacs.bitnet@cunyvm.cuny.edu
UUCP ...!psuvax1!bimacs.bitnet!goren or:
...!uunet!goren@bimacs.bitnet
-----------------------------------------------------------------------
| Always look on the bright side of life.... |
-----------------------------------------------------------------------
--
BITNET goren@bimacs
Arpanet goren%bimacs.bitnet@cunyvm.cuny.edu
UUCP ...!psuvax1!bimacs.bitnet!goren or:
...!uunet!goren@bimacs.bitnet
-----------------------------------------------------------------------
| Always look on the bright side of life.... |
-----------------------------------------------------------------------