DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

setcat(S)


setcat -- define default catalog

Synopsis

   #include <pfmt.h>
   

char *setcat(const char *catalog);

Description

The routine setcat defines the default message catalog to be used by subsequent calls to gettxt or pfmt that do not explicitly specify a message catalog.

catalog must be limited to 14 characters. These characters must be selected from a set of all characters values, excluding \0 (null) and the ASCII codes for / (slash) and : (colon).

setcat assumes that the catalog exists. No checking is done on the argument.

A null pointer passed as an argument will result in the return of a pointer to the current default message catalog name. A pointer to an empty string passed as an argument will cancel the default catalog.

If no default catalog is specified, or if catalog is an invalid catalog name, subsequent calls to gettxt or pfmt that do not explicitly specify a catalog name will use

   Message not found!!\n

as the default string.

Return values

Upon success, setcat() returns a pointer to the catalog name. Upon failure, setcat() returns a null pointer.

Usage

setcat("test");
gettxt(":10", "hello world\n")

References

environ(M), gettxt(S), pfmt(S), setlocale(S)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005