catopen (ULTRIX) catopen (ULTRIX)
NAME
catopen - Opens a specified message catalog
DIFFERENCES
On ULTRIX systems, the catopen() function opens a message catalog and
returns a catalog descriptor if successful. On Digital UNIX systems,
the catopen() function does not open the message catalog. Instead, it
is the catgets() function that opens a message catalog. Therefore, if
your application checks whether a message catalog was successfully
opened, you must change your program to reflect this change. For exam‐
ple, the following ULTRIX code will not work on a Digital UNIX system:
catd = catopen("example.cat", 0);
if (catd == (nl_catd) -1)
/* message catalog was not opened */
else
/* message catalog was opened */
The following code shows how the previous code is modified to use the
catgets() function:
catd = catopen("example.cat", 0);
if (catgets(catd, 1, 1, NULL) == NULL)
/* message catalog was not opened */
else
/* message catalog was opened */
RELATED INFORMATION
Digital UNIX Functions:
catopen(3), catgets(3), catclose(3), setlocale(3) delim off
catopen (ULTRIX)