Re:
> If I have read in a STDIN record that varies in record length from 1 byte to
> 1920 bytes. Is this the right code below? I have some fishy things
> happening...
>
> readx(stdin_record,-1920);
>
> STRMOVE(1920,stdin_record,1,email_message,1);
len := readx (stdin_record, -1920);
if ccode <> cce then
...handle the error or EOF
else
strmove (len, {# of bytes}
stdin_record, 1, {source}
email_message, 1); {destination}
But, I wouldn't use "-1920". Instead:
len := readx (stdin_record, -sizeof (stdin_record));
or:
len := readx (email_message, -strmax (email_message));
if ccode <> cce then
...
else
setstrlen (email_emssage, len);
Stan Sieler [log in to unmask]
www.allegro.com/sieler/wanted/index.html www.allegro.com/sieler
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|