Path: utzoo!utgpu!cunews!cognos!jimp From: jimp@cognos.UUCP (Jim Patterson) Newsgroups: comp.lang.c Subject: Re: How can I send the null character to the printer? Message-ID: <8832@cognos.UUCP> Date: 24 Sep 90 17:10:44 GMT References: <15.26FC622E@ananke.stgt.sub.org> Reply-To: jimp@cognos.UUCP (Jim Patterson) Organization: Cognos Inc., Ottawa, Canada Lines: 17 In article <15.26FC622E@ananke.stgt.sub.org> kaiser@ananke.stgt.sub.org (Andreas Kaiser) writes: >`t BM> In order to define some downloadable characters for my dot matrix printer, > BM> I have to send it a series of character values encoding the bit patterns > BM> for the new characters. Some of those encoded values are zero. > >Make your own 'fputs', using 'putc'. 'putc' should transmit ANY code (unless you >operate in text mode on a PC running MSDOS :-). ANY (faithful) implement of fputs will have the same problem. fputs is DEFINED to transmit only up to the first NUL, and so will never transmit a NUL byte by definition. However, fputc or putc will work in other contexts, as will fwrite (as someone else has already noted). -- Jim Patterson Cognos Incorporated UUCP:uunet!mitel!cunews!cognos!jimp P.O. BOX 9707 PHONE:(613)738-1440 3755 Riverside Drive Ottawa, Ont K1G 3Z4