Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fm_colors(3w)

,fm_load(3w)

,write_enable(3G)

,drawing_mode(3G)

background_color_index(3G)

fm_write(3w)

NAME

fm_write − write characters to the screen

SYNOPSIS

int fm_write(gfd,x,y,str,strlen,dump,colormode);
int gfd,x,y;
char *str;
int strlen,dump,colormode;

DESCRIPTION

gfd is an integer file descriptor for an gopened device interface. 

x,y location (upper left) to begin writing characters. 

str character string to be output. 

strlen is the length of str in bytes. 

dump is a boolean indicator: update the screen immediately (TRUE), let the system imposed buffering take care of the visual update (FALSE). 

colormode is a boolean indicator: use the colors from fm_colors (TRUE). 

DISCUSSION

If colormode is not enabled, the string is written using the current values of drawing mode and write enable mask for file descriptor gfd; the value of the background color index has no effect. Neither the drawing mode, the write enable mask, nor the background color index is modified by fm_write.

If colormode is enabled, the string is written with the foreground and background colors established by fm_colors. Neither the drawing mode, the write enable mask, nor the background color index has any effect on the result. Neither the drawing mode nor the background color index is modified by fm_write. A side effect of fm_write (in colormode) is that all planes are enabled for writing. 

The string str is not null-terminated, the parameter strlen determines how many bytes are written. 

The following processing is done only when the current active font is a HP-15 (2-byte) character font:

 ∗ If the string to be output contains an undefined 2-byte character, the 2-byte galley character is output instead of the undefined character. 

 ∗ If the string contains an illegal 2-byte character, the two 1-byte characters that correspond to the codes of the illegal 2-byte character are output. 

 ∗ If the last code of the string is the first code of a 2-byte character, the 1-byte character that corresponds to the code value is output. 

SEE ALSO

fm_colors(3w),fm_load(3w),write_enable(3G),drawing_mode(3G), background_color_index(3G). 

DIAGNOSTICS

A −1 is returned if gfd is not valid; otherwise, 0 is returned.  See errno(2) for more information.

BUGS

If a rectangular font (pixelformat = 1) or a HP-15 (2-byte) font (pixelformat = 2) is used on a low resolution display with retained rasters, every other rectangular pixel will be lost when an area is obscured.  Also, 2-byte characters that are written to the obscured area will be twice as big as they should be when the area is unobscured. 

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026