1setcat(3C)               Standard C Library Functions               setcat(3C)
2
3
4

NAME

6       setcat - define default catalog
7

SYNOPSIS

9       #include <pfmt.h>
10
11       char *setcat(const char *catalog);
12
13

DESCRIPTION

15       The setcat() function defines the default message catalog to be used by
16       subsequent calls to gettxt(3C),  lfmt(3C),  or  pfmt(3C)  that  do  not
17       explicitly specify a message catalog.
18
19
20       The catalog argument must be limited to 14 characters. These characters
21       must be selected from a set of  all  characters  values,  excluding  \0
22       (null) and the ASCII codes for / (slash) and : (colon).
23
24
25       The  setcat()  function assumes that the catalog exists. No checking is
26       done on the argument.
27
28
29       A null pointer passed as an argument will result in  the  return  of  a
30       pointer  to  the  current default message catalog name. A pointer to an
31       empty string passed as an argument will cancel the default catalog.
32
33
34       If no default catalog is specified, or if catalog is an invalid catalog
35       name, subsequent calls to gettxt(3C), lfmt(3C), or pfmt(3C) that do not
36       explicitely specify a catalog name will use Message  not  found!!\n  as
37       default string.
38

RETURN VALUES

40       Upon  successful  completion, setcat() returns a pointer to the catalog
41       name.  Otherwise, it returns a null pointer.
42

EXAMPLES

44       Example 1 Example of setcat() function.
45
46                 setcat("test");
47                 gettxt(":10", "hello world\n")
48
49

ATTRIBUTES

51       See attributes(5) for descriptions of the following attributes:
52
53
54
55
56       ┌─────────────────────────────┬─────────────────────────────┐
57       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │MT-Level                     │MT-Safe                      │
60       └─────────────────────────────┴─────────────────────────────┘
61

SEE ALSO

63       gettxt(3C), lfmt(3C),  pfmt(3C),  setlocale(3C),  attributes(5),  envi‐
64       ron(5)
65
66
67
68SunOS 5.11                        29 Dec 1996                       setcat(3C)
Impressum