1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Centralize catgets() calls through MsgCat

CDE has relied upon catgets() implementations following a relaxed
interpretation of the XPG internationalization standard that ignored
-1, the standard error value returned by catopen, as the catalog
argument. However, this same behavior causes segmentation faults with
the musl C library.

This patch:

- Centralizes (with the exception of ToolTalk) all calls to catopen(),
  catgets(), and catclose() through MsgCat within the DtSvc library.
- Prevents calls to catgets() and catclose() that rely upon
  undefined behavior.
- Eliminates a number of bespoke catgets() wrappers, including multiple
  redundant caching implementations designed to work around a design
  peculiarity in HP/UX.
- Eases building CDE without XPG internationalization support by providing
  the appropriate macros.
This commit is contained in:
Lev Kujawski 2021-01-30 20:05:13 -07:00 committed by Jon Trulson
parent 3379999106
commit a6ea2a2d52
241 changed files with 3154 additions and 3498 deletions

View file

@ -39,7 +39,7 @@
#include <X11/IntrinsicP.h>
#include <X11/CoreP.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <Xm/XmAll.h>
#include <Dt/Dnd.h>
#include <Dt/Dts.h>
@ -182,7 +182,7 @@ main(int argc, char **argv)
optionTable, XtNumber(optionTable),
&argc, argv, NULL, NULL, 0);
msgCatalog = catopen(MessageCatalog, NL_CAT_LOCALE);
msgCatalog = CATOPEN(MessageCatalog, NL_CAT_LOCALE);
XtGetApplicationResources(appShell, &argvals,
appResources, XtNumber(appResources),
@ -195,9 +195,9 @@ main(int argc, char **argv)
WM_SAVE_YOURSELF = XmInternAtom(XtDisplay(appShell), "WM_SAVE_YOURSELF",
False);
appnameString = catgets(msgCatalog, 1, 1, "Template");
separatorString = catgets(msgCatalog, 1, 5, " - ");
untitledString = catgets(msgCatalog, 1, 6, "(untitled)");
appnameString = CATGETS(msgCatalog, 1, 1, "Template");
separatorString = CATGETS(msgCatalog, 1, 5, " - ");
untitledString = CATGETS(msgCatalog, 1, 6, "(untitled)");
if (argvals.printMode != NULL) {
/* Load up each file and print it, then exit */
@ -207,7 +207,7 @@ main(int argc, char **argv)
PrintData(wd);
else
fprintf(stderr,
catgets(msgCatalog, 1, 10, "template: can't open %s\n"),
CATGETS(msgCatalog, 1, 10, "template: can't open %s\n"),
argv[i]);
}
DestroyData(wd);
@ -220,7 +220,7 @@ main(int argc, char **argv)
procid = ttdt_open(&ttfd, appnameString, "CDE", "1.0", True);
if ((ttrc = tt_ptr_error(procid)) != TT_OK) {
errfmt = catgets(msgCatalog, 1, 7, "ttdt_open failed:\n%s");
errfmt = CATGETS(msgCatalog, 1, 7, "ttdt_open failed:\n%s");
statmsg = tt_status_message(ttrc);
errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2);
sprintf(errmsg, errfmt, statmsg);
@ -232,7 +232,7 @@ main(int argc, char **argv)
ttrc = ttmedia_ptype_declare(ToolTalkPType, 0, HandleTtMedia,
NULL, True);
if (tt_is_err(ttrc)) {
errfmt = catgets(msgCatalog, 1, 8, "ttmedia_ptype_declare failed:\n%s");
errfmt = CATGETS(msgCatalog, 1, 8, "ttmedia_ptype_declare failed:\n%s");
statmsg = tt_status_message(status);
errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2);
sprintf(errmsg, errfmt, statmsg);
@ -243,7 +243,7 @@ main(int argc, char **argv)
ttpat = ttdt_session_join(NULL, NULL, NULL, NULL, True);
if ((ttrc = tt_ptr_error(ttpat)) != TT_OK) {
errfmt = catgets(msgCatalog, 1, 9, "ttdt_session_join failed:\n%s");
errfmt = CATGETS(msgCatalog, 1, 9, "ttdt_session_join failed:\n%s");
statmsg = tt_status_message(status);
errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2);
sprintf(errmsg, errfmt, statmsg);
@ -353,7 +353,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
pd = XmCreatePulldownMenu(menuBar, "fileMenu", NULL, 0);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 1, "File"));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 1, "File"));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'F'); n++;
@ -362,7 +362,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtManageChild(cb);
XmStringFree(labelString);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 9, "New..."));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 9, "New..."));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'N'); n++;
@ -371,7 +371,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtAddCallback(pb, XmNactivateCallback, NewCb, NULL);
XmStringFree(labelString);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 2, "Open..."));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 2, "Open..."));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'O'); n++;
@ -380,7 +380,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtAddCallback(pb, XmNactivateCallback, OpenCb, (XtPointer)wd);
XmStringFree(labelString);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 3,
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 3,
"Save As..."));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
@ -390,7 +390,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtAddCallback(pb, XmNactivateCallback, SaveCb, (XtPointer)wd);
XmStringFree(labelString);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 4, "Print"));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 4, "Print"));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'P'); n++;
@ -399,7 +399,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtAddCallback(pb, XmNactivateCallback, PrintCb, (XtPointer)wd);
XmStringFree(labelString);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 5, "Clear"));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 5, "Clear"));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'C'); n++;
@ -408,7 +408,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtAddCallback(pb, XmNactivateCallback, ClearCb, (XtPointer)wd);
XmStringFree(labelString);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 6, "Exit"));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 6, "Exit"));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'E'); n++;
@ -421,7 +421,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
pd = XmCreatePulldownMenu(menuBar, "helpMenu", NULL, 0);
labelString = XmStringCreateLocalized(catgets(msgCatalog, 2, 7, "Help"));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog, 2, 7, "Help"));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'H'); n++;
@ -432,7 +432,7 @@ NewWindow(LoadType loadtype, char *name_or_buf, int len)
XtVaSetValues(menuBar, XmNmenuHelpWidget, cb, NULL);
labelString = XmStringCreateLocalized(catgets(msgCatalog,2,8, "Overview..."));
labelString = XmStringCreateLocalized(CATGETS(msgCatalog,2,8, "Overview..."));
n = 0;
XtSetArg(args[n], XmNlabelString, labelString); n++;
XtSetArg(args[n], XmNmnemonic, 'O'); n++;
@ -512,7 +512,7 @@ static void HelpCb(Widget w, XtPointer cd, XtPointer cb)
XtSetArg(args[n], DtNlocationId, HelpTopic); n++;
helpDialog = DtCreateHelpDialog(appShell, "helpDialog", args, n);
title = catgets(msgCatalog, 1, 4, "Template Help");
title = CATGETS(msgCatalog, 1, 4, "Template Help");
XtVaSetValues(XtParent(helpDialog), XmNtitle, title, NULL);
} else {
XtVaSetValues(helpDialog,
@ -561,7 +561,7 @@ static void OpenCb(Widget w, XtPointer cd, XtPointer cb)
Arg args[20];
int n;
dialogTitle = XmStringCreateLocalized(catgets(msgCatalog, 1, 2,
dialogTitle = XmStringCreateLocalized(CATGETS(msgCatalog, 1, 2,
"Template Open"));
pattern = XmStringCreateLocalized(SearchPattern);
n = 0;
@ -610,7 +610,7 @@ static void SaveCb(Widget w, XtPointer cd, XtPointer cb)
Arg args[20];
int n;
dialogTitle = XmStringCreateLocalized(catgets(msgCatalog, 1, 3,
dialogTitle = XmStringCreateLocalized(CATGETS(msgCatalog, 1, 3,
"Template Save As"));
pattern = XmStringCreateLocalized(SearchPattern);
n = 0;

View file

@ -40,7 +40,7 @@
#define CONST
#ifdef I18N_MSG
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#define DTWIDGET_GETMESSAGE(set, number, string)\
(char *) _DtWidgetGetMessage(set, number, string)

View file

@ -34,13 +34,12 @@
/**************************************************************************/
#ifdef NLS16
#include <stdlib.h>
#include <locale.h>
#include <string.h>
#include <limits.h>
#include <nl_types.h>
#include <langinfo.h>
#include <Dt/MsgCatP.h>
#endif
#include <X11/Intrinsic.h>

View file

@ -44,7 +44,18 @@
extern "C" {
#endif
extern char *_DtCatgetsCached(nl_catd catd, int set, int num, char *dflt);
#define CATOPEN(name,oflag) catopen(name,oflag)
#define CATCLOSE(catd) _DtCatclose(catd)
#define CATGETS(catd,set,num,dflt) _DtCatgets(catd,set,num,dflt)
extern char *_DtCatgets(nl_catd catd, int set, int num, const char *dflt);
extern int _DtCatclose(nl_catd catd);
#if 0 /* TODO: Decide between !I18N_MSG and NO_MESSAGE_CATALOG */
typedef int nl_catd;
#define CATOPEN(name,oflag) 0
#define CATCLOSE(catd) 0
#define CATGETS(catd,set,num,dflt) dflt
#endif
#ifdef __cplusplus
}

View file

@ -37,7 +37,7 @@
#define _DtPrintMsgsP_h
#ifdef I18N_MSG
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#define DTPRINT_GETMESSAGE(set, number, string) \
_DtPrintGetMessage(set, number, string)

View file

@ -95,7 +95,7 @@
* Removed debugging #defines.
*/
#include "Search.h" /* the "public" header file */
#include <nl_types.h> /* for nl_catd below and all cat...() funcs */
#include <Dt/MsgCatP.h> /* for nl_catd below and all cat...() funcs */
#include <sys/types.h>
#include <netinet/in.h>
@ -600,7 +600,7 @@ extern void swab_objrec (struct or_objrec *rec, SWABDIR direction);
/*------------------------- MACROS ---------------------------*/
/* (Use offsetof() in stddef.h to replace my old OFFSET macro) */
#define NULLORSTR(str) ((str)?str:catgets(dtsearch_catd,1,1,"<null>"))
#define NULLORSTR(str) ((str)?str:CATGETS(dtsearch_catd,1,1,"<null>"))
#define NUMARRAY(arr) ((sizeof(arr) / sizeof(arr[0])))
/****************************************/

View file

@ -41,7 +41,7 @@
#include <locale.h>
#include <limits.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <langinfo.h>
#include <Dt/Collate.h>

View file

@ -52,7 +52,7 @@
#include <sys/stat.h>
#include <stdio.h>
#include <fcntl.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
/************************************************************************/
/* Routines not defined in include files (yet). */

View file

@ -53,7 +53,6 @@
#endif
#include <limits.h>
#include <locale.h>
#include <nl_types.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>

View file

@ -75,7 +75,7 @@ extern int errno;
#include "FormatUtilI.h"
#if defined(NLS16) || !defined(NO_MESSAGE_CATALOG)
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#endif
#ifndef NL_CAT_LOCALE
@ -789,13 +789,13 @@ _DtHelpLoadMultiInfo (
char *ptr;
nl_catd cat_fd;
cat_fd = catopen ("fmt_tbl", NL_CAT_LOCALE);
cat_fd = CATOPEN("fmt_tbl", NL_CAT_LOCALE);
if (cat_fd != ((nl_catd) -1))
{
/*
* Get the list of characters that can't begin a line.
*/
ptr = catgets (cat_fd, 1, 1, "");
ptr = CATGETS(cat_fd, 1, 1, "");
len = strlen (ptr) + 1;
*cant_begin_chars = (wchar_t *) malloc (len * sizeof (wchar_t));
if (NULL != *cant_begin_chars &&
@ -808,7 +808,7 @@ _DtHelpLoadMultiInfo (
/*
* Get the list of characters that can't end a line.
*/
ptr = catgets (cat_fd, 1, 2, "");
ptr = CATGETS(cat_fd, 1, 2, "");
len = strlen (ptr) + 1;
*cant_end_chars = (wchar_t *) malloc (len * sizeof (wchar_t));
if (*cant_end_chars != NULL &&
@ -825,10 +825,10 @@ _DtHelpLoadMultiInfo (
* 0 means only between a multibyte string and
* a singlebyte string.
*/
ptr = catgets (cat_fd, 1, 3, "1");
ptr = CATGETS(cat_fd, 1, 3, "1");
*nl_to_space = atoi(ptr);
catclose (cat_fd);
CATCLOSE(cat_fd);
}
else
#endif

View file

@ -58,9 +58,6 @@
#define XOS_USE_XT_LOCKING
#include <X11/Xos_r.h>
#include <unistd.h>
#ifndef _SUN_OS /* don't need the nl_types.h file */
# include <nl_types.h>
#endif /* ! _SUN_OS */
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
@ -69,6 +66,7 @@
/* Dt Includes */
#include <Dt/Help.h>
#include <Dt/DtNlUtils.h>
#include <Dt/MsgCatP.h>
#include "HelpP.h"
#include "HelpI.h"
@ -312,8 +310,6 @@ char *_DtHelpGetMessage(
{
char *msg;
char *loc;
nl_catd catopen();
char *catgets();
static int first = 1;
static nl_catd nlmsg_fd;
@ -337,12 +333,12 @@ char *_DtHelpGetMessage(
*/
nlmsg_fd = (nl_catd) -1;
else
nlmsg_fd = catopen(CatFileName, NL_CAT_LOCALE);
nlmsg_fd = CATOPEN(CatFileName, NL_CAT_LOCALE);
first = 0;
}
msg=catgets(nlmsg_fd,set,n,s);
msg=CATGETS(nlmsg_fd,set,n,s);
_DtHelpProcessUnlock();
return (msg);
}

View file

@ -65,10 +65,6 @@
#include "SelectionI.h"
#include "VirtFuncsI.h"
#ifdef NLS16
#include <nl_types.h>
#endif
/******************************************************************************
*
* Private Macros

View file

@ -64,14 +64,6 @@
#include "StringFuncsI.h"
#include "VirtFuncsI.h"
#if defined(NLS16) || !defined(NO_MESSAGE_CATALOG)
#include <nl_types.h>
#endif
#ifndef NL_CAT_LOCALE
static const int NL_CAT_LOCALE = 0;
#endif
/******************************************************************************
*
* Private Defines

View file

@ -72,10 +72,6 @@
#include "XInterfaceI.h"
#include "XUICreateI.h"
#ifdef NLS16
#include <nl_types.h>
#endif
/******** Private Function Declarations ********/
/******** End Public Function Declarations ********/

View file

@ -37,8 +37,8 @@
#ifdef I18N_MSG
#include <stdio.h>
#include <nl_types.h>
#include <X11/Intrinsic.h>
#include <Dt/MsgCatP.h>
#include <Dt/PrintI.h>
#if !defined(NL_CAT_LOCALE)
@ -155,86 +155,6 @@ const char _DtPrMsgPrintDlgMgr_0001[] = "Banner Page Title:";
const char _DtPrMsgPrintDlgMgr_0002[] = "Print Command Options:";
#if defined(I18N_MSG)
#if defined(hpV4)
/*
* Wrapper around catgets -- this makes sure the message string is saved
* in a safe location; so repeated calls to catgets() do not overwrite
* the catgets() internal buffer. This has been a problem on HP systems.
*/
static char *catgets_cached(nl_catd catd, int set, int num, char *dflt)
{
#define INITIAL_NMSGS_PER_SET 300
#define INITIAL_NSETS 50
/* array to hold messages from catalog */
static char ***cached_msgs = NULL;
static int nmsgs_per_set = INITIAL_NMSGS_PER_SET;
static int nsets = INITIAL_NSETS;
char **setptr;
int i, multiplier;
Cardinal size;
char* message;
/* convert to a zero based index */
int setIdx = set - 1;
int numIdx = num - 1;
_DtPrintProcessLock();
if (NULL == cached_msgs)
{
size = sizeof(char**) * nsets;
cached_msgs = (char***) XtMalloc(size);
memset((char*) cached_msgs, 0, size);
}
else if (setIdx >= nsets)
{
for (multiplier=2; setIdx > multiplier*nsets; multiplier++) {}
size = sizeof(char**) * nsets;
cached_msgs = (char***) XtRealloc((char*) cached_msgs, multiplier * size);
memset((char*) (cached_msgs + size), 0, multiplier * size);
nsets *= multiplier;
}
if (NULL == cached_msgs[setIdx])
{
size = sizeof(char*) * nmsgs_per_set;
cached_msgs[setIdx] = (char**) XtMalloc(size);
memset((char*) cached_msgs[setIdx], 0, size);
}
else if (numIdx >= nmsgs_per_set)
{
for (multiplier=2; numIdx > multiplier*nsets; multiplier++) {}
size = sizeof(char*) * nmsgs_per_set;
for (i=0; i<nmsgs_per_set; i++)
{
if (NULL != cached_msgs[i])
{
cached_msgs[i] =
(char**) XtRealloc((char*) cached_msgs[i], multiplier * size);
memset((char*) (cached_msgs[i] + size), 0, multiplier * size);
}
}
nmsgs_per_set *= multiplier;
}
setptr = cached_msgs[setIdx];
if (NULL == setptr[numIdx])
setptr[numIdx] = strdup(catgets(catd, set, num, dflt));
message = setptr[numIdx];
_DtPrintProcessUnlock();
return message;
}
#endif /* hpV4 */
/*
* ------------------------------------------------------------------------
* Name: _DtPrintGetMessage
@ -256,9 +176,6 @@ _DtPrintGetMessage(
int n,
char * s)
{
char *msg;
nl_catd catopen();
char *catgets();
static int first = 1;
static nl_catd nlmsg_fd;
@ -268,16 +185,10 @@ _DtPrintGetMessage(
if(first)
{
first = 0;
nlmsg_fd = catopen(_DTPRINT_CAT_NAME, NL_CAT_LOCALE);
nlmsg_fd = CATOPEN(_DTPRINT_CAT_NAME, NL_CAT_LOCALE);
}
_DtPrintProcessUnlock();
}
#if defined(hpV4)
msg=catgets_cached(nlmsg_fd,set,n,s);
#else
msg=catgets(nlmsg_fd,set,n,s);
#endif
return (msg);
return CATGETS(nlmsg_fd,set,n,s);
}
#endif /* I18N_MSG */

View file

@ -104,7 +104,7 @@ int austext_dopen (
/* Test dbname */
if (dbname == NULL) {
INVALID_DBNAME:
sprintf (sprintbuf, catgets (dtsearch_catd, 13, 348,
sprintf (sprintbuf, CATGETS(dtsearch_catd, 13, 348,
"%s Invalid database name '%s'."),
PROGNAME"348", NULLORSTR(dbname));
DtSearchAddMessage (sprintbuf);
@ -175,7 +175,7 @@ INVALID_DBNAME:
SETPAGES (PROGNAME "283", cache, 4);
d_open (dbdbuf, "o");
if (db_status != S_OKAY) {
sprintf (sprintbuf, catgets (dtsearch_catd, 13, 379,
sprintf (sprintbuf, CATGETS(dtsearch_catd, 13, 379,
"%s Could not open database '%s':\n %s."),
PROGNAME"379", dbdbuf, vista_msg (PROGNAME"379"));
DtSearchAddMessage (sprintbuf);

View file

@ -134,14 +134,14 @@ void add_syntax_errmsg (int msgno)
switch (msgno) {
case 1:
/* Message #2 is called in two places */
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 2,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 2,
"%s Query field is empty."),
PROGNAME"086");
DtSearchAddMessage (msgbuf);
break;
case 2:
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 5,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 5,
"%s Boolean operators must be positioned\n"
"between words or expressions. Two sequential words\n"
"without an operator are interpreted as being separated\n"
@ -151,14 +151,14 @@ void add_syntax_errmsg (int msgno)
break;
case 3:
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 6,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 6,
"%s Expression in parentheses is missing."),
PROGNAME"093");
DtSearchAddMessage (msgbuf);
break;
case 4:
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 7,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 7,
"%s NOT operator (~) must be positioned to\n"
"the left of the word or expression it qualifies."),
PROGNAME"098");
@ -167,7 +167,7 @@ void add_syntax_errmsg (int msgno)
case 5:
/* Message #3 is called in two places */
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 3,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 3,
"%s COLLOCATION operator (@) may\n"
"only be positioned between two words."),
PROGNAME"111");
@ -175,7 +175,7 @@ void add_syntax_errmsg (int msgno)
break;
case 6:
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 4,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 4,
"%s One or more words in your\n"
"query are not stored in database '%s'.") ,
PROGNAME"089", usrblk.dblk->label);
@ -183,7 +183,7 @@ void add_syntax_errmsg (int msgno)
break;
default:
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 8,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 8,
"%s Invalid boolean query. Syntax Error #%d.") ,
PROGNAME"100", msgno);
DtSearchAddMessage (msgbuf);
@ -288,7 +288,7 @@ static TRUTHTAB *get_stem_truthtab (char *newstem, char *origword)
/* Add new stem to array */
if (stemno == saveusr.stemcount) {
if (++saveusr.stemcount > DtSrMAX_STEMCOUNT) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_boolpars, 9,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 9,
"%s Too many terms in boolean query."),
PROGNAME"1513");
DtSearchAddMessage (msgbuf);
@ -490,7 +490,7 @@ TRUTHTAB *boolyac_COLLOC (
if (word1tt->stemno < 0 || word2tt->stemno < 0) {
/* Message #3 is called in two places */
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 3,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 3,
"%s COLLOCATION operator (@) may\n"
"only be positioned between two words."),
PROGNAME"371");
@ -498,7 +498,7 @@ TRUTHTAB *boolyac_COLLOC (
return NULL;
}
if (word1tt->stemno == word2tt->stemno) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 12,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 12,
"%s Collocation operator is not\n"
"permitted between identical words."),
PROGNAME"377");
@ -533,7 +533,7 @@ void yyerror (char *msg) {
else if (parser_invalid_wordcount > 0)
add_syntax_errmsg(6);
else {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 1,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 1,
"%s Your search string is an invalid\n"
"boolean query. Please reformulate and try again."),
PROGNAME"001");
@ -700,7 +700,7 @@ GET_ANOTHER_TOKEN:
if ((usrblk.dblk->dbrec.or_dbaccess & ORA_BLOB) == 0) {
retn_token = ERROR_TOKEN;
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 10,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 10,
"%s Collocation searches not available for database '%s'."),
PROGNAME"2567", usrblk.dblk->label);
DtSearchAddMessage (msgbuf);
@ -709,7 +709,7 @@ GET_ANOTHER_TOKEN:
yylval.int_val = atoi (yytext + 1);
if (yylval.int_val <= 0) {
retn_token = ERROR_TOKEN;
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 11,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 11,
"%s Collocation operator '%.*s' is invalid.\n"
"Correct format is '@n' where n is greater than zero.") ,
PROGNAME"294", DtSrMAXWIDTH_HWORD, yytext);
@ -778,7 +778,7 @@ GET_ANOTHER_TOKEN:
goto GET_ANOTHER_TOKEN;
retn_token = ERROR_TOKEN;
if (!DtSearchHasMessages()) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 13,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 13,
"%s Word '%.*s' is invalid.") ,
PROGNAME"315", DtSrMAXWIDTH_HWORD, yytext);
DtSearchAddMessage (msgbuf);
@ -787,7 +787,7 @@ GET_ANOTHER_TOKEN:
}
if (strlen(stembufp) != strlen(yytext)) {
retn_token = ERROR_TOKEN;
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 14,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 14,
"%s String '%.*s' is not a single word.") ,
PROGNAME"634", DtSrMAXWIDTH_HWORD, yytext);
DtSearchAddMessage (msgbuf);
@ -869,7 +869,7 @@ int boolean_parse (void)
if (usrblk.query == NULL) {
EMPTY_QUERY:
/* Message #2 is called in two places */
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 2,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 2,
"%s Query is empty."), PROGNAME"289");
DtSearchAddMessage (msgbuf);
return FALSE;
@ -935,7 +935,7 @@ EMPTY_QUERY:
}
if (final_truthtab.pmsz <= 0) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 15,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 15,
"%s Your query cannot logically return\n"
"any records. Please reformulate and try again."),
PROGNAME"334");
@ -943,7 +943,7 @@ EMPTY_QUERY:
return FALSE;
}
if (final_truthtab.pmsz >= 256) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolpars, 16,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolpars, 16,
"%s Your query will return entire database\n"
"'%s'. Please reformulate and try again.") ,
PROGNAME"341", usrblk.dblk->label);

View file

@ -342,7 +342,7 @@ static int load_or_wordrecs (void)
/* Probable corrupted database. The btree
* read succeeded but the record read failed.
*/
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolsrch, 6,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolsrch, 6,
"%s Database Error. Word '%s' is\n"
"listed in database '%s' but has no index record.") ,
PROGNAME"295", usrblk.stems[stemno], usrblk.dblk->label);
@ -359,7 +359,7 @@ static int load_or_wordrecs (void)
(long) wordrec->or_hwaddrs,
(long) wordrec->or_hwfree);
if (wordrec->or_hwaddrs > OE_words_hitlimit) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_boolsrch, 14,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolsrch, 14,
"%s '%s' has more than %ld hits.\n"
"Please remove it from the query or raise the WHITLIM\n"
"value in the search engine configuration file."),
@ -1110,7 +1110,7 @@ static DB_ADDR read_d99 (struct or_hwordrec *wordrec)
}
if (fread (readbuf, sizeof(DB_ADDR), request_read, fptr)
!= request_read) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolsrch, 28,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolsrch, 28,
"%s Database Read Error in %s.d99.") ,
PROGNAME"428", usrblk.dblk->name);
DtSearchAddMessage (msgbuf);
@ -1342,13 +1342,13 @@ static void read_stem_bitvec_WK (void)
* The bit number is the remainder after division by 8.
*/
if ((byteno = d99recno >> 3) >= bitveclen) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_boolsrch, 32,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolsrch, 32,
"%s Database Error: %s '%s'\n"
"in database '%s' has invalid d99 record number %ld.") ,
PROGNAME"394",
(usrblk.search_type == 'W') ?
catgets(dtsearch_catd, MS_boolsrch, 33, "Word") :
catgets(dtsearch_catd, MS_boolsrch, 34, "Stem of"),
CATGETS(dtsearch_catd, MS_boolsrch, 33, "Word") :
CATGETS(dtsearch_catd, MS_boolsrch, 34, "Stem of"),
usrblk.stems [save_stemno],
usrblk.dblk->label,
d99recno);
@ -1427,7 +1427,7 @@ void boolean_search (void)
if ( saveusr.stemcount <= 0 ||
final_truthtab.pmsz <= 0 ||
final_truthtab.pmsz >= 256 ) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_boolsrch, 35,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_boolsrch, 35,
"%s Program Error: stemct=%d pmsz=%d\n") ,
PROGNAME"1404", saveusr.stemcount, final_truthtab.pmsz);
DtSearchExit (14);
@ -1556,7 +1556,7 @@ void boolean_search (void)
* generated if a NOT operator was included in the query.
*/
if (need_zero_permute) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_boolsrch, 15,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_boolsrch, 15,
"%s Your query requires retrieving every\n"
"document in the database that does not have any of\n"
"your query words. This type of search may take an\n"

