Re:
> FOPEN (,0,4,-myreclen, , , ,10, ,reccount);
Either pass all the parameters each time, e.g.:
FOPEN (NULL, // filename
0, // foptions
4, // aoptions
-myreclen, // recordsize (< 0 = bytes)
NULL, // device
NULL, // formmsg
0, // userlabels (ignord for old files)
1, // blockfactor (ignored for old files)
1, // # buffers (usually ignored)
10, // filesize (ignored for old files)
2, // # extents, max
2, // initialalloc #extents
0); // filecode
Or,
int16 open_new_disk_file (char *filename,
boolean for_io)
int16
fid = -1;
...
fid = open (filename, ...appropriate mode stuff...)
return fid;
} // end open_new_disk_file proc
...
char filename [MAXPATHLEN+1];
...generate a "temp" filename for the file somehow
(hint: Unix has some routines to do this...they
sort of work.)
fid = open_new_disk_file (filename, TRUE);
and always call that. You can use it on MPE, too.
Note that your example FOPEN is opening a new NAMELESS
file. Unix doesn't understand that concept ... every
disk file has a name. You can somewhat simulate this by
opening a "temp" file in /tmp (or /var/tmp or somewhere)
*AND REMEMBERING TO DELETE IT LATER*.
(Note that Unix lacks "close & purge" that FCLOSE offers,
so you have to remember the file name, close the file,
and then unlink() it. Note, too, that you MUST remember
the file name ... most Unixes don't guarantee you that
you can determine a usable file name from an open file :)
> I think I'm going to have to convert all intrinsic calls manually to
> something like -
Note that *MOST* normally omittable intrinsic parameters
default to 0 (or NULL). However, twenty intrinsics don't.
Lund's CSEQ can tell you the default parameters for intrinsics.
You canalso see them via:
:file paslist; disc=10000
:pasxl prntintr
where prntintr is an ASCII file with:
$buildint 'sysintr.pub.sys'$
$listintr 'PASLISTI'$
program a; begin end.
:save paslist
:qedit
t paslist
f "Default"
--
Stan Sieler
[log in to unmask]
www.allegro.com/sieler/wanted/index.html
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|