HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
p
pfmt(3C) pfmt(3C)
The pfmt() system call displays Message not found!! under the following conditions:
No message catalog is specified in fmt and no catalog is defined via setcat(3C).
msg_number is not positive.
No message could be retrieved and def_str is not specified.
APPLICATION USAGE
pfmt() and vpfmt() are thread-safe. These interfaces are not async-cancel-safe. A cancellation point
may occur when a thread is executing pfmt() or vpfmt().
RETURN VALUE
If successful, pfmt() and vpfmt() return the number of bytes written. Otherwise they return a nega-
tive value.
EXAMPLES
Example 1
setlabel("UX:my_appl");
pfmt(stderr, MM_INFO,"MY_cat:1:file is writable");
generates the message:
UX:my_appl: INFO: file is writable
Example 2
setlabel("");
setcat("MY_cat");
pfmt(stderr, MM_ERROR,":1:%s is writable", "my_file");
generates the message:
ERROR: my_file is writable
Example 3
setlabel("");
setcat("MY_cat");
pfmt(stderr, MM_NOSTD,":1:%s is writable", "my_file");
generates the message:
my_file is writable
Example 4
#define MM_USER 10
setlabel("");
addsev(MM_USER, "MY_NOTE");
pfmt(stderr, MM_USER|MM_GET,"MY_cat:1:%s is writable", "my_file");
generates the message:
MY_NOTE: my_file is writable
SEE ALSO
mkmsgs(1), addsev(3C), gettxt(3C), setcat(3C), setlabel(3C), setlocale(3C), printf(3S), stdarg(5).
STANDARDS COMPLIANCE
pfmt(): SVID3
vpfmt(): SVID3
HP-UX Release 11i: December 2000 2 Section 3615
___
___