View file

@ -89,7 +89,7 @@ static int file_has_changed (char *fname, time_t origtime)
char sprintbuf[1024];
if (stat (fname, &statbuf) == -1) {
sprintf (sprintbuf, catgets (dtsearch_catd, 10, 1300,
sprintf (sprintbuf, CATGETS(dtsearch_catd, 10, 1300,
"%s Unable to comply with request; cannot access status\n"
" of database file '%s': %s"),
PROGNAME "1300", fname, strerror (errno));
@ -107,7 +107,7 @@ static int file_has_changed (char *fname, time_t origtime)
PROGNAME "1312", aa_argv0, fname,
sprintbuf, nowstring (&statbuf.st_mtime));
if (!(usrblk.flags & USR_NO_INFOMSGS)) {
sprintf (sprintbuf, catgets (dtsearch_catd, 10, 1313,
sprintf (sprintbuf, CATGETS(dtsearch_catd, 10, 1313,
"%s *** REQUEST CANCELED *** %s Engine reinitialized\n"
" due to modification of file %s, probably caused by\n"
" update to one or more databases."),

View file

@ -68,7 +68,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <nl_types.h> /* for nl_catd */
#include <Dt/MsgCatP.h> /* for nl_catd */
#include "vista.h"
#include "dberr.h" /* retained for default vista msgs */
@ -121,7 +121,7 @@ int dberr (int verrno)
*/
void dbautorec (void)
{
fputs (catgets (dtsearch_catd, MS_vista, 304,
fputs (CATGETS(dtsearch_catd, MS_vista, 304,
"\n*** db_VISTA auto recovery in process...\n"),
aa_stderr);
db_status = S_RECOVERY;
@ -151,19 +151,19 @@ char *vista_msg (char *location)
/* Assemble standard Raima err msg */
if (location == NULL)
location = catgets (dtsearch_catd, MS_vista, 303,
location = CATGETS(dtsearch_catd, MS_vista, 303,
"(unspecified location)");
sprintf (vista_errmsg, catgets (dtsearch_catd, MS_vista, 311,
sprintf (vista_errmsg, CATGETS(dtsearch_catd, MS_vista, 311,
"*** DB Error at %s, db_status = %d: %n"),
location, db_status, &i);
msgtarg = vista_errmsg + i;
if (db_status == S_UNAVAIL) { /* +5, usually at d_open() time */
strcpy (msgtarg, catgets (dtsearch_catd, MS_vista, 315,
strcpy (msgtarg, CATGETS(dtsearch_catd, MS_vista, 315,
"Database in use by other users."));
}
else if (db_status >= 0)
strcpy (msgtarg, catgets (dtsearch_catd, MS_vista, 312,
strcpy (msgtarg, CATGETS(dtsearch_catd, MS_vista, 312,
"Programming Error."));
else {
if (db_status < 0 && db_status > -100)
@ -171,22 +171,22 @@ char *vista_msg (char *location)
else if (db_status <= -900)
defaultmsg = system_error[-(db_status + 900)];
else
defaultmsg = catgets (dtsearch_catd, MS_vista, 313,
defaultmsg = CATGETS(dtsearch_catd, MS_vista, 313,
"Unknown Error.");
strcpy (msgtarg, catgets (dtsearch_catd, MS_vista, -db_status,
strcpy (msgtarg, CATGETS(dtsearch_catd, MS_vista, -db_status,
defaultmsg));
}
msgtarg += strlen (msgtarg);
/* Append system errno msg */
sprintf (msgtarg, catgets (dtsearch_catd, MS_vista, 301,
sprintf (msgtarg, CATGETS(dtsearch_catd, MS_vista, 301,
"\n*** System I/O errno %d = %s"),
vista_syserrno, strerror (vista_syserrno));
msgtarg += strlen (msgtarg);
/* Append additional information for common user error msgs */
if (db_status == S_NOFILE) {
strcpy (msgtarg, catgets (dtsearch_catd, MS_vista, 302,
strcpy (msgtarg, CATGETS(dtsearch_catd, MS_vista, 302,
"\n"
"*** The usual cause for this kind of error is a missing\n"
"*** or read-only database file, or some system limit\n"

View file

@ -165,7 +165,7 @@ SAVEUSR saveusr = { 0 };
*/
static void expired (char *sprintbuf)
{
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oe, 71,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oe, 71,
PROGNAME "71 %s has expired."),
OE_prodname);
DtSearchAddMessage (sprintbuf);
@ -288,7 +288,7 @@ static void save_query (char *prefix, time_t start_time)
* with a displayable funny character (tilde ~).
*/
if (usrblk.query == NULL)
strcpy (targ, catgets (dtsearch_catd, MS_misc, 1, "<null>"));
strcpy (targ, CATGETS(dtsearch_catd, MS_misc, 1, "<null>"));
else {
end = saveusr.lastqry + MAX_LASTQRY - 2;
src = usrblk.query;
@ -326,7 +326,7 @@ void oe_write_audit_rec (long numhits)
if ((stream = fopen (OEF_audit, "a ")) == NULL)
/* the blank in "a " works around old aix bug */
{
sprintf (sprintbuf, catgets (dtsearch_catd, MS_misc, 1596,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_misc, 1596,
PROGNAME "1596 Cannot open audit file %s: %s"),
OEF_audit, strerror (errno));
DtSearchAddMessage (sprintbuf);
@ -341,7 +341,7 @@ void oe_write_audit_rec (long numhits)
usrblk.dblk->name,
numhits,
(saveusr.lastqry == NULL) ? \
catgets (dtsearch_catd, MS_misc, 1, "<null>") : saveusr.lastqry);
CATGETS(dtsearch_catd, MS_misc, 1, "<null>") : saveusr.lastqry);
if (saveusr.lastqry != NULL) {
free (saveusr.lastqry);
saveusr.lastqry = NULL;
@ -370,7 +370,7 @@ static int no_keytypes (void)
while (--i >= 0)
if (keytypes[i].is_selected)
return FALSE;
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oe, 440,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oe, 440,
PROGNAME "440 No record keytypes were selected in database '%s'."),
usrblk.dblk->label);
DtSearchAddMessage (sprintbuf);
@ -539,7 +539,7 @@ void Opera_Engine (void)
expired (sprintbuf);
if (OE_flags & OE_PERMERR) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oe, 490,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oe, 490,
PROGNAME "490 %s Engine permanently disabled."), OE_prodname);
DtSearchAddMessage (sprintbuf);
usrblk.retncode = OE_ABORT;
@ -548,7 +548,7 @@ void Opera_Engine (void)
/* Ensure that the first call is always an OE_INITIALIZE call */
if ((usrblk.request != OE_INITIALIZE) && !(OE_flags & OE_INITOK)) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_oe, 523,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_oe, 523,
PROGNAME "523 Request Denied: First request must "
"be Engine Initialization."));
usrblk.retncode = OE_NOOP;
@ -573,7 +573,7 @@ void Opera_Engine (void)
if (strcmp (usrblk.dblk->name, db->name) == 0)
break;
if (db == NULL) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oe, 48,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oe, 48,
PROGNAME "48 Request Aborted: "
"'%s' database not available at this site."),
usrblk.dblk->name);
@ -874,7 +874,7 @@ NO_TEXT:
break;
default:
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oe, 367,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oe, 367,
PROGNAME "367: User Interface Error. "
"%d is invalid request code.\n"),
usrblk.request);

View file

@ -179,8 +179,8 @@ void oe_initialize (void)
if (usrblk.query != NULL)
ptr = usrblk.query;
else
ptr = catgets (dtsearch_catd, MS_misc, 6, "<unknown>");
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 137,
ptr = CATGETS(dtsearch_catd, MS_misc, 6, "<unknown>");
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 137,
"%s User Interface version %s and Engine "
"version %s are incompatible."),
PROGNAME"137", ptr, AUSAPI_VERSION);
@ -192,7 +192,7 @@ void oe_initialize (void)
/* Load site configuration (ocf) file and create dblks list */
if (!load_ocf()) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 202,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 202,
"%s Initialization failed due to errors in configuration file."),
PROGNAME"202");
DtSearchAddMessage (sprintbuf);
@ -227,7 +227,7 @@ void oe_initialize (void)
*/
if (!ve_initialize()) {
INIT_FAILED:
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 266,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 266,
"%s Initialization failed due to errors in database,\n"
" language, or related files."),
PROGNAME "266");
@ -276,7 +276,7 @@ DELETE_DB:
/* Abort if fatal dictionary load errors */
if (good_dblk_count <= 0) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_misc, 8,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_misc, 8,
"%s No valid databases remain."),
PROGNAME"265");
DtSearchAddMessage (sprintbuf);

View file

@ -147,7 +147,7 @@ extern int db_oflag;
static void signal_abort (int sig)
{
fputs (DtSearchGetMessages (), aa_stderr);
fprintf (aa_stderr, catgets (dtsearch_catd, MS_ausapi, 216,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_ausapi, 216,
"\n%s %s Caught signal %d.\n"),
PROGNAME"216",
(aa_argv0) ? aa_argv0 : OE_prodname,
@ -191,7 +191,7 @@ static int valid_dbname (char *dbname)
break;
}
if (db == NULL) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 1,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 1,
"%1$sInvalid or unavailable database '%2$s'."),
PROGNAME "48 ", dbname);
DtSearchAddMessage (sprintbuf);
@ -301,7 +301,7 @@ int DtSearchInit (
int *dbcount)
{
if (aa_is_initialized) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 621,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 621,
"%1$s %2%s has already been initialized."),
PROGNAME"621", PRODNAME);
DtSearchAddMessage (sprintbuf);
@ -322,7 +322,7 @@ int DtSearchInit (
/* Open msgs and help text catalogs. */
if (switches & (DtSrInNOLOCALE == 0)) {
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
}
/* Register AusText abort signal handlers.
@ -348,7 +348,7 @@ int DtSearchInit (
/* If user name was not passed, get it from LOGNAME environment var */
if (userid == NULL || *userid == 0)
if ((userid = (char *) getenv ("LOGNAME")) == NULL) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 187,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 187,
"%1$s Missing both userid and LOGNAME environment variable."),
PROGNAME "187 ");
DtSearchAddMessage (sprintbuf);
@ -398,7 +398,7 @@ int DtSearchInit (
if (dbnames) {
*dbnames = ausapi_dbnamesv;
if (!dbcount) {
sprintf (sprintbuf, catgets(dtsearch_catd, MS_ausapi, 7,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 7,
"%s dbnames specified but not dbcount."),
PROGNAME"304");
DtSearchAddMessage (sprintbuf);
@ -494,7 +494,7 @@ static int both_valid_dates (char *date1, char *date2)
usrblk.objdate1 != 0L &&
usrblk.objdate2 != 0L &&
usrblk.objdate1 >= usrblk.objdate2) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 198,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 198,
"%s 'Before' date is equal to or after 'After' date.\n"
" No records would be returned."),
PROGNAME "198");
@ -569,7 +569,7 @@ int DtSearchQuery (
break;
default:
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 20,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 20,
"%1$s Invalid search_type '%2$c'."),
PROGNAME "172 ", search_type);
DtSearchAddMessage (sprintbuf);
@ -580,7 +580,7 @@ int DtSearchQuery (
/* Validate the 'qry' argument */
if (qry == NULL) {
QUERY_ERROR:
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 30,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 30,
"%s Null query. No search performed."),
PROGNAME"81");
DtSearchAddMessage (sprintbuf);
@ -686,7 +686,7 @@ END_OF_SEARCH:
/* Query was invalid. Tell the user why. */
if (ausapi_msglist == NULL) {
sprintf (sprintbuf,
catgets (dtsearch_catd, MS_ausapi, 806,
CATGETS(dtsearch_catd, MS_ausapi, 806,
"%s Query insufficient or search options "
"incompatible with database '%s' to commence search."),
PROGNAME "806", usrblk.dblk->name);
@ -795,7 +795,7 @@ int DtSearchHighlight (
/* copy cleartext to usrblk if necessary */
if (cleartext == NULL || cleartext[0] == 0) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 40,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 40,
"%1$s Null cleartext. No highlighting performed."),
PROGNAME "349 ", dbname);
DtSearchAddMessage (sprintbuf);
@ -817,7 +817,7 @@ int DtSearchHighlight (
if (stems) {
if (stemcount > DtSrMAX_STEMCOUNT) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 1072,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 1072,
"%s Program Error: Stem count (%d) greater than maximum (%d)."),
PROGNAME"1072", stemcount, DtSrMAX_STEMCOUNT);
DtSearchAddMessage (sprintbuf);
@ -864,7 +864,7 @@ int DtSearchHighlight (
* msglist.
*/
if (!ausapi_msglist) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_ausapi, 1342,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_ausapi, 1342,
"%s Search Engine Error %d for highlight request for "
"database '%s', hit word count=%ld, search type='%c', text='%.30s'"),
PROGNAME "1342",

View file

@ -104,25 +104,25 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
int i;
int blobs_are_possible = FALSE;
printf (catgets (dtsearch_catd, MS_dbrec, 1,
printf (CATGETS(dtsearch_catd, MS_dbrec, 1,
"---------- System Values for Database '%s' ----------\n"),
dbname);
printf (catgets (dtsearch_catd, MS_dbrec, 2,
printf (CATGETS(dtsearch_catd, MS_dbrec, 2,
"Schema version number (version) is '%s'.\n"),
dbrec->or_version);
printf (catgets (dtsearch_catd, MS_dbrec, 3,
printf (CATGETS(dtsearch_catd, MS_dbrec, 3,
"Maximum object key size (sizeof(objkey)) is %ld bytes.\n"),
DtSrMAX_DB_KEYSIZE);
if (ORD_USEHUGEKEYS & dbrec->or_dbflags)
printf ("%s", catgets (dtsearch_catd, MS_dbrec, 4,
printf ("%s", CATGETS(dtsearch_catd, MS_dbrec, 4,
"Optional 'Huge' keys enabled.\n"));
printf (catgets (dtsearch_catd, MS_dbrec, 12,
printf (CATGETS(dtsearch_catd, MS_dbrec, 12,
"Maximum length of an abstract string (abstrsz) is %d.\n"),
dbrec->or_abstrsz);
if (dbrec->or_abstrsz == 0)
puts (catgets (dtsearch_catd, MS_dbrec, 14,
puts (CATGETS(dtsearch_catd, MS_dbrec, 14,
" (Abstracts are not used in this database)."));
else {
/*
@ -130,88 +130,88 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
* actually are
*/
if (dbrec->or_hufid != 0L)
printf (catgets (dtsearch_catd, MS_dbrec, 20,
printf (CATGETS(dtsearch_catd, MS_dbrec, 20,
"Abstracts are %scompressed.\n"),
(ORC_COMPABSTR & dbrec->or_compflags) ? "" : "not ");
}
printf (catgets (dtsearch_catd, MS_dbrec, 22,
printf (CATGETS(dtsearch_catd, MS_dbrec, 22,
"Parsing language is number %d, %s.\n"),
dbrec->or_language, language_name(dbrec->or_language));
printf (catgets (dtsearch_catd, MS_dbrec, 24,
printf (CATGETS(dtsearch_catd, MS_dbrec, 24,
"Minimum word length (minwordsz) is %d.\n"),
dbrec->or_minwordsz);
printf (catgets (dtsearch_catd, MS_dbrec, 26,
printf (CATGETS(dtsearch_catd, MS_dbrec, 26,
"Maximum word length (maxwordsz) is %d.\n"),
dbrec->or_maxwordsz);
printf (catgets (dtsearch_catd, MS_dbrec, 30,
printf (CATGETS(dtsearch_catd, MS_dbrec, 30,
"Number of .d00 slots per object (recslots) is %d.\n"),
dbrec->or_recslots);
printf (catgets (dtsearch_catd, MS_dbrec, 36,
printf (CATGETS(dtsearch_catd, MS_dbrec, 36,
" (Maximum number of database objects is %ld).\n"),
0xffffffL / (long) dbrec->or_recslots);
printf (catgets (dtsearch_catd, MS_dbrec, 40,
printf (CATGETS(dtsearch_catd, MS_dbrec, 40,
"Huffman compression table id (hufid) is %ld.\n"),
dbrec->or_hufid);
if (dbrec->or_hufid == 0L)
puts (catgets (dtsearch_catd, MS_dbrec, 42,
puts (CATGETS(dtsearch_catd, MS_dbrec, 42,
" (Compression is disabled in this database)."));
if (dbrec->or_hufid == -1L)
puts (catgets (dtsearch_catd, MS_dbrec, 44,
puts (CATGETS(dtsearch_catd, MS_dbrec, 44,
" (Specific compression table is not yet determined)."));
blobs_are_possible = FALSE;
switch (dbrec->or_dbaccess) {
case ORA_VARIES:
puts (catgets (dtsearch_catd, MS_dbrec, 50,
puts (CATGETS(dtsearch_catd, MS_dbrec, 50,
"Engine accessibility to data may vary from object to object."));
blobs_are_possible = TRUE;
break;
case ORA_NOTAVAIL:
puts (catgets (dtsearch_catd, MS_dbrec, 54,
puts (CATGETS(dtsearch_catd, MS_dbrec, 54,
"Data objects are not directly accessible from the engine."));
break;
case ORA_BLOB:
puts (catgets (dtsearch_catd, MS_dbrec, 56,
puts (CATGETS(dtsearch_catd, MS_dbrec, 56,
"Data objects are stored internally as blobs."));
blobs_are_possible = TRUE;
break;
case ORA_REFBLOB:
puts (catgets (dtsearch_catd, MS_dbrec, 60,
puts (CATGETS(dtsearch_catd, MS_dbrec, 60,
"Only server file references to objects are stored in the blobs."));
break;
case ORA_CREFBLOB:
puts (catgets (dtsearch_catd, MS_dbrec, 64,
puts (CATGETS(dtsearch_catd, MS_dbrec, 64,
"Only client file references to objects are stored in the blobs."));
break;
case ORA_REFKEY:
puts (catgets (dtsearch_catd, MS_dbrec, 68,
puts (CATGETS(dtsearch_catd, MS_dbrec, 68,
"Object keys are server file references to the objects."));
break;
case ORA_CREFKEY:
puts (catgets (dtsearch_catd, MS_dbrec, 72,
puts (CATGETS(dtsearch_catd, MS_dbrec, 72,
"Object keys are client file references to the objects."));
break;
case ORA_REFHUGEKEY:
puts (catgets (dtsearch_catd, MS_dbrec, 74,
puts (CATGETS(dtsearch_catd, MS_dbrec, 74,
"Server file references to objects are "
"stored in the 'huge' keys."));
break;
case ORA_REFABSTR:
puts (catgets (dtsearch_catd, MS_dbrec, 80,
puts (CATGETS(dtsearch_catd, MS_dbrec, 80,
"Server file references to objects are stored in the abstracts."));
break;
case ORA_CREFABSTR:
puts (catgets (dtsearch_catd, MS_dbrec, 86,
puts (CATGETS(dtsearch_catd, MS_dbrec, 86,
"Client file references to objects are stored in the abstracts."));
break;
default:
printf (catgets (dtsearch_catd, MS_dbrec, 90,
printf (CATGETS(dtsearch_catd, MS_dbrec, 90,
"Error: meaning of or_dbaccess value (%hd) is unknown.\n"),
dbrec->or_dbaccess);
blobs_are_possible = TRUE;
@ -224,59 +224,59 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
* actually are
*/
if (dbrec->or_hufid != 0L)
printf (catgets (dtsearch_catd, MS_dbrec, 100,
printf (CATGETS(dtsearch_catd, MS_dbrec, 100,
"Repository blobs are %scompressed.\n"),
(ORC_COMPBLOB & dbrec->or_compflags) ? "" : "not ");
}
else
puts (catgets (dtsearch_catd, MS_dbrec, 110,
puts (CATGETS(dtsearch_catd, MS_dbrec, 110,
"Repository blobs are not used in this database."));
printf (catgets (dtsearch_catd, MS_dbrec, 120,
printf (CATGETS(dtsearch_catd, MS_dbrec, 120,
"Database switches (dbflags) are 0x%lx:\n"),
dbrec->or_dbflags);
printf (catgets (dtsearch_catd, MS_dbrec, 130,
printf (CATGETS(dtsearch_catd, MS_dbrec, 130,
" Inverted index %s words exactly as parsed.\n"),
(ORD_XWORDS & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
catgets (dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
CATGETS(dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
CATGETS(dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
printf (catgets (dtsearch_catd, MS_dbrec, 140,
printf (CATGETS(dtsearch_catd, MS_dbrec, 140,
" Inverted index %s word stems.\n"),
(ORD_XSTEMS & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
catgets (dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
CATGETS(dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
CATGETS(dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
printf (catgets (dtsearch_catd, MS_dbrec, 160,
printf (CATGETS(dtsearch_catd, MS_dbrec, 160,
" Use of optional 'huge' keys is %s.\n"),
(ORD_USEHUGEKEYS & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 126, "ENABLED") :
catgets (dtsearch_catd, MS_dbrec, 127, "DISABLED"));
CATGETS(dtsearch_catd, MS_dbrec, 126, "ENABLED") :
CATGETS(dtsearch_catd, MS_dbrec, 127, "DISABLED"));
printf (catgets (dtsearch_catd, MS_dbrec, 162,
printf (CATGETS(dtsearch_catd, MS_dbrec, 162,
" Mark-for-deletion is %s.\n"),
(ORD_NOMARKDEL & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 127, "DISABLED") :
catgets (dtsearch_catd, MS_dbrec, 126, "ENABLED"));
CATGETS(dtsearch_catd, MS_dbrec, 127, "DISABLED") :
CATGETS(dtsearch_catd, MS_dbrec, 126, "ENABLED"));
printf (catgets (dtsearch_catd, MS_dbrec, 164,
printf (CATGETS(dtsearch_catd, MS_dbrec, 164,
" Appendable user notes are %s.\n"),
(ORD_NONOTES & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 127, "DISABLED") :
catgets (dtsearch_catd, MS_dbrec, 126, "ENABLED"));
CATGETS(dtsearch_catd, MS_dbrec, 127, "DISABLED") :
CATGETS(dtsearch_catd, MS_dbrec, 126, "ENABLED"));
printf (catgets (dtsearch_catd, MS_dbrec, 170,
printf (CATGETS(dtsearch_catd, MS_dbrec, 170,
" Text characters are %s wide.\n"),
(ORD_WIDECHAR & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 172, "MULTIPLE bytes") :
catgets (dtsearch_catd, MS_dbrec, 174, "a SINGLE byte"));
CATGETS(dtsearch_catd, MS_dbrec, 172, "MULTIPLE bytes") :
CATGETS(dtsearch_catd, MS_dbrec, 174, "a SINGLE byte"));
printf (catgets (dtsearch_catd, MS_dbrec, 200,
printf (CATGETS(dtsearch_catd, MS_dbrec, 200,
"Current number of database objects (reccount) is %ld.\n"),
dbrec->or_reccount);
printf (catgets (dtsearch_catd, MS_dbrec, 210,
printf (CATGETS(dtsearch_catd, MS_dbrec, 210,
"Last currently used slot number (maxdba) is %ld.\n"),
dbrec->or_maxdba);
@ -306,22 +306,22 @@ int main (int argc, char *argv[])
aa_argv0 = argv[0];
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
austools_catd = catopen (FNAME_AUSCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
austools_catd = CATOPEN(FNAME_AUSCAT, 0);
time (&now);
time_ptr = _XLocaltime(&now, localtime_buf);
strftime (renamebuf, sizeof (renamebuf),
catgets (dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
time_ptr);
printf (catgets (dtsearch_catd, MS_misc, 23,
printf (CATGETS(dtsearch_catd, MS_misc, 23,
"%s: Version %s. Run %s.\n"),
aa_argv0,
DtSrVERSION,
renamebuf);
if (argc < 2) {
printf (catgets (dtsearch_catd, MS_dbrec, 310,
printf (CATGETS(dtsearch_catd, MS_dbrec, 310,
"USAGE: %s <dbname>\n"), aa_argv0);
return 2;
}
@ -329,21 +329,21 @@ int main (int argc, char *argv[])
db_oflag = O_RDONLY; /* db files may be read-only */
d_open (argv[1], "o");
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_dbrec, 330,
printf (CATGETS(dtsearch_catd, MS_dbrec, 330,
"Could not open '%s' database.\n%s\n"),
argv[1], vista_msg(PROGNAME"293"));
return 3;
}
d_recfrst (OR_DBREC, 0);
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_dbrec, 340,
printf (CATGETS(dtsearch_catd, MS_dbrec, 340,
"No dbrec record in database '%s'.\n"),
argv[1]);
return 4;
}
d_recread (&dbrec, 0);
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_dbrec, 350,
printf (CATGETS(dtsearch_catd, MS_dbrec, 350,
"Can't read dbrec record in database '%s'.\n%s\n"),
argv[1], vista_msg(PROGNAME"306"));
return 5;

View file

@ -124,7 +124,7 @@ void aa_check_initialization (void)
if (aa_is_initialized)
return;
fprintf (aa_stderr,
catgets (dtsearch_catd, 2, 37,
CATGETS(dtsearch_catd, 2, 37,
"%s First API function call must be DtSearchInit().\n"),
PROGNAME"37");
DtSearchExit (37);
@ -183,7 +183,7 @@ DtSrObjdate DtSearchValidDateString (char *datestr)
#endif
INVALID_DATESTR:
sprintf (msgbuf,
catgets (dtsearch_catd, 2, 115,
CATGETS(dtsearch_catd, 2, 115,
"%s '%s' is invalid or incomplete date string.\n"
"The correct format is '[yy]yy [mm [dd]]'."),
PROGNAME"115", datestr);

View file

@ -166,7 +166,7 @@ char *get_hitlist_text (int maxlen)
size_t mallocsz;
if (usrblk.dittocount <= 0L) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_misc, 96,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_misc, 96,
"%s Hitlist is empty."), PROGNAME"96");
DtSearchAddMessage (sprintbuf);
return NULL;

View file

@ -107,7 +107,7 @@ char *strupr(char *);
*/
void dummy_workproc (void)
{
fputs (catgets (dtsearch_catd, MS_ve, 26,
fputs (CATGETS(dtsearch_catd, MS_ve, 26,
PROGNAME "26 Called dummy_workproc().\n"),
aa_stderr);
return;
@ -201,7 +201,7 @@ int ve_initialize (void)
RECFRST (PROGNAME "285", OR_DBREC, db->vistano); /* seqtl retrieval */
if (db_status != S_OKAY) {
NO_DBREC:
sprintf (msgbuf, catgets (dtsearch_catd, MS_misc, 13,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_misc, 13,
"%s No DB record in database '%s'."),
PROGNAME "853 ", db->name);
DtSearchAddMessage (msgbuf);
@ -222,14 +222,14 @@ int ve_initialize (void)
/*-------------- DBREC SANITY CHECKS ----------------*/
if (db->dbrec.or_reccount <= 0) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_ve, 167,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_ve, 167,
"%s No data in database '%s'."),
PROGNAME"167 ", db->name);
DtSearchAddMessage (msgbuf);
goto DELETE_DB;
}
if (!is_compatible_version (db->dbrec.or_version, SCHEMA_VERSION)) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_ve, 178,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_ve, 178,
"%s Database '%s' version '%s' incompatible"
" with Engine version '%s'."),
PROGNAME"178 ",
@ -238,7 +238,7 @@ int ve_initialize (void)
goto DELETE_DB;
}
if (db->dbrec.or_reccount > db->dbrec.or_maxdba) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_ve, 251,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_ve, 251,
"%s Database '%s' corrupted: "
"Incompatible record counts and database addresses.\n"),
PROGNAME" 251", db->name);
@ -246,7 +246,7 @@ int ve_initialize (void)
goto DELETE_DB;
}
if (db->dbrec.or_maxwordsz < MAXWIDTH_SWORD - 1) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_ve, 185,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_ve, 185,
"%s Database '%s' maximum word size %d is too short."),
PROGNAME" 185", db->name, db->dbrec.or_maxwordsz);
DtSearchAddMessage (msgbuf);
@ -257,7 +257,7 @@ int ve_initialize (void)
* for now, huffman decompress table hardcoded and
* linked in
*/
sprintf (msgbuf, catgets (dtsearch_catd, MS_ve, 156,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_ve, 156,
"%s Incompatible data compression table used for database '%s'.\n"
" Database compressed with %ld, "
"engine decompressor is %ld.\n"),
@ -289,7 +289,7 @@ int ve_initialize (void)
fprintf (aa_stderr, "--> opening '%s'\n", d9x_fname);
if ((db->syofile = fopen (d9x_fname, open_mode)) == NULL) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_oeinit, 317,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_oeinit, 317,
default_cant_open_msg), PROGNAME "286",
d9x_fname, errno, strerror (errno), OE_prodname, db->name);
DtSearchAddMessage (msgbuf);
@ -301,7 +301,7 @@ int ve_initialize (void)
fprintf (aa_stderr, "--> opening '%s'\n", d9x_fname);
if ((db->syifile = fopen (d9x_fname, open_mode)) == NULL) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_oeinit, 317,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_oeinit, 317,
default_cant_open_msg), PROGNAME "298",
d9x_fname, errno, strerror (errno), OE_prodname, db->name);
DtSearchAddMessage (msgbuf);
@ -337,7 +337,7 @@ DELETE_DB:
/* Quit if no dblks remain */
if (good_dblk_count <= 0) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_misc, 8,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_misc, 8,
"%s No valid databases remain."), PROGNAME "246");
DtSearchAddMessage (msgbuf);
return FALSE;
@ -419,14 +419,14 @@ int ve_append_notes (void)
/* Test if function is disabled */
if (!OE_enable_usernotes || usrblk.dblk->dbrec.or_dbflags & ORD_NONOTES) {
sprintf (mybuf, catgets (dtsearch_catd, MS_ve, 309,
sprintf (mybuf, CATGETS(dtsearch_catd, MS_ve, 309,
"%s User notes disabled "), PROGNAME" 309");
ptr = mybuf + strlen (mybuf);
if (!OE_enable_usernotes)
strcpy (ptr, catgets (dtsearch_catd, MS_ve, 310,
strcpy (ptr, CATGETS(dtsearch_catd, MS_ve, 310,
"for entire Engine."));
else
sprintf (ptr, catgets (dtsearch_catd, MS_ve, 311,
sprintf (ptr, CATGETS(dtsearch_catd, MS_ve, 311,
"for database '%s'."),
usrblk.dblk->name);
DtSearchAddMessage (mybuf);
@ -435,7 +435,7 @@ int ve_append_notes (void)
/* Test for invalid dba */
if (usrblk.dba == NULL_DBA) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_ve, 157,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_ve, 157,
PROGNAME "157 Client Program Error: "
"Null database address in usrblk.dba."));
OE_flags |= OE_PERMERR;
@ -452,7 +452,7 @@ int ve_append_notes (void)
for (;;) {
if ((semaphore_file = fopen (OEF_notessem, "r+")) == NULL) {
sprintf (mybuf,
catgets (dtsearch_catd, MS_ve, 183,
CATGETS(dtsearch_catd, MS_ve, 183,
"%s Could not open user notes semaphore file '%s': %s.\n"),
PROGNAME "183 ", OEF_notessem, strerror (errno));
DtSearchAddMessage (mybuf);
@ -478,7 +478,7 @@ int ve_append_notes (void)
fclose (semaphore_file);
if (++i > NOTES_SEM_DELAY) {
sprintf (mybuf,
catgets (dtsearch_catd, MS_ve, 199,
CATGETS(dtsearch_catd, MS_ve, 199,
"%s Could not acquire user notes semaphore '%s' "
"within %d tries.\n"),
PROGNAME " 199", OEF_notessem, NOTES_SEM_DELAY);
@ -503,9 +503,9 @@ int ve_append_notes (void)
appendbufptr = entirebufptr + strlen (entirebufptr);
time (&mystamp);
time_ptr = _XLocaltime(&mystamp, localtime_buf);
strftime (mybuf, sizeof (mybuf), catgets (dtsearch_catd, MS_ve, 332,
strftime (mybuf, sizeof (mybuf), CATGETS(dtsearch_catd, MS_ve, 332,
"%Y/%m/%d at %H:%M %Z"), time_ptr);
sprintf (appendbufptr, catgets (dtsearch_catd, MS_ve, 333,
sprintf (appendbufptr, CATGETS(dtsearch_catd, MS_ve, 333,
"\n <User Note Appended by '%s' on %s>\n"),
usrblk.userid, mybuf);
strcat (appendbufptr, usrblk.query); /* now add user's text */
@ -544,7 +544,7 @@ int ve_append_notes (void)
/* Also append the note to the backup flat file */
if ((backup_file = fopen (OEF_notesnot, "at ")) == NULL) {
sprintf (mybuf,
catgets (dtsearch_catd, MS_ve, 230,
CATGETS(dtsearch_catd, MS_ve, 230,
"%s Could not open user notes backup file '%s': %s."),
PROGNAME " 230", OEF_notesnot, strerror (errno));
DtSearchAddMessage (mybuf);
@ -713,7 +713,7 @@ int ve_getrec_dba (LLIST ** bloblist)
/* Test for invalid dba */
if (dba == NULL_DBA) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_ve, 157,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_ve, 157,
PROGNAME "245 Client Program Error: "
"Null database address in usrblk.dba."));
OE_flags |= OE_PERMERR;
@ -727,7 +727,7 @@ int ve_getrec_dba (LLIST ** bloblist)
*/
d_crset (&dba, vistano);
if (db_status == S_INVADDR) {
sprintf (msgbuf, catgets (dtsearch_catd, MS_ve, 142,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_ve, 142,
"%s Client Error: Requested record with invalid\n"
" database addr %ld (%d:%ld, x'%08.8lx') for database '%s'."),
PROGNAME "142 ", dba, dba >> 24, dba & 0xffffff, dba, usrblk.dblk->label);
@ -951,7 +951,7 @@ DtSrINT32 ve_reckey2dba (void)
if (usrblk.query == NULL) {
null_query = TRUE;
usrblk.query = "";
DtSearchAddMessage (catgets (dtsearch_catd, MS_ve, 398,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_ve, 398,
PROGNAME "398 NULL query string."));
}
if (strncmp (usrblk.query, debugkey, strlen (debugkey)) == 0) {

View file

@ -58,7 +58,7 @@
#define _XOPEN_SOURCE
#endif
#include <stdio.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
FILE *aa_stderr = NULL;
char *aa_argv0 = "<argv0>";

View file

@ -139,13 +139,13 @@ void hc_decode (
/* Create hctree from external file? */
if (hctree == NULL) {
if ((hdecode_filebuf = malloc (HDEC_FBUFSZ)) == NULL) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_huff, 10,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_huff, 10,
"%s Out of Memory.\n"),
PROGNAME"076");
DtSearchExit (2);
}
if ((hdecode_file = fopen (hctree_name, "r")) == NULL) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_huff, 11,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_huff, 11,
"%s Cannot open tree file '%s': %s\n"),
PROGNAME"082", hctree_name, strerror (errno));
DtSearchExit (2);
@ -171,7 +171,7 @@ void hc_decode (
}
for (i = 0; i <= hctree_root; i++) {
if ((fgets (hdecode_filebuf, HDEC_FBUFSZ, hdecode_file)) == NULL) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_huff, 12,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_huff, 12,
"%s Invalid format hctree '%s'.\n"),
PROGNAME"106", hctree_name);
DtSearchExit (2);
@ -195,7 +195,7 @@ void hc_decode (
if (encode_id != hctree_id) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_huff, 13,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_huff, 13,
"%s Incompatible hctree_ids.\n"),
PROGNAME"118");
DtSearchExit (2);

View file

@ -102,7 +102,7 @@ void gen_vec (char *fname_huffcode_tab)
_Xstrtokparams strtok_buf;
if ((tab_stream = fopen (fname_huffcode_tab, "r")) == NULL) {
printf (catgets(dtsearch_catd, MS_huff, 1,
printf (CATGETS(dtsearch_catd, MS_huff, 1,
"%s: Cannot open huffman encode file '%s':\n"
" %s\n Exit Code = 2\n"),
PROGNAME"222", fname_huffcode_tab, strerror (errno));

View file

@ -731,7 +731,7 @@ ENTIRE_SUBSTR_IS_WORD:
} /* end state switch */
/* Should never get here... */
fprintf (aa_stderr, catgets(dtsearch_catd, MS_lang, 20,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_lang, 20,
"%s Program Error: Unknown jstate %d.\n") ,
PROGNAME"246", last_jstate);
DtSearchExit (46);
@ -865,7 +865,7 @@ FILL_ANOTHER_SUBSTRING:
fputs ("jpnparser: js=ETX\n", aa_stderr);
if (add_msgs) {
char msgbuf [DtSrMAXWIDTH_HWORD + 100];
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 21,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 21,
"%s '%.*s' is not a valid Japanese word.") ,
PROGNAME"812", DtSrMAXWIDTH_HWORD, save_parg_string);
DtSearchAddMessage (msgbuf);
@ -980,7 +980,7 @@ static int load_jpntree (
}
else {
sprintf (sprintbuf,
catgets (dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
CATGETS(dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
PROGNAME"362", fname, strerror(errno));
DtSearchAddMessage (sprintbuf);
return 2;
@ -1010,7 +1010,7 @@ static int load_jpntree (
/* Test for word too short */
if (strlen((char*)readbuf) < 4) {
sprintf (sprintbuf, catgets(dtsearch_catd, MS_lang, 23,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_lang, 23,
"%s Word '%s' on line %ld is too short.") ,
PROGNAME"1074", readbuf, linecount);
DtSearchAddMessage (sprintbuf);
@ -1043,7 +1043,7 @@ static int load_jpntree (
/* Test for duplicate word */
if (i == 0) {
sprintf (sprintbuf,
catgets (dtsearch_catd, MS_misc, 423,
CATGETS(dtsearch_catd, MS_misc, 423,
"%s Word '%s' in '%s' is a duplicate."),
PROGNAME"423", readbuf, fname);
DtSearchAddMessage (sprintbuf);
@ -1090,7 +1090,7 @@ static int load_jpntree (
fprintf (aa_stderr,
PROGNAME"1185 load '%s' unsuccessful, %d comments discarded.\n",
fname, comment_count);
sprintf (sprintbuf, catgets(dtsearch_catd, MS_lang, 24,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_lang, 24,
"%s No Japanese words in word file '%s'.") ,
PROGNAME"1186", fname);
DtSearchAddMessage (sprintbuf);
@ -1154,7 +1154,7 @@ int load_jpn_language (DBLK *dblk, DBLK *dblist)
path[0] = 0;
else {
if (strlen (dblk->path) > _POSIX_PATH_MAX - 14) {
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 25,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 25,
"%s Database '%s' path too long: '%s'.") ,
PROGNAME"759", dblk->name, dblk->path);
DtSearchAddMessage (msgbuf);

View file

@ -335,7 +335,7 @@ char *teskey_parser (PARG *parg)
is_hiliting = (parg->flags & PA_HILITING);
add_msgs = (parg->flags & PA_MSGS);
if (charmap == NULL) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_lang, 4,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_lang, 4,
"%s dblk not initialized.\n"),
PROGNAME"801");
DtSearchExit (55);
@ -350,7 +350,7 @@ char *teskey_parser (PARG *parg)
cofunction = (READCFP) readchar_ftext;
}
else {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_lang, 5,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_lang, 5,
"%s Program Error: parg contains neither file nor string.\n"),
PROGNAME"327");
DtSearchExit (27);
@ -444,7 +444,7 @@ READ_ANOTHER_WORD:
candidate_offset-1, outbuf);
if (add_msgs) {
char msgbuf [DtSrMAXWIDTH_HWORD + 100];
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 8,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 8,
"%s '%.*s...' is larger\n"
"than the maximum word size of database '%s'.") ,
PROGNAME"449", maxwordsz,
@ -503,7 +503,7 @@ READ_ANOTHER_WORD:
/*------------- UNKNOWN State ------------*/
else {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_lang, 10,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_lang, 10,
"%s Program Error: Unknown parser state.\n"),
PROGNAME"306");
DtSearchExit (26);
@ -516,7 +516,7 @@ READ_ANOTHER_WORD:
fprintf (aa_stderr, "teskey: etx\n");
if (add_msgs) {
char msgbuf [200];
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 12,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 12,
"%s '%.120s' is not a valid word in database '%s'.") ,
PROGNAME"506", parg->string, dblk->label);
DtSearchAddMessage (msgbuf);
@ -553,7 +553,7 @@ READ_ANOTHER_WORD:
fprintf (aa_stderr, ", (TOO SHORT, min %d)\n", minwordsz);
if (add_msgs) {
char msgbuf [200];
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 17,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 17,
"%s '%s' is less than the\n"
"minimum word size of database '%s'.") ,
PROGNAME"543", parg->string, dblk->label);
@ -570,7 +570,7 @@ READ_ANOTHER_WORD:
fprintf (aa_stderr, ", (STOP LIST)\n");
if (add_msgs) {
char msgbuf [200];
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 19,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 19,
"%s The word '%s' is not indexed in database '%s'.") ,
PROGNAME"558", parg->string, dblk->label);
DtSearchAddMessage (msgbuf);
@ -666,7 +666,7 @@ int load_wordtree (
}
else {
sprintf (sprintbuf,
catgets (dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
CATGETS(dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
PROGNAME"362", fname, strerror(errno));
DtSearchAddMessage (sprintbuf);
return 2;
@ -694,7 +694,7 @@ int load_wordtree (
/* If requested confirm all chars are teskey-concordable. */
if (do_teskey_test)
if (!is_concordable (token, dblk->charmap)) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_misc, 400,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_misc, 400,
"%s: %s, line %ld: Invalid chars in word '%s'."),
PROGNAME"400", fname, linecount, token);
DtSearchAddMessage (sprintbuf);
@ -723,7 +723,7 @@ int load_wordtree (
/* test for duplicate word */
if (i == 0) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_misc, 423,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_misc, 423,
"%s Word '%s' in '%s' is a duplicate."),
PROGNAME"423", token, fname);
DtSearchAddMessage (sprintbuf);
@ -920,7 +920,7 @@ static int load_include_list (DBLK *dblk, DBLK *dblist)
}
else {
sprintf (sprintbuf,
catgets (dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
CATGETS(dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
PROGNAME"1218", dblk->fname_inc, strerror(ENOENT));
DtSearchAddMessage (sprintbuf);
return FALSE;
@ -1011,7 +1011,7 @@ static int load_stop_list (DBLK *dblk, DBLK *dblist)
i = load_wordtree (&dblk->stoplist, dblk, dblk->fname_stp, TRUE);
if (i == 1) {
sprintf (sprintbuf,
catgets (dtsearch_catd, MS_misc, 362, "%s: %s: %s"),
CATGETS(dtsearch_catd, MS_misc, 362, "%s: %s: %s"),
PROGNAME"1270", dblk->fname_stp, strerror(ENOENT));
DtSearchAddMessage (sprintbuf);
}
@ -1149,7 +1149,7 @@ static int load_paice_suffixes (DBLK *dblk, DBLK *dblist)
fp = fopen (dblk->fname_sfx, "rt");
if (fp == NULL) {
sprintf (msgbuf,
catgets (dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
CATGETS(dtsearch_catd, MS_misc, 362, "%s: %s: %s."),
PROGNAME"181", dblk->fname_sfx, strerror(errno));
DtSearchAddMessage (msgbuf);
dblk->fname_sfx = NULL;
@ -1192,7 +1192,7 @@ static int load_paice_suffixes (DBLK *dblk, DBLK *dblist)
/* OPTIONAL TOKEN #2: if next token '*', set 'intact' flag */
if ((token = (UCHAR *)_XStrtok(NULL, SFX_DELIMS, strtok_buf)) == NULL) {
BAD_RULE:
sprintf (msgbuf, catgets(dtsearch_catd, MS_lang, 51,
sprintf (msgbuf, CATGETS(dtsearch_catd, MS_lang, 51,
"%s %s, Line %d: Invalid Paice Rule for suffix '%s'.") ,
PROGNAME"898", dblk->fname_sfx, lineno, suffix);
DtSearchAddMessage (msgbuf);
@ -1398,7 +1398,7 @@ static char *paice_stemmer (char *wordin, DBLK *dblk)
return "";
if ((rules_table = (PRULE **)dblk->stem_extra) == NULL) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_lang, 31,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_lang, 31,
"%s Stemmer suffixes file never loaded.\n"),
PROGNAME"310");
DtSearchExit (2);

View file

@ -963,9 +963,9 @@ aa_argv0 = argv[0];
time (&starttime);
time_ptr = _XLocaltime(&starttime, localtime_buf);
strftime (dbfpath, sizeof (dbfpath), /* just use any ol' buffer */
catgets (dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
time_ptr);
printf (catgets (dtsearch_catd, MS_misc, 23,
printf (CATGETS(dtsearch_catd, MS_misc, 23,
"%s: Version %s%s. Run %s.\n"),
aa_argv0, AUSAPI_VERSION, betabuf, dbfpath);

View file

@ -122,7 +122,7 @@ char *nowstring (time_t * now)
}
time_ptr = _XLocaltime(now, localtime_buf);
strftime (buf, sizeof (buf),
catgets (dtsearch_catd, MS_misc, 2, "%Y/%m/%d,%H:%M:%S"),
CATGETS(dtsearch_catd, MS_misc, 2, "%Y/%m/%d,%H:%M:%S"),
time_ptr);
return buf;
} /* nowstring() */
@ -342,8 +342,8 @@ void *austext_malloc (size_t size, char *location, void *ignore)
ptr = ((aa_argv0) ? aa_argv0 : "");
if (location == NULL)
location = catgets (dtsearch_catd, MS_misc, 1, "<null>");
outofmem_msg = catgets (dtsearch_catd, MS_misc, 3,
location = CATGETS(dtsearch_catd, MS_misc, 1, "<null>");
outofmem_msg = CATGETS(dtsearch_catd, MS_misc, 3,
"*** %sOut of Memory at %s asking for %lu bytes! ***\n");
fprintf (aa_stderr, outofmem_msg, ptr, location, size);
fflush (aa_stderr);

View file

@ -287,7 +287,7 @@ static int read_database (char *keyword, _Xstrtokparams *strtok_buf)
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 477,
CATGETS(dtsearch_catd, MS_loadocf, 477,
"%s %s: Missing database name after '%s' keyword.\n"),
PROGNAME"477", cfgfname, keyword);
DtSearchAddMessage (sprintbufp);
@ -297,7 +297,7 @@ static int read_database (char *keyword, _Xstrtokparams *strtok_buf)
if (strlen (token) > 8) {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 184,
CATGETS(dtsearch_catd, MS_loadocf, 184,
"%s %s: More than 8 characters in Database name '%.16s'.\n"),
PROGNAME"184", cfgfname, token);
DtSearchAddMessage (sprintbufp);
@ -346,7 +346,7 @@ static void set_boolbit (long *flagvar, long mask, char *flagname,
*flagvar &= ~mask; /* switch OFF */
else {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 352,
CATGETS(dtsearch_catd, MS_loadocf, 352,
"%s %s: Invalid %s value, line ignored.\n"),
PROGNAME"352", cfgfname, flagname);
DtSearchAddMessage (sprintbufp);
@ -366,9 +366,9 @@ static void set_int (int *intvar, char *keyword, _Xstrtokparams *strtok_buf)
int myint;
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
token = catgets (dtsearch_catd, MS_loadocf, 140, "(missing)");
token = CATGETS(dtsearch_catd, MS_loadocf, 140, "(missing)");
ERR_MSG:
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 610,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 610,
"%s %s: %s value is '%s'. "
"Should be positive integer. Line ignored."),
PROGNAME"844", cfgfname, keyword, token);
@ -393,9 +393,9 @@ static void set_long (long *longvar, char *keyword,
long longi;
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
token = catgets (dtsearch_catd, MS_loadocf, 140, "(missing)");
token = CATGETS(dtsearch_catd, MS_loadocf, 140, "(missing)");
ERR_MSG:
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 610,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 610,
"%s %s: %s value is '%s'. "
"Should be positive integer. Line ignored."),
PROGNAME"610", cfgfname, keyword, token);
@ -427,7 +427,7 @@ static void set_boolint (int *boolint, char *keyword,
*boolint = FALSE; /* switch OFF */
else {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 352,
CATGETS(dtsearch_catd, MS_loadocf, 352,
"%s %s: Invalid %s value, line ignored.\n"),
PROGNAME"352", cfgfname, keyword);
DtSearchAddMessage (sprintbufp);
@ -464,7 +464,7 @@ static void set_fileio (_Xstrtokparams *strtok_buf)
else if (strcmp (token, "-HOME") == 0)
OE_fileio = "-HOME";
else {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 607,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 607,
"%s %s: Invalid FILEIO value. "
"User file reads and writes prohibited."),
PROGNAME"607", cfgfname);
@ -487,7 +487,7 @@ static void read_rest_of_line (char *keyword, char **passed_ptr,
_Xstrtokparams *strtok_buf)
{
if ((token = _XStrtok(NULL, "\n", *strtok_buf)) == NULL) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 1007,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 1007,
"%s%s: Empty %s string ignored."),
PROGNAME"1007 ", cfgfname, keyword);
DtSearchAddMessage (sprintbufp);
@ -515,12 +515,12 @@ static void read_filepath (_Xstrtokparams *strtok_buf)
* Set tabx to matching oef table entry.
*/
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
token = catgets (dtsearch_catd, MS_loadocf, 142, "rest of line");
errp = catgets (dtsearch_catd, MS_loadocf, 143, "is empty");
token = CATGETS(dtsearch_catd, MS_loadocf, 142, "rest of line");
errp = CATGETS(dtsearch_catd, MS_loadocf, 143, "is empty");
IGNORE_FILEPATH:
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 903,
CATGETS(dtsearch_catd, MS_loadocf, 903,
"%s %s: FILEPATH '%s' %s. Line ignored."),
PROGNAME"903", cfgfname, token, errp);
DtSearchAddMessage (sprintbufp);
@ -532,11 +532,11 @@ IGNORE_FILEPATH:
break;
}
if (oef_table[tabx].id == NULL) {
errp = catgets (dtsearch_catd, MS_loadocf, 165, "unknown id");
errp = CATGETS(dtsearch_catd, MS_loadocf, 165, "unknown id");
goto IGNORE_FILEPATH;
}
if (oef_table[tabx].previously_specified) {
errp = catgets (dtsearch_catd, MS_loadocf, 166, "previously specified");
errp = CATGETS(dtsearch_catd, MS_loadocf, 166, "previously specified");
goto IGNORE_FILEPATH;
}
@ -545,7 +545,7 @@ IGNORE_FILEPATH:
*/
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
token = oef_table[tabx].id;
errp = catgets (dtsearch_catd, MS_loadocf, 168,
errp = CATGETS(dtsearch_catd, MS_loadocf, 168,
"missing path specification");
goto IGNORE_FILEPATH;
}
@ -586,7 +586,7 @@ static void read_path (_Xstrtokparams *strtok_buf)
/* parse the path for this dictionary/database */
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 221,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 221,
"%s %s: Database '%s', No PATH specified, statement ignored.\n"),
PROGNAME"221", cfgfname, db->name);
DtSearchAddMessage (sprintbufp);
@ -607,7 +607,7 @@ static void read_path (_Xstrtokparams *strtok_buf)
/* append warning msg: passed keyword no longer used */
static void obsolete_keyword (char *keyword)
{
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 1,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 1,
"%1$s%2$s: %3$s keyword is obsolete."),
PROGNAME "001 ", cfgfname, keyword);
DtSearchAddMessage (sprintbufp);
@ -632,7 +632,7 @@ static void read_maxhits (_Xstrtokparams *strtok_buf)
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
INVALID_MAXHITS:
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 304,
CATGETS(dtsearch_catd, MS_loadocf, 304,
"%s %s: Database '%s', invalid MAXHITS value.\n"),
PROGNAME"304", cfgfname, db->name);
DtSearchAddMessage (sprintbufp);
@ -672,7 +672,7 @@ static int add_a_keytype (char ktchar)
/* Make sure we have not exceeded max number of keytypes */
if (db->ktcount >= MAX_KTCOUNT) {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 732,
CATGETS(dtsearch_catd, MS_loadocf, 732,
"%s %s: Database '%s', No more than %d keytypes allowed.\n"),
PROGNAME"732", cfgfname, db->name, MAX_KTCOUNT);
DtSearchAddMessage (sprintbufp);
@ -685,7 +685,7 @@ static int add_a_keytype (char ktchar)
if (!isprint (ktchar))
ktchar = '?';
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 684,
CATGETS(dtsearch_catd, MS_loadocf, 684,
"%s %s: Database '%s',\n Invalid KEYTYPE character '%c'."),
PROGNAME"684", cfgfname, db->name, ktchar);
DtSearchAddMessage (sprintbufp);
@ -698,7 +698,7 @@ static int add_a_keytype (char ktchar)
for (i = 0; i < db->ktcount; i++)
if (ktchar == kt[i].ktchar) {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 1002,
CATGETS(dtsearch_catd, MS_loadocf, 1002,
"%s %s: Database '%s', Duplicate KEYTYPE character '%c'.\n"),
PROGNAME"1002", cfgfname, db->name, ktchar);
DtSearchAddMessage (sprintbufp);
@ -716,12 +716,12 @@ static int add_a_keytype (char ktchar)
kt[newindex].is_selected = TRUE;
kt[newindex].ktchar = ktchar;
sprintf (kt[newindex].name,
catgets (dtsearch_catd, MS_loadocf, 457, "'%c' Records"), ktchar);
CATGETS(dtsearch_catd, MS_loadocf, 457, "'%c' Records"), ktchar);
/* Warn about inaccessible lowercase ktchars */
if ( ((ascii_charmap[ktchar] & 0xff) != ktchar) && OE_uppercase_keys ) {
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 1011,
CATGETS(dtsearch_catd, MS_loadocf, 1011,
"%s %s: Database '%s': Records with lowercase\n"
" KEYTYPE character '%c' will be inaccessible.\n"
" Set UPPERKEYS = FALSE if lowercase keys are intended."),
@ -870,7 +870,7 @@ GOT_FULLNAME:
*/
if (fptr == NULL) {
if (errno != ENOENT || is_prespecified_fname) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 414,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 414,
"%s Unable to open configuration file '%s':\n %s."),
PROGNAME"414", fullname, strerror(errno));
DtSearchAddMessage (sprintbufp);
@ -885,7 +885,7 @@ GOT_FULLNAME:
strcpy (OE_sitecnfg_fname, fullname);
}
if (fstat (fileno (fptr), &statbuf) == -1) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 1404,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 1404,
"%s Status unavailable for configuration file '%s': %s"),
PROGNAME"1404", fullname, strerror(errno));
DtSearchAddMessage (sprintbufp);
@ -1014,7 +1014,7 @@ int load_ocf (void)
goto OCFOPEN_OK;
/* If we can't find site config on OE side we must quit. */
sprintf (sprintbuf, catgets (dtsearch_catd, MS_loadocf, 1643,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_loadocf, 1643,
"%1$sCannot find or open '%2$s'\n"
" configuration file in any of the following locations:\n"
" DTSROCFPATH directory = %3$s,\n"
@ -1025,16 +1025,16 @@ int load_ocf (void)
)
,PROGNAME "1643 "
,FNAME_SITECONFIG
,(p) ? p : catgets (dtsearch_catd, MS_misc, 16,
,(p) ? p : CATGETS(dtsearch_catd, MS_misc, 16,
"<no environment variable>")
,inbuf
,(q) ? q : catgets (dtsearch_catd, MS_misc, 16,
,(q) ? q : CATGETS(dtsearch_catd, MS_misc, 16,
"<no environment variable>")
,(OE_inittab_dir) ? OE_inittab_dir :
catgets (dtsearch_catd, MS_misc, 17,
CATGETS(dtsearch_catd, MS_misc, 17,
"<no server daemon>")
,(OE_server_dir) ? OE_server_dir :
catgets (dtsearch_catd, MS_misc, 17,
CATGETS(dtsearch_catd, MS_misc, 17,
"<no server daemon>")
);
DtSearchAddMessage (sprintbuf);
@ -1130,7 +1130,7 @@ OCFOPEN_OK:
/* if we made it this far, the first token is unknown */
sprintf (sprintbufp,
catgets (dtsearch_catd, MS_loadocf, 495,
CATGETS(dtsearch_catd, MS_loadocf, 495,
"%s %s: '%.16s' is invalid keyword.\n"),
PROGNAME"495", cfgfname, token);
DtSearchAddMessage (sprintbufp);
@ -1149,7 +1149,7 @@ OCFOPEN_OK:
* in site config file, remove the dblk and mark fatal error.
*/
if (usrblk.dblist == NULL) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 1869,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 1869,
"%s %s: Configuration file must specify at least one database."),
PROGNAME"1869", cfgfname);
DtSearchAddMessage (sprintbufp);
@ -1158,7 +1158,7 @@ OCFOPEN_OK:
else
for (db = usrblk.dblist; db != NULL; db = db->link) {
if (db->ktcount <= 0) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 986,
sprintf (sprintbufp, CATGETS(dtsearch_catd, MS_loadocf, 986,
"%s %s: KEYTYPES missing for database '%s'."),
PROGNAME"986", cfgfname, db->name);
DtSearchAddMessage (sprintbufp);

View file

@ -135,7 +135,7 @@ int open_dblk (DBLK ** dblist, int numpages, int debugging)
db_oflag);
if (dblist == NULL || numpages < 8) {
BAD_INPUT:
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 99,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 99,
"%s Programming Error: Invalid input to open_dblk()."),
PROGNAME "99");
DtSearchAddMessage (sprintbuf);
@ -192,14 +192,14 @@ BAD_INPUT:
if (debugging)
fprintf (aa_stderr, PROGNAME "129 UNLINK: cant open '%s'.\n",
temp_file_name);
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 317,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 317,
"%s Cannot open database file '%s'.\n"
" Errno %d = %s\n"
" %s is removing '%s' from list of available databases."),
PROGNAME "317", temp_file_name, errno, strerror (errno),
OE_prodname, db->name);
if (errno == ENOENT)
strcat (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 318,
strcat (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 318,
"\n This can usually be corrected by specifying a valid\n"
" database PATH in the site configuration file."));
DtSearchAddMessage (sprintbuf);
@ -216,7 +216,7 @@ BAD_INPUT:
fprintf (aa_stderr,
PROGNAME "149 UNLINK: cant get status '%s'.\n",
temp_file_name);
sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 1404,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_oeinit, 1404,
"%s Removing database '%s' from list of "
"available databases because status is "
"unavailable for file %s: %s"),
@ -252,7 +252,7 @@ DELETE_DB:
/* quit if no dblks remain */
if (vistano <= 0) {
sprintf (sprintbuf, catgets (dtsearch_catd, MS_misc, 8,
sprintf (sprintbuf, CATGETS(dtsearch_catd, MS_misc, 8,
"%s No valid databases remain."), PROGNAME "265");
DtSearchAddMessage (sprintbuf);
return FALSE;
@ -283,7 +283,7 @@ DELETE_DB:
if (db_status != S_OKAY) {
targptr = austext_malloc (totlen + 128, PROGNAME"239", NULL);
sprintf (targptr, catgets (dtsearch_catd, MS_vista, 378,
sprintf (targptr, CATGETS(dtsearch_catd, MS_vista, 378,
"%s Could not open following database name string:\n '%s'"),
PROGNAME"378", allnames);
DtSearchAddMessage (targptr);

View file

@ -184,14 +184,14 @@ void release_shm_mem (void)
{
if (global_memory_ptr != NULL) {
if (shmdt (global_memory_ptr) == -1) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_vestatis, 104,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_vestatis, 104,
PROGNAME "104 Cannot detach shared memory "));
OE_flags |= OE_PERMERR;
usrblk.retncode = OE_ABORT;
return;
}
if (shmctl (shm_id, IPC_RMID, NULL) == -1) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_vestatis, 110,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_vestatis, 110,
PROGNAME "110 Cannot remove shared memory "));
OE_flags |= OE_PERMERR;
usrblk.retncode = OE_ABORT;
@ -224,7 +224,7 @@ static int init_global_memory (DtSrINT32 addrs, DtSrINT32 r_addrs)
shm_id = shmget (IPC_PRIVATE, k, SHM_FLAG);
if ((global_memory_ptr = (char *) shmat (shm_id, (char *) 0, 0)) ==
((char *) -1)) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_vestatis, 115,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_vestatis, 115,
PROGNAME "115 No shared memory available"));
OE_flags |= OE_PERMERR;
usrblk.retncode = OE_ABORT;
@ -404,7 +404,7 @@ int efim_qsort (void)
sptr++;
if (sptr == STACKSZ) {
fputs (catgets (dtsearch_catd, MS_vestatis, 107,
fputs (CATGETS(dtsearch_catd, MS_vestatis, 107,
PROGNAME "107 Qsort stack overflow.\n"),
aa_stderr);
OE_flags |= OE_PERMERR;
@ -433,7 +433,7 @@ int efim_qsort (void)
sptr++;
if (sptr == STACKSZ) {
fputs (catgets (dtsearch_catd, MS_vestatis, 107,
fputs (CATGETS(dtsearch_catd, MS_vestatis, 107,
PROGNAME "107 Qsort stack overflow.\n"),
aa_stderr);
OE_flags |= OE_PERMERR;
@ -630,7 +630,7 @@ void get_next_memory_block (size_t node_size)
mem_offset += node_size;
cur_pos = mem_start;
if (mem_start == NULL) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_vestatis, 310,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_vestatis, 310,
"%s Out of Memory. Need %ld bytes.\n"),
PROGNAME "310", total_memory_size);
OE_flags |= OE_PERMERR;
@ -645,7 +645,7 @@ void get_next_memory_block (size_t node_size)
memory_blocks = (CNCRD_MEMORY_AREA_LIST *)
malloc (sizeof (CNCRD_MEMORY_AREA_LIST) + 2);
if (memory_blocks == NULL) {
fputs (catgets (dtsearch_catd, MS_vestatis, 314,
fputs (CATGETS(dtsearch_catd, MS_vestatis, 314,
PROGNAME"314 Out of Memory.\n"), aa_stderr);
OE_flags |= OE_PERMERR;
usrblk.retncode = OE_ABORT;
@ -761,7 +761,7 @@ void init_memory (void)
{
mem_start = (char *) malloc (MEMORY_SIZE);
if (mem_start == NULL) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_vestatis, 310,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_vestatis, 310,
"%s Out of Memory. Need %ld bytes.\n"), PROGNAME "310", MEMORY_SIZE);
OE_flags |= OE_PERMERR;
usrblk.retncode = OE_ABORT;
@ -778,7 +778,7 @@ void init_memory (void)
memory_blocks = (CNCRD_MEMORY_AREA_LIST *)
malloc (sizeof (CNCRD_MEMORY_AREA_LIST) + 2);
if (memory_blocks == NULL) {
fputs (catgets (dtsearch_catd, MS_vestatis, 314,
fputs (CATGETS(dtsearch_catd, MS_vestatis, 314,
PROGNAME "314 Out of Memory.\n"), aa_stderr);
OE_flags |= OE_PERMERR;
usrblk.retncode = OE_ABORT;
@ -1008,7 +1008,7 @@ void load_ditto_str (void)
*/
d_crset (&dba1, saveusr.vistano);
if (db_status < 0) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_vestatis, 437,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_vestatis, 437,
"%s: db_status = %d, dba = %d:%ld (x'%08.8lx'), vistano = %d\n"),
PROGNAME "437", db_status, (dba1 & 0xff000000) >> 24,
dba1 & 0xffffff, dba1, saveusr.vistano);
@ -1019,7 +1019,7 @@ void load_ditto_str (void)
}
d_recread (&cur_rec, saveusr.vistano);
if (db_status < 0) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_vestatis, 437,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_vestatis, 437,
"%s: db_status = %d, dba = %d:%ld (x'%08.8lx'), vistano = %d\n"),
PROGNAME "437", db_status, (dba1 & 0xff000000) >> 24,
dba1 & 0xffffff, dba1, saveusr.vistano);
@ -1047,7 +1047,7 @@ void load_ditto_str (void)
else {
cur_ditto_mem = malloc (dittosz);
if (cur_ditto_mem == NULL) {
fputs ( catgets (dtsearch_catd, MS_vestatis, 504,
fputs ( CATGETS(dtsearch_catd, MS_vestatis, 504,
PROGNAME "504 Cannot allocate cur_ditto\n"),
aa_stderr);
OE_flags |= OE_PERMERR;
@ -1150,7 +1150,7 @@ void load_ditto_str (void)
if (num_hits >= maxhits) {
if (!(usrblk.flags & USR_NO_INFOMSGS)) {
sprintf (vestat_msgbuf, catgets (dtsearch_catd, MS_vestatis, 421,
sprintf (vestat_msgbuf, CATGETS(dtsearch_catd, MS_vestatis, 421,
"$s Total Number Hits = %ld. Discarded hits beyond maximum number specified."),
PROGNAME "421", (long)num_hits);
DtSearchAddMessage (vestat_msgbuf);
@ -1342,7 +1342,7 @@ static void stat_search (void)
*/
if (num_hits > SORT_MESG && !(usrblk.flags & USR_NO_ITERATE)) {
if (!mes_search_box) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_vestatis, 990,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_vestatis, 990,
PROGNAME"990 The system is now sorting. Please wait."));
}
usrblk.retncode = OE_SEARCHING;
@ -1406,7 +1406,7 @@ void ve_statistical (void)
/* stat_array size = 1 node for every possible object */
if (usrblk.query[0] == 0) {
DtSearchAddMessage (catgets (dtsearch_catd, MS_vestatis,
DtSearchAddMessage (CATGETS(dtsearch_catd, MS_vestatis,
677, PROGNAME "677 Query field is empty."));
usrblk.retncode = OE_BAD_QUERY;
return;

View file

@ -42,7 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include "DtSvcLock.h"
/*****************************************************************************
@ -79,7 +79,7 @@ Dt11GetMessage(
_DtSvcProcessLock();
if ( NULL == nlmsg_filename || 0 != strcmp(nlmsg_filename, filename) )
{
nlmsg_fd = catopen(filename, NL_CAT_LOCALE);
nlmsg_fd = CATOPEN(filename, NL_CAT_LOCALE);
if (nlmsg_filename)
{
free(nlmsg_filename);
@ -87,7 +87,7 @@ Dt11GetMessage(
}
nlmsg_filename = strdup(filename);
}
msg=catgets(nlmsg_fd,set,n,s);
msg=CATGETS(nlmsg_fd,set,n,s);
_DtSvcProcessUnlock();
return (msg);
}

View file

@ -45,7 +45,7 @@
************************************<+>*************************************/
#include <stdio.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include "DtSvcLock.h"
#if !defined(NL_CAT_LOCALE)
@ -80,8 +80,6 @@ _DtGetMessage(
{
char *msg;
char *lang;
nl_catd catopen();
char *catgets();
static int first = 1;
static nl_catd nlmsg_fd;
@ -89,9 +87,9 @@ _DtGetMessage(
if ( first )
{
first = 0;
nlmsg_fd = catopen(filename, NL_CAT_LOCALE);
nlmsg_fd = CATOPEN(filename, NL_CAT_LOCALE);
}
msg=catgets(nlmsg_fd,set,n,s);
msg=CATGETS(nlmsg_fd,set,n,s);
_DtSvcProcessUnlock();
return (msg);
}

View file

@ -37,11 +37,18 @@
#include <stdio.h>
#include <string.h>
#include <nl_types.h>
#include <X11/Intrinsic.h>
#include <Dt/MsgCatP.h>
#include <DtSvcLock.h>
#if defined(NO_XLIB)
#define _DtSvcProcessLock()
#define _DtSvcProcessUnlock()
#else
#include <X11/Intrinsic.h>
#include <DtSvcLock.h>
#endif /* NO_XLIB */
#include <Dt/MsgCatP.h>
#if defined(hpV4) && !defined(NO_XLIB)
typedef struct _dt_msg_cache
{
char ***cached_msgs;
@ -56,8 +63,8 @@ static _DtMsgCache *catalog_message_caches = NULL;
static _DtMsgCache *get_msg_cache(nl_catd catd)
{
#define INITIAL_NMSGS_PER_SET 300
#define INITIAL_NSETS 50
const int initial_nmsgs_per_set = 300;
const int initial_nsets = 50;
_DtMsgCache *c;
@ -66,28 +73,23 @@ static _DtMsgCache *get_msg_cache(nl_catd catd)
c = (_DtMsgCache*) XtMalloc(sizeof(_DtMsgCache));
c->cached_msgs = NULL;
c->nmsgs_per_set = INITIAL_NMSGS_PER_SET;
c->nsets = INITIAL_NSETS;
c->nmsgs_per_set = initial_nmsgs_per_set;
c->nsets = initial_nsets;
c->catd = catd;
c->next = catalog_message_caches;
catalog_message_caches = c;
return c;
}
/*
* Wrapper around catgets -- this makes sure the message string is saved
* in a safe location; so repeated calls to catgets() do not overwrite
* the catgets() internal buffer. This has been a problem on HP systems.
*/
char *_DtCatgetsCached(nl_catd catd, int set, int num, char *dflt)
char *_DtCatgetsCached(nl_catd catd, int set, int num, const char *dflt)
{
char *message;
#if !defined(hpV4)
message = catgets(catd, set, num, dflt);
#else
_DtMsgCache *c;
char *message = NULL;
_DtMsgCache *c;
char **setptr;
int i, multiplier;
int size;
@ -96,8 +98,6 @@ char *_DtCatgetsCached(nl_catd catd, int set, int num, char *dflt)
int setIdx = set - 1;
int numIdx = num - 1;
_DtSvcProcessLock();
c = get_msg_cache(catd);
if (NULL == c)
{
@ -150,8 +150,32 @@ char *_DtCatgetsCached(nl_catd catd, int set, int num, char *dflt)
message = setptr[numIdx];
_DtSvcProcessUnlock();
#endif /* hpV4 */
return message;
}
#endif /* hpV4 */
int _DtCatclose(nl_catd catd)
{
return (catd == (nl_catd) -1) ? 0 : catclose(catd);
}
char *_DtCatgets(nl_catd catd, int set, int num, const char *dflt)
{
char *msg = NULL;
if (catd == (nl_catd) -1 || set < 0 || num < 0) {
/* Some catgets() implementations will fault if catd is invalid. */
msg = (char *) dflt;
} else {
/* Per POSIX, we cannot assume catgets() is thread-safe. */
_DtSvcProcessLock();
#if defined(hpV4) && !defined(NO_XLIB)
msg = _DtCatgetsCached(catd, set, num, dflt);
#else
msg = catgets(catd, set, num, dflt);
#endif /* hpV4 */
_DtSvcProcessUnlock();
}
return msg;
}

View file

@ -48,7 +48,6 @@ static char *termWhatString = _DtTermPullInTermWhatString;
#include "TermPrimRenderLineDraw.h"
#include "TermPrimMessageCatI.h"
#include "TermPrimSelectP.h"
#include <nl_types.h>
static int TextInsertProc(Widget w, unsigned char *buffer, int length);

View file

@ -73,7 +73,7 @@ extern char * _DtTermPrimGetMessage( char *filename, int set, int n, char *s );
#include <Xm/ManagerP.h>
#include <signal.h>
#include <ctype.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <wchar.h>
#if defined(__linux__) || defined(hpV4)
# include <sys/types.h> /* For FD_* macros. */
@ -3776,10 +3776,10 @@ _DtTermPrimGetMessage(
*/
nlmsg_fd = (nl_catd) -1;
else
nlmsg_fd = catopen(filename, NL_CAT_LOCALE);
nlmsg_fd = CATOPEN(filename, NL_CAT_LOCALE);
}
_DtTermProcessUnlock();
msg=catgets(nlmsg_fd,set,n,s);
msg=CATGETS(nlmsg_fd,set,n,s);
return (msg);
}

View file

@ -32,7 +32,7 @@
#ifdef I18N_MSG
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#if !defined(NL_CAT_LOCALE)
#define NL_CAT_LOCALE 0
@ -329,8 +329,6 @@ _DtWidgetGetMessage(int set,
char *s)
{
char *msg;
nl_catd catopen();
char *catgets();
static int first = 1;
static nl_catd nlmsg_fd;
@ -339,13 +337,13 @@ _DtWidgetGetMessage(int set,
_DtProcessLock();
if ( first)
{
nlmsg_fd = catopen(_DTWIDGET_CAT_NAME, NL_CAT_LOCALE);
nlmsg_fd = CATOPEN(_DTWIDGET_CAT_NAME, NL_CAT_LOCALE);
first = 0;
}
_DtProcessUnlock();
}
msg=catgets(nlmsg_fd,set,n,s);
msg=CATGETS(nlmsg_fd,set,n,s);
return (msg);
}
#endif /* I18N_MSG */

View file

@ -41,7 +41,7 @@
#include <shadow.h>
#include <locale.h>
#include <stdio.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <X11/Xthreads.h>
#include <X11/Xos.h>
@ -304,7 +304,7 @@ __pam_msg_cleanup(
{
_pam_msg_data *msg_data = (_pam_msg_data *) data;
catclose(msg_data->fd);
CATCLOSE(msg_data->fd);
free(msg_data);
}
@ -395,20 +395,20 @@ __pam_get_i18n_msg(
int status = pam_get_data(pamh, filename, (void**) &msg_data);
if (status == PAM_SUCCESS) {
return (catgets(msg_data->fd, set, n, s));
return (CATGETS(msg_data->fd, set, n, s));
}
if (status == PAM_NO_MODULE_DATA) {
/*
* No message file descriptor found, make and store one.
*/
nlmsg_fd = catopen(filename, NL_CAT_LOCALE);
msg = catgets(nlmsg_fd, set, n, s);
nlmsg_fd = CATOPEN(filename, NL_CAT_LOCALE);
msg = CATGETS(nlmsg_fd, set, n, s);
if ((msg_data = (_pam_msg_data *)
calloc(1, sizeof (_pam_msg_data))) == NULL) {
output_msg = __pam_thread_backup(msg);
catclose(nlmsg_fd);
CATCLOSE(nlmsg_fd);
return (output_msg);
}
@ -421,10 +421,10 @@ __pam_get_i18n_msg(
/* NULL pamh */
nlmsg_fd = catopen(filename, NL_CAT_LOCALE);
msg = catgets(nlmsg_fd, set, n, s);
nlmsg_fd = CATOPEN(filename, NL_CAT_LOCALE);
msg = CATGETS(nlmsg_fd, set, n, s);
output_msg = __pam_thread_backup(msg);
catclose(nlmsg_fd);
CATCLOSE(nlmsg_fd);
return (output_msg);
}

View file

@ -43,7 +43,6 @@
#include <errno.h>
#include <stdint.h>
#include <unistd.h>
#include <nl_types.h>
#include "Tt/tt_c.h"
#include "util/tt_file_system.h"

View file

@ -103,7 +103,7 @@ _tt_gettext(
#endif // OPT_DGETTEXT
#if defined(OPT_CATGETS)
static char *
static const char *
_tt__catgets(
int set_num,
int msg_num,
@ -111,13 +111,16 @@ _tt__catgets(
)
{
static nl_catd catalog = 0;
if (catalog == 0) {
if (catalog == (nl_catd) 0) {
catalog = catopen(
#if defined(OPT_BUG_AIX)
(char *)
#endif
tt_err_domain, NL_CAT_LOCALE );
}
if (catalog == (nl_catd) -1) {
return default_string;
}
return catgets( catalog, set_num, msg_num,
#if defined(OPT_BUG_SUNOS_5) || defined(OPT_BUG_AIX)
(char *)
@ -126,7 +129,7 @@ _tt__catgets(
}
#endif // OPT_CATGETS
char *
const char *
_tt_catgets(
int set_num,
int msg_num,

View file

@ -56,7 +56,6 @@
#include <sys/resource.h>
#include <time.h>
#include <unistd.h>
#include <nl_types.h>
#include <util/tt_gettext.h>
#include <tt_const.h>
#include <sys/types.h>

View file

@ -44,7 +44,7 @@
#include <limits.h>
#include <stddef.h>
#include <unistd.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <signal.h>
#include <locale.h>
#include <sys/param.h> /* for MAXPATHLEN and MAXHOSTNAMELEN */

View file

@ -54,7 +54,7 @@
#include <limits.h>
#include <stddef.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <signal.h>
#include <errno.h>

View file

@ -165,7 +165,7 @@ ab_load_bil_file(
/* The first thing in the message is
* some general text.
*/
init_msg = catgets(Dtb_project_catd, 100, 38, "The following modules are read-only.\nIf you edit these modules, you\nwill not be able to save your edits.");
init_msg = CATGETS(Dtb_project_catd, 100, 38, "The following modules are read-only.\nIf you edit these modules, you\nwill not be able to save your edits.");
/* If we have an old buffer lying around, free it */
if (errmsg != (STRING) NULL)
@ -194,7 +194,7 @@ ab_load_bil_file(
if (!util_strempty(errmsg))
{
util_set_help_data(catgets(Dtb_project_catd, 100, 92,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 92,
"Any changes made to a read-only module cannot be saved,\nunless you save the module to a different file name."),
NULL, NULL);
util_puts(errmsg);
@ -204,7 +204,7 @@ ab_load_bil_file(
if( obj_get_num_children(newProject) == 0 )
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 23,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 23,
"%s: Empty project file loaded."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_empty_proj_msg_initialize(&dtb_palette_empty_proj_msg);
@ -444,14 +444,14 @@ ab_check_and_open_bip(
else /* Read-only file */
{
/* You can read it but you can't write to it. */
sprintf(Buf, catgets(Dtb_project_catd, 100, 17,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 17,
"The file %s is a read-only file.\nYou may open the project\nor cancel the operation."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_open_ro_proj_msg_initialize(
&dtb_palette_open_ro_proj_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 90,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 90,
"Opening a read-only project means that any changes that\naffect the project (.bip) file, such as creation of a\nnew module or creation of a cross-module connection,\ncannot be saved, unless you save the project to a\ndifferent file name. You have the option of continuing\nwith the open operation or cancelling it.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -477,7 +477,7 @@ ab_check_and_open_bip(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 20,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 20,
"%s does not have read permission."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_error_msg_initialize(&dtb_palette_error_msg);
@ -551,7 +551,7 @@ ab_check_and_import_bil(
else
{
/* You can read it but you can't write to it. */
sprintf(Buf, catgets(Dtb_project_catd, 100, 21,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 21,
"The file %s is a read-only file.\n\
You may import the module or cancel\n\
the operation."), fileName);
@ -560,7 +560,7 @@ ab_check_and_import_bil(
&dtb_palette_import_ro_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 91,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 91,
"Importing a read-only module means that any changes\nthat affect the module cannot be saved, unless you\nsave the module to a different file name. You have\nthe option of continuing with the import operation\nor cancelling it.");
help_data->help_volume = "";
@ -586,7 +586,7 @@ ab_check_and_import_bil(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 9,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 9,
"%s does not have read permission."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_error_msg_initialize(&dtb_palette_error_msg);

View file

@ -178,7 +178,7 @@ dnd_load_buffer(
goto epilogue;
}
fileName = dropBuf.name? dropBuf.name : catgets(Dtb_project_catd, 100, 104, "NoName");
fileName = dropBuf.name? dropBuf.name : CATGETS(Dtb_project_catd, 100, 104, "NoName");
fileName = XtNewString(fileName);
if ( (strcmp(dataType, BIX) == 0) ||
@ -219,7 +219,7 @@ dnd_load_buffer(
}
else
{
fmtStr = XtNewString(catgets(Dtb_project_catd, 100, 103,
fmtStr = XtNewString(CATGETS(Dtb_project_catd, 100, 103,
"Cannot determine file type for %s.\nDo you want to load the file as a project or a module?"));
msg = (STRING) util_malloc(strlen(fmtStr) + strlen(fileName) + 1);
@ -349,7 +349,7 @@ dnd_load_file(
}
else
{
fmtStr = XtNewString(catgets(Dtb_project_catd, 100, 103,
fmtStr = XtNewString(CATGETS(Dtb_project_catd, 100, 103,
"Cannot determine file type for %s.\nDo you want to load the file as a project or a module?"));
msg = (STRING) util_malloc(strlen(fmtStr) + strlen(fileName) + 1);
sprintf(msg, fmtStr, fileName);

View file

@ -2270,7 +2270,7 @@ abobj_paste(
if (!obj_is_base_win(winobj))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 37,
i18n_msg = CATGETS(Dtb_project_catd, 100, 37,
"Menubar can be pasted to a Main Window only.");
if (errmsg != (STRING) NULL)
@ -2290,7 +2290,7 @@ abobj_paste(
if (obj_is_menubar(nobj))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 27,
i18n_msg = CATGETS(Dtb_project_catd, 100, 27,
"There is already a Menubar for the selected window.");
if (errmsg != (STRING) NULL)
util_free(errmsg);
@ -2309,7 +2309,7 @@ abobj_paste(
&& !obj_is_file_chooser(obj_get_root(root)))))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 28,
i18n_msg = CATGETS(Dtb_project_catd, 100, 28,
"Containers must be pasted to\na Main Window or Custom Dialog.");
if (errmsg != (STRING) NULL)
@ -2325,7 +2325,7 @@ abobj_paste(
|| obj_is_group(obj_get_root(root)))))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 57,
i18n_msg = CATGETS(Dtb_project_catd, 100, 57,
"Groups must be pasted to\na group or control panel.");
if (errmsg != (STRING) NULL)
@ -2407,7 +2407,7 @@ abobj_paste(
if (obj_is_control_panel(obj))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 59,
i18n_msg = CATGETS(Dtb_project_catd, 100, 59,
"Control Panes must be pasted to a Main Window,\nCustom Dialog, or another pane.");
/* If we have an old buffer lying around, free it */
@ -2441,7 +2441,7 @@ abobj_paste(
!(obj_is_container(root) && !obj_is_menubar(root))))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 29,
i18n_msg = CATGETS(Dtb_project_catd, 100, 29,
"Panes must be pasted to\na Main Window, Custom Dialog or Container.");
if (errmsg != (STRING) NULL)
@ -2460,7 +2460,7 @@ abobj_paste(
!obj_is_group(obj_get_root(newroot))))
{
Err = True;
i18n_msg = catgets(Dtb_project_catd, 100, 30,
i18n_msg = CATGETS(Dtb_project_catd, 100, 30,
"Controls must be pasted to\na Control Panel or Group.");
if (errmsg != (STRING) NULL)

View file

@ -1218,40 +1218,40 @@ abobj_strings_init(void)
char *attach_str;
props_str =
XtNewString(catgets(Dtb_project_catd, 100, 137, "Props"));
XtNewString(CATGETS(Dtb_project_catd, 100, 137, "Props"));
undo_str =
XtNewString(catgets(Dtb_project_catd, 100, 138, "Undo"));
XtNewString(CATGETS(Dtb_project_catd, 100, 138, "Undo"));
cut_str =
XtNewString(catgets(Dtb_project_catd, 100, 139, "Cut"));
XtNewString(CATGETS(Dtb_project_catd, 100, 139, "Cut"));
copy_str =
XtNewString(catgets(Dtb_project_catd, 100, 140, "Copy"));
XtNewString(CATGETS(Dtb_project_catd, 100, 140, "Copy"));
paste_str =
XtNewString(catgets(Dtb_project_catd, 100, 141, "Paste"));
XtNewString(CATGETS(Dtb_project_catd, 100, 141, "Paste"));
delete_str =
XtNewString(catgets(Dtb_project_catd, 100, 142, "Delete"));
XtNewString(CATGETS(Dtb_project_catd, 100, 142, "Delete"));
align_str =
XtNewString(catgets(Dtb_project_catd, 100, 143, "Align"));
XtNewString(CATGETS(Dtb_project_catd, 100, 143, "Align"));
distr_str =
XtNewString(catgets(Dtb_project_catd, 100, 144, "Distribute"));
XtNewString(CATGETS(Dtb_project_catd, 100, 144, "Distribute"));
group_str =
XtNewString(catgets(Dtb_project_catd, 100, 145, "Group"));
XtNewString(CATGETS(Dtb_project_catd, 100, 145, "Group"));
ungroup_str =
XtNewString(catgets(Dtb_project_catd, 100, 146, "Ungroup"));
XtNewString(CATGETS(Dtb_project_catd, 100, 146, "Ungroup"));
mk_paned_win_str =
XtNewString(catgets(Dtb_project_catd, 100, 147, "Make Paned Window"));
XtNewString(CATGETS(Dtb_project_catd, 100, 147, "Make Paned Window"));
unmk_paned_win_str =
XtNewString(catgets(Dtb_project_catd, 100, 148, "Unmake Paned Window"));
XtNewString(CATGETS(Dtb_project_catd, 100, 148, "Unmake Paned Window"));
attach_str =
XtNewString(catgets(Dtb_project_catd, 100, 149, "Attachments..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 149, "Attachments..."));
prop_menu[0].label =
XtNewString(catgets(Dtb_project_catd, 100, 150, "Revolving..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 150, "Revolving..."));
prop_menu[1].label =
XtNewString(catgets(Dtb_project_catd, 100, 151, "Fixed..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 151, "Fixed..."));
obj_menu_items[0].label = props_str;
obj_menu_items[1].label =
XtNewString(catgets(Dtb_project_catd, 100, 152, "Browse..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 152, "Browse..."));
obj_menu_items[3].label = undo_str;
obj_menu_items[4].label = cut_str;
obj_menu_items[5].label = copy_str;
@ -1265,11 +1265,11 @@ abobj_strings_init(void)
obj_menu_items[14].label = unmk_paned_win_str;
obj_menu_items[15].label = attach_str;
obj_menu_items[17].label =
XtNewString(catgets(Dtb_project_catd, 100, 153, "NextLayer"));
XtNewString(CATGETS(Dtb_project_catd, 100, 153, "NextLayer"));
browser_menu_items[0].label = props_str;
browser_menu_items[1].label =
XtNewString(catgets(Dtb_project_catd, 100, 154, "Tearoff Browser..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 154, "Tearoff Browser..."));
browser_menu_items[3].label = undo_str;
browser_menu_items[4].label = cut_str;
browser_menu_items[5].label = copy_str;
@ -1281,11 +1281,11 @@ abobj_strings_init(void)
browser_menu_items[12].label = unmk_paned_win_str;
browser_menu_items[13].label = attach_str;
browser_menu_items[15].label =
XtNewString(catgets(Dtb_project_catd, 100, 155, "Expand"));
XtNewString(CATGETS(Dtb_project_catd, 100, 155, "Expand"));
browser_menu_items[16].label =
XtNewString(catgets(Dtb_project_catd, 100, 156, "Expand All"));
XtNewString(CATGETS(Dtb_project_catd, 100, 156, "Expand All"));
browser_menu_items[17].label =
XtNewString(catgets(Dtb_project_catd, 100, 157, "Collapse"));
XtNewString(CATGETS(Dtb_project_catd, 100, 157, "Collapse"));
layout_menu_items[0].label = align_str;
layout_menu_items[1].label = distr_str;

View file

@ -797,19 +797,19 @@ abobj_update_proj_name(
else
{
proj_win_title = (STRING) util_malloc(
strlen(catgets(Dtb_project_catd, 100, 104, "NoName"))
strlen(CATGETS(Dtb_project_catd, 100, 104, "NoName"))
+ strlen(".bip") +1);
strcpy(proj_win_title,
catgets(Dtb_project_catd, 100, 104, "NoName"));
CATGETS(Dtb_project_catd, 100, 104, "NoName"));
}
strcat(proj_win_title, ".bip");
new_title = (STRING) util_malloc(
strlen(catgets(Dtb_project_catd, 10, 1, "Project Organizer"))
strlen(CATGETS(Dtb_project_catd, 10, 1, "Project Organizer"))
+ strlen(" - ") + strlen(proj_win_title) +1);
strcpy(new_title,
catgets(Dtb_project_catd, 10, 1, "Project Organizer"));
CATGETS(Dtb_project_catd, 10, 1, "Project Organizer"));
strcat(new_title, " - ");
strcat(new_title, proj_win_title);
util_free(proj_win_title);
@ -849,10 +849,10 @@ abobj_update_palette_title(
else
{
proj_win_title = (STRING) util_malloc(
strlen(catgets(Dtb_project_catd, 100, 104, "NoName"))
strlen(CATGETS(Dtb_project_catd, 100, 104, "NoName"))
+ strlen(".bip") +1);
strcpy(proj_win_title,
catgets(Dtb_project_catd, 100, 104, "NoName"));
CATGETS(Dtb_project_catd, 100, 104, "NoName"));
}
strcat(proj_win_title, ".bip");
@ -866,13 +866,13 @@ abobj_update_palette_title(
SaveNeeded = TRUE;
new_title = (STRING) util_malloc(
strlen(catgets(Dtb_project_catd, 10, 5, "Application Builder"))
strlen(CATGETS(Dtb_project_catd, 10, 5, "Application Builder"))
+ strlen(" - ") + strlen(proj_win_title) +
+ strlen(catgets(Dtb_project_catd, 100, 244, " (Save Needed)"))
+ strlen(CATGETS(Dtb_project_catd, 100, 244, " (Save Needed)"))
+1);
strcpy(new_title,
catgets(Dtb_project_catd, 10, 5, "Application Builder"));
CATGETS(Dtb_project_catd, 10, 5, "Application Builder"));
strcat(new_title, " - ");
strcat(new_title, proj_win_title);
util_free(proj_win_title);
@ -880,7 +880,7 @@ abobj_update_palette_title(
if (SaveNeeded)
{
strcat(new_title,
catgets(Dtb_project_catd, 100, 244, " (Save Needed)"));
CATGETS(Dtb_project_catd, 100, 244, " (Save Needed)"));
}
XtVaSetValues(AB_toplevel, XmNtitle, new_title, NULL);

View file

@ -663,10 +663,10 @@ appfw_editor_prevent_closeCB(
*/
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
xm_buf = XmStringCreateLocalized(catgets(Dtb_project_catd, 100, 248, "Properties for your project have been modified on the\nApplication Framework Editor but not Applied.\nApply Changes or Cancel Close operation."));
xm_buf = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 100, 248, "Properties for your project have been modified on the\nApplication Framework Editor but not Applied.\nApply Changes or Cancel Close operation."));
help_data->help_volume = help_data->help_locationID = NULL;
help_data->help_text = XtNewString(catgets(Dtb_project_catd, 100, 249, "Click Apply Changes to apply the changes \nand close the Application Framework Editor.\n\nClick Cancel if you don't want to apply the\nchanges and want the Application Framework\nEditor to remain displayed. You can then click\nReset to undo the changes before closing\nthe Application Framework Editor."));
help_data->help_text = XtNewString(CATGETS(Dtb_project_catd, 100, 249, "Click Apply Changes to apply the changes \nand close the Application Framework Editor.\n\nClick Cancel if you don't want to apply the\nchanges and want the Application Framework\nEditor to remain displayed. You can then click\nReset to undo the changes before closing\nthe Application Framework Editor."));
/*
* Pop up warning message dialog

View file

@ -3517,9 +3517,9 @@ get_wrn_response(
switch(wrn_type)
{
case ATTCH_ED_WRN_LOAD:
help_data->help_text = XtNewString(catgets(Dtb_project_catd, 100, 93, "Click Apply Changes to apply the changes to the\ncurrent object and load the selected object.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before loading\nthe selected object."));
help_data->help_text = XtNewString(CATGETS(Dtb_project_catd, 100, 93, "Click Apply Changes to apply the changes to the\ncurrent object and load the selected object.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before loading\nthe selected object."));
sprintf(wrn_string,
catgets(Dtb_project_catd, 100, 43,
CATGETS(Dtb_project_catd, 100, 43,
"Attachments for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
@ -3528,9 +3528,9 @@ get_wrn_response(
break;
case ATTCH_ED_WRN_CHANGE_OBJTYPE:
help_data->help_text = XtNewString(catgets(Dtb_project_catd, 100, 95, "Click Apply Changes to apply the changes to the\ncurrent object and display the new object type.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before changing\nto a different object type."));
help_data->help_text = XtNewString(CATGETS(Dtb_project_catd, 100, 95, "Click Apply Changes to apply the changes to the\ncurrent object and display the new object type.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before changing\nto a different object type."));
sprintf(wrn_string,
catgets(Dtb_project_catd, 100, 44,
CATGETS(Dtb_project_catd, 100, 44,
"Attachments for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
@ -3539,9 +3539,9 @@ get_wrn_response(
break;
case ATTCH_ED_WRN_CLOSE:
help_data->help_text = XtNewString(catgets(Dtb_project_catd, 100, 247, "Click Apply Changes to apply the changes to the\ncurrent object and close the Attachments Editor.\n\nClick Cancel if you don't want to apply the\nchanges to the current object and want the\nAttachments Editor to remain displayed. You can\nthen click Reset to undo the changes before\nclosing the Attachments Editor."));
help_data->help_text = XtNewString(CATGETS(Dtb_project_catd, 100, 247, "Click Apply Changes to apply the changes to the\ncurrent object and close the Attachments Editor.\n\nClick Cancel if you don't want to apply the\nchanges to the current object and want the\nAttachments Editor to remain displayed. You can\nthen click Reset to undo the changes before\nclosing the Attachments Editor."));
sprintf(wrn_string,
catgets(Dtb_project_catd, 100, 45,
CATGETS(Dtb_project_catd, 100, 45,
"Attachments for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
@ -3704,7 +3704,7 @@ attch_ed_verify_props(void)
/*
* Fetch format string
*/
format_str = XtNewString(catgets(Dtb_project_catd, 100, 245,
format_str = XtNewString(CATGETS(Dtb_project_catd, 100, 245,
"Attachments for \"%s\"\ncannot be modified because it is\na member of the group \"%s\"."));
/*
@ -3733,7 +3733,7 @@ attch_ed_verify_props(void)
* Malloc/setup struct for help text
*/
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 246,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 246,
"Group objects have attributes that determine what\nattachments their members will have, therefore setting\nattachments for group members is not allowed. This only\napplies to group objects that have layout type Vertical,\nHorizontal, or Row-column. Click Cancel or Reset to\nundo your changes on the Attachments Editor.");
help_data->help_volume = NULL;
help_data->help_locationID = NULL;

View file

@ -2882,7 +2882,7 @@ brws_build_module_menu(
if (!shown_modules_exist)
{
label = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 229, "No modules to browse"));
CATGETS(Dtb_project_catd, 100, 229, "No modules to browse"));
mpb = XtVaCreateManagedWidget(name,
xmPushButtonWidgetClass,
pulldown,

View file

@ -123,7 +123,7 @@ brwsP_create_find_box(
args,
num_args);
title = XtNewString(catgets(Dtb_project_catd, 100, 230,
title = XtNewString(CATGETS(Dtb_project_catd, 100, 230,
"Module Browser: Find Object"));
XtVaSetValues(XtParent(ui->find_box),
XmNtitle, title,
@ -131,9 +131,9 @@ brwsP_create_find_box(
XtFree(title);
sel_label = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 231, "Object Name"));
CATGETS(Dtb_project_catd, 100, 231, "Object Name"));
ok_label = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 232, "Find"));
CATGETS(Dtb_project_catd, 100, 232, "Find"));
XtVaSetValues(ui->find_box,
XmNselectionLabelString, sel_label,
XmNokLabelString, ok_label,

View file

@ -179,12 +179,12 @@ brwsP_orientation(
if (props->orientation == BRWS_VERTICAL) {
props->orientation = BRWS_HORIZONTAL;
str = catgets(Dtb_project_catd, 100, 66, "Vertical");
str = CATGETS(Dtb_project_catd, 100, 66, "Vertical");
xmlabel = XmStringCreateLocalized(str);
}
else {
props->orientation = BRWS_VERTICAL;
str = catgets(Dtb_project_catd, 100, 67, "Horizontal");
str = CATGETS(Dtb_project_catd, 100, 67, "Horizontal");
xmlabel = XmStringCreateLocalized(str);
}
@ -220,9 +220,9 @@ brwsP_obj_glyph(
if (!ab || !ab->module)
return;
hide_str = XtNewString(catgets(Dtb_project_catd, 100, 60,
hide_str = XtNewString(CATGETS(Dtb_project_catd, 100, 60,
"Hide Object Glyph"));
show_str = XtNewString(catgets(Dtb_project_catd, 100, 61,
show_str = XtNewString(CATGETS(Dtb_project_catd, 100, 61,
"Show Object Glyph"));
browser_show_view_elements(ab->module,
@ -255,9 +255,9 @@ brwsP_obj_class(
if (!b || !b->module)
return;
hide_str = XtNewString(catgets(Dtb_project_catd, 100, 62,
hide_str = XtNewString(CATGETS(Dtb_project_catd, 100, 62,
"Hide Object Type"));
show_str = XtNewString(catgets(Dtb_project_catd, 100, 63,
show_str = XtNewString(CATGETS(Dtb_project_catd, 100, 63,
"Show Object Type"));
browser_show_view_elements(b->module,
@ -290,9 +290,9 @@ brwsP_obj_name(
if (!ab || !ab->module)
return;
hide_str = XtNewString(catgets(Dtb_project_catd, 100, 64,
hide_str = XtNewString(CATGETS(Dtb_project_catd, 100, 64,
"Hide Object Name"));
show_str = XtNewString(catgets(Dtb_project_catd, 100, 65,
show_str = XtNewString(CATGETS(Dtb_project_catd, 100, 65,
"Show Object Name"));
browser_show_view_elements(ab->module,

View file

@ -105,7 +105,7 @@ cgenP_get_envCB(
}
if (var_value == NULL)
{
XmTextSetString(env_dlg->textpane, catgets(Dtb_project_catd, 100, 58, "*** Not Set ***"));
XmTextSetString(env_dlg->textpane, CATGETS(Dtb_project_catd, 100, 58, "*** Not Set ***"));
}
else
{
@ -193,7 +193,7 @@ cgenP_reset_envCB(
if (var_value == NULL)
{
XmTextSetString(env_dlg->textpane, catgets(Dtb_project_catd, 100, 58, "*** Not Set ***"));
XmTextSetString(env_dlg->textpane, CATGETS(Dtb_project_catd, 100, 58, "*** Not Set ***"));
}
else
{

View file

@ -2407,7 +2407,7 @@ check_path_to_cmd(STRING *cmdList, BOOL *allowWarnUserInOut)
util_strncpy(dirName, foundCmd, dirNameLen+1);
/*util_dprintf(2, "directory: '%s'\n", dirName);*/
sprintf(buffer, catgets(Dtb_project_catd, 100, 52,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 52,
"Your PATH does not contain the command %s.\n"
"In order to access this command, may I append this\n"
"directory to your path?:\n"

View file

@ -960,7 +960,7 @@ connP_make_conn_string(
strcat(conn_string, unknown_str);
}
strcat(conn_string, catgets(Dtb_project_catd, 100, 196, " on "));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 196, " on "));
modname = abobj_get_moduled_name(src_obj);
strcat(conn_string, (char*)modname);
XtFree(modname);
@ -995,7 +995,7 @@ connP_make_conn_string(
strcat(conn_string, unknown_str);
}
strcat(conn_string, catgets(Dtb_project_catd, 100, 196, " on "));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 196, " on "));
modname = abobj_get_moduled_name(target_obj);
strcat(conn_string, (char*)modname);
XtFree(modname);
@ -1003,7 +1003,7 @@ connP_make_conn_string(
break;
case AB_FUNC_USER_DEF:
strcat(conn_string, catgets(Dtb_project_catd, 100, 197, "Call function"));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 197, "Call function"));
strcat(conn_string, " \"");
{
ISTRING istr_val = action_info->func_value.func_name;
@ -1015,20 +1015,20 @@ connP_make_conn_string(
break;
case AB_FUNC_CODE_FRAG:
strcat(conn_string, catgets(Dtb_project_catd, 100, 198, "Execute Code"));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 198, "Execute Code"));
break;
case AB_FUNC_ON_ITEM_HELP:
strcat(conn_string, catgets(Dtb_project_catd, 100, 199, "Activate On-Item Help"));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 199, "Activate On-Item Help"));
break;
case AB_FUNC_HELP_VOLUME:
strcat(conn_string, catgets(Dtb_project_catd, 100, 200, "Access Help Volume"));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 200, "Access Help Volume"));
strcat(conn_string, " \"");
strcat(conn_string, obj_get_func_help_volume(action_obj)?
obj_get_func_help_volume(action_obj):"");
strcat(conn_string, "\" ");
strcat(conn_string, catgets(Dtb_project_catd, 100, 201, "at location"));
strcat(conn_string, CATGETS(Dtb_project_catd, 100, 201, "at location"));
strcat(conn_string, " \"");
strcat(conn_string, obj_get_func_help_location(action_obj)?
obj_get_func_help_location(action_obj):"");
@ -1522,85 +1522,85 @@ extern void
conn_strings_init(void)
{
unknown_str =
XtNewString(catgets(Dtb_project_catd, 100, 158, "??unknown??"));
XtNewString(CATGETS(Dtb_project_catd, 100, 158, "??unknown??"));
invalid_str =
XtNewString(catgets(Dtb_project_catd, 100, 159, "??invalid??"));
XtNewString(CATGETS(Dtb_project_catd, 100, 159, "??invalid??"));
when_labels[AB_WHEN_UNDEF] = unknown_str;
when_labels[AB_WHEN_ACTION1] =
XtNewString(catgets(Dtb_project_catd, 100, 160, "Action1 Activated"));
XtNewString(CATGETS(Dtb_project_catd, 100, 160, "Action1 Activated"));
when_labels[AB_WHEN_ACTION2] =
XtNewString(catgets(Dtb_project_catd, 100, 161, "Action2 Activated"));
XtNewString(CATGETS(Dtb_project_catd, 100, 161, "Action2 Activated"));
when_labels[AB_WHEN_ACTION3] =
XtNewString(catgets(Dtb_project_catd, 100, 162, "Action3 Activated"));
XtNewString(CATGETS(Dtb_project_catd, 100, 162, "Action3 Activated"));
when_labels[AB_WHEN_ACTIVATED] =
XtNewString(catgets(Dtb_project_catd, 100, 163, "Activated"));
XtNewString(CATGETS(Dtb_project_catd, 100, 163, "Activated"));
when_labels[AB_WHEN_AFTER_CREATED] =
XtNewString(catgets(Dtb_project_catd, 100, 164, "Created"));
XtNewString(CATGETS(Dtb_project_catd, 100, 164, "Created"));
when_labels[AB_WHEN_AFTER_RESIZED] =
XtNewString(catgets(Dtb_project_catd, 100, 165, "Resized"));
XtNewString(CATGETS(Dtb_project_catd, 100, 165, "Resized"));
when_labels[AB_WHEN_BEFORE_TEXT_CHANGED] =
XtNewString(catgets(Dtb_project_catd, 100, 166, "Before Text Changed"));
XtNewString(CATGETS(Dtb_project_catd, 100, 166, "Before Text Changed"));
when_labels[AB_WHEN_CANCEL] =
XtNewString(catgets(Dtb_project_catd, 100, 167, "Cancel Activated"));
XtNewString(CATGETS(Dtb_project_catd, 100, 167, "Cancel Activated"));
when_labels[AB_WHEN_DESTROYED] =
XtNewString(catgets(Dtb_project_catd, 100, 168, "Destroyed"));
XtNewString(CATGETS(Dtb_project_catd, 100, 168, "Destroyed"));
when_labels[AB_WHEN_DOUBLE_CLICKED_ON] =
XtNewString(catgets(Dtb_project_catd, 100, 169, "Double Clicked On"));
XtNewString(CATGETS(Dtb_project_catd, 100, 169, "Double Clicked On"));
when_labels[AB_WHEN_DRAGGED] =
XtNewString(catgets(Dtb_project_catd, 100, 170, "Dragged"));
XtNewString(CATGETS(Dtb_project_catd, 100, 170, "Dragged"));
when_labels[AB_WHEN_DRAGGED_FROM] =
XtNewString(catgets(Dtb_project_catd, 100, 171, "Dragged From"));
XtNewString(CATGETS(Dtb_project_catd, 100, 171, "Dragged From"));
when_labels[AB_WHEN_DROPPED_ON] =
XtNewString(catgets(Dtb_project_catd, 100, 172, "Dropped On"));
XtNewString(CATGETS(Dtb_project_catd, 100, 172, "Dropped On"));
when_labels[AB_WHEN_HIDDEN] =
XtNewString(catgets(Dtb_project_catd, 100, 173, "Hidden"));
XtNewString(CATGETS(Dtb_project_catd, 100, 173, "Hidden"));
when_labels[AB_WHEN_ITEM_SELECTED] =
XtNewString(catgets(Dtb_project_catd, 100, 174, "Item Selected"));
XtNewString(CATGETS(Dtb_project_catd, 100, 174, "Item Selected"));
when_labels[AB_WHEN_OK] =
XtNewString(catgets(Dtb_project_catd, 100, 175, "Ok Activated"));
XtNewString(CATGETS(Dtb_project_catd, 100, 175, "Ok Activated"));
when_labels[AB_WHEN_POPPED_DOWN] =
XtNewString(catgets(Dtb_project_catd, 100, 176, "Popped Down"));
XtNewString(CATGETS(Dtb_project_catd, 100, 176, "Popped Down"));
when_labels[AB_WHEN_POPPED_UP] =
XtNewString(catgets(Dtb_project_catd, 100, 177, "Popped Up"));
XtNewString(CATGETS(Dtb_project_catd, 100, 177, "Popped Up"));
when_labels[AB_WHEN_REPAINT_NEEDED] =
XtNewString(catgets(Dtb_project_catd, 100, 178, "Repaint Needed"));
XtNewString(CATGETS(Dtb_project_catd, 100, 178, "Repaint Needed"));
when_labels[AB_WHEN_SESSION_SAVE] =
XtNewString(catgets(Dtb_project_catd, 100, 179, "Session Save"));
XtNewString(CATGETS(Dtb_project_catd, 100, 179, "Session Save"));
when_labels[AB_WHEN_SESSION_RESTORE] =
XtNewString(catgets(Dtb_project_catd, 100, 180, "Session Restore"));
XtNewString(CATGETS(Dtb_project_catd, 100, 180, "Session Restore"));
when_labels[AB_WHEN_SHOWN] =
XtNewString(catgets(Dtb_project_catd, 100, 181, "Shown"));
XtNewString(CATGETS(Dtb_project_catd, 100, 181, "Shown"));
when_labels[AB_WHEN_TEXT_CHANGED] =
XtNewString(catgets(Dtb_project_catd, 100, 182, "Text Changed"));
XtNewString(CATGETS(Dtb_project_catd, 100, 182, "Text Changed"));
when_labels[AB_WHEN_TOGGLED] =
XtNewString(catgets(Dtb_project_catd, 100, 183, "Toggled"));
XtNewString(CATGETS(Dtb_project_catd, 100, 183, "Toggled"));
when_labels[AB_WHEN_TOOLTALK_DO_COMMAND] =
XtNewString(catgets(Dtb_project_catd, 100, 184, "ToolTalk Do Command"));
XtNewString(CATGETS(Dtb_project_catd, 100, 184, "ToolTalk Do Command"));
when_labels[AB_WHEN_TOOLTALK_GET_STATUS] =
XtNewString(catgets(Dtb_project_catd, 100, 185, "ToolTalk Get Status"));
XtNewString(CATGETS(Dtb_project_catd, 100, 185, "ToolTalk Get Status"));
when_labels[AB_WHEN_TOOLTALK_PAUSE_RESUME] =
XtNewString(catgets(Dtb_project_catd, 100, 186, "ToolTalk Pause/Resume"));
XtNewString(CATGETS(Dtb_project_catd, 100, 186, "ToolTalk Pause/Resume"));
when_labels[AB_WHEN_TOOLTALK_QUIT] =
XtNewString(catgets(Dtb_project_catd, 100, 187, "ToolTalk Quit"));
XtNewString(CATGETS(Dtb_project_catd, 100, 187, "ToolTalk Quit"));
when_labels[AB_WHEN_VALUE_CHANGED] =
XtNewString(catgets(Dtb_project_catd, 100, 188, "Value Changed"));
XtNewString(CATGETS(Dtb_project_catd, 100, 188, "Value Changed"));
when_labels[AB_WHEN_NUM_VALUES] = invalid_str;
stdact_labels[AB_STDACT_UNDEF] = unknown_str;
stdact_labels[AB_STDACT_DISABLE] =
XtNewString(catgets(Dtb_project_catd, 100, 189, "Disable"));
XtNewString(CATGETS(Dtb_project_catd, 100, 189, "Disable"));
stdact_labels[AB_STDACT_ENABLE] =
XtNewString(catgets(Dtb_project_catd, 100, 190, "Enable"));
XtNewString(CATGETS(Dtb_project_catd, 100, 190, "Enable"));
stdact_labels[AB_STDACT_HIDE] =
XtNewString(catgets(Dtb_project_catd, 100, 191, "Hide"));
XtNewString(CATGETS(Dtb_project_catd, 100, 191, "Hide"));
stdact_labels[AB_STDACT_SET_LABEL] =
XtNewString(catgets(Dtb_project_catd, 100, 192, "Set Label"));
XtNewString(CATGETS(Dtb_project_catd, 100, 192, "Set Label"));
stdact_labels[AB_STDACT_SET_TEXT] =
XtNewString(catgets(Dtb_project_catd, 100, 193, "Set Text"));
XtNewString(CATGETS(Dtb_project_catd, 100, 193, "Set Text"));
stdact_labels[AB_STDACT_SET_VALUE] =
XtNewString(catgets(Dtb_project_catd, 100, 194, "Set Value"));
XtNewString(CATGETS(Dtb_project_catd, 100, 194, "Set Value"));
stdact_labels[AB_STDACT_SHOW] =
XtNewString(catgets(Dtb_project_catd, 100, 195, "Show"));
XtNewString(CATGETS(Dtb_project_catd, 100, 195, "Show"));
stdact_labels[AB_BUILTIN_ACTION_NUM_VALUES] = invalid_str;
}

View file

@ -1601,7 +1601,7 @@ set_standard_action_type(
XtUnmanageChild(volume_rowcol);
hide_execute_code_win();
xm_label_str = XmStringCreateLocalized(catgets(Dtb_project_catd,
xm_label_str = XmStringCreateLocalized(CATGETS(Dtb_project_catd,
100, 54, ARGUMENT_LABEL));
XtVaSetValues(arg_label, XmNlabelString, xm_label_str, NULL);
XmStringFree(xm_label_str);
@ -1631,7 +1631,7 @@ set_call_function_action_type(
XtUnmanageChild(location_rowcol);
hide_execute_code_win();
xm_label_str = XmStringCreateLocalized(catgets(Dtb_project_catd,
xm_label_str = XmStringCreateLocalized(CATGETS(Dtb_project_catd,
100, 55, FUNCTION_LABEL));
XtVaSetValues(arg_label, XmNlabelString, xm_label_str, NULL);
XmStringFree(xm_label_str);
@ -1664,7 +1664,7 @@ set_execute_code_action_type(
XtUnmanageChild(volume_rowcol);
XtUnmanageChild(location_rowcol);
xm_label_str = XmStringCreateLocalized(catgets(Dtb_project_catd,
xm_label_str = XmStringCreateLocalized(CATGETS(Dtb_project_catd,
100, 56, CODE_LABEL));
XtVaSetValues(arg_label, XmNlabelString, xm_label_str, NULL);
XmStringFree(xm_label_str);

View file

@ -656,7 +656,7 @@ do_auto_apply(
{
if (changing_objects)
{
sprintf(buffer, catgets(Dtb_project_catd, 100, 31,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 31,
"Drag and drop properties for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
@ -666,7 +666,7 @@ do_auto_apply(
{
if(new_obj != (ABObj) NULL)
{
sprintf(buffer, catgets(Dtb_project_catd, 100, 32,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 32,
"Drag and drop properties for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
@ -674,7 +674,7 @@ do_auto_apply(
}
else
{
sprintf(buffer,catgets(Dtb_project_catd, 100, 33,
sprintf(buffer,CATGETS(Dtb_project_catd, 100, 33,
"Drag and drop properties for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\

View file

@ -53,7 +53,7 @@
#include <Dt/HelpQuickD.h>
#include <Dt/HelpDialog.h>
#include <Dt/Session.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include "palette_ui.h"
#include "about_box_ui.h"
#include "brws_ui.h"
@ -345,7 +345,7 @@ init_ab(ABInitProcInfo init_info)
if ((*file_name) == 0)
{
sprintf(errmsg_buf, catgets(Dtb_project_catd, 100, 2, "File not found: %s"), user_file_name);
sprintf(errmsg_buf, CATGETS(Dtb_project_catd, 100, 2, "File not found: %s"), user_file_name);
errmsg = errmsg_buf;
}
else
@ -379,7 +379,7 @@ init_ab(ABInitProcInfo init_info)
}
if ((ret < 0) && (answer != DTB_ANSWER_CANCEL))
{
sprintf(errmsg_buf, catgets(Dtb_project_catd, 100, 1, "Could not import module %s"), file_name);
sprintf(errmsg_buf, CATGETS(Dtb_project_catd, 100, 1, "Could not import module %s"), file_name);
errmsg = errmsg_buf;
}
}
@ -388,7 +388,7 @@ init_ab(ABInitProcInfo init_info)
STRING fmtStr = NULL, msg = NULL;
XmString xm_str = NULL;
fmtStr = XtNewString(catgets(Dtb_project_catd, 100, 103,
fmtStr = XtNewString(CATGETS(Dtb_project_catd, 100, 103,
"Cannot determine file type for %s.\nDo you want to load the file as a project or a module?"));
msg = (STRING) util_malloc(strlen(fmtStr) + strlen(file_name) + 1);
sprintf(msg, fmtStr, file_name);
@ -933,7 +933,7 @@ create_import_rbox(
NULL);
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 46,"Import Format:"));
CATGETS(Dtb_project_catd, 100, 46,"Import Format:"));
rbox_label = XtVaCreateManagedWidget("rbox_label",
xmLabelWidgetClass,
format_rbox,
@ -956,7 +956,7 @@ create_import_rbox(
XtManageChild(rbox);
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 47,"BIL"));
CATGETS(Dtb_project_catd, 100, 47,"BIL"));
BIL_item = XtVaCreateManagedWidget("bil_item",
xmToggleButtonWidgetClass,
rbox,
@ -970,7 +970,7 @@ create_import_rbox(
label_xmstring = NULL;
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 48,"UIL"));
CATGETS(Dtb_project_catd, 100, 48,"UIL"));
UIL_item = XtVaCreateManagedWidget("uil_item",
xmToggleButtonWidgetClass,
rbox,
@ -1010,7 +1010,7 @@ create_import_rbox(
NULL);
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 49,"Import By:"));
CATGETS(Dtb_project_catd, 100, 49,"Import By:"));
rbox_label = XtVaCreateManagedWidget("rbox_label",
xmLabelWidgetClass,
method_rbox,
@ -1029,7 +1029,7 @@ create_import_rbox(
XtManageChild(rbox);
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 50,"Copy"));
CATGETS(Dtb_project_catd, 100, 50,"Copy"));
Copy_item = XtVaCreateManagedWidget("Copy_item",
xmToggleButtonWidgetClass,
rbox,
@ -1043,7 +1043,7 @@ create_import_rbox(
label_xmstring = NULL;
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 51,"Reference"));
CATGETS(Dtb_project_catd, 100, 51,"Reference"));
Ref_item = XtVaCreateManagedWidget("Ref_item",
xmToggleButtonWidgetClass,
rbox,
@ -1293,7 +1293,7 @@ main(int argc, char **argv)
/*
* Open the standard message catalog for the project.
*/
Dtb_project_catd = catopen(DTB_PROJECT_CATALOG, NL_CAT_LOCALE);
Dtb_project_catd = CATOPEN(DTB_PROJECT_CATALOG, NL_CAT_LOCALE);
if (Dtb_project_catd == (nl_catd)-1)
{
fprintf(stderr, "WARNING: Could not open message catalog: %s. Messages will be defaults.\n",
@ -1501,8 +1501,8 @@ main(int argc, char **argv)
XtVaSetValues(dtb_palette_ab_palette_main.ab_palette_main,
XmNallowShellResize, True,
XmNtitle, XtNewString(catgets(Dtb_project_catd, 6, 1, "Application Builder")),
XmNiconName, XtNewString(catgets(Dtb_project_catd, 6, 135, "dtbuilder")),
XmNtitle, XtNewString(CATGETS(Dtb_project_catd, 6, 1, "Application Builder")),
XmNiconName, XtNewString(CATGETS(Dtb_project_catd, 6, 135, "dtbuilder")),
XmNinitialState, NormalState,
XmNmwmDecorations, MWM_DECOR_ALL | MWM_DECOR_RESIZEH,
XmNmwmFunctions, MWM_FUNC_ALL | MWM_FUNC_RESIZE,
@ -2018,7 +2018,7 @@ proj_show_open_chooserCB(
NULL);
/* Set up help info for shared chooser */
tmp_txt = catgets(Dtb_project_catd,110,1,"Use the File Selection Dialog to specify which file should be used for saving and loading modules or projects");
tmp_txt = CATGETS(Dtb_project_catd,110,1,"Use the File Selection Dialog to specify which file should be used for saving and loading modules or projects");
chooser_help_data.help_text = XtMalloc(strlen(tmp_txt)+1);
strcpy(chooser_help_data.help_text,tmp_txt);
}
@ -2034,7 +2034,7 @@ proj_show_open_chooserCB(
info->child = (Widget) NULL;
info->chooser_type = AB_OPEN_PROJ_CHOOSER;
ok_label = XmStringCreateLocalized(catgets(Dtb_project_catd, 100, 233, "Open"));
ok_label = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 100, 233, "Open"));
XtVaSetValues(AB_generic_chooser,
XmNautoUnmanage, FALSE,
XtVaTypedArg, XmNpattern,
@ -2047,7 +2047,7 @@ proj_show_open_chooserCB(
NULL);
XmStringFree(ok_label);
title = XtNewString(catgets(Dtb_project_catd, 100, 234, "Open Project"));
title = XtNewString(CATGETS(Dtb_project_catd, 100, 234, "Open Project"));
XtVaSetValues(XtParent(AB_generic_chooser),
XmNtitle, title,
XmNpopdownCallback, &popdown_callback,
@ -2240,7 +2240,7 @@ proj_show_import_chooserCB(
info->ImportAsBil = TRUE;
info->ImportByCopy = TRUE;
ok_label = XmStringCreateLocalized(catgets(Dtb_project_catd, 100, 235, "Import"));
ok_label = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 100, 235, "Import"));
XtVaSetValues(AB_generic_chooser,
XmNautoUnmanage, FALSE,
XtVaTypedArg, XmNpattern,
@ -2252,7 +2252,7 @@ proj_show_import_chooserCB(
NULL);
XmStringFree(ok_label);
title = XtNewString(catgets(Dtb_project_catd, 100, 236, "Import File"));
title = XtNewString(CATGETS(Dtb_project_catd, 100, 236, "Import File"));
XtVaSetValues(XtParent(AB_generic_chooser),
XmNtitle, title,
XmNpopdownCallback, &popdown_callback,

View file

@ -42,7 +42,7 @@
#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#define DTB_PROJECT_CATALOG "dtbuilder"
/* Handle for standard message catalog for the project */
extern nl_catd Dtb_project_catd;

View file

@ -524,37 +524,37 @@ do_auto_apply(
if (changing_objects)
{
sprintf(buffer, catgets(Dtb_project_catd, 100, 31,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 31,
"Help properties for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
Load operation for \"%s\"."),old_name, new_name);
help_data->help_text = catgets(Dtb_project_catd, 100, 93,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 93,
"Click Apply Changes to apply the changes to the\ncurrent object and load the selected object.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before loading\nthe selected object.");
}
else
{
if(new_obj != (ABObj) NULL)
{
sprintf(buffer, catgets(Dtb_project_catd, 100, 32,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 32,
"Help properties for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
Close operation."), old_name);
help_data->help_text = catgets(Dtb_project_catd, 100, 94,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 94,
"Click Apply Changes to apply the changes to the\ncurrent object and close the Help Editor.\n\nClick Cancel if you don't want to apply the\nchanges to the current object and want the Help\nEditor to remain displayed. You can then click\nReset to undo the changes before closing the\nHelp Editor.");
}
else
{
sprintf(buffer,catgets(Dtb_project_catd, 100, 33,
sprintf(buffer,CATGETS(Dtb_project_catd, 100, 33,
"Help properties for \"%s\"\n\
have been modified but not Applied.\n\n\
You can Apply the Changes or Cancel the\n\
'Change Object-Type' operation."), old_name);
help_data->help_text = catgets(Dtb_project_catd, 100, 95,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 95,
"Click Apply Changes to apply the changes to the\ncurrent object and display the new object type.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before changing\nto a different object type.");
}
}

View file

@ -1164,23 +1164,23 @@ set_msg_textp_label(
{
case AB_MSG_QUESTION:
ui_set_label_string(mes->msg_textp_label,
catgets(Dtb_project_catd, 100, 210, "Question Message"));
CATGETS(Dtb_project_catd, 100, 210, "Question Message"));
break;
case AB_MSG_ERROR:
ui_set_label_string(mes->msg_textp_label,
catgets(Dtb_project_catd, 100, 211, "Error Message"));
CATGETS(Dtb_project_catd, 100, 211, "Error Message"));
break;
case AB_MSG_WARNING:
ui_set_label_string(mes->msg_textp_label,
catgets(Dtb_project_catd, 100, 212, "Warning Message"));
CATGETS(Dtb_project_catd, 100, 212, "Warning Message"));
break;
case AB_MSG_WORKING:
ui_set_label_string(mes->msg_textp_label,
catgets(Dtb_project_catd, 100, 213, "Working Message"));
CATGETS(Dtb_project_catd, 100, 213, "Working Message"));
break;
case AB_MSG_INFORMATION:
ui_set_label_string(mes->msg_textp_label,
catgets(Dtb_project_catd, 100, 214, "Information Message"));
CATGETS(Dtb_project_catd, 100, 214, "Information Message"));
break;
default:
break;
@ -2361,31 +2361,31 @@ msgEdP_do_auto_apply(
if (ChangingObjects)
{
sprintf(buffer, catgets(Dtb_project_catd, 100, 36,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 36,
"Properties for \"%s\" have been modified but not\
Applied.\nApply Changes or Cancel Load operation\
for \"%s\"."), old_name, new_name);
help_data->help_text = catgets(Dtb_project_catd, 100, 98,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 98,
"Click Apply Changes to apply the changes to the\ncurrent message and load the selected message.\n\nClick Cancel if you don't want to apply the\nchanges to the current message. You can then\nclick Reset to undo the changes before loading\nthe selected message.");
}
else
{
if (new_obj != (ABObj) NULL)
{
sprintf(buffer, catgets(Dtb_project_catd, 100, 35,
sprintf(buffer, CATGETS(Dtb_project_catd, 100, 35,
"Properties for \"%s\" have been modified but not\
Applied.\nApply Changes or Cancel Close operation."),
old_name);
help_data->help_text = catgets(Dtb_project_catd, 100, 99,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 99,
"Click Apply Changes to apply the changes to the\ncurrent message and close the Message Editor.\n\nClick Cancel if you don't want to apply the\nchanges to the current message and want the\nMessage Editor to remain displayed. You can\nthen click Reset to undo the changes before\nclosing the Message Editor.");
}
else
{
sprintf(buffer,catgets(Dtb_project_catd, 100, 39,
sprintf(buffer,CATGETS(Dtb_project_catd, 100, 39,
"Properties for \"%s\" have been modified but not\
Applied.\nApply Changes or Cancel Add-Message\
operation."), old_name);
help_data->help_text = catgets(Dtb_project_catd, 100, 100,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 100,
"Click Apply Changes to apply the changes to the\ncurrent message and add a new message to the\nmodule.\n\nClick Cancel if you don't want to apply the\nchanges to the current message. You can then\nclick Reset to undo the changes before adding\na new message.");
}
}
@ -2553,21 +2553,21 @@ static void
msgEdP_strings_init(void)
{
msgEd_strings[MSG_ED_RETRY_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 202, "Retry"));
XtNewString(CATGETS(Dtb_project_catd, 100, 202, "Retry"));
msgEd_strings[MSG_ED_OK_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 203, "OK"));
XtNewString(CATGETS(Dtb_project_catd, 100, 203, "OK"));
msgEd_strings[MSG_ED_CLOSE_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 204, "Close"));
XtNewString(CATGETS(Dtb_project_catd, 100, 204, "Close"));
msgEd_strings[MSG_ED_STOP_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 205, "Stop"));
XtNewString(CATGETS(Dtb_project_catd, 100, 205, "Stop"));
msgEd_strings[MSG_ED_YES_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 206, "Yes"));
XtNewString(CATGETS(Dtb_project_catd, 100, 206, "Yes"));
msgEd_strings[MSG_ED_NO_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 207, "No"));
XtNewString(CATGETS(Dtb_project_catd, 100, 207, "No"));
msgEd_strings[MSG_ED_CONT_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 208, "Continue"));
XtNewString(CATGETS(Dtb_project_catd, 100, 208, "Continue"));
msgEd_strings[MSG_ED_NO_MODULES_STR] =
XtNewString(catgets(Dtb_project_catd, 100, 209, "No Modules"));
XtNewString(CATGETS(Dtb_project_catd, 100, 209, "No Modules"));
}
/*** DTB_USER_CODE_END

View file

@ -191,12 +191,12 @@ button_initialize(
if (obj_get_subtype(obj) == AB_BUT_MENU)
{
obj_set_unique_name(obj, "menubutton");
obj_set_label(obj, catgets(Dtb_project_catd, 6, 66, "Menu Button"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 6, 66, "Menu Button"));
}
else /* Push or Drawn */
{
obj_set_unique_name(obj, "button");
obj_set_label(obj, catgets(Dtb_project_catd, 6, 65, "Button"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 6, 65, "Button"));
}
obj_set_is_initially_visible(obj, True);
obj_set_is_initially_active(obj, True);

View file

@ -204,16 +204,16 @@ choice_initialize(
{
case AB_CHOICE_NONEXCLUSIVE:
obj_set_unique_name(obj, "checkbox");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 253, "Choice:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 253, "Choice:"));
break;
case AB_CHOICE_OPTION_MENU:
obj_set_unique_name(obj, "optionmenu");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 254, "Options:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 254, "Options:"));
break;
case AB_CHOICE_EXCLUSIVE:
default:
obj_set_unique_name(obj, "radiobox");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 253, "Choice:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 253, "Choice:"));
break;
}
@ -228,8 +228,8 @@ choice_initialize(
obj_set_num_columns(obj, 1);
/* Add initial items to Choice */
items[0] = catgets(Dtb_project_catd, 6, 70, "itemA");
items[1] = catgets(Dtb_project_catd, 6, 71, "itemB");
items[0] = CATGETS(Dtb_project_catd, 6, 70, "itemA");
items[1] = CATGETS(Dtb_project_catd, 6, 71, "itemB");
for (i=0; i < XtNumber(items); i++)
{
iobj = obj_create(AB_TYPE_ITEM, NULL);

View file

@ -184,13 +184,13 @@ combo_box_initialize(
obj_set_unique_name(obj, "combobox");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 255, "ComboBox:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 255, "ComboBox:"));
obj_set_label_position(obj, AB_CP_WEST);
obj_set_height(obj, -1);
/* Add initial items to list */
items[0] = catgets(Dtb_project_catd, 6, 70, "itemA");
items[1] = catgets(Dtb_project_catd, 6, 71, "itemB");
items[0] = CATGETS(Dtb_project_catd, 6, 70, "itemA");
items[1] = CATGETS(Dtb_project_catd, 6, 71, "itemB");
for (i=0; i < XtNumber(items); i++)
{
iobj = obj_create(AB_TYPE_ITEM, NULL);

View file

@ -907,7 +907,7 @@ locate_obj_parent(
(nobj = trav_next(&trav)) != NULL; )
if (obj_is_menubar(nobj))
{
i18n_msg = catgets(Dtb_project_catd, 100, 11,
i18n_msg = CATGETS(Dtb_project_catd, 100, 11,
"There is already a Menubar for this window.");
/* If we have an old buffer lying around, free it */
@ -924,7 +924,7 @@ locate_obj_parent(
}
if (obj_parent == NULL)
{
i18n_msg = catgets(Dtb_project_catd, 100, 15,
i18n_msg = CATGETS(Dtb_project_catd, 100, 15,
"Menubars must be dropped on a Main Window.");
/* If we have an old buffer lying around, free it */
@ -945,7 +945,7 @@ locate_obj_parent(
obj_is_window(obj_get_root(obj_parent)) &&
!obj_is_file_chooser(obj_parent))))
{
i18n_msg = catgets(Dtb_project_catd, 100, 12,
i18n_msg = CATGETS(Dtb_project_catd, 100, 12,
"Containers must be dropped on\na Main Window or Custom Dialog.");
/* If we have an old buffer lying around, free it */
if (errmsg != (STRING) NULL)
@ -1177,7 +1177,7 @@ locate_obj_parent(
{
if (obj_is_control_panel(obj))
{
i18n_msg = catgets(Dtb_project_catd, 100, 59,
i18n_msg = CATGETS(Dtb_project_catd, 100, 59,
"Control Panes must be dropped on a Main Window,\nCustom Dialog, or another pane.");
/* If we have an old buffer lying around, free it */
@ -1212,7 +1212,7 @@ locate_obj_parent(
(!(obj_is_container(obj_parent) &&
!obj_is_menubar(obj_parent))))
{
i18n_msg = catgets(Dtb_project_catd, 100, 13,
i18n_msg = CATGETS(Dtb_project_catd, 100, 13,
"Panes must be dropped on a Main Window,\nCustom Dialog, or another pane.");
/* If we have an old buffer lying around, free it */
@ -1232,7 +1232,7 @@ locate_obj_parent(
(!obj_is_control_panel(obj_get_root(obj_parent)) &&
!obj_is_group(obj_get_root(obj_parent))))
{
i18n_msg = catgets(Dtb_project_catd, 100, 14,
i18n_msg = CATGETS(Dtb_project_catd, 100, 14,
"Controls must be dropped on\na Control Pane or Group.");
/* If we have an old buffer lying around, free it */
if (errmsg != (STRING) NULL)
@ -1246,7 +1246,7 @@ locate_obj_parent(
}
else
{
i18n_msg = catgets(Dtb_project_catd, 100, 16,
i18n_msg = CATGETS(Dtb_project_catd, 100, 16,
"Unknown object type.");
/* If we have an old buffer lying around, free it */

View file

@ -202,7 +202,7 @@ custdlg_initialize(
}
obj_set_unique_name(obj, "dialog");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 256, "Custom Dialog"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 256, "Custom Dialog"));
obj_set_bg_color(obj, "white");
obj_set_is_initially_visible(obj, False);
obj_set_is_initially_active(obj, True);
@ -814,7 +814,7 @@ custdlg_create_area(
obj_set_x(label, 1);
obj_set_y(label, 1);
pal_initialize_obj(label);
obj_set_label(label, catgets(Dtb_project_catd, 100, 264, "footer message"));
obj_set_label(label, CATGETS(Dtb_project_catd, 100, 264, "footer message"));
obj_set_label_alignment(label, AB_ALIGN_LEFT);
obj_set_unique_name(label,
ab_ident_from_name_and_label(obj_get_name(obj), "label"));
@ -854,9 +854,9 @@ custdlg_create_buttons(
int startpos, endpos;
int i;
button_labels[0] = catgets(Dtb_project_catd, 100, 265, "Button1");
button_labels[1] = catgets(Dtb_project_catd, 100, 266, "Button2");
button_labels[2] = catgets(Dtb_project_catd, 100, 267, "Button3");
button_labels[0] = CATGETS(Dtb_project_catd, 100, 265, "Button1");
button_labels[1] = CATGETS(Dtb_project_catd, 100, 266, "Button2");
button_labels[2] = CATGETS(Dtb_project_catd, 100, 267, "Button3");
endpos = 0;
for(i=0; i < XtNumber(button_names); i++)

View file

@ -180,8 +180,8 @@ fchooser_initialize(
name = obj_get_unique_name(obj, "file_seln", 5000, nameBuf);
obj_set_name(obj, name);
obj_set_label(obj, catgets(Dtb_project_catd, 100, 257, "File Selection Dialog"));
obj_set_ok_label(obj, catgets(Dtb_project_catd, 100, 228, "Ok"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 257, "File Selection Dialog"));
obj_set_ok_label(obj, CATGETS(Dtb_project_catd, 100, 228, "Ok"));
obj_set_is_initially_visible(obj, False);
obj_set_is_initially_active(obj, True);

View file

@ -162,7 +162,7 @@ label_initialize(
{
obj_set_unique_name(obj, "label");
obj_set_label(obj, catgets(Dtb_project_catd, 6, 69, "Label"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 6, 69, "Label"));
obj_set_is_initially_visible(obj, True);
obj_set_is_initially_active(obj, True);

View file

@ -198,8 +198,8 @@ list_initialize(
obj_set_is_initially_active(obj, True);
/* Add initial items to list */
items[0] = catgets(Dtb_project_catd, 6, 70, "itemA");
items[1] = catgets(Dtb_project_catd, 6, 71, "itemB");
items[0] = CATGETS(Dtb_project_catd, 6, 70, "itemA");
items[1] = CATGETS(Dtb_project_catd, 6, 71, "itemB");
for (i=0; i < XtNumber(items); i++)
{
iobj = obj_create(AB_TYPE_ITEM, NULL);

View file

@ -171,7 +171,7 @@ mainwin_initialize(
obj_set_unique_name(obj, "mainwindow");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 258, "Main Window"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 258, "Main Window"));
obj_set_bg_color(obj, "white");
obj_set_is_initially_visible(obj, True);
obj_set_is_initially_iconic(obj, False);
@ -798,7 +798,7 @@ mainwin_create_area(
obj_set_x(label, 1);
obj_set_y(label, 1);
pal_initialize_obj(label);
obj_set_label(label, catgets(Dtb_project_catd, 100, 264, "footer message"));
obj_set_label(label, CATGETS(Dtb_project_catd, 100, 264, "footer message"));
obj_set_label_alignment(label, AB_ALIGN_LEFT);
obj_set_unique_name(label,
ab_ident_from_name_and_label(obj_get_name(obj), "label"));

View file

@ -217,8 +217,8 @@ menu_initialize(
obj_set_is_initially_active(obj, True);
/* Add initial items to Choice */
items[0] = catgets(Dtb_project_catd, 6, 136, "Item1");
items[1] = catgets(Dtb_project_catd, 100, 259, "Item2");
items[0] = CATGETS(Dtb_project_catd, 6, 136, "Item1");
items[1] = CATGETS(Dtb_project_catd, 100, 259, "Item2");
for (i=0; i < XtNumber(items); i++)
{
iobj = obj_create(AB_TYPE_ITEM, NULL);

View file

@ -180,9 +180,9 @@ menubar_initialize(
obj_set_is_initially_active(obj, True);
/* Add initial cascades to Choice */
cascades[0] = catgets(Dtb_project_catd, 6, 20, "File");
cascades[1] = catgets(Dtb_project_catd, 6, 21, "Edit");
cascades[2] = catgets(Dtb_project_catd, 6, 25, "Help");
cascades[0] = CATGETS(Dtb_project_catd, 6, 20, "File");
cascades[1] = CATGETS(Dtb_project_catd, 6, 21, "Edit");
cascades[2] = CATGETS(Dtb_project_catd, 6, 25, "Help");
for (i=0; i < XtNumber(cascades); i++)
{
iobj = obj_create(AB_TYPE_ITEM, NULL);

View file

@ -178,12 +178,12 @@ scale_initialize(
if (obj_get_read_only(obj) == False)
{
obj_set_unique_name(obj, "scale");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 260, "Scale:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 260, "Scale:"));
}
else /* Gauge */
{
obj_set_unique_name(obj, "gauge");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 261, "Gauge:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 261, "Gauge:"));
}
obj_set_label_position(obj, AB_CP_NORTH);

View file

@ -158,7 +158,7 @@ separator_initialize(
{
obj_set_unique_name(obj, "separator");
obj_set_label(obj, catgets(Dtb_project_catd, 22, 46, "Separator"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 22, 46, "Separator"));
obj_set_line_style(obj, AB_LINE_ETCHED_IN);
obj_set_is_initially_visible(obj, True);
obj_set_is_initially_active(obj, True);

View file

@ -187,7 +187,7 @@ spinbox_initialize(
{
obj_set_unique_name(obj, "spinbox");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 262, "SpinBox:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 262, "SpinBox:"));
obj_set_label_position(obj, AB_CP_NORTH);
obj_set_width(obj, spinbox_init_width);
obj_set_text_type(obj, AB_TEXT_NUMERIC);

View file

@ -164,7 +164,7 @@ textf_initialize(
obj_set_unique_name(obj, "textfield");
obj_set_label(obj, catgets(Dtb_project_catd, 100, 263, "TextField:"));
obj_set_label(obj, CATGETS(Dtb_project_catd, 100, 263, "TextField:"));
obj_set_is_initially_visible(obj, True);
obj_set_is_initially_active(obj, True);
obj_set_num_columns(obj, 8);

View file

@ -1119,20 +1119,20 @@ proj_open_proj_okCB(
}
else if (!util_file_exists(proj_filename))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 8,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 8,
"The file %s does not exist."), proj_filename);
util_printf_err(Buf);
}
else if (!util_file_is_regular_file(proj_filename))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 69,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 69,
"Cannot open %s.\n%s is not a regular file."),
proj_filename, proj_filename);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 89,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 89,
"The file you specified is a directory or\nanother special file.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -1199,20 +1199,20 @@ proj_import_okCB(
/* If the file specified does not exist, keep up the file
* chooser so that the user can specify another file.
*/
sprintf(Buf, catgets(Dtb_project_catd, 100, 8,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 8,
"The file %s does not exist."), file_name);
util_printf_err(Buf);
}
else if (!util_file_is_regular_file(file_name))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 70,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 70,
"Cannot import %s.\n%s is not a regular file."),
file_name, file_name);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 89,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 89,
"The file you specified is a directory or\nanother special file.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -1248,7 +1248,7 @@ proj_import_okCB(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 9,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 9,
"%s does not have read permission."),
file_name);
util_printf_err(Buf);

View file

@ -165,7 +165,7 @@ projP_show_save_as_bil_chooser(
/* Pass along the client_data to the okCallback */
ok_callback[0].closure = (XtPointer) obj;
ok_label = XmStringCreateLocalized(catgets(Dtb_project_catd, 100, 237, "Save"));
ok_label = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 100, 237, "Save"));
XtVaSetValues(AB_generic_chooser,
XmNautoUnmanage, FALSE,
XtVaTypedArg, XmNpattern,
@ -177,7 +177,7 @@ projP_show_save_as_bil_chooser(
NULL);
XmStringFree(ok_label);
title = XtNewString(catgets(Dtb_project_catd, 100, 242, "Save BIL File"));
title = XtNewString(CATGETS(Dtb_project_catd, 100, 242, "Save BIL File"));
XtVaSetValues(XtParent(AB_generic_chooser),
XmNtitle, title,
XmNpopdownCallback, &popdown_callback,
@ -236,13 +236,13 @@ save_as_bil_okCB(
}
if (util_file_is_directory(fullpath))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 73,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 73,
"Cannot save the module to %s.\n%s is a directory not a file."), fullpath, fullpath);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 87,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 87,
"The file name you specified for saving the\nmodule is a directory. Type another file name\nfor the module.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -274,13 +274,13 @@ save_as_bil_okCB(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 76,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 76,
"Cannot save module to \"%s\".\n\"%s\" does not have write permission."), mod_dir, mod_dir);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 88,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 88,
"The directory you specified for saving is not\nwritable by you. Therefore, the module cannot\nbe saved. Try saving the module to another\ndirectory.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -342,10 +342,10 @@ projP_save_export_bil(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 7,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 7,
"%s is a read-only file."), old_filename);
util_set_help_data(catgets(Dtb_project_catd, 100, 81,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 81,
"The changes that were made cannot be saved\nbecause you do not have permission to write\nto the file."), NULL, NULL);
util_printf_err(Buf);
}

View file

@ -266,9 +266,9 @@ projP_save_mod_proc(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 10,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 10,
"The file %s is a read-only file.\nCannot save edits."), file);
util_set_help_data(catgets(Dtb_project_catd, 100, 81,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 81,
"The changes that were made cannot be saved\nbecause you do not have permission to write\nto the file."),
NULL, NULL);
util_printf_err(Buf);
@ -276,9 +276,9 @@ projP_save_mod_proc(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 76,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 76,
"Cannot save module to \"%s\".\n\"%s\" does not have write permission."), mod_dir, mod_dir);
sprintf(help_buf, catgets(Dtb_project_catd, 100, 82,
sprintf(help_buf, CATGETS(Dtb_project_catd, 100, 82,
"You do not have permission to write to the\ndirectory \"%s\"."), mod_dir);
util_set_help_data(help_buf, NULL, NULL);
util_printf_err(Buf);
@ -634,7 +634,7 @@ projP_remove_proc(
/* The first thing in the message is
* some general text.
*/
init_msg = catgets(Dtb_project_catd, 100, 68,
init_msg = CATGETS(Dtb_project_catd, 100, 68,
"The following module(s) have unsaved edits. Removing the\nmodule(s) from the project will discard your changes.\nPlease confirm.");
/* If we have an old buffer lying around, free it */

View file

@ -439,7 +439,7 @@ proj_show_save_proj_as_chooser(
info->child = (Widget) encap_cbox;
info->chooser_type = AB_SAVE_PROJ_AS_CHOOSER;
ok_label = XmStringCreateLocalized(catgets(Dtb_project_catd, 100, 237, "Save"));
ok_label = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 100, 237, "Save"));
XtVaSetValues(AB_generic_chooser,
XmNautoUnmanage, FALSE,
XtVaTypedArg, XmNpattern,
@ -451,7 +451,7 @@ proj_show_save_proj_as_chooser(
NULL);
XmStringFree(ok_label);
title = XtNewString(catgets(Dtb_project_catd, 100, 238, "Save Project"));
title = XtNewString(CATGETS(Dtb_project_catd, 100, 238, "Save Project"));
XtVaSetValues(XtParent(AB_generic_chooser),
XmNtitle, title,
XmNpopdownCallback, &popdown_callback,
@ -537,14 +537,14 @@ save_proj_as_okCB(
}
if (util_file_is_directory(proj_filename))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 71,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 71,
"Cannot save the project to %s.\n%s is a directory not a file."), proj_filename, proj_filename);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 85,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 85,
"The file name you specified for saving the project\nis a directory. Type another file name for the project.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -591,16 +591,16 @@ save_proj_as_okCB(
XtVaGetValues(widget, XmNuserData, &chooserInfo, NULL);
if (chooserInfo->writeEncapsulated)
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 77,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 77,
"Cannot save encapsulated project to \"%s\".\n\"%s\" does not have write permission."), proj_dir, proj_dir);
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 74,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 74,
"Cannot save project to \"%s\".\n\"%s\" does not have write permission."), proj_dir, proj_dir);
}
util_set_help_data(catgets(Dtb_project_catd, 100, 83,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 83,
"The directory you specified for saving is not\nwritable by you. Therefore, the project cannot\nbe saved. Try saving the project to another directory."), NULL, NULL);
util_printf_err(Buf);
@ -695,15 +695,15 @@ save_proj_as_bip(
new_file, MAXPATHLEN);
new_name_len = strlen(new_file);
old_name_len = strlen(old_file);
msg_len = strlen(catgets(Dtb_project_catd, 100, 101, MSG));
msg_len = strlen(CATGETS(Dtb_project_catd, 100, 101, MSG));
msg = (STRING)util_malloc((2*old_name_len)+new_name_len+msg_len +1);
help_data.help_text = catgets(Dtb_project_catd, 100, 102, HLP_MSG);
help_data.help_text = CATGETS(Dtb_project_catd, 100, 102, HLP_MSG);
help_data.help_volume = NULL;
help_data.help_locationID = NULL;
if (msg)
{
sprintf(msg, catgets(Dtb_project_catd, 100, 101, MSG),
sprintf(msg, CATGETS(Dtb_project_catd, 100, 101, MSG),
new_file, old_file, old_file);
xm_msg = XmStringCreateLocalized(msg);
answer = dtb_show_modal_message(AB_generic_chooser,
@ -839,17 +839,17 @@ proj_show_name_dlg(
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = XtNewString(catgets(Dtb_project_catd, 100, 41,
help_data->help_text = XtNewString(CATGETS(Dtb_project_catd, 100, 41,
"Type in a name for the new module. A valid name\ncan consist of letters, underscore (_), and digits,\nhowever the name must begin with either a letter or\nan underscore."));
help_data->help_volume = "";
help_data->help_locationID = "";
dialog_title = XtNewString(catgets(Dtb_project_catd, 100, 40,
dialog_title = XtNewString(CATGETS(Dtb_project_catd, 100, 40,
"Application Builder"));
textf_lbl = XtNewString(catgets(Dtb_project_catd, 100, 111, "Module Name:"));
btn1_lbl = XtNewString(catgets(Dtb_project_catd, 100, 108, "Apply"));
btn2_lbl = XtNewString(catgets(Dtb_project_catd, 100, 109, "Cancel"));
btn3_lbl = XtNewString(catgets(Dtb_project_catd, 100, 110, "Help"));
textf_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 111, "Module Name:"));
btn1_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 108, "Apply"));
btn2_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 109, "Cancel"));
btn3_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 110, "Help"));
answer = ui_popup_modal_prompt( parent,
dialog_title, textf_lbl, init_name, btn1_lbl, btn2_lbl,
@ -949,7 +949,7 @@ proj_show_export_bil_chooser(
/* Pass along the client_data to the okCallback */
ok_callback[0].closure = (XtPointer) obj;
ok_label = XmStringCreateLocalized(catgets(Dtb_project_catd, 100, 243, "Export"));
ok_label = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 100, 243, "Export"));
XtVaSetValues(AB_generic_chooser,
XmNautoUnmanage, FALSE,
XtVaTypedArg, XmNpattern,
@ -961,7 +961,7 @@ proj_show_export_bil_chooser(
NULL);
XmStringFree(ok_label);
title = XtNewString(catgets(Dtb_project_catd, 100, 239, "Export Module"));
title = XtNewString(CATGETS(Dtb_project_catd, 100, 239, "Export Module"));
XtVaSetValues(XtParent(AB_generic_chooser),
XmNtitle, title,
XmNpopdownCallback, &popdown_callback,
@ -1013,13 +1013,13 @@ export_bil_okCB(
}
if (util_file_is_directory(fullpath))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 72,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 72,
"Cannot export the module to %s.\n%s is a directory not a file."), fullpath, fullpath);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 84,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 84,
"The file name you specified for exporting the\nmodule is a directory. Type another file name\nfor the module.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -1075,13 +1075,13 @@ export_bil_okCB(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 78,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 78,
"Cannot export module to \"%s\".\n\"%s\" does not have write permission."), mod_dir, mod_dir);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_error_msg_initialize(&dtb_proj_error_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 86,
help_data->help_text = CATGETS(Dtb_project_catd, 100, 86,
"The directory you specified for exporting is not\nwritable by you. Therefore, the module cannot be\nexported. Try exporting the module to another\ndirectory.");
help_data->help_volume = "";
help_data->help_locationID = "";
@ -1123,22 +1123,22 @@ proj_overwrite_existing_file(
{
if (!encapsulating)
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 3,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 3,
"File \"%s\" exists and\nis a read-only file. You can save your\nwork by saving to a different filename."), file);
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 53,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 53,
"File \"%s\" exists and\nis a read-only file. To save the encapsulated file,\nyou must save it to a different file name."), file);
}
util_set_help_data(catgets(Dtb_project_catd, 100, 79,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 79,
"The file name you specified for saving already exists\nand cannot be overwritten, since it is not writable by\nyou. Your edits can be saved if you type a different\nfile name."), NULL, NULL);
util_error(Buf);
return (-1);
}
sprintf(Buf, catgets(Dtb_project_catd, 100, 4,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 4,
"File \"%s\" exists. You can:"), file);
xm_buf = XmStringCreateLocalized(Buf);
@ -1198,7 +1198,7 @@ proj_save_needed(
*proj_dir = 0;
if (!proj_is_exploded(project))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 5,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 5,
"Project %s was loaded from an encapsulated file (%s).\n\
It will be saved as a normal project, with one file per module."),
projName,
@ -1246,10 +1246,10 @@ proj_save_needed(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 74,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 74,
"Cannot save project to \"%s\".\n\"%s\" does not have write permission."), proj_dir, proj_dir);
util_set_help_data(catgets(Dtb_project_catd, 100, 83,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 83,
"The directory you specified for saving is not\nwritable by you. Therefore, the project cannot\nbe saved. Try saving the project to another directory."), NULL, NULL);
util_printf_err(Buf);
@ -1376,10 +1376,10 @@ proj_save_encapsulated(
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 77,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 77,
"Cannot save encapsulated project to \"%s\".\n\"%s\" does not have write permission."), proj_dir, proj_dir);
util_set_help_data(catgets(Dtb_project_catd, 100, 83,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 83,
"The directory you specified for saving is not\nwritable by you. Therefore, the project cannot\nbe saved. Try saving the project to another directory."), NULL, NULL);
util_printf_err(Buf);
@ -1851,18 +1851,18 @@ proj_name_proj(void)
STRING btn3_lbl = NULL;
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = XtNewString(catgets(Dtb_project_catd, 100, 42,
help_data->help_text = XtNewString(CATGETS(Dtb_project_catd, 100, 42,
"Type in a name for the new project. A valid\nname can consist of letters, underscore (_),\nand digits, however the name must begin with\neither a letter or an underscore."));
help_data->help_volume = "";
help_data->help_locationID = "";
dialog_title = XtNewString(catgets(Dtb_project_catd, 100, 40,
dialog_title = XtNewString(CATGETS(Dtb_project_catd, 100, 40,
"Application Builder"));
textf_lbl = XtNewString(catgets(Dtb_project_catd, 100, 107, "Project Name:"));
textf_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 107, "Project Name:"));
def_name = XtNewString("project");
btn1_lbl = XtNewString(catgets(Dtb_project_catd, 100, 108, "Apply"));
btn2_lbl = XtNewString(catgets(Dtb_project_catd, 100, 109, "Cancel"));
btn3_lbl = XtNewString(catgets(Dtb_project_catd, 100, 110, "Help"));
btn1_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 108, "Apply"));
btn2_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 109, "Cancel"));
btn3_lbl = XtNewString(CATGETS(Dtb_project_catd, 100, 110, "Help"));
/* Popup the name dialog for the project */
answer = ui_popup_modal_prompt( dtb_get_toplevel_widget(),
@ -1978,7 +1978,7 @@ create_save_encap_cbox(
XmString label_xmstring = NULL;
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 240, "Save As Encapsulated Project"));
CATGETS(Dtb_project_catd, 100, 240, "Save As Encapsulated Project"));
encap_toggle = XtVaCreateManagedWidget("encap_toggle",
xmToggleButtonWidgetClass,
parent,
@ -2005,7 +2005,7 @@ create_export_format_cbox(
XmString label_xmstring = NULL;
label_xmstring = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 241, "Save As UIL"));
CATGETS(Dtb_project_catd, 100, 241, "Save As UIL"));
format_toggle = XtVaCreateManagedWidget("format_toggle",
xmToggleButtonWidgetClass,
parent,
@ -2239,7 +2239,7 @@ export_uil_file(
** The file already exists, so post an overwrite dialog and
** see what the user wants to do.
*/
sprintf(Buf, catgets(Dtb_project_catd, 100, 4,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 4,
"File \"%s\" exists. You can:"), fullpath);
xm_buf = XmStringCreateLocalized(Buf);
dtb_proj_overwrite_msg_initialize(&dtb_proj_overwrite_msg);
@ -2555,7 +2555,7 @@ proj_verify_name(
*/
if ((obj != NULL) && (obj != newObj))
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 6,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 6,
"%s is not a unique name for the module."),
new_name );
xm_buf = XmStringCreateLocalized(Buf);

View file

@ -1941,9 +1941,9 @@ prop_color_ok(
if (!objxm_color_exists(colorname))
{
sprintf(Buf,
catgets(Dtb_project_catd, 100, 112, "%s is not a valid color."),
CATGETS(Dtb_project_catd, 100, 112, "%s is not a valid color."),
colorname);
util_set_help_data(catgets(Dtb_project_catd, 100, 113,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 113,
"The color that was specified is not recognized\nas a valid color name."), NULL, NULL);
valid = FALSE;
@ -1978,11 +1978,11 @@ prop_graphic_filename_ok(
valid = True; /* No Filename is valid */
else
{
util_set_help_data(catgets(Dtb_project_catd, 100, 115,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 115,
"If Graphic is specified as the Label Type for\nthe object whose properties are being modified,\nthen a pixmap (.pm, .xpm) or bitmap (.bm, .xbm)\nfile name must be specified in the Graphic Filename\nfield."), NULL, NULL);
propP_popup_message(field,
catgets(Dtb_project_catd, 100, 114,
CATGETS(Dtb_project_catd, 100, 114,
"The \"Graphic Filename\" field cannot be empty."), False);
}
}
@ -2000,11 +2000,11 @@ prop_graphic_filename_ok(
ext = strrchr(filebase, '.');
ext[0] = '\0'; /* strip off extension */
util_set_help_data(catgets(Dtb_project_catd, 100, 117,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 117,
"The graphic file name extension should not be included\nwhen it is specified in the Graphic Filename field."), NULL, NULL);
propP_popup_message(field,
catgets(Dtb_project_catd, 100, 116,
CATGETS(Dtb_project_catd, 100, 116,
"\"Graphic Filename\" field expects the filename\nbase only (no extensions: .pm .xpm .bm .xbm).\nStripping off the extension."), True);
ui_field_set_string(field, filebase);
}
@ -2056,10 +2056,10 @@ prop_help_item_ok(
}
if (exists)
{
util_set_help_data(catgets(Dtb_project_catd, 100, 119,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 119,
"Two Menubar items cannot both be specified as the\nHelp cascade. To specify a different Menubar item,\nyou must first clear the item that is currently set\nto be the Help cascade, then select the new Menubar\nitem to be the Help cascade."), NULL, NULL);
sprintf(Buf, catgets(Dtb_project_catd, 100, 118,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 118,
"There can only be one Help cascade per Menubar.Item\n\"%s\" is already configured to be the Help cascade,\ntherefore Item \"%s\" cannot also be the Help cascade."),
obj_get_label(iobj_list[i]), obj_get_label(item_obj));
@ -2105,10 +2105,10 @@ prop_name_ok(
if (!newname || !*newname)
{
util_set_help_data(catgets(Dtb_project_catd, 100, 121,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 121,
"A string must be entered in the Object Name field."),
NULL, NULL);
propP_popup_message( field, catgets(Dtb_project_catd, 100, 120,
propP_popup_message( field, CATGETS(Dtb_project_catd, 100, 120,
"A name is required."), False);
valid = FALSE;
}
@ -2122,11 +2122,11 @@ prop_name_ok(
{
if (other != obj)
{
util_set_help_data(catgets(Dtb_project_catd, 100, 123,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 123,
"The name specified in the Object Name field is not\na unique name in the module. You must specify a unique\nname for the object."),
NULL, NULL);
sprintf(Buf, catgets(Dtb_project_catd, 100, 122,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 122,
"Another object in Module \"%s\"\nhas the name \"%s\".\nPlease enter a unique name."), util_strsafe(obj_get_name(module)),newname);
propP_popup_message(field, Buf, False);
valid = FALSE;
@ -2161,9 +2161,9 @@ prop_number_ok(
if((s == p) || ((s + strlen(s)) != p))
{
util_set_help_data(catgets(Dtb_project_catd, 100, 125,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 125,
"The field only accepts integers. You must enter\nan integer value."), NULL, NULL);
sprintf(Buf, catgets(Dtb_project_catd, 100, 124,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 124,
"\"%s\" must contain an integer."),
field_name);
propP_popup_message(field, Buf, False);
@ -2175,9 +2175,9 @@ prop_number_ok(
value = prop_str_to_int(string);
if (value < min_val || value > max_val)
{
util_set_help_data(catgets(Dtb_project_catd, 100, 127,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 127,
"The numerical value entered into the field is not valid. Specify a value in the given range."), NULL, NULL);
sprintf(Buf, catgets(Dtb_project_catd, 100, 126,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 126,
"\"%s\" value (%d) out of\nvalid range [%d - %d]."),
field_name, value, min_val, max_val);
propP_popup_message(field, Buf, False);
@ -2218,20 +2218,20 @@ prop_obj_name_ok(
valid = TRUE;
else
{
util_set_help_data(catgets(Dtb_project_catd, 100, 129,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 129,
"The object specified is not of the correct type.\nFor example, it is an error to specify a button\nas the Popup Menu for a Control Pane."),
NULL, NULL);
sprintf(msgbuf, catgets(Dtb_project_catd, 100, 128,
sprintf(msgbuf, CATGETS(Dtb_project_catd, 100, 128,
"\"%s\" is not an object of type %s."),
objname, objtype_name);
}
}
else
{
util_set_help_data(catgets(Dtb_project_catd, 100, 136,
util_set_help_data(CATGETS(Dtb_project_catd, 100, 136,
"The specified object does not exist or it is\nnot of the correct type."), NULL, NULL);
sprintf(msgbuf, catgets(Dtb_project_catd, 100, 130,
sprintf(msgbuf, CATGETS(Dtb_project_catd, 100, 130,
"\"%s\" is not the name of an existing %s."),
objname, objtype_name);
}
@ -2290,7 +2290,7 @@ prop_submenu_name_ok(
valid = False;
fmtStr = XtNewString(catgets(Dtb_project_catd,
fmtStr = XtNewString(CATGETS(Dtb_project_catd,
100, 132, "Menu \"%s\" is attached as a sub-menu\nto \"%s\". You cannot create a circular\nreference within menus."));
help_buf = (STRING) util_malloc(strlen(fmtStr) +
@ -2298,7 +2298,7 @@ prop_submenu_name_ok(
sprintf(help_buf, fmtStr, obj_get_name(owner), menu_name);
util_set_help_data(help_buf, NULL, NULL);
sprintf(msgbuf, catgets(Dtb_project_catd, 100, 131,
sprintf(msgbuf, CATGETS(Dtb_project_catd, 100, 131,
"Menu \"%s\" is an ancestor of \"%s\"\ntherefore it cannot be attached as a Sub-menu."), menu_name, obj_get_name(owner));
propP_popup_message(field, msgbuf, False);
@ -2358,10 +2358,10 @@ prop_string_ok(
{
if (display_notice)
{
util_set_help_data(catgets(Dtb_project_catd, 10, 69,
util_set_help_data(CATGETS(Dtb_project_catd, 10, 69,
"Object names are used by the code generator to\ncreate C identifier names. C identifiers must\nbe composed of letters, digits, or underscores.\nTherefore, object names in App Builder must also\nfollow that rule."),
NULL, NULL);
sprintf(Buf, catgets(Dtb_project_catd, 100, 133,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 133,
"Only letters, digits, and [%s] allowed."), chars);
propP_popup_message(field, Buf, False);
}
@ -3134,22 +3134,22 @@ handle_auto_apply(
{
if (changing_types)
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 34,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 34,
"Properties for \"%s\" have been modified but not Applied.\
\nApply Changes or Cancel Change-ObjectType operation."),
loadedObjName);
help_data->help_text = catgets(Dtb_project_catd, 100,95,
help_data->help_text = CATGETS(Dtb_project_catd, 100,95,
"Click Apply Changes to apply the changes to the\ncurrent object and display the new object type.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before changing\nto a different object type.");
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 35,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 35,
"Properties for \"%s\" have been modified but not Applied.\
\nApply Changes or Cancel Close operation."),
loadedObjName);
help_data->help_text = catgets(Dtb_project_catd, 100,96,
help_data->help_text = CATGETS(Dtb_project_catd, 100,96,
"Click Apply Changes to apply the changes to the\ncurrent object and close the Property Editor.\n\nClick Cancel if you don't want to apply the\nchanges to the current object and want the\nProperty Editor to remain displayed. You can\nthen click Reset to undo the changes before\nclosing the Property Editor.");
}
}
@ -3157,12 +3157,12 @@ handle_auto_apply(
{
STRING newObjName = obj_get_name(new_obj);
sprintf(Buf, catgets(Dtb_project_catd, 100, 36,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 36,
"Properties for \"%s\" have been modified but not Applied.\
\nApply Changes or Cancel Load operation for \"%s\"."),
loadedObjName, newObjName);
help_data->help_text = catgets(Dtb_project_catd, 100,93,
help_data->help_text = CATGETS(Dtb_project_catd, 100,93,
"Click Apply Changes to apply the changes to the\ncurrent object and load the selected object.\n\nClick Cancel if you don't want to apply the\nchanges to the current object. You can then\nclick Reset to undo the changes before loading\nthe selected object.");
}
@ -4379,7 +4379,7 @@ menu_editCB(
STRING help_buf = NULL;
char Buf[256];
fmtStr = XtNewString(catgets(Dtb_project_catd, 100, 135,
fmtStr = XtNewString(CATGETS(Dtb_project_catd, 100, 135,
"The menu with the name \"%s\" does not exist in\nthe module \"%s\". Specify a valid menu name."));
help_buf = (STRING) util_malloc(strlen(fmtStr) +
@ -4387,7 +4387,7 @@ menu_editCB(
sprintf(help_buf, fmtStr, current_menuname, obj_get_name(module));
util_set_help_data(help_buf, NULL, NULL);
sprintf(Buf, catgets(Dtb_project_catd, 100, 134,
sprintf(Buf, CATGETS(Dtb_project_catd, 100, 134,
"Could not find menu \"%s\" in module \"%s\"."),
current_menuname, obj_get_name(module));
propP_popup_message(pms->field, Buf, False);
@ -4479,35 +4479,35 @@ void
strings_init(void)
{
LabelForString =
XtNewString(catgets(Dtb_project_catd, 100, 215, "Label:"));
XtNewString(CATGETS(Dtb_project_catd, 100, 215, "Label:"));
LabelForGraphic =
XtNewString(catgets(Dtb_project_catd, 100, 216, "Graphic Filename:"));
XtNewString(CATGETS(Dtb_project_catd, 100, 216, "Graphic Filename:"));
NoneItem =
XtNewString(catgets(Dtb_project_catd, 100, 217, "None"));
XtNewString(CATGETS(Dtb_project_catd, 100, 217, "None"));
XFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 218, "X Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 218, "X Field"));
YFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 219, "Y Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 219, "Y Field"));
WFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 220, "Width Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 220, "Width Field"));
HFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 221, "Height Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 221, "Height Field"));
OffsetFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 222, "Offset Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 222, "Offset Field"));
PercentageFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 223, "Percentage Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 223, "Percentage Field"));
menu_strs[0] =
XtNewString(catgets(Dtb_project_catd, 100, 224, "None"));
XtNewString(CATGETS(Dtb_project_catd, 100, 224, "None"));
menu_strs[1] =
XtNewString(catgets(Dtb_project_catd, 100, 225, "Create New Menu..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 225, "Create New Menu..."));
menu_strs[2] =
XtNewString(catgets(Dtb_project_catd, 100, 226, "Menus"));
XtNewString(CATGETS(Dtb_project_catd, 100, 226, "Menus"));
menu_strs[3] =
XtNewString(catgets(Dtb_project_catd, 100, 227, "Edit Current..."));
XtNewString(CATGETS(Dtb_project_catd, 100, 227, "Edit Current..."));
RowColFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 250, "Rows/Columns Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 250, "Rows/Columns Field"));
VertSpacingFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 251, "Vertical Spacing Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 251, "Vertical Spacing Field"));
HorizSpacingFieldStr =
XtNewString(catgets(Dtb_project_catd, 100, 252, "Horizontal Spacing Field"));
XtNewString(CATGETS(Dtb_project_catd, 100, 252, "Horizontal Spacing Field"));
}

View file

@ -1196,7 +1196,7 @@ init_new_item(
new_iobj->label_type = AB_LABEL_STRING;
newlabel = get_unique_default_label(pis->item_list,
catgets(Dtb_project_catd, 100, 268, "Item"));
CATGETS(Dtb_project_catd, 100, 268, "Item"));
obj_set_label(new_iobj, newlabel);
abobj_set_item_name(new_iobj, obj_get_module(current_obj),

View file

@ -33,7 +33,7 @@
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <ab_private/AB.h>
#include <ab/util_types.h>
#include <ab_private/util.h>

View file

@ -48,7 +48,7 @@
#include <time.h>
#include <limits.h>
#include <ctype.h>
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <ab_private/util.h>
#include <ab_private/obj.h>
#include <ab_private/objxm.h>
@ -226,7 +226,7 @@ main(int argc, STRING *argv)
/*
* Open the standard message catalog for the project.
*/
Dtb_project_catd = catopen("dtcodegen", NL_CAT_LOCALE);
Dtb_project_catd = CATOPEN("dtcodegen", NL_CAT_LOCALE);
if (Dtb_project_catd == (nl_catd)-1)
{
fprintf(stderr,
@ -268,14 +268,14 @@ main(int argc, STRING *argv)
if (!util_be_silent())
{
util_printf(
catgets(Dtb_project_catd, 1, 1,
CATGETS(Dtb_project_catd, 1, 1,
"No project file that references module(s) - using defaults\n"));
}
}
else if (numProjFiles == 0)
{
util_printf(
catgets(Dtb_project_catd, 1, 2,
CATGETS(Dtb_project_catd, 1, 2,
"No files specified, and no project file found\n"));
abmf_usage();
}
@ -344,7 +344,7 @@ main(int argc, STRING *argv)
{
char *proj_file_name = istr_string_safe(cmdline->proj_file);
util_printf(
catgets(Dtb_project_catd, 1, 3, "Reading project %s.\n"),
CATGETS(Dtb_project_catd, 1, 3, "Reading project %s.\n"),
proj_file_name);
}
@ -443,7 +443,7 @@ main(int argc, STRING *argv)
char *prog_name_string = util_get_program_name();
fprintf(stderr,
catgets(Dtb_project_catd, 1, 4,
CATGETS(Dtb_project_catd, 1, 4,
"%s: exiting due to error loading project.\n"),
prog_name_string);
exit(1);
@ -461,7 +461,7 @@ main(int argc, STRING *argv)
char *prog_name_string = util_get_program_name();
fprintf(stderr,
catgets(Dtb_project_catd, 1, 5,
CATGETS(Dtb_project_catd, 1, 5,
"%s: Nothing to do!\n"), prog_name_string);
exit(1);
}
@ -667,7 +667,7 @@ parse_args(int argc, char *argv[], CmdlineArgs cmdline)
{
if ((argCount + 1) >= argc)
{
util_error( catgets(Dtb_project_catd, 1, 6,
util_error( CATGETS(Dtb_project_catd, 1, 6,
"Missing project name for -p option"));
abmf_usage();
}
@ -762,7 +762,7 @@ parse_args(int argc, char *argv[], CmdlineArgs cmdline)
{
char *prog_name_string = util_get_program_name();
fprintf(stderr, catgets(Dtb_project_catd, 1, 7,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 7,
"%s: Illegal option \"%s\"\n\n"), prog_name_string, arg);
abmf_usage();
}
@ -780,7 +780,7 @@ parse_args(int argc, char *argv[], CmdlineArgs cmdline)
if (cmdline->proj_file != NULL)
{
util_error(
catgets(Dtb_project_catd, 1, 8,
CATGETS(Dtb_project_catd, 1, 8,
"Only one project file may be specified."));
abmf_usage();
}
@ -818,7 +818,7 @@ parse_args(int argc, char *argv[], CmdlineArgs cmdline)
char *proj_file_name = istr_string_safe(cmdline->proj_file);
util_printf_err(
catgets(Dtb_project_catd, 1, 9,
CATGETS(Dtb_project_catd, 1, 9,
"ignoring -noproject (-np) because project file was specified: %s\n"),
proj_file_name);
cmdline->use_default_project = FALSE;
@ -1107,7 +1107,7 @@ load_module(ABObj module)
else if (newProject != project)
{
util_printf_err(
catgets(Dtb_project_catd, 1, 10,
CATGETS(Dtb_project_catd, 1, 10,
"Unexpected project in file %s. Aborting\n"), fileName);
exit(1);
}
@ -1116,7 +1116,7 @@ load_module(ABObj module)
char *module_name_string = obj_get_name(module);
util_printf_err(
catgets(Dtb_project_catd, 1, 11,
CATGETS(Dtb_project_catd, 1, 11,
"Module %s not found in file %s. Aborting\n"),
module_name_string, fileName);
exit(1);
@ -1136,49 +1136,49 @@ abmf_usage(void)
fprintf(stderr,"\n");
fprintf(stderr,
catgets(Dtb_project_catd, 1, 12,
CATGETS(Dtb_project_catd, 1, 12,
"Usage: %s [options] [project-file] [module-file [module-file] ...]\n\n"),
program_name_string);
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 13,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 13,
"Code is generated for each module specified on the command line, or for\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 14,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 14,
"all modules in the project, if no modules are specified. If no project\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 15,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 15,
"file is specified, a project file containing the specified module(s) is\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 16,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 16,
"searched for in the current directory.\n\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 17,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 17,
"Files with extension .bip are assumend to be BIL project files, files with\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 18,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 18,
".bix extension are assumed to be encapsulated BIL files, and files\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 19,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 19,
"With a .bil extension are assumed to be BIL module files.\n\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 20,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 20,
"Options (* = default, + = default with no project file):\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 21,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 21,
" -help (-h) Print out this help message\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 22,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 22,
" -main Write file containing main()\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 23,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 23,
" -changed Only generate files that have changed\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 24,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 24,
"* -merge Merge generated _stubs.c files with previous version\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 25,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 25,
" -nomerge Don't merge existing and new stubs file\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 26,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 26,
"* -project (-p) Specify a project to generate code for\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 27,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 27,
" -noproject (-np) Use default project settings, ignore project file\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 28,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 28,
"+ -showall Application shows (maps) all windows at startup\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 29,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 29,
"* -noshowall Application shows (maps) only initially-visible windows\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 30,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 30,
" -silent (-s) Silent mode, no messages written\n"));
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 31,
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 31,
" -verbose (-v) Verbose mode, detailed progress messages\n\n"));
@ -1211,7 +1211,7 @@ find_proj_file(CmdlineArgs cmdline)
dir= opendir(".");
if (dir == NULL)
{
perror(catgets(Dtb_project_catd,1,32,"Couldn't open '.'"));
perror(CATGETS(Dtb_project_catd,1,32,"Couldn't open '.'"));
return -1;
}
@ -1251,17 +1251,17 @@ find_proj_file(CmdlineArgs cmdline)
int i = 0;
char *prog_name_string = util_get_program_name();
fprintf(stderr, catgets(Dtb_project_catd, 1, 33,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 33,
"%s: Please specify project file (e.g."), prog_name_string);
for (i = 0; i < strlist_get_num_strs(&projFiles); ++i)
{
fprintf(stderr, ", %s", strlist_get_str(&projFiles, i, NULL));
}
fprintf(stderr, "%s", catgets(Dtb_project_catd, 1, 34, ")\n"));
fprintf(stderr, "%s", CATGETS(Dtb_project_catd, 1, 34, ")\n"));
if (!strlist_is_empty(cmdline->files))
{
fprintf(stderr,
catgets(Dtb_project_catd, 1, 35,
CATGETS(Dtb_project_catd, 1, 35,
"%s: More than one project contains specified module(s)\n"),
prog_name_string);
}
@ -2088,7 +2088,7 @@ abmfP_create_obj_data_for_module(ABObj objInModule)
memset(objData, 0, objDataBytes);
if (objData == NULL)
{
util_printf_err(catgets(Dtb_project_catd, 1, 36,
util_printf_err(CATGETS(Dtb_project_catd, 1, 36,
"Could not allocate cgen data\n"));
return -1;
}

View file

@ -51,7 +51,7 @@
#include <stdio.h> /* FILE*, BUFSIZ */
#include <stdint.h>
#include <sys/param.h> /* MAXPATHLEN, ... */
#include <nl_types.h>
#include <Dt/MsgCatP.h>
#include <X11/Intrinsic.h>
#include <ab_private/obj.h>
#include <ab_private/trav.h>

View file

@ -252,7 +252,7 @@ static int update_msg_set(MsgFile msgFile, ABObj obj);
#define print_writing_message(_fname) \
{STRING progress_msg; \
progress_msg=XtNewString(catgets(Dtb_project_catd, 1, 52, "writing"));\
progress_msg=XtNewString(CATGETS(Dtb_project_catd, 1, 52, "writing"));\
print_progress_message(1,progress_msg,_fname);\
XtFree(progress_msg);}
@ -486,7 +486,7 @@ epilogue:
if (return_value < 0)
{
util_puts_err("\n");
util_puts_err(catgets(Dtb_project_catd, 1, 53,
util_puts_err(CATGETS(Dtb_project_catd, 1, 53,
"** Aborting due to errors **\n"));
}
abmfP_res_file_close(genCodeInfo->resource_file); /* NULL OK */
@ -544,13 +544,13 @@ write_module_files(
char *prog_name_string = util_get_program_name();
char *module_name_string = obj_get_name(module);
fprintf(stderr, catgets(Dtb_project_catd, 1, 54,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 54,
"%s: module filename must contain only letters\n"),
prog_name_string);
fprintf(stderr, catgets(Dtb_project_catd, 1, 55,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 55,
"and digits. %s will generate C variables based\n"),
prog_name_string);
fprintf(stderr, catgets(Dtb_project_catd, 1, 56,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 56,
"on the module filename. Please rename %s\n"), module_name_string);
exit(1);
}
@ -628,7 +628,7 @@ write_module_files(
if ((genCodeInfo->resource_file != NULL) && (resFileName != NULL))
{
char *prog_name_string = util_get_program_name();
fprintf(stderr, catgets(Dtb_project_catd, 1, 57,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 57,
"%s: writing resources for %s into %s\n"),
prog_name_string,
uiCFileName,
@ -888,7 +888,7 @@ write_project_files(
{
if (check_dates && force_write_c_file)
{
util_printf(catgets(Dtb_project_catd, 1, 58,
util_printf(CATGETS(Dtb_project_catd, 1, 58,
"generating %s because of changes in modules\n"),
stubsFileName);
}
@ -1014,7 +1014,7 @@ write_make_file(
if (util_be_verbose())
{
char *prog_name_string = util_get_program_name();
fprintf(stderr, catgets(Dtb_project_catd, 1, 59,
fprintf(stderr, CATGETS(Dtb_project_catd, 1, 59,
"%s: Skipping user-defined %s\n"),
prog_name_string, curMakeFileName);
}
@ -1037,7 +1037,7 @@ write_make_file(
if (actualOSType == AB_OS_UNDEF)
{
util_printf_err(catgets(Dtb_project_catd, 1, 60,
util_printf_err(CATGETS(Dtb_project_catd, 1, 60,
"Could not determine OS type of this machine\n"));
goto epilogue;
}
@ -1049,7 +1049,7 @@ write_make_file(
/* The user has modified this file since we wrote it last */
if (util_be_verbose())
{
util_printf(catgets(Dtb_project_catd, 1, 61,
util_printf(CATGETS(Dtb_project_catd, 1, 61,
"Skipping user-defined %s\n"), actualMakeFileName);
}
}
@ -1057,20 +1057,20 @@ write_make_file(
{
if (!util_be_silent())
{
util_printf(catgets(Dtb_project_catd, 1, 62,
util_printf(CATGETS(Dtb_project_catd, 1, 62,
"linking %s => %s\n"), curMakeFileName, actualMakeFileName);
}
rc = unlink(actualMakeFileName);
if (util_file_exists(actualMakeFileName))
{
util_printf_err(catgets(Dtb_project_catd, 1, 63,
util_printf_err(CATGETS(Dtb_project_catd, 1, 63,
"Could not remove %s\n"), actualMakeFileName);
return_code(-1);
}
rc = link(curMakeFileName, actualMakeFileName);
if (rc != 0)
{
util_printf_err(catgets(Dtb_project_catd, 1, 64,
util_printf_err(CATGETS(Dtb_project_catd, 1, 64,
"Could not create link to %s\n"), curMakeFileName);
return_code(-1);
}
@ -1647,7 +1647,7 @@ check_and_replace_file(
if (orgFile == NULL)
{
fileSkippedReasonOut = ABMF_SKIP_ERR_OCCURRED;
util_printf_err(catgets(Dtb_project_catd, 1, 65, "%s: %s\n"),
util_printf_err(CATGETS(Dtb_project_catd, 1, 65, "%s: %s\n"),
fileName, strerror(errno));
return_code(-1);
}
@ -1673,7 +1673,7 @@ check_and_replace_file(
if (file == NULL)
{
fileSkippedReasonOut = ABMF_SKIP_ERR_OCCURRED;
util_printf_err(catgets(Dtb_project_catd, 1, 65, "%s: %s\n"),
util_printf_err(CATGETS(Dtb_project_catd, 1, 65, "%s: %s\n"),
fileName, strerror(errno));
return_code(ERR_OPEN);
}
@ -1767,7 +1767,7 @@ replace_file(STRING fileName, File fromFile, BOOL rewindFiles)
toFile = util_fopen_locked(fileName, "w");
if (toFile == NULL)
{
util_printf_err(catgets(Dtb_project_catd, 1, 65, "%s: %s\n"),
util_printf_err(CATGETS(Dtb_project_catd, 1, 65, "%s: %s\n"),
fileName, strerror(errno));
return ERR_OPEN;
}
@ -1787,7 +1787,7 @@ print_progress_message(int verbosity, STRING message, STRING fileName)
{
if (util_get_verbosity() >= verbosity)
{
util_printf_err(catgets(Dtb_project_catd, 1, 67, "%s %s\n"),
util_printf_err(CATGETS(Dtb_project_catd, 1, 67, "%s %s\n"),
message, fileName);
}
return 0;
@ -1802,15 +1802,15 @@ print_skipping_message(STRING fileName, ABMF_SKIP_WHY why)
switch (why)
{
case ABMF_SKIP_NO_CHANGES:
util_printf(catgets(Dtb_project_catd, 1, 68,
util_printf(CATGETS(Dtb_project_catd, 1, 68,
"skipping (no changes) %s\n"), fileName);
break;
case ABMF_SKIP_UP_TO_DATE:
util_printf(catgets(Dtb_project_catd, 1, 69,
util_printf(CATGETS(Dtb_project_catd, 1, 69,
"skipping (up-to-date) %s\n"), fileName);
break;
case ABMF_SKIP_ERR_OCCURRED:
util_printf(catgets(Dtb_project_catd, 1, 70,
util_printf(CATGETS(Dtb_project_catd, 1, 70,
"skipping due to errors %s\n"), fileName);
break;
}
@ -1824,7 +1824,7 @@ print_backing_up_message(STRING fileFromName, STRING fileToName)
{
if (util_be_verbose())
{
util_printf(catgets(Dtb_project_catd, 1, 71,
util_printf(CATGETS(Dtb_project_catd, 1, 71,
"saving previous %s to %s\n"), fileFromName, fileToName);
}
return 0;

View file

@ -931,12 +931,12 @@ abmfP_write_add_callbacks_and_actions(
util_strsafe(util_when_to_string(when));
if(src_obj_name == NULL) {
util_printf_err(catgets(Dtb_project_catd, 1, 74,
util_printf_err(CATGETS(Dtb_project_catd, 1, 74,
"Ignoring unsupported WHEN - obj:<unnamed> when:%s\n"),
when_string);
}
else {
util_printf_err(catgets(Dtb_project_catd, 1, 75,
util_printf_err(CATGETS(Dtb_project_catd, 1, 75,
"Ignoring unsupported WHEN - obj:%s when:%s\n"),
src_obj_name, when_string);
}

View file

@ -116,7 +116,7 @@ abmfP_catgets_prefix_str(
goto cret;
MsgSet_set_msg_is_referenced(msg_set, msg_num, TRUE);
sprintf(str_catg, "catgets(Dtb_project_catd, %d, %d, ",
sprintf(str_catg, "CATGETS(Dtb_project_catd, %d, %d, ",
MsgSet_get_number(msg_set),
msg_num);

View file

@ -136,7 +136,7 @@ static char *Session_Includes[] =
*/
static char *I18n_Includes[] =
{
"<nl_types.h>",
"<Dt/MsgCatP.h>",
NULL,
};
@ -997,7 +997,7 @@ write_main_msg_i18n(
abio_puts(codeFile, abmfP_comment_end);
abio_puts(codeFile,
"Dtb_project_catd = catopen(DTB_PROJECT_CATALOG, NL_CAT_LOCALE);\n");
"Dtb_project_catd = CATOPEN(DTB_PROJECT_CATALOG, NL_CAT_LOCALE);\n");
abio_puts(codeFile, "if (Dtb_project_catd == (nl_catd)-1)\n");
abmfP_write_c_block_begin(genCodeInfo);
abio_puts(codeFile,

View file

@ -81,7 +81,7 @@ static int write_i18n_declarations(GenCodeInfo genCodeInfo, ABObj project);
*/
static char *I18n_Includes[] =
{
"<nl_types.h>",
"<Dt/MsgCatP.h>",
NULL,
};

View file

@ -1192,7 +1192,7 @@ abmfP_write_action_function(
default:
{
char *obj_name_string = obj_get_name(fromObj);
util_printf_err(catgets(Dtb_project_catd, 1, 78,
util_printf_err(CATGETS(Dtb_project_catd, 1, 78,
"unknown function type for action from object, %s"),
obj_name_string);
return_code(ERR);
@ -1469,13 +1469,13 @@ write_builtin_action(
if (obj_get_name(action) != NULL)
{
char *action_name = obj_get_name(action);
sprintf(msg, catgets(Dtb_project_catd, 1, 76,
sprintf(msg, CATGETS(Dtb_project_catd, 1, 76,
"Unknown action name, %s"), action_name);
}
else
{
int action_type = obj_get_func_builtin(action);
sprintf(msg, catgets(Dtb_project_catd, 1, 77,
sprintf(msg, CATGETS(Dtb_project_catd, 1, 77,
"Unknown action type, %d"), action_type);
}
util_error(msg);

View file

@ -380,7 +380,7 @@ abmfP_calloc(size_t n, size_t size)
if (p = (STRING) calloc(n, size))
return p;
util_error(catgets(Dtb_project_catd, 1, 83, "calloc: out of memory"));
util_error(CATGETS(Dtb_project_catd, 1, 83, "calloc: out of memory"));
return NULL;
}
@ -394,7 +394,7 @@ abmfP_malloc(size_t size)
if (p = malloc(size))
return p;
util_error(catgets(Dtb_project_catd, 1, 84, "malloc: out of memory"));
util_error(CATGETS(Dtb_project_catd, 1, 84, "malloc: out of memory"));
return NULL;
}
@ -408,7 +408,7 @@ abmfP_realloc(void *buf, unsigned int size)
if (p = realloc(buf, size))
return p;
util_error(catgets(Dtb_project_catd, 1, 85, "realloc: out of memory"));
util_error(CATGETS(Dtb_project_catd, 1, 85, "realloc: out of memory"));
return NULL;
}

View file

@ -47,11 +47,11 @@
#define _AB_H_
#include <Xm/Xm.h>
#include <nl_types.h> /* Necessary for message I18N */
#include <ab_private/obj.h>
#include <ab_private/vwr.h>
#include <ab_private/ab_utils.h>
#include <Dt/Dt.h> /* for version information */
#include <Dt/Dt.h> /* for version information */
#include <Dt/MsgCatP.h> /* for message I18N */
#define MODE_BUILD 1

Some files were not shown because too many files have changed in this diff Show more