#include "SaPopCalls.h"
char* SaCatGets(int set_num, int msg_num, char* default_str);
SaCatGets
is successful, it returns a pointer to a buffer containing the message text. The buffer is statically allocated and is reused the next time UxCatGets
is called. If SaCatGets
cannot retrieve the message text from the message catalog, it returns default_str
.
SaCatGets
attempts to read the message msg_num
from the set_num
in the open message catalog. This function looks for a file dbuimx2_6.cat
in the directories specified by the environment variable, NLSPATH
. The source file for the dbuimx2_6.cat
file is dbuimx2_6.msg
. This file contains the text for the Sapphire/Web message catalog. Set one is reserved for Sapphire/Web and should not be used. It contains various strings used in the client screens, such as the Login and the SaConsole
.
SaCatGets
is called. For example, if you call a function that takes 2 char*
parameters and use the return of SaCatGets
as expressions for those to parameters, one will actually be the copy of the other. When in doubt, copy the return value of SaCatGets
.
printf("%/%", SaCatGets(1,1,"/tmp"),
SaCatGets(1,2,"file.dat"));
file.dat/file.dat