Subject: | |
From: | |
Reply To: | |
Date: | Fri, 19 Jul 1996 17:13:28 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Here's a SIGMPE question for HPWORLD '96:
When will we get some new file system intrinsics that can read/write
more than about 40 KB to 64 KB? FWRITE is fundamentally limited
by the size of the "tcount" parameter (16 bits) to a theoretical
maximum of 32768 bytes or 32767 16-bit words, but some DDS tapes have data
records larger than this! FREAD/FWRITE can't be extended correctly,
so I suggest four new intrinsics:
function HPFREAD (
var status : hpe_status; {32-bit output parameter)
filenum : integer; {32-bit value}
buffer : globalanyptr; {64-bit address}
bytes : bit32) {32-bit value}
: bit32;
Semantics: similar to FREAD, but:
is always byte oriented ... if "bytes" <= 0, no read is done.
if "bytes" is positive, is the number of bytes to read (imagine that!)
Sets CCODE as FREAD.
Returns result in status:
0 = ok
>0 = warning (CCG) ... only one warning defined:
1 = EOF
<0 = error (CCL)
value is in hpe_status format, not the 16-bit file
system error format! If you want the 16-bit file error,
call fcheck (integer (filenum)).
function HPFWRITE (
var status : hpe_status; {32-bit output parameter)
filenum : integer; {32-bit value}
buffer : globalanyptr; {64-bit address}
bytes : bit32; {32-bit value}
cctl : integer) {32-bit value}
: bit32;
Similar to FWRITE, with the same type of differences that HPFREAD
has vs. FREAD.
The functional result is a POSIX inspired:
>=0 ... number of bytes written
-1 ... an error occurred...see status parameter.
and:
function HPFREADDIR (
var status : hpe_status; {32-bit output parameter)
filenum : integer; {32-bit value}
buffer : globalanyptr; {64-bit address}
bytes : bit32; {32-bit value}
recnum : longint) {32-bit value}
: bit32;
Similar to HPFREAD above, but positions the file to logical record
number "recnum" first. NOTE: if this is a byte stream file, then
recnum is the absolute byte offset from the start of the file.
(Thus allowing 4GB and GREATER files to be read)
and:
function HPFWRITEDIR (...
Exercise for the reader.
--
Stan Sieler [log in to unmask]
http://www.allegro.com/sieler.html
|
|
|