[comp.sys.apple2] GSOS Bug

herwin@pro-novapple.cts.com (Harry Erwin) (10/15/90)

I've been running into a problem with the following sequence of actions:
1.  seek to word zero.
2.  write 28 bytes.
3.  seek to word zero.
4.  write a different 28 bytes.
5.  close.
Afterwards, when I examine the file, I discover that the first write was done
but not the second.  The code is SYS-V C and works on all the other machines
I've ported it to.
Harry Erwin   -->Remember, no good deed goes unpunished...
proline:pro-novapple!herwin uucp: crash!pro-novapple!herwin
arpa: crash!pro-novapple!herwin@nosc.mil Telenet: herwin/trw
Internet: herwin@pro-novapple.cts.com 
alternate Internet: /PN=Harry.Erwin/O=TRW/ADMD=Telemail/C=US/@Sprint.com

toddpw@tybalt.caltech.edu (Todd P. Whitesel) (10/17/90)

herwin@pro-novapple.cts.com (Harry Erwin) writes:

>I've been running into a problem with the following sequence of actions:
>1.  seek to word zero.
>2.  write 28 bytes.
>3.  seek to word zero.
>4.  write a different 28 bytes.
>5.  close.
>Afterwards, when I examine the file, I discover that the first write was done
>but not the second.  The code is SYS-V C and works on all the other machines
>I've ported it to.

What compiler and version are you using? I have a beta of ORCA/C whose fread
and fwrite functions cause weird side effects. I have learned not to use them
until I get the 1.1 update (assuming that fixes them).

Todd Whitesel
toddpw @ tybalt.caltech.edu

herwin@pro-novapple.cts.com (Harry Erwin) (10/20/90)

In-Reply-To: message from herwin@pro-novapple.cts.com

It turned out that the problem was a buggy patch inserted to work around a
problem with a beta test version of Orca C 1.1.  That problem was fixed. 
Currently I know of only two problems in Orca C 1.1:
1.  lseek() doesn't work in ORCAGLIB.  Byteworks coded an LDA 0008 when it
should have coded an LDA 08.  Patchable.
2.  += and -= don't work for long stack variables.  Can corrupt the stack. 
Use a = a + x; instead.  
Otherwise, ORCA C is a fine ANSI C compiler.  Support the IIGS!  Buy Orca C!
Harry Erwin   -->Remember, no good deed goes unpunished...
proline:pro-novapple!herwin uucp: crash!pro-novapple!herwin
arpa: crash!pro-novapple!herwin@nosc.mil Telenet: herwin/trw
Internet: herwin@pro-novapple.cts.com 
alternate Internet: /PN=Harry.Erwin/O=TRW/ADMD=Telemail/C=US/@Sprint.com

herwin@pro-novapple.cts.com (Harry Erwin) (10/20/90)

In-Reply-To: message from toddpw@tybalt.caltech.edu

The 1.1 update to Orca C fixed almost all of the known bugs.  If you were a
beta tester and haven't received the 1.1 update, give Byteworks a call.  The
1.1 update came out some time ago to registered users.
Harry Erwin   -->Remember, no good deed goes unpunished...
proline:pro-novapple!herwin uucp: crash!pro-novapple!herwin
arpa: crash!pro-novapple!herwin@nosc.mil Telenet: herwin/trw
Internet: herwin@pro-novapple.cts.com 
alternate Internet: /PN=Harry.Erwin/O=TRW/ADMD=Telemail/C=US/@Sprint.com