The programmer in question is a C / UNIX programmer new to the 3K, using
the gnu c++ compiler. Me, I don't use intrinsics for I/O, so am almost
useless (but please don't quote me on that). Can someone help us
understand this behavior?
>----------
>Subject: Before I flounder any more...
>
>Can you check your grapevine for idiosyncrasies with INTRINSICs, especially
>FOPEN.
>
>I have the most simple C program using the INTRINSIC FOPEN. Eventually, I
>want to use it to write to a MSG file (since a normal C "fopen" gets an
>"Implementation-defined error"). However, I am getting inconsistent results
>when trying to open an existing file to read.
>
>My simple program issues an FOPEN( filename, 3, 0 ) - which means open an
>existing ("old") file for reading.
>
>:listf blah ,2
>ACCOUNT= CUB GROUP= PUB
>
>FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
> SIZE TYP EOF LIMIT R/B SECTORS #X MX
>
>BLAH 80B FA 2 100 3 16 1 *
>
>
>:./readf BLAH
>Read File, Version 1.0
>(c) Copyright 1997; Sillyware, Inc.
>
>Reading data from 'BLAH'
>FOPEN ( 'BLAH', 3, 0 )
>Condition Code: 1 <<<-- that's a "bad" return code
>:./readf BLAH
>Read File, Version 1.0
>(c) Copyright 1997; Sillyware, Inc.
>
>Reading data from 'BLAH'
>FOPEN ( 'BLAH', 3, 0 )
>Condition Code: 2 <<<-- that's a "good" return code
>ccode() on FCLOSE: 2
>
>I cannot predict when the program will or will not succeed.
>
>Either gnu isn't happy doing HP INTRINSICS, or there is something about the
>"timeliness" of accessing files that I don't understand (or some other
>security or access thing I am unaware of, which is very possible).
>
>Any help?
|