od_disp_str()¶
Displays a null-terminated string on the remote and local screens
Synopsis¶
void od_disp_str(const char *pszToDisplay);
Return value¶
N/A
Description¶
od_disp_str() displays every byte preceding the terminating null in
pszToDisplay. In a remote session the string is sent to the caller and
applied to OpenDoors' virtual session screen; the portion which fits is also
shown on the local presentation. In local mode it is displayed on the local
screen. pszToDisplay must not be NULL.
Unlike od_printf(), this function performs neither C format
substitution nor OpenDoors color-name processing. It is therefore the normal
choice for a complete string, particularly when the string may contain
percent characters supplied by a user. Use od_putch() for a
single character, od_disp() for a counted buffer or output
without local echo, and od_repeat() for a run of one
character.
Control characters are applied individually to the OpenDoors screen. A
carriage return moves to the beginning of the current row; a line feed moves
down one row and may scroll the active window. OpenDoors does not insert either
character automatically. Existing OpenDoors programs conventionally use
"\n\r" when beginning a new line:
od_disp_str("First line\n\r");
od_disp_str("Second line\n\r");
ANSI, AVATAR, and RIP escape sequences in the string are transmitted but are
not interpreted by this function for the OpenDoors screen. Pass such a stream
to od_disp_emu(), or place a complete display in a file and
use od_send_file().
The function does not report communications or display errors and returns no value.
Examples¶
Several calls may be used to construct one line:
od_disp_str("Another ");
od_disp_str("od_disp_str() ");
od_disp_str("example\n\r");
A string variable is displayed in the same manner:
char string[80];
strcpy(string, "This is a string!\n\r");
od_disp_str(string);
See also¶
od_printf(), od_disp(),
od_disp_emu(), od_putch(),
od_repeat()