Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fawrite(3W) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fasetinfo(3W)

farectwrite(3W)

facursor(3W)

FAWRITE(3W)

Series 300 and 500 Only

NAME

fawrite − write a line of characters with their enhancements

SYNOPSIS

#include <fa.h>
int fawrite(gfd,column,line,charbuf,ebuf,strlen);
int gfd;
int column, line;
char *charbuf;
ENH *ebuf;
int strlen;

DESCRIPTION

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

column
indicates the alpha column at which to start the operation.

line indicates the alpha line at which to do the operation. 

charbuf
points to the characters to write (a null character does not terminate this string!) 

ebuf points to the corresponding enhancements for each character (i.e. the third character in charbuf receives the enhancement of the third element of ebuf).  ebuf may be NULL signifying that no enhancements are indicated.  In this case, the defaultenhancements (from fasetinfo) is used.  The valid values for ebuf are taken from the set described in farectwrite.  Enhancement values are the bitwise oring of the values supported by the particular device. 

Previously enhanced character positions lose their enhancement when overwritten by a non-enhanced character (i.e.  ebuf is NULL). 

strlen
is the number of bytes to write. If the string contains 2-byte characters, each 2-byte character is counted as two bytes.

DISCUSSION

This library call writes strlen characters on the window device starting at the locations described by column and line. 

fawrite does not affect the cursor position. 

Attempts to use fawrite for wrapping or scrolling may produce undesired results. 

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, it outputs the two 1-byte characters that correspond to the code values of the illegal 2-byte character. 

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

By default, fast alpha “writes” update the screen immediately.  It is possible to get better performance by buffering writes and updating the screen after the writes are buffered.  See fasetinfo(3W) and the fa.h header file for information on how to buffer-up writes, as opposed to having them occur when this routine is called. 

HARDWARE DEPENDENCIES

Series 500:
Fast alpha routines do not support HP-15 (2-byte) fonts on Series 500.

SEE ALSO

fasetinfo(3W), farectwrite(3W), facursor(3W). 

DIAGNOSTICS

A value of -1 is returned if gfd is invalid, or a call to fainit was never executed on this gfd.  See errno(2) for further information. 

BUGS

If a rectangular font (pixelformat = 1) or a HP-15 (2-byte) font (pixelformal = 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 which are written to obscured area will be twice as big as they should be when the area is displayed. 

Hewlett-Packard Company  —  May 11, 2021

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