[Info-vax] proper format for JPEG files
Jose Baars
peutbaars at googlemail.com
Mon Jul 25 17:11:03 EDT 2011
On Jul 25, 6:35 pm, VAXman- @SendSpamHere.ORG wrote:
> How did you write one???
>
I didn't, that's my point.
I really was looking for a 'universal' read routines that would be
able
to read data from all file formats available on VMS, for an SFTP
client,
so file attributes and other VMS specific stuff not relevant.
I used fread(... really big chunk...), but fread doesn't understand
VFC and some other files very well, and I needed access to the
modified time, the owner and the possibility to add RAH, MBF etc.
made using RMS a much more attractive choice.
When reading these illegal stream_lf files with records longer
than 32767 bytes, $GET returned with RMS$_RTB. As my buffer
was already at max, i.e. rab$w_usz = 65535, I was stuck, obviously
the records were longer than the max.
Oddly, when retrying this, I noticed it complains like this:
%RMS-W-RTB, 0 byte record too large for user's buffer.
How anything can be to small for nothing is beyond me.
Of course the ugly solution was obvious: if I got RMS$_RTB, and
the file was stream_lf and lrl was 32767, then I spawned a
set file/attr=(rfm=fix,lrl=512).
If there is a nice solution, I would be grateful to be enlightened!
More information about the Info-vax
mailing list