On Tue, Dec 16, 2014 at 8:07 AM, David Crayford <[email protected]> wrote:
<snip>
> I guess, in that case, that the prototype would look something like:
>>
>> void *vbsread(int fd, void *buffer, int buffer_length);
>>
>
> Well you need a to set the bounds for the buffer length for the client.
>
> void *vbsread(int fd, void *buffer, size_t buffer_length);
>
> char buffer[MAX_LRECL];
>
> vbsread(fd,buffer,sizeof buffer)
>
>
I changed vbsrecord to look like:
#if !defined(VBS_MAX_LRECL)
#define VBS_MAX_LRECL 32767
#endif
typedef struct {
int vbslrecl;
char vbsdata[VBS_MAX_LRECL]; /*actually this is "vbslrecl" bytes of data */
} vbsrecord ;
which allows the user #include it, but set the maximum lrecl themselves to
some value. If they don't, it will default to 32767. I haven't looked at
changing vbsread() yet.
--
While a transcendent vocabulary is laudable, one must be eternally careful
so that the calculated objective of communication does not become ensconced
in obscurity. In other words, eschew obfuscation.
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN