Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
Chapter 8 181
Intrinsics Reference
FCONTROL(25)
FCONTROL(25)
Parameters
controlcode 25 — Defines Additional End-of-Record (AEOR)
character for terminal input.
param 16-bit unsigned integer by reference
(required).
Passes the value of a character to be used as an
additional line terminator. The octal or decimal code for
the character must be contained in the right byte of the
parameter; the left byte is ignored. If the NULL
character (%0) is specified, normal (default) line
termination conditions are restored.
Notes An FCONTROL call with a controlcode value of 25 is
used to establish an Additional End-of-Record (AEOR)
character, which is then in effect for reads posted
against the device that owns the file whose file number
is specified in filenum. You can only assign one AEOR
character at a time. If you need more than one AEOR,
use FDEVICECONTROL instead.
Normally, character mode reads using standard editing
are terminated by a carriage return (
[Return]), the
standard EOR character for HP terminal types. The
system echoes the carriage return and sends a linefeed
to the terminal, so that the cursor is positioned at the
beginning of the next line, ready for the next read. Even
if an AEOR character has been assigned by a call to
FCONTROL(25), the EOR character will still terminate
reads in the usual way.
When a read is terminated by an Additional
End-of-Record character, the AEOR character is
included in both the data and in the byte count. No
carriage return or linefeed is sent to the terminal. The
read terminates with an error condition which
indicates that the Additional End-of-Record character
has been encountered. A call to FCHECK returns an
error code of 31. To recover from this error, your
program can delete the AEOR character from the input
data, subtract one from the byte count of the read, and
send out a carriage return and linefeed to place the
cursor in the proper place for the next read.