Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

catgetmsg(3C)

nl_init(3C)

printf(3S)

hpnls(5)

PRINTMSG(3C)  —  HP-UX

NAME

printmsg, fprintmsg, sprintmsg − print formatted output with numbered arguments

SYNOPSIS

#include <stdio.h>

int printmsg (format [ , arg ] ... )
char ∗format;

int fprintmsg (stream, format [ , arg ] ... )
FILE ∗stream;
char ∗format;

int sprintmsg (s, format [ , arg ] ... )
char ∗s, format;

DESCRIPTION

Printmsg, fprintmsg, and sprintmsg are derived from their counterparts in printf(3S), with the difference that the conversion character % is replaced by %digits$.  Digits are decimal digits representing a number n in the range (1-{NL_ARGMAX}) (NL_ARGMAX is defined in <limits.h>), and indicates that this conversion should be applied to the nth argument, rather than to the next unused one. All other aspects of formatting are unchanged. All conversion specifications must contain the %digits$ sequence and the user must ensure correct numbering.  All parameters must be used exactly once. 

EXAMPLES

To create a language-independent date and time printing routine, write

printmsg(format, weekday, month, day, hour, min);

For American usage format would point to the string:

"%1$s, %2$s %3$d, %4$d:%5$.2d"

resulting in the output:

Sunday, July 3, 10:02

For German usage, the string:

"%1$s, %3$d %2$s %4$d:%5$.2d"

results in the following output:

Sonntag, 3 Juli  10:02

provided that the proper strings have been read. 

WARNINGS

These routines are provided for historical reasons only.  Use of the equivalent routines nl_printf, nl_fprintf and nl_sprintf on printf(3S) is recommended.

HARDWARE DEPENDENCIES

Series 300, 500
Because nl_printf, nl_fprintf, and nl_sprintf on printf(3S) are not currently supported, continue to use these functions.

AUTHOR

Printmsg was developed by HP. 

SEE ALSO

catgetmsg(3C), nl_init(3C), printf(3S), hpnls(5). 

INTERNATIONAL SUPPORT

8-bit data, messages. 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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