HP3000-L Archives

August 2008, 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:
"Fairchild, Craig D" <[log in to unmask]>
Reply To:
Fairchild, Craig D
Date:
Mon, 4 Aug 2008 17:18:21 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
Brian theorizes...

...
> However, as my program is riddled with calls to FOPEN, mixing
> and matching is a *big* no-no. Why?
> Because, as I discovered many eons ago, FOPEN and HPFOPEN can
> return the SAME file number on different files!! OUCH!
>
> I don't know if HP ever fixed this problem, but I doubt it
> and if it hasn't been fixed, then I doubt they ever will fix
> it now.........
>
> Life in the fast lane......
>
> Brian.
...

I feel a need to correct this misinformation so that no one will mistakenly assume it to be true. FOPEN and HPFOPEN are two different interfaces to the same routines (one routine creates new files, and the other opens existing files) that perform the file open operation on MPE/iX (or XL). Calling FOPEN or HPFOPEN produces exactly the same result on exactly the same set of data structures on exactly the same set of files. FOPEN's parameter interface is restricted and therefore does not allow for easy expansion of new options. HPFOPEN's paramter interface was designed to be highly expansible and flexible. There are a lot of open options that HPFOPEN supports that FOPEN can't, but the things that they both do are exactly identical.

There are no incompatiblities or issues in mixing calls to FOPEN or HPFOPEN. The only way that you can see the same file number returned from two different calls to these intrinsics (within the same process) is if the process closes the file number after the first open and before the second. If this is unintended, it is usually necessary to debug the application looking for uninitialized variables or other user program logic errors.

I hope this is helpful.

Take Care,
Craig

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2