[ From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 13-AUG-1990 14:33:18.05  To:	MRGATE::"ARISIA::EVERHART" CC:	1 Subj:	Re: PBMPLUS problems with PCX and GIF files   * Received:  by crdgw1.ge.com (5.57/GE 1.70)) 	 id AA16207; Mon, 13 Aug 90 14:13:05 EDT Y Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Mon, 13 AUG 90 10:55:58 PDT , Received: by ucbvax.Berkeley.EDU (5.63/1.42)* 	id AA24467; Mon, 13 Aug 90 10:38:30 -07009 Received: from USENET by ucbvax.Berkeley.EDU with netnews . 	for info-vax@kl.sri.com (info-vax@kl.sri.com); 	(contact usenet@ucbvax.Berkeley.EDU if you have questions)  Date: 13 Aug 90 17:41:11 GMT@ From: psuvm!psuecl!praxa!ttt@psuvax1.cs.psu.edu  (Trevor Taylor) Organization: Praxa Ltd.4 Subject: Re: PBMPLUS problems with PCX and GIF files  Message-Id: <65378@praxa.com.au>= References: <"900809173026.76366.323.EHL28-4"@CompuServe.COM> # Sender: info-vax-request@kl.sri.com  To: info-vax@kl.sri.com   t In article <"900809173026.76366.323.EHL28-4"@CompuServe.COM>, 76366.323@CompuServe.COM (Level Five Research) writes:K >>I have been trying to get PBMPLUS working with files copied up from a PC, ' >>however have met with little success.  >>M >>Creating a two colour (i.e. B/W) picture with Microsoft Paintbrush, copying < >>the resulting file up to the VAX using PCSA, and typing :- > N > How is the file service that you're using under PCSA set up?  Is it creatingI > FIXED length files, or STREAM files?  For some programs, it does make a 
 > difference.  >   ( Specifically, the problem is as follows:  D The default file type for PCSA is STREAM. The VAX C run-time libraryE does not handle STREAM files correctly (it uses STREAM_LF). There are  three ways around the problem:  A 1. Set your file service up to use FIXED files (512 bytes). VAX-C  reads these OK.   A 2. Get a copy of the FILE utility from DECUS and use it to change = the file attributes from STREAM to STREAM_LF. (NOTE: There is @ absolutely nothing wrong with the data in the file -- it is just@ the file attributes which cause VAX-C to access it incorrectly.)  > 3. Change the code so that you force it to open the files with a context of STREAM as follows: %         fopen(fp,file,"r","ctx=stm"); @ This is a VAX extension and is non-portable. Furthermore, if you? use this approach, then the normal interpretation of other file < types, including sequential, indexed, etc., does not happen.+ In fact, it reads EVERY byte in the file!!!   = The reason for this problem has to do with the way that VAX-C 9 converts record-oriented files into a stream of bytes for : reading. This is necessary for normal files, such as those> created with EDT, to be read correctly. Unfortunately, it does& not understand STREAM, only STREAM_LF.  9 Maybe somebody at DEC would care to explain this apparent  inconsistency?           Trevor  