Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ printmsg(3C) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getmsg(3C)

printf(3S)

hpnls(7)

PRINTMSG(3C)

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;

HP-UX COMPATIBILITY

Level: HP-UX/RUN ONLY

Origin: HP

Native Language Support:
8−bit data, customs, messages

DESCRIPTION

Printmsg , fprintmsg , and sprintmsg are derived from their counterparts in printf(3S), with the amplification that the conversion character % is replaced by the sequence %digit$ .  Digit is a decimal digit n in the range 1-9, 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 %digit$ sequence, and it is the user’s responsibility to make sure the numbering is correct.  All parameters must be used exactly once. 

EXAMPLE

To create a language independent date and time printing routine we would write

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

For American usage format would be a pointer to the string

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

and for German usage to a string

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

the resulting outputs will be "Sunday, July 3, 10:02", and "Sonntag, 3 Juli  10:02" , assuming that the proper strings have been passed in. 

SEE ALSO

getmsg(3C), printf(3S), hpnls(7). 

Hewlett-Packard  —  last mod. May 11, 2021

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