HP3000-L Archives

December 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Stigers, Greg ~ AND" <[log in to unmask]>
Reply To:
Stigers, Greg ~ AND
Date:
Fri, 5 Dec 1997 14:29:59 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (52 lines)
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?

ATOM RSS1 RSS2