[net.micro.pc] Lattice "C" Problem

lisa@phs.UUCP (Jeffrey William Gillette) (05/05/85)

Re: Lattice \"C\" Problem
[]

> Has anyone seen a problem like this with Lattice "C", Version
> 2.14 running under MS-DOS version 2.13? A file opens o.k. with fopen,
> stuff gets stored and fclose gives a good return code, but when I examine
> the file using 'dir', it has 0K. It only happens sometimes (Of course!).

Don't know if this has any thing to do with your question, but I have
also had more than a little consternation with Lattice file i/o.  It 
seems that Lattice opens files in one of two modes ("a" for text, "b"
for binaries).  The difference is supposed to be the more sophisticated
handling of newline delimiter sequences in the "a" (text) mode.  In my
copy (version 2.10) performing a tell/seek or rewind on a file opened in the
"a" mode regularly yields incorrect results (usually off by some random
integer times the number of newline sequences encountered thus far).

I'm not sure whether Lattice has addressed this problem in recent 
revisions, but it does me no good to have a "UNIX compatible" file mode
on my C compiler if I can't use basic UNIX functions to control the
file!

Jeffrey William Gillette	...!duke!phs!lisa
Duke University

caf@omen.UUCP (Chuck Forsberg WA7KGX) (05/07/85)

I remember reading a disclaimer that fseek doesn't work properly when in
TEXT (LF -> CR/LF) mode.  I've used several different C compilers for DOS,
so it's possible I read the warning from Computer Innovation's compiler.

Be thankful that Lattice fseek at least works properly in binary mode!
I'm using the DOS cross compiler in PC-AT Xenix whose DOS library fseek
doesn't work properly; the same program works fine on Xenix, or when
compiled with Lattice or C86.

BTW, my PC-AT Xenix bug count is 58 and counting.
-- 
Chuck Forsberg WA7KGX	..!tektronix!reed!omen!caf
Omen Technology Inc 17505-V NW Sauvie IS RD Portland OR 97231
Voice: 503-621-3406	Modem: 503-621-3746 (Hit CR's for speed detect)

sommers@topaz.ARPA (Mamaliz @ The Soup Kitchen) (05/11/85)

So please please please send us the bug-count.  I don't want to have to
reinvent the wheel.

-- 
liz sommers
uucp:   ...{harvard, seismo, ut-sally, sri-iu, ihnp4!packard}!topaz!sommers
arpa:   sommers@rutgers