From a6ea2a2d524b774e191d4605abf39951613a30d5 Mon Sep 17 00:00:00 2001 From: Lev Kujawski Date: Sat, 30 Jan 2021 20:05:13 -0700 Subject: [PATCH] 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. --- cde/examples/template/template.c | 42 +- cde/include/Dt/DtMsgsP.h | 2 +- cde/include/Dt/DtNlUtils.h | 3 +- cde/include/Dt/MsgCatP.h | 13 +- cde/include/Dt/PrintMsgsP.h | 2 +- cde/include/Dt/SearchP.h | 4 +- cde/include/Dt/Setlocale.h | 2 +- cde/include/bms/sbstdinc.h | 2 +- cde/lib/DtHelp/FormatMan.c | 1 - cde/lib/DtHelp/FormatUtil.c | 12 +- cde/lib/DtHelp/Helpos.c | 10 +- cde/lib/DtHelp/Layout.c | 4 - cde/lib/DtHelp/LayoutUtil.c | 8 - cde/lib/DtHelp/SetList.c | 4 - cde/lib/DtPrint/PrintMsgs.c | 95 +---- cde/lib/DtSearch/ausdopen.c | 4 +- cde/lib/DtSearch/boolpars.c | 36 +- cde/lib/DtSearch/boolsrch.c | 16 +- cde/lib/DtSearch/dbchange.c | 4 +- cde/lib/DtSearch/dberr.c | 20 +- cde/lib/DtSearch/dtoe.c | 18 +- cde/lib/DtSearch/dtoeinit.c | 10 +- cde/lib/DtSearch/dtsrapi.c | 26 +- cde/lib/DtSearch/dtsrdbrec.c | 114 +++--- cde/lib/DtSearch/dtsrjoint.c | 4 +- cde/lib/DtSearch/dtsrutil.c | 2 +- cde/lib/DtSearch/dtsrve.c | 44 +- cde/lib/DtSearch/globals.c | 2 +- cde/lib/DtSearch/hdecode.c | 8 +- cde/lib/DtSearch/hencode.c | 2 +- cde/lib/DtSearch/jpn.c | 14 +- cde/lib/DtSearch/lang.c | 30 +- cde/lib/DtSearch/mrclean.c | 4 +- cde/lib/DtSearch/msgutil.c | 6 +- cde/lib/DtSearch/ocf.c | 68 ++-- cde/lib/DtSearch/opendblk.c | 12 +- cde/lib/DtSearch/vestatis.c | 30 +- cde/lib/DtSvc/DtUtil2/DtGetMessage.c | 6 +- cde/lib/DtSvc/DtUtil2/GetMessage.c | 8 +- cde/lib/DtSvc/DtUtil2/MsgCat.c | 66 ++- cde/lib/DtTerm/Term/Term.c | 1 - cde/lib/DtTerm/TermPrim/TermPrim.c | 6 +- cde/lib/DtWidget/DtMsgs.c | 8 +- cde/lib/pam/libpam/pam_framework_utils.c | 18 +- .../tt/bin/ttdbserverd/db_server_functions.C | 1 - cde/lib/tt/lib/util/tt_gettext.C | 9 +- cde/lib/tt/slib/mp_s_mp.C | 1 - cde/programs/dtaction/Main.c | 2 +- cde/programs/dtaction/demo/dtactiondemo.c | 2 +- cde/programs/dtappbuilder/src/ab/ab_bil.c | 18 +- cde/programs/dtappbuilder/src/ab/ab_dnd.c | 6 +- cde/programs/dtappbuilder/src/ab/abobj_edit.c | 14 +- cde/programs/dtappbuilder/src/ab/abobj_menu.c | 42 +- cde/programs/dtappbuilder/src/ab/abobj_util.c | 20 +- .../dtappbuilder/src/ab/appfw_stubs.c | 4 +- .../dtappbuilder/src/ab/attch_ed_stubs.c | 16 +- cde/programs/dtappbuilder/src/ab/brws.c | 2 +- cde/programs/dtappbuilder/src/ab/brws_find.c | 6 +- cde/programs/dtappbuilder/src/ab/brws_stubs.c | 16 +- .../dtappbuilder/src/ab/cgen_env_stubs.c | 4 +- cde/programs/dtappbuilder/src/ab/cgen_utils.c | 2 +- cde/programs/dtappbuilder/src/ab/conn_obj.c | 90 ++--- cde/programs/dtappbuilder/src/ab/conn_stubs.c | 6 +- .../dtappbuilder/src/ab/dnd_ed_stubs.c | 6 +- .../dtappbuilder/src/ab/dtbuilder.c.src | 36 +- cde/programs/dtappbuilder/src/ab/dtbuilder.h | 2 +- .../dtappbuilder/src/ab/help_ed_stubs.c | 12 +- .../dtappbuilder/src/ab/message_ed_stubs.c | 38 +- cde/programs/dtappbuilder/src/ab/pal_button.c | 4 +- cde/programs/dtappbuilder/src/ab/pal_choice.c | 10 +- .../dtappbuilder/src/ab/pal_combobox.c | 6 +- cde/programs/dtappbuilder/src/ab/pal_create.c | 14 +- .../dtappbuilder/src/ab/pal_custdlg.c | 10 +- .../dtappbuilder/src/ab/pal_fchooser.c | 4 +- cde/programs/dtappbuilder/src/ab/pal_label.c | 2 +- cde/programs/dtappbuilder/src/ab/pal_list.c | 4 +- .../dtappbuilder/src/ab/pal_mainwin.c | 4 +- cde/programs/dtappbuilder/src/ab/pal_menu.c | 4 +- .../dtappbuilder/src/ab/pal_menubar.c | 6 +- cde/programs/dtappbuilder/src/ab/pal_scale.c | 4 +- cde/programs/dtappbuilder/src/ab/pal_sep.c | 2 +- .../dtappbuilder/src/ab/pal_spinbox.c | 2 +- cde/programs/dtappbuilder/src/ab/pal_textf.c | 2 +- cde/programs/dtappbuilder/src/ab/proj.c | 14 +- .../dtappbuilder/src/ab/projP_utils.c | 16 +- cde/programs/dtappbuilder/src/ab/proj_stubs.c | 10 +- cde/programs/dtappbuilder/src/ab/proj_utils.c | 82 ++-- cde/programs/dtappbuilder/src/ab/prop.c | 96 ++--- cde/programs/dtappbuilder/src/ab/prop_items.c | 2 +- .../dtappbuilder/src/abmf/ab_func_strings.c | 2 +- cde/programs/dtappbuilder/src/abmf/abmf.c | 76 ++-- cde/programs/dtappbuilder/src/abmf/abmfP.h | 2 +- .../dtappbuilder/src/abmf/generate_code.c | 42 +- .../dtappbuilder/src/abmf/instances.c | 4 +- cde/programs/dtappbuilder/src/abmf/msg_cvt.c | 2 +- .../dtappbuilder/src/abmf/proj_c_file.c | 4 +- .../dtappbuilder/src/abmf/proj_header_file.c | 2 +- .../dtappbuilder/src/abmf/stubs_c_file.c | 6 +- cde/programs/dtappbuilder/src/abmf/utils.c | 6 +- .../dtappbuilder/src/include/ab_private/ab.h | 4 +- cde/programs/dtappbuilder/src/libABil/bilP.h | 4 +- .../dtappbuilder/src/libABil/bil_lexer.c | 4 +- .../dtappbuilder/src/libABil/bil_loadatt.c | 6 +- .../dtappbuilder/src/libABil/bil_loadfile.c | 2 +- .../dtappbuilder/src/libABil/bil_store.c | 8 +- .../dtappbuilder/src/libABil/bil_test.c | 2 +- cde/programs/dtappbuilder/src/libABil/load.c | 20 +- .../dtappbuilder/src/libABobjXm/objxmP.h | 2 +- .../dtappbuilder/src/libABobjXm/objxm_args.c | 6 +- .../src/libABobjXm/objxm_config.c | 4 +- .../dtappbuilder/src/libABobjXm/objxm_util.c | 12 +- .../dtappbuilder/src/libAButil/abio.c | 10 +- .../dtappbuilder/src/libAButil/istr.c | 68 ++-- .../dtappbuilder/src/libAButil/utilP.h | 2 +- .../dtappbuilder/src/libAButil/util_err.c | 50 +-- cde/programs/dtcm/dtcm/about.c | 38 +- cde/programs/dtcm/dtcm/alarm.c | 32 +- cde/programs/dtcm/dtcm/blist.c | 32 +- cde/programs/dtcm/dtcm/browser.c | 42 +- cde/programs/dtcm/dtcm/calendar.h | 2 +- cde/programs/dtcm/dtcm/calendarA.c | 234 +++++------ cde/programs/dtcm/dtcm/cm_admin.c | 16 +- cde/programs/dtcm/dtcm/cm_delete.c | 12 +- cde/programs/dtcm/dtcm/cm_insert.c | 42 +- cde/programs/dtcm/dtcm/cm_lookup.c | 10 +- cde/programs/dtcm/dtcm/cmtt.c | 4 +- cde/programs/dtcm/dtcm/dayglance.c | 6 +- cde/programs/dtcm/dtcm/dnd.c | 64 +-- cde/programs/dtcm/dtcm/dssw.c | 24 +- cde/programs/dtcm/dtcm/dtcm_editor.c | 38 +- cde/programs/dtcm/dtcm/editor.c | 144 +++---- cde/programs/dtcm/dtcm/find.c | 50 +-- cde/programs/dtcm/dtcm/goto.c | 20 +- cde/programs/dtcm/dtcm/group_editor.c | 122 +++--- cde/programs/dtcm/dtcm/help.c | 10 +- cde/programs/dtcm/dtcm/misc.c | 166 ++++---- cde/programs/dtcm/dtcm/print.c | 42 +- cde/programs/dtcm/dtcm/props.c | 50 +-- cde/programs/dtcm/dtcm/props_pu.c | 190 ++++----- cde/programs/dtcm/dtcm/reminders.c | 34 +- cde/programs/dtcm/dtcm/rfp.c | 60 +-- cde/programs/dtcm/dtcm/tempbr.c | 16 +- cde/programs/dtcm/dtcm/timezone.c | 24 +- cde/programs/dtcm/dtcm/todo.c | 158 ++++---- cde/programs/dtcm/dtcm/weekglance.c | 20 +- cde/programs/dtcm/dtcm/x_graphics.c | 44 +- cde/programs/dtcm/dtcm/yearglance.c | 2 +- cde/programs/dtcm/libDtCmP/cm_tty.c | 104 ++--- cde/programs/dtcm/libDtCmP/cm_tty.h | 2 +- cde/programs/dtcm/libDtCmP/props.c | 8 +- cde/programs/dtcreate/dtcreate.h | 4 +- cde/programs/dtcreate/main.c | 4 +- cde/programs/dtdspmsg/Imakefile | 4 +- cde/programs/dtdspmsg/dtdspmsg.c | 23 +- cde/programs/dtdspmsg/msgfac_msg.h | 2 - cde/programs/dtexec/Imakefile | 5 +- cde/programs/dtfile/HelpCB.c | 2 +- cde/programs/dtfile/Main.c | 5 +- cde/programs/dtfile/SharedMsgs.c | 4 +- cde/programs/dthello/Imakefile | 5 +- cde/programs/dthello/dthello.c | 27 +- cde/programs/dthelp/dthelpgen/helpgen.c | 6 +- cde/programs/dthelp/dthelpprint/HelpPrintI.h | 2 +- cde/programs/dthelp/dthelpprint/PrintUtil.c | 28 +- cde/programs/dtimsstart/main.c | 108 +++-- .../dtinfo/dtinfo/src/Managers/CatMgr.C | 10 +- .../dtinfo/dtinfo/src/Managers/CatMgr.hh | 2 +- cde/programs/dtlogin/Imakefile | 3 +- cde/programs/dtlogin/chooser.c | 4 - cde/programs/dtlogin/util.c | 9 +- cde/programs/dtlogin/vgutil.c | 53 +-- cde/programs/dtlogin/xdm_msg.h | 1 - cde/programs/dtmail/MotifApp/Application.C | 34 +- cde/programs/dtmail/MotifApp/AskFirstCmd.C | 6 +- cde/programs/dtmail/MotifApp/DialogManager.C | 8 +- cde/programs/dtmail/MotifApp/Help.C | 28 +- cde/programs/dtmail/MotifApp/QuitCmd.C | 6 +- cde/programs/dtmail/MotifApp/SelectFileCmd.C | 6 +- cde/programs/dtmail/MotifApp/WarnNoUndoCmd.C | 6 +- cde/programs/dtmail/dtmail/AttachArea.C | 40 +- cde/programs/dtmail/dtmail/AttachCmds.C | 42 +- cde/programs/dtmail/dtmail/Attachment.C | 28 +- cde/programs/dtmail/dtmail/ComposeCmds.C | 34 +- cde/programs/dtmail/dtmail/DmxPrintJob.C | 52 +-- cde/programs/dtmail/dtmail/DmxPrintOptions.C | 18 +- cde/programs/dtmail/dtmail/DmxPrintSetup.C | 8 +- cde/programs/dtmail/dtmail/DtEditor.C | 4 +- cde/programs/dtmail/dtmail/DtMailGenDialog.C | 10 +- cde/programs/dtmail/dtmail/Editor.C | 22 +- cde/programs/dtmail/dtmail/FindDialog.C | 34 +- cde/programs/dtmail/dtmail/MailMsg.h | 11 +- .../dtmail/dtmail/MailRetrievalOptions.C | 32 +- cde/programs/dtmail/dtmail/MsgScrollingList.C | 44 +- cde/programs/dtmail/dtmail/OptCmd.C | 44 +- cde/programs/dtmail/dtmail/RoamApp.C | 42 +- cde/programs/dtmail/dtmail/RoamCmds.C | 90 ++--- cde/programs/dtmail/dtmail/RoamMenuWindow.C | 376 +++++++++--------- cde/programs/dtmail/dtmail/SendMsgDialog.C | 184 ++++----- cde/programs/dtmail/dtmail/SortCmd.C | 2 +- cde/programs/dtmail/dtmail/Undelete.C | 12 +- cde/programs/dtmail/dtmail/ViewMsgDialog.C | 38 +- cde/programs/dtmail/dtmail/XmTextEditor.C | 4 +- cde/programs/dtmail/dtmail/options_ui.C | 204 +++++----- cde/programs/dtmail/include/DtMail/Common.h | 2 +- cde/programs/dtmail/include/DtMail/DtMail.hh | 2 +- .../dtmail/include/DtMail/DtMailError.hh | 2 +- .../dtmail/include/MotifApp/dtmailopts.h | 2 +- cde/programs/dtmail/include/utils/NLS.hh | 53 --- .../dtmail/libDtMail/Common/DtMailError.C | 10 +- cde/programs/dtpad/dtpad.c | 2 +- cde/programs/dtpad/dtpad.h | 2 +- cde/programs/dtpad/main.c | 20 +- cde/programs/dtpdm/PdmMsgs.c | 15 +- cde/programs/dtpdm/PdmMsgs.h | 2 +- cde/programs/dtpdmd/Imakefile | 5 +- cde/programs/dtpdmd/nlmsg.c | 35 +- cde/programs/dtpdmd/nlmsg.h | 91 ++--- cde/programs/dtprintinfo/DtPrintinfo.C | 8 +- cde/programs/dtprintinfo/dtprintinfomsg.h | 10 +- cde/programs/dtscreen/dtscreen.c | 10 +- cde/programs/dtscreen/resource.c | 18 +- cde/programs/dtsr/Imakefile | 24 +- cde/programs/dtsr/dtsrclean.c | 94 ++--- cde/programs/dtsr/dtsrcreate.c | 56 +-- cde/programs/dtsr/dtsrdbrec.c | 114 +++--- cde/programs/dtsr/dtsrhan.c | 172 ++++---- cde/programs/dtsr/dtsrindex.c | 106 ++--- cde/programs/dtsr/dtsrkdump.c | 48 +-- cde/programs/dtsr/dtsrload.c | 74 ++-- cde/programs/dtsr/huffcode.c | 42 +- cde/programs/dtsr/tomita.c | 66 +-- cde/programs/dtstyle/Main.c | 2 +- cde/programs/dtudcexch/selectx.c | 2 +- cde/programs/dtudcexch/selectxlfd.c | 2 +- cde/programs/dtudcexch/xlfdutil.c | 2 +- cde/programs/dtudcfonted/cpyx.c | 2 +- cde/programs/dtudcfonted/selectx.c | 2 +- cde/programs/dtudcfonted/xutil.c | 2 +- cde/programs/localized/util/Imakefile | 7 +- cde/programs/localized/util/merge.c | 28 +- cde/programs/util/dttypes/dttypes.c | 82 ++-- 241 files changed, 3154 insertions(+), 3498 deletions(-) delete mode 100644 cde/programs/dtmail/include/utils/NLS.hh diff --git a/cde/examples/template/template.c b/cde/examples/template/template.c index 5932bbc51..961f0b577 100644 --- a/cde/examples/template/template.c +++ b/cde/examples/template/template.c @@ -39,7 +39,7 @@ #include #include -#include +#include
#include #include
#include
@@ -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; diff --git a/cde/include/Dt/DtMsgsP.h b/cde/include/Dt/DtMsgsP.h index 3f1397542..6933c7d57 100644 --- a/cde/include/Dt/DtMsgsP.h +++ b/cde/include/Dt/DtMsgsP.h @@ -40,7 +40,7 @@ #define CONST #ifdef I18N_MSG -#include +#include
#define DTWIDGET_GETMESSAGE(set, number, string)\ (char *) _DtWidgetGetMessage(set, number, string) diff --git a/cde/include/Dt/DtNlUtils.h b/cde/include/Dt/DtNlUtils.h index 6a20789c0..e57b8d698 100644 --- a/cde/include/Dt/DtNlUtils.h +++ b/cde/include/Dt/DtNlUtils.h @@ -34,13 +34,12 @@ /**************************************************************************/ #ifdef NLS16 - #include #include #include #include -#include #include +#include
#endif #include diff --git a/cde/include/Dt/MsgCatP.h b/cde/include/Dt/MsgCatP.h index bfbb9e609..60809a28f 100644 --- a/cde/include/Dt/MsgCatP.h +++ b/cde/include/Dt/MsgCatP.h @@ -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 } diff --git a/cde/include/Dt/PrintMsgsP.h b/cde/include/Dt/PrintMsgsP.h index c4ae5ff6a..5e2138929 100644 --- a/cde/include/Dt/PrintMsgsP.h +++ b/cde/include/Dt/PrintMsgsP.h @@ -37,7 +37,7 @@ #define _DtPrintMsgsP_h #ifdef I18N_MSG -#include +#include
#define DTPRINT_GETMESSAGE(set, number, string) \ _DtPrintGetMessage(set, number, string) diff --git a/cde/include/Dt/SearchP.h b/cde/include/Dt/SearchP.h index f6f7cea71..749c1c710 100644 --- a/cde/include/Dt/SearchP.h +++ b/cde/include/Dt/SearchP.h @@ -95,7 +95,7 @@ * Removed debugging #defines. */ #include "Search.h" /* the "public" header file */ -#include /* for nl_catd below and all cat...() funcs */ +#include
/* for nl_catd below and all cat...() funcs */ #include #include @@ -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,"")) +#define NULLORSTR(str) ((str)?str:CATGETS(dtsearch_catd,1,1,"")) #define NUMARRAY(arr) ((sizeof(arr) / sizeof(arr[0]))) /****************************************/ diff --git a/cde/include/Dt/Setlocale.h b/cde/include/Dt/Setlocale.h index fd9358883..b45b096b7 100644 --- a/cde/include/Dt/Setlocale.h +++ b/cde/include/Dt/Setlocale.h @@ -41,7 +41,7 @@ #include #include -#include +#include
#include #include
diff --git a/cde/include/bms/sbstdinc.h b/cde/include/bms/sbstdinc.h index 17dc52093..6a5619176 100644 --- a/cde/include/bms/sbstdinc.h +++ b/cde/include/bms/sbstdinc.h @@ -52,7 +52,7 @@ #include #include #include -#include +#include
/************************************************************************/ /* Routines not defined in include files (yet). */ diff --git a/cde/lib/DtHelp/FormatMan.c b/cde/lib/DtHelp/FormatMan.c index 5b54fedb3..87762d78c 100644 --- a/cde/lib/DtHelp/FormatMan.c +++ b/cde/lib/DtHelp/FormatMan.c @@ -53,7 +53,6 @@ #endif #include #include -#include #include #include #include diff --git a/cde/lib/DtHelp/FormatUtil.c b/cde/lib/DtHelp/FormatUtil.c index 65f8d63f9..d741cc004 100644 --- a/cde/lib/DtHelp/FormatUtil.c +++ b/cde/lib/DtHelp/FormatUtil.c @@ -75,7 +75,7 @@ extern int errno; #include "FormatUtilI.h" #if defined(NLS16) || !defined(NO_MESSAGE_CATALOG) -#include +#include
#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 diff --git a/cde/lib/DtHelp/Helpos.c b/cde/lib/DtHelp/Helpos.c index e4daa5604..e6257cbb7 100644 --- a/cde/lib/DtHelp/Helpos.c +++ b/cde/lib/DtHelp/Helpos.c @@ -58,9 +58,6 @@ #define XOS_USE_XT_LOCKING #include #include -#ifndef _SUN_OS /* don't need the nl_types.h file */ -# include -#endif /* ! _SUN_OS */ #include #include @@ -69,6 +66,7 @@ /* Dt Includes */ #include
#include
+#include
#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); } diff --git a/cde/lib/DtHelp/Layout.c b/cde/lib/DtHelp/Layout.c index 6090c5886..8f81f8271 100644 --- a/cde/lib/DtHelp/Layout.c +++ b/cde/lib/DtHelp/Layout.c @@ -65,10 +65,6 @@ #include "SelectionI.h" #include "VirtFuncsI.h" -#ifdef NLS16 -#include -#endif - /****************************************************************************** * * Private Macros diff --git a/cde/lib/DtHelp/LayoutUtil.c b/cde/lib/DtHelp/LayoutUtil.c index a3f75e796..cf3c32ddd 100644 --- a/cde/lib/DtHelp/LayoutUtil.c +++ b/cde/lib/DtHelp/LayoutUtil.c @@ -64,14 +64,6 @@ #include "StringFuncsI.h" #include "VirtFuncsI.h" -#if defined(NLS16) || !defined(NO_MESSAGE_CATALOG) -#include -#endif - -#ifndef NL_CAT_LOCALE -static const int NL_CAT_LOCALE = 0; -#endif - /****************************************************************************** * * Private Defines diff --git a/cde/lib/DtHelp/SetList.c b/cde/lib/DtHelp/SetList.c index 6b70c58d9..3245fef18 100644 --- a/cde/lib/DtHelp/SetList.c +++ b/cde/lib/DtHelp/SetList.c @@ -72,10 +72,6 @@ #include "XInterfaceI.h" #include "XUICreateI.h" -#ifdef NLS16 -#include -#endif - /******** Private Function Declarations ********/ /******** End Public Function Declarations ********/ diff --git a/cde/lib/DtPrint/PrintMsgs.c b/cde/lib/DtPrint/PrintMsgs.c index 1ca6e8819..94eabbb18 100644 --- a/cde/lib/DtPrint/PrintMsgs.c +++ b/cde/lib/DtPrint/PrintMsgs.c @@ -37,8 +37,8 @@ #ifdef I18N_MSG #include -#include #include +#include
#include
#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; ilabel); @@ -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); diff --git a/cde/lib/DtSearch/boolsrch.c b/cde/lib/DtSearch/boolsrch.c index 445e16efe..e4febaf1c 100644 --- a/cde/lib/DtSearch/boolsrch.c +++ b/cde/lib/DtSearch/boolsrch.c @@ -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" diff --git a/cde/lib/DtSearch/dbchange.c b/cde/lib/DtSearch/dbchange.c index 1d8b3bf9b..e2f975d4a 100644 --- a/cde/lib/DtSearch/dbchange.c +++ b/cde/lib/DtSearch/dbchange.c @@ -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."), diff --git a/cde/lib/DtSearch/dberr.c b/cde/lib/DtSearch/dberr.c index a54bcafa1..c485a6f4f 100644 --- a/cde/lib/DtSearch/dberr.c +++ b/cde/lib/DtSearch/dberr.c @@ -68,7 +68,7 @@ #include #include #include -#include /* for nl_catd */ +#include
/* 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" diff --git a/cde/lib/DtSearch/dtoe.c b/cde/lib/DtSearch/dtoe.c index d97fa12d0..388633a60 100644 --- a/cde/lib/DtSearch/dtoe.c +++ b/cde/lib/DtSearch/dtoe.c @@ -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, "")); + strcpy (targ, CATGETS(dtsearch_catd, MS_misc, 1, "")); 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, "") : saveusr.lastqry); + CATGETS(dtsearch_catd, MS_misc, 1, "") : 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); diff --git a/cde/lib/DtSearch/dtoeinit.c b/cde/lib/DtSearch/dtoeinit.c index 9796ad942..69710fcb6 100644 --- a/cde/lib/DtSearch/dtoeinit.c +++ b/cde/lib/DtSearch/dtoeinit.c @@ -179,8 +179,8 @@ void oe_initialize (void) if (usrblk.query != NULL) ptr = usrblk.query; else - ptr = catgets (dtsearch_catd, MS_misc, 6, ""); - sprintf (sprintbuf, catgets (dtsearch_catd, MS_oeinit, 137, + ptr = CATGETS(dtsearch_catd, MS_misc, 6, ""); + 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); diff --git a/cde/lib/DtSearch/dtsrapi.c b/cde/lib/DtSearch/dtsrapi.c index e9be4604b..f6554434e 100644 --- a/cde/lib/DtSearch/dtsrapi.c +++ b/cde/lib/DtSearch/dtsrapi.c @@ -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", diff --git a/cde/lib/DtSearch/dtsrdbrec.c b/cde/lib/DtSearch/dtsrdbrec.c index 21f6ee460..8e397385f 100644 --- a/cde/lib/DtSearch/dtsrdbrec.c +++ b/cde/lib/DtSearch/dtsrdbrec.c @@ -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 \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; diff --git a/cde/lib/DtSearch/dtsrjoint.c b/cde/lib/DtSearch/dtsrjoint.c index 1448b75a4..cc6ab1d87 100644 --- a/cde/lib/DtSearch/dtsrjoint.c +++ b/cde/lib/DtSearch/dtsrjoint.c @@ -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); diff --git a/cde/lib/DtSearch/dtsrutil.c b/cde/lib/DtSearch/dtsrutil.c index 2bfd5793f..f03fddeb9 100644 --- a/cde/lib/DtSearch/dtsrutil.c +++ b/cde/lib/DtSearch/dtsrutil.c @@ -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; diff --git a/cde/lib/DtSearch/dtsrve.c b/cde/lib/DtSearch/dtsrve.c index e67119728..14ea2806c 100644 --- a/cde/lib/DtSearch/dtsrve.c +++ b/cde/lib/DtSearch/dtsrve.c @@ -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 \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) { diff --git a/cde/lib/DtSearch/globals.c b/cde/lib/DtSearch/globals.c index c0bf71a9f..f3baf4008 100644 --- a/cde/lib/DtSearch/globals.c +++ b/cde/lib/DtSearch/globals.c @@ -58,7 +58,7 @@ #define _XOPEN_SOURCE #endif #include -#include +#include
FILE *aa_stderr = NULL; char *aa_argv0 = ""; diff --git a/cde/lib/DtSearch/hdecode.c b/cde/lib/DtSearch/hdecode.c index d843617e0..54252029e 100644 --- a/cde/lib/DtSearch/hdecode.c +++ b/cde/lib/DtSearch/hdecode.c @@ -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); diff --git a/cde/lib/DtSearch/hencode.c b/cde/lib/DtSearch/hencode.c index 5b42a318b..43318ad28 100644 --- a/cde/lib/DtSearch/hencode.c +++ b/cde/lib/DtSearch/hencode.c @@ -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)); diff --git a/cde/lib/DtSearch/jpn.c b/cde/lib/DtSearch/jpn.c index 286c0ef11..08629f723 100644 --- a/cde/lib/DtSearch/jpn.c +++ b/cde/lib/DtSearch/jpn.c @@ -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); diff --git a/cde/lib/DtSearch/lang.c b/cde/lib/DtSearch/lang.c index 006726978..5b2ff3f5c 100644 --- a/cde/lib/DtSearch/lang.c +++ b/cde/lib/DtSearch/lang.c @@ -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); diff --git a/cde/lib/DtSearch/mrclean.c b/cde/lib/DtSearch/mrclean.c index 05855a68e..384979680 100644 --- a/cde/lib/DtSearch/mrclean.c +++ b/cde/lib/DtSearch/mrclean.c @@ -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); diff --git a/cde/lib/DtSearch/msgutil.c b/cde/lib/DtSearch/msgutil.c index 48d27fe9e..f7da85ced 100644 --- a/cde/lib/DtSearch/msgutil.c +++ b/cde/lib/DtSearch/msgutil.c @@ -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, ""); - outofmem_msg = catgets (dtsearch_catd, MS_misc, 3, + location = CATGETS(dtsearch_catd, MS_misc, 1, ""); + 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); diff --git a/cde/lib/DtSearch/ocf.c b/cde/lib/DtSearch/ocf.c index 56ce7ae65..a56b84689 100644 --- a/cde/lib/DtSearch/ocf.c +++ b/cde/lib/DtSearch/ocf.c @@ -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, "") ,inbuf - ,(q) ? q : catgets (dtsearch_catd, MS_misc, 16, + ,(q) ? q : CATGETS(dtsearch_catd, MS_misc, 16, "") ,(OE_inittab_dir) ? OE_inittab_dir : - catgets (dtsearch_catd, MS_misc, 17, + CATGETS(dtsearch_catd, MS_misc, 17, "") ,(OE_server_dir) ? OE_server_dir : - catgets (dtsearch_catd, MS_misc, 17, + CATGETS(dtsearch_catd, MS_misc, 17, "") ); 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); diff --git a/cde/lib/DtSearch/opendblk.c b/cde/lib/DtSearch/opendblk.c index 4e41903c3..b4db2be61 100644 --- a/cde/lib/DtSearch/opendblk.c +++ b/cde/lib/DtSearch/opendblk.c @@ -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); diff --git a/cde/lib/DtSearch/vestatis.c b/cde/lib/DtSearch/vestatis.c index 82c73cdbf..038bf7f39 100644 --- a/cde/lib/DtSearch/vestatis.c +++ b/cde/lib/DtSearch/vestatis.c @@ -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; diff --git a/cde/lib/DtSvc/DtUtil2/DtGetMessage.c b/cde/lib/DtSvc/DtUtil2/DtGetMessage.c index ea67903ce..869dee448 100644 --- a/cde/lib/DtSvc/DtUtil2/DtGetMessage.c +++ b/cde/lib/DtSvc/DtUtil2/DtGetMessage.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include
#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); } diff --git a/cde/lib/DtSvc/DtUtil2/GetMessage.c b/cde/lib/DtSvc/DtUtil2/GetMessage.c index b2804f120..10b2da479 100644 --- a/cde/lib/DtSvc/DtUtil2/GetMessage.c +++ b/cde/lib/DtSvc/DtUtil2/GetMessage.c @@ -45,7 +45,7 @@ ************************************<+>*************************************/ #include -#include +#include
#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); } diff --git a/cde/lib/DtSvc/DtUtil2/MsgCat.c b/cde/lib/DtSvc/DtUtil2/MsgCat.c index dcd291d41..f34b8020b 100644 --- a/cde/lib/DtSvc/DtUtil2/MsgCat.c +++ b/cde/lib/DtSvc/DtUtil2/MsgCat.c @@ -37,11 +37,18 @@ #include #include -#include -#include -#include
-#include +#if defined(NO_XLIB) +#define _DtSvcProcessLock() +#define _DtSvcProcessUnlock() +#else +#include +#include +#endif /* NO_XLIB */ + +#include
+ +#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; +} diff --git a/cde/lib/DtTerm/Term/Term.c b/cde/lib/DtTerm/Term/Term.c index f61097120..82fdedd82 100644 --- a/cde/lib/DtTerm/Term/Term.c +++ b/cde/lib/DtTerm/Term/Term.c @@ -48,7 +48,6 @@ static char *termWhatString = _DtTermPullInTermWhatString; #include "TermPrimRenderLineDraw.h" #include "TermPrimMessageCatI.h" #include "TermPrimSelectP.h" -#include static int TextInsertProc(Widget w, unsigned char *buffer, int length); diff --git a/cde/lib/DtTerm/TermPrim/TermPrim.c b/cde/lib/DtTerm/TermPrim/TermPrim.c index 9e064a76b..16053c2c3 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrim.c +++ b/cde/lib/DtTerm/TermPrim/TermPrim.c @@ -73,7 +73,7 @@ extern char * _DtTermPrimGetMessage( char *filename, int set, int n, char *s ); #include #include #include -#include +#include
#include #if defined(__linux__) || defined(hpV4) # include /* 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); } diff --git a/cde/lib/DtWidget/DtMsgs.c b/cde/lib/DtWidget/DtMsgs.c index 6d48c7573..0384fed4e 100644 --- a/cde/lib/DtWidget/DtMsgs.c +++ b/cde/lib/DtWidget/DtMsgs.c @@ -32,7 +32,7 @@ #ifdef I18N_MSG -#include +#include
#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 */ diff --git a/cde/lib/pam/libpam/pam_framework_utils.c b/cde/lib/pam/libpam/pam_framework_utils.c index 5000e2b1a..b1e7bb06a 100644 --- a/cde/lib/pam/libpam/pam_framework_utils.c +++ b/cde/lib/pam/libpam/pam_framework_utils.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include
#include #include @@ -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); } diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_functions.C b/cde/lib/tt/bin/ttdbserverd/db_server_functions.C index 10f3270ad..2e506d336 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_functions.C +++ b/cde/lib/tt/bin/ttdbserverd/db_server_functions.C @@ -43,7 +43,6 @@ #include #include #include -#include #include "Tt/tt_c.h" #include "util/tt_file_system.h" diff --git a/cde/lib/tt/lib/util/tt_gettext.C b/cde/lib/tt/lib/util/tt_gettext.C index bce28adb4..17119d55c 100644 --- a/cde/lib/tt/lib/util/tt_gettext.C +++ b/cde/lib/tt/lib/util/tt_gettext.C @@ -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, diff --git a/cde/lib/tt/slib/mp_s_mp.C b/cde/lib/tt/slib/mp_s_mp.C index 0a32e7f66..e60f0eff2 100644 --- a/cde/lib/tt/slib/mp_s_mp.C +++ b/cde/lib/tt/slib/mp_s_mp.C @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index 72d977a09..222735725 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include
#include #include #include /* for MAXPATHLEN and MAXHOSTNAMELEN */ diff --git a/cde/programs/dtaction/demo/dtactiondemo.c b/cde/programs/dtaction/demo/dtactiondemo.c index d1c71308d..f9e31468e 100644 --- a/cde/programs/dtaction/demo/dtactiondemo.c +++ b/cde/programs/dtaction/demo/dtactiondemo.c @@ -54,7 +54,7 @@ #include #include -#include +#include
#include #include diff --git a/cde/programs/dtappbuilder/src/ab/ab_bil.c b/cde/programs/dtappbuilder/src/ab/ab_bil.c index 27e1bd094..42fd7fa30 100644 --- a/cde/programs/dtappbuilder/src/ab/ab_bil.c +++ b/cde/programs/dtappbuilder/src/ab/ab_bil.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/ab_dnd.c b/cde/programs/dtappbuilder/src/ab/ab_dnd.c index ce4f68e83..edb81c561 100644 --- a/cde/programs/dtappbuilder/src/ab/ab_dnd.c +++ b/cde/programs/dtappbuilder/src/ab/ab_dnd.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/abobj_edit.c b/cde/programs/dtappbuilder/src/ab/abobj_edit.c index 68545d58d..180f329b8 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_edit.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_edit.c @@ -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) diff --git a/cde/programs/dtappbuilder/src/ab/abobj_menu.c b/cde/programs/dtappbuilder/src/ab/abobj_menu.c index 8865aaabd..d892320fe 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_menu.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_menu.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/ab/abobj_util.c b/cde/programs/dtappbuilder/src/ab/abobj_util.c index c12071ff3..e686276a2 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_util.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_util.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/appfw_stubs.c b/cde/programs/dtappbuilder/src/ab/appfw_stubs.c index 81287465c..15dfbc737 100644 --- a/cde/programs/dtappbuilder/src/ab/appfw_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/appfw_stubs.c @@ -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 diff --git a/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c index c31445b82..5377bc44d 100644 --- a/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/ab/brws.c b/cde/programs/dtappbuilder/src/ab/brws.c index f71a872f2..0896c1113 100644 --- a/cde/programs/dtappbuilder/src/ab/brws.c +++ b/cde/programs/dtappbuilder/src/ab/brws.c @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/brws_find.c b/cde/programs/dtappbuilder/src/ab/brws_find.c index b5ddb1194..8649fa455 100644 --- a/cde/programs/dtappbuilder/src/ab/brws_find.c +++ b/cde/programs/dtappbuilder/src/ab/brws_find.c @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/brws_stubs.c b/cde/programs/dtappbuilder/src/ab/brws_stubs.c index 27e9aa4d5..2230fb102 100644 --- a/cde/programs/dtappbuilder/src/ab/brws_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/brws_stubs.c @@ -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, diff --git a/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c b/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c index 22b73de1c..64189ab24 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_env_stubs.c @@ -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 { diff --git a/cde/programs/dtappbuilder/src/ab/cgen_utils.c b/cde/programs/dtappbuilder/src/ab/cgen_utils.c index 6b9e32ad2..5e477ecf2 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_utils.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_utils.c @@ -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" diff --git a/cde/programs/dtappbuilder/src/ab/conn_obj.c b/cde/programs/dtappbuilder/src/ab/conn_obj.c index 1d267ecd3..d90ffed18 100644 --- a/cde/programs/dtappbuilder/src/ab/conn_obj.c +++ b/cde/programs/dtappbuilder/src/ab/conn_obj.c @@ -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; } diff --git a/cde/programs/dtappbuilder/src/ab/conn_stubs.c b/cde/programs/dtappbuilder/src/ab/conn_stubs.c index 5b2370c00..f398fabdc 100644 --- a/cde/programs/dtappbuilder/src/ab/conn_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/conn_stubs.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c index 2c19af762..e5c52fba3 100644 --- a/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c @@ -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\ diff --git a/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src b/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src index de2669756..8777fb25f 100644 --- a/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src +++ b/cde/programs/dtappbuilder/src/ab/dtbuilder.c.src @@ -53,7 +53,7 @@ #include
#include
#include
-#include +#include
#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, diff --git a/cde/programs/dtappbuilder/src/ab/dtbuilder.h b/cde/programs/dtappbuilder/src/ab/dtbuilder.h index 08bd5c328..0b341b791 100644 --- a/cde/programs/dtappbuilder/src/ab/dtbuilder.h +++ b/cde/programs/dtappbuilder/src/ab/dtbuilder.h @@ -42,7 +42,7 @@ #include #include -#include +#include
#define DTB_PROJECT_CATALOG "dtbuilder" /* Handle for standard message catalog for the project */ extern nl_catd Dtb_project_catd; diff --git a/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c index 224cafc0c..658aaafb3 100644 --- a/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/help_ed_stubs.c @@ -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."); } } diff --git a/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c b/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c index b002c8a6a..7840fa960 100644 --- a/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/message_ed_stubs.c @@ -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 diff --git a/cde/programs/dtappbuilder/src/ab/pal_button.c b/cde/programs/dtappbuilder/src/ab/pal_button.c index 70d70447d..cf97a68fc 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_button.c +++ b/cde/programs/dtappbuilder/src/ab/pal_button.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_choice.c b/cde/programs/dtappbuilder/src/ab/pal_choice.c index eb8a77311..592ae8fd2 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_choice.c +++ b/cde/programs/dtappbuilder/src/ab/pal_choice.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_combobox.c b/cde/programs/dtappbuilder/src/ab/pal_combobox.c index 838ede49d..371002317 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_combobox.c +++ b/cde/programs/dtappbuilder/src/ab/pal_combobox.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_create.c b/cde/programs/dtappbuilder/src/ab/pal_create.c index a70996865..1a94065f7 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_create.c +++ b/cde/programs/dtappbuilder/src/ab/pal_create.c @@ -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 */ diff --git a/cde/programs/dtappbuilder/src/ab/pal_custdlg.c b/cde/programs/dtappbuilder/src/ab/pal_custdlg.c index ae1913ae8..690ac5fc7 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_custdlg.c +++ b/cde/programs/dtappbuilder/src/ab/pal_custdlg.c @@ -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++) diff --git a/cde/programs/dtappbuilder/src/ab/pal_fchooser.c b/cde/programs/dtappbuilder/src/ab/pal_fchooser.c index 0bccdf06c..1861208d1 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_fchooser.c +++ b/cde/programs/dtappbuilder/src/ab/pal_fchooser.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_label.c b/cde/programs/dtappbuilder/src/ab/pal_label.c index 698f942f2..820db8326 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_label.c +++ b/cde/programs/dtappbuilder/src/ab/pal_label.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_list.c b/cde/programs/dtappbuilder/src/ab/pal_list.c index 5146c2a88..d2a7f9bb7 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_list.c +++ b/cde/programs/dtappbuilder/src/ab/pal_list.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_mainwin.c b/cde/programs/dtappbuilder/src/ab/pal_mainwin.c index 40988f898..070c62746 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_mainwin.c +++ b/cde/programs/dtappbuilder/src/ab/pal_mainwin.c @@ -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")); diff --git a/cde/programs/dtappbuilder/src/ab/pal_menu.c b/cde/programs/dtappbuilder/src/ab/pal_menu.c index c83b4453e..cf3fb02df 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_menu.c +++ b/cde/programs/dtappbuilder/src/ab/pal_menu.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_menubar.c b/cde/programs/dtappbuilder/src/ab/pal_menubar.c index d40d52ff3..4ef57806a 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_menubar.c +++ b/cde/programs/dtappbuilder/src/ab/pal_menubar.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_scale.c b/cde/programs/dtappbuilder/src/ab/pal_scale.c index 4d26426cd..6f2ed0c8c 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_scale.c +++ b/cde/programs/dtappbuilder/src/ab/pal_scale.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_sep.c b/cde/programs/dtappbuilder/src/ab/pal_sep.c index b945acc83..1ba8808f3 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_sep.c +++ b/cde/programs/dtappbuilder/src/ab/pal_sep.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_spinbox.c b/cde/programs/dtappbuilder/src/ab/pal_spinbox.c index 4dbaa0367..636798f2b 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_spinbox.c +++ b/cde/programs/dtappbuilder/src/ab/pal_spinbox.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/pal_textf.c b/cde/programs/dtappbuilder/src/ab/pal_textf.c index 6eb4a8015..5506f37d4 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_textf.c +++ b/cde/programs/dtappbuilder/src/ab/pal_textf.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/proj.c b/cde/programs/dtappbuilder/src/ab/proj.c index efe4ef478..e109d0e9a 100644 --- a/cde/programs/dtappbuilder/src/ab/proj.c +++ b/cde/programs/dtappbuilder/src/ab/proj.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/projP_utils.c b/cde/programs/dtappbuilder/src/ab/projP_utils.c index 8b3342739..6e12bd8c9 100644 --- a/cde/programs/dtappbuilder/src/ab/projP_utils.c +++ b/cde/programs/dtappbuilder/src/ab/projP_utils.c @@ -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); } diff --git a/cde/programs/dtappbuilder/src/ab/proj_stubs.c b/cde/programs/dtappbuilder/src/ab/proj_stubs.c index d38f2531b..dffb0a2d0 100644 --- a/cde/programs/dtappbuilder/src/ab/proj_stubs.c +++ b/cde/programs/dtappbuilder/src/ab/proj_stubs.c @@ -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 */ diff --git a/cde/programs/dtappbuilder/src/ab/proj_utils.c b/cde/programs/dtappbuilder/src/ab/proj_utils.c index 448caebab..5e185de92 100644 --- a/cde/programs/dtappbuilder/src/ab/proj_utils.c +++ b/cde/programs/dtappbuilder/src/ab/proj_utils.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/ab/prop.c b/cde/programs/dtappbuilder/src/ab/prop.c index 41b0fd37e..68a7d7e69 100644 --- a/cde/programs/dtappbuilder/src/ab/prop.c +++ b/cde/programs/dtappbuilder/src/ab/prop.c @@ -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")); } diff --git a/cde/programs/dtappbuilder/src/ab/prop_items.c b/cde/programs/dtappbuilder/src/ab/prop_items.c index fdec6ccd6..88ff50232 100644 --- a/cde/programs/dtappbuilder/src/ab/prop_items.c +++ b/cde/programs/dtappbuilder/src/ab/prop_items.c @@ -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), diff --git a/cde/programs/dtappbuilder/src/abmf/ab_func_strings.c b/cde/programs/dtappbuilder/src/abmf/ab_func_strings.c index a86a87cf4..554c9332f 100644 --- a/cde/programs/dtappbuilder/src/abmf/ab_func_strings.c +++ b/cde/programs/dtappbuilder/src/abmf/ab_func_strings.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include
#include #include #include diff --git a/cde/programs/dtappbuilder/src/abmf/abmf.c b/cde/programs/dtappbuilder/src/abmf/abmf.c index 5e64524c7..ac640f917 100644 --- a/cde/programs/dtappbuilder/src/abmf/abmf.c +++ b/cde/programs/dtappbuilder/src/abmf/abmf.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include
#include #include #include @@ -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; } diff --git a/cde/programs/dtappbuilder/src/abmf/abmfP.h b/cde/programs/dtappbuilder/src/abmf/abmfP.h index a7a399627..30bbd988d 100644 --- a/cde/programs/dtappbuilder/src/abmf/abmfP.h +++ b/cde/programs/dtappbuilder/src/abmf/abmfP.h @@ -51,7 +51,7 @@ #include /* FILE*, BUFSIZ */ #include #include /* MAXPATHLEN, ... */ -#include +#include
#include #include #include diff --git a/cde/programs/dtappbuilder/src/abmf/generate_code.c b/cde/programs/dtappbuilder/src/abmf/generate_code.c index 72e493579..d92eb60ba 100644 --- a/cde/programs/dtappbuilder/src/abmf/generate_code.c +++ b/cde/programs/dtappbuilder/src/abmf/generate_code.c @@ -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; diff --git a/cde/programs/dtappbuilder/src/abmf/instances.c b/cde/programs/dtappbuilder/src/abmf/instances.c index f878dbe47..a1cc09f15 100644 --- a/cde/programs/dtappbuilder/src/abmf/instances.c +++ b/cde/programs/dtappbuilder/src/abmf/instances.c @@ -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: 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); } diff --git a/cde/programs/dtappbuilder/src/abmf/msg_cvt.c b/cde/programs/dtappbuilder/src/abmf/msg_cvt.c index 25c969742..b16e818fd 100644 --- a/cde/programs/dtappbuilder/src/abmf/msg_cvt.c +++ b/cde/programs/dtappbuilder/src/abmf/msg_cvt.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/abmf/proj_c_file.c b/cde/programs/dtappbuilder/src/abmf/proj_c_file.c index 86b6ecc00..47a2bd934 100644 --- a/cde/programs/dtappbuilder/src/abmf/proj_c_file.c +++ b/cde/programs/dtappbuilder/src/abmf/proj_c_file.c @@ -136,7 +136,7 @@ static char *Session_Includes[] = */ static char *I18n_Includes[] = { - "", + "
", 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, diff --git a/cde/programs/dtappbuilder/src/abmf/proj_header_file.c b/cde/programs/dtappbuilder/src/abmf/proj_header_file.c index 8489ab2e0..f20774535 100644 --- a/cde/programs/dtappbuilder/src/abmf/proj_header_file.c +++ b/cde/programs/dtappbuilder/src/abmf/proj_header_file.c @@ -81,7 +81,7 @@ static int write_i18n_declarations(GenCodeInfo genCodeInfo, ABObj project); */ static char *I18n_Includes[] = { - "", + "
", NULL, }; diff --git a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c index c8816297c..768f6a5ce 100644 --- a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c +++ b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c @@ -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); diff --git a/cde/programs/dtappbuilder/src/abmf/utils.c b/cde/programs/dtappbuilder/src/abmf/utils.c index 6de3f0d1c..6cfd7f2f0 100644 --- a/cde/programs/dtappbuilder/src/abmf/utils.c +++ b/cde/programs/dtappbuilder/src/abmf/utils.c @@ -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; } diff --git a/cde/programs/dtappbuilder/src/include/ab_private/ab.h b/cde/programs/dtappbuilder/src/include/ab_private/ab.h index f1456a8d2..f2ee4d167 100644 --- a/cde/programs/dtappbuilder/src/include/ab_private/ab.h +++ b/cde/programs/dtappbuilder/src/include/ab_private/ab.h @@ -47,11 +47,11 @@ #define _AB_H_ #include -#include /* Necessary for message I18N */ #include #include #include -#include
/* for version information */ +#include
/* for version information */ +#include
/* for message I18N */ #define MODE_BUILD 1 diff --git a/cde/programs/dtappbuilder/src/libABil/bilP.h b/cde/programs/dtappbuilder/src/libABil/bilP.h index c0c196924..227f6c1a7 100644 --- a/cde/programs/dtappbuilder/src/libABil/bilP.h +++ b/cde/programs/dtappbuilder/src/libABil/bilP.h @@ -46,8 +46,8 @@ #define _ABIL_BIL_P_H_ #include -#include -#include "bil_parse.h" +#include
+#include #include #include #include "loadP.h" diff --git a/cde/programs/dtappbuilder/src/libABil/bil_lexer.c b/cde/programs/dtappbuilder/src/libABil/bil_lexer.c index 5ee3817a2..2f031d6bc 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_lexer.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_lexer.c @@ -260,7 +260,7 @@ get_keyword(FILE *file, int lastChar) */ char msg[256]; sprintf(msg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 35, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 35, "unknown keyword - %s"), tokenText); abil_print_custom_load_err(msg); @@ -378,7 +378,7 @@ yyerror(const char *message) if (strlen(tokenText) > 0) { sprintf(tokenMsg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 37, ", near '%s'"), + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 37, ", near '%s'"), tokenText); } sprintf(errMsg, "%s%s\n", message, tokenMsg); diff --git a/cde/programs/dtappbuilder/src/libABil/bil_loadatt.c b/cde/programs/dtappbuilder/src/libABil/bil_loadatt.c index 52b13e1cf..f9335487a 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_loadatt.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_loadatt.c @@ -1352,7 +1352,7 @@ bilP_load_att_name(BIL_TOKEN valueToken) obj_name = obj_get_name(load_obj); sprintf(msg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 36, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 36, "Duplicate name. Changed to %s.\n\t(This may be a conflict with the interface or project name)\n"), obj_name); abil_print_custom_load_err(msg); } @@ -1986,7 +1986,7 @@ bilP_load_att_type(BIL_TOKEN valueToken) /* REMIND: make cat entry! sprintf(msg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 36, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 36, "Duplicate name. Changed to %s.\n\t(This may be a conflict with the interface or project name)\n"), obj_name); */ @@ -2139,7 +2139,7 @@ bilP_load_list_value(BIL_TOKEN token) obj_set_drag_types(loadObj, dndTypeFlag); else util_dprintf(1, "%s", - abil_loadmsg(catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 48, + abil_loadmsg(CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 48, "only 1 drag-type allowed - discarding additional drag-type"))); break; diff --git a/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c b/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c index a25ce720c..4bcf2c62a 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c @@ -209,7 +209,7 @@ bil_load_file( if (bilP_load.project == NULL) { LoadErr = TRUE; - sprintf(Buf, "%s", catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 39, + sprintf(Buf, "%s", CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 39, "Unable to load project.")); errmsg = Buf; goto epilogue; diff --git a/cde/programs/dtappbuilder/src/libABil/bil_store.c b/cde/programs/dtappbuilder/src/libABil/bil_store.c index ab45f2495..47b6c0eb5 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_store.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_store.c @@ -265,7 +265,7 @@ attr_is_undef( if ( obj_get_packing(obj) == AB_PACK_UNDEF ) { util_error( - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 41, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 41, "packing is undefined\n")); return (True); } @@ -285,7 +285,7 @@ attr_is_undef( if ( obj_get_menu_type(obj) == AB_MENU_UNDEF ) { util_error( - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 42, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 42, "menu type is undefined\n")); return (True); } @@ -299,7 +299,7 @@ attr_is_undef( if (obj_get_ref_point(obj) == AB_CP_UNDEF) { util_error( - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 42, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 42, "reference point is undefined\n")); return (True); } @@ -3195,7 +3195,7 @@ store_project_tree( else { util_printf_err( - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 45, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 45, "Cannot save project; Either nothing to store or NULL filename.")); } diff --git a/cde/programs/dtappbuilder/src/libABil/bil_test.c b/cde/programs/dtappbuilder/src/libABil/bil_test.c index 5a9a0c695..834270292 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_test.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_test.c @@ -49,7 +49,7 @@ #include #include -#include +#include
#include #include #include diff --git a/cde/programs/dtappbuilder/src/libABil/load.c b/cde/programs/dtappbuilder/src/libABil/load.c index 3b75ff4d2..177db61f7 100644 --- a/cde/programs/dtappbuilder/src/libABil/load.c +++ b/cde/programs/dtappbuilder/src/libABil/load.c @@ -82,28 +82,28 @@ abil_loadmsg(STRING userMessage) if (*File != 0) { sprintf(tmpMsg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 27, "file: %s"), + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 27, "file: %s"), File); strcat(msg, tmpMsg); } if (lineNumber > 0) { sprintf(tmpMsg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 28, ", line: %d"), + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 28, ", line: %d"), lineNumber); strcat(msg, tmpMsg); } if (*Current_Object != 0) { sprintf(tmpMsg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET,29, ", object: %s"), + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET,29, ", object: %s"), Current_Object); strcat(msg, tmpMsg); } if (*Attribute != 0) { sprintf(tmpMsg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 30, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 30, ", attribute: %s"), Attribute); strcat(msg, tmpMsg); @@ -111,23 +111,23 @@ abil_loadmsg(STRING userMessage) if (*Action_Attr != 0) { sprintf(tmpMsg, - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 31, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 31, ", action-attribute: %s"), Action_Attr); strcat(msg, tmpMsg); } - strcat(msg, catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 32, ", ")); + strcat(msg, CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 32, ", ")); if ( (userMessage == 0) || (*userMessage == 0) ) { - strcat(msg, catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 33, + strcat(msg, CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 33, "syntax error")); } else { strcat(msg, userMessage); } - strcat(msg, catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 34, "\n")); + strcat(msg, CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 34, "\n")); return msg; } @@ -238,12 +238,12 @@ abil_print_load_err(int errmsg) if (!abil_loadmsg_err_printed()) { if(Errormsg[errmsg].msg_id < 0) { - snprintf(msg, sizeof(msg), "%s", catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 33, + snprintf(msg, sizeof(msg), "%s", CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, 33, "syntax error")); } else { snprintf(msg, sizeof(msg), "%s", - catgets(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, + CATGETS(ABIL_MESSAGE_CATD, ABIL_MESSAGE_SET, Errormsg[errmsg].msg_id, Errormsg[errmsg].def_str)); } diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxmP.h b/cde/programs/dtappbuilder/src/libABobjXm/objxmP.h index 5ab650ae7..3a8d9fddc 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxmP.h +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxmP.h @@ -47,7 +47,7 @@ #define _OBJXM_P_H_ #include -#include +#include
#include #include diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c index 0f79fd0e7..7598c9659 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c @@ -546,7 +546,7 @@ objxm_comp_set_color_args( if (status == ERR) /* Color couldn't be allocated! */ { obj_get_safe_name(rootObj, name, 256); - util_printf_err(catgets(OBJXM_MESSAGE_CATD, + util_printf_err(CATGETS(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 21, "WARNING: Object '%s'\nCould not allocate Background color \"%s\".\n\ Object's Background will default to white."), @@ -572,7 +572,7 @@ Object's Background will default to white."), if (status == ERR) /* Color couldn't be allocated! */ { obj_get_safe_name(rootObj, name, 256); - util_printf_err(catgets(OBJXM_MESSAGE_CATD, + util_printf_err(CATGETS(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 22, "WARNING: Object '%s'\nCould not allocate Foreground color \"%s\".\n\ Object's Foreground will default to black."), @@ -1667,7 +1667,7 @@ objxmP_set_attachment_arg( { char name[256]; obj_get_safe_name(obj, name, 256); - util_printf_err(catgets(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 3, + util_printf_err(CATGETS(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 3, "ERROR: %s: NULL Object attachment\n"), name); } break; diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c index 4dce682f5..7c67138ac 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_config.c @@ -309,7 +309,7 @@ xm_configure_tree( if (configCount!= numSalientObjs) { fprintf(stderr, "%s", - catgets(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 8, + CATGETS(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 8, "INTERNAL ERROR: salient counts don't match.\n") ); iRetVal= -1; goto epilogue; @@ -471,7 +471,7 @@ objxm_comp_get_subobj( char name[256]; obj_get_safe_name(obj, name, 256); fprintf(stderr, - catgets(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 9, + CATGETS(OBJXM_MESSAGE_CATD, OBJXM_MESSAGE_SET, 9, "ERROR: objxm_comp_get_subobj - object not xmconfigured: %s\n"), name); diff --git a/cde/programs/dtappbuilder/src/libABobjXm/objxm_util.c b/cde/programs/dtappbuilder/src/libABobjXm/objxm_util.c index 50e8345e8..894922396 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/objxm_util.c +++ b/cde/programs/dtappbuilder/src/libABobjXm/objxm_util.c @@ -219,25 +219,25 @@ objxm_pixmap_conversion_error_msg( char file_buf[BUF_SIZE]; if (obj != NULL) - sprintf(buf, catgets(OBJXM_MESSAGE_CATD, 203, 14, + sprintf(buf, CATGETS(OBJXM_MESSAGE_CATD, 203, 14, "Warning: %s :\n"), util_strsafe(obj_get_name(obj))); else strcpy(buf, ""); - sprintf(buf2, catgets(OBJXM_MESSAGE_CATD, 203, 15, + sprintf(buf2, CATGETS(OBJXM_MESSAGE_CATD, 203, 15, "Graphic File base '%s'\ncould not be converted to a Pixmap because\n"), filebase); strcat(buf, buf2); if (status == ERR_BAD_PARAM2) - strcat(buf, catgets(OBJXM_MESSAGE_CATD, 203, 16, + strcat(buf, CATGETS(OBJXM_MESSAGE_CATD, 203, 16, "File base is an empty string.")); else { - strcat(buf, catgets(OBJXM_MESSAGE_CATD, 203, 17, + strcat(buf, CATGETS(OBJXM_MESSAGE_CATD, 203, 17, "None of the following files could be converted to a Pixmap:\n")); if ((int)(strlen(buf) + (4 * (strlen(filebase) + 4))) > LG_BUF_SIZE) - strcat(buf, catgets(OBJXM_MESSAGE_CATD, 203, 18, + strcat(buf, CATGETS(OBJXM_MESSAGE_CATD, 203, 18, "filenames too long to display\n")); else { @@ -248,7 +248,7 @@ objxm_pixmap_conversion_error_msg( } } - util_set_help_data(catgets(OBJXM_MESSAGE_CATD, 203, 20, + util_set_help_data(CATGETS(OBJXM_MESSAGE_CATD, 203, 20, "The graphic file name specified could not be converted\ninto a pixmap. App Builder searches for a file of the\nform Filename.pm, Filename.xpm, Filename.bm, and\nFilename.xbm.\n\nEither none of those files exists in the directory specified\n(via the Graphic Filename field or if no path was specified,\nthen the current working directory), or a file exists but may\nbe corrupt."), NULL, NULL); return(buf); diff --git a/cde/programs/dtappbuilder/src/libAButil/abio.c b/cde/programs/dtappbuilder/src/libAButil/abio.c index 31f64e9a3..96a54d70f 100644 --- a/cde/programs/dtappbuilder/src/libAButil/abio.c +++ b/cde/programs/dtappbuilder/src/libAButil/abio.c @@ -1098,15 +1098,15 @@ abio_check_bil_version( STRING help_buf = NULL; STRING fileName = NULL; - fileName = name? name : catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 35, "NoName"); + fileName = name? name : CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 35, "NoName"); fileName = strdup(fileName); if (ver > Util_major_version) { - errmsg = strdup(catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 32, + errmsg = strdup(CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 32, "Incompatible BIL version")); - help_msg = catgets(UTIL_MESSAGE_CATD, + help_msg = CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 33, "The version of the BIL file %s (%3.2f)\nis not supported in this version of App Builder."); @@ -1116,10 +1116,10 @@ abio_check_bil_version( } else if (ver == 0.0) { - errmsg = strdup(catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 30, + errmsg = strdup(CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 30, "Unrecognized file format")); - help_msg = catgets(UTIL_MESSAGE_CATD, + help_msg = CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 31, "The file %s does not appear to be in BIL\nformat. Either a BIL header (:bil-version) was\nnot found or the header is corrupt."); diff --git a/cde/programs/dtappbuilder/src/libAButil/istr.c b/cde/programs/dtappbuilder/src/libAButil/istr.c index 4148c2aca..52a986519 100644 --- a/cde/programs/dtappbuilder/src/libAButil/istr.c +++ b/cde/programs/dtappbuilder/src/libAButil/istr.c @@ -167,7 +167,7 @@ istr_create ( if (insert_array(1,num_count, string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -180,7 +180,7 @@ istr_create ( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -188,7 +188,7 @@ istr_create ( if (insert_array(1,freelist[freecount-1], string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -210,7 +210,7 @@ istr_create ( if (insert_array(1, num_count, string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -223,7 +223,7 @@ istr_create ( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -232,7 +232,7 @@ istr_create ( freelist[freecount-1], string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -248,7 +248,7 @@ istr_create ( if (new_bucket == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return NULL ; } @@ -262,7 +262,7 @@ istr_create ( if (insert_array(1, num_count, string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -275,7 +275,7 @@ istr_create ( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -284,7 +284,7 @@ istr_create ( if (insert_array(1, freelist[freecount-1], string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -336,7 +336,7 @@ istrP_create_alloced_impl( if (insert_array(3,num_count, *string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -349,7 +349,7 @@ istrP_create_alloced_impl( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -357,7 +357,7 @@ istrP_create_alloced_impl( if (insert_array(3,freelist[freecount-1], *string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -379,7 +379,7 @@ istrP_create_alloced_impl( if (insert_array(3, num_count, *string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -392,7 +392,7 @@ istrP_create_alloced_impl( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -401,7 +401,7 @@ istrP_create_alloced_impl( freelist[freecount-1], *string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -417,7 +417,7 @@ istrP_create_alloced_impl( if (new_bucket == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return NULL ; } @@ -431,7 +431,7 @@ istrP_create_alloced_impl( if (insert_array(3, num_count, *string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -444,7 +444,7 @@ istrP_create_alloced_impl( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); free(new_bucket); return NULL; @@ -454,7 +454,7 @@ istrP_create_alloced_impl( if (insert_array(3, freelist[freecount-1], *string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -514,7 +514,7 @@ istr_create_const( if (insert_array(2, num_count, string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -527,7 +527,7 @@ istr_create_const( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -535,7 +535,7 @@ istr_create_const( if (insert_array(2, freelist[freecount-1], string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -557,7 +557,7 @@ istr_create_const( if (insert_array(2, num_count, string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -570,7 +570,7 @@ istr_create_const( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); return NULL; } @@ -579,7 +579,7 @@ istr_create_const( freelist[freecount-1], string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -595,7 +595,7 @@ istr_create_const( if (new_bucket == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return NULL ; } @@ -611,7 +611,7 @@ istr_create_const( if (insert_array(2, num_count, string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -624,7 +624,7 @@ istr_create_const( if(int_array[freelist[freecount-1]].refcount != 0) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2, "ISTR: error in allocating space for string\n") ); free(new_bucket); return NULL; @@ -634,7 +634,7 @@ istr_create_const( if (insert_array(2, freelist[freecount-1], string) == -1) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1, "ISTR: error in allocating to int array\n") ); return NULL; } @@ -758,7 +758,7 @@ istrP_destroy_impl( if (freelist == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return 0 ; } @@ -779,7 +779,7 @@ istrP_destroy_impl( if (freelist == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return 0 ; } @@ -938,7 +938,7 @@ insert_array( if (int_array == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return 0 ; } @@ -973,7 +973,7 @@ insert_array( if (int_array == NULL) { fprintf(stderr, "%s", - catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, + CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3, "ISTR: error in allocating memory\n") ); return 0 ; } diff --git a/cde/programs/dtappbuilder/src/libAButil/utilP.h b/cde/programs/dtappbuilder/src/libAButil/utilP.h index 18a6904a2..ff9afce32 100644 --- a/cde/programs/dtappbuilder/src/libAButil/utilP.h +++ b/cde/programs/dtappbuilder/src/libAButil/utilP.h @@ -50,7 +50,7 @@ #endif #include -#include +#include
#include /* diff --git a/cde/programs/dtappbuilder/src/libAButil/util_err.c b/cde/programs/dtappbuilder/src/libAButil/util_err.c index 2bf8b1e03..699df981b 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util_err.c +++ b/cde/programs/dtappbuilder/src/libAButil/util_err.c @@ -75,79 +75,79 @@ util_err_string(int errCode) switch (errCode) { case ERR_INTERNAL: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 4, "Internal error"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 4, "Internal error"); break; case ERR_RECURSION: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 5, "Recursive function calls"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 5, "Recursive function calls"); break; case ERR_NOT_ALLOWED: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 6, "Permission denied"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 6, "Permission denied"); break; case ERR_DATA_SPACE_FULL: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 8, "Data space is full"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 8, "Data space is full"); break; case ERR_BUFFER_TOO_SMALL: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 9, "Buffer is too small"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 9, "Buffer is too small"); break; case ERR_NOT_IMPLEMENTED: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 10, "Functionality is not implemented"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 10, "Functionality is not implemented"); break; case ERR_NOT_INITIALIZED: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 11, "Not initialized"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 11, "Not initialized"); break; case ERR_CLIENT: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 12, "Client error"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 12, "Client error"); break; case ERR_NOT_FOUND: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 13, "Not found"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 13, "Not found"); break; case ERR_DUPLICATE_KEY: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 14, "Duplicate key"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 14, "Duplicate key"); break; case ERR_BAD_PARAM: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 15, "Bad parameter"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 15, "Bad parameter"); break; case ERR_IO: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 16, "I/O error"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 16, "I/O error"); break; case ERR_FILE_NOT_FOUND: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 17, "File not found"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 17, "File not found"); break; case ERR_OPEN: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 18, "Could not open file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 18, "Could not open file"); break; case ERR_WRITE: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 19, "Could not write to file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 19, "Could not write to file"); break; case ERR_READ: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 20, "Could not read file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 20, "Could not read file"); break; case ERR_EOF: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 21, "End of file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 21, "End of file"); break; case ERR_BAD_FILE_FORMAT: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 22, "Bad file format"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 22, "Bad file format"); break; case ERR_RENAME: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 23, "Could not rename file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 23, "Could not rename file"); break; case ERR_MEMORY: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 24, "Memory error"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 24, "Memory error"); break; case ERR_NO_MEMORY: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 25, "No memory"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 25, "No memory"); break; case ERR_MEMORY_CORRUPT: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 26, "Memory is corrupt"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 26, "Memory is corrupt"); break; case ERR_MULTIPLE_FREE: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 27, "Multiple free of memory"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 27, "Multiple free of memory"); break; case ERR_READ_ONLY: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 28, "Read-only file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 28, "Read-only file"); break; case ERR_BACKUP: - err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 29, "Could not backup file"); + err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 29, "Could not backup file"); break; } diff --git a/cde/programs/dtcm/dtcm/about.c b/cde/programs/dtcm/dtcm/about.c index 45a5ea97d..5d2a3674b 100644 --- a/cde/programs/dtcm/dtcm/about.c +++ b/cde/programs/dtcm/dtcm/about.c @@ -124,7 +124,7 @@ show_about( return; } - title = XtNewString(catgets(c->DT_catd, 1, 922, "About Calendar")); + title = XtNewString(CATGETS(c->DT_catd, 1, 922, "About Calendar")); dialog = XtVaCreatePopupShell("about_dialog", xmDialogShellWidgetClass, c->frame, @@ -173,7 +173,7 @@ show_about( if (!image || image == XmUNSPECIFIED_PIXMAP) { xstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 917, "Missing\nGraphics")); + CATGETS(c->DT_catd, 1, 917, "Missing\nGraphics")); XtVaSetValues(icon_label, XmNlabelType, XmSTRING, XmNlabelString, xstr, @@ -200,7 +200,7 @@ show_about( XmNshadowType, XmSHADOW_IN, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 340, "Calendar")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 340, "Calendar")); name_label = XtVaCreateWidget("about_name_label", xmLabelWidgetClass, @@ -219,13 +219,13 @@ show_about( XmStringFree(xstr); sprintf(buf, "%s %d.%d.%d", - catgets(c->DT_catd, 1, 671, "Version"), + CATGETS(c->DT_catd, 1, 671, "Version"), DtVERSION, DtREVISION, DtUPDATE_LEVEL); #if DTCM_INTERNAL_REV > 0 strcpy(buf2, buf); sprintf(buf, "%s (%s %d)", buf2, - catgets(c->DT_catd, 1, 672, "Revision"), + CATGETS(c->DT_catd, 1, 672, "Revision"), DTCM_INTERNAL_REV); #endif @@ -248,7 +248,7 @@ show_about( XmStringFree(xstr); - sprintf(buf, "%s %d", catgets(c->DT_catd, 1, 967, + sprintf(buf, "%s %d", CATGETS(c->DT_catd, 1, 967, "Calendar Server Version"), get_server_version(c->my_cal_handle)); @@ -271,7 +271,7 @@ show_about( XmStringFree(xstr); - sprintf(buf, "%s %d", catgets(c->DT_catd, 1, 968, + sprintf(buf, "%s %d", CATGETS(c->DT_catd, 1, 968, "Calendar Data Version"), c->my_cal_version); @@ -328,7 +328,7 @@ show_about( NULL); XmStringFree(xstr); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 674, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 674, "Copyright (c) 1993, 1994, 1995:")); copyright_label = XtVaCreateWidget("copyright_label", @@ -347,7 +347,7 @@ show_about( NULL); XmStringFree(xstr); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 675, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 675, "Hewlett-Packard Company")); hp_label = XtVaCreateWidget("hp_label", @@ -366,7 +366,7 @@ show_about( NULL); XmStringFree(xstr); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 676, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 676, "International Business Machines Corp.")); ibm_label = XtVaCreateWidget("ibm_label", @@ -385,7 +385,7 @@ show_about( NULL); XmStringFree(xstr); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 677, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 677, "Novell, Inc.")); novell_label = XtVaCreateWidget("novell_label", @@ -404,7 +404,7 @@ show_about( NULL); XmStringFree(xstr); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 678, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 678, "Sun Microsystems, Inc.")); sun_label = XtVaCreateWidget("sun_label", @@ -426,7 +426,7 @@ show_about( #endif #ifdef CREDITS - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 679, "More...")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 679, "More...")); more_button = XtVaCreateWidget("more_button", xmPushButtonGadgetClass, main_form, @@ -457,7 +457,7 @@ show_about( XmNrightOffset, 0, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); close_button = XtVaCreateWidget("close_button", xmPushButtonGadgetClass, main_form, XmNlabelString, xstr, @@ -577,7 +577,7 @@ do_credits( return; } - title = XtNewString(catgets(c->DT_catd, 1, 681, "Calendar Contributors")); + title = XtNewString(CATGETS(c->DT_catd, 1, 681, "Calendar Contributors")); dialog = XtVaCreatePopupShell("contrib_dialog", xmDialogShellWidgetClass, c->frame, @@ -611,7 +611,7 @@ do_credits( if (!image || image == XmUNSPECIFIED_PIXMAP) { xstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 918, "Missing\nGraphics")); + CATGETS(c->DT_catd, 1, 918, "Missing\nGraphics")); XtVaSetValues(icon_label, XmNlabelType, XmSTRING, XmNlabelString, xstr, @@ -636,7 +636,7 @@ do_credits( XmNrightAttachment, XmATTACH_FORM, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 682, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 682, "This application was brought to you by:")); title_label = XtVaCreateWidget("title_label", @@ -679,7 +679,7 @@ do_credits( XmStringFree(xstr); } - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 1002, + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 1002, "Also contributing:")); title_label = XtVaCreateWidget("title_label", @@ -735,7 +735,7 @@ do_credits( XmNrightOffset, 0, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); close_button = XtVaCreateWidget("close_button", xmPushButtonGadgetClass, main_form, XmNlabelString, xstr, diff --git a/cde/programs/dtcm/dtcm/alarm.c b/cde/programs/dtcm/dtcm/alarm.c index 545630dce..f7631d066 100644 --- a/cde/programs/dtcm/dtcm/alarm.c +++ b/cde/programs/dtcm/dtcm/alarm.c @@ -218,7 +218,7 @@ mail_it(XtPointer client_data, XtIntervalId *interval_id, CSA_reminder_reference (appt->mail->value->item.reminder_value->reminder_data.size == 0)) { /* empty recipient */ if (debug) - fprintf(stderr, "%s", catgets(c->DT_catd, 1, 1, + fprintf(stderr, "%s", CATGETS(c->DT_catd, 1, 1, "dtcm: empty recipient in mail reminder\n")); to = appt->author->value->item.calendar_user_value->user_name; } else { @@ -229,7 +229,7 @@ mail_it(XtPointer client_data, XtIntervalId *interval_id, CSA_reminder_reference /* compose subject field */ lines = text_to_lines(appt->what->value->item.string_value, 5); - sprintf(subbuf, catgets(c->DT_catd, 1, 2, "Reminder- %s"), + sprintf(subbuf, CATGETS(c->DT_catd, 1, 2, "Reminder- %s"), (lines) ? lines->s : "\0"); /* compose message body */ @@ -256,8 +256,8 @@ mail_it(XtPointer client_data, XtIntervalId *interval_id, CSA_reminder_reference pm = (dt == HOUR12 && !adjust_hour(&hr)) ? True : False; if (dt == HOUR12) { sprintf(stopbuf, "%2d:%02d %s", hr, minute(stop), - pm ? catgets(c->DT_catd, 1, 3, "pm") : - catgets(c->DT_catd, 1, 4, "am")); + pm ? CATGETS(c->DT_catd, 1, 3, "pm") : + CATGETS(c->DT_catd, 1, 4, "am")); } else { sprintf(stopbuf, "%02d%02d", hr, minute(stop)); } @@ -280,10 +280,10 @@ mail_it(XtPointer client_data, XtIntervalId *interval_id, CSA_reminder_reference destroy_lines(lines); if (stopbuf[0] != '\0') { - sprintf(bodybuf, catgets(c->DT_catd, 1, 7, "\n\n\t** Calendar Appointment **\n\n\tDate:\t%s\n\tStart:\t%s\n\tEnd:\t%s\n\tWhat:\t%s"), + sprintf(bodybuf, CATGETS(c->DT_catd, 1, 7, "\n\n\t** Calendar Appointment **\n\n\tDate:\t%s\n\tStart:\t%s\n\tEnd:\t%s\n\tWhat:\t%s"), datebuf, startbuf, stopbuf, whatbuf); } else { - sprintf(bodybuf, catgets(c->DT_catd, 1, 1100, "\n\n\t** Calendar To Do Item **\n\n\tDue Date:\t%s\n\tTime Due:\t%s\n\tWhat:\t\t%s"), + sprintf(bodybuf, CATGETS(c->DT_catd, 1, 1100, "\n\n\t** Calendar To Do Item **\n\n\tDue Date:\t%s\n\tTime Due:\t%s\n\tWhat:\t\t%s"), datebuf, startbuf, whatbuf); } @@ -413,7 +413,7 @@ postup_show_proc(Calendar *c, CSA_reminder_reference *r) { /* ** Create the Motif objects */ - title = XtNewString(catgets(c->DT_catd, 1, 839, "Calendar : Reminder")); + title = XtNewString(CATGETS(c->DT_catd, 1, 839, "Calendar : Reminder")); pu_frame = XtVaCreatePopupShell("pu_frame", topLevelShellWidgetClass, c->postup, XmNtitle, title, @@ -456,7 +456,7 @@ postup_show_proc(Calendar *c, CSA_reminder_reference *r) { XmNfractionBase, 3, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); pu_close = XtVaCreateManagedWidget("close", xmPushButtonWidgetClass, button_form, XmNtopAttachment, XmATTACH_FORM, @@ -590,12 +590,12 @@ postup_show_proc(Calendar *c, CSA_reminder_reference *r) { $6 -> am or pm */ - char *am = XtNewString(catgets(c->DT_catd, + char *am = XtNewString(CATGETS(c->DT_catd, 1, 4, "am")); - char *pm = XtNewString(catgets(c->DT_catd, + char *pm = XtNewString(CATGETS(c->DT_catd, 1, 3, "pm")); stop_am = adjust_hour(&stop_hr); - sprintf(text, catgets(c->DT_catd, 1, 1087, + sprintf(text, CATGETS(c->DT_catd, 1, 1087, "From %1$2d:%2$02d%3$s to %4$2d:%5$02d%6$s"), start_hr, minute(st), (start_am) ? am : pm, @@ -624,10 +624,10 @@ postup_show_proc(Calendar *c, CSA_reminder_reference *r) { */ char *meridian = XtNewString ((start_am) ? - catgets(c->DT_catd, 1, 4, "am"): - catgets(c->DT_catd, 1, 3, "pm")); + CATGETS(c->DT_catd, 1, 4, "am"): + CATGETS(c->DT_catd, 1, 3, "pm")); - sprintf(text, catgets(c->DT_catd, 1, 1088, + sprintf(text, CATGETS(c->DT_catd, 1, 1088, "%1$2d:%2$02d%3$s"), start_hr, minute(st), meridian ); @@ -654,7 +654,7 @@ postup_show_proc(Calendar *c, CSA_reminder_reference *r) { $4 -> stop minute */ - sprintf(text, catgets(c->DT_catd, 1, 1089, + sprintf(text, CATGETS(c->DT_catd, 1, 1089, "From %1$02d%2$02d to %3$02d%4$02d"), start_hr, minute(st), stop_hr, minute(sp)); @@ -677,7 +677,7 @@ postup_show_proc(Calendar *c, CSA_reminder_reference *r) { $2 -> start minute */ - sprintf(text, catgets(c->DT_catd, 1, 1090, + sprintf(text, CATGETS(c->DT_catd, 1, 1090, "%1$02d%2$02d"), start_hr, minute(st)); } diff --git a/cde/programs/dtcm/dtcm/blist.c b/cde/programs/dtcm/dtcm/blist.c index 98139a739..dd33a40fe 100644 --- a/cde/programs/dtcm/dtcm/blist.c +++ b/cde/programs/dtcm/dtcm/blist.c @@ -96,7 +96,7 @@ bl_pending_change(Widget w, XtPointer data, XtPointer cbs) { of the string so the footer will use two lines and the editor will grow vertically. */ - set_message(bl->message, catgets(c->DT_catd, 1, 841, "Click on \"Add Name\" to add a name, \"Apply\" to commit changes.")); + set_message(bl->message, CATGETS(c->DT_catd, 1, 841, "Click on \"Add Name\" to add a name, \"Apply\" to commit changes.")); bl->bl_pending_message_up = True; XtSetSensitive(bl->add_button, True); } @@ -163,14 +163,14 @@ blist_removenames(Widget widget, XtPointer client_data, XtPointer call_data) { set_message(bl->message, " "); XmListGetSelectedPos(bl->browse_list, &pos_list, &pos_cnt); if (pos_cnt <= 0) { - set_message(bl->message, catgets(calendar->DT_catd, 1, 17, + set_message(bl->message, CATGETS(calendar->DT_catd, 1, 17, "Select a name to remove")); return; } for (i = 0; i < pos_cnt; i++) { if (pos_list[i] == 1) { - set_message(bl->message, catgets(calendar->DT_catd, 1, + set_message(bl->message, CATGETS(calendar->DT_catd, 1, 16, "You may not remove the default calendar")); rejected_name++; continue; @@ -294,13 +294,13 @@ blist_addname(Widget widget, XtPointer client_data, XtPointer cbs) { if (blank_buf(new_name)) { - set_message(bl->message, catgets(c->DT_catd, 1, 603, + set_message(bl->message, CATGETS(c->DT_catd, 1, 603, "Type a name to add in the User Name field")); return; } if (embedded_blank(new_name)) { - set_message(bl->message, catgets(c->DT_catd, 1, 684, + set_message(bl->message, CATGETS(c->DT_catd, 1, 684, "User Names may not have embedded blanks or tabs")); return; } @@ -313,7 +313,7 @@ blist_addname(Widget widget, XtPointer client_data, XtPointer cbs) { cm_select_text(bl->username, e->xbutton.time); } else { sprintf(buf, "%s %s", new_name, - catgets(c->DT_catd, 1, 604, "is already in the list")); + CATGETS(c->DT_catd, 1, 604, "is already in the list")); set_message(bl->message, buf); } XtVaSetValues(bl->form, XmNresizePolicy, XmRESIZE_ANY, NULL); @@ -546,7 +546,7 @@ make_browselist(Calendar *c) if (!bl) return; - title = XtNewString(catgets(c->DT_catd, 1, 963, + title = XtNewString(CATGETS(c->DT_catd, 1, 963, "Calendar : Menu Editor")); bl->frame = XtVaCreatePopupShell("menu_editor_frame", xmDialogShellWidgetClass, c->frame, @@ -565,7 +565,7 @@ make_browselist(Calendar *c) NULL); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 410, "User Name:")); + CATGETS(c->DT_catd, 1, 410, "User Name:")); bl->username_label = XtVaCreateWidget("name_label", xmLabelGadgetClass, bl->form, XmNlabelString, label_str, @@ -582,7 +582,7 @@ make_browselist(Calendar *c) bl->edit_rc_mgr = XmCreateRowColumn(bl->form, "edit_rc_mgr", args, ac); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 686, "Add Name")); + CATGETS(c->DT_catd, 1, 686, "Add Name")); bl->add_button = XtVaCreateWidget("add_button", xmPushButtonWidgetClass, bl->edit_rc_mgr, XmNlabelString, label_str, @@ -593,7 +593,7 @@ make_browselist(Calendar *c) blist_addname, (XtPointer)c); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 687, "Remove Name")); + CATGETS(c->DT_catd, 1, 687, "Remove Name")); bl->remove_button = XtVaCreateWidget("remove_button", xmPushButtonWidgetClass, bl->edit_rc_mgr, XmNlabelString, label_str, @@ -632,7 +632,7 @@ make_browselist(Calendar *c) NULL); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 688, "Browse Menu Items")); + CATGETS(c->DT_catd, 1, 688, "Browse Menu Items")); bl->list_label = XtVaCreateWidget("list_label", xmLabelWidgetClass, bl->form, XmNlabelString, label_str, @@ -671,7 +671,7 @@ make_browselist(Calendar *c) XmNbottomOffset, 5, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 655, "OK")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 655, "OK")); bl->ok_button = XtVaCreateWidget("ok_button", xmPushButtonWidgetClass, button_form, @@ -689,7 +689,7 @@ make_browselist(Calendar *c) (XtPointer)c); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 460, "Apply")); + CATGETS(c->DT_catd, 1, 460, "Apply")); bl->apply_button = XtVaCreateWidget("apply_button", xmPushButtonWidgetClass, button_form, @@ -707,7 +707,7 @@ make_browselist(Calendar *c) (XtPointer)c); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 691, "Reset")); + CATGETS(c->DT_catd, 1, 691, "Reset")); bl->reset_button = XtVaCreateWidget("reset_button", xmPushButtonWidgetClass, button_form, @@ -725,7 +725,7 @@ make_browselist(Calendar *c) blist_reset_cb, (XtPointer)c); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 923, "Cancel")); + CATGETS(c->DT_catd, 1, 923, "Cancel")); bl->cancel_button = XtVaCreateWidget("cancel_button", xmPushButtonWidgetClass, button_form, @@ -742,7 +742,7 @@ make_browselist(Calendar *c) XtAddCallback(bl->cancel_button, XmNactivateCallback, blist_cancel_cb, (XtPointer)c); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); bl->help_button = XtVaCreateWidget("help_button", xmPushButtonWidgetClass, button_form, diff --git a/cde/programs/dtcm/dtcm/browser.c b/cde/programs/dtcm/dtcm/browser.c index 736038694..8ab86f1b8 100644 --- a/cde/programs/dtcm/dtcm/browser.c +++ b/cde/programs/dtcm/dtcm/browser.c @@ -163,11 +163,11 @@ static void invalid_date_msg(Calendar *c, Widget widget) { Browser *b = (Browser*)c->browser; - char *title = XtNewString(catgets(c->DT_catd, 1, 1070, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1070, "Calendar : Error - Compare Calendars")); - char *text = XtNewString(catgets(c->DT_catd, 1, 20, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 20, "Invalid Date In Go To Field.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(b->frame, DIALOG_TITLE, title, @@ -271,7 +271,7 @@ make_browser(Calendar *c) upform_min = 200; } - title = XtNewString(catgets(c->DT_catd, 1, 1010, + title = XtNewString(CATGETS(c->DT_catd, 1, 1010, "Calendar : Compare Calendars")); b->frame = XtVaCreatePopupShell("frame", xmDialogShellWidgetClass, c->frame, @@ -308,7 +308,7 @@ make_browser(Calendar *c) XmNpaneMinimum, upform_min, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 22, "Browse Menu Items")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 22, "Browse Menu Items")); b->list_label = XtVaCreateWidget("browseMenuLabel", xmLabelGadgetClass, b->upper_form, XmNlabelString, xmstr, @@ -318,7 +318,7 @@ make_browser(Calendar *c) NULL); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 21, "Edit List...")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 21, "Edit List...")); b->edit_list = XtVaCreateWidget("editList", xmPushButtonGadgetClass, b->upper_form, XmNlabelString, xmstr, @@ -361,17 +361,17 @@ make_browser(Calendar *c) * Create the "go to" option menu for time navigation */ prev_week = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 23, "Prev Week")); + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 23, "Prev Week")); this_week = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 24, "This Week")); + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 24, "This Week")); next_week = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 25, "Next Week")); + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 25, "Next Week")); prev_month = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 26, "Prev Month")); + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 26, "Prev Month")); next_month = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 27, "Next Month")); + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 27, "Next Month")); goto_label = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 28, "Go To:")); + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 28, "Go To:")); /* * remember - this returns a RowColumn widget! @@ -452,7 +452,7 @@ make_browser(Calendar *c) xmFormWidgetClass, b->outer_pane, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 29, "Schedule...")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 29, "Schedule...")); b->schedule = XtVaCreateWidget("schedule", xmPushButtonGadgetClass, b->action, XmNlabelString, xmstr, @@ -462,7 +462,7 @@ make_browser(Calendar *c) XmStringFree(xmstr); XtAddCallback(b->schedule, XmNactivateCallback, schedule_cb, (XtPointer)c); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 30, "Mail...")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 30, "Mail...")); b->mail = XtVaCreateWidget("mail", xmPushButtonGadgetClass, b->action, XmNlabelString, xmstr, @@ -475,7 +475,7 @@ make_browser(Calendar *c) XtSetSensitive(b->mail, c->tt_procid == NULL ? False : True); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); b->cancel = XtVaCreateWidget("cancel", xmPushButtonGadgetClass, b->action, XmNlabelString, xmstr, @@ -486,7 +486,7 @@ make_browser(Calendar *c) XmStringFree(xmstr); XtAddCallback(b->cancel, XmNactivateCallback, cancel_cb, (XtPointer)c); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); b->helpbutton = XtVaCreateWidget("help", xmPushButtonGadgetClass, b->action, XmNlabelString, xmstr, @@ -693,10 +693,10 @@ mb_display_footermess(Browser *b, Calendar *c) XtVaGetValues(b->browse_list, XmNselectedItemCount, &num_cals, NULL); if (num_cals == 1) sprintf(buf, "%d %s", num_cals, - catgets(c->DT_catd, 1, 31, "Calendar Displayed")); + CATGETS(c->DT_catd, 1, 31, "Calendar Displayed")); else sprintf(buf, "%d %s", num_cals, - catgets(c->DT_catd, 1, 32, "Calendars Displayed")); + CATGETS(c->DT_catd, 1, 32, "Calendars Displayed")); set_message(b->message_text, buf); } @@ -1117,11 +1117,11 @@ register_names(char *name, Calendar *c) while ((bd = (BlistData *)CmDataListGetData(bl->blist_data, i++)) && strcmp(bd->name, name) != 0); if (!bd) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1070, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1070, "Calendar : Error - Compare Calendars")); - char *text = XtNewString(catgets(c->DT_catd, 1, 607, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 607, "Internal error registering calendar name.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(b->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, diff --git a/cde/programs/dtcm/dtcm/calendar.h b/cde/programs/dtcm/dtcm/calendar.h index 046c03731..096a3a4c9 100644 --- a/cde/programs/dtcm/dtcm/calendar.h +++ b/cde/programs/dtcm/dtcm/calendar.h @@ -54,7 +54,7 @@ #include #include -#include +#include
#include #include "util.h" #include "timeops.h" diff --git a/cde/programs/dtcm/dtcm/calendarA.c b/cde/programs/dtcm/dtcm/calendarA.c index 6f079daee..a99c21b7d 100644 --- a/cde/programs/dtcm/dtcm/calendarA.c +++ b/cde/programs/dtcm/dtcm/calendarA.c @@ -61,7 +61,7 @@ static char sccsid[] = "@(#)calendarA.c 1.196 95/04/12 Copyr 1991 Sun Microsyst #include /* SYS_NMLN */ #endif /* SVR4 specific includes */ #include -#include +#include
#include #include #include @@ -995,22 +995,22 @@ make_view_menu(Calendar *c) Arg al[10]; int ac; - day_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 33, "Day")); - week_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 34, "Week")); + day_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 33, "Day")); + week_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 34, "Week")); month_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 35, "Month")); - year_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 36, "Year")); + CATGETS(c->DT_catd, 1, 35, "Month")); + year_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 36, "Year")); tz_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 37, "Time Zone...")); + CATGETS(c->DT_catd, 1, 37, "Time Zone...")); apptlist_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 38, "Appointment List...")); + CATGETS(c->DT_catd, 1, 38, "Appointment List...")); todo_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 965, "To Do List...")); - view_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 40, "View")); + CATGETS(c->DT_catd, 1, 965, "To Do List...")); + view_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 40, "View")); findappts = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 41, "Find...")); + CATGETS(c->DT_catd, 1, 41, "Find...")); gotodate = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 42, "Go to Date...")); + CATGETS(c->DT_catd, 1, 42, "Go to Date...")); view_menu = XmCreatePulldownMenu(c->menu_bar, "viewMenu", NULL, 0); @@ -1229,11 +1229,11 @@ browse_cb(Widget w, XtPointer client_data, XtPointer cbs) { Browselist *bl = (Browselist *)c->browselist; if (!(bd = (BlistData *)CmDataListGetData(bl->blist_data, idx))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1072, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1072, "Calendar : Error - Browse")); - char *text = XtNewString(catgets(c->DT_catd, 1, 610, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 610, "Internal error retrieving calendar name.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1274,7 +1274,7 @@ make_file_menu(Calendar *c) ac = 0; xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 68, "Print Current View")); + CATGETS(c->DT_catd, 1, 68, "Print Current View")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; pr_current = XmCreatePushButtonGadget(file_menu, "printCurrent", al, ac); @@ -1282,7 +1282,7 @@ make_file_menu(Calendar *c) XmStringFree(xmstr); ac = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 69, "Print...")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 69, "Print...")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; print = XmCreatePushButtonGadget(file_menu, "print", al, ac); XtAddCallback(print, XmNactivateCallback, print_cb, NULL); @@ -1293,7 +1293,7 @@ make_file_menu(Calendar *c) ac = 0; xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 72, "Options...")); + CATGETS(c->DT_catd, 1, 72, "Options...")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; opts = XmCreatePushButtonGadget(file_menu, "options", al, ac); XtAddCallback(opts, XmNactivateCallback, edit_cb, (XtPointer) 1); @@ -1303,7 +1303,7 @@ make_file_menu(Calendar *c) sep = XmCreateSeparatorGadget(file_menu, "separator2", al, ac); ac = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 73, "Exit")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 73, "Exit")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; exit = XmCreatePushButtonGadget(file_menu, "exit", al, ac); XtAddCallback(exit, XmNactivateCallback, quit_handler, (XtPointer) c); @@ -1313,7 +1313,7 @@ make_file_menu(Calendar *c) ac = 0; XtSetArg(al[ac], XmNsubMenuId, file_menu); ac++; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 65, "File")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 65, "File")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; file_btn = (Widget) XmCreateCascadeButton(c->menu_bar, "file", al, ac); XtAddCallback(file_btn, XmNhelpCallback, (XtCallbackProc)help_cb, @@ -1331,11 +1331,11 @@ make_edit_menu(Calendar *c) int ac; appt_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 74, "Appointment...")); + CATGETS(c->DT_catd, 1, 74, "Appointment...")); todo_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 966, "To Do...")); + CATGETS(c->DT_catd, 1, 966, "To Do...")); edit_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 76, "Edit")); + CATGETS(c->DT_catd, 1, 76, "Edit")); edit_menu = XmCreatePulldownMenu(c->menu_bar, "editMenu", NULL, 0); @@ -1373,18 +1373,18 @@ make_help_menu(Calendar *c) Widget cascade, help_menu, w_overview, w_tasks, w_ref, w_onitem, w_using, w_about, w_sep; - help = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + help = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); overview = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 612, "Overview...")); - tasks = XmStringCreateLocalized(catgets(c->DT_catd, 1, 79, "Tasks...")); + CATGETS(c->DT_catd, 1, 612, "Overview...")); + tasks = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 79, "Tasks...")); ref = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 80, "Reference...")); + CATGETS(c->DT_catd, 1, 80, "Reference...")); onitem = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 964, "On Item")); + CATGETS(c->DT_catd, 1, 964, "On Item")); using = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 82, "Using Help...")); + CATGETS(c->DT_catd, 1, 82, "Using Help...")); about = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 613, "About Calendar...")); + CATGETS(c->DT_catd, 1, 613, "About Calendar...")); help_menu = XmCreatePulldownMenu(c->menu_bar, "helpMenu", NULL, 0); @@ -1515,7 +1515,7 @@ update_browse_menu_names(Calendar *c) { NULL); ac = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 84, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 84, "Show Other Calendar...")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; item = XmCreatePushButtonGadget(c->browse_menu, "showOther", al, ac); @@ -1523,7 +1523,7 @@ update_browse_menu_names(Calendar *c) { XmStringFree(xmstr); ac = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 85, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 85, "Compare Calendars...")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; item = XmCreatePushButtonGadget(c->browse_menu, "compare", al, ac); @@ -1531,7 +1531,7 @@ update_browse_menu_names(Calendar *c) { XmStringFree(xmstr); ac = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 86, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 86, "Menu Editor...")); XtSetArg(al[ac], XmNlabelString, xmstr); ac++; item = XmCreatePushButtonGadget(c->browse_menu, "editMenu", al, ac); @@ -1575,7 +1575,7 @@ make_browse_menu(Calendar *c) { */ update_browse_menu_names(c); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 87, "Browse")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 87, "Browse")); XtSetArg(al[ac], XmNsubMenuId, c->browse_menu); ac++; XtSetArg(al[ac], XmNlabelString, xmstr); ac++; c->browse_button = XmCreateCascadeButton(c->menu_bar, "browse", al, ac); @@ -1624,7 +1624,7 @@ make_buttons(Calendar *c) Screen *s; today_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 88, "Today")); + CATGETS(c->DT_catd, 1, 88, "Today")); ac=0; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; @@ -1946,7 +1946,7 @@ quit_handler(Widget w, XtPointer cdata, XtPointer cbs) { Calendar *c = (Calendar *)cdata; if (debug) - fprintf(stderr, "%s", catgets(c->DT_catd, 1, 89, "in quit_handler\n")); + fprintf(stderr, "%s", CATGETS(c->DT_catd, 1, 89, "in quit_handler\n")); if (editor_showing((Editor*) c->editor) || todo_showing((ToDo*) c->todo)) @@ -2033,20 +2033,20 @@ error_open(Calendar *c) { char *name, *host; Props_pu *p = (Props_pu *)c->properties_pu; - char *nl_user = XtNewString(catgets(c->DT_catd, 1, 92, "User name")); - char *nl_host = XtNewString(catgets(c->DT_catd, 1, 93, "Host")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *nl_user = XtNewString(CATGETS(c->DT_catd, 1, 92, "User name")); + char *nl_host = XtNewString(CATGETS(c->DT_catd, 1, 93, "Host")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); char *title = - XtNewString(catgets(c->DT_catd, 1, 94, "Calendar : Error")); + XtNewString(CATGETS(c->DT_catd, 1, 94, "Calendar : Error")); name = cm_target2name(c->calname); host = cm_target2host(c->calname); - sprintf(buf, "%s %s", catgets(c->DT_catd, 1, 90, + sprintf(buf, "%s %s", CATGETS(c->DT_catd, 1, 90, "Error opening Calendar file"), c->calname); set_message(c->message_text, buf); - sprintf(buf, "%s\n%s: %s, %s: %s", catgets(c->DT_catd, 1, 91, + sprintf(buf, "%s\n%s: %s, %s: %s", CATGETS(c->DT_catd, 1, 91, "rpc.cmsd is not responding for your user name.\nMake sure the inetd process is running and the entry\nin inetd.conf for rpc.cmsd is correct for your host."), nl_user, name, nl_host, host); @@ -2074,16 +2074,16 @@ error_noloc(Calendar *c, char *name) char buf[BUFSIZ]; Props_pu *p = (Props_pu *)c->properties_pu; - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); char *title = - XtNewString(catgets(c->DT_catd, 1, 94, "Calendar : Error")); + XtNewString(CATGETS(c->DT_catd, 1, 94, "Calendar : Error")); sprintf(buf, "%s %s", - catgets(c->DT_catd, 1, 108, "No Calendar Location specified for"), + CATGETS(c->DT_catd, 1, 108, "No Calendar Location specified for"), name); set_message(c->message_text, buf); - sprintf(buf, "%s", catgets(c->DT_catd, 1, 109, "No location specified; add a hostname to the\nInitial Calendar View in Properties/Display Settings. If\nyou ran Calendar (dtcm) with the -c option, verify you specified a hostname.")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 109, "No location specified; add a hostname to the\nInitial Calendar View in Properties/Display Settings. If\nyou ran Calendar (dtcm) with the -c option, verify you specified a hostname.")); dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, buf, @@ -2200,7 +2200,7 @@ open_user_calendar(Calendar *c, Boolean retry) NULL, &cb_ext); if (c->my_cal_version < DTCM_DATA_VER) - set_message(c->message_text, catgets(c->DT_catd, 1, 186, + set_message(c->message_text, CATGETS(c->DT_catd, 1, 186, "Calendar (dtcm) and rpc.cmsd versions are different.")); if (!viewother) { @@ -2209,7 +2209,7 @@ open_user_calendar(Calendar *c, Boolean retry) Message 113 : ``Calendar'' is used in the main titlebar of the tool: Calendar : user@host. */ - sprintf(buf, "%s : %s", catgets(c->DT_catd, 1, 113, "Calendar"), + sprintf(buf, "%s : %s", CATGETS(c->DT_catd, 1, 113, "Calendar"), c->calname); XtVaSetValues(c->frame, XmNtitle, buf, NULL); } @@ -2265,7 +2265,7 @@ open_initial_calendar( c->general->version = get_data_version(c->cal_handle); if (c->general->version < DTCM_DATA_VER) - set_message(c->message_text, catgets(c->DT_catd, 1, 186, + set_message(c->message_text, CATGETS(c->DT_catd, 1, 186, "Calendar (dtcm) and rpc.cmsd versions are different.")); @@ -2277,7 +2277,7 @@ open_initial_calendar( csa_register_callback(c->cal_handle, flags, update_handler, NULL, &cb_ext); - sprintf(buf, "%s : %s", catgets(c->DT_catd, 1, 113, "Calendar"), + sprintf(buf, "%s : %s", CATGETS(c->DT_catd, 1, 113, "Calendar"), c->view->current_calendar); XtVaSetValues(c->frame, XmNtitle, buf, NULL); @@ -2648,7 +2648,7 @@ init_calendar(int argc, char **argv) cm_strdup(calendar->app_data->default_calendar); /* Open the message catalog for internationalization */ - calendar->DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + calendar->DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); ac=0; XtSetArg(al[ac], XmNfractionBase, 100); ac++; @@ -2735,7 +2735,7 @@ init_calendar(int argc, char **argv) status = cmtt_init("Calendar", calendar, app, calendar->frame); if (TT_OK != status) { char *errfmt; - errfmt = catgets(calendar->DT_catd, 2, 2, + errfmt = CATGETS(calendar->DT_catd, 2, 2, "Could not connect to ToolTalk:\n%s\n"); DieFromToolTalkError( calendar, errfmt, status ); } @@ -2783,7 +2783,7 @@ init_calendar(int argc, char **argv) calendar->general->version = calendar->my_cal_version; sprintf(buf, "%s : %s", - catgets(calendar->DT_catd, 1, 113, + CATGETS(calendar->DT_catd, 1, 113, "Calendar"), calendar->calname); XtVaSetValues(calendar->frame, XmNtitle, buf, @@ -2938,31 +2938,31 @@ init_strings(void) { char *display_lang="C"; - months[1] = strdup(catgets(calendar->DT_catd, 1, 114, "January")); - months[2] = strdup(catgets(calendar->DT_catd, 1, 115, "February")); - months[3] = strdup(catgets(calendar->DT_catd, 1, 116, "March")); - months[4] = strdup(catgets(calendar->DT_catd, 1, 117, "April")); - months[5] = strdup(catgets(calendar->DT_catd, 1, 118, "May")); - months[6] = strdup(catgets(calendar->DT_catd, 1, 119, "June")); - months[7] = strdup(catgets(calendar->DT_catd, 1, 120, "July")); - months[8] = strdup(catgets(calendar->DT_catd, 1, 121, "August")); - months[9] = strdup(catgets(calendar->DT_catd, 1, 122, "September")); - months[10] = strdup(catgets(calendar->DT_catd, 1, 123, "October")); - months[11] = strdup(catgets(calendar->DT_catd, 1, 124, "November")); - months[12] = strdup(catgets(calendar->DT_catd, 1, 125, "December")); + months[1] = strdup(CATGETS(calendar->DT_catd, 1, 114, "January")); + months[2] = strdup(CATGETS(calendar->DT_catd, 1, 115, "February")); + months[3] = strdup(CATGETS(calendar->DT_catd, 1, 116, "March")); + months[4] = strdup(CATGETS(calendar->DT_catd, 1, 117, "April")); + months[5] = strdup(CATGETS(calendar->DT_catd, 1, 118, "May")); + months[6] = strdup(CATGETS(calendar->DT_catd, 1, 119, "June")); + months[7] = strdup(CATGETS(calendar->DT_catd, 1, 120, "July")); + months[8] = strdup(CATGETS(calendar->DT_catd, 1, 121, "August")); + months[9] = strdup(CATGETS(calendar->DT_catd, 1, 122, "September")); + months[10] = strdup(CATGETS(calendar->DT_catd, 1, 123, "October")); + months[11] = strdup(CATGETS(calendar->DT_catd, 1, 124, "November")); + months[12] = strdup(CATGETS(calendar->DT_catd, 1, 125, "December")); - months2[1] = strdup(catgets(calendar->DT_catd, 1, 126, "Jan")); - months2[2] = strdup(catgets(calendar->DT_catd, 1, 127, "Feb")); - months2[3] = strdup(catgets(calendar->DT_catd, 1, 128, "Mar")); - months2[4] = strdup(catgets(calendar->DT_catd, 1, 129, "Apr")); - months2[5] = strdup(catgets(calendar->DT_catd, 1, 130, "May")); - months2[6] = strdup(catgets(calendar->DT_catd, 1, 131, "Jun")); - months2[7] = strdup(catgets(calendar->DT_catd, 1, 132, "Jul")); - months2[8] = strdup(catgets(calendar->DT_catd, 1, 133, "Aug")); - months2[9] = strdup(catgets(calendar->DT_catd, 1, 134, "Sep")); - months2[10] = strdup(catgets(calendar->DT_catd, 1, 135, "Oct")); - months2[11] = strdup(catgets(calendar->DT_catd, 1, 136, "Nov")); - months2[12] = strdup(catgets(calendar->DT_catd, 1, 137, "Dec")); + months2[1] = strdup(CATGETS(calendar->DT_catd, 1, 126, "Jan")); + months2[2] = strdup(CATGETS(calendar->DT_catd, 1, 127, "Feb")); + months2[3] = strdup(CATGETS(calendar->DT_catd, 1, 128, "Mar")); + months2[4] = strdup(CATGETS(calendar->DT_catd, 1, 129, "Apr")); + months2[5] = strdup(CATGETS(calendar->DT_catd, 1, 130, "May")); + months2[6] = strdup(CATGETS(calendar->DT_catd, 1, 131, "Jun")); + months2[7] = strdup(CATGETS(calendar->DT_catd, 1, 132, "Jul")); + months2[8] = strdup(CATGETS(calendar->DT_catd, 1, 133, "Aug")); + months2[9] = strdup(CATGETS(calendar->DT_catd, 1, 134, "Sep")); + months2[10] = strdup(CATGETS(calendar->DT_catd, 1, 135, "Oct")); + months2[11] = strdup(CATGETS(calendar->DT_catd, 1, 136, "Nov")); + months2[12] = strdup(CATGETS(calendar->DT_catd, 1, 137, "Dec")); /* NL_COMMENT Attention Translator: @@ -2980,23 +2980,23 @@ init_strings(void) Sun --> Sunday */ - days[0] = strdup(catgets(calendar->DT_catd, 1, 138, "Sun")); - days[1] = strdup(catgets(calendar->DT_catd, 1, 139, "Mon")); - days[2] = strdup(catgets(calendar->DT_catd, 1, 140, "Tue")); - days[3] = strdup(catgets(calendar->DT_catd, 1, 141, "Wed")); - days[4] = strdup(catgets(calendar->DT_catd, 1, 142, "Thu")); - days[5] = strdup(catgets(calendar->DT_catd, 1, 143, "Fri")); - days[6] = strdup(catgets(calendar->DT_catd, 1, 144, "Sat")); - days[7] = strdup(catgets(calendar->DT_catd, 1, 138, "Sun")); + days[0] = strdup(CATGETS(calendar->DT_catd, 1, 138, "Sun")); + days[1] = strdup(CATGETS(calendar->DT_catd, 1, 139, "Mon")); + days[2] = strdup(CATGETS(calendar->DT_catd, 1, 140, "Tue")); + days[3] = strdup(CATGETS(calendar->DT_catd, 1, 141, "Wed")); + days[4] = strdup(CATGETS(calendar->DT_catd, 1, 142, "Thu")); + days[5] = strdup(CATGETS(calendar->DT_catd, 1, 143, "Fri")); + days[6] = strdup(CATGETS(calendar->DT_catd, 1, 144, "Sat")); + days[7] = strdup(CATGETS(calendar->DT_catd, 1, 138, "Sun")); - days2[0] = strdup(catgets(calendar->DT_catd, 1, 146, "Sunday")); - days2[1] = strdup(catgets(calendar->DT_catd, 1, 147, "Monday")); - days2[2] = strdup(catgets(calendar->DT_catd, 1, 148, "Tuesday")); - days2[3] = strdup(catgets(calendar->DT_catd, 1, 149, "Wednesday")); - days2[4] = strdup(catgets(calendar->DT_catd, 1, 150, "Thursday")); - days2[5] = strdup(catgets(calendar->DT_catd, 1, 151, "Friday")); - days2[6] = strdup(catgets(calendar->DT_catd, 1, 152, "Saturday")); - days2[7] = strdup(catgets(calendar->DT_catd, 1, 146, "Sunday")); + days2[0] = strdup(CATGETS(calendar->DT_catd, 1, 146, "Sunday")); + days2[1] = strdup(CATGETS(calendar->DT_catd, 1, 147, "Monday")); + days2[2] = strdup(CATGETS(calendar->DT_catd, 1, 148, "Tuesday")); + days2[3] = strdup(CATGETS(calendar->DT_catd, 1, 149, "Wednesday")); + days2[4] = strdup(CATGETS(calendar->DT_catd, 1, 150, "Thursday")); + days2[5] = strdup(CATGETS(calendar->DT_catd, 1, 151, "Friday")); + days2[6] = strdup(CATGETS(calendar->DT_catd, 1, 152, "Saturday")); + days2[7] = strdup(CATGETS(calendar->DT_catd, 1, 146, "Sunday")); /* NL_COMMENT Attention Translator: @@ -3013,14 +3013,14 @@ init_strings(void) S --> Saturday (message 160) */ - days3[0] = strdup(catgets(calendar->DT_catd, 1, 154, "S")); - days3[1] = strdup(catgets(calendar->DT_catd, 1, 155, "M")); - days3[2] = strdup(catgets(calendar->DT_catd, 1, 156, "T")); - days3[3] = strdup(catgets(calendar->DT_catd, 1, 157, "W")); - days3[4] = strdup(catgets(calendar->DT_catd, 1, 158, "T")); - days3[5] = strdup(catgets(calendar->DT_catd, 1, 159, "F")); - days3[6] = strdup(catgets(calendar->DT_catd, 1, 160, "S")); - days3[7] = strdup(catgets(calendar->DT_catd, 1, 154, "S")); + days3[0] = strdup(CATGETS(calendar->DT_catd, 1, 154, "S")); + days3[1] = strdup(CATGETS(calendar->DT_catd, 1, 155, "M")); + days3[2] = strdup(CATGETS(calendar->DT_catd, 1, 156, "T")); + days3[3] = strdup(CATGETS(calendar->DT_catd, 1, 157, "W")); + days3[4] = strdup(CATGETS(calendar->DT_catd, 1, 158, "T")); + days3[5] = strdup(CATGETS(calendar->DT_catd, 1, 159, "F")); + days3[6] = strdup(CATGETS(calendar->DT_catd, 1, 160, "S")); + days3[7] = strdup(CATGETS(calendar->DT_catd, 1, 154, "S")); /* NL_COMMENT Attention Translator: @@ -3037,14 +3037,14 @@ init_strings(void) SAT --> Saturday */ - days4[0] = strdup(catgets(calendar->DT_catd, 1, 170, "SUN")); - days4[1] = strdup(catgets(calendar->DT_catd, 1, 171, "MON")); - days4[2] = strdup(catgets(calendar->DT_catd, 1, 172, "TUE")); - days4[3] = strdup(catgets(calendar->DT_catd, 1, 173, "WED")); - days4[4] = strdup(catgets(calendar->DT_catd, 1, 174, "THU")); - days4[5] = strdup(catgets(calendar->DT_catd, 1, 175, "FRI")); - days4[6] = strdup(catgets(calendar->DT_catd, 1, 176, "SAT")); - days4[7] = strdup(catgets(calendar->DT_catd, 1, 170, "SUN")); + days4[0] = strdup(CATGETS(calendar->DT_catd, 1, 170, "SUN")); + days4[1] = strdup(CATGETS(calendar->DT_catd, 1, 171, "MON")); + days4[2] = strdup(CATGETS(calendar->DT_catd, 1, 172, "TUE")); + days4[3] = strdup(CATGETS(calendar->DT_catd, 1, 173, "WED")); + days4[4] = strdup(CATGETS(calendar->DT_catd, 1, 174, "THU")); + days4[5] = strdup(CATGETS(calendar->DT_catd, 1, 175, "FRI")); + days4[6] = strdup(CATGETS(calendar->DT_catd, 1, 176, "SAT")); + days4[7] = strdup(CATGETS(calendar->DT_catd, 1, 170, "SUN")); } @@ -3069,7 +3069,7 @@ switch_it(Calendar *c, char *new_calendar, WindowType win) */ if (strcmp(new_calendar, c->view->current_calendar) == 0 && c->cal_handle) { - sprintf(buf, catgets(c->DT_catd, 1, 178, + sprintf(buf, CATGETS(c->DT_catd, 1, 178, "You Are Already Browsing %s"), new_calendar); set_message(c->message_text, buf); if (tb && tb->show_message) @@ -3095,9 +3095,9 @@ switch_it(Calendar *c, char *new_calendar, WindowType win) } else { if ((user = cm_target2name(new_calendar)) == NULL) { if (!strcmp(new_calendar, "")) - sprintf(buf, "%s", catgets(c->DT_catd, 1, 619, "Please enter a calendar name in the format: @")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 619, "Please enter a calendar name in the format: @")); else - sprintf(buf, catgets(c->DT_catd, 1, 620, + sprintf(buf, CATGETS(c->DT_catd, 1, 620, "Unknown calendar. Calendar name needed: %s"), new_calendar); set_message(c->message_text, buf); @@ -3108,9 +3108,9 @@ switch_it(Calendar *c, char *new_calendar, WindowType win) if ((loc = cm_target2location(new_calendar)) == NULL) { if (!strcmp(new_calendar, "")) - sprintf(buf, "%s", catgets(c->DT_catd, 1, 619, "Please enter a calendar name in the format: @")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 619, "Please enter a calendar name in the format: @")); else - sprintf(buf, catgets(c->DT_catd, 1, 622, + sprintf(buf, CATGETS(c->DT_catd, 1, 622, "Unknown calendar. Hostname needed: %s@"), user); set_message(c->message_text, buf); @@ -3161,7 +3161,7 @@ switch_it(Calendar *c, char *new_calendar, WindowType win) new_version = get_data_version(new_cal_handle); if (new_version < DTCM_DATA_VER) - set_message(c->message_text, catgets(c->DT_catd, 1, 186, + set_message(c->message_text, CATGETS(c->DT_catd, 1, 186, "Calendar (dtcm) and rpc.cmsd versions are different.")); /* @@ -3201,7 +3201,7 @@ switch_it(Calendar *c, char *new_calendar, WindowType win) /* * Set the title bars on all the windows! */ - sprintf(buf, "%s : %s", catgets(c->DT_catd, 1, 113, "Calendar"), + sprintf(buf, "%s : %s", CATGETS(c->DT_catd, 1, 113, "Calendar"), new_calendar); XtVaSetValues(c->frame, XmNtitle, buf, NULL); @@ -3239,12 +3239,12 @@ switch_it(Calendar *c, char *new_calendar, WindowType win) if (tb && tb->show_message) { char buf[128]; char *calendar = - XtNewString(catgets(c->DT_catd, 1, 919, "Calendar")); + XtNewString(CATGETS(c->DT_catd, 1, 919, "Calendar")); sprintf (buf, "%s %s %s", calendar, new_calendar, - catgets(c->DT_catd, 1, 920, "displayed.")); + CATGETS(c->DT_catd, 1, 920, "displayed.")); XtFree(calendar); set_message(tb->show_message, buf); } diff --git a/cde/programs/dtcm/dtcm/cm_admin.c b/cde/programs/dtcm/dtcm/cm_admin.c index bbf9b05c7..317427c15 100644 --- a/cde/programs/dtcm/dtcm/cm_admin.c +++ b/cde/programs/dtcm/dtcm/cm_admin.c @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)cm_lookup.c 1.21 94/08/05 Copyr 1993 Sun Microsyste #include #include #include -#include +#include
#include #include "cm_tty.h" #include "util.h" @@ -106,7 +106,7 @@ grab(char**argv, /* command line arguments */ static void usage_msg() { - fprintf(stderr,catgets(DT_catd, 1, 696, "Usage:\n\tdtcm_admin [ -d ] [ -a action ] [ -c calendar ][ -s ] [ -e ] [-f filename]\n")); + fprintf(stderr,CATGETS(DT_catd, 1, 696, "Usage:\n\tdtcm_admin [ -d ] [ -a action ] [ -c calendar ][ -s ] [ -e ] [-f filename]\n")); } static void @@ -122,7 +122,7 @@ cm_args(int argc, char **argv) else if (strcmp(*argv, "restore") == 0) Mode = restore; else { - fprintf(stderr,catgets(DT_catd, 1, 697, "You have specified an unsupported administration operation \"%s\".\n"), *argv); + fprintf(stderr,CATGETS(DT_catd, 1, 697, "You have specified an unsupported administration operation \"%s\".\n"), *argv); usage_msg(); exit(1); } @@ -167,7 +167,7 @@ int main(int argc, char **argv) init_time(); setlocale(LC_ALL, ""); - DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); cm_tty_load_props(&p); cm_args(argc,argv); /* parse command line */ @@ -187,7 +187,7 @@ int main(int argc, char **argv) if (cm_file[0]) { if (Mode == archive) { if ((output_stream = fopen(cm_file, "w")) == NULL) { - fprintf(stderr, catgets(DT_catd, 1, 698, "\nCould not open output file \"%s\"\n"), cm_file); + fprintf(stderr, CATGETS(DT_catd, 1, 698, "\nCould not open output file \"%s\"\n"), cm_file); exit(1); } @@ -195,7 +195,7 @@ int main(int argc, char **argv) if (Mode == restore) { if ((input_stream = fopen(cm_file, "r")) == NULL) { - fprintf(stderr, catgets(DT_catd, 1, 699, "\nCould not open input file \"%s\"\n"), cm_file); + fprintf(stderr, CATGETS(DT_catd, 1, 699, "\nCould not open input file \"%s\"\n"), cm_file); exit(1); } } @@ -207,10 +207,10 @@ int main(int argc, char **argv) stat = csa_logon(NULL, &csa_user, NULL, NULL, NULL, &c_handle, NULL); if (stat != CSA_SUCCESS) { - char *format = XtNewString(catgets(DT_catd, 1, 208, + char *format = XtNewString(CATGETS(DT_catd, 1, 208, "\nCould not open calendar \"%s\"\n")); fprintf(stderr, format, - target ? target : catgets(DT_catd, 1, 209, "UNKNOWN")); + target ? target : CATGETS(DT_catd, 1, 209, "UNKNOWN")); XtFree(format); free(uname); free(loc); diff --git a/cde/programs/dtcm/dtcm/cm_delete.c b/cde/programs/dtcm/dtcm/cm_delete.c index 44d010030..cbebf4944 100644 --- a/cde/programs/dtcm/dtcm/cm_delete.c +++ b/cde/programs/dtcm/dtcm/cm_delete.c @@ -61,7 +61,7 @@ static char sccsid[] = "@(#)cm_delete.c 1.29 95/03/17 Copyr 1993 Sun Microsyste #include #include #include -#include +#include
#include #include
#include
@@ -118,7 +118,7 @@ cm_args(int argc, char **argv) argv = grab(++argv,cm_view,'-'); break; default: - fprintf(stderr, "%s", catgets(DT_catd, 1, 187, "Usage:\n\tdtcm_delete [-c calendar] [-d ] [-v view]\n")); + fprintf(stderr, "%s", CATGETS(DT_catd, 1, 187, "Usage:\n\tdtcm_delete [-c calendar] [-d ] [-v view]\n")); exit(1); } } @@ -142,7 +142,7 @@ int main(int argc, char **argv) init_time(); setlocale(LC_ALL, ""); _DtEnvControl(DT_ENV_SET); /* set up environment variables */ - DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); cm_tty_load_props(&p); cm_args(argc,argv); /* parse command line */ target = (cm_strlen(cm_target)) ? cm_target : cm_get_credentials(); @@ -167,10 +167,10 @@ int main(int argc, char **argv) stat = csa_logon(NULL, &csa_user, NULL, NULL, NULL, &c_handle, NULL); if (stat != CSA_SUCCESS) { - char *format = strdup(catgets(DT_catd, 1, 188, + char *format = strdup(CATGETS(DT_catd, 1, 188, "\nCould not open calendar %s\n")); fprintf(stderr, format, - target ? target : catgets(DT_catd, 1, 189, "UNKNOWN")); + target ? target : CATGETS(DT_catd, 1, 189, "UNKNOWN")); free(format); free(uname); free(loc); @@ -186,7 +186,7 @@ int main(int argc, char **argv) free(loc); exit(0); } - fprintf(stdout, "%s", catgets(DT_catd, 1, 190, + fprintf(stdout, "%s", CATGETS(DT_catd, 1, 190, "Item to delete (number)? ")); fgets(index, 9, stdin); fprintf(stdout,"\n\n"); diff --git a/cde/programs/dtcm/dtcm/cm_insert.c b/cde/programs/dtcm/dtcm/cm_insert.c index 404417268..95063c083 100644 --- a/cde/programs/dtcm/dtcm/cm_insert.c +++ b/cde/programs/dtcm/dtcm/cm_insert.c @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)cm_insert.c 1.31 95/05/19 Copyr 1993 Sun Microsyste #include #include #include -#include +#include
#include #include "util.h" #include "getdate.h" @@ -145,8 +145,8 @@ cm_args(int argc, char **argv) argv = grab(++argv,cm_appt_file,'-'); break; default: - fprintf(stderr, "%s", catgets(DT_catd, 1, 191, "Usage:\n\tdtcm_insert [ -c calendar ] [-d ] [ -v view ]\n")); - fprintf(stderr, "%s", catgets(DT_catd, 1, 192, " [-w what string] [-s ] [-e ]\n")); + fprintf(stderr, "%s", CATGETS(DT_catd, 1, 191, "Usage:\n\tdtcm_insert [ -c calendar ] [-d ] [ -v view ]\n")); + fprintf(stderr, "%s", CATGETS(DT_catd, 1, 192, " [-w what string] [-s ] [-e ]\n")); exit(1); } } @@ -179,15 +179,15 @@ prompt_for_insert(Props *p) { format_tick(now(), get_int_prop(p, CP_DATEORDERING), get_int_prop(p, CP_DATESEPARATOR), date_str); - printf("%s", catgets(DT_catd, 1, 193, "Please enter the information for the appointment you wish to add.\nDefaults will be shown in parentheses.\n")); - prompt_for_line(catgets(DT_catd, 1, 194, + printf("%s", CATGETS(DT_catd, 1, 193, "Please enter the information for the appointment you wish to add.\nDefaults will be shown in parentheses.\n")); + prompt_for_line(CATGETS(DT_catd, 1, 194, "Calendar (%s): "), cm_get_credentials(), cm_target); - prompt_for_line(catgets(DT_catd, 1, 195, + prompt_for_line(CATGETS(DT_catd, 1, 195, "Date (%s): "), date_str, cm_date); while (valid != TRUE) { format_time(now(), dt, cm_start); - prompt_for_line(catgets(DT_catd, 1, 196, + prompt_for_line(CATGETS(DT_catd, 1, 196, "Start (%s): "), cm_start, cm_start); if (cm_start[0]) { @@ -195,7 +195,7 @@ prompt_for_insert(Props *p) { if (valid_time(p, timecopy)) valid = TRUE; else - printf("%s", catgets(DT_catd, 1, 197, "You have entered an invalid time. Please try again:\n")); + printf("%s", CATGETS(DT_catd, 1, 197, "You have entered an invalid time. Please try again:\n")); free(timecopy); } } @@ -207,23 +207,23 @@ prompt_for_insert(Props *p) { format_time(next, dt, cm_end); if (cm_start[0]) prompt_for_line( - catgets(DT_catd, 1, 198, "End (%s): "), cm_end, cm_end); + CATGETS(DT_catd, 1, 198, "End (%s): "), cm_end, cm_end); else prompt_for_line( - catgets(DT_catd, 1, 199, "End (%s): "), "None", cm_end); + CATGETS(DT_catd, 1, 199, "End (%s): "), "None", cm_end); - snprintf(cm_repeatstr, sizeof(cm_repeatstr), "%s", catgets(DT_catd, 1, 200, "One Time")); + snprintf(cm_repeatstr, sizeof(cm_repeatstr), "%s", CATGETS(DT_catd, 1, 200, "One Time")); - prompt_for_line(catgets(DT_catd, 1, 201, + prompt_for_line(CATGETS(DT_catd, 1, 201, "Repeat (%s): "), cm_repeatstr, cm_repeatstr); - if (strcmp(cm_repeatstr, catgets(DT_catd, 1, 200, "One Time"))) { - sprintf(buf, "%s", catgets(DT_catd, 1, 203, "no default")); + if (strcmp(cm_repeatstr, CATGETS(DT_catd, 1, 200, "One Time"))) { + sprintf(buf, "%s", CATGETS(DT_catd, 1, 203, "no default")); prompt_for_line( - catgets(DT_catd, 1, 204, "For (%s): "), buf, cm_for); + CATGETS(DT_catd, 1, 204, "For (%s): "), buf, cm_for); } - printf("%s", catgets(DT_catd, 1, 205, + printf("%s", CATGETS(DT_catd, 1, 205, "What (you may enter up to 5 lines, use ^D to finish):\n")); cm_what[0] = '\0'; for (index = 0; index < 5; index++) @@ -268,7 +268,7 @@ main(int argc, char **argv) init_time(); _DtEnvControl(DT_ENV_SET); /* set up environment variables */ setlocale(LC_ALL, ""); - DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); cm_tty_load_props(&p); dt = get_int_prop(p, CP_DEFAULTDISP); #ifdef FNS @@ -297,11 +297,11 @@ main(int argc, char **argv) csa_user.calendar_address = target; stat = csa_logon(NULL, &csa_user, NULL, NULL, NULL, &c_handle, NULL); if (stat != CSA_SUCCESS) { - char *format = cm_strdup(catgets(DT_catd, 1, 206, + char *format = cm_strdup(CATGETS(DT_catd, 1, 206, "\nCould not open calendar %s\n")); fprintf(stderr, format, target ? target : - catgets(DT_catd, 1, 209, "UNKNOWN")); + CATGETS(DT_catd, 1, 209, "UNKNOWN")); free(format); free(uname); free(loc); @@ -344,11 +344,11 @@ main(int argc, char **argv) csa_user.calendar_address = target; stat = csa_logon(NULL, &csa_user, NULL, NULL, NULL, &c_handle, NULL); if (stat !=CSA_SUCCESS) { - char *format = cm_strdup(catgets(DT_catd, 1, 206, + char *format = cm_strdup(CATGETS(DT_catd, 1, 206, "\nCould not open calendar %s\n")); fprintf(stderr, format, target ? target : - catgets(DT_catd, 1, 209, "UNKNOWN")); + CATGETS(DT_catd, 1, 209, "UNKNOWN")); free(format); free(uname); free(loc); diff --git a/cde/programs/dtcm/dtcm/cm_lookup.c b/cde/programs/dtcm/dtcm/cm_lookup.c index a34b4d3bb..80376fb1a 100644 --- a/cde/programs/dtcm/dtcm/cm_lookup.c +++ b/cde/programs/dtcm/dtcm/cm_lookup.c @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)cm_lookup.c 1.30 95/03/08 Copyr 1993 Sun Microsyste #include #include #include -#include +#include
#include #include "cm_tty.h" #include "util.h" @@ -115,7 +115,7 @@ cm_args(int argc, char **argv) argv = grab(++argv,cm_view,'-'); break; default: - fprintf(stderr, "%s", catgets(DT_catd, 1, 207, "Usage:\n\tdtcm_lookup [ -c calendar ][ -d ] [ -v view ]\n")); + fprintf(stderr, "%s", CATGETS(DT_catd, 1, 207, "Usage:\n\tdtcm_lookup [ -c calendar ][ -d ] [ -v view ]\n")); exit(1); } } @@ -139,7 +139,7 @@ int main(int argc, char **argv) init_time(); _DtEnvControl(DT_ENV_SET); /* set up environment variables */ setlocale(LC_ALL, ""); - DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); cm_tty_load_props(&p); cm_args(argc,argv); /* parse command line */ @@ -161,10 +161,10 @@ int main(int argc, char **argv) stat = csa_logon(NULL, &csa_user, NULL, NULL, NULL, &c_handle, NULL); if (stat != CSA_SUCCESS) { - char *format = cm_strdup(catgets(DT_catd, 1, 208, + char *format = cm_strdup(CATGETS(DT_catd, 1, 208, "\nCould not open calendar \"%s\"\n")); fprintf(stderr, format, - target ? target : catgets(DT_catd, 1, 209, "UNKNOWN")); + target ? target : CATGETS(DT_catd, 1, 209, "UNKNOWN")); free(format); free(uname); free(loc); diff --git a/cde/programs/dtcm/dtcm/cmtt.c b/cde/programs/dtcm/dtcm/cmtt.c index 87833e5d8..50f5c7a50 100644 --- a/cde/programs/dtcm/dtcm/cmtt.c +++ b/cde/programs/dtcm/dtcm/cmtt.c @@ -111,9 +111,9 @@ DieFromToolTalkError(Calendar *c, char *errfmt, Tt_status status) errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2); sprintf(errmsg, errfmt, statmsg); - xms_ok = XmStringCreateLocalized(catgets(c->DT_catd, 2, 3, "OK")); + xms_ok = XmStringCreateLocalized(CATGETS(c->DT_catd, 2, 3, "OK")); xms_errmsg = XmStringCreateLocalized(errmsg); - xms_title = XmStringCreateLocalized(catgets(c->DT_catd, 2, 1, + xms_title = XmStringCreateLocalized(CATGETS(c->DT_catd, 2, 1, "Calendar - Warning")); n = 0; diff --git a/cde/programs/dtcm/dtcm/dayglance.c b/cde/programs/dtcm/dtcm/dayglance.c index 1e5cf9520..20f4dbef2 100644 --- a/cde/programs/dtcm/dtcm/dayglance.c +++ b/cde/programs/dtcm/dtcm/dayglance.c @@ -133,7 +133,7 @@ paint_day_header(Calendar *c, Tick date, void *rect) Use the appropriate strftime conversion for your locale. */ - strftime(buf, 100, catgets(c->DT_catd, 1, 992, "%A, %B %e, %Y"), tm); + strftime(buf, 100, CATGETS(c->DT_catd, 1, 992, "%A, %B %e, %Y"), tm); inrange = today_inrange(c, date); x = gr_center(c->view->winw-(int)MOBOX_AREA_WIDTH, buf, c->fonts->labelfont) + (int)MOBOX_AREA_WIDTH; @@ -1088,13 +1088,13 @@ display_monthpanels(Calendar *c) if ((panel_year == firstyear) && (panel_month == 1)) { XtUnmapWidget(d->month_panels[0]); XtMapWidget(d->month_panels[2]); - sprintf(buf, "%s", catgets(c->DT_catd, 1, 623, "Calendar does not display dates prior to January 1, 1970")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 623, "Calendar does not display dates prior to January 1, 1970")); set_message(c->message_text, buf); } else if ((panel_year == lastyear) && (panel_month == 12)) { XtMapWidget(d->month_panels[0]); XtUnmapWidget(d->month_panels[2]); - sprintf(buf, "%s", catgets(c->DT_catd, 1, 624, "Calendar does not display dates after December 31, 2037")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 624, "Calendar does not display dates after December 31, 2037")); set_message(c->message_text, buf); } else { diff --git a/cde/programs/dtcm/dtcm/dnd.c b/cde/programs/dtcm/dtcm/dnd.c index f37f19a67..67fa3922a 100644 --- a/cde/programs/dtcm/dtcm/dnd.c +++ b/cde/programs/dtcm/dtcm/dnd.c @@ -327,11 +327,11 @@ schedule_appt(Calendar *c, Dtcm_appointment *a) { * Make sure user really meant to insert appointment * into somebody elses calendar. */ - char *ident = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *title = XtNewString(catgets(c->DT_catd, 1, 212, + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 212, "Calendar : Schedule Appointment")); - sprintf(buf, "%s", catgets(c->DT_catd, 1, 210, "The appointment will be scheduled in the calendar\nyou are currently browsing. Do you still want to schedule it?")); - sprintf(buf2, "%s %s", catgets(c->DT_catd, 1, 211, "Schedule in"), + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 210, "The appointment will be scheduled in the calendar\nyou are currently browsing. Do you still want to schedule it?")); + sprintf(buf2, "%s %s", CATGETS(c->DT_catd, 1, 211, "Schedule in"), c->view->current_calendar); answer = dialog_popup(c->frame, DIALOG_TITLE, title, @@ -356,7 +356,7 @@ schedule_appt(Calendar *c, Dtcm_appointment *a) { _csa_iso8601_to_tick(a->time->value->item.string_value, &tick); format_tick(tick, ot, st, date_buf); - sprintf(buf, catgets(c->DT_catd, 1, 214, + sprintf(buf, CATGETS(c->DT_catd, 1, 214, "Appointment scheduled: %s"), date_buf); set_message(c->message_text, buf); return 1; @@ -410,57 +410,57 @@ drag_load_proc(char *filename, Calendar *c) { (void *)c, c->general->version); if (list->count <= 0) { op = CANCEL_APPT; - sprintf(buf, "%s", catgets(c->DT_catd, 1, 842, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 842, "The information transferred did not\ncontain any appointments.")); } switch(op) { case COULD_NOT_OPEN_FILE: - msg = XtNewString(catgets(c->DT_catd, 1, 843, + msg = XtNewString(CATGETS(c->DT_catd, 1, 843, "Drag and Drop operation failed.")); sprintf(buf, "%s\n%s", msg, - catgets(c->DT_catd, 1, 844, + CATGETS(c->DT_catd, 1, 844, "Unable to locate the transferred information.")); XtFree(msg); break; case INVALID_DATE: sprintf(buf, "%s", - catgets(c->DT_catd, 1, 218, "Invalid DATE specified")); + CATGETS(c->DT_catd, 1, 218, "Invalid DATE specified")); break; case INVALID_START: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 219, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 219, "Invalid START time specified")); break; case INVALID_STOP: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 220, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 220, "Invalid END time specified")); break; case MISSING_DATE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 221, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 221, "Empty or missing DATE field")); break; case MISSING_START: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 222, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 222, "Empty or missing START field")); break; case MISSING_WHAT: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 223, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 223, "Empty or missing WHAT field")); break; case REPEAT_FOR_MISMATCH: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 224, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 224, "REPEAT and FOR field mismatch")); break; case VALID_APPT: break; case CANCEL_APPT: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 225, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 225, "Schedule appointment was cancelled.")); break; default: op = CANCEL_APPT; - sprintf(buf, "%s", catgets(c->DT_catd, 1, 225, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 225, "Schedule appointment was cancelled.")); break; } @@ -475,11 +475,11 @@ drag_load_proc(char *filename, Calendar *c) { ret_val = schedule_appt(c, a); if (ret_val < 0) { op = CANCEL_APPT; - sprintf(buf, "%s", catgets(c->DT_catd, 1, 226, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 226, "Internal error scheduling appointment.")); } else if (ret_val == 0) { op = CANCEL_APPT; - sprintf(buf, "%s", catgets(c->DT_catd, 1, 225, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 225, "Schedule appointment was cancelled.")); } ++i; @@ -491,9 +491,9 @@ drag_load_proc(char *filename, Calendar *c) { CmDataListDestroy(list, B_FALSE); if (op != VALID_APPT) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1073, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1073, "Calendar : Error - Drag and Drop")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, buf, @@ -533,10 +533,10 @@ get_appt_struct(DragContext *context) { list = ((ToDo *) context->editor)->todo_list; if (list && !XmListGetSelectedPos(list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 230, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 230, "Calendar : Error - Drag Appointment")); - char *text = XtNewString(catgets(c->DT_catd, 1, 231, "Select an appointment and DRAG again.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 231, "Select an appointment and DRAG again.")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -563,10 +563,10 @@ get_appt_struct(DragContext *context) { if (!entry) { - char *title = XtNewString(catgets(c->DT_catd, 1, 230, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 230, "Calendar : Error - Drag Appointment")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); - sprintf(buf, "%s", catgets(c->DT_catd, 1, 845, + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 845, "Drag and Drop operation Failed\nInternal consistency error.")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, @@ -611,7 +611,7 @@ ApptConvertCB( data->bp = XtNewString(context->data); data->size = strlen(data->bp); - data->name = XtNewString(catgets(c->DT_catd, 1, 236, "CalendarAppointment")); + data->name = XtNewString(CATGETS(c->DT_catd, 1, 236, "CalendarAppointment")); } /* @@ -636,7 +636,7 @@ GetIcon(Calendar *calendar) drag_xbm_width, drag_xbm_height); if (e->drag_bitmap == 0) { - printf("%s", catgets(calendar->DT_catd, 1, 237, "XCreateBitmapFromData() failed for bitmap.\n")); + printf("%s", CATGETS(calendar->DT_catd, 1, 237, "XCreateBitmapFromData() failed for bitmap.\n")); return; } else @@ -647,7 +647,7 @@ GetIcon(Calendar *calendar) window, (char *) drag_mask_xbm_bits, drag_mask_xbm_width, drag_mask_xbm_height); if (e->drag_mask == 0) { - printf("%s", catgets(calendar->DT_catd, 1, 238, "XCreateBitmapFromData() failed for mask.\n")); + printf("%s", CATGETS(calendar->DT_catd, 1, 238, "XCreateBitmapFromData() failed for mask.\n")); return; } else @@ -798,7 +798,7 @@ TranslationDragStart( DtNsourceIcon, e->drag_icon, NULL) == NULL) { - printf("%s", catgets(calendar->DT_catd, 1, 239, + printf("%s", CATGETS(calendar->DT_catd, 1, 239, "DragStart returned NULL.\n")); } } @@ -953,7 +953,7 @@ ApptDragStart( NULL) == NULL) { - printf("%s", catgets(calendar->DT_catd, 1, 239, + printf("%s", CATGETS(calendar->DT_catd, 1, 239, "DragStart returned NULL.\n")); } } diff --git a/cde/programs/dtcm/dtcm/dssw.c b/cde/programs/dtcm/dtcm/dssw.c index f2ce5e641..99151c743 100644 --- a/cde/programs/dtcm/dtcm/dssw.c +++ b/cde/programs/dtcm/dtcm/dssw.c @@ -250,28 +250,28 @@ build_dssw( XmNautoUnmanage, False, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 828, "Date:")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 828, "Date:")); dssw->date_label = XtVaCreateWidget("date_label", xmLabelGadgetClass, dssw->dssw_form_mgr, XmNlabelString, label_str, NULL); XmStringFree(label_str); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 829, "Start:")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 829, "Start:")); dssw->start_label = XtVaCreateWidget("start_label", xmLabelGadgetClass, dssw->dssw_form_mgr, XmNlabelString, label_str, NULL); XmStringFree(label_str); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 832, "End:")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 832, "End:")); dssw->stop_label = XtVaCreateWidget("stop_label", xmLabelGadgetClass, dssw->dssw_form_mgr, XmNlabelString, label_str, NULL); XmStringFree(label_str); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 835, "What:")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 835, "What:")); dssw->what_label = XtVaCreateWidget("what_label", xmLabelGadgetClass, dssw->dssw_form_mgr, XmNlabelString, label_str, @@ -311,7 +311,7 @@ build_dssw( XmNentryClass, xmToggleButtonGadgetClass, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 830, "AM")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 830, "AM")); child[0] = dssw->start_am = XtVaCreateWidget("start_am", xmToggleButtonGadgetClass, dssw->start_ampm_rc_mgr, XmNlabelString, label_str, @@ -319,7 +319,7 @@ build_dssw( NULL); XmStringFree(label_str); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 831, "PM")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 831, "PM")); child[1] = dssw->start_pm = XtVaCreateWidget("start_pm", xmToggleButtonGadgetClass, dssw->start_ampm_rc_mgr, XmNlabelString, label_str, @@ -357,7 +357,7 @@ build_dssw( XmNentryClass, xmToggleButtonGadgetClass, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 833, "AM")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 833, "AM")); child[0] = dssw->stop_am = XtVaCreateWidget("stop_am", xmToggleButtonGadgetClass, dssw->stop_ampm_rc_mgr, XmNlabelString, label_str, @@ -365,7 +365,7 @@ build_dssw( NULL); XmStringFree(label_str); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 834, "PM")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 834, "PM")); child[1] = dssw->stop_pm = XtVaCreateWidget("stop_pm", xmToggleButtonGadgetClass, dssw->stop_ampm_rc_mgr, XmNlabelString, label_str, @@ -633,13 +633,13 @@ dssw_form_flags_to_appt(DSSW *dssw, Dtcm_appointment *a, char *name, Tick t, int if (stop_tick < start_tick) { if (*flagsP == 0) { - char *title = XtNewString(catgets(calendar->DT_catd, 1, 248, + char *title = XtNewString(CATGETS(calendar->DT_catd, 1, 248, "Calendar : Schedule Appointment")); - char *ident1 = XtNewString(catgets(calendar->DT_catd, 1, + char *ident1 = XtNewString(CATGETS(calendar->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(calendar->DT_catd, 1, + char *ident2 = XtNewString(CATGETS(calendar->DT_catd, 1, 250, "Next Day")); - sprintf(buf, "%s", catgets(calendar->DT_catd, 1, 247, + sprintf(buf, "%s", CATGETS(calendar->DT_catd, 1, 247, "This appointment has an end time earlier than\nits begin time. Do you want to\nschedule it into the next day?")); *flagsP = dialog_popup(dssw->parent, DIALOG_TITLE, title, diff --git a/cde/programs/dtcm/dtcm/dtcm_editor.c b/cde/programs/dtcm/dtcm/dtcm_editor.c index 8a6b3e081..a7415c15a 100644 --- a/cde/programs/dtcm/dtcm/dtcm_editor.c +++ b/cde/programs/dtcm/dtcm/dtcm_editor.c @@ -47,7 +47,7 @@ #include "dnd.h" #include "util.h" #include "cm_tty.h" -#include +#include
#include #if !defined(NL_CAT_LOCALE) #define NL_CAT_LOCALE 0 @@ -250,7 +250,7 @@ GetIcon(DTCM_editor *de) drag_xbm_width, drag_xbm_height); if (de->drag_bitmap == 0) { - printf("%s", catgets(calendar->DT_catd, 1, 237, "XCreateBitmapFromData() failed for bitmap.\n")); + printf("%s", CATGETS(calendar->DT_catd, 1, 237, "XCreateBitmapFromData() failed for bitmap.\n")); return; } } @@ -259,7 +259,7 @@ GetIcon(DTCM_editor *de) window, (char *) drag_mask_xbm_bits, drag_mask_xbm_width, drag_mask_xbm_height); if (de->drag_mask == 0) { - printf("%s", catgets(calendar->DT_catd, 1, 238, "XCreateBitmapFromData() failed for mask.\n")); + printf("%s", CATGETS(calendar->DT_catd, 1, 238, "XCreateBitmapFromData() failed for mask.\n")); return; } } @@ -320,7 +320,7 @@ ApptConvertCB( data->bp = XtNewString(context->data); data->size = strlen(data->bp); - data->name = XtNewString(catgets(c->DT_catd, 1, 236, "CalendarAppointment")); + data->name = XtNewString(CATGETS(c->DT_catd, 1, 236, "CalendarAppointment")); } void @@ -396,7 +396,7 @@ StandaloneApptDragStart( NULL) == NULL) { - printf("%s", catgets(c->DT_catd, 1, 239, "DragStart returned NULL.\n")); + printf("%s", CATGETS(c->DT_catd, 1, 239, "DragStart returned NULL.\n")); } } @@ -469,11 +469,11 @@ de_quit_handler(Widget w, XtPointer cdata, XtPointer data) { int answer; if (de->modified == True) { - char *title = XtNewString(catgets(de->c->DT_catd, 1, 1008, "Calendar Appointment : Help")); - char *text = XtNewString(catgets(de->c->DT_catd, 1, 451, "You have made unsaved changes.\nYou may save your changes, discard your changes, \nor return to your previous place in the dialog.")); - char *ident1 = XtNewString(catgets(de->c->DT_catd, 1, 452, "Save")); - char *ident2 = XtNewString(catgets(de->c->DT_catd, 1, 700, "Discard")); - char *ident3 = XtNewString(catgets(de->c->DT_catd, 1, 923, "Cancel")); + char *title = XtNewString(CATGETS(de->c->DT_catd, 1, 1008, "Calendar Appointment : Help")); + char *text = XtNewString(CATGETS(de->c->DT_catd, 1, 451, "You have made unsaved changes.\nYou may save your changes, discard your changes, \nor return to your previous place in the dialog.")); + char *ident1 = XtNewString(CATGETS(de->c->DT_catd, 1, 452, "Save")); + char *ident2 = XtNewString(CATGETS(de->c->DT_catd, 1, 700, "Discard")); + char *ident3 = XtNewString(CATGETS(de->c->DT_catd, 1, 923, "Cancel")); answer = dialog_popup(de->top_level, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -718,9 +718,9 @@ DieFromToolTalkError(DTCM_editor *de, char *errfmt, Tt_status status) errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2); sprintf(errmsg, errfmt, statmsg); - xms_ok = XmStringCreateLocalized(catgets(de->c->DT_catd, 2, 3, "OK")); + xms_ok = XmStringCreateLocalized(CATGETS(de->c->DT_catd, 2, 3, "OK")); xms_errmsg = XmStringCreateLocalized(errmsg); - xms_title = XmStringCreateLocalized(catgets(de->c->DT_catd, 2, 4, + xms_title = XmStringCreateLocalized(CATGETS(de->c->DT_catd, 2, 4, "Calendar : Appointment Editor - Warning")); n = 0; @@ -1145,12 +1145,12 @@ main(int argc, char **argv) { set_int_prop(de->p, CP_DAYBEGIN, start); set_int_prop(de->p, CP_DAYEND, stop); de->c->calname = cm_strdup(get_char_prop(de->p, CP_DEFAULTCAL)); - de->c->DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + de->c->DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); /* Open the message catalog for internationalization */ - calendar->DT_catd = catopen(DTCM_CAT, NL_CAT_LOCALE); + calendar->DT_catd = CATOPEN(DTCM_CAT, NL_CAT_LOCALE); - title = XtNewString(catgets(calendar->DT_catd, 1, 1074, + title = XtNewString(CATGETS(calendar->DT_catd, 1, 1074, "Calendar Appointment")); XtVaSetValues(de->top_level, XmNtitle, title, @@ -1166,7 +1166,7 @@ main(int argc, char **argv) { XmNfractionBase, 5, NULL); - label_str = XmStringCreateLocalized(catgets(de->c->DT_catd, 1, 846, "Save")); + label_str = XmStringCreateLocalized(CATGETS(de->c->DT_catd, 1, 846, "Save")); de->attach_button = XtVaCreateWidget("attach_button", xmPushButtonGadgetClass, de->form, XmNlabelString, label_str, @@ -1182,7 +1182,7 @@ main(int argc, char **argv) { if (!de->file) XtSetSensitive(de->attach_button, False); - label_str = XmStringCreateLocalized(catgets(de->c->DT_catd, 1, 691, "Reset")); + label_str = XmStringCreateLocalized(CATGETS(de->c->DT_catd, 1, 691, "Reset")); de->reset_button = XtVaCreateWidget("reset_button", xmPushButtonGadgetClass, de->form, XmNlabelString, label_str, @@ -1225,7 +1225,7 @@ main(int argc, char **argv) { * Add a drag source icon inside the dssw, lower right */ xmstr = XmStringCreateLocalized( - catgets(de->c->DT_catd, 1, 627, "Drag Appt")); + CATGETS(de->c->DT_catd, 1, 627, "Drag Appt")); de->drag_source = XtVaCreateWidget("drag_source", dtIconGadgetClass, de->form, XmNpixmapPosition, XmPIXMAP_TOP, @@ -1350,7 +1350,7 @@ main(int argc, char **argv) { status = cmtt_init("AppointmentEditor", de, app, calendar->frame); if (TT_OK != status) { char *errfmt; - errfmt = catgets(calendar->DT_catd, 2, 2, + errfmt = CATGETS(calendar->DT_catd, 2, 2, "Could not connect to ToolTalk:\n%s\n"); DieFromToolTalkError( de, errfmt, status ); } diff --git a/cde/programs/dtcm/dtcm/editor.c b/cde/programs/dtcm/dtcm/editor.c index 1f05cfe71..0a9d7e624 100644 --- a/cde/programs/dtcm/dtcm/editor.c +++ b/cde/programs/dtcm/dtcm/editor.c @@ -128,7 +128,7 @@ appt_to_form(Editor *e, CSA_entry_handle a) { free_appt_struct(&appt); return; } - sprintf(buf, "%s: %s", catgets(e->cal->DT_catd, 1, 251, "Author"), + sprintf(buf, "%s: %s", CATGETS(e->cal->DT_catd, 1, 251, "Author"), appt->author->value->item.calendar_user_value->user_name); set_message(e->message_text, buf); free_appt_struct(&appt); @@ -200,7 +200,7 @@ e_build_view_popup(Editor *e) { /* ** Dialog shell and stuff */ - title = XtNewString(catgets(c->DT_catd, 1, 1086, + title = XtNewString(CATGETS(c->DT_catd, 1, 1086, "Calendar : Appointment List")); e->view_frame = XtVaCreatePopupShell("appt_list", xmDialogShellWidgetClass, e->cal->frame, @@ -219,7 +219,7 @@ e_build_view_popup(Editor *e) { XmNautoUnmanage, False, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); e->view_cancel_button = XtVaCreateWidget("cancel", xmPushButtonWidgetClass, e->view_form, XmNlabelString, xmstr, @@ -234,7 +234,7 @@ e_build_view_popup(Editor *e) { XtAddCallback(e->view_cancel_button, XmNactivateCallback, (XtCallbackProc) e_view_cancel_cb, e); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); e->view_help_button = XtVaCreateWidget("help", xmPushButtonWidgetClass, e->view_form, XmNlabelString, xmstr, @@ -257,7 +257,7 @@ e_build_view_popup(Editor *e) { XmNbottomOffset, 5, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 703, "context")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 703, "context")); e->view_list_label= XtVaCreateWidget("type_label", xmLabelGadgetClass, e->view_form, XmNtopAttachment, XmATTACH_FORM, @@ -367,7 +367,7 @@ e_expand_ui_proc(Widget w, XtPointer client_data, XtPointer data) { XtRealizeWidget(e->rfp.rfp_form_mgr); XtRealizeWidget(e->reminders.bfpm_form_mgr); - xmstr = XmStringCreateLocalized(catgets(e->cal->DT_catd, 1, 625, + xmstr = XmStringCreateLocalized(CATGETS(e->cal->DT_catd, 1, 625, "Less")); XtVaSetValues(e->expand_ui_button, XmNlabelString, xmstr, NULL); @@ -383,7 +383,7 @@ e_expand_ui_proc(Widget w, XtPointer client_data, XtPointer data) { expand_state_closed = False; } else { - xmstr = XmStringCreateLocalized(catgets(e->cal->DT_catd, 1, 626, + xmstr = XmStringCreateLocalized(CATGETS(e->cal->DT_catd, 1, 626, "More")); XtVaSetValues(e->expand_ui_button, XmNlabelString, xmstr, NULL); @@ -454,12 +454,12 @@ e_insert_proc(Widget w, XtPointer client_data, XtPointer data) { * Make sure user really meant to insert appointment * into somebody elses calendar. */ - sprintf(buf, "%s", catgets(c->DT_catd, 1, 210, "The appointment will be scheduled in the calendar\nyou are currently browsing. Do you still want to schedule it?")); - sprintf(buf2, "%s %s", catgets(c->DT_catd, 1, 211, "Schedule in"), + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 210, "The appointment will be scheduled in the calendar\nyou are currently browsing. Do you still want to schedule it?")); + sprintf(buf2, "%s %s", CATGETS(c->DT_catd, 1, 211, "Schedule in"), c->view->current_calendar); - title = XtNewString(catgets(c->DT_catd, 1, 212, + title = XtNewString(CATGETS(c->DT_catd, 1, 212, "Calendar : Schedule Appointment")); - ident = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); + ident = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, buf, @@ -498,12 +498,12 @@ e_delete_proc(Widget w, XtPointer client_data, XtPointer data) { * Make sure user really meant to delete appointment * from somebody elses calendar. */ - sprintf(buf, "%s", catgets(c->DT_catd, 1, 1004, "This appointment is in a calendar owned by someone else.\nDo you want to delete it anyway ?")); - sprintf(buf2, "%s %s", catgets(c->DT_catd, 1, 1005, "Delete from"), + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 1004, "This appointment is in a calendar owned by someone else.\nDo you want to delete it anyway ?")); + sprintf(buf2, "%s %s", CATGETS(c->DT_catd, 1, 1005, "Delete from"), c->view->current_calendar); - title = XtNewString(catgets(c->DT_catd, 1, 252, + title = XtNewString(CATGETS(c->DT_catd, 1, 252, "Calendar : Appointment Editor - Delete")); - ident = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); + ident = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, buf, @@ -518,11 +518,11 @@ e_delete_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(e->frame); if (!XmListGetSelectedPos(e->appt_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 252, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 252, "Calendar : Appointment Editor - Delete")); - char *text = XtNewString(catgets(c->DT_catd, 1, 253, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 253, "Select an appointment and DELETE again.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -537,11 +537,11 @@ e_delete_proc(Widget w, XtPointer client_data, XtPointer data) { } if (!(a = editor_nth_appt(e, item_list[0] - 1))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 252, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 252, "Calendar : Appointment Editor - Delete")); - char *text = XtNewString(catgets(c->DT_catd, 1, 256, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 256, "Internal error selecting appointment.\nAppointment was not deleted.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -574,15 +574,15 @@ e_change_proc(Widget w, XtPointer client_data, XtPointer data) { if (strcmp(c->calname, c->view->current_calendar) != 0) { char buf[BUFSIZ], buf2[BUFSIZ]; - char *title = XtNewString(catgets(c->DT_catd, 1, 258, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 258, "Calendar : Appointment Editor - Change")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); /* * Make sure user really meant to insert appointment * into somebody elses calendar. */ - sprintf(buf, "%s", catgets(c->DT_catd, 1, 1003, "This appointment is in a calendar owned by someone else.\nDo you want to change it anyway ?")); - sprintf(buf2, "%s %s", catgets(c->DT_catd, 1, 1006, "Change in"), + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 1003, "This appointment is in a calendar owned by someone else.\nDo you want to change it anyway ?")); + sprintf(buf2, "%s %s", CATGETS(c->DT_catd, 1, 1006, "Change in"), c->view->current_calendar); answer = dialog_popup(e->frame, DIALOG_TITLE, title, @@ -598,11 +598,11 @@ e_change_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(e->frame); if (!XmListGetSelectedPos(e->appt_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 258, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 258, "Calendar : Appointment Editor - Change")); - char *text = XtNewString(catgets(c->DT_catd, 1, 259, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 259, "Select an appointment and CHANGE again.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -617,11 +617,11 @@ e_change_proc(Widget w, XtPointer client_data, XtPointer data) { } if (!(old_a = editor_nth_appt(e, item_list[0] - 1))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1075, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1075, "Calendar : Error - Change Appointment")); - char *text = XtNewString(catgets(c->DT_catd, 1, 1007, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 1007, "Internal error selecting appointment.\nAppointment was not changed.")); - char *ident = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -777,7 +777,7 @@ e_make_editor(Calendar *c) ** first separator. */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 628, "Time What")); + CATGETS(c->DT_catd, 1, 628, "Time What")); e->list_label = XtVaCreateWidget("label", xmLabelGadgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -802,7 +802,7 @@ e_make_editor(Calendar *c) /* ** Create insert, delete, change, and clear buttons */ - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 342, "Insert")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 342, "Insert")); e->insert_button = XtVaCreateWidget("Insert", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -816,7 +816,7 @@ e_make_editor(Calendar *c) XtAddCallback(e->insert_button, XmNactivateCallback, e_insert_proc, e); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 343, "Change")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 343, "Change")); e->change_button = XtVaCreateWidget("Change", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -831,7 +831,7 @@ e_make_editor(Calendar *c) XtAddCallback(e->change_button, XmNactivateCallback, e_change_proc, e); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 419, "Delete")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 419, "Delete")); e->delete_button = XtVaCreateWidget("Delete", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -846,7 +846,7 @@ e_make_editor(Calendar *c) XtAddCallback(e->delete_button, XmNactivateCallback, e_delete_proc, e); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 803, "Clear")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 803, "Clear")); e->clear_button = XtVaCreateWidget("Clear", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -860,7 +860,7 @@ e_make_editor(Calendar *c) XtAddCallback(e->clear_button, XmNactivateCallback, e_clear_proc, e); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); e->close_button = XtVaCreateWidget("Cancel", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -874,7 +874,7 @@ e_make_editor(Calendar *c) XtAddCallback(e->close_button, XmNactivateCallback, e_close_proc, e); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); e->help_button = XtVaCreateWidget("Help", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -908,7 +908,7 @@ e_make_editor(Calendar *c) XmNbottomWidget, e->separator2, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 626, "More")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 626, "More")); e->expand_ui_button = XtVaCreateWidget("expand_ui_button", xmPushButtonWidgetClass, e->base_form_mgr, XmNlabelString, xmstr, @@ -952,7 +952,7 @@ e_make_editor(Calendar *c) * Add a drag source icon inside the dssw, lower right */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 627, "Drag Appt")); + CATGETS(c->DT_catd, 1, 627, "Drag Appt")); e->drag_source = XtVaCreateWidget("drag_source", dtIconGadgetClass, e->dssw.dssw_form_mgr, XmNpixmapPosition, XmPIXMAP_TOP, @@ -1156,21 +1156,21 @@ set_list_title(Editor *e) { switch (e->view_list_glance) { case yearGlance: - header = catgets(c->DT_catd, 1, 704, "Year of %d"); + header = CATGETS(c->DT_catd, 1, 704, "Year of %d"); sprintf(buffer, header, year(e->view_list_date)); break; case monthGlance: - header = catgets(c->DT_catd, 1, 705, "%s"); + header = CATGETS(c->DT_catd, 1, 705, "%s"); format_date(e->view_list_date+1, get_int_prop(p, CP_DATEORDERING), buffer2, 0, 0, 0); sprintf(buffer, header, buffer2); break; case weekGlance: - header = catgets(c->DT_catd, 1, 706, "Week of %s"); + header = CATGETS(c->DT_catd, 1, 706, "Week of %s"); format_date(e->view_list_date+1, get_int_prop(p, CP_DATEORDERING), buffer2, 1, 0, 0); sprintf(buffer, header, buffer2); break; case dayGlance: - header = catgets(c->DT_catd, 1, 707, "%s"); + header = CATGETS(c->DT_catd, 1, 707, "%s"); format_date(e->view_list_date+1, get_int_prop(p, CP_DATEORDERING), buffer2, 1, 0, 0); sprintf(buffer, header, buffer2); break; @@ -1492,12 +1492,12 @@ editor_change(Dtcm_appointment *new_a, CSA_entry_handle old_a, CSA_entry_handle (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_WEEKLY) || (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_MONTHLY) || (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_YEARLY)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 258, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 258, "Calendar : Appointment Editor - Change")); - char *text = XtNewString(catgets(c->DT_catd, 1, 708, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 708, "This appointment repeats in an unknown fashion. All occurrences will be changed\nDo you still wish to change it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1512,15 +1512,15 @@ editor_change(Dtcm_appointment *new_a, CSA_entry_handle old_a, CSA_entry_handle } else if (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 258, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 258, "Calendar : Appointment Editor - Change")); - char *text = XtNewString(catgets(c->DT_catd, 1, 268, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 268, "This appointment is part of a repeating series.\nDo you want to change ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 270, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 270, "This One Only")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 271, "Forward")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 271, "Forward")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1654,15 +1654,15 @@ editor_delete(CSA_entry_handle entry, Calendar *c) { if (appt->repeat_type->value) { if (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 252, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 252, "Calendar : Appointment Editor - Delete")); - char *text = XtNewString(catgets(c->DT_catd, 1, 274, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 274, "This appointment is part of a repeating series.\nDo you want to delete ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 270, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 270, "This One Only")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 271, "Forward")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 271, "Forward")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1681,12 +1681,12 @@ editor_delete(CSA_entry_handle entry, Calendar *c) { } } else if (appt->recurrence_rule->value) { - char *title = XtNewString(catgets(c->DT_catd, 1, 252, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 252, "Calendar : Appointment Editor - Delete")); - char *text = XtNewString(catgets(c->DT_catd, 1, 711, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 711, "This appointment repeats in an unknown fashion. All occurrences will be deleted\nDo you still wish to delete it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1753,12 +1753,12 @@ editor_insert(Dtcm_appointment *appt, CSA_entry_handle *new_a, Calendar *c) { if ((appt->repeat_type) && (appt->repeat_type->value) && (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1101, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1101, "Insert Appointment")); - char *text = XtNewString(catgets(c->DT_catd, 1, 984, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 984, "This appointment is part of a repeating series.\nDo you want to insert appointment ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(e->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1872,7 +1872,7 @@ set_editor_title(Editor *e, char *name) { Calendar *c = e->cal; if (e->frame) { - sprintf(buf, "%s - %s", catgets(c->DT_catd, 1, 279, + sprintf(buf, "%s - %s", CATGETS(c->DT_catd, 1, 279, "Calendar : Appointment Editor"), name); XtVaSetValues(e->frame, XmNtitle, buf, NULL); @@ -1932,11 +1932,11 @@ show_editor_view(Calendar *c, Glance glance) { if (build_editor_view(e, glance, False) <= 0) { - char *title = XtNewString(catgets(c->DT_catd, 1, 280, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 280, "Calendar : Error - Appointment List")); - char *text = XtNewString(catgets(c->DT_catd, 1, 281, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 281, "Sorry, no appointments to list. ")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(e->cal->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, diff --git a/cde/programs/dtcm/dtcm/find.c b/cde/programs/dtcm/dtcm/find.c index 10742709a..a0c17b626 100644 --- a/cde/programs/dtcm/dtcm/find.c +++ b/cde/programs/dtcm/dtcm/find.c @@ -94,7 +94,7 @@ make_find(Calendar *c) else f = (Find*)c->find; - title = XtNewString(catgets(c->DT_catd, 1, 283, "Calendar : Find")); + title = XtNewString(CATGETS(c->DT_catd, 1, 283, "Calendar : Find")); f->frame = XtVaCreatePopupShell("frame", xmDialogShellWidgetClass, c->frame, @@ -113,7 +113,7 @@ make_find(Calendar *c) XmNmarginHeight, 0, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 284, "Find:")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 284, "Find:")); f->apptstr_label = XtVaCreateWidget("label", xmLabelWidgetClass, f->form, @@ -153,7 +153,7 @@ make_find(Calendar *c) NULL); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 973, "Search all")); + CATGETS(c->DT_catd, 1, 973, "Search all")); f->search_all = XtVaCreateWidget("searchAll", xmToggleButtonGadgetClass, f->search_rc_mgr, @@ -165,7 +165,7 @@ make_find(Calendar *c) NULL); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 974, "Search from")); + CATGETS(c->DT_catd, 1, 974, "Search from")); f->search_range = XtVaCreateWidget("searchrange", xmToggleButtonGadgetClass, f->search_rc_mgr, @@ -209,7 +209,7 @@ make_find(Calendar *c) format_tick(cursor, ot, sep, buffer); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 975, "to")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 975, "to")); f->search_tolabel = XtVaCreateWidget("tolabel", xmLabelWidgetClass, f->form, @@ -247,7 +247,7 @@ make_find(Calendar *c) NULL); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 848, "Date")); + CATGETS(c->DT_catd, 1, 848, "Date")); f->date_label = XtVaCreateWidget("finddatelabel", xmLabelWidgetClass, f->form, @@ -260,7 +260,7 @@ make_find(Calendar *c) NULL); XmStringFree(xmstr); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 849, "Time")); + CATGETS(c->DT_catd, 1, 849, "Time")); f->time_label = XtVaCreateWidget("findtimelabel", xmLabelWidgetClass, f->form, @@ -273,7 +273,7 @@ make_find(Calendar *c) NULL); XmStringFree(xmstr); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 850, "What")); + CATGETS(c->DT_catd, 1, 850, "What")); f->what_label = XtVaCreateWidget("findwhatlabel", xmLabelWidgetClass, f->form, @@ -320,7 +320,7 @@ make_find(Calendar *c) XmNbottomOffset, 5, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 285, "Find")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 285, "Find")); f->find_button = XtVaCreateWidget("findbutton", xmPushButtonGadgetClass, button_form, @@ -338,7 +338,7 @@ make_find(Calendar *c) XmStringFree(xmstr); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 851, "Show Appointment")); + CATGETS(c->DT_catd, 1, 851, "Show Appointment")); f->show_button = XtVaCreateWidget("show", xmPushButtonGadgetClass, button_form, @@ -355,7 +355,7 @@ make_find(Calendar *c) XtAddCallback(f->show_button, XmNactivateCallback, show_appt, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); f->cancel_button = XtVaCreateWidget("cancel", xmPushButtonGadgetClass, button_form, @@ -372,7 +372,7 @@ make_find(Calendar *c) XtAddCallback(f->cancel_button, XmNactivateCallback, f_cancel_cb, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); f->help_button = XtVaCreateWidget("help", xmPushButtonGadgetClass, button_form, @@ -587,7 +587,7 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs astr = XmTextGetString(f->apptstr); if (astr == NULL || *astr == '\0') { - sprintf(message, "%s", catgets(c->DT_catd, 1, 290, "Specify Appt String to Match.")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 290, "Specify Appt String to Match.")); set_message(f->find_message, message); return; } @@ -612,12 +612,12 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs if (start == DATE_BBOT) start = get_bot(); else if (start == DATE_AEOT) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 810, "Please enter a start date after 1/1/1970")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 810, "Please enter a start date after 1/1/1970")); set_message(f->find_message, message); return; } else if (start <= 0) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 811, "Malformed start date")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 811, "Malformed start date")); set_message(f->find_message, message); return; } @@ -628,18 +628,18 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs if (end_of_time == DATE_AEOT) end_of_time = real_eot; else if (end_of_time == DATE_BBOT) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 812, "Please enter an end date before 1/1/2038")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 812, "Please enter an end date before 1/1/2038")); set_message(f->find_message, message); return; } else if (end_of_time <= 0) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 813, "Malformed end date")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 813, "Malformed end date")); set_message(f->find_message, message); return; } if (start >= end_of_time) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 713, "You must choose a begin date before the end date.")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 713, "You must choose a begin date before the end date.")); set_message(f->find_message, message); return; } @@ -722,9 +722,9 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs if (match_total != last_match_total) { if (match_total == 1) - sprintf(message, catgets(c->DT_catd, 1, 631, "%d match found"), match_total); + sprintf(message, CATGETS(c->DT_catd, 1, 631, "%d match found"), match_total); else if (match_total > 1) - sprintf(message, catgets(c->DT_catd, 1, 292, "%d matches found"), match_total); + sprintf(message, CATGETS(c->DT_catd, 1, 292, "%d matches found"), match_total); set_message(f->find_message, message); } @@ -751,11 +751,11 @@ find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs } /* end for range.end loop */ if (match_total == 0) - sprintf(message, "%s", catgets(c->DT_catd, 1, 291, "Appointment Not Found.")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 291, "Appointment Not Found.")); else if (match_total == 1) - sprintf(message, catgets(c->DT_catd, 1, 631, "%d match found"), match_total); + sprintf(message, CATGETS(c->DT_catd, 1, 631, "%d match found"), match_total); else - sprintf(message, catgets(c->DT_catd, 1, 292, "%d matches found"), match_total); + sprintf(message, CATGETS(c->DT_catd, 1, 292, "%d matches found"), match_total); set_message(f->find_message, message); free_appt_struct(&appt); _DtTurnOffHourGlass(f->frame); @@ -781,12 +781,12 @@ show_appt(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs) XtVaGetValues(f->find_list, XmNitemCount, &list_cnt, NULL); if (list_cnt == 0) { - sprintf(buf, "%s", catgets(c->DT_catd, 1, 714, "There are no appointments in the list. You must find one before showing an appointment.")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 714, "There are no appointments in the list. You must find one before showing an appointment.")); set_message(f->find_message, buf); return; } if (!XmListGetSelectedPos(f->find_list, &pos_list, &pos_cnt)) { - sprintf(buf, "%s", catgets(c->DT_catd, 1, 632, "Please select an appointment from the list to show")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 632, "Please select an appointment from the list to show")); set_message(f->find_message, buf); return; } diff --git a/cde/programs/dtcm/dtcm/goto.c b/cde/programs/dtcm/dtcm/goto.c index f457efd65..924833cb9 100644 --- a/cde/programs/dtcm/dtcm/goto.c +++ b/cde/programs/dtcm/dtcm/goto.c @@ -95,7 +95,7 @@ make_goto(Calendar *c) else g = (Goto*)c->goTo; - title = XtNewString(catgets(c->DT_catd, 1, 715, "Calendar : Go to Date")); + title = XtNewString(CATGETS(c->DT_catd, 1, 715, "Calendar : Go to Date")); g->frame = XtVaCreatePopupShell("frame", xmDialogShellWidgetClass, c->frame, XmNtitle, title, @@ -114,7 +114,7 @@ make_goto(Calendar *c) XmNmarginHeight, 0, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 293, "Date:")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 293, "Date:")); g->datelabel = XtVaCreateWidget("Date:", xmLabelWidgetClass, g->form, XmNleftAttachment, XmATTACH_FORM, @@ -163,7 +163,7 @@ make_goto(Calendar *c) XmNfractionBase, 3, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 294, "Go To")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 294, "Go To")); g->datebutton = XtVaCreateWidget("goTo", xmPushButtonWidgetClass, button_form, XmNtopAttachment, XmATTACH_WIDGET, @@ -178,7 +178,7 @@ make_goto(Calendar *c) XtAddCallback(g->datebutton, XmNactivateCallback, goto_date, NULL); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); g->cancelbutton = XtVaCreateWidget("cancel", xmPushButtonWidgetClass, button_form, XmNtopAttachment, XmATTACH_WIDGET, @@ -193,7 +193,7 @@ make_goto(Calendar *c) XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); g->helpbutton = XtVaCreateWidget("help", xmPushButtonWidgetClass, button_form, XmNtopAttachment, XmATTACH_WIDGET, @@ -259,7 +259,7 @@ goto_date(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs) date = XmTextGetString(g->datetext); if ((date == NULL) || (*date == '\0')) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 297, "Please type in a date")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 297, "Please type in a date")); set_message(g->goto_message, message); return; } @@ -272,24 +272,24 @@ goto_date(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs) gotodate = cm_getdate(date, NULL); } if (!strcmp(today, date)) { - sprintf(message, catgets(c->DT_catd, 1, 298, "You are already viewing %s"), date); + sprintf(message, CATGETS(c->DT_catd, 1, 298, "You are already viewing %s"), date); set_message(g->goto_message, message); return; } if (gotodate == DATE_BBOT) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 814, "You must enter a date after 1969 and before 2038")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 814, "You must enter a date after 1969 and before 2038")); set_message(g->goto_message, message); return; } else if (gotodate == DATE_AEOT) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 814, "You must enter a date after 1969 and before 2038")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 814, "You must enter a date after 1969 and before 2038")); set_message(g->goto_message, message); return; } else if (gotodate <= 0) { - sprintf(message, "%s", catgets(c->DT_catd, 1, 299, "Invalid Date")); + sprintf(message, "%s", CATGETS(c->DT_catd, 1, 299, "Invalid Date")); set_message(g->goto_message, message); return; } diff --git a/cde/programs/dtcm/dtcm/group_editor.c b/cde/programs/dtcm/dtcm/group_editor.c index 9c528e360..75bb93638 100644 --- a/cde/programs/dtcm/dtcm/group_editor.c +++ b/cde/programs/dtcm/dtcm/group_editor.c @@ -219,7 +219,7 @@ appt_to_form(GEditor *ge, CSA_entry_handle a, char *name, int version) { backend_err_msg(ge->frame, name, stat, pu->xm_error_pixmap); if (stat == CSA_SUCCESS) { sprintf(buf, "%s: %s", - catgets(ge->cal->DT_catd, 1, 300, "Author"), + CATGETS(ge->cal->DT_catd, 1, 300, "Author"), appt->author->value->item.calendar_user_value->user_name); set_message(ge->message_text, buf); } else @@ -266,10 +266,10 @@ ge_set_modify_buttons(GEditor *ge, int cnt) { if (cnt == 1) sprintf(buf, "%d %s.", cnt, - catgets(ge->cal->DT_catd, 1, 633, "Calendar Selected")); + CATGETS(ge->cal->DT_catd, 1, 633, "Calendar Selected")); else sprintf(buf, "%d %s.", cnt, - catgets(ge->cal->DT_catd, 1, 634, "Calendars Selected")); + CATGETS(ge->cal->DT_catd, 1, 634, "Calendars Selected")); set_message(ge->message_text, buf); } @@ -420,7 +420,7 @@ ge_build_expand(GEditor *ge) { } XtManageChildren(widgets, n - 2); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 304, "Mail...")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 304, "Mail...")); ge->mail_button = XtVaCreateWidget("mail", xmPushButtonWidgetClass, ge->base_form_mgr, XmNlabelString, xmstr, @@ -472,7 +472,7 @@ ge_expand_ui_proc(Widget w, XtPointer client_data, XtPointer data) { XtRealizeWidget(ge->rfp.rfp_form_mgr); xmstr = XmStringCreateLocalized( - catgets(ge->cal->DT_catd, 1, 625, "Less")); + CATGETS(ge->cal->DT_catd, 1, 625, "Less")); XtVaSetValues(ge->expand_ui_button, XmNlabelString, xmstr, NULL); @@ -489,7 +489,7 @@ ge_expand_ui_proc(Widget w, XtPointer client_data, XtPointer data) { expand_state_closed = False; } else { XtSetSensitive(ge->rfp.rfp_form_mgr, False); - xmstr = XmStringCreateLocalized(catgets(ge->cal->DT_catd, 1, 626, + xmstr = XmStringCreateLocalized(CATGETS(ge->cal->DT_catd, 1, 626, "More")); XtVaSetValues(ge->expand_ui_button, XmNlabelString, xmstr, NULL); @@ -707,11 +707,11 @@ ge_insert_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(ge->frame); XmListGetSelectedPos(ge->access_list, &c_list, &c_cnt); if (c_cnt <= 0) { - char *title = XtNewString(catgets(c->DT_catd, 1, 305, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 305, "Calendar : Error - Group Appointment Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 306, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 306, "Select a calendar and INSERT again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -813,11 +813,11 @@ ge_delete_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(ge->frame); if (!XmListGetSelectedPos(ge->appt_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 305, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 305, "Calendar : Error - Group Appointment Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 253, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 253, "Select an appointment and DELETE again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -832,11 +832,11 @@ ge_delete_proc(Widget w, XtPointer client_data, XtPointer data) { } if (!(entry = geditor_nth_appt(ge, item_list[0], &ad))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 305, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 305, "Calendar : Error - Group Appointment Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 256, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 256, "Internal error selecting appointment.\nAppointment was not deleted.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, @@ -857,11 +857,11 @@ ge_delete_proc(Widget w, XtPointer client_data, XtPointer data) { XtVaGetValues(ge->access_list, XmNselectedItemCount, &c_cnt, NULL); if (c_cnt <= 0) { - char *title = XtNewString(catgets(c->DT_catd, 1, 305, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 305, "Calendar : Error - Group Appointment Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 315, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 315, "Select a calendar and DELETE again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -892,15 +892,15 @@ ge_delete_proc(Widget w, XtPointer client_data, XtPointer data) { if (appt->repeat_type->value) { if (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 314, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 314, "Calendar : Group Appointment Editor - Delete")); - char *text = XtNewString(catgets(c->DT_catd, 1, 274, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 274, "This appointment is part of a repeating series.\nDo you want to delete ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 270, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 270, "This One Only")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 271, "Forward")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 271, "Forward")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -919,12 +919,12 @@ ge_delete_proc(Widget w, XtPointer client_data, XtPointer data) { } } else if (appt->recurrence_rule->value) { - char *title = XtNewString(catgets(c->DT_catd, 1, 314, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 314, "Calendar : Group Appointment Editor - Delete")); - char *text = XtNewString(catgets(c->DT_catd, 1, 711, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 711, "This appointment repeats in an unknown fashion. All occurrences will be deleted\nDo you still wish to delete it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -982,11 +982,11 @@ ge_change_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(ge->frame); if (!XmListGetSelectedPos(ge->appt_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 305, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 305, "Calendar : Error - Group Appointment Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 259, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 259, "Select an appointment and CHANGE again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1001,11 +1001,11 @@ ge_change_proc(Widget w, XtPointer client_data, XtPointer data) { } if (!(old_a = geditor_nth_appt(ge, item_list[0], &ad))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 305, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 305, "Calendar : Error - Group Appointment Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 1007, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 1007, "Internal error selecting appointment.\nAppointment was not changed.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1024,11 +1024,11 @@ ge_change_proc(Widget w, XtPointer client_data, XtPointer data) { XtVaGetValues(ge->access_list, XmNselectedItemCount, &c_cnt, NULL); if (c_cnt <= 0) { - char *title = XtNewString(catgets(c->DT_catd, 1, 329, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 329, "Calendar : Group Appointment Editor - Change")); - char *text = XtNewString(catgets(c->DT_catd, 1, 330, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 330, "Select a calendar and CHANGE again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1071,12 +1071,12 @@ ge_change_proc(Widget w, XtPointer client_data, XtPointer data) { (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_WEEKLY) || (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_MONTHLY) || (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_YEARLY)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 329, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 329, "Calendar : Group Appointment Editor - Change")); - char *text = XtNewString(catgets(c->DT_catd, 1, 708, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 708, "This appointment repeats in an unknown fashion. All occurrences will be changed\nDo you still wish to change it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1092,15 +1092,15 @@ ge_change_proc(Widget w, XtPointer client_data, XtPointer data) { else if (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 329, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 329, "Calendar : Group Appointment Editor - Change")); - char *text = XtNewString(catgets(c->DT_catd, 1, 268, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 268, "This appointment is part of a repeating series.\nDo you want to change ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 270, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 270, "This One Only")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 271, "Forward")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 271, "Forward")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(ge->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1337,7 +1337,7 @@ ge_make_editor(Calendar *c) { cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 342, "Insert")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 342, "Insert")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNleftAttachment, XmATTACH_POSITION); ++cnt; XtSetArg(args[cnt], XmNleftPosition, 1); ++cnt; @@ -1350,7 +1350,7 @@ ge_make_editor(Calendar *c) { ge); cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 343, "Change")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 343, "Change")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNleftAttachment, XmATTACH_POSITION); ++cnt; XtSetArg(args[cnt], XmNleftPosition, 2); ++cnt; @@ -1363,7 +1363,7 @@ ge_make_editor(Calendar *c) { ge); cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 419, "Delete")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 419, "Delete")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNleftAttachment, XmATTACH_POSITION); ++cnt; XtSetArg(args[cnt], XmNleftPosition, 3); ++cnt; @@ -1376,7 +1376,7 @@ ge_make_editor(Calendar *c) { ge); cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 803, "Clear")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 803, "Clear")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNleftAttachment, XmATTACH_POSITION); ++cnt; XtSetArg(args[cnt], XmNleftPosition, 4); ++cnt; @@ -1389,7 +1389,7 @@ ge_make_editor(Calendar *c) { ge); cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNleftAttachment, XmATTACH_POSITION); ++cnt; XtSetArg(args[cnt], XmNleftPosition, 5); ++cnt; @@ -1402,7 +1402,7 @@ ge_make_editor(Calendar *c) { ge); cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNleftAttachment, XmATTACH_POSITION); ++cnt; XtSetArg(args[cnt], XmNleftPosition, 6); ++cnt; @@ -1445,7 +1445,7 @@ ge_make_editor(Calendar *c) { ** The more button */ cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 626, "More")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 626, "More")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNbottomAttachment, XmATTACH_WIDGET); ++cnt; XtSetArg(args[cnt], XmNbottomWidget, ge->separator1); ++cnt; @@ -1462,7 +1462,7 @@ ge_make_editor(Calendar *c) { ** The appt list label */ cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 971, "Time Calendar")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 971, "Time Calendar")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNtopAttachment, XmATTACH_FORM); ++cnt; XtSetArg(args[cnt], XmNtopOffset, 5); ++cnt; @@ -1474,7 +1474,7 @@ ge_make_editor(Calendar *c) { ** The appt list label */ cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 972, "What")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 972, "What")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNtopAttachment, XmATTACH_FORM); ++cnt; XtSetArg(args[cnt], XmNtopOffset, 5); ++cnt; @@ -1501,7 +1501,7 @@ ge_make_editor(Calendar *c) { /* * Add a drag source icon inside the dssw, lower right */ - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 627, "Drag Appt")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 627, "Drag Appt")); ge->drag_source = XtVaCreateWidget("drag_source", dtIconGadgetClass, ge->dssw.dssw_form_mgr, XmNpixmapPosition, XmPIXMAP_TOP, @@ -1571,7 +1571,7 @@ ge_make_editor(Calendar *c) { ** The access list label */ cnt = 0; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 340, "Calendar")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 340, "Calendar")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNbottomAttachment, XmATTACH_WIDGET); ++cnt; XtSetArg(args[cnt], XmNbottomWidget, ge->access_list_sw); ++cnt; @@ -1582,7 +1582,7 @@ ge_make_editor(Calendar *c) { "access_list_label", args, cnt); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 341, "Access")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 341, "Access")); XtSetArg(args[cnt], XmNlabelString, xmstr); ++cnt; XtSetArg(args[cnt], XmNbottomAttachment, XmATTACH_WIDGET); ++cnt; XtSetArg(args[cnt], XmNbottomWidget, ge->access_list_sw); ++cnt; @@ -1731,7 +1731,7 @@ add_to_gaccess_list( new_data->entry_access = user_access; CmDataListAdd(ge->access_data, (void *)new_data, 0); - buf = (char *)ckalloc(ACCESS_NAME_LEN + cm_strlen(catgets(c->DT_catd, + buf = (char *)ckalloc(ACCESS_NAME_LEN + cm_strlen(CATGETS(c->DT_catd, 1, 348, "Insert Permission")) + 5); sprintf(buf, "%-*s %c", ACCESS_NAME_LEN, name, access); xmstr = XmStringCreateLocalized(buf); @@ -1978,7 +1978,7 @@ set_geditor_title(GEditor *ge, char *name) { Calendar *c = ge->cal; if (ge->frame) { - sprintf(buf, "%s - %s", catgets(c->DT_catd, 1, 349, + sprintf(buf, "%s - %s", CATGETS(c->DT_catd, 1, 349, "Calendar : Group Appointment Editor"), name); XtVaSetValues(ge->frame, XmNtitle, buf, NULL); diff --git a/cde/programs/dtcm/dtcm/help.c b/cde/programs/dtcm/dtcm/help.c index 96f4fc0c7..e350f6249 100644 --- a/cde/programs/dtcm/dtcm/help.c +++ b/cde/programs/dtcm/dtcm/help.c @@ -98,7 +98,7 @@ display_help(Calendar *c, ArgList args, int nargs) if (!c->mainhelpdialog) { Arg oneArg; - char *title = XtNewString(catgets(c->DT_catd, 1, 1076, "Calendar : Help")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1076, "Calendar : Help")); XtSetArg(oneArg, XmNtitle, title); c->mainhelpdialog = @@ -154,7 +154,7 @@ void show_main_help(Widget w, XtPointer clientData, XtPointer cbs) switch ((int)status) { case DtHELP_SELECT_ERROR: - printf("%s", catgets(c->DT_catd, 1, 350, "Selection Error, cannot continue\n")); + printf("%s", CATGETS(c->DT_catd, 1, 350, "Selection Error, cannot continue\n")); break; case DtHELP_SELECT_VALID: while (selWidget != NULL) @@ -174,9 +174,9 @@ void show_main_help(Widget w, XtPointer clientData, XtPointer cbs) case DtHELP_SELECT_INVALID: { - char *title = XtNewString(catgets(c->DT_catd, 1, 110, "Calendar : Error - Help")); - char *text = XtNewString(catgets(c->DT_catd, 1, 352, "You must select a component within your application.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 110, "Calendar : Error - Help")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 352, "You must select a component within your application.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, diff --git a/cde/programs/dtcm/dtcm/misc.c b/cde/programs/dtcm/dtcm/misc.c index f598633bb..051547cba 100644 --- a/cde/programs/dtcm/dtcm/misc.c +++ b/cde/programs/dtcm/dtcm/misc.c @@ -89,47 +89,47 @@ create_repeat_menu(Widget parent, XtCallbackProc cb_func, XtPointer data) { XtSetArg(args[ac], XmNpositionMode, XmONE_BASED); ++ac; cb = XmCreateComboBox(parent, "repeat_cb", args, ac); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 200, "One Time")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 200, "One Time")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 853, "Daily")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 853, "Daily")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 854, "Weekly")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 854, "Weekly")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 855, "Every Two Weeks")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 855, "Every Two Weeks")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 856, "Monthly By Date")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 856, "Monthly By Date")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 857, "Monthly By Weekday")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 857, "Monthly By Weekday")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 858, "Yearly")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 858, "Yearly")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 859, "Monday Thru Friday")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 859, "Monday Thru Friday")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 860, "Mon, Wed, Fri")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 860, "Mon, Wed, Fri")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 861, "Tuesday, Thursday")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 861, "Tuesday, Thursday")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 862, "Repeat Every...")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 862, "Repeat Every...")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); @@ -160,59 +160,59 @@ create_for_menu(Widget parent) { */ XtVaSetValues(cb, XmNwidth, 80, NULL); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 863, "2")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 863, "2")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 864, "3")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 864, "3")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 865, "4")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 865, "4")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 866, "5")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 866, "5")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 867, "6")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 867, "6")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 868, "7")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 868, "7")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 869, "8")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 869, "8")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 870, "9")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 870, "9")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 871, "10")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 871, "10")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 872, "11")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 872, "11")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 873, "12")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 873, "12")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 874, "13")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 874, "13")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 875, "14")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 875, "14")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 876, "forever")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 876, "forever")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); @@ -237,15 +237,15 @@ create_privacy_menu(Widget parent) { XtSetArg(args[ac], XmNpositionMode, XmONE_BASED); ++ac; cb = XmCreateComboBox(parent, "privacy_cb", args, ac); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 721, "Others See Time And Text")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 721, "Others See Time And Text")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 722, "Others See Time Only")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 722, "Others See Time Only")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 723, "Others See Nothing")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 723, "Others See Nothing")); XmComboBoxAddItem((Widget)cb, xmstr, 0, False); XmStringFree(xmstr); @@ -323,7 +323,7 @@ set_time_submenu(Widget parent, } if (nt) { - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 353, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 353, "No Time")); (*widget_list)[allocation_counter++] = menuitem = XtVaCreateWidget("noTime", @@ -338,7 +338,7 @@ set_time_submenu(Widget parent, } if (ad) { - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 354, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 354, "All Day")); (*widget_list)[allocation_counter++] = menuitem = XtVaCreateWidget("allDay", @@ -413,7 +413,7 @@ create_time_scope_menu(Widget parent, option_m = XmCreateOptionMenu(parent, "option_m", args, ac); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 877, "Mins")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 877, "Mins")); menuitems[0] = XtVaCreateWidget("timescope0", xmPushButtonGadgetClass, menu, XmNlabelString, xmstr, @@ -424,7 +424,7 @@ create_time_scope_menu(Widget parent, callback, client_data); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 878, "Hrs")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 878, "Hrs")); menuitems[1] = XtVaCreateWidget("timescope1", xmPushButtonGadgetClass, menu, XmNlabelString, xmstr, @@ -435,7 +435,7 @@ create_time_scope_menu(Widget parent, callback, client_data); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 879, "Days")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 879, "Days")); menuitems[2] = XtVaCreateWidget("timescope2", xmPushButtonGadgetClass, menu, XmNlabelString, xmstr, @@ -479,7 +479,7 @@ create_repeat_scope_menu(Widget parent, XmString label, sprintf(buf, "repeatscope%d", REPEAT_DAYS); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 816, "Days"));; + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 816, "Days"));; menuitems[0] = XtVaCreateWidget(buf, xmPushButtonGadgetClass, menu, XmNlabelString, xmstr, @@ -491,7 +491,7 @@ create_repeat_scope_menu(Widget parent, XmString label, XmStringFree(xmstr); sprintf(buf, "repeatscope%d", REPEAT_WEEKS); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 817, "Weeks"));; + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 817, "Weeks"));; menuitems[1] = XtVaCreateWidget(buf, xmPushButtonGadgetClass, menu, XmNlabelString, xmstr, @@ -503,7 +503,7 @@ create_repeat_scope_menu(Widget parent, XmString label, XmStringFree(xmstr); sprintf(buf, "repeatscope%d", REPEAT_MONTHS); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 818, "Months"));; + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 818, "Months"));; menuitems[2] = XtVaCreateWidget(buf, xmPushButtonGadgetClass, menu, XmNlabelString, xmstr, @@ -768,7 +768,7 @@ dialog_popup(Widget parent, ...) { case BUTTON_HELP: help_str = cm_strdup(va_arg(pvar, char *)); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 77, "Help")); + CATGETS(c->DT_catd, 1, 77, "Help")); button = XtVaCreateWidget("help_button", xmPushButtonGadgetClass, form, XmNlabelString, xmstr, @@ -891,55 +891,55 @@ editor_err_msg(Widget frame, char *name, Validate_op op, Pixmap p) { switch(op) { case COULD_NOT_OPEN_FILE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 355, "Unable to open callog file.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 355, "Unable to open callog file.\nOperation was cancelled. Calendar")); sprintf(error_buf, CMSD_ERROR_HELP); break; case CANCEL_APPT: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 356, "Per user request, Operation was cancelled.\nCalendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 356, "Per user request, Operation was cancelled.\nCalendar")); help_button = False; break; case INVALID_DATE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 357, "Invalid value in DATE field.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 357, "Invalid value in DATE field.\nOperation was cancelled. Calendar")); sprintf(error_buf, DATE_ERROR_HELP); break; case INVALID_START: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 358, "Invalid value in START field.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 358, "Invalid value in START field.\nOperation was cancelled. Calendar")); sprintf(error_buf, START_ERROR_HELP); break; case INVALID_TIME_DUE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 1011, "Invalid value in the \"Time Due\" field.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 1011, "Invalid value in the \"Time Due\" field.\nOperation was cancelled. Calendar")); sprintf(error_buf, START_ERROR_HELP); break; case INVALID_STOP: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 359, "Invalid value in END field.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 359, "Invalid value in END field.\nOperation was cancelled. Calendar")); sprintf(error_buf, STOP_ERROR_HELP); break; case MISSING_DATE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 360, "You must provide a DATE value.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 360, "You must provide a DATE value.\nOperation was cancelled. Calendar")); sprintf(error_buf, MISSING_FIELD_ERROR_HELP); break; case MISSING_START: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 361, "You must provide a START value.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 361, "You must provide a START value.\nOperation was cancelled. Calendar")); sprintf(error_buf, MISSING_FIELD_ERROR_HELP); break; case MISSING_WHAT: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 362, "You must provide a WHAT value.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 362, "You must provide a WHAT value.\nOperation was cancelled. Calendar")); sprintf(error_buf, MISSING_FIELD_ERROR_HELP); break; case REPEAT_FOR_MISMATCH: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 363, "Invalid or mismatched REPEAT and FOR values.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 363, "Invalid or mismatched REPEAT and FOR values.\nOperation was cancelled. Calendar")); sprintf(error_buf, REPEAT_FOR_ERROR_HELP); break; case INVALID_NOTIME_APPT: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 724, "No Time appointments must have a WHAT value specified.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 724, "No Time appointments must have a WHAT value specified.\nOperation was cancelled. Calendar")); sprintf(error_buf, NO_TIME_ERROR_HELP); break; case INVALID_TIME: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 1104, "Invalid value in TIME DUE field.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 1104, "Invalid value in TIME DUE field.\nOperation was cancelled. Calendar")); sprintf(error_buf, START_ERROR_HELP); break; case MISSING_TIME: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 1105, "You must provide a TIME DUE value.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 1105, "You must provide a TIME DUE value.\nOperation was cancelled. Calendar")); sprintf(error_buf, MISSING_FIELD_ERROR_HELP); break; case VALID_APPT: @@ -949,9 +949,9 @@ editor_err_msg(Widget frame, char *name, Validate_op op, Pixmap p) { sprintf(buf2, "%s %s", buf, name); if (help_button) { - char *title = XtNewString(catgets(c->DT_catd, 1, 914, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 914, "Calendar : Error - Editor")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(frame, DIALOG_TITLE, title, DIALOG_TEXT, buf2, @@ -963,9 +963,9 @@ editor_err_msg(Widget frame, char *name, Validate_op op, Pixmap p) { XtFree(title); } else { - char *title = XtNewString(catgets(c->DT_catd, 1, 914, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 914, "Calendar : Error - Editor")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(frame, DIALOG_TITLE, title, DIALOG_TEXT, buf2, @@ -994,83 +994,83 @@ backend_err_msg( switch(stat) { case CSA_E_CALENDAR_EXISTS: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 367, "Calendar already exists.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 367, "Calendar already exists.\nOperation was cancelled. Calendar")); help_button = False; break; case CSA_E_CALENDAR_NOT_EXIST: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 368, "Calendar does not exist.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 368, "Calendar does not exist.\nOperation was cancelled. Calendar")); help_button = False; break; case CSA_X_DT_E_ENTRY_NOT_FOUND: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 725, "Calendar Entry does not exist.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 725, "Calendar Entry does not exist.\nOperation was cancelled. Calendar")); break; case CSA_E_INVALID_ENTRY_HANDLE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 881, "Internal Error #1: Invalid calendar/entry handle.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 881, "Internal Error #1: Invalid calendar/entry handle.\nOperation was cancelled. Calendar")); break; case CSA_E_INVALID_SESSION_HANDLE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 882, "Internal Error #2: Invalid session handle.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 882, "Internal Error #2: Invalid session handle.\nOperation was cancelled. Calendar")); break; case CSA_E_NO_AUTHORITY: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 370, "Authorization error. Permission denied.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 370, "Authorization error. Permission denied.\nOperation was cancelled. Calendar")); help_button = False; break; case CSA_E_INVALID_PARAMETER: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 883, "Internal Error #3: Invalid data value.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 883, "Internal Error #3: Invalid data value.\nOperation was cancelled. Calendar")); break; case CSA_E_READONLY: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 884, "Internal Error #4: Value specified for a read-only attribute.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 884, "Internal Error #4: Value specified for a read-only attribute.\nOperation was cancelled. Calendar")); break; case CSA_E_INVALID_ATTRIBUTE_VALUE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 885, "Internal Error #5: Incorrect data type specified for an attribute value.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 885, "Internal Error #5: Incorrect data type specified for an attribute value.\nOperation was cancelled. Calendar")); break; case CSA_E_UNSUPPORTED_ATTRIBUTE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 886, "Internal Error #6: Specified attribute is not supported on this calendar version.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 886, "Internal Error #6: Specified attribute is not supported on this calendar version.\nOperation was cancelled. Calendar")); break; case CSA_E_NOT_SUPPORTED: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 887, "Internal Error #7: Specified function is not supported on this calendar version.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 887, "Internal Error #7: Specified function is not supported on this calendar version.\nOperation was cancelled. Calendar")); break; case CSA_E_INVALID_ENUM: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 888, "Internal Error #8: Invalid operator specified.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 888, "Internal Error #8: Invalid operator specified.\nOperation was cancelled. Calendar")); break; case CSA_E_INSUFFICIENT_MEMORY: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 378, "Memory allocation error - not enough memory.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 378, "Memory allocation error - not enough memory.\nOperation was cancelled. Calendar")); sprintf(error_buf, MEMORY_ALLOC_ERROR_HELP); break; case CSA_E_DISK_FULL: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 907, "No space left for calendar file.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 907, "No space left for calendar file.\nOperation was cancelled. Calendar")); break; case CSA_E_SERVICE_UNAVAILABLE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 921, "Couldn't access calendar: ")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 921, "Couldn't access calendar: ")); break; case CSA_X_DT_E_INVALID_SERVER_LOCATION: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 641, "Server failed to get network address\nfor the specified location: invalid hostname.")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 641, "Server failed to get network address\nfor the specified location: invalid hostname.")); break; case CSA_X_DT_E_SERVICE_NOT_REGISTERED: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 642, "rpc.cmsd daemon is not registered.\nPlease verify rpc.cmsd is installed correctly on your system.")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 642, "rpc.cmsd daemon is not registered.\nPlease verify rpc.cmsd is installed correctly on your system.")); sprintf(error_buf, CMSD_ERROR_HELP); break; case CSA_X_DT_E_SERVER_TIMEOUT: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 727, "Your request timed out\nPlease verify rpc.cmsd is installed correctly on your system.")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 727, "Your request timed out\nPlease verify rpc.cmsd is installed correctly on your system.")); sprintf(error_buf, CMSD_ERROR_HELP); break; case CSA_E_FAILURE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 643, "Couldn't access calendar. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 643, "Couldn't access calendar. Calendar")); break; case CSA_E_INVALID_RULE: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 1120, "The event cannot be scheduled in the given time frame.\nThe operation was cancelled.")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 1120, "The event cannot be scheduled in the given time frame.\nThe operation was cancelled.")); break; case CSA_SUCCESS: return; default: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 383, "Unknown error.\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 383, "Unknown error.\nOperation was cancelled. Calendar")); break; } sprintf(buf2, "%s %s", buf, name); if (help_button) { - char *title = XtNewString(catgets(c->DT_catd, 1, 890, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 890, "Calendar : Error - Services")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(frame, DIALOG_TITLE, title, DIALOG_TEXT, buf2, @@ -1082,9 +1082,9 @@ backend_err_msg( XtFree(title); } else { - char *title = XtNewString(catgets(c->DT_catd, 1, 890, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 890, "Calendar : Error - Services")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(frame, DIALOG_TITLE, title, DIALOG_TEXT, buf2, @@ -1112,11 +1112,11 @@ query_user(void *user_data) { char *ident2; static int answer; - sprintf(buf, "%s", catgets(c->DT_catd, 1, 386, + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 386, "That appointment has an end time earlier than its begin time.\nDo you want to schedule it into the next day?")); - title = XtNewString(catgets(c->DT_catd, 1, 248, "Calendar : Schedule Appointment")); - ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - ident2 = XtNewString(catgets(c->DT_catd, 1, 389, "Next Day")); + title = XtNewString(CATGETS(c->DT_catd, 1, 248, "Calendar : Schedule Appointment")); + ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + ident2 = XtNewString(CATGETS(c->DT_catd, 1, 389, "Next Day")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, buf, diff --git a/cde/programs/dtcm/dtcm/print.c b/cde/programs/dtcm/dtcm/print.c index fba8c2a67..15a92fc68 100644 --- a/cde/programs/dtcm/dtcm/print.c +++ b/cde/programs/dtcm/dtcm/print.c @@ -934,7 +934,7 @@ create_print_dialog(Calendar *c) print_dir = ""; sprintf(fnamebuf, "%s/%s", print_dir, print_file); - title = XtNewString(catgets(c->DT_catd, 1, 728, "Calendar : Print")); + title = XtNewString(CATGETS(c->DT_catd, 1, 728, "Calendar : Print")); nargs = 0; XtSetArg(args[nargs], XmNtitle, title); nargs++; XtSetArg(args[nargs], XmNdeleteResponse, XmUNMAP); nargs++; @@ -968,19 +968,19 @@ create_print_dialog(Calendar *c) pd->form = XmCreateForm(pd->pdb, "RangeForm", args, nargs); view = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 976, "Report Type:")); + CATGETS(c->DT_catd, 1, 976, "Report Type:")); day_view = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 977, "Day View")); + CATGETS(c->DT_catd, 1, 977, "Day View")); week_view = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 978, "Week View")); + CATGETS(c->DT_catd, 1, 978, "Week View")); month_view = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 979, "Month View")); + CATGETS(c->DT_catd, 1, 979, "Month View")); year_view = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 980, "Year View")); + CATGETS(c->DT_catd, 1, 980, "Year View")); appt_list = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 981, "Appointment List")); + CATGETS(c->DT_catd, 1, 981, "Appointment List")); todo_list = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 982, "To Do List")); + CATGETS(c->DT_catd, 1, 982, "To Do List")); /* * remember - this returns a RowColumn widget! @@ -1014,7 +1014,7 @@ create_print_dialog(Calendar *c) XmStringFree(todo_list); XmStringFree(view); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 731, "From:")); pd->from_label = XtVaCreateWidget("FromLabel", xmLabelGadgetClass, @@ -1095,7 +1095,7 @@ create_print_dialog(Calendar *c) XtManageChild(pd->from_year); XtManageChild(pd->from_spin); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 732, "To:")); pd->to_label = XtVaCreateWidget("ToLabel", xmLabelGadgetClass, @@ -1171,7 +1171,7 @@ create_print_dialog(Calendar *c) XtManageChild(pd->to_year); XtManageChild(pd->to_spin); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 679, "More...")); nargs = 0; XtSetArg(args[nargs], XmNlabelString, xmstr); nargs++; @@ -1241,7 +1241,7 @@ report_error(Calendar *c, char *title, char *errText) Props_pu *pu = (Props_pu *)c->properties_pu; char *label; - label = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + label = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(c->frame, DIALOG_TITLE, title, @@ -1268,7 +1268,7 @@ pdm_notify_cb(Widget w, XtPointer uData, XtPointer cbData) case XmCR_PDM_NONE: case XmCR_PDM_START_ERROR: case XmCR_PDM_EXIT_ERROR: - errText = XtNewString(catgets(c->DT_catd, 1, 1112, pdmErrorText)); + errText = XtNewString(CATGETS(c->DT_catd, 1, 1112, pdmErrorText)); break; default: @@ -1277,7 +1277,7 @@ pdm_notify_cb(Widget w, XtPointer uData, XtPointer cbData) if (errText) { - title = XtNewString(catgets(c->DT_catd, 1, 1111, setupErrorTitle)); + title = XtNewString(CATGETS(c->DT_catd, 1, 1111, setupErrorTitle)); report_error(c, title, errText); @@ -1354,9 +1354,9 @@ print_setup_cb(Widget w, XtPointer uData, XtPointer cbData) if (XmPrintPopupPDM(pd->printShell, w) != XmPDM_NOTIFY_SUCCESS) { - char *errText = XtNewString(catgets(c->DT_catd, 1, 1112, + char *errText = XtNewString(CATGETS(c->DT_catd, 1, 1112, pdmErrorText)); - char *title = XtNewString(catgets(c->DT_catd, 1, 1111, setupErrorTitle)); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1111, setupErrorTitle)); report_error(c, title, errText); @@ -1387,28 +1387,28 @@ print_report(Calendar *c) if ((start_date == DATE_BBOT) || (end_date == DATE_BBOT) || (start_date == DATE_AEOT) || (end_date == DATE_BBOT)) { - text = XtNewString(catgets(c->DT_catd, 1, 892, + text = XtNewString(CATGETS(c->DT_catd, 1, 892, "The dates for printing must be between 1969 and 2038.")); } else if (start_date <= 0) { - text = XtNewString(catgets(c->DT_catd, 1, 894, + text = XtNewString(CATGETS(c->DT_catd, 1, 894, "Malformed \"From\" date")); } else if (end_date <= 0) { - text = XtNewString(catgets(c->DT_catd, 1, 896, + text = XtNewString(CATGETS(c->DT_catd, 1, 896, "Malformed \"To\" date")); } else if (start_date > end_date) { - text = XtNewString(catgets(c->DT_catd, 1, 898, + text = XtNewString(CATGETS(c->DT_catd, 1, 898, "The \"To\" date for printing must be after the \"From\" date for printing")); } if (text) { - char *title = XtNewString(catgets(c->DT_catd, 1, 736, printErrorTitle)); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 736, printErrorTitle)); report_error(c, title, text); diff --git a/cde/programs/dtcm/dtcm/props.c b/cde/programs/dtcm/dtcm/props.c index c4ca59134..30370cdad 100644 --- a/cde/programs/dtcm/dtcm/props.c +++ b/cde/programs/dtcm/dtcm/props.c @@ -117,7 +117,7 @@ p_create_v5_group_access_pane( * side. */ xstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 410, "User Name:")); + CATGETS(c->DT_catd, 1, 410, "User Name:")); p->gap2_user_label = XtVaCreateWidget("gap2_label_user_name", xmLabelGadgetClass, @@ -129,7 +129,7 @@ p_create_v5_group_access_pane( XmStringFree(xstr); xstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 738, "Access List:")); + CATGETS(c->DT_catd, 1, 738, "Access List:")); p->gap2_access_label = XtVaCreateWidget("gap2_label_access", xmLabelGadgetClass, @@ -141,7 +141,7 @@ p_create_v5_group_access_pane( XmStringFree(xstr); xstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 739, "Access Rights:")); + CATGETS(c->DT_catd, 1, 739, "Access Rights:")); p->gap2_permissions_label = XtVaCreateWidget("gap2_label_permissions", xmLabelGadgetClass, @@ -189,7 +189,7 @@ p_create_v5_group_access_pane( XmNrightOffset, GAP, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 740, "Add")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 740, "Add")); p->gap2_add_button = XtVaCreateWidget("gap2_button_add", xmPushButtonWidgetClass, @@ -206,7 +206,7 @@ p_create_v5_group_access_pane( XmStringFree(xstr); XtAddCallback(p->gap2_add_button, XmNactivateCallback, GAPAddProc, p); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 419, "Delete")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 419, "Delete")); p->gap2_delete_button = XtVaCreateWidget("gap2_button_delete", xmPushButtonWidgetClass, @@ -226,7 +226,7 @@ p_create_v5_group_access_pane( XtAddCallback(p->gap2_delete_button, XmNactivateCallback, p_gap_remove_proc, p); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 343, "Change")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 343, "Change")); p->gap2_change_button = XtVaCreateWidget("gap2_button_change", xmPushButtonWidgetClass, @@ -368,7 +368,7 @@ CreatePermissions( XmNshadowType, XmSHADOW_IN, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 743, "Public:")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 743, "Public:")); p->gap2_public_label = XtVaCreateWidget("gap2_public_label", xmLabelGadgetClass, @@ -379,7 +379,7 @@ CreatePermissions( XmStringFree (xstr); xstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 744, "Semiprivate:")); + CATGETS(c->DT_catd, 1, 744, "Semiprivate:")); p->gap2_semi_label = XtVaCreateWidget("gap2_semi_label", xmLabelGadgetClass, @@ -391,7 +391,7 @@ CreatePermissions( XmStringFree (xstr); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 745, "Private:")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 745, "Private:")); p->gap2_private_label = XtVaCreateWidget("gap2_private_label", xmLabelGadgetClass, @@ -409,7 +409,7 @@ CreatePermissions( /* Create the labels and toggles for the permissions */ - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 40, "View")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 40, "View")); p->gap2_view_label = XtVaCreateWidget("gap2_view_label", xmLabelGadgetClass, @@ -439,7 +439,7 @@ CreatePermissions( #endif /* __ppc */ if (label_offset < 0) label_offset = 0; - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 342, "Insert")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 342, "Insert")); p->gap2_insert_label = XtVaCreateWidget("gap2_insert_label", @@ -459,7 +459,7 @@ CreatePermissions( XmNwidth, &insert_label_width, NULL); - xstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 343, "Change")); + xstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 343, "Change")); /* * If label is greater than the allocated space for the @@ -685,11 +685,11 @@ GAPAddProc( /* Get the user's name and host */ if (!(user_name = (char *)XmTextGetString(p->gap2_user_text)) || !*user_name) { - char *title = XtNewString(catgets(c->DT_catd, 1, 750, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 750, "Calendar : Error - Access List and Permissions")); - char *text = XtNewString(catgets(c->DT_catd, 1, 749, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 749, "Name and Access Rights must be set to add an item to the Access List.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); XtFree(user_name); @@ -774,13 +774,13 @@ ChangeExistingGAPEntry( Calendar *c = calendar; int answer; - char *title = XtNewString(catgets(c->DT_catd, 1, 1078, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1078, "Calendar : Access List and Permissions - Add")); - char *text = XtNewString(catgets(c->DT_catd, 1, 751, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 751, "This entry already exists in the Access List. Do you wish to change it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 343, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 343, "Change")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 923, + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); answer = dialog_popup(p->frame, @@ -819,11 +819,11 @@ GAPChangeProc( /* An item to change must be selected in the access list */ if (!XmListGetSelectedPos(p->gap2_access_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 750, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 750, "Calendar : Error - Access List and Permissions")); - char *text = XtNewString(catgets(c->DT_catd, 1, 408, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 408, "Please select a name first. ")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(p->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -845,11 +845,11 @@ GAPChangeProc( /* Get the user's name and host */ if (!(user_name = (char *)XmTextGetString(p->gap2_user_text)) || !*user_name) { - char *title = XtNewString(catgets(c->DT_catd, 1, 750, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 750, "Calendar : Error - Access List and Permissions")); - char *text = XtNewString(catgets(c->DT_catd, 1, 756, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 756, "Name and Access rights must be set to change an item in the Access List")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); XtFree(user_name); dialog_popup(p->frame, diff --git a/cde/programs/dtcm/dtcm/props_pu.c b/cde/programs/dtcm/dtcm/props_pu.c index 6315fb23d..99da5130f 100644 --- a/cde/programs/dtcm/dtcm/props_pu.c +++ b/cde/programs/dtcm/dtcm/props_pu.c @@ -227,7 +227,7 @@ p_create_editor_pane( ** Default start time and duration for appointments - use DSSW widget ** for start time stuff. */ - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 644, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 644, "Appointment Times:")); pu->ep_appt_label = XtVaCreateWidget("apptTimes", xmLabelGadgetClass, ep_form_mgr, @@ -250,7 +250,7 @@ p_create_editor_pane( widgets[2] = pu->ep_dssw.start_menu; widgets[3] = pu->ep_dssw.start_ampm_rc_mgr; - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 645, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 645, "Duration:")); pu->ep_dur_label = widgets[4] = XtVaCreateWidget("duration", xmLabelGadgetClass, pu->ep_dssw.dssw_form_mgr, @@ -281,7 +281,7 @@ p_create_editor_pane( XtAddCallback(text_field, XmNvalueChangedCallback, p_mark_change, pu); XtAddCallback(pu->ep_dur_cb, XmNselectionCallback, p_mark_change, pu); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 646, "Minutes")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 646, "Minutes")); pu->ep_dur_message = widgets[6] = XtVaCreateWidget("message", xmLabelGadgetClass, pu->ep_dssw.dssw_form_mgr, XmNlabelString, xmstr, @@ -386,7 +386,7 @@ p_create_editor_pane( ** Build the stuff for privacy ... */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 390, "Privacy:")); + CATGETS(c->DT_catd, 1, 390, "Privacy:")); pu->privacy_label = XtVaCreateWidget("privacy", xmLabelGadgetClass, pu->ep_reminders.bfpm_form_mgr, XmNlabelString, xmstr, @@ -459,13 +459,13 @@ format_hour(char buffer[], int hour, DisplayType dt, Calendar *c) { if (dt == HOUR12) { if ((hour == 24) || (hour == 0)) - cm_strcpy(buffer, catgets(c->DT_catd, 1, 758,"midnight")); + cm_strcpy(buffer, CATGETS(c->DT_catd, 1, 758,"midnight")); else if (hour > 12) sprintf(buffer, "%2d:00 %s", hour-12, - catgets(c->DT_catd, 1, 3, "pm")); + CATGETS(c->DT_catd, 1, 3, "pm")); else sprintf(buffer, "%2d:00 %s", hour, - catgets(c->DT_catd, 1, 4, "am")); + CATGETS(c->DT_catd, 1, 4, "am")); } else sprintf(buffer, " %02d00", hour); @@ -565,7 +565,7 @@ p_create_display_pane(Props_pu *p) { ** User Calendar Location label and text field */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 391, "User Calendar Location:")); + CATGETS(c->DT_catd, 1, 391, "User Calendar Location:")); p->dp_loc_label = XtVaCreateWidget("location", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -595,14 +595,14 @@ p_create_display_pane(Props_pu *p) { items is mapped. Pretty stupid. Thus the positioning happens just after the panel is mapped. */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 392, "Day Boundaries:")); + CATGETS(c->DT_catd, 1, 392, "Day Boundaries:")); p->dp_day_label = XtVaCreateWidget("dayBoundaries", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 393, "Begin:")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 393, "Begin:")); p->dp_beg_label = XtVaCreateWidget("begin", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -622,14 +622,14 @@ p_create_display_pane(Props_pu *p) { XtAddCallback(p->dp_beg_scale, XmNdragCallback, p_dp_scale_mod_proc, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 759, "value")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 759, "value")); p->dp_beg_value = XtVaCreateWidget("begin", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 394, "End:")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 394, "End:")); p->dp_end_label = XtVaCreateWidget("end", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -649,7 +649,7 @@ p_create_display_pane(Props_pu *p) { XtAddCallback(p->dp_end_scale, XmNdragCallback, p_dp_scale_mod_proc, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 760, "value")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 760, "value")); p->dp_end_value = XtVaCreateWidget("begin", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -660,7 +660,7 @@ p_create_display_pane(Props_pu *p) { ** 12/24 Hour Display label and toggle buttons */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 395, "Hour Display:")); + CATGETS(c->DT_catd, 1, 395, "Hour Display:")); p->dp_hour_label = XtVaCreateWidget("hourDisplay", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -676,7 +676,7 @@ p_create_display_pane(Props_pu *p) { XmNentryClass, xmToggleButtonGadgetClass, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 396, "12 Hour")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 396, "12 Hour")); p->dp_hour12_toggle = widgets[0] = XtVaCreateWidget("twelveHour", xmToggleButtonGadgetClass, p->dp_hour_rc_mgr, XmNlabelString, xmstr, @@ -686,7 +686,7 @@ p_create_display_pane(Props_pu *p) { XtAddCallback(p->dp_hour12_toggle, XmNvalueChangedCallback, p_mark_change, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 397, "24 Hour")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 397, "24 Hour")); p->dp_hour24_toggle = widgets[1] = XtVaCreateWidget("twentyFourHour", xmToggleButtonGadgetClass, p->dp_hour_rc_mgr, XmNlabelString, xmstr, @@ -702,7 +702,7 @@ p_create_display_pane(Props_pu *p) { ** Default view label and toggle buttons */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 398, "Default View:")); + CATGETS(c->DT_catd, 1, 398, "Default View:")); p->dp_view_label = XtVaCreateWidget("defaultView:", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -719,7 +719,7 @@ p_create_display_pane(Props_pu *p) { NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 402, "Day")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 402, "Day")); p->dp_view_day_toggle = XtVaCreateWidget("day", xmToggleButtonGadgetClass, p->dp_view_rc_mgr, XmNlabelString, xmstr, @@ -729,7 +729,7 @@ p_create_display_pane(Props_pu *p) { XtAddCallback(p->dp_view_day_toggle, XmNvalueChangedCallback, p_mark_change, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 401, "Week")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 401, "Week")); p->dp_view_week_toggle = XtVaCreateWidget("week", xmToggleButtonGadgetClass, p->dp_view_rc_mgr, XmNlabelString, xmstr, @@ -739,7 +739,7 @@ p_create_display_pane(Props_pu *p) { XtAddCallback(p->dp_view_week_toggle, XmNvalueChangedCallback, p_mark_change, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 400, "Month")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 400, "Month")); p->dp_view_month_toggle = XtVaCreateWidget("month", xmToggleButtonGadgetClass, p->dp_view_rc_mgr, XmNlabelString, xmstr, @@ -749,7 +749,7 @@ p_create_display_pane(Props_pu *p) { XtAddCallback(p->dp_view_month_toggle, XmNvalueChangedCallback, p_mark_change, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 399, "Year")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 399, "Year")); p->dp_view_year_toggle = XtVaCreateWidget("year", xmToggleButtonGadgetClass, p->dp_view_rc_mgr, XmNlabelString, xmstr, @@ -765,7 +765,7 @@ p_create_display_pane(Props_pu *p) { ** Initial Calendar View label and text field */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 403, "Initial Calendar View:")); + CATGETS(c->DT_catd, 1, 403, "Initial Calendar View:")); p->dp_init_view_label = XtVaCreateWidget("initialView", xmLabelGadgetClass, dp_form_mgr, XmNlabelString, xmstr, @@ -1001,11 +1001,11 @@ p_gap_convert_permissions( } if (perm_val == 0) { - char *title = XtNewString(catgets(c->DT_catd, 1, 750, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 750, "Calendar : Error - Access List and Permissions")); - char *text = XtNewString(catgets(c->DT_catd, 1, 405, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 405, "Please select at least one permission. ")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(p->frame, DIALOG_TITLE, title, @@ -1159,9 +1159,9 @@ p_gap_remove_proc(Widget w, XtPointer client_data, XtPointer callback_struct) { XtFree((XtPointer)item_list); } else { - char *title = XtNewString(catgets(c->DT_catd, 1, 750, "Calendar : Error - Access List and Permissions")); - char *text = XtNewString(catgets(c->DT_catd, 1, 408, "Please select a name first. ")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 750, "Calendar : Error - Access List and Permissions")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 408, "Please select a name first. ")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(p->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1279,7 +1279,7 @@ p_create_v4_group_access_pane(Props_pu *p) { ** User Name label, text field, and add button */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 410, "User Name:")); + CATGETS(c->DT_catd, 1, 410, "User Name:")); p->gap_user_label = XtVaCreateWidget("userName", xmLabelGadgetClass, gap_form_mgr, XmNlabelString, xmstr, @@ -1295,7 +1295,7 @@ p_create_v4_group_access_pane(Props_pu *p) { (XtPointer)p); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 411, "Add Name")); + CATGETS(c->DT_catd, 1, 411, "Add Name")); p->gap_add_button = XtVaCreateWidget("addName", xmPushButtonGadgetClass, gap_form_mgr, XmNlabelString, xmstr, @@ -1310,8 +1310,8 @@ p_create_v4_group_access_pane(Props_pu *p) { ** Access list stuff and remove button */ { - char *user = XtNewString(catgets(c->DT_catd, 1, 983, "User Name")); - char *perm = XtNewString(catgets(c->DT_catd, 1, 413, "Permissions")); + char *user = XtNewString(CATGETS(c->DT_catd, 1, 983, "User Name")); + char *perm = XtNewString(CATGETS(c->DT_catd, 1, 413, "Permissions")); buf = (char *)ckalloc(cm_strlen(user) + cm_strlen(perm) + 10); sprintf(buf, "%-*s%s", NAME_LEN, user, perm); xmstr = XmStringCreateLocalized(buf); @@ -1341,7 +1341,7 @@ p_create_v4_group_access_pane(Props_pu *p) { XtManageChild(p->gap_access_list); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 414, "Remove Name")); + CATGETS(c->DT_catd, 1, 414, "Remove Name")); p->gap_remove_button = XtVaCreateWidget("removeName", xmPushButtonGadgetClass, gap_form_mgr, XmNlabelString, xmstr, @@ -1353,7 +1353,7 @@ p_create_v4_group_access_pane(Props_pu *p) { XmNactivateCallback, p_gap_remove_proc, p); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 415, "B = Browse I = Insert D = Delete")); + CATGETS(c->DT_catd, 1, 415, "B = Browse I = Insert D = Delete")); p->gap_access_msg = XtVaCreateWidget("browseInsertDelete", xmLabelGadgetClass, gap_form_mgr, XmNlabelString, xmstr, @@ -1364,7 +1364,7 @@ p_create_v4_group_access_pane(Props_pu *p) { ** Finally, permissions label and choice toggle list */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 416, "Permissions:")); + CATGETS(c->DT_catd, 1, 416, "Permissions:")); p->gap_perm_label = XtVaCreateWidget("permissions", xmLabelGadgetClass, gap_form_mgr, XmNlabelString, xmstr, @@ -1381,21 +1381,21 @@ p_create_v4_group_access_pane(Props_pu *p) { XmNentryClass, xmToggleButtonGadgetClass, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 417, "Browse")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 417, "Browse")); p->gap_browse_toggle = XtVaCreateWidget("browse", xmToggleButtonGadgetClass, p->gap_perm_rc_mgr, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 342, "Insert")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 342, "Insert")); p->gap_insert_toggle = XtVaCreateWidget("insert", xmToggleButtonGadgetClass, p->gap_perm_rc_mgr, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 419, "Delete")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 419, "Delete")); p->gap_delete_toggle = XtVaCreateWidget("delete", xmToggleButtonGadgetClass, p->gap_perm_rc_mgr, XmNlabelString, xmstr, @@ -1578,7 +1578,7 @@ p_create_printer_ops_pane( p_mark_change, (XtPointer)p); for (i = 0; i < POP_HDR_NUM_CHOICES; i++) - hdrStrings[i] = XtNewString(catgets(c->DT_catd, 1, 1106 + i, + hdrStrings[i] = XtNewString(CATGETS(c->DT_catd, 1, 1106 + i, hdrDefaults[i])); p->pop_header_frame = @@ -1617,7 +1617,7 @@ p_create_printer_ops_pane( DTPRINT_OPTION_FOOTER_RIGHT); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 434, "Include:")); + CATGETS(c->DT_catd, 1, 434, "Include:")); p->pop_privacy_label = XtVaCreateWidget("include", xmLabelGadgetClass, pop_form_mgr, XmNlabelString, xmstr, @@ -1651,7 +1651,7 @@ p_create_printer_ops_pane( XmNleftWidget, p->pop_privacy_label, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 435, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 435, "Show Time and Text Appts")); p->pop_privacy_public_toggle = XtVaCreateWidget( "showTimeText", @@ -1663,7 +1663,7 @@ p_create_printer_ops_pane( XtAddCallback(p->pop_privacy_public_toggle, XmNvalueChangedCallback, p_mark_change, p); - xmstr = XmStringCreateLocalized( catgets(c->DT_catd, 1, 436, + xmstr = XmStringCreateLocalized( CATGETS(c->DT_catd, 1, 436, "Show Time Only Appts")); p->pop_privacy_semi_toggle = XtVaCreateWidget( "showTimeOnly", @@ -1675,7 +1675,7 @@ p_create_printer_ops_pane( XtAddCallback(p->pop_privacy_semi_toggle, XmNvalueChangedCallback, p_mark_change, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 437, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 437, "Show Nothing Appts")); p->pop_privacy_private_toggle = XtVaCreateWidget( "showNothing", @@ -1723,7 +1723,7 @@ p_create_date_format_pane( ** Date ordering label and choice toggle widget */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 438, "Date Ordering:")); + CATGETS(c->DT_catd, 1, 438, "Date Ordering:")); p->dfp_order_label = XtVaCreateWidget("dateOrdering", xmLabelGadgetClass, dfp_form_mgr, XmNlabelString, xmstr, @@ -1731,7 +1731,7 @@ p_create_date_format_pane( XmStringFree(xmstr); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 442, "Date Separator:")); + CATGETS(c->DT_catd, 1, 442, "Date Separator:")); p->dfp_sep_label = XtVaCreateWidget("dateSeparator", xmLabelGadgetClass, dfp_form_mgr, XmNlabelString, xmstr, @@ -1756,7 +1756,7 @@ p_create_date_format_pane( NULL); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 439, "MM | DD | YY")); + CATGETS(c->DT_catd, 1, 439, "MM | DD | YY")); p->dfp_order_mmddyy_toggle = XtVaCreateWidget("mmddyy", xmToggleButtonGadgetClass, p->dfp_order_rc_mgr, XmNlabelString, xmstr, @@ -1767,7 +1767,7 @@ p_create_date_format_pane( XmNvalueChangedCallback, p_mark_change, p); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 440, "DD | MM | YY")); + CATGETS(c->DT_catd, 1, 440, "DD | MM | YY")); p->dfp_order_ddmmyy_toggle = XtVaCreateWidget("ddmmyy", xmToggleButtonGadgetClass, p->dfp_order_rc_mgr, XmNlabelString, xmstr, @@ -1778,7 +1778,7 @@ p_create_date_format_pane( XmNvalueChangedCallback, p_mark_change, p); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 441, "YY | MM | DD")); + CATGETS(c->DT_catd, 1, 441, "YY | MM | DD")); p->dfp_order_yymmdd_toggle = XtVaCreateWidget("yymmdd", xmToggleButtonGadgetClass, p->dfp_order_rc_mgr, XmNlabelString, xmstr, @@ -1807,7 +1807,7 @@ p_create_date_format_pane( XmNtopOffset, GAP, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 443, "Blank")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 443, "Blank")); p->dfp_sep_blank_toggle = XtVaCreateWidget("blank", xmToggleButtonGadgetClass, p->dfp_sep_rc_mgr, XmNlabelString, xmstr, @@ -2067,9 +2067,9 @@ p_save_changes(Calendar *c) { } if (!save_props(p)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 454, "Calendar : Error - Options")); - char *text = XtNewString(catgets(c->DT_catd, 1, 445, "An error occurred writing to ~/.desksetdefaults.\nMake sure you have permission to write to this file.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 454, "Calendar : Error - Options")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 445, "An error occurred writing to ~/.desksetdefaults.\nMake sure you have permission to write to this file.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(pu->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -2238,9 +2238,9 @@ extern void p_defaults_proc_helper(XtPointer client_data){ Props_pu *pu = (Props_pu *)c->properties_pu; if (!read_props(p)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 454, "Calendar : Error - Options")); - char *text = XtNewString(catgets(c->DT_catd, 1, 448, "An error occurred reading from ~/.desksetdefaults.\nMake sure you have permission to read this file.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 454, "Calendar : Error - Options")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 448, "An error occurred reading from ~/.desksetdefaults.\nMake sure you have permission to read this file.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(pu->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -2283,11 +2283,11 @@ p_flush_changes(Calendar *c) { int val; if (pu->changed_flag == True) { - char *title = XtNewString(catgets(c->DT_catd, 1, 450, "Calendar : Options - Help")); - char *text = XtNewString(catgets(c->DT_catd, 1, 451, "You have made unsaved changes.\nYou may save your changes, discard your changes, \nor return to your previous place in the dialog.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 452, "Save")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 700, "Discard")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 450, "Calendar : Options - Help")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 451, "You have made unsaved changes.\nYou may save your changes, discard your changes, \nor return to your previous place in the dialog.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 452, "Save")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 700, "Discard")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); answer = dialog_popup(pu->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -2331,7 +2331,7 @@ static void p_make_props_pu(Calendar *c) { char *buf; char *popuplabel = - catgets(c->DT_catd, 1, 458, "Calendar : Options"); + CATGETS(c->DT_catd, 1, 458, "Calendar : Options"); PaneType pt; Props_pu *p = (Props_pu *)c->properties_pu; XmString label; @@ -2385,23 +2385,23 @@ p_make_props_pu(Calendar *c) { */ Pane_XmStrs[EDITOR_PANE] = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 762, + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 762, "Editor Defaults")); Pane_XmStrs[DISPLAY_PANE] = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 763, + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 763, "Display Settings")); Pane_XmStrs[GROUP_ACCESS_PANE] = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 764, + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 764, "Access List and Permissions")); Pane_XmStrs[PRINTER_OPS_PANE] = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 765, + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 765, "Printer Settings")); Pane_XmStrs[DATE_FORMAT_PANE] = - XmStringCreateLocalized(catgets(c->DT_catd, 1, 766, + XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 766, "Date Format")); label = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 459, "Category:")); + CATGETS(c->DT_catd, 1, 459, "Category:")); p->category_menu = widgets[0] = XmVaCreateSimpleOptionMenu(p->base_form_mgr, @@ -2448,7 +2448,7 @@ p_make_props_pu(Calendar *c) { XmNbottomWidget, p->separator2, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 655, "OK")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 655, "OK")); p->ok_button = widgets[3] = XtVaCreateWidget("ok", xmPushButtonGadgetClass, p->base_form_mgr, XmNlabelString, xmstr, @@ -2470,7 +2470,7 @@ p_make_props_pu(Calendar *c) { XmNbottomWidget, p->ok_button, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 460, "Apply")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 460, "Apply")); p->apply_button = widgets[4] = XtVaCreateWidget("apply", xmPushButtonGadgetClass, p->base_form_mgr, XmNlabelString, xmstr, @@ -2487,7 +2487,7 @@ p_make_props_pu(Calendar *c) { XmStringFree(xmstr); XtAddCallback(p->apply_button, XmNactivateCallback, p_apply_proc, c); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 691, "Reset")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 691, "Reset")); p->defaults_button = widgets[5] = XtVaCreateWidget("reset", xmPushButtonGadgetClass, p->base_form_mgr, XmNlabelString, xmstr, @@ -2504,7 +2504,7 @@ p_make_props_pu(Calendar *c) { XtAddCallback(p->defaults_button, XmNactivateCallback, p_defaults_proc, c); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); p->close_button = widgets[6] = XtVaCreateWidget("close", xmPushButtonGadgetClass, p->base_form_mgr, XmNlabelString, xmstr, @@ -2520,7 +2520,7 @@ p_make_props_pu(Calendar *c) { XmStringFree(xmstr); XtAddCallback(p->close_button, XmNactivateCallback, p_close_proc, p); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); p->help_button = widgets[7] = XtVaCreateWidget("help", xmPushButtonGadgetClass, p->base_form_mgr, XmNlabelString, xmstr, @@ -2649,9 +2649,9 @@ get_editor_vals_from_ui(Props_pu *pu, Props *p) { dur_txt = XmTextGetString(text); if (string_is_number(dur_txt) == False) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); - char *text = XtNewString(catgets(c->DT_catd, 1, 819, "The Duration value must be an integer with no sign.\nYour properties settings have not been saved.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 819, "The Duration value must be an integer with no sign.\nYour properties settings have not been saved.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); XtFree(dur_txt); dialog_popup(pu->frame, @@ -2668,9 +2668,9 @@ get_editor_vals_from_ui(Props_pu *pu, Props *p) { } if (atoi(dur_txt) >= (60 *24)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); - char *text = XtNewString(catgets(c->DT_catd, 1, 916, "The Duration value must be less than 24 hours.\nYour properties settings have not been saved.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 916, "The Duration value must be less than 24 hours.\nYour properties settings have not been saved.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); XtFree(dur_txt); dialog_popup(pu->frame, @@ -2689,9 +2689,9 @@ get_editor_vals_from_ui(Props_pu *pu, Props *p) { get_dssw_times(&pu->ep_dssw); if (string_is_time(pu->ep_dssw.start_val.val) == False) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); - char *text = XtNewString(catgets(c->DT_catd, 1, 820, "The start value must be a valid time.\nYour properties settings have not been saved.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 820, "The start value must be a valid time.\nYour properties settings have not been saved.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(pu->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -2732,18 +2732,18 @@ get_editor_vals_from_ui(Props_pu *pu, Props *p) { } if ((status = get_reminders_vals(&pu->ep_reminders, False)) != REMINDERS_OK) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1079, "Calendar : Error - Editor Settings")); char *text; - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); switch (status) { - case ADVANCE_BLANK : text = XtNewString(catgets(c->DT_catd, 1, 908, "You may not set a blank reminder value.\nYour properties settings have not been saved.")); + case ADVANCE_BLANK : text = XtNewString(CATGETS(c->DT_catd, 1, 908, "You may not set a blank reminder value.\nYour properties settings have not been saved.")); break; - case ADVANCE_CONTAINS_BLANK : text = XtNewString(catgets(c->DT_catd, 1, 909, "You may not set a reminder value with an embedded blank.\nYour properties settings have not been saved.")); + case ADVANCE_CONTAINS_BLANK : text = XtNewString(CATGETS(c->DT_catd, 1, 909, "You may not set a reminder value with an embedded blank.\nYour properties settings have not been saved.")); break; - case ADVANCE_NONNUMERIC : text = XtNewString(catgets(c->DT_catd, 1, 910, "Reminder values must be a number with an optional sign.\nYour properties settings have not been saved.")); + case ADVANCE_NONNUMERIC : text = XtNewString(CATGETS(c->DT_catd, 1, 910, "Reminder values must be a number with an optional sign.\nYour properties settings have not been saved.")); break; } @@ -2796,9 +2796,9 @@ get_display_vals_from_ui(Props_pu *pu, Props *p) { set_char_prop(p, CP_CALLOC, str = XmTextGetString(pu->dp_loc_text)); if (blank_buf(str) || embedded_blank(str)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1083, "Calendar : Error - Display Settings")); - char *text = XtNewString(catgets(c->DT_catd, 1, 772, "You may not save a blank User Calendar Location\nor one that contains blanks.\nYour properties settings have not been saved.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1083, "Calendar : Error - Display Settings")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 772, "You may not save a blank User Calendar Location\nor one that contains blanks.\nYour properties settings have not been saved.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(pu->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -2839,9 +2839,9 @@ get_display_vals_from_ui(Props_pu *pu, Props *p) { str = XmTextGetString(pu->dp_init_view_text)); if (blank_buf(str) || embedded_blank(str)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1083, "Calendar : Error - Display Settings")); - char *text = XtNewString(catgets(c->DT_catd, 1, 773, "You may not save a blank Initial Calendar View\nor one that contains blanks.\nYour properties settings have not been saved.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1083, "Calendar : Error - Display Settings")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 773, "You may not save a blank Initial Calendar View\nor one that contains blanks.\nYour properties settings have not been saved.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(pu->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -2883,15 +2883,15 @@ static void print_option_error(Props_pu *pu, int setNum, int msgNum, char *str) { Calendar *c = pu->cal; - char *text = XtNewString(catgets(c->DT_catd, setNum, msgNum, str)); + char *text = XtNewString(CATGETS(c->DT_catd, setNum, msgNum, str)); static char *title = (char *)NULL; static char *ident1 = (char *)NULL; if (title == (char *)NULL) - title = XtNewString(catgets(c->DT_catd, 1, 1085, + title = XtNewString(CATGETS(c->DT_catd, 1, 1085, "Calendar : Error - Printer Settings")); if (ident1 == (char *)NULL) - ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(pu->frame, DIALOG_TITLE, title, diff --git a/cde/programs/dtcm/dtcm/reminders.c b/cde/programs/dtcm/dtcm/reminders.c index 6735c2b45..ae99eb849 100644 --- a/cde/programs/dtcm/dtcm/reminders.c +++ b/cde/programs/dtcm/dtcm/reminders.c @@ -212,15 +212,15 @@ r_set_bfpm_vals( switch ( scope ) { case TIME_MINS : xmstr = XmStringCreateLocalized( - catgets( calendar->DT_catd, 1, 877, time_scope_str(scope) ) ); + CATGETS( calendar->DT_catd, 1, 877, time_scope_str(scope) ) ); break; case TIME_HRS : xmstr = XmStringCreateLocalized( - catgets( calendar->DT_catd, 1, 878, time_scope_str(scope) ) ); + CATGETS( calendar->DT_catd, 1, 878, time_scope_str(scope) ) ); break; case TIME_DAYS : xmstr = XmStringCreateLocalized( - catgets( calendar->DT_catd, 1, 879, time_scope_str(scope) ) ); + CATGETS( calendar->DT_catd, 1, 879, time_scope_str(scope) ) ); break; default : xmstr = XmStringCreateLocalized(time_scope_str(scope)); @@ -249,15 +249,15 @@ r_set_bfpm_vals( switch ( scope ) { case TIME_MINS : xmstr = XmStringCreateLocalized( - catgets( calendar->DT_catd, 1, 877, time_scope_str(scope) ) ); + CATGETS( calendar->DT_catd, 1, 877, time_scope_str(scope) ) ); break; case TIME_HRS : xmstr = XmStringCreateLocalized( - catgets( calendar->DT_catd, 1, 878, time_scope_str(scope) ) ); + CATGETS( calendar->DT_catd, 1, 878, time_scope_str(scope) ) ); break; case TIME_DAYS : xmstr = XmStringCreateLocalized( - catgets( calendar->DT_catd, 1, 879, time_scope_str(scope) ) ); + CATGETS( calendar->DT_catd, 1, 879, time_scope_str(scope) ) ); break; default : xmstr = XmStringCreateLocalized(time_scope_str(scope)); @@ -362,7 +362,7 @@ build_reminders(Reminders *r, Calendar *c, Widget parent) { NULL); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 985, "Reminders")); + CATGETS(c->DT_catd, 1, 985, "Reminders")); r->alarm_label = XtVaCreateWidget("Reminders", xmLabelGadgetClass, r->bfpm_form_mgr, XmNlabelString, xmstr, @@ -376,7 +376,7 @@ build_reminders(Reminders *r, Calendar *c, Widget parent) { /* Create the 4 toggle items to see which one is the longest */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 986, "Beep")); + CATGETS(c->DT_catd, 1, 986, "Beep")); r->beep_toggle = XtVaCreateWidget("Beep", xmToggleButtonGadgetClass, r->bfpm_form_mgr, XmNlabelString, xmstr, @@ -386,7 +386,7 @@ build_reminders(Reminders *r, Calendar *c, Widget parent) { xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 987, "Flash")); + CATGETS(c->DT_catd, 1, 987, "Flash")); r->flash_toggle = XtVaCreateWidget("Flash", xmToggleButtonGadgetClass, r->bfpm_form_mgr, XmNlabelString, xmstr, @@ -396,7 +396,7 @@ build_reminders(Reminders *r, Calendar *c, Widget parent) { xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 988, "Popup")); + CATGETS(c->DT_catd, 1, 988, "Popup")); r->popup_toggle = XtVaCreateWidget("Popup", xmToggleButtonGadgetClass, r->bfpm_form_mgr, XmNlabelString, xmstr, @@ -406,7 +406,7 @@ build_reminders(Reminders *r, Calendar *c, Widget parent) { xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 989, "Mail")); + CATGETS(c->DT_catd, 1, 989, "Mail")); r->mail_toggle = XtVaCreateWidget("Mail", xmToggleButtonGadgetClass, r->bfpm_form_mgr, XmNlabelString, xmstr, @@ -416,7 +416,7 @@ build_reminders(Reminders *r, Calendar *c, Widget parent) { xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 990, "Mail To:" ) ); + CATGETS(c->DT_catd, 1, 990, "Mail To:" ) ); r->mailto_label = XtVaCreateManagedWidget("MailTo", xmLabelGadgetClass, r->bfpm_form_mgr, XmNlabelString, xmstr, @@ -675,13 +675,13 @@ reminder_err_msg(Widget frame, char *name, Reminder_val_op op, Pixmap p) switch(op) { case ADVANCE_BLANK: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 775, "You must specify a reminder advance\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 775, "You must specify a reminder advance\nOperation was cancelled. Calendar")); break; case ADVANCE_CONTAINS_BLANK: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 776, "A reminder advance may not contain an embedded blank\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 776, "A reminder advance may not contain an embedded blank\nOperation was cancelled. Calendar")); break; case ADVANCE_NONNUMERIC: - sprintf(buf, "%s", catgets(c->DT_catd, 1, 777, "Advance values must be a number with an optional sign\nOperation was cancelled. Calendar")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 777, "Advance values must be a number with an optional sign\nOperation was cancelled. Calendar")); break; case REMINDERS_OK: default: @@ -690,9 +690,9 @@ reminder_err_msg(Widget frame, char *name, Reminder_val_op op, Pixmap p) sprintf(buf2, "%s %s", buf, name); - title = XtNewString(catgets(c->DT_catd, 1, 364, + title = XtNewString(CATGETS(c->DT_catd, 1, 364, "Calendar : Error - Editor")); - ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(frame, DIALOG_TITLE, title, DIALOG_TEXT, buf2, BUTTON_IDENT, 1, ident1, diff --git a/cde/programs/dtcm/dtcm/rfp.c b/cde/programs/dtcm/dtcm/rfp.c index 0615b38fc..04c6406df 100644 --- a/cde/programs/dtcm/dtcm/rfp.c +++ b/cde/programs/dtcm/dtcm/rfp.c @@ -127,25 +127,25 @@ rfp_set_repeat_values(RFP *rfp) return; } else if (limit == 10) { - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 901, "Repeat Every ...")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 901, "Repeat Every ...")); XmComboBoxAddItem(rfp->repeat_menu, xmstr, 0, False); XmStringFree(xmstr); } else if (limit == 7) { - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 902, "Monday Thru Friday")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 902, "Monday Thru Friday")); XmComboBoxAddItem(rfp->repeat_menu, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 903, "Mon, Wed, Fri")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 903, "Mon, Wed, Fri")); XmComboBoxAddItem(rfp->repeat_menu, xmstr, 0, False); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 861, "Tuesday, Thursday")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 861, "Tuesday, Thursday")); XmComboBoxAddItem(rfp->repeat_menu, xmstr, 0, False); XmStringFree(xmstr); if (rfp->cal->general->version == DATAVER3) { - xmstr = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 862, "Repeat Every...")); + xmstr = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 862, "Repeat Every...")); XmComboBoxAddItem(rfp->repeat_menu, xmstr, 0, False); XmStringFree(xmstr); } @@ -227,9 +227,9 @@ rfp_apply_proc(Widget w, XtPointer client_data, XtPointer cbs) { str = XmTextGetString(rfp->repeat_popup_text); if (!string_is_number(str)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 969, "Calendar : Error - Repeat Every")); - char *text = XtNewString(catgets(c->DT_catd, 1, 970, "The Repeat Every value must be an integer with no sign.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 969, "Calendar : Error - Repeat Every")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 970, "The Repeat Every value must be an integer with no sign.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); XtFree(str); dialog_popup(c->frame, @@ -258,13 +258,13 @@ rfp_apply_proc(Widget w, XtPointer client_data, XtPointer cbs) { switch (op) { - case REPEAT_DAYS: repeat_str = catgets(c->DT_catd, 1, 825, "Days"); + case REPEAT_DAYS: repeat_str = CATGETS(c->DT_catd, 1, 825, "Days"); break; - case REPEAT_WEEKS: repeat_str = catgets(c->DT_catd, 1, 826, "Weeks"); + case REPEAT_WEEKS: repeat_str = CATGETS(c->DT_catd, 1, 826, "Weeks"); break; - case REPEAT_MONTHS: repeat_str = catgets(c->DT_catd, 1, 827, "Months"); + case REPEAT_MONTHS: repeat_str = CATGETS(c->DT_catd, 1, 827, "Months"); break; } @@ -273,7 +273,7 @@ rfp_apply_proc(Widget w, XtPointer client_data, XtPointer cbs) { */ { char *nl_repeat = XtNewString(repeat_str); - sprintf(buf, catgets(c->DT_catd, 1, 531, "Every %d %s"), + sprintf(buf, CATGETS(c->DT_catd, 1, 531, "Every %d %s"), rfp->repeat_nth, nl_repeat); XtFree(nl_repeat); } @@ -329,7 +329,7 @@ rfp_repeat_every_popup(RFP *rfp) { char *title; XmString label_str; - title = XtNewString(catgets(c->DT_catd, 1, 532, + title = XtNewString(CATGETS(c->DT_catd, 1, 532, "Calendar : Repeat Every")); rfp->repeat_popup_frame = XtVaCreatePopupShell("repeat_popup_frame", xmDialogShellWidgetClass, rfp->parent, @@ -351,7 +351,7 @@ rfp_repeat_every_popup(RFP *rfp) { XmNfractionBase, 2, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 460, "Apply")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 460, "Apply")); rfp->repeat_apply_button = XtVaCreateWidget("repeat_apply_button", xmPushButtonWidgetClass, rfp->repeat_form_mgr, XmNlabelString, label_str, @@ -366,7 +366,7 @@ rfp_repeat_every_popup(RFP *rfp) { XtAddCallback(rfp->repeat_apply_button, XmNactivateCallback, rfp_apply_proc, rfp); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 680, "Close")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 680, "Close")); rfp->repeat_cancel_button = XtVaCreateWidget("repeat_cancel_button", xmPushButtonWidgetClass, rfp->repeat_form_mgr, XmNlabelString, label_str, @@ -391,7 +391,7 @@ rfp_repeat_every_popup(RFP *rfp) { XmNbottomOffset, 5, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 533, + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 533, "Repeat Every:")); label = XtVaCreateWidget("every", xmLabelGadgetClass, rfp->repeat_form_mgr, @@ -525,7 +525,7 @@ build_rfp( XmNuserData, rfp, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 836, "Frequency")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 836, "Frequency")); rfp->frequency_label = XtVaCreateWidget("frequency_label", xmLabelGadgetClass, rfp->rfp_form_mgr, XmNlabelString, label_str, @@ -534,7 +534,7 @@ build_rfp( NULL); XmStringFree(label_str); - tmp = XmStringCreateLocalized(catgets(c->DT_catd, 1, 534, "Occurs:")); + tmp = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 534, "Occurs:")); rfp->repeat_label = XtVaCreateWidget("repeat", xmLabelGadgetClass, rfp->rfp_form_mgr, XmNlabelString, label_str, @@ -542,7 +542,7 @@ build_rfp( NULL); XmStringFree(tmp); - tmp = XmStringCreateLocalized(catgets(c->DT_catd, 1, 535, "For:")); + tmp = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 535, "For:")); rfp->for_label = XtVaCreateWidget("for", xmLabelGadgetClass, rfp->rfp_form_mgr, XmNlabelString, tmp, @@ -550,7 +550,7 @@ build_rfp( NULL); XmStringFree(tmp); - tmp = XmStringCreateLocalized( catgets(c->DT_catd, 1, 536, "Privacy:")); + tmp = XmStringCreateLocalized( CATGETS(c->DT_catd, 1, 536, "Privacy:")); rfp->privacy_label = XtVaCreateWidget("privacy", xmLabelGadgetClass, rfp->rfp_form_mgr, XmNlabelString, tmp, @@ -759,7 +759,7 @@ get_rfp_repeat_val( NULL); if (sensitive) { - char *forever_str = catgets(calendar->DT_catd, 1, 876, + char *forever_str = CATGETS(calendar->DT_catd, 1, 876, "forever"); str = XmTextGetString(tf); if (strcmp(str, forever_str) == 0) { @@ -885,15 +885,15 @@ rfp_form_flags_to_appt(RFP *rfp, Dtcm_appointment *a, char *name, int *flagsP) { if (*flagsP == 0) { - char *title = XtNewString(catgets(c->DT_catd, 1, 537, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 537, "Calendar : Editor - Schedule Appointment")); - char *text = XtNewString(catgets(c->DT_catd, 1, 538, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 538, "Would you like to schedule this appointment as the last\nweek of the month or the 4th week of the month?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 540, "Last Week")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 541, "4th Week")); *flagsP = dialog_popup(rfp->parent, DIALOG_TITLE, title, @@ -1136,17 +1136,17 @@ set_rfp_repeat_val(RFP *rfp) { } else if (rfp->repeat_type == CSA_X_DT_REPEAT_EVERY_NDAY) { op = REPEAT_EVERY; repeat_scope = repeat_scope_str(c->DT_catd, REPEAT_DAYS); - sprintf(buf, catgets(c->DT_catd, 1, 542, "Every %d %s"), + sprintf(buf, CATGETS(c->DT_catd, 1, 542, "Every %d %s"), rfp->repeat_nth, repeat_scope); } else if (rfp->repeat_type == CSA_X_DT_REPEAT_EVERY_NWEEK) { op = REPEAT_EVERY; repeat_scope = repeat_scope_str(c->DT_catd, REPEAT_WEEKS); - sprintf(buf, catgets(c->DT_catd, 1, 543, "Every %d %s"), + sprintf(buf, CATGETS(c->DT_catd, 1, 543, "Every %d %s"), rfp->repeat_nth, repeat_scope); } else if (rfp->repeat_type == CSA_X_DT_REPEAT_EVERY_NMONTH) { op = REPEAT_EVERY; repeat_scope = repeat_scope_str(c->DT_catd, REPEAT_MONTHS); - sprintf(buf, catgets(c->DT_catd, 1, 544, "Every %d %s"), + sprintf(buf, CATGETS(c->DT_catd, 1, 544, "Every %d %s"), rfp->repeat_nth, repeat_scope); } else return; @@ -1165,7 +1165,7 @@ set_rfp_repeat_val(RFP *rfp) { if (rfp->for_val == CSA_X_DT_DT_REPEAT_FOREVER) { if(rfp->repeat_type != CSA_X_DT_REPEAT_ONETIME) { - sprintf(buf, "%s", catgets(c->DT_catd, 1, 876, "forever")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 876, "forever")); xmstr = XmStringCreateLocalized(buf); XmComboBoxSetItem(rfp->for_menu, xmstr); XmStringFree(xmstr); diff --git a/cde/programs/dtcm/dtcm/tempbr.c b/cde/programs/dtcm/dtcm/tempbr.c index ac46eb0c9..4467f0eda 100644 --- a/cde/programs/dtcm/dtcm/tempbr.c +++ b/cde/programs/dtcm/dtcm/tempbr.c @@ -171,7 +171,7 @@ tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs) #ifdef FNS if (cmfns_use_fns((Props *)c->properties)) { - sprintf(msg_buf, catgets(c->DT_catd, 1, 647, + sprintf(msg_buf, CATGETS(c->DT_catd, 1, 647, "Looking up %s..."), name); set_message(tb->show_message, msg_buf); XmUpdateDisplay(tb->show_message); @@ -182,7 +182,7 @@ tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs) } #endif - sprintf(msg_buf, catgets(c->DT_catd, 1, 559, "Browsing %s..."), + sprintf(msg_buf, CATGETS(c->DT_catd, 1, 559, "Browsing %s..."), name); set_message(tb->show_message, msg_buf); XFlush(XtDisplay(w)); @@ -206,7 +206,7 @@ make_std_tempbr(Calendar *c) else tb = (Tempbr*)c->tempbr; - title = XtNewString(catgets(c->DT_catd, 1, 560, "Calendar : Show Other Calendar")); + title = XtNewString(CATGETS(c->DT_catd, 1, 560, "Calendar : Show Other Calendar")); tb->frame = XtVaCreatePopupShell("frame", xmDialogShellWidgetClass, c->frame, XmNtitle, title, @@ -227,7 +227,7 @@ make_std_tempbr(Calendar *c) NULL); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 410, "User Name:")); + CATGETS(c->DT_catd, 1, 410, "User Name:")); tb->name_label = XtVaCreateWidget("name_label", xmLabelWidgetClass, tb->form, @@ -278,7 +278,7 @@ make_std_tempbr(Calendar *c) NULL); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 562, "Show")); + CATGETS(c->DT_catd, 1, 562, "Show")); tb->show_button = XtVaCreateWidget("show_button", xmPushButtonWidgetClass, button_form, @@ -294,7 +294,7 @@ make_std_tempbr(Calendar *c) XmStringFree(label_str); label_str = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 680, "Close")); + CATGETS(c->DT_catd, 1, 680, "Close")); tb->cancel_button = XtVaCreateWidget("cancelButton", xmPushButtonWidgetClass, button_form, @@ -311,7 +311,7 @@ make_std_tempbr(Calendar *c) XtAddCallback(tb->cancel_button, XmNactivateCallback, tb_cancel_cb, NULL); - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); tb->help_button = XtVaCreateWidget("helpButton", xmPushButtonWidgetClass, button_form, XmNlabelString, label_str, @@ -329,7 +329,7 @@ make_std_tempbr(Calendar *c) (XtCallbackProc)help_cb, (XtPointer) SHOW_OTHER_CAL_HELP_BUTTON); #ifdef FNS_SUNDEX_DEMO - label_str = XmStringCreateLocalized(catgets(c->DT_catd, 1, 648, + label_str = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 648, "SunDex")); tb->show_button = XtVaCreateWidget("sundex_button", xmPushButtonWidgetClass, tb->form, diff --git a/cde/programs/dtcm/dtcm/timezone.c b/cde/programs/dtcm/dtcm/timezone.c index 097990846..a57d70572 100644 --- a/cde/programs/dtcm/dtcm/timezone.c +++ b/cde/programs/dtcm/dtcm/timezone.c @@ -80,7 +80,7 @@ make_timezone(Calendar *c) else t = (Timezone*)c->timezone; - title = XtNewString(catgets(c->DT_catd, 1, 649, "Calendar : Time Zone")); + title = XtNewString(CATGETS(c->DT_catd, 1, 649, "Calendar : Time Zone")); t->frame = XtVaCreatePopupShell("frame", xmDialogShellWidgetClass, c->frame, XmNtitle, title, @@ -113,7 +113,7 @@ make_timezone(Calendar *c) XmNtopOffset, 5, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 650, "My Time")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 650, "My Time")); t->mytime = XtVaCreateWidget("myTime", xmToggleButtonGadgetClass, t->timezone_rc_mgr, XmNlabelString, xmstr, @@ -123,7 +123,7 @@ make_timezone(Calendar *c) XmStringFree(xmstr); XtAddCallback(t->mytime, XmNvalueChangedCallback, tz_mytime_cb, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 652, "Custom Time")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 652, "Custom Time")); t->customtime = XtVaCreateWidget("customTime", xmToggleButtonGadgetClass, t->timezone_rc_mgr, XmNlabelString, xmstr, @@ -132,7 +132,7 @@ make_timezone(Calendar *c) XmStringFree(xmstr); XtAddCallback(t->customtime, XmNvalueChangedCallback, tz_customtime_cb, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 653, "GMT")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 653, "GMT")); t->gmtlabel = XtVaCreateWidget("gmtLabel", xmLabelWidgetClass, t->form, XmNlabelString, xmstr, XmNleftAttachment, XmATTACH_WIDGET, @@ -174,7 +174,7 @@ make_timezone(Calendar *c) XmTextSetString(text, "-6"); */ - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 654, "Hours")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 654, "Hours")); t->hourlabel = XtVaCreateWidget("gmtHours", xmLabelWidgetClass, t->form, XmNlabelString, xmstr, XmNleftAttachment, XmATTACH_WIDGET, @@ -211,7 +211,7 @@ make_timezone(Calendar *c) XmNfractionBase, 4, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 655, "OK")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 655, "OK")); t->okbutton = XtVaCreateWidget("OK", xmPushButtonWidgetClass, button_form, XmNlabelString, xmstr, @@ -228,7 +228,7 @@ make_timezone(Calendar *c) XmStringFree(xmstr); XtAddCallback(t->okbutton, XmNactivateCallback, tz_ok_cb, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 460, "Apply")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 460, "Apply")); t->applybutton = XtVaCreateWidget("Apply", xmPushButtonWidgetClass, button_form, XmNlabelString, xmstr, @@ -245,7 +245,7 @@ make_timezone(Calendar *c) XmStringFree(xmstr); XtAddCallback(t->applybutton, XmNactivateCallback, tz_apply_cb, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); t->cancelbutton = XtVaCreateWidget("Cancel", xmPushButtonWidgetClass, button_form, XmNlabelString, xmstr, @@ -262,7 +262,7 @@ make_timezone(Calendar *c) XmStringFree(xmstr); XtAddCallback(t->cancelbutton, XmNactivateCallback, tz_cancel_cb, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); t->helpbutton = XtVaCreateWidget("Help", xmPushButtonWidgetClass, button_form, XmNlabelString, xmstr, @@ -298,7 +298,7 @@ make_timezone(Calendar *c) cm_strcpy(tmp_buf, (char*)getenv("TZ")); cm_strcpy(t->mytimezone, tmp_buf); - sprintf(buf, "%s %s", catgets(c->DT_catd, 1, 659, "Time Zone:"), + sprintf(buf, "%s %s", CATGETS(c->DT_catd, 1, 659, "Time Zone:"), t->mytimezone); set_message(t->timezone_message, buf); set_message(c->message_text, buf); @@ -384,7 +384,7 @@ tz_set_timezone(Calendar *c, Timezone *t) if (t->timezone_type == mytime) { set_timezone(t->mytimezone); - sprintf(buf, "%s %s", catgets(c->DT_catd, 1, 659, "Time Zone:"), + sprintf(buf, "%s %s", CATGETS(c->DT_catd, 1, 659, "Time Zone:"), t->mytimezone); /* get utc time */ @@ -412,7 +412,7 @@ tz_set_timezone(Calendar *c, Timezone *t) cm_strcpy(t->gmttimezone, tmp_buf); sprintf(gmt, "GMT%s", tmp_buf); set_timezone(gmt); - sprintf(buf, "%s %s", catgets(c->DT_catd, 1, 659, "Time Zone:"), gmt); + sprintf(buf, "%s %s", CATGETS(c->DT_catd, 1, 659, "Time Zone:"), gmt); } set_message(t->timezone_message, buf); paint_canvas(c, NULL, RENDER_CLEAR_FIRST); diff --git a/cde/programs/dtcm/dtcm/todo.c b/cde/programs/dtcm/dtcm/todo.c index ffda2397f..248862753 100644 --- a/cde/programs/dtcm/dtcm/todo.c +++ b/cde/programs/dtcm/dtcm/todo.c @@ -145,7 +145,7 @@ appt_to_form(ToDo *t, CSA_entry_handle a) { t->completed_val = False; XmToggleButtonGadgetSetState(t->completed_toggle, t->completed_val, True); - sprintf(buf, "%s: %s", catgets(t->cal->DT_catd, 1, 565, "Author"), + sprintf(buf, "%s: %s", CATGETS(t->cal->DT_catd, 1, 565, "Author"), appt->author->value->item.calendar_user_value->user_name); set_message(t->message_text, buf); free_appt_struct(&appt); @@ -354,11 +354,11 @@ flush_view_changes(ToDo *t){ int answer; if (t->view_list_modified) { - char *title = XtNewString(catgets(c->DT_catd, 1, 778, "Calendar : To Do List - Help")); - char *text = XtNewString(catgets(c->DT_catd, 1, 451, "You have made unsaved changes.\nYou may save your changes, discard your changes, \nor return to your previous place in the dialog.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 452, "Save")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 700, "Discard")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); + char *title = XtNewString(CATGETS(c->DT_catd, 1, 778, "Calendar : To Do List - Help")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 451, "You have made unsaved changes.\nYou may save your changes, discard your changes, \nor return to your previous place in the dialog.")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 452, "Save")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 700, "Discard")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); answer = dialog_popup(t->view_frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -476,10 +476,10 @@ create_filter_menu(Widget parent, XtCallbackProc cb_func, XtPointer data) { int ac = 0; Arg args[5]; - label = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 40, "View")); - option1 = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 272, "All")); - option2 = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 783, "Pending")); - option3 = XmStringCreateLocalized(catgets(calendar->DT_catd, 1, 784, "Completed")); + label = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 40, "View")); + option1 = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 272, "All")); + option2 = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 783, "Pending")); + option3 = XmStringCreateLocalized(CATGETS(calendar->DT_catd, 1, 784, "Completed")); menu = XmCreatePulldownMenu(parent, "_pulldown", NULL, 0); @@ -536,7 +536,7 @@ t_build_view_popup(ToDo *t) { /* ** Dialog shell and form */ - title = XtNewString(catgets(c->DT_catd, 1, 1012, "Calendar : To Do List")); + title = XtNewString(CATGETS(c->DT_catd, 1, 1012, "Calendar : To Do List")); t->view_frame = XtVaCreatePopupShell("todo_list", xmDialogShellWidgetClass, c->frame, XmNtitle, title, @@ -554,7 +554,7 @@ t_build_view_popup(ToDo *t) { XmNautoUnmanage, False, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 655, "OK")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 655, "OK")); t->view_ok_button = XtVaCreateWidget("ok", @@ -575,7 +575,7 @@ t_build_view_popup(ToDo *t) { XtAddCallback(t->view_ok_button, XmNactivateCallback, (XtCallbackProc) t_view_ok_cb, t); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 460, "Apply")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 460, "Apply")); t->view_apply_button = XtVaCreateWidget("apply", xmPushButtonWidgetClass, t->view_form, @@ -591,7 +591,7 @@ t_build_view_popup(ToDo *t) { XtAddCallback(t->view_apply_button, XmNactivateCallback, (XtCallbackProc) t_view_apply_cb, t); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); t->view_cancel_button = XtVaCreateWidget("cancel", xmPushButtonWidgetClass, t->view_form, @@ -608,7 +608,7 @@ t_build_view_popup(ToDo *t) { XtAddCallback(t->view_cancel_button, XmNactivateCallback, (XtCallbackProc) t_view_cancel_cb, t); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); t->view_help_button = XtVaCreateWidget("help", xmPushButtonWidgetClass, t->view_form, @@ -634,7 +634,7 @@ t_build_view_popup(ToDo *t) { XmNbottomOffset, 5, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 789, "To Do Type:")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 789, "To Do Type:")); label= XtVaCreateWidget("type_label", xmLabelGadgetClass, t->view_form, XmNtopAttachment, XmATTACH_FORM, @@ -657,7 +657,7 @@ t_build_view_popup(ToDo *t) { XmNleftOffset, 5, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 790, "context")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 790, "context")); t->view_list_label= XtVaCreateWidget("type_label", xmLabelGadgetClass, t->view_form, XmNtopAttachment, XmATTACH_WIDGET, @@ -743,7 +743,7 @@ t_expand_ui_proc(Widget w, XtPointer client_data, XtPointer data) { XtSetSensitive(t->rfp.rfp_form_mgr, False); - xmstr = XmStringCreateLocalized(catgets(t->cal->DT_catd, 1, 625, + xmstr = XmStringCreateLocalized(CATGETS(t->cal->DT_catd, 1, 625, "Less")); XtVaSetValues(t->expand_ui_button, XmNlabelString, xmstr, NULL); @@ -766,7 +766,7 @@ t_expand_ui_proc(Widget w, XtPointer client_data, XtPointer data) { expand_state_closed = False; } else { XtSetSensitive(t->rfp.rfp_form_mgr, False); - xmstr = XmStringCreateLocalized(catgets(t->cal->DT_catd, 1, 626, + xmstr = XmStringCreateLocalized(CATGETS(t->cal->DT_catd, 1, 626, "More")); XtVaSetValues(t->expand_ui_button, XmNlabelString, xmstr, NULL); @@ -873,10 +873,10 @@ t_form_to_appt(ToDo *t) { str = XmTextGetString(t->dssw.what_text); if (!first_line_contains_text(str)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 837, "Calendar : Error - To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 913, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 837, "Calendar : Error - To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 913, "A To Do item must have text in the first line of the What item.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); dialog_popup(t->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -979,12 +979,12 @@ t_insert_proc(Widget w, XtPointer client_data, XtPointer data) { op = ONE_TIME; if (op != ONE_TIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1102, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1102, "Insert To Do")); - char *text = XtNewString(catgets(c->DT_catd, 1, 1103, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 1103, "This To Do is part of a repeating series.\nDo you want to insert the item ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1051,10 +1051,10 @@ t_delete_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(t->frame); if (!XmListGetSelectedPos(t->todo_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 567, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 567, "Select a To Do and DELETE again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(t->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1069,10 +1069,10 @@ t_delete_proc(Widget w, XtPointer client_data, XtPointer data) { } if (!(entry = t_nth_appt(t, item_list[0] - 1))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 570, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 570, "Internal error selecting To Do.\nTo Do was not deleted.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(t->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1105,14 +1105,14 @@ t_delete_proc(Widget w, XtPointer client_data, XtPointer data) { if (appt->repeat_type->value) { if (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 591, "Calendar : To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 573, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 591, "Calendar : To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 573, "This To Do is part of a repeating series.\nDo you want to delete ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 270, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 270, "This One Only")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 271, "Forward")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 271, "Forward")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(t->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1131,12 +1131,12 @@ t_delete_proc(Widget w, XtPointer client_data, XtPointer data) { } } else if (appt->recurrence_rule->value) { - char *title = XtNewString(catgets(c->DT_catd, 1, 591, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 591, "Calendar : To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 791, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 791, "This To Do repeats in an unknown fashion. All occurrences will be changed\nDo you still wish to delete it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1218,12 +1218,12 @@ t_execute_change(ToDo *t, CSA_entry_handle old_a, Dtcm_appointment *new_a, (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_WEEKLY) || (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_MONTHLY) || (appt->repeat_type->value->item.sint32_value == CSA_X_DT_REPEAT_OTHER_YEARLY)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 591, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 591, "Calendar : To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 708, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 708, "This appointment repeats in an unknown fashion. All occurrences will be changed\nDo you still wish to change it?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1238,14 +1238,14 @@ t_execute_change(ToDo *t, CSA_entry_handle old_a, Dtcm_appointment *new_a, } else if (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME) { - char *title = XtNewString(catgets(c->DT_catd, 1, 591, "Calendar : To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 579, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 591, "Calendar : To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 579, "This To Do is part of a repeating series.\nDo you want to change ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident2 = XtNewString(catgets(c->DT_catd, 1, 270, + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident2 = XtNewString(CATGETS(c->DT_catd, 1, 270, "This One Only")); - char *ident3 = XtNewString(catgets(c->DT_catd, 1, 271, "Forward")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident3 = XtNewString(CATGETS(c->DT_catd, 1, 271, "Forward")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1366,10 +1366,10 @@ t_change_proc(Widget w, XtPointer client_data, XtPointer data) { _DtTurnOnHourGlass(t->frame); if (!XmListGetSelectedPos(t->todo_list, &item_list, &item_cnt)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 585, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 585, "Select a To Do and CHANGE again.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(t->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1384,10 +1384,10 @@ t_change_proc(Widget w, XtPointer client_data, XtPointer data) { } if (!(old_a = t_nth_appt(t, item_list[0] - 1))) { - char *title = XtNewString(catgets(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); - char *text = XtNewString(catgets(c->DT_catd, 1, 1009, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 566, "Calendar : Error - To Do Editor")); + char *text = XtNewString(CATGETS(c->DT_catd, 1, 1009, "Internal error selecting To Do.\nTo Do was not changed.")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); answer = dialog_popup(t->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, @@ -1558,7 +1558,7 @@ t_make_todo(Calendar *c) ** Build the stuff in the upper portion of the form */ - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 797, "To Do")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 797, "To Do")); t->list_label = XtVaCreateWidget("todo_label", xmLabelGadgetClass, t->base_form_mgr, XmNtopAttachment, XmATTACH_FORM, @@ -1586,7 +1586,7 @@ t_make_todo(Calendar *c) /* ** Create insert, delete, change, and clear buttons */ - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 342, "Insert")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 342, "Insert")); t->insert_button = XtVaCreateWidget("insert", xmPushButtonWidgetClass, t->base_form_mgr, XmNbottomAttachment, XmATTACH_WIDGET, @@ -1600,7 +1600,7 @@ t_make_todo(Calendar *c) XtAddCallback(t->insert_button, XmNactivateCallback, t_insert_proc, t); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 343, "Change")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 343, "Change")); t->change_button = XtVaCreateWidget("change", xmPushButtonWidgetClass, t->base_form_mgr, XmNbottomAttachment, XmATTACH_WIDGET, @@ -1615,7 +1615,7 @@ t_make_todo(Calendar *c) XtAddCallback(t->change_button, XmNactivateCallback, t_change_proc, t); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 802, "Delete")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 802, "Delete")); t->delete_button = XtVaCreateWidget("delete", xmPushButtonWidgetClass, t->base_form_mgr, XmNbottomAttachment, XmATTACH_WIDGET, @@ -1630,7 +1630,7 @@ t_make_todo(Calendar *c) XtAddCallback(t->delete_button, XmNactivateCallback, t_delete_proc, t); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 803, "Clear")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 803, "Clear")); t->clear_button = XtVaCreateWidget("clear", xmPushButtonWidgetClass, t->base_form_mgr, XmNbottomAttachment, XmATTACH_WIDGET, @@ -1644,7 +1644,7 @@ t_make_todo(Calendar *c) XtAddCallback(t->clear_button, XmNactivateCallback, t_clear_proc, t); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 923, "Cancel")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 923, "Cancel")); t->close_button = XtVaCreateWidget("close", xmPushButtonWidgetClass, t->base_form_mgr, XmNbottomAttachment, XmATTACH_WIDGET, @@ -1658,7 +1658,7 @@ t_make_todo(Calendar *c) XtAddCallback(t->close_button, XmNactivateCallback, t_close_proc, t); XmStringFree(xmstr); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 77, "Help")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 77, "Help")); t->help_button = XtVaCreateWidget("help", xmPushButtonWidgetClass, t->base_form_mgr, XmNbottomAttachment, XmATTACH_WIDGET, @@ -1697,7 +1697,7 @@ t_make_todo(Calendar *c) XmNbottomWidget, t->separator2, NULL); - xmstr = XmStringCreateLocalized(catgets(c->DT_catd, 1, 626, "More")); + xmstr = XmStringCreateLocalized(CATGETS(c->DT_catd, 1, 626, "More")); t->expand_ui_button = XtVaCreateWidget("expando", xmPushButtonWidgetClass, t->base_form_mgr, XmNlabelString, xmstr, @@ -1723,14 +1723,14 @@ t_make_todo(Calendar *c) build_dssw(&t->dssw, c, t->base_form_mgr, True, False); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 590, "Due Date:")); + CATGETS(c->DT_catd, 1, 590, "Due Date:")); XtVaSetValues(t->dssw.date_label, XmNlabelString, xmstr, NULL); XmStringFree(xmstr); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 798, "Time Due:")); + CATGETS(c->DT_catd, 1, 798, "Time Due:")); XtVaSetValues(t->dssw.start_label, XmNlabelString, xmstr, NULL); @@ -1790,7 +1790,7 @@ t_make_todo(Calendar *c) * Add a drag source icon inside the dssw, lower right */ xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 906, "Drag To Do")); + CATGETS(c->DT_catd, 1, 906, "Drag To Do")); t->drag_source = XtVaCreateWidget("drag_source", dtIconGadgetClass, t->dssw.dssw_form_mgr, XmNpixmapPosition, XmPIXMAP_TOP, @@ -1830,7 +1830,7 @@ t_make_todo(Calendar *c) XtVaSetValues(t->drag_source, XmNpixmap, p->drag_icon_xbm, NULL); xmstr = XmStringCreateLocalized( - catgets(c->DT_catd, 1, 784, "Completed")); + CATGETS(c->DT_catd, 1, 784, "Completed")); t->completed_toggle = XtVaCreateManagedWidget("completed", xmToggleButtonGadgetClass, t->dssw.dssw_form_mgr, @@ -2056,22 +2056,22 @@ set_list_title(ToDo *t) { switch (t->view_list_glance) { case yearGlance: - header = catgets(c->DT_catd, 1, 806, "Year of %d"); + header = CATGETS(c->DT_catd, 1, 806, "Year of %d"); sprintf(buffer, header, year(t->view_list_date)); break; case monthGlance: format_date(t->view_list_date+1, get_int_prop(p, CP_DATEORDERING), buffer2, 0, 0, 0); - header = catgets(c->DT_catd, 1, 807, "%s"); + header = CATGETS(c->DT_catd, 1, 807, "%s"); sprintf(buffer, header, buffer2); break; case weekGlance: format_date(t->view_list_date+1, get_int_prop(p, CP_DATEORDERING), buffer2, 1, 0, 0); - header = catgets(c->DT_catd, 1, 808, "Week of %s"); + header = CATGETS(c->DT_catd, 1, 808, "Week of %s"); sprintf(buffer, header, buffer2); break; case dayGlance: format_date(t->view_list_date+1, get_int_prop(p, CP_DATEORDERING), buffer2, 1, 0, 0); - header = catgets(c->DT_catd, 1, 809, "%s"); + header = CATGETS(c->DT_catd, 1, 809, "%s"); sprintf(buffer, header, buffer2); break; } @@ -2361,7 +2361,7 @@ set_todo_title(ToDo *t, char *name) { char buf[MAXNAMELEN]; if (t->frame) { - sprintf(buf, "%s - %s", catgets(c->DT_catd, 1, 591, "Calendar : To Do Editor"), name); + sprintf(buf, "%s - %s", CATGETS(c->DT_catd, 1, 591, "Calendar : To Do Editor"), name); XtVaSetValues(t->frame, XmNtitle, buf, NULL); } @@ -2459,12 +2459,12 @@ todo_insert(Dtcm_appointment *appt, CSA_entry_handle *new_a, Calendar *c) { if ((appt->repeat_type->value) && (appt->repeat_type->value->item.sint32_value != CSA_X_DT_REPEAT_ONETIME)) { - char *title = XtNewString(catgets(c->DT_catd, 1, 1102, + char *title = XtNewString(CATGETS(c->DT_catd, 1, 1102, "Insert To Do")); - char *text = XtNewString(catgets(c->DT_catd, 1, 1103, + char *text = XtNewString(CATGETS(c->DT_catd, 1, 1103, "This To Do is part of a repeating series.\nDo you want to insert the item ...?")); - char *ident1 = XtNewString(catgets(c->DT_catd, 1, 923, "Cancel")); - char *ident4 = XtNewString(catgets(c->DT_catd, 1, 272, "All")); + char *ident1 = XtNewString(CATGETS(c->DT_catd, 1, 923, "Cancel")); + char *ident4 = XtNewString(CATGETS(c->DT_catd, 1, 272, "All")); answer = dialog_popup(c->frame, DIALOG_TITLE, title, DIALOG_TEXT, text, diff --git a/cde/programs/dtcm/dtcm/weekglance.c b/cde/programs/dtcm/dtcm/weekglance.c index e68e22e2a..6c8d55f31 100644 --- a/cde/programs/dtcm/dtcm/weekglance.c +++ b/cde/programs/dtcm/dtcm/weekglance.c @@ -137,7 +137,7 @@ format_week_header(Tick date, OrderingType order, char *buf) Use the appropriate strftime conversion for your locale. */ strftime(buf, 80, - catgets(c->DT_catd, 1, 993, "Week Starting %A, %B %e, %Y"), tm); + CATGETS(c->DT_catd, 1, 993, "Week Starting %A, %B %e, %Y"), tm); } static int @@ -207,13 +207,13 @@ print_week (Calendar *c, if (days[0] == (char *)NULL) { - days[0] = XtNewString(catgets(c->DT_catd, 1, 596, "Monday %d")); - days[1] = XtNewString(catgets(c->DT_catd, 1, 597, "Tuesday %d")); - days[2] = XtNewString(catgets(c->DT_catd, 1, 598, "Wednesday %d")); - days[3] = XtNewString(catgets(c->DT_catd, 1, 599, "Thursday %d")); - days[4] = XtNewString(catgets(c->DT_catd, 1, 600, "Friday %d")); - days[5] = XtNewString(catgets(c->DT_catd, 1, 601, "Saturday %d")); - days[6] = XtNewString(catgets(c->DT_catd, 1, 602, "Sunday %d")); + days[0] = XtNewString(CATGETS(c->DT_catd, 1, 596, "Monday %d")); + days[1] = XtNewString(CATGETS(c->DT_catd, 1, 597, "Tuesday %d")); + days[2] = XtNewString(CATGETS(c->DT_catd, 1, 598, "Wednesday %d")); + days[3] = XtNewString(CATGETS(c->DT_catd, 1, 599, "Thursday %d")); + days[4] = XtNewString(CATGETS(c->DT_catd, 1, 600, "Friday %d")); + days[5] = XtNewString(CATGETS(c->DT_catd, 1, 601, "Saturday %d")); + days[6] = XtNewString(CATGETS(c->DT_catd, 1, 602, "Sunday %d")); } x_init_printer(xp, LANDSCAPE); @@ -956,7 +956,7 @@ draw_week(Calendar *c, XRectangle *rect, Boundary boundary) c->paint_cache, c->paint_cache_size, rect); current_day += daysec; if (lower_bound > 0) { - sprintf(buf, "%s", catgets(c->DT_catd, 1, 623, "Calendar does not display dates prior to January 1, 1970")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 623, "Calendar does not display dates prior to January 1, 1970")); footer_message = buf; } else @@ -975,7 +975,7 @@ draw_week(Calendar *c, XRectangle *rect, Boundary boundary) fill_day(c, w, x, y, current_day, c->paint_cache, c->paint_cache_size, rect); current_day += daysec; - sprintf(buf, "%s", catgets(c->DT_catd, 1, 624, "Calendar does not display dates after December 31, 2037")); + sprintf(buf, "%s", CATGETS(c->DT_catd, 1, 624, "Calendar does not display dates after December 31, 2037")); footer_message = buf; if (upper_bound > 4) clear_hot_btn(c, n); diff --git a/cde/programs/dtcm/dtcm/x_graphics.c b/cde/programs/dtcm/dtcm/x_graphics.c index 08e99a7fb..19bfc1dbf 100644 --- a/cde/programs/dtcm/dtcm/x_graphics.c +++ b/cde/programs/dtcm/dtcm/x_graphics.c @@ -1010,13 +1010,13 @@ cm_load_font_error(CMGraphicsInfo *gInfo, char *fontPattern) char *title; char *label; - errFmt = catgets(c->DT_catd, 1, 1119, + errFmt = CATGETS(c->DT_catd, 1, 1119, "Warning - Unable to load font %s."); errText = (char *)XtMalloc((strlen(errFmt) + strlen(fontPattern) + 1) * sizeof(char)); sprintf(errText, errFmt, fontPattern); - label = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); - title = XtNewString(catgets(c->DT_catd, 1, 1118, + label = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); + title = XtNewString(CATGETS(c->DT_catd, 1, 1118, "Calendar : Warning - Print")); dialog_popup(c->frame, @@ -1999,7 +1999,7 @@ local_dayname(Calendar *c, char **array_place, int dayNum) 497, 491, 492, 493, 494, 495, 496 }; - source = catgets(c->DT_catd, 1, + source = CATGETS(c->DT_catd, 1, dayCatIndex[dayNum], defaultDays[dayNum]); _len = strlen( source ); @@ -2031,7 +2031,7 @@ local_dayname3(Calendar *c, char **array_place, int dayNum) 480, 481, 482, 483, 484, 485, 486 }; - source = catgets(c->DT_catd, 1, + source = CATGETS(c->DT_catd, 1, dayCatIndex[dayNum], defaultDays[dayNum]); _len = strlen( source ); @@ -2079,7 +2079,7 @@ get_report_type_string(CMGraphicsInfo *gInfo) unsigned long to_len = 0; unsigned long _len; - str = catgets(c->DT_catd, 1, catIndex[reportType], + str = CATGETS(c->DT_catd, 1, catIndex[reportType], defaultStrs[reportType]); _len = strlen( str ); @@ -2121,20 +2121,20 @@ filePrintReportStatus(Calendar *c, Boolean ok) char *label; Pixmap pixmap; - label = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); + label = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); if (!ok) { - errText = XtNewString(catgets(c->DT_catd, 1, 1115, + errText = XtNewString(CATGETS(c->DT_catd, 1, 1115, "Error - unable to print to file.")); - title = XtNewString(catgets(c->DT_catd, 1, 1114, + title = XtNewString(CATGETS(c->DT_catd, 1, 1114, "Calendar : Error - Print To File")); pixmap = pu->xm_error_pixmap; } else { - errText = XtNewString(catgets(c->DT_catd, 1, 1117, + errText = XtNewString(CATGETS(c->DT_catd, 1, 1117, "Print to file has completed.")); - title = XtNewString(catgets(c->DT_catd, 1, 1116, + title = XtNewString(CATGETS(c->DT_catd, 1, 1116, "Calendar : Print To File")); pixmap = pu->xm_info_pixmap; } @@ -2160,11 +2160,11 @@ showBadAllocError(Calendar *c) char *label; Pixmap pixmap; - label = XtNewString(catgets(c->DT_catd, 1, 95, "Continue")); - errText = XtNewString(catgets(c->DT_catd, 1, 1122, + label = XtNewString(CATGETS(c->DT_catd, 1, 95, "Continue")); + errText = XtNewString(CATGETS(c->DT_catd, 1, 1122, "Print job failed.\n\n\ The X Print Server is temporarily out of resources.")); - title = XtNewString(catgets(c->DT_catd, 1, 1121, + title = XtNewString(CATGETS(c->DT_catd, 1, 1121, "Calendar : Print Server Error")); pixmap = pu->xm_error_pixmap; @@ -2626,7 +2626,7 @@ x_print_header(void *gInfoP, char *buf, int pageNum, int numPages) numPages++; /* print creation notice at bottom */ - cm_strcpy(str2, catgets(c->DT_catd, 1, 468, "Page")); + cm_strcpy(str2, CATGETS(c->DT_catd, 1, 468, "Page")); { char *to = NULL; unsigned long to_len = 0; @@ -2641,7 +2641,7 @@ x_print_header(void *gInfoP, char *buf, int pageNum, int numPages) } cm_strcpy(str2, euc_to_octal(str2)); - str = catgets(c->DT_catd, 1, 476, "of"); + str = CATGETS(c->DT_catd, 1, 476, "of"); { char *to = NULL; unsigned long to_len = 0; @@ -2703,7 +2703,7 @@ x_day_header (void *gInfoP) gInfo->topMarginY + dayBoxVOffset + gInfo->u.dayInfo.tab1, gInfo->normalWd); - str = catgets(c->DT_catd, 1, 470, "Morning"); + str = CATGETS(c->DT_catd, 1, 470, "Morning"); { char *to = NULL; @@ -2723,7 +2723,7 @@ x_day_header (void *gInfoP) (gInfo->u.dayInfo.tab1 / 2), CENTER_AT_X | CENTER_AT_Y); - str = catgets(c->DT_catd, 1, 471, "Afternoon"); + str = CATGETS(c->DT_catd, 1, 471, "Afternoon"); { char *to = NULL; @@ -2756,8 +2756,8 @@ x_day_timeslots(void *gInfoP, int i, Boolean more) Calendar *c = gInfo->c; sprintf (hourbuf, "%d", (morning(i) || (i == 12)) ? i : (i - 12) ); - sprintf (modbuf, "%s", morning(i) ? catgets(c->DT_catd, 1, 4, "am") : - catgets(c->DT_catd, 1, 3, "pm")); + sprintf (modbuf, "%s", morning(i) ? CATGETS(c->DT_catd, 1, 4, "am") : + CATGETS(c->DT_catd, 1, 3, "pm")); /* --- print hourly boxes for appt entries --- */ if (i == 12) @@ -3005,10 +3005,10 @@ x_print_list_range(Calendar *c, CSA_sint32 appt_type, int item_data, format_date(start + 1, ot, buf2, 1, 0, 0); if (appt_type == CSA_TYPE_TODO) - sprintf(buf, catgets(c->DT_catd, 1, 899, + sprintf(buf, CATGETS(c->DT_catd, 1, 899, "To Do List Beginning: %s"), buf2); else - sprintf(buf, catgets(c->DT_catd, 1, 900, + sprintf(buf, CATGETS(c->DT_catd, 1, 900, "Appt List Beginning: %s"), buf2); setup_range(&range_attrs, &ops, &i, start, end, appt_type, diff --git a/cde/programs/dtcm/dtcm/yearglance.c b/cde/programs/dtcm/dtcm/yearglance.c index fc5107d10..a319f3c92 100644 --- a/cde/programs/dtcm/dtcm/yearglance.c +++ b/cde/programs/dtcm/dtcm/yearglance.c @@ -307,7 +307,7 @@ update_year(Calendar *c) Use the appropriate strftime conversion for your locale. */ - strftime(buf, 100, catgets(c->DT_catd, 1, 1092, "%Y"), + strftime(buf, 100, CATGETS(c->DT_catd, 1, 1092, "%Y"), _XLocaltime(&c->view->date, localtime_buf)); XtVaGetValues(y->year_label, XmNlabelString, &str, NULL); XmStringFree(str); diff --git a/cde/programs/dtcm/libDtCmP/cm_tty.c b/cde/programs/dtcm/libDtCmP/cm_tty.c index 7be6d4761..4e20b938e 100644 --- a/cde/programs/dtcm/libDtCmP/cm_tty.c +++ b/cde/programs/dtcm/libDtCmP/cm_tty.c @@ -57,7 +57,7 @@ static char sccsid[] = "@(#)cm_tty.c 1.91 95/07/27 Copyr 1993 Sun Microsystems, #include #include #include -#include +#include
#include #include #include "cm_tty.h" @@ -197,25 +197,25 @@ mini_err_msg( if (type == TTY_Insert) fprintf(stderr, "%s", - catgets(catd, 1, 1042, "Insert Access Denied: ")); + CATGETS(catd, 1, 1042, "Insert Access Denied: ")); else if (type == TTY_Delete) fprintf(stderr, "%s", - catgets(catd, 1, 1043, "Delete Access Denied: ")); + CATGETS(catd, 1, 1043, "Delete Access Denied: ")); else fprintf(stderr, "%s", - catgets(catd, 1, 1044, "Lookup Access Denied: ")); + CATGETS(catd, 1, 1044, "Lookup Access Denied: ")); if (appt_what && appt_what[0] != '\0') { buf = cm_strdup(appt_what); if (ptr = strrchr(buf, '\n')) *ptr = '\0'; fprintf(stderr, "%s '%s'\n", - catgets(catd, 1, 1045, "Cancelled for"), + CATGETS(catd, 1, 1045, "Cancelled for"), buf); free(buf); } else fprintf(stderr, "%s\n", - catgets(catd, 1, 1046, + CATGETS(catd, 1, 1046, "Appointment Cancelled\n")); } @@ -243,14 +243,14 @@ query_user(void *client_data) { */ if (what_str && what_str[0] != '\0') - fprintf(stdout, catgets(catd_global, 1, 1047, + fprintf(stdout, CATGETS(catd_global, 1, 1047, "This appointment: '%s' has an end\n"), what_str); else - fprintf(stdout, "%s", catgets(catd_global, 1, 1048, + fprintf(stdout, "%s", CATGETS(catd_global, 1, 1048, "This appointment has an end\n")); - fprintf(stdout, "%s", catgets(catd_global, 1, 1049, + fprintf(stdout, "%s", CATGETS(catd_global, 1, 1049, "time earlier than its begin time. Do you\n")); - fprintf(stdout, "%s", catgets(catd_global, 1, 1050, + fprintf(stdout, "%s", CATGETS(catd_global, 1, 1050, "want to schedule it into the next day? [Y/N] ")); fgets(ans, sizeof(ans)-1, stdin); fprintf(stdout, "\n"); @@ -314,17 +314,17 @@ cm_tty_delete( Option [1-4]: " */ - fprintf(stdout, catgets(catd, 1, 1051, + fprintf(stdout, CATGETS(catd, 1, 1051, "The appointment '%s' is part of a repeating series. "), appt->what->value->item.string_value); - fprintf(stdout, "%s", catgets(catd, 1, 1052, "Do you want to:")); - fprintf(stdout, "%s", catgets(catd, 1, 1053, + fprintf(stdout, "%s", CATGETS(catd, 1, 1052, "Do you want to:")); + fprintf(stdout, "%s", CATGETS(catd, 1, 1053, "\n\t1. Delete all of them")); - fprintf(stdout, "%s", catgets(catd, 1, 1054, + fprintf(stdout, "%s", CATGETS(catd, 1, 1054, "\n\t2. Delete this one only")); - fprintf(stdout, "%s", catgets(catd, 1, 1055, "\n\t3. Delete forward")); - fprintf(stdout, "%s", catgets(catd, 1, 1056, "\n\t4. Cancel")); - fprintf(stdout, "%s", catgets(catd, 1, 1057, "\n\tOption [1-4]: ")); + fprintf(stdout, "%s", CATGETS(catd, 1, 1055, "\n\t3. Delete forward")); + fprintf(stdout, "%s", CATGETS(catd, 1, 1056, "\n\t4. Cancel")); + fprintf(stdout, "%s", CATGETS(catd, 1, 1057, "\n\tOption [1-4]: ")); fgets(ans, sizeof(ans)-1, stdin); fprintf(stdout, "\n"); } @@ -459,36 +459,36 @@ cm_tty_insert(nl_catd catd, CSA_session_handle target, int version, switch(op) { case INVALID_DATE: - t1 = catgets(catd, 1, 1058, "Invalid Date specified.\n"); + t1 = CATGETS(catd, 1, 1058, "Invalid Date specified.\n"); break; case INVALID_START: - t1 = catgets(catd, 1, 1059, + t1 = CATGETS(catd, 1, 1059, "Invalid Start time specified.\n"); break; case INVALID_TIME: t1 = "Invalid Due time specified.\n"; break; case INVALID_STOP: - t1 = catgets(catd, 1, 1060, + t1 = CATGETS(catd, 1, 1060, "Invalid Stop time specified.\n"); break; case MISSING_DATE: - t1 = catgets(catd, 1, 1061, + t1 = CATGETS(catd, 1, 1061, "Empty or missing Date field.\n"); break; case MISSING_START: - t1 = catgets(catd, 1, 1062, + t1 = CATGETS(catd, 1, 1062, "Empty or missing Start field.\n"); break; case MISSING_TIME: t1 = "Empty or missing Due time field.\n"; break; case MISSING_WHAT: - t1 = catgets(catd, 1, 1063, + t1 = CATGETS(catd, 1, 1063, "Empty or missing What field.\n"); break; case REPEAT_FOR_MISMATCH: - t1 = catgets(catd, 1, 1064, + t1 = CATGETS(catd, 1, 1064, "Repeat and For field mismatch.\n"); break; case VALID_APPT: @@ -497,7 +497,7 @@ cm_tty_insert(nl_catd catd, CSA_session_handle target, int version, break; default: op = CANCEL_APPT; - t1 = catgets(catd, 1, 1065, + t1 = CATGETS(catd, 1, 1065, "Insert appointment was cancelled\n"); break; } @@ -514,7 +514,7 @@ cm_tty_insert(nl_catd catd, CSA_session_handle target, int version, csa_free((CSA_buffer)new_entry); } else { char *msg = strdup(t1); - fprintf(stderr, "%s%s\n", msg, catgets(catd, 1, 1066, + fprintf(stderr, "%s%s\n", msg, CATGETS(catd, 1, 1066, "Appointment was not inserted.")); free(msg); ret_stat = -1; @@ -591,7 +591,7 @@ cm_tty_lookup(nl_catd catd, CSA_session_handle target, int version, char *date, tick = now(); else if ((tick = cm_getdate(date, NULL)) < 0) { fprintf(stdout, "\n%s %s\n\n", - catgets(catd, 1, 1067, "Invalid date specified:"), + CATGETS(catd, 1, 1067, "Invalid date specified:"), date); return(0); } @@ -640,7 +640,7 @@ cm_tty_lookup(nl_catd catd, CSA_session_handle target, int version, char *date, if (day != last_day) { cm_tty_format_header(p, start_tick, date_str); fprintf(stdout, "\n%s %s:\n", - catgets(catd, 1, 1068, "Appointments for"), + CATGETS(catd, 1, 1068, "Appointments for"), date_str); } last_day = day; @@ -679,7 +679,7 @@ cm_tty_lookup(nl_catd catd, CSA_session_handle target, int version, char *date, if (*list == NULL) { cm_tty_format_header(p, start + 1, date_str); fprintf(stdout, "\n%s %s\n\n", - catgets(catd, 1, 1069, "No Appointments for"), + CATGETS(catd, 1, 1069, "No Appointments for"), date_str); } return a_total; @@ -779,17 +779,17 @@ default_repeat_scope_str( if (!default_repeat_scope_strs[DAILY]) { default_repeat_scope_strs[ONE_TIME] = strdup("\0"); default_repeat_scope_strs[DAILY] = - strdup(catgets(catd, 1, 994, "days")); + strdup(CATGETS(catd, 1, 994, "days")); default_repeat_scope_strs[WEEKLY] = - strdup(catgets(catd, 1, 995, "weeks")); + strdup(CATGETS(catd, 1, 995, "weeks")); default_repeat_scope_strs[EVERY_TWO_WEEKS] = - strdup(catgets(catd, 1, 996, "biweeks")); + strdup(CATGETS(catd, 1, 996, "biweeks")); default_repeat_scope_strs[MONTHLY_BY_DATE] = - strdup(catgets(catd, 1, 997, "months")); + strdup(CATGETS(catd, 1, 997, "months")); default_repeat_scope_strs[MONTHLY_BY_WEEKDAY] = default_repeat_scope_strs[MONTHLY_BY_DATE]; default_repeat_scope_strs[YEARLY] = - strdup(catgets(catd, 1, 998, "years")); + strdup(CATGETS(catd, 1, 998, "years")); default_repeat_scope_strs[MONDAY_THRU_FRIDAY] = default_repeat_scope_strs[WEEKLY]; default_repeat_scope_strs[MON_WED_FRI] = @@ -2316,25 +2316,25 @@ init_repeat_strs( nl_catd catd, char **repeat_strs) { - repeat_strs[ONE_TIME] = strdup(catgets(catd, 1, 852, "One Time")); - repeat_strs[DAILY] = strdup(catgets(catd, 1, 853, "Daily")); - repeat_strs[WEEKLY] = strdup(catgets(catd, 1, 854, "Weekly")); + repeat_strs[ONE_TIME] = strdup(CATGETS(catd, 1, 852, "One Time")); + repeat_strs[DAILY] = strdup(CATGETS(catd, 1, 853, "Daily")); + repeat_strs[WEEKLY] = strdup(CATGETS(catd, 1, 854, "Weekly")); repeat_strs[EVERY_TWO_WEEKS] = - strdup(catgets(catd, 1, 855, "Every Two Weeks")); + strdup(CATGETS(catd, 1, 855, "Every Two Weeks")); repeat_strs[MONTHLY_BY_DATE] = - strdup(catgets(catd, 1, 856, "Monthly By Date")); + strdup(CATGETS(catd, 1, 856, "Monthly By Date")); repeat_strs[MONTHLY_BY_WEEKDAY] = - strdup(catgets(catd, 1, 857, "Monthly By Weekday")); + strdup(CATGETS(catd, 1, 857, "Monthly By Weekday")); repeat_strs[YEARLY] = - strdup(catgets(catd, 1, 858, "Yearly")); + strdup(CATGETS(catd, 1, 858, "Yearly")); repeat_strs[MONDAY_THRU_FRIDAY] = - strdup(catgets(catd, 1, 859, "Monday Thru Friday")); + strdup(CATGETS(catd, 1, 859, "Monday Thru Friday")); repeat_strs[MON_WED_FRI] = - strdup(catgets(catd, 1, 860, "Mon, Wed, Fri")); + strdup(CATGETS(catd, 1, 860, "Mon, Wed, Fri")); repeat_strs[TUESDAY_THURSDAY] = - strdup(catgets(catd, 1, 861, "Tuesday, Thursday")); + strdup(CATGETS(catd, 1, 861, "Tuesday, Thursday")); repeat_strs[REPEAT_EVERY] = - strdup(catgets(catd, 1, 862, "Repeat Every...")); + strdup(CATGETS(catd, 1, 862, "Repeat Every...")); } extern char* @@ -2364,11 +2364,11 @@ repeat_scope_str( { if (!repeat_scope_strs[0]) { repeat_scope_strs[REPEAT_DAYS] = - strdup(catgets(catd, 1, 994, "days")); + strdup(CATGETS(catd, 1, 994, "days")); repeat_scope_strs[REPEAT_WEEKS] = - strdup(catgets(catd, 1, 995, "weeks")); + strdup(CATGETS(catd, 1, 995, "weeks")); repeat_scope_strs[REPEAT_MONTHS] = - strdup(catgets(catd, 1, 997, "months")); + strdup(CATGETS(catd, 1, 997, "months")); } if (op >= REPEAT_DAYS && op <= REPEAT_MONTHS) @@ -2406,11 +2406,11 @@ time_scope_str_i18n( { if (!time_scope_strs_i18n[0]) { time_scope_strs_i18n[TIME_MINS] = - strdup(catgets(catd, 1, 877, "Mins")); + strdup(CATGETS(catd, 1, 877, "Mins")); time_scope_strs_i18n[TIME_HRS] = - strdup(catgets(catd, 1, 878, "Hrs")); + strdup(CATGETS(catd, 1, 878, "Hrs")); time_scope_strs_i18n[TIME_DAYS] = - strdup(catgets(catd, 1, 879, "Days")); + strdup(CATGETS(catd, 1, 879, "Days")); } if (op >= TIME_MINS && op <= TIME_DAYS) @@ -2655,7 +2655,7 @@ validate_rfp( If it is a CSA_X_DT_REPEAT_ONETIME then f_buf == ``0''. */ - if (strcasecmp(f_buf, catgets(catd, 1, 876, "forever")) == 0) { + if (strcasecmp(f_buf, CATGETS(catd, 1, 876, "forever")) == 0) { repeat_times = CSA_X_DT_DT_REPEAT_FOREVER; repeat_forever = True; } else { diff --git a/cde/programs/dtcm/libDtCmP/cm_tty.h b/cde/programs/dtcm/libDtCmP/cm_tty.h index 7b9f20059..449e7d565 100644 --- a/cde/programs/dtcm/libDtCmP/cm_tty.h +++ b/cde/programs/dtcm/libDtCmP/cm_tty.h @@ -53,7 +53,7 @@ #define CM_TTY_H #include -#include +#include
#include "timeops.h" #include "util.h" #include "props.h" diff --git a/cde/programs/dtcm/libDtCmP/props.c b/cde/programs/dtcm/libDtCmP/props.c index 18ddbe940..a976a6a98 100644 --- a/cde/programs/dtcm/libDtCmP/props.c +++ b/cde/programs/dtcm/libDtCmP/props.c @@ -53,7 +53,7 @@ static char sccsid[] = "@(#)props.c 1.13 94/11/07 Copyr 1991 Sun Microsystems, I #include #include -#include +#include
#include #include #include @@ -339,15 +339,15 @@ init_props(void) is_inited = 1; - libdtcm_catd = catopen(LIBDTCM_CAT, NL_CAT_LOCALE); + libdtcm_catd = CATOPEN(LIBDTCM_CAT, NL_CAT_LOCALE); if ((nl_catd) -1 == libdtcm_catd) return; dflt = def_props[CP_DATEORDERING]; - str = catgets(libdtcm_catd, 1, 1, dflt); + str = CATGETS(libdtcm_catd, 1, 1, dflt); def_props[CP_DATEORDERING] = strdup(str); dflt = def_props[CP_DEFAULTDISP]; - str = catgets(libdtcm_catd, 1, 2, dflt); + str = CATGETS(libdtcm_catd, 1, 2, dflt); def_props[CP_DEFAULTDISP] = strdup(str); } diff --git a/cde/programs/dtcreate/dtcreate.h b/cde/programs/dtcreate/dtcreate.h index f4f65f0d3..b36732f2d 100644 --- a/cde/programs/dtcreate/dtcreate.h +++ b/cde/programs/dtcreate/dtcreate.h @@ -33,7 +33,7 @@ #define __TOOLTALK #include -#include +#include
#include /***************************************************************************/ @@ -190,7 +190,7 @@ typedef struct { /* Macro Declarations */ /* */ /***************************************************************************/ -#define GETMESSAGE(set, number, defstr) catgets(nlmsg_fd, set, number, defstr) +#define GETMESSAGE(set, number, defstr) CATGETS(nlmsg_fd, set, number, defstr) /***************************************************************************/ /* */ diff --git a/cde/programs/dtcreate/main.c b/cde/programs/dtcreate/main.c index 0b223cf62..5dd83254b 100644 --- a/cde/programs/dtcreate/main.c +++ b/cde/programs/dtcreate/main.c @@ -1386,7 +1386,7 @@ main(int argc, char *argv[]) for (i=1; i] [-?]")); exit(0); @@ -1412,7 +1412,7 @@ main(int argc, char *argv[]) UxTopLevel = XtAppInitialize(&UxAppContext, CLASS_NAME, NULL, 0, &argc, argv, NULL, NULL, 0); - nlmsg_fd = catopen("dtcreate", NL_CAT_LOCALE); + nlmsg_fd = CATOPEN("dtcreate", NL_CAT_LOCALE); UxDisplay = XtDisplay(UxTopLevel); UxScreen = XDefaultScreen(UxDisplay); diff --git a/cde/programs/dtdspmsg/Imakefile b/cde/programs/dtdspmsg/Imakefile index d44266410..4aab31fd7 100644 --- a/cde/programs/dtdspmsg/Imakefile +++ b/cde/programs/dtdspmsg/Imakefile @@ -1,5 +1,6 @@ XCOMM $XConsortium: Imakefile /main/8 1996/10/09 14:04:16 drk $ +DEFINES = -DNO_XLIB SYS_LIBRARIES = -lm $(DYNLIBSYSLIB) $(REGEXSYSLIB) #ifdef HPArchitecture @@ -9,6 +10,7 @@ EXTRA_DEFINES = +e PROGRAMS=dtdspmsg SRCS = dtdspmsg.c -OBJS = dtdspmsg.o +OBJS = dtdspmsg.o MsgCat.o ComplexProgramTarget($(PROGRAMS)) +LinkSourceFile(MsgCat.c,$(DTSVCSRC)/DtUtil2) diff --git a/cde/programs/dtdspmsg/dtdspmsg.c b/cde/programs/dtdspmsg/dtdspmsg.c index 757602a30..00750525f 100644 --- a/cde/programs/dtdspmsg/dtdspmsg.c +++ b/cde/programs/dtdspmsg/dtdspmsg.c @@ -58,6 +58,7 @@ #include #include #include +#include
#include "msgfac_msg.h" #define die(s) puts(s), exit(1) @@ -82,8 +83,6 @@ void parse_args(int argc, char *argv[], struct arguments *args); nl_catd catderr; /* error message catalog descriptor */ - - /* * NAME: main * @@ -112,9 +111,9 @@ int main(int argc,char *argv[]) int n; /* # bytes in a character */ setlocale (LC_ALL,""); - catderr = catopen(MF_MSGFAC, 0); + catderr = CATOPEN(MF_MSGFAC, 0); if (argc < 3) { - die(catgets(catderr,MS_DSPMSG,M_DSPMSG, "Usage: dtdspmsg [-s setno] ['default' arg ... ]")); + die(CATGETS(catderr,MS_DSPMSG,M_DSPMSG, "Usage: dtdspmsg [-s setno] ['default' arg ... ]")); } /*______________________________________________________________________ @@ -127,8 +126,8 @@ int main(int argc,char *argv[]) get the message out of the catalog. ______________________________________________________________________*/ - catdmsg = catopen(args.catname, 0); - message = catgets(catdmsg,args.set,args.msg,args.def); + catdmsg = CATOPEN(args.catname, 0); + message = CATGETS(catdmsg,args.set,args.msg,args.def); /*______________________________________________________________________ @@ -230,26 +229,26 @@ int main(int argc,char *argv[]) /* do not allow mixing of reorder types */ if (reorder == FALSE) { - die(catgets(catderr,MS_DSPMSG,M_REORDER,"\nNone or all arguments must use %n$ format")); + die(CATGETS(catderr,MS_DSPMSG,M_REORDER,"\nNone or all arguments must use %n$ format")); } for (idx = 0 ; isanumber(*p) ; p++) idx += idx * 10 + toanumber(*p); idx--; if (*p++ != '$') { - die(catgets(catderr,MS_DSPMSG,M_INVRE,"\n% missing from %n$ format")); + die(CATGETS(catderr,MS_DSPMSG,M_INVRE,"\n% missing from %n$ format")); } reorder = TRUE; } else { /* do not allow mixing of reorder types */ if (reorder == TRUE) { - die(catgets(catderr,MS_DSPMSG,M_REORDER,"\nNone or all arguments must use %n$ format")); + die(CATGETS(catderr,MS_DSPMSG,M_REORDER,"\nNone or all arguments must use %n$ format")); } reorder = FALSE; } /* report invalid printf argument number */ if (idx < 0 || idx >= args.argmax) { - die(catgets(catderr,MS_DSPMSG,M_REINDEX,"\nInvalid argument index")); + die(CATGETS(catderr,MS_DSPMSG,M_REINDEX,"\nInvalid argument index")); } /* report unsupported % type */ if (*p == 's') @@ -306,7 +305,7 @@ void parse_args(int argc, char *argv[], struct arguments *args) argc--; /* Skip the program name */ if (!strcmp(*argv,"-s")) { /* check for a set number */ if (argc < 4) /* check for sufficient arguments */ - die(catgets(catderr,MS_DSPMSG,M_DSPMSG, "Usage: dtdspmsg [-s setno] ['default' arg ... ]")); + die(CATGETS(catderr,MS_DSPMSG,M_DSPMSG, "Usage: dtdspmsg [-s setno] ['default' arg ... ]")); argv++; argc--; /* skip past the '-s' */ sscanf(*argv,"%d",&args->set); /* get the real set number */ @@ -317,7 +316,7 @@ void parse_args(int argc, char *argv[], struct arguments *args) argc--; if (!strcmp(*argv,"-s")) { /* check for a set number */ if (argc < 3) /* check for sufficient arguments */ - die(catgets(catderr,MS_DSPMSG,M_DSPMSG, "Usage: dtdspmsg [-s setno] ['default' arg ... ]")); + die(CATGETS(catderr,MS_DSPMSG,M_DSPMSG, "Usage: dtdspmsg [-s setno] ['default' arg ... ]")); argv++; argc--; /* skip past the '-s' */ diff --git a/cde/programs/dtdspmsg/msgfac_msg.h b/cde/programs/dtdspmsg/msgfac_msg.h index 5434b76b1..e0001f056 100644 --- a/cde/programs/dtdspmsg/msgfac_msg.h +++ b/cde/programs/dtdspmsg/msgfac_msg.h @@ -30,8 +30,6 @@ #ifndef _H_MSGFAC_MSG #define _H_MSGFAC_MSG -#include -#include #define MF_MSGFAC "msgfac.cat" diff --git a/cde/programs/dtexec/Imakefile b/cde/programs/dtexec/Imakefile index a5528a59d..50bf2306c 100644 --- a/cde/programs/dtexec/Imakefile +++ b/cde/programs/dtexec/Imakefile @@ -6,11 +6,12 @@ DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = -DMSGLOG_CLIENT_ONLY INCLUDES = -I. $(TIRPCINC) -SRCS = DtGetMessage.c Main.c MsgLog.c -OBJS = DtGetMessage.o Main.o MsgLog.o +SRCS = DtGetMessage.c Main.c MsgCat.c MsgLog.c +OBJS = DtGetMessage.o Main.o MsgCat.o MsgLog.o ComplexProgramTarget(dtexec) LinkSourceFile(DtSvcLock.h,$(DTSVCSRC)/include) +LinkSourceFile(MsgCat.c,$(DTSVCSRC)/DtUtil2) LinkSourceFile(MsgLog.c,$(DTSVCSRC)/DtUtil2) LinkSourceFile(DtGetMessage.c,$(DTSVCSRC)/DtUtil2) diff --git a/cde/programs/dtfile/HelpCB.c b/cde/programs/dtfile/HelpCB.c index 1e3965197..047f709a3 100644 --- a/cde/programs/dtfile/HelpCB.c +++ b/cde/programs/dtfile/HelpCB.c @@ -58,7 +58,7 @@ #include #include #include -#include +#include
#include #include diff --git a/cde/programs/dtfile/Main.c b/cde/programs/dtfile/Main.c index 4943a5f65..cbfa4a413 100644 --- a/cde/programs/dtfile/Main.c +++ b/cde/programs/dtfile/Main.c @@ -125,10 +125,6 @@ #include #include -#ifndef sun /* don't need the nl_types.h file */ -#include -#endif /* !sun */ - #include #include @@ -165,6 +161,7 @@ #include
#include
#include
+#include
#include
#include
#include
diff --git a/cde/programs/dtfile/SharedMsgs.c b/cde/programs/dtfile/SharedMsgs.c index 888b8ded3..5b9ff071b 100644 --- a/cde/programs/dtfile/SharedMsgs.c +++ b/cde/programs/dtfile/SharedMsgs.c @@ -52,9 +52,7 @@ #include #include #include -#ifndef sun /* don't need the nl_types.h file */ -#include -#endif /* ! sun */ +#include
#include diff --git a/cde/programs/dthello/Imakefile b/cde/programs/dthello/Imakefile index 868d3209a..03ae89ce7 100644 --- a/cde/programs/dthello/Imakefile +++ b/cde/programs/dthello/Imakefile @@ -17,9 +17,10 @@ SYS_LIBRARIES = -lm -ldl -lgen SRCS1 = dthello.c SRCS = $(SRCS1) OBJS = dthello.o \ - $(CDELIBSRC)/DtSvc/DtUtil2/EnvControl.o \ $(CDELIBSRC)/DtSvc/DtUtil2/DtNlUtils.o \ - $(CDELIBSRC)/DtSvc/DtUtil2/GetDispRes.o + $(CDELIBSRC)/DtSvc/DtUtil2/EnvControl.o \ + $(CDELIBSRC)/DtSvc/DtUtil2/GetDispRes.o \ + $(CDELIBSRC)/DtSvc/DtUtil2/MsgCat.o ComplexProgramTarget(dthello) diff --git a/cde/programs/dthello/dthello.c b/cde/programs/dthello/dthello.c index be50ec9bb..6fb5c6a0f 100644 --- a/cde/programs/dthello/dthello.c +++ b/cde/programs/dthello/dthello.c @@ -76,7 +76,7 @@ #include #include #ifndef NO_MESSAGE_CATALOG -# include +# include
#endif #include
@@ -1005,30 +1005,15 @@ GetMessage( int n, char *s ) { - char *msg; - char *lang; - nl_catd catopen(); - char *catgets(); static int first = 1; - static nl_catd nlmsg_fd; - if ( first ) + static nl_catd nlmsg_fd = (nl_catd) -1; + + if ( first ) { first = 0; - - lang = (char *) getenv ("LANG"); - - if (!lang || !(strcmp (lang, "C"))) - /* - * If LANG is not set or if LANG=C, then there - * is no need to open the message catalog - just - * return the built-in string "s". - */ - nlmsg_fd = (nl_catd)-1; - else - nlmsg_fd = catopen("dthello", NL_CAT_LOCALE); + nlmsg_fd = CATOPEN("dthello", NL_CAT_LOCALE); } - msg=catgets(nlmsg_fd,set,n,s); - return (msg); + return CATGETS(nlmsg_fd, set, n, s); } #endif diff --git a/cde/programs/dthelp/dthelpgen/helpgen.c b/cde/programs/dthelp/dthelpgen/helpgen.c index d4cb64a1b..84ad947e8 100644 --- a/cde/programs/dthelp/dthelpgen/helpgen.c +++ b/cde/programs/dthelp/dthelpgen/helpgen.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include
#include #include #include @@ -226,9 +226,9 @@ GetMessage ( */ nlmsg_fd = (nl_catd) -1; else - nlmsg_fd = catopen(catFileName, NL_CAT_LOCALE); + nlmsg_fd = CATOPEN(catFileName, NL_CAT_LOCALE); } - msg=catgets(nlmsg_fd,set,n,s); + msg=CATGETS(nlmsg_fd,set,n,s); return (msg); } diff --git a/cde/programs/dthelp/dthelpprint/HelpPrintI.h b/cde/programs/dthelp/dthelpprint/HelpPrintI.h index 86a8c9b9b..2e3c5fa22 100644 --- a/cde/programs/dthelp/dthelpprint/HelpPrintI.h +++ b/cde/programs/dthelp/dthelpprint/HelpPrintI.h @@ -423,7 +423,7 @@ void _DtHPrGetPrOffsetArg( char * _DtHPrGetMessage( int set, int n, - char *s); + const char *s); #endif /* DTHELPRPINTP_H */ diff --git a/cde/programs/dthelp/dthelpprint/PrintUtil.c b/cde/programs/dthelp/dthelpprint/PrintUtil.c index cc9ea1511..28deb8efb 100644 --- a/cde/programs/dthelp/dthelpprint/PrintUtil.c +++ b/cde/programs/dthelp/dthelpprint/PrintUtil.c @@ -40,7 +40,7 @@ $COPYRIGHT$: #include #include #include -#include /* for message cat processing */ +#include
/* for message cat processing */ #if defined(sun) #include #else @@ -245,14 +245,10 @@ $ARGS$: char * _DtHPrGetMessage( int set, int n, - char *s) + const char *s) { /*$CODE$*/ - char *msg; - char *lang; - nl_catd catopen(); - char *catgets(); static int s_First = 1; - static nl_catd s_Nlmsg_fd; + static nl_catd s_Nlmsg_fd = (nl_catd) -1; static char * s_CatFileName = NULL; if ( s_First ) @@ -264,23 +260,9 @@ char * _DtHPrGetMessage( s_CatFileName = strdup(HELPPRINT_CAT); } s_First = 0; - - lang = (char *) getenv ("LANG"); - - /* If LANG is not set or if LANG=C, then there - * is no need to open the message catalog - just - * return the built-in string "s". */ - if (!lang || !(strcmp (lang, "C"))) - s_Nlmsg_fd = (nl_catd) -1; - else - s_Nlmsg_fd = catopen(s_CatFileName, 0); + s_Nlmsg_fd = CATOPEN(s_CatFileName, 0); } /* end of first-time processing */ - msg = catgets(s_Nlmsg_fd,set,n,s); - return (msg); - + return CATGETS(s_Nlmsg_fd, set, n, s); } #endif /* NO_MESSAGE_CATALOG */ - - - diff --git a/cde/programs/dtimsstart/main.c b/cde/programs/dtimsstart/main.c index 12bb4d2c6..834a5c076 100644 --- a/cde/programs/dtimsstart/main.c +++ b/cde/programs/dtimsstart/main.c @@ -32,26 +32,18 @@ * (c) Copyright 1996 Hitachi. */ -#ifndef lint -static char *RCS_ID = "@(#)dtimsstart $Revision: /main/10 $ $Date: 1996/10/28 12:41:03 $"; -#endif - char *ProgramRevision = "dtimsstart $Revision: /main/10 $"; #define _EXTERN_DEFINE_ #include "xims.h" #undef _EXTERN_DEFINE_ -#include -#include +#include +#include +#include
-#ifndef NLS -#define catgets(i, sn,mn,s) (s) -#else #define NL_SETN 1 /* set number */ -#include static nl_catd catd = (nl_catd) -1; -#endif /* NLS */ extern char *find_system_locale_name(char *); @@ -616,7 +608,7 @@ static void show_select_mode(int mode) { char *valp; - printf("%s: \t", (catgets(catd,NL_SETN,20, "SelectMode"))); + printf("%s: \t", (CATGETS(catd,NL_SETN,20, "SelectMode"))); switch (mode) { default: @@ -624,10 +616,10 @@ static void show_select_mode(int mode) case SEL_MODE_NONE: valp = ""; /* break; */ #endif case SEL_MODE_NOAUTO: - valp = (catgets(catd,NL_SETN,21, "ask_at_login")); + valp = (CATGETS(catd,NL_SETN,21, "ask_at_login")); break; case SEL_MODE_AUTO: - valp = (catgets(catd,NL_SETN,22, "resume_current_input_method")); + valp = (CATGETS(catd,NL_SETN,22, "resume_current_input_method")); break; #ifdef SelectMode_ONCE case SEL_MODE_ONCE: @@ -705,14 +697,10 @@ static int set_locale_env(char *locale) putenv(XtNewString(buf)); } -#ifdef NLS - if (catd != (nl_catd) -1) (void) catclose(catd); - catd = (nl_catd) -1; (void) catclose(catd); - + (void)CATCLOSE(catd); if (Verbose > 0) { - catd = catopen(DTIMS_PROGNAME, 0); + catd = CATOPEN(DTIMS_PROGNAME, 0); } -#endif /* NLS */ return NoError; } @@ -1107,32 +1095,32 @@ static void usage(int force) if (!force && Verbose <= 0) return; - fprintf(LogFp, (catgets(catd,NL_SETN,1, "usage: %s [options ..]")), + fprintf(LogFp, (CATGETS(catd,NL_SETN,1, "usage: %s [options ..]")), ProgramName); putc('\n', LogFp); if (OpMode != MODE_MODE) { fprintf(LogFp, fmt, - "-env", (catgets(catd,NL_SETN,2, "print modified environment variables"))); + "-env", (CATGETS(catd,NL_SETN,2, "print modified environment variables"))); fprintf(LogFp, fmt, - "-shell ", (catgets(catd,NL_SETN,3, "override $SHELL"))); + "-shell ", (CATGETS(catd,NL_SETN,3, "override $SHELL"))); fprintf(LogFp, fmt, - "-ims ", (catgets(catd,NL_SETN,4, "specifies input method name"))); + "-ims ", (CATGETS(catd,NL_SETN,4, "specifies input method name"))); fprintf(LogFp, fmt, - "-imsopt ", (catgets(catd,NL_SETN,5, "specifies command options for input method server"))); + "-imsopt ", (CATGETS(catd,NL_SETN,5, "specifies command options for input method server"))); fprintf(LogFp, fmt, - "-host ", (catgets(catd,NL_SETN,6, "specifies host where input method server should be run"))); + "-host ", (CATGETS(catd,NL_SETN,6, "specifies host where input method server should be run"))); fprintf(LogFp, fmt, - "-mode", (catgets(catd,NL_SETN,7, "change input method selection mode"))); + "-mode", (CATGETS(catd,NL_SETN,7, "change input method selection mode"))); fprintf(LogFp, fmt, - "-list", (catgets(catd,NL_SETN,8, "print registered input method"))); + "-list", (CATGETS(catd,NL_SETN,8, "print registered input method"))); fprintf(LogFp, fmt, - "-help", (catgets(catd,NL_SETN,9, "show this message"))); + "-help", (CATGETS(catd,NL_SETN,9, "show this message"))); } else { fprintf(LogFp, fmt, - "-auto", (catgets(catd,NL_SETN,23, "force 'resume_current_input_method' mode"))); + "-auto", (CATGETS(catd,NL_SETN,23, "force 'resume_current_input_method' mode"))); fprintf(LogFp, fmt, - "-noauto", (catgets(catd,NL_SETN,24, "force 'ask_at_login' mode"))); + "-noauto", (CATGETS(catd,NL_SETN,24, "force 'ask_at_login' mode"))); } #ifdef DEBUG @@ -1159,86 +1147,86 @@ char *xims_errmsg(int err_num, void *arg1, void *arg2, void *arg3) case NoError: break; case ErrSyntax: /* arg1: option string */ - fmt = (catgets(catd,NL_SETN,31, "invalid option '%s'")); + fmt = (CATGETS(catd,NL_SETN,31, "invalid option '%s'")); break; case ErrNoHome: - fmt = (catgets(catd,NL_SETN,32, "environment variable 'HOME' not defined")); + fmt = (CATGETS(catd,NL_SETN,32, "environment variable 'HOME' not defined")); break; case ErrNoLocale: - fmt = (catgets(catd,NL_SETN,33, "environment variable 'LANG' not defined")); + fmt = (CATGETS(catd,NL_SETN,33, "environment variable 'LANG' not defined")); break; case ErrNoCDELocale: - fmt = (catgets(catd,NL_SETN,34, "this locale is not supported by the desktop.")); + fmt = (CATGETS(catd,NL_SETN,34, "this locale is not supported by the desktop.")); break; case ErrNoDisplay: - fmt = (catgets(catd,NL_SETN,35, "environment variable 'DISPLAY' not defined")); + fmt = (CATGETS(catd,NL_SETN,35, "environment variable 'DISPLAY' not defined")); break; case ErrFileOpen: /* arg1: file name */ - fmt = (catgets(catd,NL_SETN,36, "cannot open file\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,36, "cannot open file\n [%s]")); setErrArg1(errFilePath); break; case ErrFileCreate: /* arg1: file name */ - fmt = (catgets(catd,NL_SETN,37, "cannot create file\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,37, "cannot create file\n [%s]")); setErrArg1(errFilePath); break; case ErrDirCreate: /* arg1: dir name */ - fmt = (catgets(catd,NL_SETN,38, "cannot create directory\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,38, "cannot create directory\n [%s]")); setErrArg1(errFilePath); break; case ErrMissEntry: /* arg1: entry name, arg2: file name */ - fmt = (catgets(catd,NL_SETN,39, "missing '%s' entry in configuration file\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,39, "missing '%s' entry in configuration file\n [%s]")); setErrArg2(errFilePath); break; case ErrAnotherProg: - fmt = (catgets(catd,NL_SETN,40, "another '%s' is already running")); + fmt = (CATGETS(catd,NL_SETN,40, "another '%s' is already running")); setErrArg1(ProgramName); break; case ErrNoSelectionFile: /* arg1: locale name */ - fmt = (catgets(catd,NL_SETN,41, "no selection file for '%s'")); + fmt = (CATGETS(catd,NL_SETN,41, "no selection file for '%s'")); setErrArg1(userEnv.locale); break; case ErrSaveSelection: /* arg1: file name */ - fmt = (catgets(catd,NL_SETN,42, "cannot create selection file\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,42, "cannot create selection file\n [%s]")); setErrArg1(errFilePath); break; case ErrNoSelection: /* arg1: locale name */ - fmt = (catgets(catd,NL_SETN,43, "no ims selected for '%s'")); + fmt = (CATGETS(catd,NL_SETN,43, "no ims selected for '%s'")); setErrArg1(userEnv.locale); break; case ErrNoLocaleConf: /* arg1: file name */ - fmt = (catgets(catd,NL_SETN,44, "no locale configuration file for '%s'")); + fmt = (CATGETS(catd,NL_SETN,44, "no locale configuration file for '%s'")); setErrArg1(userEnv.locale); break; case ErrNoImsEntry: /* arg1: locale name */ - fmt = (catgets(catd,NL_SETN,45, "no ims configured for '%s'")); + fmt = (CATGETS(catd,NL_SETN,45, "no ims configured for '%s'")); setErrArg1(userEnv.locale); break; case ErrNoImsConf: /* arg1: ims name */ - fmt = (catgets(catd,NL_SETN,46, "no ims configuration file for '%s'")); + fmt = (CATGETS(catd,NL_SETN,46, "no ims configuration file for '%s'")); setErrArg1(userSel.name); break; case ErrNotRegistered: /* arg1: ims name */ - fmt = (catgets(catd,NL_SETN,47, "ims '%s' not registered")); + fmt = (CATGETS(catd,NL_SETN,47, "ims '%s' not registered")); setErrArg1(userSel.name); break; case ErrNoExecutable: /* arg1: ims name, arg2: file name */ - fmt = (catgets(catd,NL_SETN,48, "no executable file for '%s'\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,48, "no executable file for '%s'\n [%s]")); setErrArg1(userSel.name); setErrArg2(userSel.ent->ims->cmd_path); break; case ErrImsRunning: /* arg1: ims name */ - fmt = (catgets(catd,NL_SETN,49, "ims '%s' is already running")); + fmt = (CATGETS(catd,NL_SETN,49, "ims '%s' is already running")); setErrArg1(userSel.name); break; case ErrImsExecution: /* arg1: ims name */ - fmt = (catgets(catd,NL_SETN,50, "cannot execute ims '%s'")); + fmt = (CATGETS(catd,NL_SETN,50, "cannot execute ims '%s'")); setErrArg1(userSel.name); break; case ErrImsAborted: /* arg1: ims name, arg2: log file */ - fmt = (catgets(catd,NL_SETN,51, "ims '%s' aborted. See log file.\n [%s]")); + fmt = (CATGETS(catd,NL_SETN,51, "ims '%s' aborted. See log file.\n [%s]")); setErrArg1(userSel.name); if (userSel.host_type == HOST_REMOTE) setErrArg2(errFilePath); @@ -1246,38 +1234,38 @@ char *xims_errmsg(int err_num, void *arg1, void *arg2, void *arg3) setErrArg2(Opt.LogPath); break; case ErrImsTimeout: /* arg1: file name */ - fmt = (catgets(catd,NL_SETN,52, "ims '%s' is not available yet")); + fmt = (CATGETS(catd,NL_SETN,52, "ims '%s' is not available yet")); setErrArg1(userSel.name); break; case ErrUnknownHost: /* arg1: host name */ - fmt = (catgets(catd,NL_SETN,53, "unknown host '%s'")); + fmt = (CATGETS(catd,NL_SETN,53, "unknown host '%s'")); setErrArg1(userSel.hostname); break; case ErrRemoteAction: /* arg1: action name */ - fmt = (catgets(catd,NL_SETN,54, "action '%s' failed")); + fmt = (CATGETS(catd,NL_SETN,54, "action '%s' failed")); setErrArg1(errFuncName); break; case ErrRemoteData: /* arg1: host name */ - fmt = (catgets(catd,NL_SETN,55, "remote execution failed on '%s'")); + fmt = (CATGETS(catd,NL_SETN,55, "remote execution failed on '%s'")); setErrArg1(userSel.hostname); break; case ErrNoImsstart: /* arg1: host name */ - fmt = (catgets(catd,NL_SETN,56, "remote functionality is not available on '%s'")); + fmt = (CATGETS(catd,NL_SETN,56, "remote functionality is not available on '%s'")); setErrArg1(userSel.hostname); break; case ErrRemoteNoIms: /* arg1: host name */ - fmt = (catgets(catd,NL_SETN,57, "no ims registered on '%s'")); + fmt = (CATGETS(catd,NL_SETN,57, "no ims registered on '%s'")); setErrArg1(userSel.hostname); break; case ErrRemoteMissIms: /* arg1: ims name, arg2: host name */ - fmt = (catgets(catd,NL_SETN,58, "ims '%1$s' not registered on '%2$s'")); + fmt = (CATGETS(catd,NL_SETN,58, "ims '%1$s' not registered on '%2$s'")); setErrArg1(userSel.name); setErrArg2(userSel.hostname); break; case ErrOpenDpy: /* arg1: display name */ - fmt = (catgets(catd,NL_SETN,59, "cannot open display '%s'")); + fmt = (CATGETS(catd,NL_SETN,59, "cannot open display '%s'")); setErrArg1(userEnv.displayname); break; diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.C b/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.C index f3ae52a1a..60ad2291a 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.C +++ b/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.C @@ -54,14 +54,14 @@ CatMgr::CatMgr() : f_msg(NULL), f_default(NULL) cerr << "(WARNING) NLSPATH not specified" << '\n' << flush; #endif - f_catd = catopen(CATALOG_PREFIX, NL_CAT_LOCALE); + f_catd = CATOPEN(CATALOG_PREFIX, NL_CAT_LOCALE); // setup default message if (is_open(f_catd)) { #ifdef DEBUG cerr << "(DEBUG) catopen succeeded." << '\n' << flush; #endif - char* msg = ::catgets(f_catd, Set_CatMgr, DEFAULT_MSG, + char* msg = ::CATGETS(f_catd, Set_CatMgr, DEFAULT_MSG, "default message not found."); len = strlen(msg); f_default = new char[len + 1]; @@ -94,7 +94,7 @@ CatMgr::~CatMgr() delete[] f_default; if (is_open(f_catd)) { - int status = catclose(f_catd); + int status = CATCLOSE(f_catd); if (status < 0) { #ifdef DEBUG cerr << "(ERROR) catclose failed." << '\n' << flush; @@ -127,9 +127,9 @@ CatMgr::catgets(int set_num, int msg_num, const char* def) if (is_open(f_catd)) { char* msg; if (def) - msg = ::catgets(f_catd, set_num, msg_num, def); + msg = ::CATGETS(f_catd, set_num, msg_num, def); else - msg = ::catgets(f_catd, set_num, msg_num, f_default); + msg = ::CATGETS(f_catd, set_num, msg_num, f_default); int msglen = strlen(msg); len = msglen; f_msg = new char[msglen + 1]; diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.hh b/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.hh index 908d27ef7..f3b98a866 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.hh +++ b/cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.hh @@ -27,7 +27,7 @@ #ifndef __CATMGR_HH__ #define __CATMGR_HH__ -#include +#include
#include "Registration.hh" diff --git a/cde/programs/dtlogin/Imakefile b/cde/programs/dtlogin/Imakefile index 120add7e0..6725b7286 100644 --- a/cde/programs/dtlogin/Imakefile +++ b/cde/programs/dtlogin/Imakefile @@ -166,7 +166,8 @@ INCLUDES = -I$(XPROJECTROOT)/include/freetype2 dpylist.o error.o file.o mitauth.o protodpy.o policy.o \ reset.o resource.o server.o session.o socket.o util.o \ verify.o sysauth.o fontpath.o $(DESOBJS) qualify.o choose.o \ - netaddr.o xdmcp.o $(PAM_OBJS) $(SOLARIS_OBJS) + netaddr.o xdmcp.o $(PAM_OBJS) $(SOLARIS_OBJS) \ + $(CDELIBSRC)/DtSvc/DtUtil2/MsgCat.o PROG2 = dtgreet #ifdef AlphaArchitecture diff --git a/cde/programs/dtlogin/chooser.c b/cde/programs/dtlogin/chooser.c index dd034dc15..6401bc76a 100644 --- a/cde/programs/dtlogin/chooser.c +++ b/cde/programs/dtlogin/chooser.c @@ -100,10 +100,6 @@ in this Software without prior written authorization from the X Consortium. #include #include #include -#include -#ifndef NL_CAT_LOCALE -#define NL_CAT_LOCALE 0 -#endif #ifdef SVR4 #include diff --git a/cde/programs/dtlogin/util.c b/cde/programs/dtlogin/util.c index 84fb44375..b59748229 100644 --- a/cde/programs/dtlogin/util.c +++ b/cde/programs/dtlogin/util.c @@ -58,7 +58,7 @@ #include #include #include -#include +#include
# include @@ -112,7 +112,6 @@ unsigned char * ReadCatalog( int set_num, int msg_num, char *def_str ) { static Bool alreadyopen = False; - char *s; if (alreadyopen == False) { @@ -174,12 +173,10 @@ ReadCatalog( int set_num, int msg_num, char *def_str ) * msg catalog could not be opened), subsequent call to catgets() using * that descriptor will return 'def_str'. */ - nl_fd = catopen("dtlogin", NL_CAT_LOCALE); + nl_fd = CATOPEN("dtlogin", NL_CAT_LOCALE); } - s = catgets(nl_fd,set_num,msg_num,def_str); - - return((unsigned char *)s); + return ((unsigned char *) CATGETS(nl_fd, set_num, msg_num, def_str)); } void diff --git a/cde/programs/dtlogin/vgutil.c b/cde/programs/dtlogin/vgutil.c index d7f23da69..c158c4f3e 100644 --- a/cde/programs/dtlogin/vgutil.c +++ b/cde/programs/dtlogin/vgutil.c @@ -54,7 +54,6 @@ * ***************************************************************************/ -#include #include #include #include @@ -64,6 +63,7 @@ #include #include +#include
#include "vg.h" #include "vgmsg.h" @@ -734,7 +734,7 @@ LogError( unsigned char *fmt, ...) void CloseCatalog(void) { - catclose(nl_fd); + CATCLOSE(nl_fd); } /*************************************************************************** @@ -773,7 +773,7 @@ OpenCatalog(void) */ if (NULL != langenv) { - nl_fd = catopen(NLS_CATALOG, NL_CAT_LOCALE); + nl_fd = CATOPEN(NLS_CATALOG, NL_CAT_LOCALE); if (0 > (long) nl_fd) LogError((unsigned char*) MC_DEF_LOG_NO_MSGCAT, langenv); } @@ -794,7 +794,7 @@ ReadCatalog(int setn, int msgn, char *dflt) if ((0 > (long) nl_fd) || (NULL == langenv)) return (unsigned char*) dflt; else - return (unsigned char*) catgets(nl_fd, setn, msgn, dflt); + return (unsigned char*) CATGETS(nl_fd, setn, msgn, dflt); } /*************************************************************************** @@ -1127,48 +1127,3 @@ ToPixel( Widget w, int orientation, int pixel ) XmPIXELS)); } } - - - -#if 0 -/*************************************************************************** - * - * _DtMessage Catalog Stubs - * - * These stub routines can be used for porting to systems that do not yet - * support message catalogs. Replace the above "0" with an appropriate - * define for your target system. Do the same for the external defines - * in "vg.h". - ***************************************************************************/ - -nl_catd -catopen(name, oflag) - char *name; - int oflag; - -{ - return (555); -} - - -int -catclose(catd) - nl_catd catd; - -{ - return; -} - - -char * -catgets(catd, set_num, msg_num, def_str) - nl_catd catd; - int set_num; - int msg_num; - char *def_str; - -{ - return (def_str); -} - -#endif diff --git a/cde/programs/dtlogin/xdm_msg.h b/cde/programs/dtlogin/xdm_msg.h index e417768d6..93d26714c 100644 --- a/cde/programs/dtlogin/xdm_msg.h +++ b/cde/programs/dtlogin/xdm_msg.h @@ -30,7 +30,6 @@ #ifndef _H_XDM_MSG #define _H_XDM_MSG #include -#include #define MF_XDM "xdm.cat" diff --git a/cde/programs/dtmail/MotifApp/Application.C b/cde/programs/dtmail/MotifApp/Application.C index 604a77962..b1bc02814 100644 --- a/cde/programs/dtmail/MotifApp/Application.C +++ b/cde/programs/dtmail/MotifApp/Application.C @@ -70,7 +70,7 @@ #include #include #include -#include +#include
#include #include "EUSDebug.hh" @@ -98,34 +98,6 @@ Application::_appResources[] = { #define NL_CAT_LOCALE 0 #endif -#ifdef 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. - */ -char *catgets_cache2(nl_catd catd, int set, int num, char *dflt) -{ - -#define MSGS_PER_SET_MAX 12 -#define NUM_SETS_MAX 2 - - /* array to hold messages from catalog */ - static char *MsgCat[NUM_SETS_MAX][MSGS_PER_SET_MAX]; - - /* convert to a zero based index */ - int setIdx = set - 1; - int numIdx = num - 1; - - if ( ! MsgCat[setIdx][numIdx] ) { - MsgCat[setIdx][numIdx] = strdup( catgets(catd, set, num, dflt)); - } - - return MsgCat[setIdx][numIdx]; -} - -#endif - Application *theApplication = NULL; nl_catd catd = (nl_catd) -1; // catgets file descriptor @@ -261,7 +233,7 @@ Application::~Application() #endif #endif - catclose(catd); + CATCLOSE(catd); // In an MT environment, calling exit() causes threads to // hang and a deadlock results. @@ -387,7 +359,7 @@ void Application::open_catalog() { // open message catalog file - catd = catopen("MotifApp", NL_CAT_LOCALE); + catd = CATOPEN("MotifApp", NL_CAT_LOCALE); } void diff --git a/cde/programs/dtmail/MotifApp/AskFirstCmd.C b/cde/programs/dtmail/MotifApp/AskFirstCmd.C index f1d8d59ff..4b63fa7ab 100644 --- a/cde/programs/dtmail/MotifApp/AskFirstCmd.C +++ b/cde/programs/dtmail/MotifApp/AskFirstCmd.C @@ -65,11 +65,9 @@ #include "QuestionDialogManager.h" #include -#include +#include
extern nl_catd catd; -#include "NLS.hh" - AskFirstCmd::AskFirstCmd ( char *name, char *label, int active ) : Cmd ( name, label, active ) @@ -77,7 +75,7 @@ AskFirstCmd::AskFirstCmd ( char *name, _dialog = NULL; _question = NULL; _dialogParentWidget = NULL; - setQuestion ( GETMSG(catd, 1, 1, + setQuestion ( CATGETS(catd, 1, 1, "Do you really want to execute this command?")); } diff --git a/cde/programs/dtmail/MotifApp/DialogManager.C b/cde/programs/dtmail/MotifApp/DialogManager.C index 670961310..8051a7a44 100644 --- a/cde/programs/dtmail/MotifApp/DialogManager.C +++ b/cde/programs/dtmail/MotifApp/DialogManager.C @@ -69,11 +69,9 @@ #include #include -#include +#include
extern nl_catd catd; -#include "NLS.hh" - DialogManager::DialogManager ( char *name ): UIComponent ( name ) { // Empty @@ -468,8 +466,8 @@ DialogManager::post_and_return( // They may have been set via the overloaded post_and_return() // method before. Reset them to their default values... - okLabel = XmStringCreateLocalized(GETMSG(catd, 1, 2, "OK")); - cancelLabel = XmStringCreateLocalized(GETMSG(catd, 1, 3, "Cancel")); + okLabel = XmStringCreateLocalized(CATGETS(catd, 1, 2, "OK")); + cancelLabel = XmStringCreateLocalized(CATGETS(catd, 1, 3, "Cancel")); Widget dlg = this->getDialog(wid); diff --git a/cde/programs/dtmail/MotifApp/Help.C b/cde/programs/dtmail/MotifApp/Help.C index c263e8c3a..bcf273770 100644 --- a/cde/programs/dtmail/MotifApp/Help.C +++ b/cde/programs/dtmail/MotifApp/Help.C @@ -50,11 +50,9 @@ #include
#include "Help.hh" -#include +#include
extern nl_catd catd; -#include "NLS.hh" - void DisplayMain( Widget, char *, char *); static Widget helpMain = NULL; static Widget helpError = NULL; @@ -126,7 +124,7 @@ DisplayVersion ( if (versionMain != NULL) { n = 0; - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 4, + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 4, "DtMail Version Dialog")); n++; if (helpVolume != NULL) { XtSetArg (args[n], DtNhelpVolume, helpVolume); n++; @@ -141,7 +139,7 @@ DisplayVersion ( // Build a new one in our cached list n = 0; - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 5, + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 5, "DtMail Version Dialog")); n++; if (helpVolume != NULL) { XtSetArg (args[n], DtNhelpVolume, helpVolume); n++; @@ -190,7 +188,7 @@ HelpMenuCB ( switch ((int) status) { case DtHELP_SELECT_ERROR: - printf(GETMSG(catd, 2, 1, "Selection Error, cannot continue\n")); + printf(CATGETS(catd, 2, 1, "Selection Error, cannot continue\n")); break; case DtHELP_SELECT_VALID: while (selWidget != NULL) { @@ -205,10 +203,10 @@ HelpMenuCB ( } break; case DtHELP_SELECT_ABORT: - printf(GETMSG(catd, 2, 2, "Selection aborted by user.\n")); + printf(CATGETS(catd, 2, 2, "Selection aborted by user.\n")); break; case DtHELP_SELECT_INVALID: - printf(GETMSG(catd, 1, 6, + printf(CATGETS(catd, 1, 6, "You must select a component withing your app.\n")); break; } @@ -260,9 +258,9 @@ DisplayMain( if (helpMain != NULL) { n = 0; #ifdef undef - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 7, "DtMail Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 7, "DtMail Help")); n++; #endif - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 12, "Mailer : Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 12, "Mailer : Help")); n++; if (helpVolume != NULL) { XtSetArg (args[n], DtNhelpVolume, helpVolume); n++; } @@ -277,7 +275,7 @@ DisplayMain( // Build a new one in our cached list n = 0; - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 12, "Mailer : Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 12, "Mailer : Help")); n++; if (helpVolume != NULL) { XtSetArg (args[n], DtNhelpVolume, helpVolume); n++; } @@ -306,9 +304,9 @@ DisplayErrorHelp( if (helpError) { n = 0; #ifdef undef - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 7, "DtMail Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 7, "DtMail Help")); n++; #endif - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 12, "Mailer : Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 12, "Mailer : Help")); n++; if (helpVolume != NULL) { XtSetArg (args[n], DtNhelpVolume, helpVolume); n++; } @@ -323,9 +321,9 @@ DisplayErrorHelp( // when done. n = 0; #ifdef undef - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 8, "DtMail Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 8, "DtMail Help")); n++; #endif - XtSetArg (args[n], XmNtitle, GETMSG(catd, 1, 12, "Mailer : Help")); n++; + XtSetArg (args[n], XmNtitle, CATGETS(catd, 1, 12, "Mailer : Help")); n++; if (helpVolume != NULL) { XtSetArg (args[n], DtNhelpVolume, helpVolume); n++; } diff --git a/cde/programs/dtmail/MotifApp/QuitCmd.C b/cde/programs/dtmail/MotifApp/QuitCmd.C index 5cce76f0d..a96ce7c20 100644 --- a/cde/programs/dtmail/MotifApp/QuitCmd.C +++ b/cde/programs/dtmail/MotifApp/QuitCmd.C @@ -66,17 +66,15 @@ #include "MainWindow.h" #include "Application.h" -#include +#include
extern nl_catd catd; -#include "NLS.hh" - QuitCmd::QuitCmd ( char *name, char *label, int active, MainWindow *mywindow) : WarnNoUndoCmd ( name, label, active ) { _mywindow = mywindow; _dialogParentWidget = _mywindow->baseWidget(); - setQuestion ( GETMSG(catd, 1, 9, "Close this folder?") ); + setQuestion ( CATGETS(catd, 1, 9, "Close this folder?") ); } void QuitCmd::doit() diff --git a/cde/programs/dtmail/MotifApp/SelectFileCmd.C b/cde/programs/dtmail/MotifApp/SelectFileCmd.C index 4e0df1bdb..5830e32bb 100644 --- a/cde/programs/dtmail/MotifApp/SelectFileCmd.C +++ b/cde/programs/dtmail/MotifApp/SelectFileCmd.C @@ -70,11 +70,9 @@ #include #include "Help.hh" -#include +#include
extern nl_catd catd; -#include "NLS.hh" - extern "C" { #include
} @@ -184,7 +182,7 @@ void SelectFileCmd::doit() XmStringFree(title); XmStringFree(ok_str); XmString hidden_str = XmStringCreateLocalized( - GETMSG(catd, 1, 11, "Show hidden folders and files")); + CATGETS(catd, 1, 11, "Show hidden folders and files")); _hidden_button = XtVaCreateManagedWidget( "hidden", xmToggleButtonWidgetClass, _fileBrowser, diff --git a/cde/programs/dtmail/MotifApp/WarnNoUndoCmd.C b/cde/programs/dtmail/MotifApp/WarnNoUndoCmd.C index 9d4db2f6e..95e131771 100644 --- a/cde/programs/dtmail/MotifApp/WarnNoUndoCmd.C +++ b/cde/programs/dtmail/MotifApp/WarnNoUndoCmd.C @@ -63,17 +63,15 @@ ////////////////////////////////////////////////////////// #include "WarnNoUndoCmd.h" -#include +#include
extern nl_catd catd; -#include "NLS.hh" - WarnNoUndoCmd::WarnNoUndoCmd ( char *name, char *label, int active) : AskFirstCmd ( name, label, active ) { _hasUndo = 0; // Specify that there is no undo - setQuestion ( GETMSG(catd, 1, 10, + setQuestion ( CATGETS(catd, 1, 10, "This command cannot be undone. Proceed anyway?") ); } diff --git a/cde/programs/dtmail/dtmail/AttachArea.C b/cde/programs/dtmail/dtmail/AttachArea.C index c22e4011f..65e6099da 100644 --- a/cde/programs/dtmail/dtmail/AttachArea.C +++ b/cde/programs/dtmail/dtmail/AttachArea.C @@ -385,18 +385,18 @@ void AttachArea::setAttachmentsLabel( ) if((last_displayCount == 0 && displayCount == 1) || (last_displayCount == 2 && displayCount == 1)) { - sprintf(c, GETMSG(DT_catd, 12, 1, "Attachment")); + sprintf(c, CATGETS(DT_catd, 12, 1, "Attachment")); XtVaSetValues(_attachments_label, XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1, NULL); } else if(last_displayCount == 1 && displayCount == 2) { - sprintf(c, GETMSG(DT_catd, 12, 2, "Attachments")); + sprintf(c, CATGETS(DT_catd, 12, 2, "Attachments")); XtVaSetValues(_attachments_label, XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1, NULL); } if(last_displayCount != displayCount) { - sprintf(c, GETMSG(DT_catd, 12, 3, "displayCount")); + sprintf(c, CATGETS(DT_catd, 12, 3, "displayCount")); XtVaSetValues(_no_attachments_label, XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1, NULL); @@ -610,9 +610,9 @@ AttachArea::addAttachment( bp = msg->newBodyPart(mail_error, lastAttBP); if (SafeAccess(filename, F_OK) != 0) { - sprintf(buf, GETMSG(DT_catd, 3, 34, "%s does not exist."), + sprintf(buf, CATGETS(DT_catd, 3, 34, "%s does not exist."), filename); - answer = this->handleErrorDialog(GETMSG(DT_catd, 1, 81, "Mailer"), + answer = this->handleErrorDialog(CATGETS(DT_catd, 1, 81, "Mailer"), buf); delete [] buf; delete [] errormsg; @@ -623,33 +623,33 @@ AttachArea::addAttachment( if(S_ISFIFO(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 12, 4, "Cannot attach FIFO files: %s"), filename); + CATGETS(DT_catd, 12, 4, "Cannot attach FIFO files: %s"), filename); validtype = FALSE; } else if(S_ISCHR(s.st_mode)) { sprintf( errormsg, - GETMSG(DT_catd, 12, 5, "Cannot attach character special files: %s"), filename + CATGETS(DT_catd, 12, 5, "Cannot attach character special files: %s"), filename ); validtype = FALSE; } else if(S_ISDIR(s.st_mode)) { sprintf( errormsg, - GETMSG(DT_catd, 12, 6, "Cannot attach directories: %s"), filename + CATGETS(DT_catd, 12, 6, "Cannot attach directories: %s"), filename ); validtype = FALSE; } else if(S_ISBLK(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 12, 7, "Cannot attach block special files: %s"), filename + CATGETS(DT_catd, 12, 7, "Cannot attach block special files: %s"), filename ); validtype = FALSE; } else if(S_ISSOCK(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 12, 8, "Cannot attach socket files: %s"), filename + CATGETS(DT_catd, 12, 8, "Cannot attach socket files: %s"), filename ); validtype = FALSE; } if(validtype == FALSE) { - answer = this->handleErrorDialog(GETMSG(DT_catd, 1, 81, "Mailer"), + answer = this->handleErrorDialog(CATGETS(DT_catd, 1, 81, "Mailer"), errormsg, NULL); delete [] buf; @@ -660,9 +660,9 @@ AttachArea::addAttachment( fd = SafeOpen(filename, O_RDONLY); if (fd < 0) { - sprintf(buf, GETMSG(DT_catd, 3, 35, "Unable to open %s."), filename); + sprintf(buf, CATGETS(DT_catd, 3, 35, "Unable to open %s."), filename); helpId = DTMAILHELPNOOPEN; - answer = this->handleErrorDialog(GETMSG(DT_catd, 1, 82, "Mailer"), + answer = this->handleErrorDialog(CATGETS(DT_catd, 1, 82, "Mailer"), buf, helpId); delete [] buf; @@ -686,9 +686,9 @@ AttachArea::addAttachment( if (!buffer) { sprintf(buf, "%s", - GETMSG(DT_catd, 3, 36, "Unable to allocate memory.")); + CATGETS(DT_catd, 3, 36, "Unable to allocate memory.")); helpId = DTMAILHELPNOALLOCMEM; - answer = this->handleErrorDialog(GETMSG(DT_catd, 1, 83, "Mailer"), + answer = this->handleErrorDialog(CATGETS(DT_catd, 1, 83, "Mailer"), buf, helpId); return(NULL); @@ -1170,7 +1170,7 @@ AttachArea::addToRowOfAttachmentsStatus() // Size of first label labelStr2 = XmStringCreateLocalized( - GETMSG(DT_catd, 3, 37, "Summary of attachments")); + CATGETS(DT_catd, 3, 37, "Summary of attachments")); _attachments_summary = XtCreateManagedWidget("Attachments_Summary", @@ -1276,7 +1276,7 @@ AttachArea::attachment_summary( char * tmp2; if ((live == 1) && (dead == 0)) { - tmp1 = GETMSG(DT_catd, 3, 38, "attachment"); + tmp1 = CATGETS(DT_catd, 3, 38, "attachment"); buf = new char[strlen(tmp1) + 64]; sprintf(buf, "%d %s", live, tmp1); } @@ -1284,13 +1284,13 @@ AttachArea::attachment_summary( /* NL_COMMENT * "attachments" is the plural form of "attachment". */ - tmp1 = GETMSG(DT_catd, 3, 39, "attachments"); + tmp1 = CATGETS(DT_catd, 3, 39, "attachments"); buf = new char[strlen(tmp1) + 64]; sprintf(buf, "%d %s", live, tmp1); } else if ((live >= 0) && (dead > 0)) { - tmp1 = GETMSG(DT_catd, 3, 40, "attachments"); - tmp2 = GETMSG(DT_catd, 3, 41, "deleted"); + tmp1 = CATGETS(DT_catd, 3, 40, "attachments"); + tmp2 = CATGETS(DT_catd, 3, 41, "deleted"); buf = new char[strlen(tmp1) + strlen(tmp2) + 64]; sprintf(buf, "%d %s, %d %s", live, tmp1, dead, tmp2); } diff --git a/cde/programs/dtmail/dtmail/AttachCmds.C b/cde/programs/dtmail/dtmail/AttachCmds.C index 34ff2ec12..04ee2c997 100644 --- a/cde/programs/dtmail/dtmail/AttachCmds.C +++ b/cde/programs/dtmail/dtmail/AttachCmds.C @@ -138,7 +138,7 @@ void AttachAddCmd::doit() break; } XtVaSetValues(XtParent(fsdialog), - XmNtitle, GETMSG(DT_catd, 14, 1, "Add Attachment"), + XmNtitle, CATGETS(DT_catd, 14, 1, "Add Attachment"), NULL); XtManageChild(fsdialog); } @@ -208,7 +208,7 @@ void AttachAddCmd::add_file( char *filename ) if(stat(filename, &s) == -1) { sprintf(errormsg, - GETMSG(DT_catd, 14, 2, "Unable to open %s"), + CATGETS(DT_catd, 14, 2, "Unable to open %s"), filename ); @@ -222,31 +222,31 @@ void AttachAddCmd::add_file( char *filename ) if(S_ISFIFO(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 14, 3, + CATGETS(DT_catd, 14, 3, "Cannot attach FIFO files: %s"), filename ); validtype = FALSE; } else if(S_ISCHR(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 14, 4, + CATGETS(DT_catd, 14, 4, "Cannot attach character special files: %s"), filename ); validtype = FALSE; } else if(S_ISDIR(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 14, 5, + CATGETS(DT_catd, 14, 5, "Cannot attach directories: %s"), filename ); validtype = FALSE; } else if(S_ISBLK(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 14, 6, + CATGETS(DT_catd, 14, 6, "Cannot attach block special files: %s"), filename ); validtype = FALSE; } else if(S_ISSOCK(s.st_mode)) { sprintf(errormsg, - GETMSG(DT_catd, 14, 7, + CATGETS(DT_catd, 14, 7, "Cannot attach socket files: %s"), filename ); validtype = FALSE; @@ -263,7 +263,7 @@ void AttachAddCmd::add_file( char *filename ) fd = open(filename, O_RDONLY); if(fd == -1) { sprintf(errormsg, - GETMSG(DT_catd, 14, 8, + CATGETS(DT_catd, 14, 8, "Unable to open %s"),filename ); @@ -352,7 +352,7 @@ void AttachFetchCmd::doit() // // If contents is NULL then we were unable to get the contents // if(contents == NULL) { // sprintf(error, -// GETMSG(DT_catd, 14, 9, +// CATGETS(DT_catd, 14, 9, // "File contents unavailable: %s"), // list[i]->getLabel() // ); @@ -460,7 +460,7 @@ AttachRenameCmd::AttachRenameCmd ( AttachArea *attachArea, XtVaSetValues(renameDialog, XmNselectionLabelString, message, NULL); XmStringFree(message); XtVaSetValues(XtParent(renameDialog), - XmNtitle, GETMSG(DT_catd, 14, 9, "Mailer - Rename Attachment"), + XmNtitle, CATGETS(DT_catd, 14, 9, "Mailer - Rename Attachment"), NULL); XtUnmanageChild( XmSelectionBoxGetChild(renameDialog, XmDIALOG_HELP_BUTTON) @@ -518,7 +518,7 @@ void AttachRenameCmd::ok( XtPointer callData ) if(_attachArea->getIconSelectedCount() != 1) { // theInfoDialogManager->post( -// GETMSG(DT_catd, 14, 12, +// CATGETS(DT_catd, 14, 12, // "Please select only one attachment to rename"), // (void *)NULL, // okcb); @@ -552,7 +552,7 @@ AttachDescriptionCmd::AttachDescriptionCmd ( AttachArea *attachArea, XtVaSetValues(descriptionDialog, XmNselectionLabelString, message, NULL); XmStringFree(message); XtVaSetValues(XtParent(descriptionDialog), - XmNtitle, GETMSG(DT_catd, 14, 10, "Description"), + XmNtitle, CATGETS(DT_catd, 14, 10, "Description"), NULL); XtUnmanageChild(XmSelectionBoxGetChild(descriptionDialog, XmDIALOG_HELP_BUTTON)); _attachArea->setDescriptionDialog(descriptionDialog); @@ -620,7 +620,7 @@ void AttachDescriptionCmd::ok( XtPointer callData ) if(_attachArea->getIconSelectedCount() != 1) { // theInfoDialogManager->post( -// GETMSG(DT_catd, 14, 12, +// CATGETS(DT_catd, 14, 12, // "Please select only one attachment to describe"), // (void *)NULL, // okcb); @@ -694,7 +694,7 @@ void AttachSaveAsCmd::doit() break; } XtVaSetValues(XtParent(fsdialog), - XmNtitle, GETMSG(DT_catd, 14, 11, "Save Attachment As"), + XmNtitle, CATGETS(DT_catd, 14, 11, "Save Attachment As"), NULL); XtManageChild(fsdialog); } @@ -754,7 +754,7 @@ void ConfirmCallback( XtPointer) // break; // case ROAM_UNAVAILABLE: // // theInfoDialogManager->post( -// // GETMSG(DT_catd, 14, 15, "File Contents Unavailable"), +// // CATGETS(DT_catd, 14, 15, "File Contents Unavailable"), // // (void *)NULL, // // (DialogCallback)okcb); // return; @@ -813,13 +813,13 @@ void AttachSaveAsCmd::ok( XtPointer callData ) // // to a single existing file then we barf! // if(_attachArea->getIconSelectedCount() != 1) { // sprintf(error, -// GETMSG(DT_catd, 14, 16, "Cannot create")); +// CATGETS(DT_catd, 14, 16, "Cannot create")); // sfs = CONFIRM; // } else { // // The file already exists // completefilename = dirname; // sprintf(error, -// GETMSG(DT_catd, 14, 17, +// CATGETS(DT_catd, 14, 17, // "File %s exists. Overwrite?"), // completefilename); // sfs = CONFIRM; @@ -831,7 +831,7 @@ void AttachSaveAsCmd::ok( XtPointer callData ) // if(stat(buf, &s) != -1) { // The file exists // if(S_ISREG(s.st_mode)) { // sprintf(error, -// GETMSG(DT_catd, 14, 18, +// CATGETS(DT_catd, 14, 18, // "File %s exists. Overwrite?"), // completefilename); // sfs = CONFIRM; @@ -839,7 +839,7 @@ void AttachSaveAsCmd::ok( XtPointer callData ) // // We're trying to overwrite something other // // than a regular file. FAIL! // sprintf(error, -// GETMSG(14, 19, "Cannot create")); +// CATGETS(14, 19, "Cannot create")); // sfs = CONFIRM; // } // } @@ -847,7 +847,7 @@ void AttachSaveAsCmd::ok( XtPointer callData ) // // The file already exists but is not a regular file // completefilename = dirname; // sprintf(error, -// GETMSG( +// CATGETS( // DT_catd, 14, 20, "Cannot create %s"), completefilename); // sfs = ERR; // } @@ -894,7 +894,7 @@ void AttachSaveAsCmd::ok( XtPointer callData ) // break; // case ROAM_UNAVAILABLE: // // theInfoDialogManager->post( -// // GETMSG(DT_catd, 14. 21, "File Contents Unavailable"), +// // CATGETS(DT_catd, 14. 21, "File Contents Unavailable"), // // (void *)NULL, (DialogCallback)okcb); // return; // } diff --git a/cde/programs/dtmail/dtmail/Attachment.C b/cde/programs/dtmail/dtmail/Attachment.C index 905bf43e0..b899bcf97 100644 --- a/cde/programs/dtmail/dtmail/Attachment.C +++ b/cde/programs/dtmail/dtmail/Attachment.C @@ -458,10 +458,10 @@ Attachment::invokeAction(int index) char *buf = new char[2048]; sprintf(buf, "%s", - GETMSG(DT_catd, 3, 81, "This attachment may contain commands that can cause serious\ndamage. It is recommended that you only execute it after you\nare certain it is safe to do so.\n\nPress OK if you are certain it is safe,\nCancel to cancel execution.")); + CATGETS(DT_catd, 3, 81, "This attachment may contain commands that can cause serious\ndamage. It is recommended that you only execute it after you\nare certain it is safe to do so.\n\nPress OK if you are certain it is safe,\nCancel to cancel execution.")); answer = parent()->handleQuestionDialog( - GETMSG(DT_catd, 1, 86, "Mailer"), + CATGETS(DT_catd, 1, 86, "Mailer"), buf, DTMAILHELPEXECUTEOK); delete [] buf; @@ -600,11 +600,11 @@ Attachment::saveToFile(DtMailEnv &, char *filename) if (SafeAccess(filename, F_OK) == 0) { - sprintf(buf, GETMSG(DT_catd, 3, 42, "%s already exists. Replace?"), + sprintf(buf, CATGETS(DT_catd, 3, 42, "%s already exists. Replace?"), filename); helpId = DTMAILHELPALREADYEXISTS; - answer = parent()->handleQuestionDialog(GETMSG(DT_catd, + answer = parent()->handleQuestionDialog(CATGETS(DT_catd, 1, 85, "Mailer"), buf, @@ -616,9 +616,9 @@ Attachment::saveToFile(DtMailEnv &, char *filename) } if (unlink(filename) < 0) { - sprintf(buf, GETMSG(DT_catd, 3, 43, "Unable to replace %s."), filename); + sprintf(buf, CATGETS(DT_catd, 3, 43, "Unable to replace %s."), filename); helpId = DTMAILHELPNOREPLACE; - answer = parent()->handleErrorDialog(GETMSG(DT_catd, + answer = parent()->handleErrorDialog(CATGETS(DT_catd, 1, 86, "Mailer"), buf, @@ -642,9 +642,9 @@ Attachment::saveToFile(DtMailEnv &, char *filename) // int fd = SafeOpen(filename, O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd < 0) { - sprintf(buf, GETMSG(DT_catd, 3, 44, "Unable to create %s."), filename); + sprintf(buf, CATGETS(DT_catd, 3, 44, "Unable to create %s."), filename); helpId = DTMAILHELPNOCREATE; - answer = parent()->handleErrorDialog(GETMSG(DT_catd, 1, 87, "Mailer"), + answer = parent()->handleErrorDialog(CATGETS(DT_catd, 1, 87, "Mailer"), buf, helpId); delete [] buf; @@ -652,10 +652,10 @@ Attachment::saveToFile(DtMailEnv &, char *filename) } if (SafeWrite(fd, _myContents, (unsigned int)_myContentsSize) < _myContentsSize) { - sprintf(buf, GETMSG(DT_catd, 3, 45, "Unable to create %s."), + sprintf(buf, CATGETS(DT_catd, 3, 45, "Unable to create %s."), filename); helpId = DTMAILHELPNOCREATE; - answer = parent()->handleErrorDialog(GETMSG(DT_catd, 1, 88, "Mailer"), + answer = parent()->handleErrorDialog(CATGETS(DT_catd, 1, 88, "Mailer"), buf, helpId); SafeClose(fd); @@ -887,10 +887,10 @@ Attachment::action( * Post a dialog explaining that the action was invalid */ sprintf(buf, "%s", - GETMSG( + CATGETS( DT_catd, 3, 91, "Cannot execute invalid action.")); - answer = parent()->handleErrorDialog(GETMSG(DT_catd, 1, 86, "Mailer"), + answer = parent()->handleErrorDialog(CATGETS(DT_catd, 1, 86, "Mailer"), buf); unregisterAction(id); @@ -902,9 +902,9 @@ Attachment::action( * Post a dialog explaining that the action failed. */ sprintf(buf, "%s", - GETMSG(DT_catd, 3, 92, "Executing action failed!")); + CATGETS(DT_catd, 3, 92, "Executing action failed!")); - answer = parent()->handleErrorDialog(GETMSG(DT_catd, 1, 86, "Mailer"), + answer = parent()->handleErrorDialog(CATGETS(DT_catd, 1, 86, "Mailer"), buf); unregisterAction(id); diff --git a/cde/programs/dtmail/dtmail/ComposeCmds.C b/cde/programs/dtmail/dtmail/ComposeCmds.C index df95f378c..1105f055a 100644 --- a/cde/programs/dtmail/dtmail/ComposeCmds.C +++ b/cde/programs/dtmail/dtmail/ComposeCmds.C @@ -238,7 +238,7 @@ ComposeFamily::Display_entire_msg(DtMailMessageHandle msgno, char *att; Editor *editor = compose->get_editor()->textEditor(); - att = GETMSG( + att = CATGETS( DT_catd, 1, 255, "------------------ Attachments ------------------\n"); @@ -348,8 +348,8 @@ ComposeCmd::doit() if (newsend == NULL) { DtMailGenDialog * dialog = _parent->genDialog(); - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 203, "Mailer"), - GETMSG(DT_catd, 1, 204, "Unable to create a compose window.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 203, "Mailer"), + CATGETS(DT_catd, 1, 204, "Unable to create a compose window.")); char * helpId = DTMAILHELPNOCOMPOSE; int answer = dialog->post_and_return(helpId); } @@ -387,8 +387,8 @@ ForwardCmd::doit() if ( newsend == NULL ) { DtMailGenDialog * dialog = _parent->genDialog(); - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 205, "Mailer"), - GETMSG(DT_catd, 1, 206, "Unable to create a compose window.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 205, "Mailer"), + CATGETS(DT_catd, 1, 206, "Unable to create a compose window.")); char * helpId = DTMAILHELPNOCOMPOSE; int answer = dialog->post_and_return(helpId); } @@ -469,8 +469,8 @@ ReplyCmd::doit() if ( newsend == NULL ) { DtMailGenDialog * dialog = _parent->genDialog(); - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 207, "Mailer"), - GETMSG(DT_catd, 1, 208, "Unable to create a compose window.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 207, "Mailer"), + CATGETS(DT_catd, 1, 208, "Unable to create a compose window.")); char * helpId = DTMAILHELPNOCOMPOSE; int answer = dialog->post_and_return(helpId); } @@ -613,8 +613,8 @@ ReplyAllCmd::doit() if ( newsend == NULL ) { dialog = _parent->genDialog(); - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 209, "Mailer"), - GETMSG(DT_catd, 1, 210, "Unable to create a compose window.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 209, "Mailer"), + CATGETS(DT_catd, 1, 210, "Unable to create a compose window.")); char * helpId = DTMAILHELPNOCOMPOSE; int answer = dialog->post_and_return(helpId); } @@ -768,8 +768,8 @@ TemplateCmd::doit() // int fd = SafeOpen(fullpath, O_RDONLY); if (fd < 0) { - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 211, "Mailer"), - GETMSG(DT_catd, 1, 212, "The template does not exist.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 211, "Mailer"), + CATGETS(DT_catd, 1, 212, "The template does not exist.")); char * helpId = DTMAILHELPNOTEMPLATE; int answer = dialog->post_and_return(helpId); free(fullpath); @@ -778,8 +778,8 @@ TemplateCmd::doit() struct stat buf; if (SafeFStat(fd, &buf) < 0) { - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 213, "Mailer"), - GETMSG(DT_catd, 1, 214, "The template appears to be corrupt.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 213, "Mailer"), + CATGETS(DT_catd, 1, 214, "The template appears to be corrupt.")); char * helpId = DTMAILHELPCORRUPTTEMPLATE; int answer = dialog->post_and_return(helpId); SafeClose(fd); @@ -798,8 +798,8 @@ TemplateCmd::doit() free_buf = 1; mbuf.buffer = new char[mbuf.size]; if (mbuf.buffer == NULL) { - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 215, "Mailer"), - GETMSG(DT_catd, 1, 216, "There is not enough memory to load the template.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 215, "Mailer"), + CATGETS(DT_catd, 1, 216, "There is not enough memory to load the template.")); char * helpId = DTMAILHELPNOMEMTEMPLATE; int answer = dialog->post_and_return(helpId); SafeClose(fd); @@ -808,8 +808,8 @@ TemplateCmd::doit() } if (SafeRead(fd, mbuf.buffer, (unsigned int)mbuf.size) < mbuf.size) { - dialog->setToErrorDialog(GETMSG(DT_catd, 1, 217, "Mailer"), - GETMSG(DT_catd, 1, 218, "The template appears to be corrupt.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 1, 217, "Mailer"), + CATGETS(DT_catd, 1, 218, "The template appears to be corrupt.")); char * helpId = DTMAILHELPERROR; int answer = dialog->post_and_return(helpId); SafeClose(fd); diff --git a/cde/programs/dtmail/dtmail/DmxPrintJob.C b/cde/programs/dtmail/dtmail/DmxPrintJob.C index 14ae8ec0f..ce251b7e6 100644 --- a/cde/programs/dtmail/dtmail/DmxPrintJob.C +++ b/cde/programs/dtmail/dtmail/DmxPrintJob.C @@ -214,13 +214,13 @@ DmxPrintJob::cancel(void) "Dialog", _parent->baseWidget()); char *errMsg = - GETMSG( + CATGETS( DT_catd, 21, 23, "The X Print Server is temporarily out of resources."); - genDialog->setToErrorDialog(GETMSG(DT_catd, 1, 6, "Mailer"), + genDialog->setToErrorDialog(CATGETS(DT_catd, 1, 6, "Mailer"), errMsg); - genDialog->post_and_return(GETMSG(DT_catd, 3, 9, "OK"), NULL); + genDialog->post_and_return(CATGETS(DT_catd, 3, 9, "OK"), NULL); delete genDialog; theRoamApp.setErrorPrintDisplay(NULL); @@ -416,19 +416,19 @@ DmxPrintJob::createOutputWidgets (void) char *errMsg = (char *) XtMalloc(1024); char *i18nMsg; - i18nMsg = GETMSG( + i18nMsg = CATGETS( DT_catd, 21, 2, "One of the following margin specifiers \n has incorrect syntax: \n %s \n %s \n %s \n %s \nContinue using default margins?" ); sprintf(errMsg, i18nMsg, top, right, bottom, left); genDialog->setToErrorDialog( - GETMSG(DT_catd, 21, 3, "Mailer"), + CATGETS(DT_catd, 21, 3, "Mailer"), errMsg); XtFree(errMsg); genDialog->post_and_return( - GETMSG(DT_catd, 21, 4, "OK"), + CATGETS(DT_catd, 21, 4, "OK"), NULL); delete genDialog; } @@ -471,7 +471,7 @@ DmxPrintJob::doPrint (void) // if (_parent != NULL) { char *buf = new char[1024]; - char *msg = GETMSG(DT_catd, 21, 1, "Printing %s ..."); + char *msg = CATGETS(DT_catd, 21, 1, "Printing %s ..."); sprintf(buf, msg, _filename); _parent->setStatus(buf); @@ -526,7 +526,7 @@ DmxPrintJob::doPrint (void) XFlush(XtDisplay(_pshell)); genDialog = new DtMailGenDialog("Dialog", w); - appmessage = (char *) GETMSG( + appmessage = (char *) CATGETS( DT_catd, 21, 14, "'Print to File' was unsuccessful."); @@ -548,11 +548,11 @@ DmxPrintJob::doPrint (void) } genDialog->setToErrorDialog( - GETMSG(DT_catd, 21, 3, "Mailer"), + CATGETS(DT_catd, 21, 3, "Mailer"), message); #if 0 genDialog->post_and_return( - GETMSG(DT_catd, 21, 4, "OK"), + CATGETS(DT_catd, 21, 4, "OK"), NULL); delete genDialog; #else @@ -887,7 +887,7 @@ DmxPrintJob::getPageHeaderString( { char *hdrstr = msg->getMessageHeader(DMXCC); - format = GETMSG(DT_catd, 21, 5, "Cc: %s"); + format = CATGETS(DT_catd, 21, 5, "Cc: %s"); buf = (char *) malloc(strlen(format) + strlen(hdrstr) + 1); if (buf != (char *) NULL) sprintf(buf, format, hdrstr); @@ -899,7 +899,7 @@ DmxPrintJob::getPageHeaderString( { char *hdrstr = msg->getMessageHeader(DMXDATE); - format = GETMSG(DT_catd, 21, 6, "Date: %s"); + format = CATGETS(DT_catd, 21, 6, "Date: %s"); buf = (char *) malloc(strlen(format) + strlen(hdrstr) + 1); if (buf != (char *) NULL) sprintf(buf, format, hdrstr); @@ -911,7 +911,7 @@ DmxPrintJob::getPageHeaderString( { char *hdrstr = msg->getMessageHeader(DMXFROM); - format = GETMSG(DT_catd, 21, 7, "From: %s"); + format = CATGETS(DT_catd, 21, 7, "From: %s"); buf = (char *) malloc(strlen(format) + strlen(hdrstr) + 1); if (buf != (char *) NULL) sprintf(buf, format, hdrstr); @@ -923,7 +923,7 @@ DmxPrintJob::getPageHeaderString( { char *hdrstr = msg->getMessageHeader(DMXSUBJ); - format = GETMSG(DT_catd, 21, 8, "Subject: %s"); + format = CATGETS(DT_catd, 21, 8, "Subject: %s"); buf = (char *) malloc(strlen(format) + strlen(hdrstr) + 1); if (buf != (char *) NULL) sprintf(buf, format, hdrstr); @@ -935,7 +935,7 @@ DmxPrintJob::getPageHeaderString( { char *hdrstr = msg->getMessageHeader(DMXTO); - format = GETMSG(DT_catd, 21, 9, "To: %s"); + format = CATGETS(DT_catd, 21, 9, "To: %s"); buf = (char *) malloc(strlen(format) + strlen(hdrstr) + 1); if (buf != (char *) NULL) sprintf(buf, format, hdrstr); @@ -948,7 +948,7 @@ DmxPrintJob::getPageHeaderString( // Allocate space for the format and the translated page number. // { - format = GETMSG(DT_catd, 21, 10, "Page %d of %d"); + format = CATGETS(DT_catd, 21, 10, "Page %d of %d"); buf = (char *) malloc(strlen(format) + 16); if (buf != (char *) NULL) sprintf(buf, format, _spool_npages_done, _spool_npages_total); @@ -961,7 +961,7 @@ DmxPrintJob::getPageHeaderString( { struct passwd *pw; - format = GETMSG(DT_catd, 21, 11, "Mail For: %s"); + format = CATGETS(DT_catd, 21, 11, "Mail For: %s"); pw = getpwuid(getuid()); buf = (char *) malloc(strlen(format) + strlen(pw->pw_name) + 1); if (buf != (char *) NULL) @@ -996,14 +996,14 @@ DmxPrintJob::finishedPrintToFile( { DtMailGenDialog *genDialog = new DtMailGenDialog("Dialog", w); - message = (char *) GETMSG( + message = (char *) CATGETS( DT_catd, 21, 14, "'Print to File' was unsuccessful."); genDialog->setToErrorDialog( - GETMSG(DT_catd, 21, 3, "Mailer"), + CATGETS(DT_catd, 21, 3, "Mailer"), message); genDialog->post_and_return( - GETMSG(DT_catd, 21, 4, "OK"), + CATGETS(DT_catd, 21, 4, "OK"), NULL); delete genDialog; } @@ -1011,15 +1011,15 @@ DmxPrintJob::finishedPrintToFile( { DtMailGenDialog *genDialog = new DtMailGenDialog("Dialog", w); - message = (char *) GETMSG( + message = (char *) CATGETS( DT_catd, 21, 15, "'Print to File' completed successfully"); genDialog->setToWarningDialog( - GETMSG(DT_catd, 21, 3, "Mailer"), + CATGETS(DT_catd, 21, 3, "Mailer"), message); genDialog->post_and_return( - GETMSG(DT_catd, 21, 4, "OK"), + CATGETS(DT_catd, 21, 4, "OK"), NULL); delete genDialog; } @@ -1084,7 +1084,7 @@ DmxPrintJob::pdmNotificationCB( case XmCR_PDM_START_ERROR: case XmCR_PDM_START_VXAUTH: case XmCR_PDM_START_PXAUTH: - message = (char *) GETMSG( + message = (char *) CATGETS( DT_catd, 21, 24, "Print Dialog Manager error - setup failed."); break; @@ -1099,10 +1099,10 @@ DmxPrintJob::pdmNotificationCB( "Dialog", thisJob->_parent->baseWidget()); genDialog->setToErrorDialog( - GETMSG(DT_catd, 21, 3, "Mailer"), + CATGETS(DT_catd, 21, 3, "Mailer"), message); genDialog->post_and_return( - GETMSG(DT_catd, 21, 25, "Continue"), + CATGETS(DT_catd, 21, 25, "Continue"), NULL); delete genDialog; } diff --git a/cde/programs/dtmail/dtmail/DmxPrintOptions.C b/cde/programs/dtmail/dtmail/DmxPrintOptions.C index f7a28e5f9..00aeaa964 100644 --- a/cde/programs/dtmail/dtmail/DmxPrintOptions.C +++ b/cde/programs/dtmail/dtmail/DmxPrintOptions.C @@ -251,7 +251,7 @@ DmxPrintOptions::DmxPrintOptions ( for (i=0; ibaseWidget(), @@ -387,7 +387,7 @@ DmxPrintOptions::DmxPrintOptions ( for (i=0; ibaseWidget(), @@ -703,19 +703,19 @@ DmxPrintOptions::isValidMarginSpec(PropUiItem* pui, void* data) { case DTPRINT_OPTION_MARGIN_TOP: i18nMsg = - GETMSG(DT_catd, 26, 1, "Top Margin specifier is invalid: "); + CATGETS(DT_catd, 26, 1, "Top Margin specifier is invalid: "); break; case DTPRINT_OPTION_MARGIN_RIGHT: i18nMsg = - GETMSG(DT_catd, 26, 2, "Right Margin specifier is invalid: "); + CATGETS(DT_catd, 26, 2, "Right Margin specifier is invalid: "); break; case DTPRINT_OPTION_MARGIN_BOTTOM: i18nMsg = - GETMSG(DT_catd, 26, 3, "Bottom Margin specifier is invalid: "); + CATGETS(DT_catd, 26, 3, "Bottom Margin specifier is invalid: "); break; case DTPRINT_OPTION_MARGIN_LEFT: i18nMsg = - GETMSG(DT_catd, 26, 4, "Left Margin specifier is invalid: "); + CATGETS(DT_catd, 26, 4, "Left Margin specifier is invalid: "); break; } errMsg = (char*) XtMalloc(strlen(i18nMsg) + strlen(marginSpec) + 1); diff --git a/cde/programs/dtmail/dtmail/DmxPrintSetup.C b/cde/programs/dtmail/dtmail/DmxPrintSetup.C index 9c9f74884..d41250ae0 100644 --- a/cde/programs/dtmail/dtmail/DmxPrintSetup.C +++ b/cde/programs/dtmail/dtmail/DmxPrintSetup.C @@ -286,7 +286,7 @@ DmxPrintSetup::attachPrintSetupDialog (void) dialog = XtParent(_dtprint_setup); if (NULL != dialog && XtIsShell(dialog)) { - char *title = (char*) GETMSG(DT_catd, 21, 21, "Mailer - Print Setup"); + char *title = (char*) CATGETS(DT_catd, 21, 21, "Mailer - Print Setup"); XtVaSetValues(dialog, XmNtitle, title, NULL); } else @@ -339,7 +339,7 @@ DmxPrintSetup::createPrintSetupDialog (Widget parent) widgets->dtprint_setup, NULL); - xms = XmStringCreateLocalized(GETMSG(DT_catd, 21, 12, "Print Separately")); + xms = XmStringCreateLocalized(CATGETS(DT_catd, 21, 12, "Print Separately")); widgets->print_separately_tb = XtVaCreateManagedWidget( "PrintSeparatelyTB", xmToggleButtonWidgetClass, @@ -351,7 +351,7 @@ DmxPrintSetup::createPrintSetupDialog (Widget parent) NULL); XmStringFree(xms); - xms = XmStringCreateLocalized(GETMSG(DT_catd, 21, 13, "Use Word Wrap")); + xms = XmStringCreateLocalized(CATGETS(DT_catd, 21, 13, "Use Word Wrap")); widgets->use_word_wrap_tb = XtVaCreateManagedWidget( "UseWordWrapTB", xmToggleButtonWidgetClass, @@ -365,7 +365,7 @@ DmxPrintSetup::createPrintSetupDialog (Widget parent) NULL); XmStringFree(xms); - xms = XmStringCreateLocalized(GETMSG(DT_catd, 21, 20, "More ...")); + xms = XmStringCreateLocalized(CATGETS(DT_catd, 21, 20, "More ...")); widgets->more_options_pb = XtVaCreateManagedWidget( "PrintOptionsPB", xmPushButtonWidgetClass, diff --git a/cde/programs/dtmail/dtmail/DtEditor.C b/cde/programs/dtmail/dtmail/DtEditor.C index d7a29016a..66d635d84 100644 --- a/cde/programs/dtmail/dtmail/DtEditor.C +++ b/cde/programs/dtmail/dtmail/DtEditor.C @@ -786,10 +786,10 @@ CDEM_DtWidgetEditor::modifyData( { if( !begin_ins_bracket) - begin_ins_bracket = GETMSG(DT_catd, 1, 201, + begin_ins_bracket = CATGETS(DT_catd, 1, 201, "\n------------- Begin Included Message -------------\n"); if(!end_ins_bracket) - end_ins_bracket = GETMSG(DT_catd, 1, 202, + end_ins_bracket = CATGETS(DT_catd, 1, 202, "\n------------- End Included Message -------------\n"); size_t begin_len = strlen(begin_ins_bracket); diff --git a/cde/programs/dtmail/dtmail/DtMailGenDialog.C b/cde/programs/dtmail/dtmail/DtMailGenDialog.C index cf46343e5..72527d3ac 100644 --- a/cde/programs/dtmail/dtmail/DtMailGenDialog.C +++ b/cde/programs/dtmail/dtmail/DtMailGenDialog.C @@ -236,7 +236,7 @@ DtMailGenDialog::okCallback(Widget w, XtPointer clientData, XtPointer cbs) obj->setToAboutDialog(); // char * helpId = "About"; char * helpId = NULL; - int answer = obj->post_and_return(GETMSG(DT_catd, 1, 180, "OK"), + int answer = obj->post_and_return(CATGETS(DT_catd, 1, 180, "OK"), helpId); } } @@ -441,8 +441,8 @@ DtMailGenDialog::post_and_return(char *helpId) // They may have been set via the overloaded post_and_return() // method before. Reset them to their default values... - okLabel = XmStringCreateLocalized(GETMSG(DT_catd, 1, 181, "OK")); - cancelLabel = XmStringCreateLocalized(GETMSG(DT_catd, 1, 182, "Cancel")); + okLabel = XmStringCreateLocalized(CATGETS(DT_catd, 1, 181, "OK")); + cancelLabel = XmStringCreateLocalized(CATGETS(DT_catd, 1, 182, "Cancel")); // Make sure the dialog exists, and that it is an XmMessageBox // or subclass, since the callbacks assume this widget type @@ -807,8 +807,8 @@ DtMailGenDialog::setToAboutDialog(void) if (NULL == ABOUT_TITLE) { char *version; - ABOUT_TITLE = GETMSG(DT_catd, 1, 235, "Mailer - About Mailer"); - version = GETMSG(DT_catd, 1, 236, "Mailer Version %d.%d.%d"); + ABOUT_TITLE = CATGETS(DT_catd, 1, 235, "Mailer - About Mailer"); + version = CATGETS(DT_catd, 1, 236, "Mailer Version %d.%d.%d"); DTMAIL_VERSION = new char [strlen(version) + 16]; sprintf( diff --git a/cde/programs/dtmail/dtmail/Editor.C b/cde/programs/dtmail/dtmail/Editor.C index 16e8e4be8..fcf6fb97c 100644 --- a/cde/programs/dtmail/dtmail/Editor.C +++ b/cde/programs/dtmail/dtmail/Editor.C @@ -109,12 +109,12 @@ Editor::set_message(DtMail::Message * msg, char * ins_bracket; switch (brackets) { case BF_FORWARD: - ins_bracket = GETMSG(DT_catd, 1, 195, "------------- Begin Forwarded Message -------------\n\n"); + ins_bracket = CATGETS(DT_catd, 1, 195, "------------- Begin Forwarded Message -------------\n\n"); break; case BF_INCLUDE: default: - ins_bracket = GETMSG(DT_catd, 1, 196, "------------- Begin Included Message -------------\n\n"); + ins_bracket = CATGETS(DT_catd, 1, 196, "------------- Begin Included Message -------------\n\n"); break; } @@ -265,7 +265,7 @@ Editor::set_message(DtMail::Message * msg, // of text checksums more. // //if (bp->checksum(error) == DtMailCheckBad) { - // *status_string = GETMSG(DT_catd, 1, -1, "Digital signature did not match."); + // *status_string = CATGETS(DT_catd, 1, -1, "Digital signature did not match."); //} } delete [] line; @@ -274,12 +274,12 @@ Editor::set_message(DtMail::Message * msg, char * ins_bracket; switch (brackets) { case BF_FORWARD: - ins_bracket = GETMSG(DT_catd, 1, 197, "------------- End Forwarded Message -------------\n\n"); + ins_bracket = CATGETS(DT_catd, 1, 197, "------------- End Forwarded Message -------------\n\n"); break; case BF_INCLUDE: default: - ins_bracket = GETMSG(DT_catd, 1, 198, "------------- End Included Message -------------\n\n"); + ins_bracket = CATGETS(DT_catd, 1, 198, "------------- End Included Message -------------\n\n"); break; } @@ -327,7 +327,7 @@ Editor::set_attachment( if ((format == IF_BRACKETED) && (brackets == BF_INCLUDE)) { char * ins_bracket = - GETMSG( + CATGETS( DT_catd, 1, 249, "------------- Begin Included Attachment -------------\n\n"); @@ -345,7 +345,7 @@ Editor::set_attachment( { if (NULL != indent_str) append_to_contents(indent_str, strlen(indent_str)); - input = GETMSG(DT_catd, 1, 251, " Attachment Name: "); + input = CATGETS(DT_catd, 1, 251, " Attachment Name: "); append_to_contents(input, strlen(input)); append_to_contents(name, strlen(name)); append_newline_to_contents(); @@ -355,7 +355,7 @@ Editor::set_attachment( { if (NULL != indent_str) append_to_contents(indent_str, strlen(indent_str)); - input = GETMSG(DT_catd, 1, 252, " Attachment DtType: "); + input = CATGETS(DT_catd, 1, 252, " Attachment DtType: "); append_to_contents(input, strlen(input)); append_to_contents(dttype, strlen(dttype)); append_newline_to_contents(); @@ -366,7 +366,7 @@ Editor::set_attachment( { if (NULL != indent_str) append_to_contents(indent_str, strlen(indent_str)); - input = GETMSG(DT_catd, 1, 253, "Attachment ContentType: "); + input = CATGETS(DT_catd, 1, 253, "Attachment ContentType: "); append_to_contents(input, strlen(input)); append_to_contents(mimetype, strlen(mimetype)); append_newline_to_contents(); @@ -376,7 +376,7 @@ Editor::set_attachment( { if (NULL != indent_str) append_to_contents(indent_str, strlen(indent_str)); - input = GETMSG(DT_catd, 1, 254, "Attachment Description: "); + input = CATGETS(DT_catd, 1, 254, "Attachment Description: "); append_to_contents(input, strlen(input)); append_to_contents(description, strlen(description)); append_newline_to_contents(); @@ -385,7 +385,7 @@ Editor::set_attachment( if ((format == IF_BRACKETED) && (brackets == BF_INCLUDE)) { char * ins_bracket = - GETMSG( + CATGETS( DT_catd, 1, 250, "------------- End Included Attachment -------------\n\n"); diff --git a/cde/programs/dtmail/dtmail/FindDialog.C b/cde/programs/dtmail/dtmail/FindDialog.C index 1275d82e3..02be08dba 100644 --- a/cde/programs/dtmail/dtmail/FindDialog.C +++ b/cde/programs/dtmail/dtmail/FindDialog.C @@ -149,7 +149,7 @@ FindDialog::FindDialog(RoamMenuWindow *parent) : Dialog("find", parent) // // Initialize the buttons. // - _buttonData[0].label = strdup(GETMSG(DT_catd, 1, 183, "Find")); + _buttonData[0].label = strdup(CATGETS(DT_catd, 1, 183, "Find")); _buttonData[0].callback = findCallback; _buttonData[0].data = (caddr_t) this; @@ -158,32 +158,32 @@ FindDialog::FindDialog(RoamMenuWindow *parent) : Dialog("find", parent) * NL_COMMENT * This is an obsolete message. Replaced by message 220 in set 1 */ - _buttonData[1].label = strdup(GETMSG(DT_catd, 1, 184, "Find & Select All")); + _buttonData[1].label = strdup(CATGETS(DT_catd, 1, 184, "Find & Select All")); #endif /* * NL_COMMENT * This message replaces message 184 in set 1 */ - _buttonData[1].label = strdup(GETMSG(DT_catd, 1, 220, "Select All")); + _buttonData[1].label = strdup(CATGETS(DT_catd, 1, 220, "Select All")); _buttonData[1].callback = findSelectAllCallback; _buttonData[1].data = (caddr_t) this; - _buttonData[2].label = strdup(GETMSG(DT_catd, 1, 185, "Clear")); + _buttonData[2].label = strdup(CATGETS(DT_catd, 1, 185, "Clear")); _buttonData[2].callback = clearCallback; _buttonData[2].data = (caddr_t) this; - _buttonData[3].label = strdup(GETMSG(DT_catd, 1, 186, "Close")); + _buttonData[3].label = strdup(CATGETS(DT_catd, 1, 186, "Close")); _buttonData[3].callback = closeCallback; _buttonData[3].data = (caddr_t) this; - _buttonData[4].label = strdup(GETMSG(DT_catd, 1, 187, "Help")); + _buttonData[4].label = strdup(CATGETS(DT_catd, 1, 187, "Help")); _buttonData[4].callback = HelpCB; _buttonData[4].data = (caddr_t) DTMAILFINDDIALOG; - _text_labels[0] = strdup(GETMSG(DT_catd, 1, 188, "To:")); - _text_labels[1] = strdup(GETMSG(DT_catd, 1, 189, "From:")); - _text_labels[2] = strdup(GETMSG(DT_catd, 1, 190, "Subject:")); - _text_labels[3] = strdup(GETMSG(DT_catd, 1, 191, "Cc:")); + _text_labels[0] = strdup(CATGETS(DT_catd, 1, 188, "To:")); + _text_labels[1] = strdup(CATGETS(DT_catd, 1, 189, "From:")); + _text_labels[2] = strdup(CATGETS(DT_catd, 1, 190, "Subject:")); + _text_labels[3] = strdup(CATGETS(DT_catd, 1, 191, "Cc:")); // These strings should not be translated. They are // the Motif names for the widgets that will be created (they are @@ -241,7 +241,7 @@ FindDialog::createWorkArea(Widget dialog) unsigned int offset; - _name = GETMSG(DT_catd, 1, 192, "Mailer - Find"); + _name = CATGETS(DT_catd, 1, 192, "Mailer - Find"); title(_name); @@ -333,8 +333,8 @@ FindDialog::createWorkArea(Widget dialog) } - XmString strForward = XmStringCreateLocalized(GETMSG(DT_catd, 1, 193, "Forward")); - XmString strBackward = XmStringCreateLocalized(GETMSG(DT_catd, 1, 194, "Backward")); + XmString strForward = XmStringCreateLocalized(CATGETS(DT_catd, 1, 193, "Forward")); + XmString strBackward = XmStringCreateLocalized(CATGETS(DT_catd, 1, 194, "Backward")); Widget fd_direction = XmVaCreateSimpleRadioBox(fd_form, @@ -478,7 +478,7 @@ FindDialog::findMatching(Boolean findAll) * when searching for a matching message. */ - setStatus(GETMSG(DT_catd, 1, 231, "Searching...")); + setStatus(CATGETS(DT_catd, 1, 231, "Searching...")); busyCursor(); theRoamApp.busyAllWindows(NULL); @@ -620,9 +620,9 @@ FindDialog::findMatching(Boolean findAll) * one. The %d is the number of messages that matched. */ if (matchCount == 1) { - strcpy(line, GETMSG(DT_catd, 1, 232, "1 message selected")); + strcpy(line, CATGETS(DT_catd, 1, 232, "1 message selected")); } else { - sprintf(line, GETMSG(DT_catd, 1, 233, "%d messages selected"), + sprintf(line, CATGETS(DT_catd, 1, 233, "%d messages selected"), matchCount); } setStatus(line); @@ -649,7 +649,7 @@ FindDialog::findMatching(Boolean findAll) * This string is displayed on the find dialog status line when * no matching messages were found. */ - setStatus(GETMSG(DT_catd, 1, 234, "No matches were found")); + setStatus(CATGETS(DT_catd, 1, 234, "No matches were found")); return(False); } diff --git a/cde/programs/dtmail/dtmail/MailMsg.h b/cde/programs/dtmail/dtmail/MailMsg.h index d4cb11699..ce4e1d3d9 100644 --- a/cde/programs/dtmail/dtmail/MailMsg.h +++ b/cde/programs/dtmail/dtmail/MailMsg.h @@ -43,7 +43,7 @@ #ifndef MAILMSG_H #define MAILMSG_H -#include +#include
#include
/* @@ -65,16 +65,9 @@ extern nl_catd DT_catd; /* Catgets file descriptor */ #ifdef XGETTEXT #define MAILMSG(msgid, str) dgettext(NL_SET, msgid, str) #else -#define MAILMSG(msgid, str) catgets(DT_catd, NL_SET, msgid, str) +#define MAILMSG(msgid, str) CATGETS(DT_catd, NL_SET, msgid, str) #endif -#ifdef hpV4 -#define GETMSG(DT_catd, NL_SET, msgid, str) _DtCatgetsCached(DT_catd, NL_SET, msgid, str) -#else -#define GETMSG(DT_catd, NL_SET, msgid, str) catgets(DT_catd, NL_SET, msgid, str) -#endif - - /* MailBox.C msgid 100 - 199 * MBOX_* */ diff --git a/cde/programs/dtmail/dtmail/MailRetrievalOptions.C b/cde/programs/dtmail/dtmail/MailRetrievalOptions.C index 06f9d21fb..75875808e 100644 --- a/cde/programs/dtmail/dtmail/MailRetrievalOptions.C +++ b/cde/programs/dtmail/dtmail/MailRetrievalOptions.C @@ -205,7 +205,7 @@ MailRetrievalOptions::MailRetrievalOptions ( XmNcolumns, 30, XmNvalue, "", NULL); - xms = XmStringCreateLocalized(GETMSG(DT_catd, 27, 18,"INBOX folder path:")); + xms = XmStringCreateLocalized(CATGETS(DT_catd, 27, 18,"INBOX folder path:")); _inboxpath_label = XtVaCreateManagedWidget( "InboxNameLabel", xmLabelWidgetClass, _form, @@ -266,7 +266,7 @@ MailRetrievalOptions::MailRetrievalOptions ( NULL); xms = XmStringCreateLocalized( - GETMSG(Dtb_project_catd, 2, 13, "Check for new mail every:")); + CATGETS(Dtb_project_catd, 2, 13, "Check for new mail every:")); _checkfornewmail_label = XtVaCreateManagedWidget( "CheckForNewMailLabel", xmLabelWidgetClass, _form, @@ -307,7 +307,7 @@ MailRetrievalOptions::MailRetrievalOptions ( NULL); xms = XmStringCreateLocalized( - GETMSG(DT_catd, 27, 6, "Automatic (system) delivery")); + CATGETS(DT_catd, 27, 6, "Automatic (system) delivery")); _system_tb = XtVaCreateManagedWidget( "SystemTB", xmToggleButtonGadgetClass, _form, @@ -355,7 +355,7 @@ MailRetrievalOptions::MailRetrievalOptions ( NULL); xms = XmStringCreateLocalized( - GETMSG(DT_catd, 27, 7, "Mail server retrieval")); + CATGETS(DT_catd, 27, 7, "Mail server retrieval")); _server_tb = XtVaCreateManagedWidget( "UseServerTB", xmToggleButtonGadgetClass, _server_frame, @@ -400,7 +400,7 @@ MailRetrievalOptions::MailRetrievalOptions ( for (int i=0; igetWidget(); if (text) inbox_path = XmTextFieldGetString(text); if (NULL == inbox_path || 0 == strlen(inbox_path)) - return GETMSG(DT_catd, 27, 17, "Null INBOX path."); + return CATGETS(DT_catd, 27, 17, "Null INBOX path."); tmp = (char*) malloc(strlen(inbox_path)+1); for (s=inbox_path, t=tmp; *s; s++) @@ -826,7 +826,7 @@ MailRetrievalOptions::isValidInboxPath(PropUiItem* pui, void* data) inbox_path = tmp; if (NULL == inbox_path || 0 == strlen(inbox_path)) - return GETMSG(DT_catd, 27, 17, "Null INBOX path."); + return CATGETS(DT_catd, 27, 17, "Null INBOX path."); if (isalpha(inbox_path[0])) { diff --git a/cde/programs/dtmail/dtmail/MsgScrollingList.C b/cde/programs/dtmail/dtmail/MsgScrollingList.C index a90a7d7bb..a5dbc0447 100644 --- a/cde/programs/dtmail/dtmail/MsgScrollingList.C +++ b/cde/programs/dtmail/dtmail/MsgScrollingList.C @@ -442,7 +442,7 @@ MsgScrollingList::load_headers( * There is only space to display 1 character. If "N" needs to be translated, * please make sure the translation is only 1 character. */ - new_status = XmStringCreateLocalized(GETMSG(DT_catd, 1, 110, "N")); + new_status = XmStringCreateLocalized(CATGETS(DT_catd, 1, 110, "N")); read_status = XmStringCreateLocalized(" "); #endif @@ -579,7 +579,7 @@ MsgScrollingList::load_headers( * There is only space to display 1 character. If "N" needs to be translated, * please make sure the translation is only 1 character. */ - new_status = XmStringCreateLocalized(GETMSG(DT_catd, 1, 111, "N")); + new_status = XmStringCreateLocalized(CATGETS(DT_catd, 1, 111, "N")); read_status = XmStringCreateLocalized(" "); #endif @@ -873,7 +873,7 @@ MsgScrollingList::deleteSelected(Boolean silent) * of the message that gets printed if more than one message * is moved. */ - str = GETMSG(DT_catd, 3, 84, "%d messages deleted"); + str = CATGETS(DT_catd, 3, 84, "%d messages deleted"); } else { @@ -883,7 +883,7 @@ MsgScrollingList::deleteSelected(Boolean silent) * form of the message that gets printed if only one message * is moved. */ - str = GETMSG(DT_catd, 3, 85, "%d message deleted"); + str = CATGETS(DT_catd, 3, 85, "%d message deleted"); } status_message = new char[strlen(str) + 10]; sprintf(status_message, str, position_count); @@ -954,8 +954,8 @@ MsgScrollingList::copySelected( DtMailGenDialog *dialog = _parent->genDialog(); dialog->setToErrorDialog( - GETMSG(DT_catd, 3, 50, "Mailer"), - GETMSG(DT_catd, 2, 16, "No message selected.")); + CATGETS(DT_catd, 3, 50, "Mailer"), + CATGETS(DT_catd, 2, 16, "No message selected.")); dialog->post_and_return(helpId); } return(1); @@ -968,7 +968,7 @@ MsgScrollingList::copySelected( // The following is an error message. "mailrc" is the name of the // mail resource file. Translate as appropriate. // - parent()->message(GETMSG(DT_catd, 2, 15,"Error - Unable to get mailrc.")); + parent()->message(CATGETS(DT_catd, 2, 15,"Error - Unable to get mailrc.")); return(1); } @@ -1060,7 +1060,7 @@ MsgScrollingList::copySelected( // mail folder. This is the plural form of the message that gets // printed if more than one message is moved. // - str = GETMSG(DT_catd, 3, 65, "%d messages moved to %s"); + str = CATGETS(DT_catd, 3, 65, "%d messages moved to %s"); } else { // NL_COMMENT // The following sentence means %d number of mail messages have @@ -1068,7 +1068,7 @@ MsgScrollingList::copySelected( // mail folder. This is the singular form of the message that // gets printed if only one message is moved. // - str = GETMSG(DT_catd, 3, 66, "%d message moved to %s"); + str = CATGETS(DT_catd, 3, 66, "%d message moved to %s"); } } else { @@ -1078,14 +1078,14 @@ MsgScrollingList::copySelected( // copied to the %s mail folder. This is the plural form of the // message that gets printed if more than one message is copied. // - str = GETMSG(DT_catd, 3, 67, "%d messages copied to %s"); + str = CATGETS(DT_catd, 3, 67, "%d messages copied to %s"); } else { // NL_COMMENT // The following sentence means %d number of mail messages have been // copied to the %s mail folder. This is the singular form of the // message that gets printed if only one message is copied. // - str = GETMSG(DT_catd, 3, 68, "%d message copied to %s"); + str = CATGETS(DT_catd, 3, 68, "%d message copied to %s"); } } @@ -1584,7 +1584,7 @@ MsgScrollingList::display_no_message() * No mail message has been selected by the user. */ - parent()->message(GETMSG(DT_catd, 2, 16, "No message selected.")); + parent()->message(CATGETS(DT_catd, 2, 16, "No message selected.")); _displayed_item_position = 0; _selected_item_position = 0; @@ -1642,7 +1642,7 @@ MsgScrollingList::viewInSeparateWindow(DtMailEnv &mail_error) * raised in front of existing windows so the user can see it. */ parent()->message( - GETMSG( + CATGETS( DT_catd, 3, 69, "View already exists. Raising it.")); newview->displayInCurrentWorkspace(); @@ -2056,7 +2056,7 @@ MsgScrollingList::undelete_messages(MsgHndArray *tmpMHlist) // gregl - new_status and read_status are not used in this function. // either comment them out (like I'm doing) or free them. // - new_status = XmStringCreateLocalized(GETMSG(DT_catd, 1, 112, "N")); + new_status = XmStringCreateLocalized(CATGETS(DT_catd, 1, 112, "N")); read_status = XmStringCreateLocalized(" "); #endif @@ -2174,7 +2174,7 @@ MsgScrollingList::undelete_last_deleted() * There is only space to display 1 character. If "N" needs to be translated, * please make sure the translation is only 1 character. */ - new_status = XmStringCreateLocalized(GETMSG(DT_catd, 1, 113, "N")); + new_status = XmStringCreateLocalized(CATGETS(DT_catd, 1, 113, "N")); read_status = XmStringCreateLocalized(" "); #endif @@ -2515,7 +2515,7 @@ MsgScrollingList::formatHeader(DtMailHeaderLine & info, attach_symbol[1] = 0; attachment_glyph = XmStringCreate((char *)attach_symbol, "attach"); no_attachment_glyph = XmStringCreateLocalized(" "); - new_status = XmStringCreateLocalized(GETMSG(DT_catd, 1, 114, "N")); + new_status = XmStringCreateLocalized(CATGETS(DT_catd, 1, 114, "N")); read_status = XmStringCreateLocalized(" "); } @@ -2621,14 +2621,14 @@ MsgScrollingList::formatHeader(DtMailHeaderLine & info, // Refer to strftime man page for explanation of the date format. now = time(NULL); if (USE_YEAR_FORMAT_SECONDS < now - ds.dtm_date) - dateformat = GETMSG(DT_catd, 1, 259, "%a %b %d %Y"); + dateformat = CATGETS(DT_catd, 1, 259, "%a %b %d %Y"); else { #ifdef sun - dateformat = GETMSG(DT_catd, 1, 260, "%a %b %d %k:%M"); + dateformat = CATGETS(DT_catd, 1, 260, "%a %b %d %k:%M"); #else - dateformat = GETMSG(DT_catd, 1, 261, "%a %b %d %H:%M"); + dateformat = CATGETS(DT_catd, 1, 261, "%a %b %d %H:%M"); #endif } @@ -2644,7 +2644,7 @@ MsgScrollingList::formatHeader(DtMailHeaderLine & info, memset(&epoch, 0, sizeof(tm)); /* Refer to strftime man page for explanation of the date format. */ - dateformat = GETMSG(DT_catd, 1, 259, "%a %b %d %Y"); + dateformat = CATGETS(DT_catd, 1, 259, "%a %b %d %Y"); SafeStrftime(date, BUFSIZ, dateformat, &epoch); } @@ -3000,12 +3000,12 @@ MsgScrollingList::layoutLabels() #ifdef sun SafeStrftime(buf, sizeof(buf), - GETMSG(DT_catd, 1, 222, "%a %b %d %k:%M"), + CATGETS(DT_catd, 1, 222, "%a %b %d %k:%M"), tm); #else SafeStrftime(buf, sizeof(buf), - GETMSG(DT_catd, 1, 223, "%a %b %d %H:%M"), + CATGETS(DT_catd, 1, 223, "%a %b %d %H:%M"), tm); #endif diff --git a/cde/programs/dtmail/dtmail/OptCmd.C b/cde/programs/dtmail/dtmail/OptCmd.C index 5ddf70905..0dc2e5235 100644 --- a/cde/programs/dtmail/dtmail/OptCmd.C +++ b/cde/programs/dtmail/dtmail/OptCmd.C @@ -89,7 +89,7 @@ ////////////////////////////////////////////////////////// #include #include -#include +#include
#include #include @@ -204,7 +204,7 @@ opt_help_button_CB(Widget wid, XtPointer clientData, XtPointer calldata) void OptCmd::create_dlog() { theRoamApp.busyAllWindows( - GETMSG(DT_catd, 3, 78, "Initializing Mail Options...")); + CATGETS(DT_catd, 3, 78, "Initializing Mail Options...")); // make a new widget structure _opt_dlog = (DtbOptionsDialogInfo)malloc(sizeof( @@ -216,7 +216,7 @@ void OptCmd::create_dlog() /* * 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); #ifdef NEVER // Not a fatal error @@ -347,16 +347,16 @@ options_set_category_pane( return; if (current_pane != NULL && props_changed) { - sprintf(buf, "%s", GETMSG(DT_catd, 15, 1, "You have made unsaved changes.\nYou may save your changes, discard your changes,\nor return to your previous place in the dialog.")); + sprintf(buf, "%s", CATGETS(DT_catd, 15, 1, "You have made unsaved changes.\nYou may save your changes, discard your changes,\nor return to your previous place in the dialog.")); cmd_ptr->genDialog()->setToQuestionDialog( - GETMSG(DT_catd, 5, 2, "Mailer"), + CATGETS(DT_catd, 5, 2, "Mailer"), buf); answer = cmd_ptr->genDialog()->post_and_return( - GETMSG(DT_catd, 15, 2, "Save"), - GETMSG(DT_catd, 1, 182, "Cancel"), - GETMSG(DT_catd, 15, 3, "Discard"), + CATGETS(DT_catd, 15, 2, "Save"), + CATGETS(DT_catd, 1, 182, "Cancel"), + CATGETS(DT_catd, 15, 3, "Discard"), DTMAILHELPERROR); if (answer == 1) { //Save @@ -451,7 +451,7 @@ void OptCmd::update_panes() // would like to reset. We need reset the subject back to the message // "Dtb_project_catd, 2, 68," - XtSetArg(args[0], XmNvalue, GETMSG(Dtb_project_catd, 2, 68, "Out of the office")); + XtSetArg(args[0], XmNvalue, CATGETS(Dtb_project_catd, 2, 68, "Out of the office")); if(tmp_ptr != NULL) XtVaSetValues(_opt_dlog->subject_tf, @@ -507,10 +507,10 @@ void OptCmd::update_source() char* helpId; int answer = 0; - genDialog()->setToErrorDialog(GETMSG(DT_catd, 2, 1, "Mailer"), - GETMSG(DT_catd, 2, 25, "There were unrecoverable syntax errors found in the ~/.mailrc file.\nMail options settings can be applied in the current session but can\nnot be saved to file.")); + genDialog()->setToErrorDialog(CATGETS(DT_catd, 2, 1, "Mailer"), + CATGETS(DT_catd, 2, 25, "There were unrecoverable syntax errors found in the ~/.mailrc file.\nMail options settings can be applied in the current session but can\nnot be saved to file.")); helpId = DTMAILHELPERROR; - genDialog()->post_and_return(GETMSG(DT_catd, 3, 5, "OK"), helpId); + genDialog()->post_and_return(CATGETS(DT_catd, 3, 5, "OK"), helpId); return; } else mail_rc->update(error); @@ -550,16 +550,16 @@ int OptCmd::doFileLockingCheck() if (is_set != use_file_locking) { - char *message = GETMSG(DT_catd, 2, 26, + char *message = CATGETS(DT_catd, 2, 26, "The value of the file locking option has changed.\nTo take immediate effect, folders need to be closed and reopened.\n o Click on 'Reopen' to reopen folders,\n making the new option take effect immediately.\n o Click on 'Continue' to avoid reopening folders.\n The new option will take effect the next time you open a folder.\n o Click on 'Cancel' to cancel the Apply and return to editing options."); genDialog()->setToQuestionDialog( - GETMSG(DT_catd, 2, 1, "Mailer"), + CATGETS(DT_catd, 2, 1, "Mailer"), message); answer = genDialog()->post_and_return( - GETMSG(DT_catd, 2, 27, "Reopen"), - GETMSG(DT_catd, 2, 29, "Cancel"), - GETMSG(DT_catd, 2, 28, "Continue"), + CATGETS(DT_catd, 2, 27, "Reopen"), + CATGETS(DT_catd, 2, 29, "Cancel"), + CATGETS(DT_catd, 2, 28, "Continue"), "AdvancedMailOptions"); // @@ -672,11 +672,11 @@ Boolean OptCmd::optionsAreValid() if (errMsg != NULL) { this->genDialog()->setToQuestionDialog( - GETMSG(DT_catd, 5, 2, "Mailer"), + CATGETS(DT_catd, 5, 2, "Mailer"), errMsg); answer = this->genDialog()->post_and_return( - GETMSG(DT_catd, 26, 5, "Continue"), + CATGETS(DT_catd, 26, 5, "Continue"), DTMAILHELPERROR); XtFree(errMsg); @@ -692,11 +692,11 @@ Boolean OptCmd::optionsAreValid() if (errMsg != NULL) { this->genDialog()->setToQuestionDialog( - GETMSG(DT_catd, 5, 2, "Mailer"), + CATGETS(DT_catd, 5, 2, "Mailer"), errMsg); answer = this->genDialog()->post_and_return( - GETMSG(DT_catd, 26, 5, "Continue"), + CATGETS(DT_catd, 26, 5, "Continue"), DTMAILHELPERROR); XtFree(errMsg); @@ -1128,7 +1128,7 @@ void OptCmd::init_advanced_pane() user_passwd = getpwuid(euid); // get passwd entry for user sprintf(label_str, "%s \"%s\" =", - GETMSG( DT_catd, 20, 2, "Use local name: "), user_passwd->pw_name); + CATGETS( DT_catd, 20, 2, "Use local name: "), user_passwd->pw_name); label_xm_str = XmStringCreateLocalized(label_str); diff --git a/cde/programs/dtmail/dtmail/RoamApp.C b/cde/programs/dtmail/dtmail/RoamApp.C index 45d1acab2..049742f31 100644 --- a/cde/programs/dtmail/dtmail/RoamApp.C +++ b/cde/programs/dtmail/dtmail/RoamApp.C @@ -380,7 +380,7 @@ int dieFromTtError(Tt_status errid, char *procname, char *errmsg, char *helpid) /* Do not die on warnings or TT_OK */ if ( tt_is_err(errid) ) { - char *title = GETMSG(DT_catd, 2, 1, "Mailer"); + char *title = CATGETS(DT_catd, 2, 1, "Mailer"); char *errmsg = tt_status_message(errid); DtMailEnv error; @@ -388,7 +388,7 @@ int dieFromTtError(Tt_status errid, char *procname, char *errmsg, char *helpid) error.logError( DTM_TRUE, - GETMSG(DT_catd, 2, 30, "%s returned ToolTalk error: %s\n"), + CATGETS(DT_catd, 2, 30, "%s returned ToolTalk error: %s\n"), procname, tt_status_message(errid)); DtMailGenDialog *exit_dialog = new DtMailGenDialog( @@ -396,7 +396,7 @@ int dieFromTtError(Tt_status errid, char *procname, char *errmsg, char *helpid) theApplication->baseWidget()); exit_dialog->setToErrorDialog(title, errmsg); if (NULL == helpid) helpid = DTMAILHELPERROR; - exit_dialog->post_and_return(GETMSG(DT_catd, 1, 1, "OK"), helpid); + exit_dialog->post_and_return(CATGETS(DT_catd, 1, 1, "OK"), helpid); XtRemoveAllCallbacks(theApplication->baseWidget(), XmNdestroyCallback); exit(1); @@ -925,12 +925,12 @@ void pspace_signal( int ) // Serious error here -- No Space on Filesystem -- sprintf(errMsg,"Insufficient paging space, \n Mailer cannot perform any operations.\n Please contact the System Administrator to \n correct the paging space problem "); genDialog->setToErrorDialog( - GETMSG(DT_catd, 1, 6, "Mailer"), + CATGETS(DT_catd, 1, 6, "Mailer"), errMsg); XtFree(errMsg); genDialog->post_and_return( - GETMSG(DT_catd, 3, 9, "OK"), + CATGETS(DT_catd, 3, 9, "OK"), NULL); delete genDialog; } @@ -1230,7 +1230,7 @@ void RoamApp::initialize(int *argcp, char **argv) roam_tt_procid = ttdt_open( &roam_tt_fd, "DTMAIL", "SunSoft", "%I", 1 ); dieFromTtError(tt_ptr_error(roam_tt_procid), "initialize.ttdt_open", - GETMSG(DT_catd, 2, 2, "ToolTalk is not initialized. Mailer cannot run without ToolTalk.\nTry starting /usr/dt/bin/dtsession, or contact your System Administrator."), + CATGETS(DT_catd, 2, 2, "ToolTalk is not initialized. Mailer cannot run without ToolTalk.\nTry starting /usr/dt/bin/dtsession, or contact your System Administrator."), DTMAILHELPCANTINITTOOLTALK); // This is for supporting old ptype where RFC_822_Message is @@ -1288,13 +1288,13 @@ void RoamApp::initialize(int *argcp, char **argv) "MailRcDialog", theApplication->baseWidget()); mailrc_dialog->setToQuestionDialog( - GETMSG(DT_catd, 2, 1, "Mailer"), - GETMSG(DT_catd, 2, 22, + CATGETS(DT_catd, 2, 1, "Mailer"), + CATGETS(DT_catd, 2, 22, "There were unrecoverable syntax errors found in the ~/.mailrc file.\nCheck for more messages on terminal. Fix the errors and restart dtmail.\nIf you choose to continue you will not be able to save any changes made\nin the options dialog to file.") ); helpId = DTMAILHELPERROR; answer = mailrc_dialog->post_and_return( - GETMSG(DT_catd, 2, 23, "Continue"), - GETMSG(DT_catd, 2, 24, "Exit"), + CATGETS(DT_catd, 2, 23, "Continue"), + CATGETS(DT_catd, 2, 24, "Exit"), helpId); if (answer == 2) { XtRemoveAllCallbacks( @@ -1330,19 +1330,19 @@ void RoamApp::initialize(int *argcp, char **argv) DtMailGenDialog *install_errDialog = new DtMailGenDialog("Dialog", theApplication->baseWidget()); - sprintf(buf, "%s", GETMSG(DT_catd, 2, 4, + sprintf(buf, "%s", CATGETS(DT_catd, 2, 4, "Mailer has not been properly installed,\n\ and cannot run because the execution group\n\ is incorrectly set.")); install_errDialog->setToErrorDialog( - GETMSG(DT_catd, 1, 6, "Mailer"), + CATGETS(DT_catd, 1, 6, "Mailer"), buf); // No choice at this state other than to OK. helpId = DTMAILHELPBADGROUPID; answer = install_errDialog->post_and_return( - GETMSG(DT_catd, 3, 9, "OK"), + CATGETS(DT_catd, 3, 9, "OK"), helpId); XtRemoveAllCallbacks( theApplication->baseWidget(), @@ -1355,7 +1355,7 @@ is incorrectly set.")); free((void*) value); _options = new OptCmd("Mail Options...", - GETMSG(DT_catd, 1, 2,"Mail Options..."), + CATGETS(DT_catd, 1, 2,"Mail Options..."), TRUE, _w); @@ -1364,7 +1364,7 @@ is incorrectly set.")); SendMsgDialog *compose = theCompose.getWin(); if (dead_letter) { - char *ttl = GETMSG(DT_catd, 1, 262, "Dead Letter Message"); + char *ttl = CATGETS(DT_catd, 1, 262, "Dead Letter Message"); compose->loadDeadLetter(dead_letter); compose->setTitle(ttl); compose->setIconTitle(ttl); @@ -1479,7 +1479,7 @@ is incorrectly set.")); // Get the vacation handle before the new RoamMenuWindow // This is for setting the Vacation title stripe on the window - _vacation = new VacationCmd("Vacation", GETMSG(DT_catd, 1, 3, "Vacation")); + _vacation = new VacationCmd("Vacation", CATGETS(DT_catd, 1, 3, "Vacation")); // DtMail only supports the "Mail" message. // If DtMail is started by ToolTalk, then we assume that the @@ -1559,7 +1559,7 @@ RoamApp::~RoamApp() } #endif - catclose(DT_catd); + CATCLOSE(DT_catd); if (_appTimeoutId) XtRemoveTimeOut(_appTimeoutId); } @@ -1724,11 +1724,11 @@ RoamApp::showBusyState( switch (busy_state) { case DtMailBusyState_AutoSave: - self->busyAllWindows(GETMSG(DT_catd, 3, 1, "Auto-saving...")); + self->busyAllWindows(CATGETS(DT_catd, 3, 1, "Auto-saving...")); break; case DtMailBusyState_NewMail: - self->busyAllWindows(GETMSG(DT_catd, 3, 86, "Checking for new mail...")); + self->busyAllWindows(CATGETS(DT_catd, 3, 86, "Checking for new mail...")); break; case DtMailBusyState_NotBusy: @@ -1782,7 +1782,7 @@ RoamApp::globalAddToCachedContainerList(char *destname) void RoamApp::globalPropChange(void) { - busyAllWindows(GETMSG(DT_catd, 1, 4, "Updating properties...")); + busyAllWindows(CATGETS(DT_catd, 1, 4, "Updating properties...")); for (int win = 0; win < _numWindows; win++) { _windows[win]->propsChanged(); @@ -2191,5 +2191,5 @@ void RoamApp::open_catalog() { Application::open_catalog(); // Open Motif Application message catalog file - DT_catd = catopen(DTMAIL_CAT, NL_CAT_LOCALE); // Open DtMail message catalog file + DT_catd = CATOPEN(DTMAIL_CAT, NL_CAT_LOCALE); // Open DtMail message catalog file } diff --git a/cde/programs/dtmail/dtmail/RoamCmds.C b/cde/programs/dtmail/dtmail/RoamCmds.C index 9a2719719..aae58f946 100644 --- a/cde/programs/dtmail/dtmail/RoamCmds.C +++ b/cde/programs/dtmail/dtmail/RoamCmds.C @@ -209,7 +209,7 @@ SearchCmd::doit() _menuwindow->normalCursor(); if (count == 0) { - _menuwindow->message(GETMSG(DT_catd, 3, 46, "Empty container")); + _menuwindow->message(CATGETS(DT_catd, 3, 46, "Empty container")); _done = TRUE; return; } @@ -833,7 +833,7 @@ UnifiedSelectFileCmd::unifiedFileSelected(char *selection) errmsg = (const char*) error; err = strdup(errmsg); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 48, "Mailer"), err); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 48, "Mailer"), err); answer = _genDialog->post_and_return(DTMAILHELPERROR); if (1 == answer) doit(); if (err) free(err); @@ -1154,7 +1154,7 @@ UnifiedSelectMailboxCmd::unifiedMailboxSelected( errmsg = (const char*) error; err = strdup(errmsg); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 48, "Mailer"), err); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 48, "Mailer"), err); answer = _genDialog->post_and_return(DTMAILHELPERROR); if (1 == answer) doit(); if (err) free(err); @@ -1213,7 +1213,7 @@ ContainerMenuCmd::doit() // Initialize mail_error. mail_error.clear(); - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 15, "Saving...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 15, "Saving...")); _menuwindow->mailbox()->save(); theRoamApp.unbusyAllWindows(); @@ -1432,7 +1432,7 @@ UndeleteCmd::doit() } // if (!_undelFromList) { _undelFromList = new UndelFromListDialog( - GETMSG(DT_catd, 1, 227, "Mailer - Deleted Messages"), + CATGETS(DT_catd, 1, 227, "Mailer - Deleted Messages"), _menuwindow); _undelFromList->initialize(); @@ -1496,7 +1496,7 @@ MoveCopyCmd::MoveCopyCmd( char *name, DtMailBoolean only_show_mailboxes) : UnifiedSelectMailboxCmd(name, label, - GETMSG(DT_catd, 1, 89, "Mailer - Other Mailboxes"), + CATGETS(DT_catd, 1, 89, "Mailer - Other Mailboxes"), "Move", active, move_callback, @@ -1539,7 +1539,7 @@ MoveCopyCmd::doit() if (!_fileBrowser) { UnifiedSelectMailboxCmd::doit(); // Customize buttons for MoveCopy dialog - move = XmStringCreateLocalized(GETMSG(DT_catd, 1, 90, "Move")); + move = XmStringCreateLocalized(CATGETS(DT_catd, 1, 90, "Move")); filter_button = XtNameToWidget(_fileBrowser, "*Apply"); _move_button = XtNameToWidget(_fileBrowser, "*OK"); @@ -1549,11 +1549,11 @@ MoveCopyCmd::doit() xmPushButtonWidgetClass, _fileBrowser, NULL); _copy_button = XtVaCreateManagedWidget( - GETMSG(DT_catd, 1, 237, "Copy"), + CATGETS(DT_catd, 1, 237, "Copy"), /*xmPushButtonWidgetClass, _fileBrowser,*/ xmPushButtonGadgetClass, _fileBrowser, XmNlabelString, - XmStringCreateLocalized(GETMSG(DT_catd, 1, 43, "Copy")), + XmStringCreateLocalized(CATGETS(DT_catd, 1, 43, "Copy")), NULL); printHelpId("Copy", _copy_button); // @@ -2084,7 +2084,7 @@ RelNoteCmd::doit() // _genDialog = new DtMailGenDialog("AboutBox", _parent->baseWidget()); // _genDialog->setToAboutDialog(); - // answer = _genDialog->post_and_return(GETMSG(DT_catd, 1, 92, "OK"), NULL); + // answer = _genDialog->post_and_return(CATGETS(DT_catd, 1, 92, "OK"), NULL); DisplayMain(_parent->baseWidget(), "Mailer", "_copyright"); } @@ -2248,7 +2248,7 @@ SaveAttachCmd::SaveAttachCmd ( char *name, :UnifiedSelectFileCmd (name, label, title, - GETMSG(DT_catd, 1, 93, "Save"), + CATGETS(DT_catd, 1, 93, "Save"), active, save_callback, clientData, @@ -2270,7 +2270,7 @@ SaveAttachCmd::SaveAttachCmd ( :UnifiedSelectFileCmd (name, label, title, - GETMSG(DT_catd, 1, 93, "Save"), + CATGETS(DT_catd, 1, 93, "Save"), active, save_callback, clientData, @@ -2292,7 +2292,7 @@ SaveAttachCmd::SaveAttachCmd ( :UnifiedSelectFileCmd (name, label, title, - GETMSG(DT_catd, 1, 93, "Save"), + CATGETS(DT_catd, 1, 93, "Save"), active, save_callback, clientData, @@ -2341,7 +2341,7 @@ SaveAsTextCmd::SaveAsTextCmd ( :UnifiedSelectFileCmd (name, label, title, - GETMSG(DT_catd, 1, 95, "Save"), + CATGETS(DT_catd, 1, 95, "Save"), active, fileCB, this, @@ -2363,7 +2363,7 @@ SaveAsTextCmd::SaveAsTextCmd ( :UnifiedSelectFileCmd (name, label, title, - GETMSG(DT_catd, 1, 95, "Save"), + CATGETS(DT_catd, 1, 95, "Save"), active, fileCB, this, @@ -2392,10 +2392,10 @@ SaveAsTextCmd::saveText(const char * filename) if (0 == status) { sprintf(buf, - GETMSG(DT_catd, 3, 47, "%s already exists.\nOverwrite?"), + CATGETS(DT_catd, 3, 47, "%s already exists.\nOverwrite?"), filename); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 3, 48, "Mailer"), buf); + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 48, "Mailer"), buf); helpId = DTMAILHELPERROR; answer = _genDialog->post_and_return(helpId); if (answer==2) { @@ -2406,10 +2406,10 @@ SaveAsTextCmd::saveText(const char * filename) if (unlink(filename) < 0) { sprintf(buf, - GETMSG(DT_catd, 3, 49, "Unable to overwrite %s.\n\ + CATGETS(DT_catd, 3, 49, "Unable to overwrite %s.\n\ Check file permissions and retry."), filename); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 50, "Mailer"), buf); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 50, "Mailer"), buf); helpId = DTMAILHELPNOOVERWRITE; _genDialog->post_and_return(helpId); delete [] buf; @@ -2421,8 +2421,8 @@ Check file permissions and retry."), int fd = SafeOpen(filename, O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd < 0) { - sprintf(buf, GETMSG(DT_catd, 3, 51, "Unable to create %s."), filename); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 52, "Mailer"), buf); + sprintf(buf, CATGETS(DT_catd, 3, 51, "Unable to create %s."), filename); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 52, "Mailer"), buf); helpId = DTMAILHELPNOCREATE; _genDialog->post_and_return(helpId); delete [] buf; @@ -2432,9 +2432,9 @@ Check file permissions and retry."), if (SafeWrite(fd, "\n", 1) < 1) { sprintf(buf, - GETMSG(DT_catd, 3, 53, "Unable to write to %s."), + CATGETS(DT_catd, 3, 53, "Unable to write to %s."), filename); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 54, "Mailer"), buf); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 54, "Mailer"), buf); helpId = DTMAILHELPNOWRITE; _genDialog->post_and_return(helpId); SafeClose(fd); @@ -2473,8 +2473,8 @@ SaveAsTextCmd::writeTextFromScrolledList(int fd) char *tmpdir = new char[MAXPATHLEN+1]; snprintf(tmpdir, MAXPATHLEN+1, "%s/%s", getenv("HOME"), DtPERSONAL_TMP_DIRECTORY); if ((tmppath = tempnam(tmpdir, "dtmail")) == NULL) { - snprintf(buf, sizeof(buf), GETMSG(DT_catd, 3, 51, "Unable to create %s."), tmpdir); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 52, "Mailer"), buf); + snprintf(buf, sizeof(buf), CATGETS(DT_catd, 3, 51, "Unable to create %s."), tmpdir); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 52, "Mailer"), buf); helpId = DTMAILHELPNOCREATE; _genDialog->post_and_return(helpId); delete [] tmpdir; @@ -2537,10 +2537,10 @@ SaveAsTextCmd::writeText(XtPointer filedes, char *text_buf) sprintf( buf, - GETMSG(DT_catd, 3, 53, "Unable to write to %s."), + CATGETS(DT_catd, 3, 53, "Unable to write to %s."), filename); helpId = DTMAILHELPNOWRITE; - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 56, "Mailer"), buf); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 56, "Mailer"), buf); _genDialog->post_and_return(helpId); #endif } @@ -2566,8 +2566,8 @@ SaveAsTextCmd::doit() DtMailGenDialog *dialog = _roam_menu_window->genDialog(); dialog->setToErrorDialog( - GETMSG(DT_catd, 3, 50, "Mailer"), - GETMSG(DT_catd, 2, 16, "No message selected.")); + CATGETS(DT_catd, 3, 50, "Mailer"), + CATGETS(DT_catd, 2, 16, "No message selected.")); dialog->post_and_return(NULL); return; @@ -2701,12 +2701,12 @@ RenameAttachCmd::RenameAttachCmd ( 0 ); - message = XmStringCreateLocalized(GETMSG(DT_catd, 1, 96, "Empty")); + message = XmStringCreateLocalized(CATGETS(DT_catd, 1, 96, "Empty")); XtVaSetValues(renameDialog, XmNselectionLabelString, message, NULL); XmStringFree(message); - XmString ok_str = XmStringCreateLocalized(GETMSG(DT_catd, 1, 97, "Rename")); + XmString ok_str = XmStringCreateLocalized(CATGETS(DT_catd, 1, 97, "Rename")); XtVaSetValues(XtParent(renameDialog), - XmNtitle, GETMSG(DT_catd, 1, 98, "Mailer - Rename"), + XmNtitle, CATGETS(DT_catd, 1, 98, "Mailer - Rename"), NULL); XtVaSetValues(renameDialog, XmNokLabelString, ok_str, @@ -2744,7 +2744,7 @@ void RenameAttachCmd::doit() renameDialog = aa->getRenameDialog(); - sprintf(buf, "%s", GETMSG(DT_catd, 3, 57, "Rename attachment as")); + sprintf(buf, "%s", CATGETS(DT_catd, 3, 57, "Rename attachment as")); message = XmStringCreateLocalized(buf); @@ -3493,9 +3493,9 @@ VacationCmd::handleForwardFile() else dialog = theRoamApp.genDialog(); - sprintf(error_buf, "%s", GETMSG(DT_catd, 1, 102, "You are already using the forwarding facility for\nsomething other than Vacation. While Vacation is\nrunning, Vacation will be appended to this other\nforwarding activity. Is it still OK to start Vacation?\0")); + sprintf(error_buf, "%s", CATGETS(DT_catd, 1, 102, "You are already using the forwarding facility for\nsomething other than Vacation. While Vacation is\nrunning, Vacation will be appended to this other\nforwarding activity. Is it still OK to start Vacation?\0")); - dialog->setToQuestionDialog(GETMSG(DT_catd, 1, 103, "Mailer"), + dialog->setToQuestionDialog(CATGETS(DT_catd, 1, 103, "Mailer"), error_buf); helpId = DTMAILHELPOKSTARTVACATION; @@ -3541,7 +3541,7 @@ VacationCmd::handleForwardFile() else dialog = theRoamApp.genDialog(); - sprintf(error_buf, "%s", GETMSG(DT_catd, 1, 104, "You are already running the vacation program in your .forward file.\nConsult documentation on how to stop it and remove it from your .forward file.\nTry this command after fixing that problem.\0")); + sprintf(error_buf, "%s", CATGETS(DT_catd, 1, 104, "You are already running the vacation program in your .forward file.\nConsult documentation on how to stop it and remove it from your .forward file.\nTry this command after fixing that problem.\0")); dialog->setToErrorDialog("Error", error_buf); helpId = DTMAILHELPREMOVEVACATION; @@ -3921,7 +3921,7 @@ VacationCmd::parseVacationMessage() if (SafeFStat(fd, &buf) < 0) { sprintf(dialog_text, "%s", - GETMSG(DT_catd, 1, 105, "Cannot open .vacation.msg file -- No write permission.")); + CATGETS(DT_catd, 1, 105, "Cannot open .vacation.msg file -- No write permission.")); dialog->setToQuestionDialog("Mailer", dialog_text); helpId = DTMAILHELPNOWRITEVACATION; answer = dialog->post_and_return(helpId); @@ -3949,8 +3949,8 @@ VacationCmd::parseVacationMessage() free_buf = 1; mbuf.buffer = new char[mbuf.size]; if (mbuf.buffer == NULL) { - dialog->setToErrorDialog(GETMSG(DT_catd, 3, 59, "No Memory"), - GETMSG(DT_catd, 3, 60, "There is not enough memory to load the existing .vacation.msg file.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 3, 59, "No Memory"), + CATGETS(DT_catd, 3, 60, "There is not enough memory to load the existing .vacation.msg file.")); helpId = DTMAILHELPNOLOADVACATION; answer = dialog->post_and_return(helpId); SafeClose(fd); @@ -3962,8 +3962,8 @@ VacationCmd::parseVacationMessage() } if (SafeRead(fd, mbuf.buffer, (unsigned int)mbuf.size) < mbuf.size) { - dialog->setToErrorDialog(GETMSG(DT_catd, 3, 61, "Mailer"), - GETMSG(DT_catd, 3, 62, "The existing .vacation.msg file appears to be corrupt.")); + dialog->setToErrorDialog(CATGETS(DT_catd, 3, 61, "Mailer"), + CATGETS(DT_catd, 3, 62, "The existing .vacation.msg file appears to be corrupt.")); helpId = DTMAILHELPCORRUPTVACATION; answer = dialog->post_and_return(helpId); SafeClose(fd); @@ -4107,7 +4107,7 @@ VacationCmd::handleMessageFile( if (msg_file_exists >= 0 && text_changed) { sprintf(dialog_text, "%s", - GETMSG(DT_catd, 1, 106, ".vacation.msg file exists. Replace with new text?")); + CATGETS(DT_catd, 1, 106, ".vacation.msg file exists. Replace with new text?")); dialog->setToQuestionDialog("Mailer", dialog_text); helpId = DTMAILHELPEXISTSVACATION; answer = dialog->post_and_return(helpId); @@ -4125,7 +4125,7 @@ VacationCmd::handleMessageFile( fd = SafeOpen(messagefile, O_WRONLY | O_CREAT); if (fd < 0) { sprintf(dialog_text, "%s", - GETMSG(DT_catd, 1, 107, "Cannot open .vacation.msg file -- No write permission.")); + CATGETS(DT_catd, 1, 107, "Cannot open .vacation.msg file -- No write permission.")); dialog->setToQuestionDialog("Mailer", dialog_text); helpId = DTMAILHELPERROR; answer = dialog->post_and_return(helpId); @@ -4142,7 +4142,7 @@ VacationCmd::handleMessageFile( * message that gets returned to the sender when vacation * is turned on. */ - subj = GETMSG(DT_catd, 1, 108, "I am on vacation"); + subj = CATGETS(DT_catd, 1, 108, "I am on vacation"); } else { buf.appendData("Subject: ", 9); buf.appendData(subj, strlen(subj)); @@ -4153,7 +4153,7 @@ VacationCmd::handleMessageFile( _subject = strdup(subj); if (!text) { - text = GETMSG(DT_catd, 1, 109, + text = CATGETS(DT_catd, 1, 109, "I'm on vacation.\nYour mail regarding \"$SUBJECT\" will be read when I return.\n"); } buf.appendData(text, strlen(text)); diff --git a/cde/programs/dtmail/dtmail/RoamMenuWindow.C b/cde/programs/dtmail/dtmail/RoamMenuWindow.C index 1c05b336c..bf6ed53b1 100644 --- a/cde/programs/dtmail/dtmail/RoamMenuWindow.C +++ b/cde/programs/dtmail/dtmail/RoamMenuWindow.C @@ -649,13 +649,13 @@ RoamMenuWindow::initialize() { fprintf( stderr, "%s", - GETMSG(DT_catd, 2, 3, + CATGETS(DT_catd, 2, 3, "Unable to initialize windows. Exiting.\n")); exit(1); } busyCursor(); - setStatus(GETMSG(DT_catd, 3, 2, "Initializing...")); + setStatus(CATGETS(DT_catd, 3, 2, "Initializing...")); // XInternAtom(XtDisplay(this->baseWidget()) ,"STRING", False); // XInternAtom(XtDisplay(this->baseWidget()) ,"MESSAGES", False); @@ -1530,18 +1530,18 @@ RoamMenuWindow::open( if (create_flag == DTM_FALSE) { sprintf(buf, - GETMSG(DT_catd, + CATGETS(DT_catd, 3, 3, "The mailbox %s does not exist.\nCreate a mailbox with this name?"), _mailbox_fullpath); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 4, "Mailer"), buf); helpId = DTMAILHELPERROR; - answer = _genDialog->post_and_return(GETMSG(DT_catd, + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 5, "OK"), - GETMSG(DT_catd, + CATGETS(DT_catd, 1, 5, "Cancel"), helpId); @@ -1560,15 +1560,15 @@ RoamMenuWindow::open( // The full file path is not valid so that we need flag // an error sprintf(buf, - GETMSG(DT_catd, + CATGETS(DT_catd, 3, 44, "Unable to create %s."), _mailbox_fullpath); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 4, "Mailer"), buf); helpId = DTMAILHELPNOCREATE; - answer = _genDialog->post_and_return(GETMSG(DT_catd, + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 5, "OK"), helpId); @@ -1581,17 +1581,17 @@ RoamMenuWindow::open( { // See if they want to take the lock. // sprintf(buf, -// GETMSG(DT_catd, 3, 6, "The mailbox %s is locked.\n\ +// CATGETS(DT_catd, 3, 6, "The mailbox %s is locked.\n\ // You can manually unlock the mailbox and try again\n\ // or contact your System Administrator."), // _mailbox_fullpath); // _genDialog->setToErrorDialog( -// GETMSG(DT_catd, 3, 7, "Mailer"), +// CATGETS(DT_catd, 3, 7, "Mailer"), // buf); // helpId = DTMAILHELPTAKELOCK; // _genDialog->post_and_return( -// GETMSG(DT_catd, 3, 8, "OK"), +// CATGETS(DT_catd, 3, 8, "OK"), // helpId); // error.setError(DTME_GetLockRefused); @@ -1608,20 +1608,20 @@ RoamMenuWindow::open( else if ((DTMailError_t)error == DTME_BadRunGroup) { - sprintf(buf, "%s", GETMSG(DT_catd, 2, 4, + sprintf(buf, "%s", CATGETS(DT_catd, 2, 4, "Mailer has not been properly installed,\n\ and cannot run because the execution group\n\ is incorrectly set.")); _genDialog->setToQuestionDialog( - GETMSG(DT_catd, 1, 6, "Mailer"), + CATGETS(DT_catd, 1, 6, "Mailer"), buf); // No choice at this state other than to OK. helpId = DTMAILHELPBADGROUPID; answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 9, "OK"), + CATGETS(DT_catd, 3, 9, "OK"), helpId); delete [] buf; return; @@ -1633,49 +1633,49 @@ is incorrectly set.")); * The %s is the name of the mailbox the user doesn't have * permission to view. */ - sprintf(buf, GETMSG(DT_catd, 2, 5, + sprintf(buf, CATGETS(DT_catd, 2, 5, "You do not have permission to view %s"), _mailbox_fullpath); _genDialog->setToQuestionDialog( - GETMSG(DT_catd, 1, 7, "Mailer"), + CATGETS(DT_catd, 1, 7, "Mailer"), buf); // No choice at this state other than to OK. helpId = DTMAILHELPNOVIEW; answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 10, "OK"), + CATGETS(DT_catd, 3, 10, "OK"), helpId); delete [] buf; return; } else if ((DTMailError_t)error == DTME_IsDirectory) { - sprintf(buf, GETMSG(DT_catd, 2, 6, + sprintf(buf, CATGETS(DT_catd, 2, 6, "The mailbox %s is a directory and can not be opened."), _mailbox_fullpath); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 1, 8, "Mailer"), + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 1, 8, "Mailer"), buf); helpId = DTMAILHELPDIRECTORYONLY; - answer = _genDialog->post_and_return(GETMSG(DT_catd, 3, 11, "OK"), + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 11, "OK"), helpId); delete [] buf; return; } else if ((DTMailError_t)error == DTME_AlreadyOpened) { - sprintf(buf, GETMSG(DT_catd,20,1, + sprintf(buf, CATGETS(DT_catd,20,1, "The mailbox %s is already open."), _mailbox_fullpath); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 1, 8, "Mailer"), + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 1, 8, "Mailer"), buf); // there is no help message for this error // open a defect and put helpId later helpId = NULL; - answer = _genDialog->post_and_return(GETMSG(DT_catd, 3, 11, "OK"), + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 11, "OK"), helpId); delete [] buf; return; @@ -1790,13 +1790,13 @@ RoamMenuWindow::propsChanged(void) displayInCurrentWorkspace(); sprintf( buf, "%s", - GETMSG(DT_catd, 99, 99,"The INBOX path has changed.\nReopen?")); + CATGETS(DT_catd, 99, 99,"The INBOX path has changed.\nReopen?")); _genDialog->setToQuestionDialog( - GETMSG(DT_catd, 3, 22, "Mailer"), + CATGETS(DT_catd, 3, 22, "Mailer"), buf); answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 29, "OK"), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 3, 29, "OK"), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPERROR); rmw = ses->getRMW(inbox_path); @@ -2119,7 +2119,7 @@ RoamMenuWindow::mapnotify() if (NULL != _msgsPopupMoveMenu) XtSetSensitive(_msgsPopupMoveMenu, FALSE); - char * readonly = GETMSG(DT_catd, 20, 3, "Read Only"); + char * readonly = CATGETS(DT_catd, 20, 3, "Read Only"); setTitle(readonly); } @@ -2224,7 +2224,7 @@ RoamMenuWindow::message( char *text ) XmString labelStr; if (text_size > 0) { - str = GETMSG(DT_catd, 3, 12, "%s"); + str = CATGETS(DT_catd, 3, 12, "%s"); buf = new char[strlen(str) + text_size + 1]; sprintf(buf, str, text); labelStr = XmStringCreateLocalized(buf); @@ -2283,7 +2283,7 @@ RoamMenuWindow::message_summary( mailrc->getValue(error, "nerdmode", &value); if (error.isSet()) { - str = GETMSG(DT_catd, 3, 13, "Message %d of %d, %d new, %d deleted"); + str = CATGETS(DT_catd, 3, 13, "Message %d of %d, %d new, %d deleted"); } else { str = "Message 0x%x of 0x%x, ignoring 0x%x, 0x%x forgotten"; @@ -2319,7 +2319,7 @@ RoamMenuWindow::message_selected( * "Message 3 of 10, 2 new, 6 deleted" * This means ??? -- Explain to translator. */ - str = GETMSG(DT_catd, 3, 14, "Message %d of %d, %d new, %d deleted"); + str = CATGETS(DT_catd, 3, 14, "Message %d of %d, %d new, %d deleted"); buf = new char[strlen(str) + 20]; sprintf(buf, str, msg_num, num_msgs, num_new, num_deleted); @@ -2395,7 +2395,7 @@ RoamMenuWindow::queryExpunge() if (NULL != _mailbox && _mailbox->mailBoxWritable(error) == DTM_TRUE) { - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 15, "Saving...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 15, "Saving...")); if (_list->get_num_deleted_messages()) { @@ -2443,21 +2443,21 @@ RoamMenuWindow::queryExpunge() */ _genDialog->setToQuestionDialog( #ifdef undef - GETMSG(DT_catd, 3, 16, "Mailer"), - GETMSG(DT_catd, 3, 17, "Destroy the messages you have marked\nfor deletion in this mailbox?")); + CATGETS(DT_catd, 3, 16, "Mailer"), + CATGETS(DT_catd, 3, 17, "Destroy the messages you have marked\nfor deletion in this mailbox?")); #endif // undef /* NL_COMMENT * This dialog comes up when the user tries to quit the * mailbox. The user is asked if they want to destroy * the deleted messages. */ - GETMSG(DT_catd, 3, 87, "Mailer - Close"), - GETMSG(DT_catd, 3, 88, "Destroy the deleted messages and close this mailbox?")); + CATGETS(DT_catd, 3, 87, "Mailer - Close"), + CATGETS(DT_catd, 3, 88, "Destroy the deleted messages and close this mailbox?")); char * helpId = DTMAILHELPDESTROYMARKMSG; int answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 89, "Destroy and Close"), - GETMSG(DT_catd, 3, 73, "Cancel"), - GETMSG(DT_catd, 3, 90, "Retain and Close"), + CATGETS(DT_catd, 3, 89, "Destroy and Close"), + CATGETS(DT_catd, 3, 73, "Cancel"), + CATGETS(DT_catd, 3, 90, "Retain and Close"), helpId); if (answer == 1) { @@ -2541,7 +2541,7 @@ RoamMenuWindow::quit(Boolean delete_win) char *msg; busyCursor(); - msg = GETMSG( + msg = CATGETS( DT_catd, 21, 22, "Close pending: waiting for task to terminate ..."); setStatus(msg); @@ -2573,7 +2573,7 @@ RoamMenuWindow::quit_silently() if (_mailbox->mailBoxWritable(error) == DTM_TRUE) { - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 15, "Saving...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 15, "Saving...")); if (_list->get_num_deleted_messages()) { // We need to deal with deleted messages, based on what the @@ -2622,7 +2622,7 @@ RoamMenuWindow::quit_silently() char *msg; busyCursor(); - msg = GETMSG( + msg = CATGETS( DT_catd, 21, 22, "Close pending: waiting for task to terminate ..."); setStatus(msg); @@ -2680,7 +2680,7 @@ void RoamMenuWindow::view_mail_file(char *filename, DtMailBoolean create) char *plus_filename = NULL; char *relative_filename = NULL; - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 20, "Opening mailbox...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 20, "Opening mailbox...")); // If the first character of destname is alphanumeric, we can // safely assume that it is relative to the root folder directory. @@ -2715,9 +2715,9 @@ void RoamMenuWindow::view_mail_file(char *filename, DtMailBoolean create) sprintf( buf, - GETMSG(DT_catd, 3, 3, "The mailbox %s does not exist.\nCreate a mailbox with this name?"), + CATGETS(DT_catd, 3, 3, "The mailbox %s does not exist.\nCreate a mailbox with this name?"), filename); - dialog->setToQuestionDialog(GETMSG(DT_catd, 3, 22, "Mailer"), buf); + dialog->setToQuestionDialog(CATGETS(DT_catd, 3, 22, "Mailer"), buf); answer = dialog->post_and_return(DTMAILHELPERROR); delete [] buf; if (2 == answer) goto do_unbusy; @@ -2749,7 +2749,7 @@ RoamMenuWindow::move_callback(void *client_data, char *selection) mail_error.clear(); RoamMenuWindow *obj = (RoamMenuWindow *) client_data; - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 15, "Saving...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 15, "Saving...")); obj->_mailbox->save(); theRoamApp.unbusyAllWindows(); @@ -2766,7 +2766,7 @@ RoamMenuWindow::copy_callback(void *client_data, char *selection) mail_error.clear(); RoamMenuWindow *obj = (RoamMenuWindow *) client_data; - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 15, "Saving...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 15, "Saving...")); obj->_mailbox->save(); theRoamApp.unbusyAllWindows(); @@ -2793,9 +2793,9 @@ RoamMenuWindow::create_new_container(char *filename) char *buf = new char[2048]; sprintf( buf, - GETMSG(DT_catd, 3, 21, "%s already exists.\nOverwrite?"), + CATGETS(DT_catd, 3, 21, "%s already exists.\nOverwrite?"), filename); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 3, 22, "Mailer"), buf); + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 22, "Mailer"), buf); answer = _genDialog->post_and_return(DTMAILHELPERROR); if (answer == 2) { delete [] buf; @@ -2805,11 +2805,11 @@ RoamMenuWindow::create_new_container(char *filename) if (unlink(filename) < 0) { sprintf(buf, - GETMSG(DT_catd, 3, 23, + CATGETS(DT_catd, 3, 23, "Unable to overwrite %s.\nCheck file permissions and retry."), filename); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 3, 24, "Mailer"), buf); + _genDialog->setToErrorDialog(CATGETS(DT_catd, 3, 24, "Mailer"), buf); (void) _genDialog->post_and_return(DTMAILHELPERROR); delete [] buf; return; @@ -2851,7 +2851,7 @@ RoamMenuWindow::addToRowOfButtons() _delete_button = new DeleteCmd ( "Delete", - GETMSG(DT_catd, 1, 9, "Delete"), + CATGETS(DT_catd, 1, 9, "Delete"), TRUE, this ); ci = new ButtonInterface (_rowOfButtons, _delete_button); w = ci->baseWidget(); @@ -2868,7 +2868,7 @@ RoamMenuWindow::addToRowOfButtons() _next_button = new NextCmd ( "Next", - GETMSG(DT_catd, 1, 10, "Next"), + CATGETS(DT_catd, 1, 10, "Next"), TRUE, this ); ci = new ButtonInterface (_rowOfButtons, _next_button); w = ci->baseWidget(); @@ -2887,7 +2887,7 @@ RoamMenuWindow::addToRowOfButtons() _previous_button = new PrevCmd ( "Previous", - GETMSG(DT_catd, 1, 11, "Previous"), + CATGETS(DT_catd, 1, 11, "Previous"), TRUE, this ); ci = new ButtonInterface (_rowOfButtons, _previous_button); w = ci->baseWidget(); @@ -2906,7 +2906,7 @@ RoamMenuWindow::addToRowOfButtons() _replySender_button = new ReplyCmd ( "Reply to Sender", - GETMSG(DT_catd, 1, 12, "Reply to Sender"), + CATGETS(DT_catd, 1, 12, "Reply to Sender"), TRUE, this, FALSE ); @@ -2926,7 +2926,7 @@ RoamMenuWindow::addToRowOfButtons() prev_widget = w; - _print_button = new PrintCmd ( "Print", GETMSG(DT_catd, 1, 13, "Print"), + _print_button = new PrintCmd ( "Print", CATGETS(DT_catd, 1, 13, "Print"), TRUE, TRUE, this); ci = new ButtonInterface (_rowOfButtons, _print_button); w = ci->baseWidget(); @@ -3000,7 +3000,7 @@ RoamMenuWindow::addToRowOfLabels(MsgScrollingList *msglist) XmStringFree(spaces); spaces = XmStringCreateLocalized(" "); - basexms = XmStringCreateLocalized(GETMSG(DT_catd, 1, 14, "Sender")); + basexms = XmStringCreateLocalized(CATGETS(DT_catd, 1, 14, "Sender")); _sender_xms = XmStringConcat(basexms, spaces); _sender_key_xms = XmStringConcat(basexms, spaces_arrow); XmStringFree(basexms); @@ -3029,7 +3029,7 @@ RoamMenuWindow::addToRowOfLabels(MsgScrollingList *msglist) // printHelpId("Sender", _sender_lbl); // XtAddCallback(_sender_lbl, XmNhelpCallback, HelpCB, helpId); - basexms = XmStringCreateLocalized(GETMSG(DT_catd, 1, 15, "Subject")); + basexms = XmStringCreateLocalized(CATGETS(DT_catd, 1, 15, "Subject")); _subject_xms = XmStringConcat(basexms, spaces); _subject_key_xms = XmStringConcat(basexms, spaces_arrow); XmStringFree(basexms); @@ -3058,7 +3058,7 @@ RoamMenuWindow::addToRowOfLabels(MsgScrollingList *msglist) // printHelpId("Subject", _subject_lbl); // XtAddCallback(_subject_lbl, XmNhelpCallback, HelpCB, helpId); - basexms = XmStringCreateLocalized(GETMSG(DT_catd, 1, 16,"Date and Time")); + basexms = XmStringCreateLocalized(CATGETS(DT_catd, 1, 16,"Date and Time")); _date_xms = XmStringConcat(basexms, spaces); _date_key_xms = XmStringConcat(basexms, spaces_arrow); XmStringFree(basexms); @@ -3087,7 +3087,7 @@ RoamMenuWindow::addToRowOfLabels(MsgScrollingList *msglist) // printHelpId("DateTime", _subject_lbl); // XtAddCallback(_date_lbl, XmNhelpCallback, HelpCB, helpId); - basexms = XmStringCreateLocalized(GETMSG(DT_catd, 1, 17, "Size")); + basexms = XmStringCreateLocalized(CATGETS(DT_catd, 1, 17, "Size")); _size_xms = XmStringConcat(basexms, spaces); _size_key_xms = XmStringConcat(basexms, spaces_arrow); XmStringFree(basexms); @@ -3132,11 +3132,11 @@ RoamMenuWindow::addToRowOfMessageStatus() // Size of first label - labelStr1 = XmStringCreateLocalized(GETMSG(DT_catd, 3, 25, + labelStr1 = XmStringCreateLocalized(CATGETS(DT_catd, 3, 25, "Loading container...")); labelStr2 = XmStringCreateLocalized( - GETMSG(DT_catd, 3, 26, "Folder Summary Information")); + CATGETS(DT_catd, 3, 26, "Folder Summary Information")); _message = XtCreateManagedWidget( "Message_Status_Text", xmLabelWidgetClass, @@ -3292,15 +3292,15 @@ RoamMenuWindow::createOpenContainerList(CmdList * open_container) _open_container_inbox = new OpenInboxCmd( "Inbox", - GETMSG(DT_catd, 1, 221, "Inbox"), + CATGETS(DT_catd, 1, 221, "Inbox"), (FALSE == this->inbox()), this); _open_container_other = new UnifiedSelectMailboxCmd( "Open", - GETMSG(DT_catd, 1, 246, "Other Mailboxes..."), - GETMSG(DT_catd, 1, 26, "Mailer - Open"), - GETMSG(DT_catd, 1, 27, "Open"), + CATGETS(DT_catd, 1, 246, "Other Mailboxes..."), + CATGETS(DT_catd, 1, 26, "Mailer - Open"), + CATGETS(DT_catd, 1, 27, "Open"), TRUE, RoamMenuWindow::file_selection_callback, this, @@ -3383,34 +3383,34 @@ RoamMenuWindow::construct_file_menu() // Create the "Container" item in the menubar. And fill // with items below the "Container" item in the menubar. - cmdList = new CmdList( "Mailbox", GETMSG(DT_catd, 1, 18, "Mailbox") ); + cmdList = new CmdList( "Mailbox", CATGETS(DT_catd, 1, 18, "Mailbox") ); _file_cmdlist = cmdList; _file_check_new_mail = new CheckForNewMailCmd( "Check for New Mail", - GETMSG(DT_catd, 1, 19, "Check for New Mail"), + CATGETS(DT_catd, 1, 19, "Check for New Mail"), TRUE, this); if (this->inbox()) { // Deactivate the Open Inbox item _file_open_inbox = new OpenInboxCmd( "Open Inbox", - GETMSG(DT_catd, 1, 20, "Open Inbox"), + CATGETS(DT_catd, 1, 20, "Open Inbox"), FALSE, this); } else { // Activate the Open Inbox item. _file_open_inbox = new OpenInboxCmd( "Open Inbox", - GETMSG(DT_catd, 1, 21, "Open Inbox"), + CATGETS(DT_catd, 1, 21, "Open Inbox"), TRUE, this); } _file_new_container = new UnifiedSelectMailboxCmd( "New...", - GETMSG(DT_catd, 1, 22, "New..."), - GETMSG(DT_catd, 1, 23, "Mailer - New"), - GETMSG(DT_catd, 1, 24, "New"), + CATGETS(DT_catd, 1, 22, "New..."), + CATGETS(DT_catd, 1, 23, "Mailer - New"), + CATGETS(DT_catd, 1, 24, "New"), TRUE, RoamMenuWindow::create_container_callback, this, @@ -3419,9 +3419,9 @@ RoamMenuWindow::construct_file_menu() #if defined(USE_OLD_FILE_OPEN) _file_open = new UnifiedSelectMailboxCmd( "Open...", - GETMSG(DT_catd, 1, 25, "Open..."), - GETMSG(DT_catd, 1, 26, "Mailer - Open"), - GETMSG(DT_catd, 1, 27, "Open"), + CATGETS(DT_catd, 1, 25, "Open..."), + CATGETS(DT_catd, 1, 26, "Mailer - Open"), + CATGETS(DT_catd, 1, 27, "Open"), TRUE, RoamMenuWindow::file_selection_callback, this, @@ -3430,12 +3430,12 @@ RoamMenuWindow::construct_file_menu() _open_container_cmdlist = new CmdList( "Open Container", - GETMSG(DT_catd, 1, 245, "Open")); + CATGETS(DT_catd, 1, 245, "Open")); createOpenContainerList(_open_container_cmdlist); _file_destroy_deleted_msgs = new DestroyCmd( "Destroy Deleted Message", - GETMSG(DT_catd, 1, 28, + CATGETS(DT_catd, 1, 28, "Destroy Deleted Messages"), TRUE, this); @@ -3443,7 +3443,7 @@ RoamMenuWindow::construct_file_menu() _file_quit = new QuitCmd ( "Close", - GETMSG(DT_catd, 1, 29, "Close"), + CATGETS(DT_catd, 1, 29, "Close"), TRUE, this); @@ -3490,7 +3490,7 @@ RoamMenuWindow::createCopyList(CmdList * copy_to) _copyto_inbox = new CopyToInboxCmd( "Inbox", - GETMSG(DT_catd, 1, 221, "Inbox"), + CATGETS(DT_catd, 1, 221, "Inbox"), TRUE, this); @@ -3516,7 +3516,7 @@ RoamMenuWindow::createCopyList(CmdList * copy_to) _move_copy_button = new MoveCopyCmd ( "Other Mailboxes...", - GETMSG(DT_catd, 1, 65, "Other Mailboxes..."), + CATGETS(DT_catd, 1, 65, "Other Mailboxes..."), TRUE, RoamMenuWindow::move_callback, RoamMenuWindow::copy_callback, @@ -3524,8 +3524,8 @@ RoamMenuWindow::createCopyList(CmdList * copy_to) this->baseWidget(), only_show_mailboxes); _copyto_other = new CopyCmd( - GETMSG(DT_catd, 1, 237, "Copy"), - GETMSG(DT_catd, 1, 65, "Other Mailboxes..."), + CATGETS(DT_catd, 1, 237, "Copy"), + CATGETS(DT_catd, 1, 65, "Other Mailboxes..."), TRUE, this, (MoveCopyCmd *) _move_copy_button); @@ -3605,55 +3605,55 @@ RoamMenuWindow::construct_message_menu() _msg_open = new OpenMsgCmd( "Open", - GETMSG(DT_catd, 1, 30, "Open"), + CATGETS(DT_catd, 1, 30, "Open"), TRUE, this); _msg_save_as = new SaveAsTextCmd ( "Save As Text...", - GETMSG(DT_catd, 1, 31, "Save As Text..."), - GETMSG(DT_catd, 1, 32, "Mailer - Message - Save As Text"), + CATGETS(DT_catd, 1, 31, "Save As Text..."), + CATGETS(DT_catd, 1, 32, "Mailer - Message - Save As Text"), TRUE, get_editor()->textEditor(), this, this->baseWidget()); - _copyto_cmdlist = new CmdList("Copy To", GETMSG(DT_catd, 1, 33, "Copy To")); + _copyto_cmdlist = new CmdList("Copy To", CATGETS(DT_catd, 1, 33, "Copy To")); createCopyList(_copyto_cmdlist); _msg_print = new PrintCmd( "Print...", - GETMSG(DT_catd, 1, 34, "Print..."), + CATGETS(DT_catd, 1, 34, "Print..."), TRUE, FALSE, this); _msg_find = new FindCmd ( "Find...", - GETMSG(DT_catd, 1, 35, "Find..."), + CATGETS(DT_catd, 1, 35, "Find..."), TRUE, this ); _msg_select_all = new SelectAllCmd ( "Select All", - GETMSG(DT_catd, 1, 36, "Select All"), + CATGETS(DT_catd, 1, 36, "Select All"), TRUE, this ); _msg_delete = new DeleteCmd( "Delete", - GETMSG(DT_catd, 1, 37, "Delete"), + CATGETS(DT_catd, 1, 37, "Delete"), TRUE, this); _msg_undelete_last = new UndeleteCmd ( "Undelete Last", - GETMSG(DT_catd, 1, 38, "Undelete Last"), + CATGETS(DT_catd, 1, 38, "Undelete Last"), TRUE, this, FALSE ); _msg_undelete_from_list = new UndeleteCmd( "Undelete From List...", - GETMSG(DT_catd, 1, 39, + CATGETS(DT_catd, 1, 39, "Undelete From List..."), TRUE, this, TRUE); // Message Menu - cmdList = new CmdList( "Message", GETMSG(DT_catd, 1, 40, "Message") ); + cmdList = new CmdList( "Message", CATGETS(DT_catd, 1, 40, "Message") ); _msg_cmdlist = cmdList; cmdList->add(_msg_open); @@ -3690,7 +3690,7 @@ RoamMenuWindow::construct_message_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Messages", - GETMSG(DT_catd, 1, 42, "Mailer - Messages"), TRUE); + CATGETS(DT_catd, 1, 42, "Mailer - Messages"), TRUE); _msgsPopup_separator = new SeparatorCmd( "Separator","Separator", TRUE ); _msgsPopup_cmdlist->add(title); _msgsPopup_cmdlist->add(_msgsPopup_separator); @@ -3729,19 +3729,19 @@ RoamMenuWindow::construct_edit_menu() _edit_copy = new EditCopyCmd( "Copy", - GETMSG(DT_catd, 1, 43, "Copy"), + CATGETS(DT_catd, 1, 43, "Copy"), TRUE, this ); _edit_select_all = new EditSelectAllCmd( "Select All", - GETMSG(DT_catd, 1, 44, "Select All"), + CATGETS(DT_catd, 1, 44, "Select All"), TRUE, this ); - cmdList = new CmdList("Edit", GETMSG(DT_catd, 1, 45, "Edit")); + cmdList = new CmdList("Edit", CATGETS(DT_catd, 1, 45, "Edit")); _edit_cmdlist = cmdList; cmdList->add(_edit_copy); @@ -3760,7 +3760,7 @@ RoamMenuWindow::construct_text_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Text", - GETMSG(DT_catd, 1, 46, "Mailer - Text"), TRUE); + CATGETS(DT_catd, 1, 46, "Mailer - Text"), TRUE); _textPopup_separator = new SeparatorCmd( "Separator","Separator", TRUE ); _textPopup_cmdlist->add(title); @@ -3784,46 +3784,46 @@ void RoamMenuWindow::construct_view_menu() _view_next = new NextCmd ( "Next", - GETMSG(DT_catd, 1, 47, "Next"), TRUE, this ); + CATGETS(DT_catd, 1, 47, "Next"), TRUE, this ); _view_previous = new PrevCmd ( "Previous", - GETMSG(DT_catd, 1, 48, "Previous"), TRUE, this ); + CATGETS(DT_catd, 1, 48, "Previous"), TRUE, this ); _view_abbrev_headers = new AbbrevHeadersCmd( "Abbreviated Headers", - GETMSG(DT_catd, 1, 49, "Abbreviated Headers"), + CATGETS(DT_catd, 1, 49, "Abbreviated Headers"), this); _view_sortTD = new SortCmd ("By Date/Time", - GETMSG(DT_catd, 1, 50, "By Date/Time"), + CATGETS(DT_catd, 1, 50, "By Date/Time"), TRUE, this, SortTimeDate); _view_sortSender = new SortCmd ("By Sender", - GETMSG(DT_catd, 1, 51, "By Sender"), + CATGETS(DT_catd, 1, 51, "By Sender"), TRUE, this, SortSender); _view_sortSubject = new SortCmd ("By Subject", - GETMSG(DT_catd, 1, 52, "By Subject"), + CATGETS(DT_catd, 1, 52, "By Subject"), TRUE, this, SortSubject); _view_sortSize = new SortCmd ("By Size", - GETMSG(DT_catd, 1, 53, "By Size"), + CATGETS(DT_catd, 1, 53, "By Size"), TRUE, this, SortSize); _view_sortStatus = new SortCmd ("By Status", - GETMSG(DT_catd, 1, 54, "By Status"), + CATGETS(DT_catd, 1, 54, "By Status"), TRUE, this, SortStatus); // View Menu - cmdList = new CmdList( "View", GETMSG(DT_catd, 1, 55, "View") ); + cmdList = new CmdList( "View", CATGETS(DT_catd, 1, 55, "View") ); _view_cmdlist = cmdList; cmdList->add(_view_next); @@ -3853,46 +3853,46 @@ RoamMenuWindow::construct_compose_menu() _comp_new = new ComposeCmd ( "New Message", - GETMSG(DT_catd, 1, 56, "New Message"), + CATGETS(DT_catd, 1, 56, "New Message"), TRUE, this ); _comp_new_include = new ForwardCmd ( "New, Include All", - GETMSG(DT_catd, 1, 57, "New, Include All"), + CATGETS(DT_catd, 1, 57, "New, Include All"), TRUE, this, FALSE ); _comp_forward = new ForwardCmd ( "Forward Message", - GETMSG(DT_catd, 1, 58, "Forward Message"), + CATGETS(DT_catd, 1, 58, "Forward Message"), TRUE, this, TRUE ); _comp_replySender = new ReplyCmd ( "Reply to Sender", - GETMSG(DT_catd, 1, 59, "Reply to Sender"), + CATGETS(DT_catd, 1, 59, "Reply to Sender"), TRUE, this, FALSE ); _comp_replyAll = new ReplyAllCmd ( "Reply to All", - GETMSG(DT_catd, 1, 60, "Reply to All"), + CATGETS(DT_catd, 1, 60, "Reply to All"), TRUE, this, FALSE ); _comp_replySinclude= new ReplyCmd ( "Reply to Sender, Include", - GETMSG(DT_catd, 1, 61, "Reply to Sender, Include"), + CATGETS(DT_catd, 1, 61, "Reply to Sender, Include"), TRUE, this, TRUE ); _comp_replyAinclude= new ReplyAllCmd ( "Reply to All, Include", - GETMSG(DT_catd, 1, 62, "Reply to All, Include"), + CATGETS(DT_catd, 1, 62, "Reply to All, Include"), TRUE, this, TRUE ); @@ -3900,7 +3900,7 @@ RoamMenuWindow::construct_compose_menu() // Compose Menu - cmdList = new CmdList( "Compose", GETMSG(DT_catd, 1, 63, "Compose") ); + cmdList = new CmdList( "Compose", CATGETS(DT_catd, 1, 63, "Compose") ); _comp_cmdlist = cmdList; cmdList->add(_comp_new); cmdList->add(_comp_new_include); @@ -3929,21 +3929,21 @@ RoamMenuWindow::construct_move_menu() if (_move_cmdlist != NULL) delete _move_cmdlist; - _move_cmdlist = new CmdList( "Move", GETMSG(DT_catd, 1, 64, "Move") ); + _move_cmdlist = new CmdList( "Move", CATGETS(DT_catd, 1, 64, "Move") ); _move_separator = new SeparatorCmd("Separator","Separator", TRUE ); _move_inbox = new MoveToInboxCmd( "Inbox", - GETMSG(DT_catd, 1, 221, "Inbox"), + CATGETS(DT_catd, 1, 221, "Inbox"), TRUE, this); // We expect _move_copy_button to have been initialized already when // we constructed the copy menu. _move_other = new MoveCmd( - GETMSG(DT_catd, 1, 90, "Move"), - GETMSG(DT_catd, 1, 65, "Other Mailboxes..."), + CATGETS(DT_catd, 1, 90, "Move"), + CATGETS(DT_catd, 1, 65, "Other Mailboxes..."), TRUE, this, (MoveCopyCmd *) _move_copy_button); @@ -4032,8 +4032,8 @@ RoamMenuWindow::construct_attachment_menu() _att_save = new SaveAttachCmd ( "Save As...", - GETMSG(DT_catd, 1, 66, "Save As..."), - GETMSG(DT_catd, 1, 67, "Mailer - Attachments - Save As"), + CATGETS(DT_catd, 1, 66, "Save As..."), + CATGETS(DT_catd, 1, 67, "Mailer - Attachments - Save As"), FALSE, RoamMenuWindow::save_attachment_callback, this, @@ -4041,14 +4041,14 @@ RoamMenuWindow::construct_attachment_menu() _att_select_all = new SelectAllAttachsCmd( "Select All", - GETMSG( + CATGETS( DT_catd, 1, 68, "Select All" ), this); _att_cmdlist = new CmdList( "Attachments", - GETMSG( + CATGETS( DT_catd, 1, 69, "Attachments" ) @@ -4070,7 +4070,7 @@ RoamMenuWindow::construct_attachment_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Attachments", - GETMSG(DT_catd, 1, 70, "Mailer - Attachments"), TRUE); + CATGETS(DT_catd, 1, 70, "Mailer - Attachments"), TRUE); _attPopup_separator = new SeparatorCmd( "Separator","Separator", TRUE ); _attPopup_cmdlist->add(title); @@ -4091,19 +4091,19 @@ RoamMenuWindow::construct_help_menu() // Separator for menu items _help_separator= new SeparatorCmd( "Separator","Separator", TRUE ); - _help_overview = new OnAppCmd("Overview", GETMSG(DT_catd, 1, 71, "Overview"), + _help_overview = new OnAppCmd("Overview", CATGETS(DT_catd, 1, 71, "Overview"), TRUE, this); - _help_tasks = new TasksCmd("Tasks", GETMSG(DT_catd, 1, 72, "Tasks"), + _help_tasks = new TasksCmd("Tasks", CATGETS(DT_catd, 1, 72, "Tasks"), TRUE, this); _help_reference = new ReferenceCmd("Reference", - GETMSG(DT_catd, 1, 73, "Reference"), + CATGETS(DT_catd, 1, 73, "Reference"), TRUE, this); - _help_on_item = new OnItemCmd("On Item", GETMSG(DT_catd, 1, 74, "On Item"), + _help_on_item = new OnItemCmd("On Item", CATGETS(DT_catd, 1, 74, "On Item"), TRUE, this); _help_using_help = new UsingHelpCmd("Using Help", - GETMSG(DT_catd, 1, 75, "Using Help"), + CATGETS(DT_catd, 1, 75, "Using Help"), TRUE, this); - cmdList = new CmdList( "Help", GETMSG(DT_catd, 1, 76, "Help") ); + cmdList = new CmdList( "Help", CATGETS(DT_catd, 1, 76, "Help") ); _help_cmdlist = cmdList; cmdList->add ( _help_overview ); @@ -4117,7 +4117,7 @@ RoamMenuWindow::construct_help_menu() cmdList->add ( _help_separator ); _help_about_mailer = new RelNoteCmd("About Mailer...", - GETMSG(DT_catd, 1, 77, "About Mailer..."), + CATGETS(DT_catd, 1, 77, "About Mailer..."), TRUE, this); cmdList->add ( _help_about_mailer ); @@ -4168,7 +4168,7 @@ RoamMenuWindow::load_mailbox( // Now load the messages into the scrolling list. // This will get the DtMailMessageHandles into the _msgs array and // it will also get their XmStrings into the CharArray of the _list. - theRoamApp.busyAllWindows(GETMSG(DT_catd, 3, 27, "Loading...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 3, 27, "Loading...")); // Call load_headers() to get the XmStrings into the XmList! @@ -4183,7 +4183,7 @@ RoamMenuWindow::load_mailbox( // If no messages if (count == 0) { - this->message(GETMSG(DT_catd, 3, 28, "Empty container")); + this->message(CATGETS(DT_catd, 3, 28, "Empty container")); setIconName(EmptyIcon); } @@ -4286,12 +4286,12 @@ RoamMenuWindow::syncViewAndStore( case DTMC_BADSTATE: - errmsg = GETMSG(DT_catd, 1, 238, "Mailer is confused about the state of this mailbox.\nIt may be that another process has rewritten this mailbox in an unexpected way.\n\nSelecting OK will cause the Mailer to close and reopen the mailbox.\nNOTE that any changes made to the mailbox since the last save may be lost."); + errmsg = CATGETS(DT_catd, 1, 238, "Mailer is confused about the state of this mailbox.\nIt may be that another process has rewritten this mailbox in an unexpected way.\n\nSelecting OK will cause the Mailer to close and reopen the mailbox.\nNOTE that any changes made to the mailbox since the last save may be lost."); this->_genDialog->setToErrorDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), errmsg); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 3, 29, "OK"), + CATGETS(DT_catd, 3, 29, "OK"), DTMAILHELPUNKNOWNSTATE); this->reopen_mail_file(); @@ -4301,13 +4301,13 @@ RoamMenuWindow::syncViewAndStore( case DTMC_ACCESSFAILED: - errmsg = GETMSG(DT_catd, 1, 239, "Mailer can no longer access this mailbox.\nIt may be that another process has deleted the mailbox file.\n\nSelecting OK will cause the Mailer to close and reopen the mailbox.\nNOTE that any changes made to the mailbox since the last save may be lost.\n\nSelecting CANCEL will leave the mailbox unchanged."); + errmsg = CATGETS(DT_catd, 1, 239, "Mailer can no longer access this mailbox.\nIt may be that another process has deleted the mailbox file.\n\nSelecting OK will cause the Mailer to close and reopen the mailbox.\nNOTE that any changes made to the mailbox since the last save may be lost.\n\nSelecting CANCEL will leave the mailbox unchanged."); this->_genDialog->setToErrorDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), errmsg); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 3, 29, "OK"), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 3, 29, "OK"), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPUNKNOWNSTATE); this->normalCursor(); if (answer == 1) @@ -4327,11 +4327,11 @@ RoamMenuWindow::syncViewAndStore( sprintf(buffer, "%s", errmsgarg); this->_genDialog->setToTextFieldDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), buffer, DTM_TRUE); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 3, 29, "Ok"), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 3, 29, "Ok"), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPUNKNOWNSTATE); this->normalCursor(); delete [] buffer; @@ -4356,15 +4356,15 @@ RoamMenuWindow::syncViewAndStore( char *buffer = new char[2048]; char *errmsgarg = va_arg(args, char*); - errmsg = GETMSG(DT_catd, 1, 256, "Mail server access failed:\n%s"); + errmsg = CATGETS(DT_catd, 1, 256, "Mail server access failed:\n%s"); sprintf(buffer, errmsg, errmsgarg); this->_genDialog->setToErrorDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), buffer); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 1, 257, "Options..."), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 1, 257, "Options..."), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPUNKNOWNSTATE); this->normalCursor(); delete [] buffer; @@ -4386,15 +4386,15 @@ RoamMenuWindow::syncViewAndStore( char *errmsgarg = va_arg(args, char*); errmsg = - GETMSG(DT_catd, 1, 258, "User Getmail command failed:\n%s"); + CATGETS(DT_catd, 1, 258, "User Getmail command failed:\n%s"); sprintf(buffer, errmsg, errmsgarg); this->_genDialog->setToErrorDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), buffer); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 1, 257, "Options..."), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 1, 257, "Options..."), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPUNKNOWNSTATE); this->normalCursor(); delete [] buffer; @@ -4426,11 +4426,11 @@ RoamMenuWindow::syncViewAndStore( sprintf(buffer, "%s", errmsgarg); this->_genDialog->setToErrorDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), buffer); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 1, 257, "Options..."), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 1, 257, "Options..."), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPUNKNOWNSTATE); this->normalCursor(); delete [] buffer; @@ -4447,14 +4447,14 @@ RoamMenuWindow::syncViewAndStore( case DTMC_INODECHANGED: - errmsg = GETMSG(DT_catd, 1, 240, "Mailer can no longer access this mailbox.\nAnother process has rewritten the mailbox file changing the inode.\n\nSelecting OK will cause the Mailer to close and reopen the mailbox.\nNOTE that any changes made to the mailbox since the last save may be lost.\n\nSelecting CANCEL will leave the mailbox unchanged."); + errmsg = CATGETS(DT_catd, 1, 240, "Mailer can no longer access this mailbox.\nAnother process has rewritten the mailbox file changing the inode.\n\nSelecting OK will cause the Mailer to close and reopen the mailbox.\nNOTE that any changes made to the mailbox since the last save may be lost.\n\nSelecting CANCEL will leave the mailbox unchanged."); this->_genDialog->setToErrorDialog( - GETMSG(DT_catd, 2, 10, "Mailer"), + CATGETS(DT_catd, 2, 10, "Mailer"), errmsg); answer = this->_genDialog->post_and_return( - GETMSG(DT_catd, 3, 29, "OK"), - GETMSG(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 3, 29, "OK"), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPUNKNOWNSTATE); this->normalCursor(); if (answer == 1) @@ -4477,10 +4477,10 @@ RoamMenuWindow::syncViewAndStore( // The file is lock by another mailer. // Should we ask for the lock? - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 3, 16, "Mailer"), - GETMSG(DT_catd, 3, 82, "Someone else is using this mailbox.\nWould you like to demand exclusive access?")); - answer = _genDialog->post_and_return(GETMSG(DT_catd, 3, 18, "OK"), - GETMSG(DT_catd, 3, 19, "Cancel"), DTMAILHELPTAKELOCK); + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 16, "Mailer"), + CATGETS(DT_catd, 3, 82, "Someone else is using this mailbox.\nWould you like to demand exclusive access?")); + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 18, "OK"), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPTAKELOCK); this->normalCursor(); if (answer == 1) { @@ -4493,10 +4493,10 @@ RoamMenuWindow::syncViewAndStore( // We are not able to obtain a TT lock on this folder, // ask user if he wants to open it as read only. - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 3, 16, "Mailer"), - GETMSG(DT_catd, 3, 83, "Mailer is unable to obtain exclusive access to this mailbox.\nWould you like to open this mailbox read-only?")); - answer = _genDialog->post_and_return(GETMSG(DT_catd, 3, 18, "OK"), - GETMSG(DT_catd, 3, 19, "Cancel"), + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 16, "Mailer"), + CATGETS(DT_catd, 3, 83, "Mailer is unable to obtain exclusive access to this mailbox.\nWould you like to open this mailbox read-only?")); + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 18, "OK"), + CATGETS(DT_catd, 3, 19, "Cancel"), DTMAILHELPOPENREADONLY); this->normalCursor(); if (answer == 1) { @@ -4508,11 +4508,11 @@ RoamMenuWindow::syncViewAndStore( case DTMC_READWRITEOVERRIDE: // We are not able to obtain a lock on this folder, // ask user if he wants to open it as read only. - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 3, 16, "Mailer"), - GETMSG(DT_catd, 3, 94, "Mailer is unable to obtain exclusive access to this\nmailbox because the system is not responding.\n\nFor this time only, you can choose to open this mailbox\nread-only, or to open it read-write without exclusive\naccess (use only if no one else is using this mailbox).")); - answer = _genDialog->post_and_return(GETMSG(DT_catd, 3, 95, "Read-only"), - GETMSG(DT_catd, 3, 19, "Cancel"), - GETMSG(DT_catd, 3, 96, "Read-Write"), + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 3, 16, "Mailer"), + CATGETS(DT_catd, 3, 94, "Mailer is unable to obtain exclusive access to this\nmailbox because the system is not responding.\n\nFor this time only, you can choose to open this mailbox\nread-only, or to open it read-write without exclusive\naccess (use only if no one else is using this mailbox).")); + answer = _genDialog->post_and_return(CATGETS(DT_catd, 3, 95, "Read-only"), + CATGETS(DT_catd, 3, 19, "Cancel"), + CATGETS(DT_catd, 3, 96, "Read-Write"), DTMAILHELPOPENREADWRITEOVERRIDE); this->normalCursor(); // Now the tricky part - since this method can only return @@ -4536,10 +4536,10 @@ RoamMenuWindow::syncViewAndStore( char *buffer = new char[2048]; char *lockpath = va_arg(args, char*); char *errormsg = va_arg(args, char*); - char *cancel = GETMSG(DT_catd, 3, 19, "Cancel"); - char *ok = GETMSG(DT_catd, 3, 18, "OK"); - char *mailer = GETMSG(DT_catd, 3, 16, "Mailer"); - char *msgfmt = GETMSG(DT_catd, 3, 97, "%s\n\nThis may indicate that another Mailer has opened\n%s\n\nYou may open this mailbox READ ONLY by choosing '%s'.\n\nOtherwise, you may choose '%s',\nmake sure that another Mailer has not opened this mailbox,\ndelete %s,\nand reopen this mailbox."); + char *cancel = CATGETS(DT_catd, 3, 19, "Cancel"); + char *ok = CATGETS(DT_catd, 3, 18, "OK"); + char *mailer = CATGETS(DT_catd, 3, 16, "Mailer"); + char *msgfmt = CATGETS(DT_catd, 3, 97, "%s\n\nThis may indicate that another Mailer has opened\n%s\n\nYou may open this mailbox READ ONLY by choosing '%s'.\n\nOtherwise, you may choose '%s',\nmake sure that another Mailer has not opened this mailbox,\ndelete %s,\nand reopen this mailbox."); // We are not able to obtain a .dtmail lock on this folder, // ask user if he wants to open it as read only. @@ -4620,7 +4620,7 @@ RoamMenuWindow::showConversionStatus( if ((now_complete > (previously_complete + 5)) || (now_complete == 100)) { - str = GETMSG(DT_catd, 1, 79, "Converting... %d percent complete"); + str = CATGETS(DT_catd, 1, 79, "Converting... %d percent complete"); // Estimate 4 characters for numbers and 1 null terminator. buf = new char[strlen(str) + 5]; sprintf(buf, str, now_complete); @@ -4720,11 +4720,11 @@ RoamMenuWindow::postErrorDialog( // Assume that the char *text that comes in has already // been processed for i18n. - _genDialog->setToErrorDialog(GETMSG(DT_catd, 2, 13, "Mailer"), + _genDialog->setToErrorDialog(CATGETS(DT_catd, 2, 13, "Mailer"), (char *)text_str); helpId = DTMAILHELPERROR; - int i = _genDialog->post_and_return(GETMSG(DT_catd, 3, 31, "OK"), helpId); + int i = _genDialog->post_and_return(CATGETS(DT_catd, 3, 31, "OK"), helpId); // Clear the Error mail_error.clear(); @@ -4766,7 +4766,7 @@ RoamMenuWindow::expunge(void) // First order of business - busy out active windows // theRoamApp.busyAllWindows( - GETMSG(DT_catd, 3, 32, "Destroying deleted messages...")); + CATGETS(DT_catd, 3, 32, "Destroying deleted messages...")); // Before changing the state of any deleted/undeleted lists, // perform the destroy deleted operation and make sure that @@ -4971,11 +4971,11 @@ RoamMenuWindow::save_selected_attachment( _genDialog->setToErrorDialog( - GETMSG(DT_catd, 1, 80, "Mailer"), - GETMSG(DT_catd, 2, 14, "An attachment needs to be selected before issuing the\n\"Save As\" command to save to a file.") ); + CATGETS(DT_catd, 1, 80, "Mailer"), + CATGETS(DT_catd, 2, 14, "An attachment needs to be selected before issuing the\n\"Save As\" command to save to a file.") ); helpId = DTMAILHELPSELECTATTACH; answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 33, "OK"), helpId ); + CATGETS(DT_catd, 3, 33, "OK"), helpId ); return; } @@ -5398,7 +5398,7 @@ RoamMenuWindow::setTitle(char *suffix) DtMailEnv mail_error; MailSession *ses = theRoamApp.session(); DtMail::Session *d_session = ses->session(); - char *prefix = GETMSG(DT_catd, 1, 6, "Mailer"); + char *prefix = CATGETS(DT_catd, 1, 6, "Mailer"); char *path = NULL; char *new_title; char *format; @@ -5434,7 +5434,7 @@ void RoamMenuWindow::setVacationTitle() { // Add "[Vacation]" to the title of the roam menu window - char *vacation = GETMSG(DT_catd, 1, 3, "Vacation"); + char *vacation = CATGETS(DT_catd, 1, 3, "Vacation"); setTitle(vacation); } @@ -5471,12 +5471,12 @@ Widget parent=NULL; sprintf(errMsg,"Insufficient space on %s filesystem. Dtmail unable to show any new \n messages, delete messages, or save further changes to the open \n mailbox. Please contact your System Administrator to correct the \n filesystem space problem.",fsname); free(fsname); genDialog->setToErrorDialog( - GETMSG(DT_catd, 1, 6, "Mailer"), + CATGETS(DT_catd, 1, 6, "Mailer"), errMsg); XtFree(errMsg); genDialog->post_and_return( - GETMSG(DT_catd, 3, 9, "OK"), + CATGETS(DT_catd, 3, 9, "OK"), NULL); delete genDialog; } diff --git a/cde/programs/dtmail/dtmail/SendMsgDialog.C b/cde/programs/dtmail/dtmail/SendMsgDialog.C index 93961b2eb..58ea50b45 100644 --- a/cde/programs/dtmail/dtmail/SendMsgDialog.C +++ b/cde/programs/dtmail/dtmail/SendMsgDialog.C @@ -286,7 +286,7 @@ _header_list(16) if (! isInitializedDefaultHeaderList) for (DefaultHeaders * hl = DefaultHeaderList; hl->dflt_label; hl++) { hl->label = - GETMSG(DT_catd, hl->msg_set, hl->msg_number, hl->dflt_label); + CATGETS(DT_catd, hl->msg_set, hl->msg_number, hl->dflt_label); isInitializedDefaultHeaderList = TRUE; } @@ -694,7 +694,7 @@ SendMsgDialog::doAutoSave(char *filename) DtMailEnv error; busyCursor(); - setStatus(GETMSG(DT_catd, 3, 70, "Writing dead letter...")); + setStatus(CATGETS(DT_catd, 3, 70, "Writing dead letter...")); updateMsgHnd(); @@ -945,16 +945,16 @@ SendMsgDialog::changeHeaderState(const char * name) if (!hl->value || strcmp(value, hl->value) != 0) { char *buf = new char[256]; sprintf(buf, - GETMSG(DT_catd, 2, 17, + CATGETS(DT_catd, 2, 17, "You have edited \"%s\". Delete anyway?"), hl->label); - _genDialog->setToWarningDialog(GETMSG(DT_catd, 3, 71, + _genDialog->setToWarningDialog(CATGETS(DT_catd, 3, 71, "Mailer"), buf); char * helpId = DTMAILHELPERROR; int answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 72, "OK"), - GETMSG(DT_catd, 3, 73, "Cancel"), + CATGETS(DT_catd, 3, 72, "OK"), + CATGETS(DT_catd, 3, 73, "Cancel"), helpId); delete [] buf; if (answer == 2) { @@ -973,13 +973,13 @@ SendMsgDialog::changeHeaderState(const char * name) if (hl->show == SMD_SHOWN) { XtUnmanageChild(hl->form_widget); hl->show = SMD_HIDDEN; - sprintf(label, "%s ", GETMSG(DT_catd, 1, 228, "Add")); + sprintf(label, "%s ", CATGETS(DT_catd, 1, 228, "Add")); } else { XtManageChild(hl->form_widget); hl->show = SMD_SHOWN; - sprintf(label, "%s ", GETMSG(DT_catd, 1, 229, "Delete")); + sprintf(label, "%s ", CATGETS(DT_catd, 1, 229, "Delete")); } justifyHeaders(); @@ -990,7 +990,7 @@ SendMsgDialog::changeHeaderState(const char * name) strcat(label, hl->label); strcat(label, ":"); char *button_name = new char[100]; - sprintf(button_name, "%s ", GETMSG(DT_catd, 1, 228, "Add")); + sprintf(button_name, "%s ", CATGETS(DT_catd, 1, 228, "Add")); strcat(button_name, hl->label); strcat(button_name, ":"); @@ -1061,7 +1061,7 @@ SendMsgDialog::sendmailErrorProc (int, int status, void *data) * There was an error in one or more of the email addresses. * Ask the user to type in a valid address and try again. */ - sprintf(buf, "%s", GETMSG(DT_catd, 5, 5, + sprintf(buf, "%s", CATGETS(DT_catd, 5, 5, "Some of the addresses in the message are incorrect,\n\ and do not refer to any known users in the system.\n\ Please make sure all of the addresses are valid and try again.")); @@ -1075,7 +1075,7 @@ Please make sure all of the addresses are valid and try again.")); * applications so there will be more memory available. */ - sprintf(buf, "%s", GETMSG(DT_catd, 5, 6, + sprintf(buf, "%s", CATGETS(DT_catd, 5, 6, "Mailer does not have enough memory\n\ available to send this message.\n\ Try quitting other applications and\n\ @@ -1090,7 +1090,7 @@ resend this message.")); * There was an error from the mail transport (sendmail). */ - sprintf(buf, "%s", GETMSG(DT_catd, 5, 7, + sprintf(buf, "%s", CATGETS(DT_catd, 5, 7, "An error occurred while trying to send your message.\n\ Check to make sure the message was received. If not,\n\ you may have to resend this message.")); @@ -1103,9 +1103,9 @@ you may have to resend this message.")); smd->_close_button->activate(); // popup the error dialog - smd->_genDialog->setToErrorDialog(GETMSG(DT_catd, 2, 21, "Mailer"), + smd->_genDialog->setToErrorDialog(CATGETS(DT_catd, 2, 21, "Mailer"), (char *) buf); - smd->_genDialog->post_and_return(GETMSG(DT_catd, 3, 76, "OK"), helpId); + smd->_genDialog->post_and_return(CATGETS(DT_catd, 3, 76, "OK"), helpId); delete [] buf; } @@ -1152,7 +1152,7 @@ SendMsgDialog::send_message(const char * trans_impl, int trans_type) if (!this->hasAddressee()) { // Message has no valid addressee. Pop up error dialog. - sprintf(buf, "%s", GETMSG(DT_catd, 5, 8, + sprintf(buf, "%s", CATGETS(DT_catd, 5, 8, "Try Send after specifying recipient(s) of the message in \nthe To:, Cc:, or Bcc: fields.")); helpId = DTMAILHELPNEEDADDRESSEE; @@ -1164,9 +1164,9 @@ SendMsgDialog::send_message(const char * trans_impl, int trans_type) _send_button->activate(); _close_button->activate(); - _genDialog->setToErrorDialog(GETMSG(DT_catd, 2, 21, "Mailer"), + _genDialog->setToErrorDialog(CATGETS(DT_catd, 2, 21, "Mailer"), (char *) buf); - _genDialog->post_and_return(GETMSG(DT_catd, 3, 76, "OK"), helpId); + _genDialog->post_and_return(CATGETS(DT_catd, 3, 76, "OK"), helpId); // Reset the flag before we return. _already_sending = FALSE; @@ -1196,7 +1196,7 @@ SendMsgDialog::send_message(const char * trans_impl, int trans_type) numPendingActions = attachArea->getNumPendingActions(); - sprintf(buf, "%s", GETMSG( + sprintf(buf, "%s", CATGETS( DT_catd, 3, 77, @@ -1215,7 +1215,7 @@ SendMsgDialog::send_message(const char * trans_impl, int trans_type) */ _genDialog->setToQuestionDialog( - GETMSG(DT_catd, 5, 1, "Mailer"), + CATGETS(DT_catd, 5, 1, "Mailer"), buf); helpId = DTMAILHELPPENDINGACTIONS; @@ -1329,7 +1329,7 @@ SendMsgDialog::popupMemoryError(DtMailEnv &error) * Mailer ran out of memory. Ask the user to quit some other * applications so there will be more memory available. */ - sprintf(buf, "%s", GETMSG(DT_catd, 5, 6, + sprintf(buf, "%s", CATGETS(DT_catd, 5, 6, "Mailer does not have enough memory\n\ available to send this message.\n\ Try quitting other applications and\n\ @@ -1351,9 +1351,9 @@ resend this message.")); _close_button->activate(); // popup the error dialog - this->_genDialog->setToErrorDialog(GETMSG(DT_catd, 2, 21, "Mailer"), + this->_genDialog->setToErrorDialog(CATGETS(DT_catd, 2, 21, "Mailer"), (char *) buf); - this->_genDialog->post_and_return(GETMSG(DT_catd, 3, 76, "OK"), + this->_genDialog->post_and_return(CATGETS(DT_catd, 3, 76, "OK"), helpId); } delete [] buf; @@ -1447,7 +1447,7 @@ SendMsgDialog::createWorkArea ( Widget parent ) // Create the Send and Close buttons as children of rowCol _send_button = new SendCmd ( "Send", - GETMSG(DT_catd, 1, 230, "Send"), + CATGETS(DT_catd, 1, 230, "Send"), TRUE, this, 1); @@ -1466,7 +1466,7 @@ SendMsgDialog::createWorkArea ( Widget parent ) _close_button = new CloseCmd ( "Close", - GETMSG(DT_catd, 1, 118, "Close"), + CATGETS(DT_catd, 1, 118, "Close"), TRUE, this->baseWidget(), this ); @@ -1508,7 +1508,7 @@ SendMsgDialog::createWorkArea ( Widget parent ) (void) XmProcessTraversal(hl->field_widget, XmTRAVERSE_CURRENT); // Set the title to be New Message - //char *ttl = GETMSG(DT_catd, 1, 119, "New Message"); + //char *ttl = CATGETS(DT_catd, 1, 119, "New Message"); //this->setTitle(ttl); //this->setIconTitle(ttl); @@ -1672,11 +1672,11 @@ SendMsgDialog::doDynamicHeaderMenus(void) switch(hl->show) { case SMD_SHOWN: - sprintf(label, "%s ", GETMSG(DT_catd, 1, 229, "Delete")); + sprintf(label, "%s ", CATGETS(DT_catd, 1, 229, "Delete")); break; case SMD_HIDDEN: - sprintf(label, "%s ", GETMSG(DT_catd, 1, 228, "Add")); + sprintf(label, "%s ", CATGETS(DT_catd, 1, 228, "Add")); break; default: @@ -1740,7 +1740,7 @@ SendMsgDialog::include_file( // I don't need to open the file to see if it's readable if loadFile() // returns error status. if ( (fp = fopen(selection, "r")) == NULL ) { - sprintf(buf, GETMSG(DT_catd, 2, 18, "Error: Cannot include file %s"), + sprintf(buf, CATGETS(DT_catd, 2, 18, "Error: Cannot include file %s"), selection); theInfoDialogManager->post( "Mailer", @@ -1785,10 +1785,10 @@ SendMsgDialog::confirm_add_attachment(char *file, int size) int answer; format = - GETMSG(DT_catd, 1, 263, + CATGETS(DT_catd, 1, 263, "The attachment '%s' is %d kilobytes.\nAdd as attachment?"); sprintf(buf, format, file, size/1024); - _genDialog->setToQuestionDialog(GETMSG(DT_catd, 5, 2, "Mailer"), buf); + _genDialog->setToQuestionDialog(CATGETS(DT_catd, 5, 2, "Mailer"), buf); answer = _genDialog->post_and_return(NULL); return (answer==1); } @@ -1877,11 +1877,11 @@ SendMsgDialog::save_selected_attachment( _genDialog->setToErrorDialog( - GETMSG(DT_catd, 1, 120, "Mailer"), - GETMSG(DT_catd, 2, 19, "An attachment needs to be selected before issuing the\n\"Save As\" command to save to a file.") ); + CATGETS(DT_catd, 1, 120, "Mailer"), + CATGETS(DT_catd, 2, 19, "An attachment needs to be selected before issuing the\n\"Save As\" command to save to a file.") ); helpId = DTMAILHELPSELECTATTACH; answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 74, "OK"), helpId ); + CATGETS(DT_catd, 3, 74, "OK"), helpId ); return; } @@ -2013,15 +2013,15 @@ SendMsgDialog::createMenuPanes() _separator = new SeparatorCmd( "Separator","Separator", TRUE ); // File - cmdList = new CmdList( "File", GETMSG(DT_catd, 1, 121, "File") ); + cmdList = new CmdList( "File", CATGETS(DT_catd, 1, 121, "File") ); // Default directory is set below at the same time as the default // directory for att_add. _file_include = new UnifiedSelectFileCmd ( "Include...", - GETMSG(DT_catd, 1, 122, "Include..."), - GETMSG(DT_catd, 1, 123, "Mailer - Include"), - GETMSG(DT_catd, 1, 124, "Include"), + CATGETS(DT_catd, 1, 122, "Include..."), + CATGETS(DT_catd, 1, 123, "Mailer - Include"), + CATGETS(DT_catd, 1, 124, "Include"), TRUE, SendMsgDialog::include_file_cb, this, @@ -2030,12 +2030,12 @@ SendMsgDialog::createMenuPanes() // Remap OK button to Include // XtVaSetValues(_file_include->fileBrowser, - // XmNokLabelString, GETMSG(DT_catd, + // XmNokLabelString, CATGETS(DT_catd, // 1, 77, "Include"), NULL); _file_save_as = new SaveAsTextCmd( "Save As Text...", - GETMSG(DT_catd, 1, 125, "Save As Text..."), - GETMSG(DT_catd, 1, 126, "Mailer - Save As Text"), + CATGETS(DT_catd, 1, 125, "Save As Text..."), + CATGETS(DT_catd, 1, 126, "Mailer - Save As Text"), TRUE, get_editor()->textEditor(), this, @@ -2043,13 +2043,13 @@ SendMsgDialog::createMenuPanes() _file_log = new LogMsgCmd ( "Log Message", - GETMSG(DT_catd, 1, 127, "Log Message"), TRUE, this); + CATGETS(DT_catd, 1, 127, "Log Message"), TRUE, this); // 1 for default transport. _file_send = new SendCmd ( "Send", - GETMSG(DT_catd, 1, 117, "Send"), + CATGETS(DT_catd, 1, 117, "Send"), TRUE, this, 1 ); @@ -2066,7 +2066,7 @@ SendMsgDialog::createMenuPanes() CmdList *subcmdList1 = new CmdList ( "Send As", - GETMSG(DT_catd, 1, 128, "Send As") ); + CATGETS(DT_catd, 1, 128, "Send As") ); d_session = theRoamApp.session()->session(); const char **impls = d_session->enumerateImpls(error); @@ -2090,7 +2090,7 @@ SendMsgDialog::createMenuPanes() _file_close = new CloseCmd ( "Close", - GETMSG(DT_catd, 1, 129, "Close"), + CATGETS(DT_catd, 1, 129, "Close"), TRUE, _menuBar->baseWidget(), this ); @@ -2116,56 +2116,56 @@ SendMsgDialog::createMenuPanes() // Edit - cmdList = new CmdList( "Edit", GETMSG(DT_catd, 1, 130, "Edit") ); + cmdList = new CmdList( "Edit", CATGETS(DT_catd, 1, 130, "Edit") ); _edit_undo = new EditUndoCmd ( "Undo", - GETMSG(DT_catd, 1, 131, "Undo"), + CATGETS(DT_catd, 1, 131, "Undo"), TRUE, this ); _edit_cut = new EditCutCmd ( "Cut", - GETMSG(DT_catd, 1, 132, "Cut"), + CATGETS(DT_catd, 1, 132, "Cut"), TRUE, this ); _edit_copy = new EditCopyCmd ( "Copy", - GETMSG(DT_catd, 1, 133, "Copy"), + CATGETS(DT_catd, 1, 133, "Copy"), TRUE, this ); _edit_paste = new EditPasteCmd ( "Paste", - GETMSG(DT_catd, 1, 134 , "Paste"), + CATGETS(DT_catd, 1, 134 , "Paste"), TRUE, this ); // Begin Paste Special submenu - subcmdList1 = new CmdList ( "Paste Special", GETMSG(DT_catd, 1, 135 , "Paste Special") ); + subcmdList1 = new CmdList ( "Paste Special", CATGETS(DT_catd, 1, 135 , "Paste Special") ); _edit_paste_special[0] = new EditPasteSpecialCmd ( "Bracketed", - GETMSG(DT_catd, 1, 136 , "Bracketed"), + CATGETS(DT_catd, 1, 136 , "Bracketed"), TRUE, this, Editor::IF_BRACKETED ); subcmdList1->add(_edit_paste_special[0]); _edit_paste_special[1] = new EditPasteSpecialCmd ( "Indented", - GETMSG(DT_catd, 1, 137 , "Indented"), + CATGETS(DT_catd, 1, 137 , "Indented"), TRUE, this, Editor::IF_INDENTED ); subcmdList1->add(_edit_paste_special[1]); // End Paste Special submenu - _edit_clear = new EditClearCmd ( "Clear", GETMSG(DT_catd, 1, 138, "Clear"), + _edit_clear = new EditClearCmd ( "Clear", CATGETS(DT_catd, 1, 138, "Clear"), TRUE, this ); - _edit_delete = new EditDeleteCmd ( "Delete", GETMSG(DT_catd, 1, 139, "Delete"), + _edit_delete = new EditDeleteCmd ( "Delete", CATGETS(DT_catd, 1, 139, "Delete"), TRUE, this ); _edit_select_all = new EditSelectAllCmd ( "Select All", - GETMSG(DT_catd, 1, 140, "Select All"), + CATGETS(DT_catd, 1, 140, "Select All"), TRUE, this ); _format_find_change = new FindChangeCmd ( "Find/Change...", - GETMSG(DT_catd, 1, 155, "Find/Change..."), + CATGETS(DT_catd, 1, 155, "Find/Change..."), TRUE, this ); _format_spell = new SpellCmd ( "Check Spelling...", - GETMSG(DT_catd, 1, 156, "Check Spelling..."), + CATGETS(DT_catd, 1, 156, "Check Spelling..."), TRUE, this ); @@ -2210,13 +2210,13 @@ SendMsgDialog::createMenuPanes() cmdList = new CmdList( "Attachments", - GETMSG(DT_catd, 1, 141, "Attachments")); + CATGETS(DT_catd, 1, 141, "Attachments")); _att_add = new UnifiedSelectFileCmd ( "Add File...", - GETMSG(DT_catd, 1, 142, "Add File..."), - GETMSG(DT_catd, 1, 143, "Mailer - Add"), - GETMSG(DT_catd, 1, 144, "Add"), + CATGETS(DT_catd, 1, 142, "Add File..."), + CATGETS(DT_catd, 1, 143, "Mailer - Add"), + CATGETS(DT_catd, 1, 144, "Add"), TRUE, SendMsgDialog::add_att_cb, this, @@ -2224,8 +2224,8 @@ SendMsgDialog::createMenuPanes() _att_save = new SaveAttachCmd ( "Save As...", - GETMSG(DT_catd, 1, 145, "Save As..."), - GETMSG(DT_catd, 1, 146, + CATGETS(DT_catd, 1, 145, "Save As..."), + CATGETS(DT_catd, 1, 146, "Mailer - Attachments - Save As"), FALSE, SendMsgDialog::save_att_cb, @@ -2233,23 +2233,23 @@ SendMsgDialog::createMenuPanes() this->baseWidget()); _att_delete = new DeleteAttachCmd ( "Delete", - GETMSG(DT_catd, 1, 147, "Delete"), + CATGETS(DT_catd, 1, 147, "Delete"), FALSE, this); _att_undelete = new UndeleteAttachCmd ( "Undelete", - GETMSG(DT_catd, 1, 148, "Undelete"), + CATGETS(DT_catd, 1, 148, "Undelete"), FALSE, this); _att_rename = new RenameAttachCmd( "Rename", - GETMSG(DT_catd, 1, 149, "Rename"), + CATGETS(DT_catd, 1, 149, "Rename"), FALSE, this); _att_select_all = new SelectAllAttachsCmd( "Select All", - GETMSG(DT_catd, 1, 150, "Select All"), + CATGETS(DT_catd, 1, 150, "Select All"), this); /* NL_COMMENT @@ -2259,7 +2259,7 @@ SendMsgDialog::createMenuPanes() */ _att_show_pane = new ShowAttachPaneCmd( "Show List", - GETMSG(DT_catd, 1, 226, "Show List"), + CATGETS(DT_catd, 1, 226, "Show List"), this ); cmdList->add( _att_add ); @@ -2298,22 +2298,22 @@ SendMsgDialog::createMenuPanes() createFormatMenu(); _overview = new OnAppCmd("Overview", - GETMSG(DT_catd, 1, 71, "Overview"), + CATGETS(DT_catd, 1, 71, "Overview"), TRUE, this); - _tasks = new TasksCmd("Tasks", GETMSG(DT_catd, 1, 72, "Tasks"), + _tasks = new TasksCmd("Tasks", CATGETS(DT_catd, 1, 72, "Tasks"), TRUE, this); _reference = new ReferenceCmd("Reference", - GETMSG(DT_catd, 1, 73, "Reference"), + CATGETS(DT_catd, 1, 73, "Reference"), TRUE, this); - _on_item = new OnItemCmd("On Item", GETMSG(DT_catd, 1, 74, "On Item"), + _on_item = new OnItemCmd("On Item", CATGETS(DT_catd, 1, 74, "On Item"), TRUE, this); _using_help = new UsingHelpCmd("Using Help", - GETMSG(DT_catd, 1, 75, "Using Help"), + CATGETS(DT_catd, 1, 75, "Using Help"), TRUE, this); _about_mailer = new RelNoteCmd("About Mailer...", - GETMSG(DT_catd, 1, 77, "About Mailer..."), + CATGETS(DT_catd, 1, 77, "About Mailer..."), TRUE, this); - cmdList = new CmdList("Help", GETMSG(DT_catd, 1, 76, "Help")); + cmdList = new CmdList("Help", CATGETS(DT_catd, 1, 76, "Help")); cmdList->add(_overview); cmdList->add(_separator); cmdList->add(_tasks); @@ -2335,7 +2335,7 @@ SendMsgDialog::construct_attachment_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Attachments", - GETMSG(DT_catd, 1, 158, "Mailer - Attachments"), TRUE); + CATGETS(DT_catd, 1, 158, "Mailer - Attachments"), TRUE); SeparatorCmd *separator = new SeparatorCmd( "Separator","Separator", TRUE ); _attachmentPopupMenuList->add(title); @@ -2362,7 +2362,7 @@ SendMsgDialog::construct_text_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Compose", - GETMSG(DT_catd, 1, 159, "Mailer - Compose"), TRUE); + CATGETS(DT_catd, 1, 159, "Mailer - Compose"), TRUE); SeparatorCmd *separator = new SeparatorCmd("Separator", "Separator", TRUE ); _textPopupMenuList->add(title); @@ -2511,13 +2511,13 @@ SendMsgDialog::createAliasPopupMenu( OtherAliasesCmd *otherAliases = new OtherAliasesCmd( "Other Aliases...", - GETMSG(DT_catd, 1, 247, "Other Aliases..."), + CATGETS(DT_catd, 1, 247, "Other Aliases..."), TRUE); #if defined(USE_TITLED_ALIAS_POPUPS) LabelCmd *title = new LabelCmd( "Mailer - Aliases", - GETMSG(DT_catd, 1, 248, "Mailer - Aliases"), + CATGETS(DT_catd, 1, 248, "Mailer - Aliases"), TRUE); #endif SeparatorCmd *separator = @@ -2666,15 +2666,15 @@ SendMsgDialog::createFormatMenu() CmdList *cmdList; _format_separator = new SeparatorCmd( "Separator","Separator", TRUE ); - cmdList = new CmdList( "Format", GETMSG(DT_catd, 1, 152,"Format") ); + cmdList = new CmdList( "Format", CATGETS(DT_catd, 1, 152,"Format") ); _format_word_wrap = new WordWrapCmd ( "Word Wrap", - GETMSG(DT_catd, 1, 153, "Word Wrap"), + CATGETS(DT_catd, 1, 153, "Word Wrap"), TRUE, this ); _format_settings = new FormatCmd ( "Settings...", - GETMSG(DT_catd, 1, 154, "Settings..."), + CATGETS(DT_catd, 1, 154, "Settings..."), TRUE, this ); @@ -2682,7 +2682,7 @@ SendMsgDialog::createFormatMenu() cmdList->add( _format_settings ); cmdList->add( _format_separator); - _templates = new CmdList ( "Templates", GETMSG(DT_catd, 1, 157, "Templates") ); + _templates = new CmdList ( "Templates", CATGETS(DT_catd, 1, 157, "Templates") ); addTemplates(_templates); cmdList->add(_templates); @@ -2756,7 +2756,7 @@ SendMsgDialog::initialize() XmRepTypeInstallTearOffModelConverter(); MenuWindow::initialize(); - char *ttl = GETMSG(DT_catd, 1, 160, "New Message"); + char *ttl = CATGETS(DT_catd, 1, 160, "New Message"); setTitle(ttl); XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING); n++; @@ -3394,11 +3394,11 @@ SendMsgDialog::renameAttachmentOK() if (attachArea->getIconSelectedCount() > 1) { char *buf = new char[512]; - sprintf(buf, "%s", GETMSG(DT_catd, 5, 4, "Select only one attachment\n\ + sprintf(buf, "%s", CATGETS(DT_catd, 5, 4, "Select only one attachment\n\ and then choose rename")); _genDialog->setToQuestionDialog( - GETMSG(DT_catd, 5, 2, "Mailer"), + CATGETS(DT_catd, 5, 2, "Mailer"), buf); char * helpId = DTMAILHELPSELECTONEATTACH; @@ -3618,12 +3618,12 @@ SendMsgDialog::handleQuitDialog() DtMailGenDialog *dialog = this->genDialog(); dialog->setToQuestionDialog( - GETMSG( + CATGETS( DT_catd, 1, 99, "Mailer - Close"), - GETMSG( + CATGETS( DT_catd, 3, 58, @@ -3634,12 +3634,12 @@ Close the Compose window?") ); helpId = DTMAILHELPCLOSECOMPOSEWINDOW; if ( dialog->post_and_return( - GETMSG( + CATGETS( DT_catd, 1, 100, "OK"), - GETMSG( + CATGETS( DT_catd, 1, 101, @@ -3843,7 +3843,7 @@ Compose::getWin() // Get new Message Handle newsend->setMsgHnd(); - char *ttl = GETMSG(DT_catd, 1, 160, "New Message"); + char *ttl = CATGETS(DT_catd, 1, 160, "New Message"); newsend->setTitle(ttl); newsend->setIconTitle(ttl); return newsend; @@ -3854,7 +3854,7 @@ void SendMsgDialog::setTitle(char *subject) { char *format = "%s - %s"; - char *prefix = GETMSG(DT_catd, 1, 6, "Mailer"); + char *prefix = CATGETS(DT_catd, 1, 6, "Mailer"); char *new_title; int len; diff --git a/cde/programs/dtmail/dtmail/SortCmd.C b/cde/programs/dtmail/dtmail/SortCmd.C index f13fcbd59..0621da6eb 100644 --- a/cde/programs/dtmail/dtmail/SortCmd.C +++ b/cde/programs/dtmail/dtmail/SortCmd.C @@ -50,7 +50,7 @@ SortCmd::doit() DtMail::MailBox *mbox; int current_msg; - theRoamApp.busyAllWindows(GETMSG(DT_catd, 1, 219, "Sorting...")); + theRoamApp.busyAllWindows(CATGETS(DT_catd, 1, 219, "Sorting...")); // Get Mailbox mbox = _sortparent->mailbox(); diff --git a/cde/programs/dtmail/dtmail/Undelete.C b/cde/programs/dtmail/dtmail/Undelete.C index 7f0ec36b4..7aaee0b92 100644 --- a/cde/programs/dtmail/dtmail/Undelete.C +++ b/cde/programs/dtmail/dtmail/Undelete.C @@ -313,7 +313,7 @@ UndelFromListDialog::createWorkArea ( Widget parent ) XmNentryAlignment, XmALIGNMENT_CENTER, NULL); - labelStr = XmStringCreateLocalized(GETMSG(DT_catd, 1, 14, + labelStr = XmStringCreateLocalized(CATGETS(DT_catd, 1, 14, "Sender")); l1 = XtVaCreateManagedWidget("Label1", xmLabelGadgetClass, @@ -327,7 +327,7 @@ UndelFromListDialog::createWorkArea ( Widget parent ) // XtAddCallback(l1, XmNhelpCallback, HelpCB, helpId); - labelStr = XmStringCreateLocalized(GETMSG(DT_catd, 1, 15, + labelStr = XmStringCreateLocalized(CATGETS(DT_catd, 1, 15, "Subject")); l2 = XtVaCreateManagedWidget("Label2", xmLabelGadgetClass, rowOfLabels, @@ -341,7 +341,7 @@ UndelFromListDialog::createWorkArea ( Widget parent ) /* add help callback */ // XtAddCallback(l2, XmNhelpCallback, HelpCB, helpId); - labelStr = XmStringCreateLocalized(GETMSG(DT_catd, 1, 16, + labelStr = XmStringCreateLocalized(CATGETS(DT_catd, 1, 16, "Date and Time")); l3 = XtVaCreateManagedWidget("Label3", xmLabelGadgetClass, rowOfLabels, @@ -353,7 +353,7 @@ UndelFromListDialog::createWorkArea ( Widget parent ) /* add help callback */ // XtAddCallback(l3, XmNhelpCallback, HelpCB, helpId); - labelStr = XmStringCreateLocalized(GETMSG(DT_catd, 1, 17, + labelStr = XmStringCreateLocalized(CATGETS(DT_catd, 1, 17, "Size")); l4 = XtVaCreateManagedWidget("Label4", xmLabelGadgetClass, rowOfLabels, @@ -506,7 +506,7 @@ UndelFromListDialog::addToRowOfButtons() _undelete_button = new DoUndeleteCmd( "Undelete", - GETMSG(DT_catd, 1, 115, "Undelete"), + CATGETS(DT_catd, 1, 115, "Undelete"), TRUE, this); ci = new ButtonInterface (rowOfButtons, _undelete_button); @@ -522,7 +522,7 @@ UndelFromListDialog::addToRowOfButtons() _close_button = new CloseUndelCmd( "Close", - GETMSG(DT_catd, 1, 116, "Close"), + CATGETS(DT_catd, 1, 116, "Close"), TRUE, this); ci = new ButtonInterface (rowOfButtons, _close_button); diff --git a/cde/programs/dtmail/dtmail/ViewMsgDialog.C b/cde/programs/dtmail/dtmail/ViewMsgDialog.C index 6bc111484..3db3c0b53 100644 --- a/cde/programs/dtmail/dtmail/ViewMsgDialog.C +++ b/cde/programs/dtmail/dtmail/ViewMsgDialog.C @@ -356,19 +356,19 @@ ViewMsgDialog::construct_edit_menu() _edit_copy = new EditCopyCmd( "Copy", - GETMSG(DT_catd, 1, 161, "Copy"), + CATGETS(DT_catd, 1, 161, "Copy"), TRUE, this ); _edit_select_all = new EditSelectAllCmd( "Select All", - GETMSG(DT_catd, 1, 162, "Select All"), + CATGETS(DT_catd, 1, 162, "Select All"), TRUE, this ); - cmdList = new CmdList("Edit", GETMSG(DT_catd, 1, 163, "Edit")); + cmdList = new CmdList("Edit", CATGETS(DT_catd, 1, 163, "Edit")); cmdList->add(_edit_copy); cmdList->add(_edit_select_all); @@ -385,8 +385,8 @@ ViewMsgDialog::construct_attachment_menu() _attach_save_as = new SaveAttachCmd ( "Save As...", - GETMSG(DT_catd, 1, 164, "Save As..."), - GETMSG(DT_catd, 1, 165, "Mailer - Attachments - Save As"), + CATGETS(DT_catd, 1, 164, "Save As..."), + CATGETS(DT_catd, 1, 165, "Mailer - Attachments - Save As"), FALSE, ViewMsgDialog::save_attachment_callback, this, @@ -394,12 +394,12 @@ ViewMsgDialog::construct_attachment_menu() _attach_select_all = new SelectAllAttachsCmd( "Select All", - GETMSG(DT_catd, 1, 166, "Select All"), + CATGETS(DT_catd, 1, 166, "Select All"), this); _attachmentMenuList = new CmdList( "Attachments", - GETMSG(DT_catd, 1, 167, "Attachments") ); + CATGETS(DT_catd, 1, 167, "Attachments") ); _attachmentMenuList->add(_attach_save_as); _attachmentMenuList->add(_attach_select_all); @@ -415,7 +415,7 @@ ViewMsgDialog::construct_attachment_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Attachments", - GETMSG(DT_catd, 1, 168, "Mailer - Attachments"), TRUE); + CATGETS(DT_catd, 1, 168, "Mailer - Attachments"), TRUE); SeparatorCmd *separator = new SeparatorCmd("Separator","Separator", TRUE ); _attachmentPopupMenuList->add(title); @@ -438,7 +438,7 @@ ViewMsgDialog::construct_text_popup(void) LabelCmd *title = new LabelCmd ( "Mailer - Text", - GETMSG(DT_catd, 1, 169, "Mailer - Text"), TRUE); + CATGETS(DT_catd, 1, 169, "Mailer - Text"), TRUE); SeparatorCmd *separator = new SeparatorCmd("Separator", "Separator", TRUE ); _textPopupMenuList->add(title); @@ -462,20 +462,20 @@ ViewMsgDialog::construct_help_menu() // Separator for menu items SeparatorCmd *separator= new SeparatorCmd("Separator", "Separator", TRUE ); - _overview = new OnAppCmd("Overview", GETMSG(DT_catd, 1, 170, "Overview"), + _overview = new OnAppCmd("Overview", CATGETS(DT_catd, 1, 170, "Overview"), TRUE, this); - _tasks = new TasksCmd("Tasks", GETMSG(DT_catd, 1, 171, "Tasks"), + _tasks = new TasksCmd("Tasks", CATGETS(DT_catd, 1, 171, "Tasks"), TRUE, this); _reference = new ReferenceCmd("Reference", - GETMSG(DT_catd, 1, 172, "Reference"), + CATGETS(DT_catd, 1, 172, "Reference"), TRUE, this); _on_item = new OnItemCmd("On Item", - GETMSG(DT_catd, 1, 173, "On Item"), + CATGETS(DT_catd, 1, 173, "On Item"), TRUE, this); _using_help = new UsingHelpCmd("Using Help", - GETMSG(DT_catd, 1, 174, "Using Help"), + CATGETS(DT_catd, 1, 174, "Using Help"), TRUE, this); - cmdList = new CmdList( "Help", GETMSG(DT_catd, 1, 175, "Help") ); + cmdList = new CmdList( "Help", CATGETS(DT_catd, 1, 175, "Help") ); cmdList->add ( _overview ); cmdList->add ( separator ); cmdList->add ( _tasks ); @@ -487,7 +487,7 @@ ViewMsgDialog::construct_help_menu() cmdList->add ( separator ); _about_mailer = new RelNoteCmd("About Mailer", - GETMSG(DT_catd, 1, 176, "About Mailer..."), + CATGETS(DT_catd, 1, 176, "About Mailer..."), TRUE, this); cmdList->add ( _about_mailer ); @@ -535,11 +535,11 @@ ViewMsgDialog::save_selected_attachment( _genDialog->setToErrorDialog( - GETMSG(DT_catd, 1, 177, "Mailer"), - GETMSG(DT_catd, 2, 20, "An attachment needs to be selected before issuing the\n\"Save As\" command to save to a file.") ); + CATGETS(DT_catd, 1, 177, "Mailer"), + CATGETS(DT_catd, 2, 20, "An attachment needs to be selected before issuing the\n\"Save As\" command to save to a file.") ); helpId = DTMAILHELPSELECTATTACH; answer = _genDialog->post_and_return( - GETMSG(DT_catd, 3, 75, "OK"), helpId ); + CATGETS(DT_catd, 3, 75, "OK"), helpId ); return; } diff --git a/cde/programs/dtmail/dtmail/XmTextEditor.C b/cde/programs/dtmail/dtmail/XmTextEditor.C index 24e883216..2e5eab027 100644 --- a/cde/programs/dtmail/dtmail/XmTextEditor.C +++ b/cde/programs/dtmail/dtmail/XmTextEditor.C @@ -781,10 +781,10 @@ XmTextEditor::modifyPasteData( { if( !begin_ins_bracket) - begin_ins_bracket = GETMSG(DT_catd, 1, 199, + begin_ins_bracket = CATGETS(DT_catd, 1, 199, "\n------------- Begin Included Message -------------\n"); if(!end_ins_bracket) - end_ins_bracket = GETMSG(DT_catd, 1, 200, + end_ins_bracket = CATGETS(DT_catd, 1, 200, "\n------------- End Included Message -------------\n"); size_t begin_len = strlen(begin_ins_bracket); diff --git a/cde/programs/dtmail/dtmail/options_ui.C b/cde/programs/dtmail/dtmail/options_ui.C index 79a4540e4..889f80e4b 100644 --- a/cde/programs/dtmail/dtmail/options_ui.C +++ b/cde/programs/dtmail/dtmail/options_ui.C @@ -1637,7 +1637,7 @@ dtb_options_dialog_create( if (instance->dialog == NULL) { n = 0; XtSetArg(args[n], XmNallowShellResize, True); ++n; - XtSetArg(args[n], XmNtitle, GETMSG(Dtb_project_catd, 2, 1, "Mailer - Mail Options")); ++n; + XtSetArg(args[n], XmNtitle, CATGETS(Dtb_project_catd, 2, 1, "Mailer - Mail Options")); ++n; XtSetArg(args[n], XmNbackground, dtb_cvt_string_to_pixel(parent, "white")); ++n; instance->dialog = XmCreateDialogShell(parent, @@ -1845,7 +1845,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 2, "Category:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 2, "Category:")); instance->category_opmenu_label = XtVaCreateWidget("dtb_options_category_opmenu_label", xmLabelWidgetClass, @@ -1872,7 +1872,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Message_Header_List_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 3, "Message Header List")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 3, "Message Header List")); instance->category_opmenu_items.Message_Header_List_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_message_header_list_item", xmPushButtonWidgetClass, @@ -1886,7 +1886,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Message_View_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 4, "Message View")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 4, "Message View")); instance->category_opmenu_items.Message_View_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_message_view_item", xmPushButtonWidgetClass, @@ -1900,7 +1900,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Compose_Window_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 5, "Compose Window")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 5, "Compose Window")); instance->category_opmenu_items.Compose_Window_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_compose_window_item", xmPushButtonWidgetClass, @@ -1914,7 +1914,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Message_Filing_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 6, "Message Filing")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 6, "Message Filing")); instance->category_opmenu_items.Message_Filing_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_message_filing_item", xmPushButtonWidgetClass, @@ -1928,7 +1928,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Vacation_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 7, "Vacation")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 7, "Vacation")); instance->category_opmenu_items.Vacation_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_vacation_item", xmPushButtonWidgetClass, @@ -1942,7 +1942,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Templates_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 8, "Templates")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 8, "Templates")); instance->category_opmenu_items.Templates_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_templates_item", xmPushButtonWidgetClass, @@ -1956,7 +1956,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Aliases_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 9, "Aliases")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 9, "Aliases")); instance->category_opmenu_items.Aliases_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_aliases_item", xmPushButtonWidgetClass, @@ -1970,7 +1970,7 @@ dtb_options_category_opmenu_create( return -1; if (instance->category_opmenu_items.Advanced_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 10, "Advanced")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 10, "Advanced")); instance->category_opmenu_items.Advanced_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_advanced_item", xmPushButtonWidgetClass, @@ -1985,7 +1985,7 @@ dtb_options_category_opmenu_create( if (instance->category_opmenu_items.Printing_item == NULL) { label_xmstring = - XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 92, "Printing")); + XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 92, "Printing")); instance->category_opmenu_items.Printing_item = XtVaCreateManagedWidget("dtb_options_category_opmenu_printing_item", xmPushButtonWidgetClass, @@ -2001,7 +2001,7 @@ dtb_options_category_opmenu_create( if (instance->category_opmenu_items.MailRetrieval_item == NULL) { label_xmstring = XmStringCreateLocalized( - GETMSG(Dtb_project_catd, 2, 93, "Mail Retrieval")); + CATGETS(Dtb_project_catd, 2, 93, "Mail Retrieval")); instance->category_opmenu_items.MailRetrieval_item = XtVaCreateManagedWidget( "dtb_options_category_opmenu_mailretrieval_item", @@ -2415,7 +2415,7 @@ dtb_options_checkbox_create( return -1; if (instance->checkbox_items.Show_To_recipient_when_mail_is_from_me_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 11, "Show To: recipient when mail is from me")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 11, "Show To: recipient when mail is from me")); instance->checkbox_items.Show_To_recipient_when_mail_is_from_me_item = XtVaCreateManagedWidget("dtb_options_checkbox_show_to_recipient_when_mail_is_from_me_item", xmToggleButtonWidgetClass, @@ -2430,7 +2430,7 @@ dtb_options_checkbox_create( return -1; if (instance->checkbox_items.Display_message_numbers_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 12, "Display message numbers")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 12, "Display message numbers")); instance->checkbox_items.Display_message_numbers_item = XtVaCreateManagedWidget("dtb_options_checkbox_display_message_numbers_item", xmToggleButtonWidgetClass, @@ -2552,7 +2552,7 @@ dtb_options_destroy_del_msg_lbl_create( XmString label_xmstring = NULL; if (instance->destroy_del_msg_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 20, "Destroy Deleted Messages:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 20, "Destroy Deleted Messages:")); instance->destroy_del_msg_lbl = XtVaCreateWidget("dtb_options_destroy_del_msg_lbl", xmLabelWidgetClass, @@ -2615,7 +2615,7 @@ dtb_options_deleted_msg_cb_create( return -1; if (instance->deleted_msg_cb_items.When_I_close_the_mailbox_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 21, "When I close the mailbox")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 21, "When I close the mailbox")); instance->deleted_msg_cb_items.When_I_close_the_mailbox_item = XtVaCreateManagedWidget("dtb_options_deleted_msg_cb_when_i_close_the_mailbox_item", xmToggleButtonWidgetClass, @@ -2630,7 +2630,7 @@ dtb_options_deleted_msg_cb_create( return -1; if (instance->deleted_msg_cb_items.Show_confirmation_notice_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 22, "Show confirmation notice")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 22, "Show confirmation notice")); instance->deleted_msg_cb_items.Show_confirmation_notice_item = XtVaCreateManagedWidget("dtb_options_deleted_msg_cb_show_confirmation_notice_item", xmToggleButtonWidgetClass, @@ -2782,7 +2782,7 @@ dtb_options_mail_check_sb_create( return -1; if (instance->mail_check_sb_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 13, "Check for new mail every:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 13, "Check for new mail every:")); instance->mail_check_sb_label = XtVaCreateWidget("dtb_options_mail_check_sb_label", xmLabelWidgetClass, @@ -2827,7 +2827,7 @@ dtb_options_seconds_lbl_create( XmString label_xmstring = NULL; if (instance->seconds_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 14, "Seconds")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 14, "Seconds")); instance->seconds_lbl = XtVaCreateWidget("dtb_options_seconds_lbl", xmLabelWidgetClass, @@ -2888,7 +2888,7 @@ dtb_options_signal_sb_create( return -1; if (instance->signal_sb_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 15, "Signal new mail with:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 15, "Signal new mail with:")); instance->signal_sb_label = XtVaCreateWidget("dtb_options_signal_sb_label", xmLabelWidgetClass, @@ -2933,7 +2933,7 @@ dtb_options_beeps_lbl_create( XmString label_xmstring = NULL; if (instance->beeps_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 16, "Beep(s)")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 16, "Beep(s)")); instance->beeps_lbl = XtVaCreateWidget("dtb_options_beeps_lbl", xmLabelWidgetClass, @@ -2994,7 +2994,7 @@ dtb_options_spinbox2_create( return -1; if (instance->spinbox2_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 91, " ")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 91, " ")); instance->spinbox2_label = XtVaCreateWidget("dtb_options_spinbox2_label", xmLabelWidgetClass, @@ -3039,7 +3039,7 @@ dtb_options_flashes_lbl_create( XmString label_xmstring = NULL; if (instance->flashes_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 17, "Flash(es)")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 17, "Flash(es)")); instance->flashes_lbl = XtVaCreateWidget("dtb_options_flashes_lbl", xmLabelWidgetClass, @@ -3100,7 +3100,7 @@ dtb_options_display_sb_create( return -1; if (instance->display_sb_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 18, "Display")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 18, "Display")); instance->display_sb_label = XtVaCreateWidget("dtb_options_display_sb_label", xmLabelWidgetClass, @@ -3145,7 +3145,7 @@ dtb_options_headers_lbl_create( XmString label_xmstring = NULL; if (instance->headers_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 19, "Headers")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 19, "Headers")); instance->headers_lbl = XtVaCreateWidget("dtb_options_headers_lbl", xmLabelWidgetClass, @@ -3215,7 +3215,7 @@ dtb_options_abr_header_lbl_create( XmString label_xmstring = NULL; if (instance->abr_header_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 23, "Abbreviated header will not include:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 23, "Abbreviated header will not include:")); instance->abr_header_lbl = XtVaCreateWidget("dtb_options_abr_header_lbl", xmLabelWidgetClass, @@ -3420,7 +3420,7 @@ dtb_options_display_row_sb_create( return -1; if (instance->display_row_sb_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 18, "Display")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 18, "Display")); instance->display_row_sb_label = XtVaCreateWidget("dtb_options_display_row_sb_label", xmLabelWidgetClass, @@ -3465,7 +3465,7 @@ dtb_options_rows_lbl_create( XmString label_xmstring = NULL; if (instance->rows_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 33, "Rows")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 33, "Rows")); instance->rows_lbl = XtVaCreateWidget("dtb_options_rows_lbl", xmLabelWidgetClass, @@ -3526,7 +3526,7 @@ dtb_options_characters_wide_sb_create( return -1; if (instance->characters_wide_sb_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 91, " ")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 91, " ")); instance->characters_wide_sb_label = XtVaCreateWidget("dtb_options_characters_wide_sb_label", xmLabelWidgetClass, @@ -3571,7 +3571,7 @@ dtb_options_char_wide_lbl_create( XmString label_xmstring = NULL; if (instance->char_wide_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 34, "Characters Wide")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 34, "Characters Wide")); instance->char_wide_lbl = XtVaCreateWidget("dtb_options_char_wide_lbl", xmLabelWidgetClass, @@ -3679,9 +3679,9 @@ dtb_options_hidden_fields_list_create( /* * Convert char* strings to XmStrings */ - hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 25, "x-lines")); - hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 26, "email-version")); - hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 27, "expires")); + hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 25, "x-lines")); + hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 26, "email-version")); + hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 27, "expires")); if (instance->hidden_fields_list == NULL) { n = 0; XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n; @@ -3720,7 +3720,7 @@ dtb_options_hidden_fields_lbl_create( XmString label_xmstring = NULL; if (instance->hidden_fields_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 28, "Hidden Fields:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 28, "Hidden Fields:")); instance->hidden_fields_lbl = XtVaCreateWidget("dtb_options_hidden_fields_lbl", xmLabelWidgetClass, @@ -3757,7 +3757,7 @@ dtb_options_header_fields_lbl_create( XmString label_xmstring = NULL; if (instance->header_fields_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 24, "Header Field:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 24, "Header Field:")); instance->header_fields_lbl = XtVaCreateWidget("dtb_options_header_fields_lbl", xmLabelWidgetClass, @@ -3794,7 +3794,7 @@ dtb_options_h_field_add_create( XmString label_xmstring = NULL; if (instance->h_field_add == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 29, "Add")); instance->h_field_add = XtVaCreateWidget("dtb_options_h_field_add", xmPushButtonWidgetClass, @@ -3831,7 +3831,7 @@ dtb_options_h_field_delete_create( XmString label_xmstring = NULL; if (instance->h_field_delete == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 30, "Delete")); instance->h_field_delete = XtVaCreateWidget("dtb_options_h_field_delete", xmPushButtonWidgetClass, @@ -3868,7 +3868,7 @@ dtb_options_h_field_change_create( XmString label_xmstring = NULL; if (instance->h_field_change == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 31, "Change")); instance->h_field_change = XtVaCreateWidget("dtb_options_h_field_change", xmPushButtonWidgetClass, @@ -3932,7 +3932,7 @@ dtb_options_wrap_checkbox_create( return -1; if (instance->wrap_checkbox_items.Show_Attachment_List_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 36, "Show Attachment List")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 36, "Show Attachment List")); instance->wrap_checkbox_items.Show_Attachment_List_item = XtVaCreateManagedWidget("dtb_options_wrap_checkbox_show_attachment_list_item", xmToggleButtonWidgetClass, @@ -4014,7 +4014,7 @@ dtb_options_confirm_attachment_create( if (instance->cfrm_att_checkbox_items.Confirm_Attachment_item == NULL) { label_xmstring = XmStringCreateLocalized( - GETMSG(Dtb_project_catd, 2, 94, "Confirm attachments over:")); + CATGETS(Dtb_project_catd, 2, 94, "Confirm attachments over:")); instance->cfrm_att_checkbox_items.Confirm_Attachment_item = XtVaCreateManagedWidget( @@ -4061,7 +4061,7 @@ dtb_options_confirm_attachment_create( if (instance->visit_mailb_lbl == NULL) { label_xmstring = - XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 95, "kilobytes")); + XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 95, "kilobytes")); instance->cfrm_att_size_mb_lbl = XtVaCreateManagedWidget("dtb_options_cfrm_att_size_mb_lbl", xmLabelWidgetClass, @@ -4192,7 +4192,7 @@ dtb_options_deadletter_field_create( return -1; if (instance->deadletter_field_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 38, "Dead Letter Folder:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 38, "Dead Letter Folder:")); instance->deadletter_field_label = XtVaCreateWidget("dtb_options_deadletter_field_label", xmLabelWidgetClass, @@ -4263,7 +4263,7 @@ dtb_options_format_menu_lbl_create( XmString label_xmstring = NULL; if (instance->format_menu_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 39, "Format Menu Custom Fields")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 39, "Format Menu Custom Fields")); instance->format_menu_lbl = XtVaCreateWidget("dtb_options_format_menu_lbl", xmLabelWidgetClass, @@ -4371,7 +4371,7 @@ dtb_options_indent_str_tf_create( XtSetArg(args[n], XmNleftOffset, 4); ++n; XtSetArg(args[n], XmNleftAttachment, XmATTACH_WIDGET); ++n; XtSetArg(args[n], XmNtopAttachment, XmATTACH_NONE); ++n; - XtSetArg(args[n], XmNvalue, GETMSG(Dtb_project_catd, 2, 37, ">")); ++n; + XtSetArg(args[n], XmNvalue, CATGETS(Dtb_project_catd, 2, 37, ">")); ++n; XtSetArg(args[n], XmNmaxLength, 80); ++n; XtSetArg(args[n], XmNeditable, True); ++n; XtSetArg(args[n], XmNcursorPositionVisible, True); ++n; @@ -4428,7 +4428,7 @@ dtb_options_indent_str_lbl_create( XmString label_xmstring = NULL; if (instance->indent_str_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 52, "Indent string")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 52, "Indent string")); instance->indent_str_lbl = XtVaCreateWidget("dtb_options_indent_str_lbl", xmLabelWidgetClass, @@ -4458,7 +4458,7 @@ dtb_options_reply_include_lbl_create( XmString label_xmstring = NULL; if (instance->reply_include_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 53, "for Reply Include:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 53, "for Reply Include:")); instance->reply_include_lbl = XtVaCreateWidget("dtb_options_reply_include_lbl", xmLabelWidgetClass, @@ -4526,8 +4526,8 @@ dtb_options_list_create( /* * Convert char* strings to XmStrings */ - list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 40, "bcc")); - list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 41, "return-receipt")); + list_list_xmstrings[i++] = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 40, "bcc")); + list_list_xmstrings[i++] = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 41, "return-receipt")); if (instance->list == NULL) { n = 0; XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n; @@ -4566,7 +4566,7 @@ dtb_options_menu_labels_lbl_create( XmString label_xmstring = NULL; if (instance->menu_labels_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 42, "Menu Labels:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 42, "Menu Labels:")); instance->menu_labels_lbl = XtVaCreateWidget("dtb_options_menu_labels_lbl", xmLabelWidgetClass, @@ -4669,7 +4669,7 @@ dtb_options_hdr_field_lbl_create( XmString label_xmstring = NULL; if (instance->hdr_field_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 50, "Header Field:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 50, "Header Field:")); instance->hdr_field_lbl = XtVaCreateWidget("dtb_options_hdr_field_lbl", xmLabelWidgetClass, @@ -4707,7 +4707,7 @@ dtb_options_def_value_lbl_create( XmString label_xmstring = NULL; if (instance->def_value_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 51, "Default Value:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 51, "Default Value:")); instance->def_value_lbl = XtVaCreateWidget("dtb_options_def_value_lbl", xmLabelWidgetClass, @@ -4745,7 +4745,7 @@ dtb_options_add_button_create( XmString label_xmstring = NULL; if (instance->add_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 29, "Add")); instance->add_button = XtVaCreateWidget("dtb_options_add_button", xmPushButtonWidgetClass, @@ -4782,7 +4782,7 @@ dtb_options_del_button_create( XmString label_xmstring = NULL; if (instance->del_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 30, "Delete")); instance->del_button = XtVaCreateWidget("dtb_options_del_button", xmPushButtonWidgetClass, @@ -4819,7 +4819,7 @@ dtb_options_change_button_create( XmString label_xmstring = NULL; if (instance->change_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 31, "Change")); instance->change_button = XtVaCreateWidget("dtb_options_change_button", xmPushButtonWidgetClass, @@ -4948,7 +4948,7 @@ dtb_options_mailb_for_sent_lbl_create( XmString label_xmstring = NULL; if (instance->mailb_for_sent_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 61, "Mailbox for sent messages:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 61, "Mailbox for sent messages:")); instance->mailb_for_sent_lbl = XtVaCreateWidget("dtb_options_mailb_for_sent_lbl", xmLabelWidgetClass, @@ -5068,7 +5068,7 @@ dtb_options_dpy_up_mbox_cb_create( return -1; if (instance->dpy_up_mbox_cb_items.Display_up_to_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 59, "Display up to:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 59, "Display up to:")); instance->dpy_up_mbox_cb_items.Display_up_to_item = XtVaCreateManagedWidget("dtb_options_dpy_up_mbox_cb_display_up_to_item", xmToggleButtonWidgetClass, @@ -5128,7 +5128,7 @@ dtb_options_visit_mailb_lbl_create( XmString label_xmstring = NULL; if (instance->visit_mailb_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 60, "Recently visited mailboxes")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 60, "Recently visited mailboxes")); instance->visit_mailb_lbl = XtVaCreateWidget("dtb_options_visit_mailb_lbl", xmLabelWidgetClass, @@ -5212,7 +5212,7 @@ dtb_options_log_cb_create( return -1; if (instance->log_cb_items.Log_all_sent_messages_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 62, "Log all sent messages")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 62, "Log all sent messages")); instance->log_cb_items.Log_all_sent_messages_item = XtVaCreateManagedWidget("dtb_options_log_cb_log_all_sent_messages_item", xmToggleButtonWidgetClass, @@ -5374,7 +5374,7 @@ dtb_options_move_menu_lbl_create( XmString label_xmstring = NULL; if (instance->move_menu_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 57, "Move Menu")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 57, "Move Menu")); instance->move_menu_lbl = XtVaCreateWidget("dtb_options_move_menu_lbl", xmLabelWidgetClass, @@ -5411,7 +5411,7 @@ dtb_options_move_menu_lbl2_create( XmString label_xmstring = NULL; if (instance->move_menu_lbl2 == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 58, "and Copy To Menu:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 58, "and Copy To Menu:")); instance->move_menu_lbl2 = XtVaCreateWidget("dtb_options_move_menu_lbl2", xmLabelWidgetClass, @@ -5448,7 +5448,7 @@ dtb_options_path_file_lbl_create( XmString label_xmstring = NULL; if (instance->path_file_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 54, "Path / File Name:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 54, "Path / File Name:")); instance->path_file_lbl = XtVaCreateWidget("dtb_options_path_file_lbl", xmLabelWidgetClass, @@ -5486,7 +5486,7 @@ dtb_options_start_look_lbl_create( XmString label_xmstring = NULL; if (instance->start_look_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 55, "Start looking in:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 55, "Start looking in:")); instance->start_look_lbl = XtVaCreateWidget("dtb_options_start_look_lbl", xmLabelWidgetClass, @@ -5524,7 +5524,7 @@ dtb_options_mm_add_butt_create( XmString label_xmstring = NULL; if (instance->mm_add_butt == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 29, "Add")); instance->mm_add_butt = XtVaCreateWidget("dtb_options_mm_add_butt", xmPushButtonWidgetClass, @@ -5561,7 +5561,7 @@ dtb_options_mm_delete_butt_create( XmString label_xmstring = NULL; if (instance->mm_delete_butt == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 30, "Delete")); instance->mm_delete_butt = XtVaCreateWidget("dtb_options_mm_delete_butt", xmPushButtonWidgetClass, @@ -5598,7 +5598,7 @@ dtb_options_mm_change_butt_create( XmString label_xmstring = NULL; if (instance->mm_change_butt == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 31, "Change")); instance->mm_change_butt = XtVaCreateWidget("dtb_options_mm_change_butt", xmPushButtonWidgetClass, @@ -5635,7 +5635,7 @@ dtb_options_vacation_lbl_create( XmString label_xmstring = NULL; if (instance->vacation_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 66, "Vacation Precedence = junk")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 66, "Vacation Precedence = junk")); instance->vacation_lbl = XtVaCreateWidget("dtb_options_vacation_lbl", xmLabelWidgetClass, @@ -5730,7 +5730,7 @@ dtb_options_vacation_rb_create( return -1; if (instance->vacation_rb_items.On_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 64, "On")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 64, "On")); instance->vacation_rb_items.On_item = XtVaCreateManagedWidget("dtb_options_vacation_rb_on_item", xmToggleButtonWidgetClass, @@ -5745,7 +5745,7 @@ dtb_options_vacation_rb_create( return -1; if (instance->vacation_rb_items.Off_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 65, "Off")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 65, "Off")); instance->vacation_rb_items.Off_item = XtVaCreateManagedWidget("dtb_options_vacation_rb_off_item", xmToggleButtonWidgetClass, @@ -5822,7 +5822,7 @@ dtb_options_subject_tf_create( XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n; XtSetArg(args[n], XmNtopOffset, 4); ++n; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n; - XtSetArg(args[n], XmNvalue, GETMSG(Dtb_project_catd, 2, 68, "Out of the office")); ++n; + XtSetArg(args[n], XmNvalue, CATGETS(Dtb_project_catd, 2, 68, "Out of the office")); ++n; XtSetArg(args[n], XmNmaxLength, 80); ++n; XtSetArg(args[n], XmNeditable, True); ++n; XtSetArg(args[n], XmNcursorPositionVisible, True); ++n; @@ -5847,7 +5847,7 @@ dtb_options_msg_list_lbl_create( XmString label_xmstring = NULL; if (instance->msg_list_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 69, "Message:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 69, "Message:")); instance->msg_list_lbl = XtVaCreateWidget("dtb_options_msg_list_lbl", xmLabelWidgetClass, @@ -5884,7 +5884,7 @@ dtb_options_subject_lbl_create( XmString label_xmstring = NULL; if (instance->subject_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 67, "Subject:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 67, "Subject:")); instance->subject_lbl = XtVaCreateWidget("dtb_options_subject_lbl", xmLabelWidgetClass, @@ -5922,7 +5922,7 @@ dtb_options_vacation_rb_lbl_create( XmString label_xmstring = NULL; if (instance->vacation_rb_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 63, "Vacation:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 63, "Vacation:")); instance->vacation_rb_lbl = XtVaCreateWidget("dtb_options_vacation_rb_lbl", xmLabelWidgetClass, @@ -6127,7 +6127,7 @@ dtb_options_templates_list_lbl_create( XmString label_xmstring = NULL; if (instance->templates_list_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 72, "Templates:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 72, "Templates:")); instance->templates_list_lbl = XtVaCreateWidget("dtb_options_templates_list_lbl", xmLabelWidgetClass, @@ -6164,7 +6164,7 @@ dtb_options_menu_label_lbl_create( XmString label_xmstring = NULL; if (instance->menu_label_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 71, "Menu Label:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 71, "Menu Label:")); instance->menu_label_lbl = XtVaCreateWidget("dtb_options_menu_label_lbl", xmLabelWidgetClass, @@ -6202,7 +6202,7 @@ dtb_options_path_filename_label_lbl_create( XmString label_xmstring = NULL; if (instance->path_filename_label_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 54, "Path / File Name:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 54, "Path / File Name:")); instance->path_filename_label_lbl = XtVaCreateWidget("dtb_options_path_filename_label_lbl", xmLabelWidgetClass, @@ -6240,7 +6240,7 @@ dtb_options_tem_add_but_create( XmString label_xmstring = NULL; if (instance->tem_add_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 29, "Add")); instance->tem_add_but = XtVaCreateWidget("dtb_options_tem_add_but", xmPushButtonWidgetClass, @@ -6277,7 +6277,7 @@ dtb_options_tem_del_but_create( XmString label_xmstring = NULL; if (instance->tem_del_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 30, "Delete")); instance->tem_del_but = XtVaCreateWidget("dtb_options_tem_del_but", xmPushButtonWidgetClass, @@ -6314,7 +6314,7 @@ dtb_options_tem_change_but_create( XmString label_xmstring = NULL; if (instance->tem_change_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 31, "Change")); instance->tem_change_but = XtVaCreateWidget("dtb_options_tem_change_but", xmPushButtonWidgetClass, @@ -6518,7 +6518,7 @@ dtb_options_alias_list_lbl_create( XmString label_xmstring = NULL; if (instance->alias_list_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 75, "Aliases:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 75, "Aliases:")); instance->alias_list_lbl = XtVaCreateWidget("dtb_options_alias_list_lbl", xmLabelWidgetClass, @@ -6555,7 +6555,7 @@ dtb_options_alias_tf_lbl_create( XmString label_xmstring = NULL; if (instance->alias_tf_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 73, "Alias:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 73, "Alias:")); instance->alias_tf_lbl = XtVaCreateWidget("dtb_options_alias_tf_lbl", xmLabelWidgetClass, @@ -6593,7 +6593,7 @@ dtb_options_address_tf_lbl_create( XmString label_xmstring = NULL; if (instance->address_tf_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 74, "Addresses:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 74, "Addresses:")); instance->address_tf_lbl = XtVaCreateWidget("dtb_options_address_tf_lbl", xmLabelWidgetClass, @@ -6631,7 +6631,7 @@ dtb_options_alias_add_but_create( XmString label_xmstring = NULL; if (instance->alias_add_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 29, "Add")); instance->alias_add_but = XtVaCreateWidget("dtb_options_alias_add_but", xmPushButtonWidgetClass, @@ -6668,7 +6668,7 @@ dtb_options_alias_delete_but_create( XmString label_xmstring = NULL; if (instance->alias_delete_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 30, "Delete")); instance->alias_delete_but = XtVaCreateWidget("dtb_options_alias_delete_but", xmPushButtonWidgetClass, @@ -6705,7 +6705,7 @@ dtb_options_al_change_but_create( XmString label_xmstring = NULL; if (instance->al_change_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 31, "Change")); instance->al_change_but = XtVaCreateWidget("dtb_options_al_change_but", xmPushButtonWidgetClass, @@ -6780,7 +6780,7 @@ dtb_options_update_mailb_lbl_create( XmString label_xmstring = NULL; if (instance->update_mailb_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 76, "Update mailbox state:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 76, "Update mailbox state:")); instance->update_mailb_lbl = XtVaCreateWidget("dtb_options_update_mailb_lbl", xmLabelWidgetClass, @@ -6816,7 +6816,7 @@ dtb_options_frequently_lbl_create( XmString label_xmstring = NULL; if (instance->frequently_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 77, "Frequently")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 77, "Frequently")); instance->frequently_lbl = XtVaCreateWidget("dtb_options_frequently_lbl", xmLabelWidgetClass, @@ -6852,7 +6852,7 @@ dtb_options_seldom_lbl_create( XmString label_xmstring = NULL; if (instance->seldom_lbl == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 78, "Seldom")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 78, "Seldom")); instance->seldom_lbl = XtVaCreateWidget("dtb_options_seldom_lbl", xmLabelWidgetClass, @@ -6947,7 +6947,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_label == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 79, "Defaults:")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 79, "Defaults:")); instance->adv_def_cb_label = XtVaCreateWidget("dtb_options_adv_def_cb_label", xmLabelWidgetClass, @@ -6980,7 +6980,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_items.Show_confirmation_notices_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 80, "Show confirmation notices")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 80, "Show confirmation notices")); instance->adv_def_cb_items.Show_confirmation_notices_item = XtVaCreateManagedWidget("dtb_options_adv_def_cb_show_confirmation_notices_item", xmToggleButtonWidgetClass, @@ -6995,7 +6995,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_items.Use_strict_MIME_character_encoding_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 81, "Use strict MIME character encoding")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 81, "Use strict MIME character encoding")); instance->adv_def_cb_items.Use_strict_MIME_character_encoding_item = XtVaCreateManagedWidget("dtb_options_adv_def_cb_use_strict_m_i_m_e_character_encoding_item", xmToggleButtonWidgetClass, @@ -7010,7 +7010,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_items.Use_network_aware_mail_file_locking_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 82, "Use network aware mail file locking")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 82, "Use network aware mail file locking")); instance->adv_def_cb_items.Use_network_aware_mail_file_locking_item = XtVaCreateManagedWidget("dtb_options_adv_def_cb_use_network_aware_mail_file_locking_item", xmToggleButtonWidgetClass, @@ -7025,7 +7025,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_items.Ignore_host_name_in_address_allnet_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 83, "Ignore host name in address (allnet)")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 83, "Ignore host name in address (allnet)")); instance->adv_def_cb_items.Ignore_host_name_in_address_allnet_item = XtVaCreateManagedWidget("dtb_options_adv_def_cb_ignore_host_name_in_address_allnet_item", xmToggleButtonWidgetClass, @@ -7040,7 +7040,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_items.Include_me_when_I_Reply_to_all_metoo_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 84, "Include me when I \"Reply to All\" (metoo)")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 84, "Include me when I \"Reply to All\" (metoo)")); instance->adv_def_cb_items.Include_me_when_I_Reply_to_all_metoo_item = XtVaCreateManagedWidget("dtb_options_adv_def_cb_include_me_when_i_reply_to_all_metoo_item", xmToggleButtonWidgetClass, @@ -7055,7 +7055,7 @@ dtb_options_adv_def_cb_create( return -1; if (instance->adv_def_cb_items.Use_local_name_username_item == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 85, "Use local name: username =")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 85, "Use local name: username =")); instance->adv_def_cb_items.Use_local_name_username_item = XtVaCreateManagedWidget("dtb_options_adv_def_cb_use_local_name_username_item", xmToggleButtonWidgetClass, @@ -7214,7 +7214,7 @@ dtb_options_local_name_add_but_create( XmString label_xmstring = NULL; if (instance->local_name_add_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 29, "Add")); instance->local_name_add_but = XtVaCreateWidget("dtb_options_local_name_add_but", xmPushButtonWidgetClass, @@ -7251,7 +7251,7 @@ dtb_options_local_name_del_but_create( XmString label_xmstring = NULL; if (instance->local_name_del_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 30, "Delete")); instance->local_name_del_but = XtVaCreateWidget("dtb_options_local_name_del_but", xmPushButtonWidgetClass, @@ -7288,7 +7288,7 @@ dtb_options_local_name_chg_but_create( XmString label_xmstring = NULL; if (instance->local_name_chg_but == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 31, "Change")); instance->local_name_chg_but = XtVaCreateWidget("dtb_options_local_name_chg_but", xmPushButtonWidgetClass, @@ -7325,7 +7325,7 @@ dtb_options_ok_button_create( XmString label_xmstring = NULL; if (instance->ok_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 86, "OK")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 86, "OK")); instance->ok_button = XtVaCreateWidget("dtb_options_ok_button", xmPushButtonWidgetClass, @@ -7365,7 +7365,7 @@ dtb_options_reset_button_create( XmString label_xmstring = NULL; if (instance->reset_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 87, "Reset")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 87, "Reset")); instance->reset_button = XtVaCreateWidget("dtb_options_reset_button", xmPushButtonWidgetClass, @@ -7405,7 +7405,7 @@ dtb_options_cancel_button_create( XmString label_xmstring = NULL; if (instance->cancel_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 88, "Cancel")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 88, "Cancel")); instance->cancel_button = XtVaCreateWidget("dtb_options_cancel_button", xmPushButtonWidgetClass, @@ -7476,7 +7476,7 @@ dtb_options_apply_button_create( XmString label_xmstring = NULL; if (instance->apply_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 89, "Apply")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 89, "Apply")); instance->apply_button = XtVaCreateWidget("dtb_options_apply_button", xmPushButtonWidgetClass, @@ -7516,7 +7516,7 @@ dtb_options_help_button_create( XmString label_xmstring = NULL; if (instance->help_button == NULL) { - label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 90, "Help")); + label_xmstring = XmStringCreateLocalized(CATGETS(Dtb_project_catd, 2, 90, "Help")); instance->help_button = XtVaCreateWidget("dtb_options_help_button", xmPushButtonWidgetClass, diff --git a/cde/programs/dtmail/include/DtMail/Common.h b/cde/programs/dtmail/include/DtMail/Common.h index b95cbd627..7e709f928 100644 --- a/cde/programs/dtmail/include/DtMail/Common.h +++ b/cde/programs/dtmail/include/DtMail/Common.h @@ -44,7 +44,7 @@ #define _COMMON_H #include -#include +#include
// XPG3 compatible. NL_CAT_LOCALE is set to non-zero in XPG4. Use NL_CAT_LOCALE // for all catopen() calls. diff --git a/cde/programs/dtmail/include/DtMail/DtMail.hh b/cde/programs/dtmail/include/DtMail/DtMail.hh index 7c9e40742..f8d575bb0 100644 --- a/cde/programs/dtmail/include/DtMail/DtMail.hh +++ b/cde/programs/dtmail/include/DtMail/DtMail.hh @@ -52,7 +52,7 @@ #include #endif #include -/*#include */ +/*#include
*/ #include #include #include diff --git a/cde/programs/dtmail/include/DtMail/DtMailError.hh b/cde/programs/dtmail/include/DtMail/DtMailError.hh index f86e71796..5d6b314f2 100644 --- a/cde/programs/dtmail/include/DtMail/DtMailError.hh +++ b/cde/programs/dtmail/include/DtMail/DtMailError.hh @@ -48,7 +48,7 @@ #include #include #include -#include +#include
// // Name of the messaging database file. diff --git a/cde/programs/dtmail/include/MotifApp/dtmailopts.h b/cde/programs/dtmail/include/MotifApp/dtmailopts.h index 3c16ac37e..a96c51574 100644 --- a/cde/programs/dtmail/include/MotifApp/dtmailopts.h +++ b/cde/programs/dtmail/include/MotifApp/dtmailopts.h @@ -43,7 +43,7 @@ #include #include -#include +#include
#define DTB_PROJECT_CATALOG "dtmailopts" /* Handle for standard message catalog for the project */ extern nl_catd Dtb_project_catd; diff --git a/cde/programs/dtmail/include/utils/NLS.hh b/cde/programs/dtmail/include/utils/NLS.hh deleted file mode 100644 index e56ea5006..000000000 --- a/cde/programs/dtmail/include/utils/NLS.hh +++ /dev/null @@ -1,53 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -// $XConsortium: NLS.hh /main/2 1996/05/09 20:05:27 drk $ -/* - *+SNOTICE - * - * RESTRICTED CONFIDENTIAL INFORMATION: - * - * The information in this document is subject to special - * restrictions in a confidential disclosure agreement bertween - * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this - * document outside HP, IBM, Sun, USL, SCO, or Univel wihtout - * Sun's specific written approval. This documment and all copies - * and derivative works thereof must be returned or destroyed at - * Sun's request. - * - * Copyright 1993 Sun Microsystems, Inc. All rights reserved. - * - *+ENOTICE - */ - -#ifndef _NLS_HH -#define _NLS_HH - -char *catgets_cache2(nl_catd catd, int set, int num, char *dflt); - -#ifdef hpV4 -# define GETMSG(catd, set_num, msg_num, def_str) catgets_cache2(catd, set_num, msg_num, def_str) -#else -# define GETMSG(catd, set_num, msg_num, def_str) catgets(catd, set_num, msg_num, def_str) -#endif - -#endif diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailError.C b/cde/programs/dtmail/libDtMail/Common/DtMailError.C index 6a22794b2..3e2e9f420 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailError.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailError.C @@ -400,12 +400,6 @@ DtMailEnv::DtMailEnv() _error_minor_code = DTME_NoError; } -#ifdef hpV4 -#define GETMSG(catd, set, msg, dft) _DtCatgetsCached(catd, set, msg, dft) -#else -#define GETMSG(catd, set, msg, dft) catgets(catd, set, msg, dft) -#endif - char * DtMailEnv::getMessageText(int set, int msg, char *dft) { @@ -415,10 +409,10 @@ DtMailEnv::getMessageText(int set, int msg, char *dft) if ((oneTimeFlag == 0) && (_errorCatalog == (nl_catd) -1)) { oneTimeFlag++; - _errorCatalog = catopen((char*) DtMailCatalogDataFile, NL_CAT_LOCALE); + _errorCatalog = CATOPEN((char*) DtMailCatalogDataFile, NL_CAT_LOCALE); } if (_errorCatalog != (nl_catd) -1) - message = GETMSG(_errorCatalog, set, msg, dft); + message = CATGETS(_errorCatalog, set, msg, dft); return message; } diff --git a/cde/programs/dtpad/dtpad.c b/cde/programs/dtpad/dtpad.c index ab16cb2b8..12779a29c 100644 --- a/cde/programs/dtpad/dtpad.c +++ b/cde/programs/dtpad/dtpad.c @@ -61,7 +61,7 @@ #ifndef NO_MESSAGE_CATALOG # define TRUE 1 # define FALSE 0 -# include +# include
#endif extern Editor *pPadList; /* declared in main.c */ diff --git a/cde/programs/dtpad/dtpad.h b/cde/programs/dtpad/dtpad.h index 711e15da1..ff0c9db3d 100644 --- a/cde/programs/dtpad/dtpad.h +++ b/cde/programs/dtpad/dtpad.h @@ -745,7 +745,7 @@ extern void RestoreInitialServerResources( extern char * _DtpadGetMessage( int set, int number, - char *string); + const char *string); #endif diff --git a/cde/programs/dtpad/main.c b/cde/programs/dtpad/main.c index 84b31aa5a..583035042 100644 --- a/cde/programs/dtpad/main.c +++ b/cde/programs/dtpad/main.c @@ -113,7 +113,7 @@ #ifndef NO_MESSAGE_CATALOG # define TRUE 1 # define FALSE 0 -# include +# include
# if !defined(NL_CAT_LOCALE) # define NL_CAT_LOCALE 0 # endif @@ -1703,27 +1703,19 @@ char * _DtpadGetMessage( int set, int number, - char *string ) + const char *string) { - char *msg; - nl_catd catopen(); - char *catgets(); static int first = 1; - static nl_catd nlmsg_fd; + static nl_catd nlmsg_fd = (nl_catd) -1; if ( first ) { first = 0; - nlmsg_fd = catopen(_DTPAD_CAT_NAME, NL_CAT_LOCALE); + nlmsg_fd = CATOPEN(_DTPAD_CAT_NAME, NL_CAT_LOCALE); - if (nlmsg_fd == -1) + if (nlmsg_fd == (nl_catd) -1) perror("catopen"); } -#if defined(hpV4) - msg = _DtCatgetsCached(nlmsg_fd, set, number, string); -#else - msg = catgets(nlmsg_fd, set, number, string); -#endif - return (msg); + return CATGETS(nlmsg_fd, set, number, string); } #endif /* NO_MESSAGE_CATALOG */ diff --git a/cde/programs/dtpdm/PdmMsgs.c b/cde/programs/dtpdm/PdmMsgs.c index 177759384..fb1d7ecc9 100644 --- a/cde/programs/dtpdm/PdmMsgs.c +++ b/cde/programs/dtpdm/PdmMsgs.c @@ -36,7 +36,7 @@ #ifdef I18N_MSG -#include +#include
#if !defined(NL_CAT_LOCALE) #define NL_CAT_LOCALE 0 @@ -81,21 +81,14 @@ DtPdmGetMessage( int n, char * s) { - char *msg; - nl_catd catopen(); - char *catgets(); static int first = 1; static nl_catd nlmsg_fd; - - if(set == -1 || n == -1) - return s; - + if(first) { first = 0; - nlmsg_fd = catopen(DTPDM_CAT_NAME, NL_CAT_LOCALE); + nlmsg_fd = CATOPEN(DTPDM_CAT_NAME, NL_CAT_LOCALE); } - msg=catgets(nlmsg_fd,set,n,s); - return (msg); + return CATGETS(nlmsg_fd,set,n,s); } #endif /* I18N_MSG */ diff --git a/cde/programs/dtpdm/PdmMsgs.h b/cde/programs/dtpdm/PdmMsgs.h index a23d6c80a..98b63519c 100644 --- a/cde/programs/dtpdm/PdmMsgs.h +++ b/cde/programs/dtpdm/PdmMsgs.h @@ -37,7 +37,7 @@ #define _PdmMsgs_h #ifdef I18N_MSG -#include +#include
#define DTPDM_GETMESSAGE(set, number, string) \ DtPdmGetMessage(set, number, string) diff --git a/cde/programs/dtpdmd/Imakefile b/cde/programs/dtpdmd/Imakefile index 8dc7eb5fc..5e4db97b8 100644 --- a/cde/programs/dtpdmd/Imakefile +++ b/cde/programs/dtpdmd/Imakefile @@ -34,13 +34,12 @@ SRCS = dispatch.c dtpdmd.c mailbox.c \ OBJS = dispatch.o dtpdmd.o mailbox.o \ manager.o records.o setup.o \ - util.o nlmsg.o + util.o nlmsg.o \ + $(CDELIBSRC)/DtSvc/DtUtil2/MsgCat.o #if defined(LinuxArchitecture) || defined(BSDArchitecture) /* On Linux, just use the system provided Xau */ DEPXAUTHLIB = #endif - ComplexProgramTarget(dtpdmd) - diff --git a/cde/programs/dtpdmd/nlmsg.c b/cde/programs/dtpdmd/nlmsg.c index 4aa862c5c..23ba55c77 100644 --- a/cde/programs/dtpdmd/nlmsg.c +++ b/cde/programs/dtpdmd/nlmsg.c @@ -34,18 +34,12 @@ * (c) Copyright 1996 Hitachi. */ -#ifdef I18N_MSG - -#include +#include "nlmsg.h" #if !defined(NL_CAT_LOCALE) #define NL_CAT_LOCALE 0 #endif -#define DTPDMD_CAT_NAME "dtpdmd" - -#endif /* I18N_MSG */ - /* * ------------------------------------------------------------------------ * Default message values @@ -108,8 +102,6 @@ const char DtPdmdMsg_0015[] = "\ const char DtPdmdMsg_0016[] = "%1$s: error, cannot open log file \"%2$s\". Turning off stderr message logging\n"; -#ifdef I18N_MSG - /* * ------------------------------------------------------------------------ * Name: DtPdmdGetMessage @@ -126,26 +118,17 @@ const char DtPdmdMsg_0016[] = "%1$s: error, cannot open log file \"%2$s\". Turni * Returns: the string for set 'set' and number 'n'. */ const char * -DtPdmdGetMessage( - int set, - int n, - char * s) +DtPdmdGetMessage(int set, + int n, + const char *s) { - char *msg; - nl_catd catopen(); - char *catgets(); static int first = 1; - static nl_catd nlmsg_fd; - - if(set == -1 || n == -1) - return s; - - if(first) + static nl_catd nlmsg_fd = (nl_catd) -1; + + if (first) { first = 0; - nlmsg_fd = catopen(DTPDMD_CAT_NAME, NL_CAT_LOCALE); + nlmsg_fd = CATOPEN("dtpdmd", NL_CAT_LOCALE); } - msg=catgets(nlmsg_fd,set,n,s); - return (msg); + return CATGETS(nlmsg_fd, set, n, s); } -#endif /* I18N_MSG */ diff --git a/cde/programs/dtpdmd/nlmsg.h b/cde/programs/dtpdmd/nlmsg.h index 157d3b78b..c3bf1dd69 100644 --- a/cde/programs/dtpdmd/nlmsg.h +++ b/cde/programs/dtpdmd/nlmsg.h @@ -36,65 +36,46 @@ #ifndef _PdmdMsgs_h #define _PdmdMsgs_h -#ifdef I18N_MSG -#include -#define DTPDMD_GETMESSAGE(set, number, string) \ - DtPdmdGetMessage(set, number, string) +#include
-#else /* I18N_MSG */ -#define DTPDMD_GETMESSAGE(set, number, string) (string) -#endif /* I18N_MSG */ +#define PDMD_MSG_1 DtPdmdGetMessage(1, 1, DtPdmdMsg_0001) +#define PDMD_MSG_2 DtPdmdGetMessage(1, 2, DtPdmdMsg_0002) +#define PDMD_MSG_3 DtPdmdGetMessage(1, 3, DtPdmdMsg_0003) +#define PDMD_MSG_4 DtPdmdGetMessage(1, 4, DtPdmdMsg_0004) +#define PDMD_MSG_5 DtPdmdGetMessage(1, 5, DtPdmdMsg_0005) +#define PDMD_MSG_6 DtPdmdGetMessage(1, 6, DtPdmdMsg_0006) +#define PDMD_MSG_7 DtPdmdGetMessage(1, 7, DtPdmdMsg_0007) +#define PDMD_MSG_8 DtPdmdGetMessage(1, 8, DtPdmdMsg_0008) +#define PDMD_MSG_9 DtPdmdGetMessage(1, 9, DtPdmdMsg_0009) +#define PDMD_MSG_10 DtPdmdGetMessage(1, 10, DtPdmdMsg_0010) +#define PDMD_MSG_11 DtPdmdGetMessage(1, 11, DtPdmdMsg_0011) +#define PDMD_MSG_12 DtPdmdGetMessage(1, 12, DtPdmdMsg_0012) +#define PDMD_MSG_13 DtPdmdGetMessage(1, 13, DtPdmdMsg_0013) +#define PDMD_MSG_14 DtPdmdGetMessage(1, 14, DtPdmdMsg_0014) +#define PDMD_MSG_15 DtPdmdGetMessage(1, 15, DtPdmdMsg_0015) +#define PDMD_MSG_16 DtPdmdGetMessage(1, 16, DtPdmdMsg_0016) -/*** const causes the HP compiler to complain. Remove reference until *** - *** the build and integration people can figure out how to get this to *** - *** work. ***/ - -/* #define CONST const */ -#define CONST - -#define PDMD_MSG_1 DTPDMD_GETMESSAGE(1, 1, DtPdmdMsg_0001) -#define PDMD_MSG_2 DTPDMD_GETMESSAGE(1, 2, DtPdmdMsg_0002) -#define PDMD_MSG_3 DTPDMD_GETMESSAGE(1, 3, DtPdmdMsg_0003) -#define PDMD_MSG_4 DTPDMD_GETMESSAGE(1, 4, DtPdmdMsg_0004) -#define PDMD_MSG_5 DTPDMD_GETMESSAGE(1, 5, DtPdmdMsg_0005) -#define PDMD_MSG_6 DTPDMD_GETMESSAGE(1, 6, DtPdmdMsg_0006) -#define PDMD_MSG_7 DTPDMD_GETMESSAGE(1, 7, DtPdmdMsg_0007) -#define PDMD_MSG_8 DTPDMD_GETMESSAGE(1, 8, DtPdmdMsg_0008) -#define PDMD_MSG_9 DTPDMD_GETMESSAGE(1, 9, DtPdmdMsg_0009) -#define PDMD_MSG_10 DTPDMD_GETMESSAGE(1, 10, DtPdmdMsg_0010) -#define PDMD_MSG_11 DTPDMD_GETMESSAGE(1, 11, DtPdmdMsg_0011) -#define PDMD_MSG_12 DTPDMD_GETMESSAGE(1, 12, DtPdmdMsg_0012) -#define PDMD_MSG_13 DTPDMD_GETMESSAGE(1, 13, DtPdmdMsg_0013) -#define PDMD_MSG_14 DTPDMD_GETMESSAGE(1, 14, DtPdmdMsg_0014) -#define PDMD_MSG_15 DTPDMD_GETMESSAGE(1, 15, DtPdmdMsg_0015) -#define PDMD_MSG_16 DTPDMD_GETMESSAGE(1, 16, DtPdmdMsg_0016) - -extern CONST char DtPdmdMsg_0001[]; -extern CONST char DtPdmdMsg_0002[]; -extern CONST char DtPdmdMsg_0003[]; -extern CONST char DtPdmdMsg_0004[]; -extern CONST char DtPdmdMsg_0005[]; -extern CONST char DtPdmdMsg_0006[]; -extern CONST char DtPdmdMsg_0007[]; -extern CONST char DtPdmdMsg_0008[]; -extern CONST char DtPdmdMsg_0009[]; -extern CONST char DtPdmdMsg_0010[]; -extern CONST char DtPdmdMsg_0011[]; -extern CONST char DtPdmdMsg_0012[]; -extern CONST char DtPdmdMsg_0013[]; -extern CONST char DtPdmdMsg_0014[]; -extern CONST char DtPdmdMsg_0015[]; -extern CONST char DtPdmdMsg_0016[]; - -#ifdef I18N_MSG +extern const char DtPdmdMsg_0001[]; +extern const char DtPdmdMsg_0002[]; +extern const char DtPdmdMsg_0003[]; +extern const char DtPdmdMsg_0004[]; +extern const char DtPdmdMsg_0005[]; +extern const char DtPdmdMsg_0006[]; +extern const char DtPdmdMsg_0007[]; +extern const char DtPdmdMsg_0008[]; +extern const char DtPdmdMsg_0009[]; +extern const char DtPdmdMsg_0010[]; +extern const char DtPdmdMsg_0011[]; +extern const char DtPdmdMsg_0012[]; +extern const char DtPdmdMsg_0013[]; +extern const char DtPdmdMsg_0014[]; +extern const char DtPdmdMsg_0015[]; +extern const char DtPdmdMsg_0016[]; /* Message IDs */ -extern const char * DtPdmGetMessage( - int set, - int n, - const char * s); - -#endif /* I18N_MSG */ +const char *DtPdmdGetMessage(int set, + int n, + const char *s); #endif /* _PdmdMsgs_h */ diff --git a/cde/programs/dtprintinfo/DtPrintinfo.C b/cde/programs/dtprintinfo/DtPrintinfo.C index dbc12fb0e..8e4c92b7b 100644 --- a/cde/programs/dtprintinfo/DtPrintinfo.C +++ b/cde/programs/dtprintinfo/DtPrintinfo.C @@ -52,7 +52,7 @@ extern "C" { extern int seteuid(uid_t); } #ifdef hpux static char **msg_strings = NULL; -// Cannot use multiple catgets paramemter calls in functions because the +// Cannot use multiple catgets parameter calls in functions because the // previous catgets returned value is overwritten by later catgets calls // Example: this would fail on HP systems // sprintf(buf, "%s %s" catgets(...), catgets(...)) @@ -63,7 +63,7 @@ char *Catgets(nl_catd catd, int set_num, int msg_num, char *s) return s; if (!msg_strings[msg_num]) - msg_strings[msg_num] = strdup(catgets(catd, set_num, msg_num, s)); + msg_strings[msg_num] = strdup(CATGETS(catd, set_num, msg_num, s)); return msg_strings[msg_num]; } #endif @@ -89,9 +89,9 @@ int main(int argc, char **argv) errno = 0; #ifdef NL_CAT_LOCALE - dtprintinfo_cat = catopen("dtprintinfo", NL_CAT_LOCALE); + dtprintinfo_cat = CATOPEN("dtprintinfo", NL_CAT_LOCALE); #else - dtprintinfo_cat = catopen("dtprintinfo", 0); + dtprintinfo_cat = CATOPEN("dtprintinfo", 0); #endif if ((nl_catd) errno) diff --git a/cde/programs/dtprintinfo/dtprintinfomsg.h b/cde/programs/dtprintinfo/dtprintinfomsg.h index 9769efa32..e68daba4c 100644 --- a/cde/programs/dtprintinfo/dtprintinfomsg.h +++ b/cde/programs/dtprintinfo/dtprintinfomsg.h @@ -33,7 +33,7 @@ extern "C" { #endif -#include +#include
#include #include "dtprintinfo_msg.h" @@ -41,14 +41,8 @@ extern "C" { extern nl_catd dtprintinfo_cat; -#ifdef hpux -extern char *Catgets(nl_catd catd, int set_num, int msg_num, char *s); #define MESSAGE(msg) \ - Catgets(dtprintinfo_cat,DTPRINTER_SET,msg,TXT_DTPRINTER_SET_ ## msg) -#else -#define MESSAGE(msg) \ - catgets(dtprintinfo_cat,DTPRINTER_SET,msg,TXT_DTPRINTER_SET_ ## msg) -#endif + CATGETS(dtprintinfo_cat,DTPRINTER_SET,msg,TXT_DTPRINTER_SET_ ## msg) #ifdef __cplusplus } /* Close scope of 'extern "C"' declaration which encloses file. */ diff --git a/cde/programs/dtscreen/dtscreen.c b/cde/programs/dtscreen/dtscreen.c index a02444502..e51a053e1 100644 --- a/cde/programs/dtscreen/dtscreen.c +++ b/cde/programs/dtscreen/dtscreen.c @@ -101,10 +101,10 @@ /* include file for message texts */ #include -#include +#include
#define MF_DTSCREEN "dtscreen" -#include +#include
#include nl_catd scmc_catd; /* Cat descriptor for scmc conversion */ @@ -198,7 +198,7 @@ allocpixel(Colormap cmap, char *name, char *def) name, def); #else - fprintf(stderr, catgets(scmc_catd, 2, 35, + fprintf(stderr, CATGETS(scmc_catd, 2, 35, "couldn't allocate: %s, using %s instead\n"), name, def); #endif @@ -225,7 +225,7 @@ main(int argc, char *argv[]) /* set locale to what is defined by local environment */ setlocale(LC_ALL,""); - scmc_catd = catopen(MF_DTSCREEN, NL_CAT_LOCALE); + scmc_catd = CATOPEN(MF_DTSCREEN, NL_CAT_LOCALE); ProgramName = strrchr(argv[0], '/'); if (ProgramName) @@ -264,7 +264,7 @@ main(int argc, char *argv[]) */ if (!DtSaverGetWindows(dsp, &winprop, &nitems)) { - fprintf(stderr, catgets(scmc_catd, 2, 40, + fprintf(stderr, CATGETS(scmc_catd, 2, 40, "%s: Cannot locate window in which to draw. Using the -create\n" "option will cause %s to create its own window.\n"), ProgramName, ProgramName); diff --git a/cde/programs/dtscreen/resource.c b/cde/programs/dtscreen/resource.c index 6d16b235d..ab2758f91 100644 --- a/cde/programs/dtscreen/resource.c +++ b/cde/programs/dtscreen/resource.c @@ -61,7 +61,7 @@ /* include file for message texts */ #include -#include +#include
#define MF_DTSCREEN "dtscreen.cat" #include @@ -247,7 +247,7 @@ Syntax(char *badOption) fprintf(stderr, "%s: bad command line option: %s.\n\n", ProgramName, badOption); #else - fprintf(stderr, catgets(scmc_catd, 2, 1, + fprintf(stderr, CATGETS(scmc_catd, 2, 1, "%s: Bad command line option: %s.\n\n"), ProgramName, badOption); #endif @@ -286,7 +286,7 @@ Syntax(char *badOption) fprintf(stderr, "\nType %s -help for a full description.\n\n", ProgramName); #else - fprintf(stderr, catgets(scmc_catd, 2, 2, + fprintf(stderr, CATGETS(scmc_catd, 2, 2, "\nType %s -help for a full description.\n\n"), ProgramName); #endif @@ -303,7 +303,7 @@ Help(void) fprintf(stderr, "where options include:\n"); #else - fprintf(stderr, catgets(scmc_catd, 2, 3, + fprintf(stderr, CATGETS(scmc_catd, 2, 3, "Usage:\n %s [-options ...]\n\n\ where options include:\n"), ProgramName); #endif @@ -316,7 +316,7 @@ Help(void) fprintf(stderr, " %-28s %s\n", "-mode mode", "animation mode"); fprintf(stderr, " where mode is one of:\n"); #else - fprintf(stderr, catgets(scmc_catd, 2, 5, + fprintf(stderr, CATGETS(scmc_catd, 2, 5, " %-28s %s\n\t where mode is one of:\n"), "-mode mode", "animation mode"); #endif @@ -398,7 +398,7 @@ GetResource(XrmDatabase database, char *parentname, char *parentclass, error("%s: GetResource - couldn't allocate memory"); #else { - fprintf(stderr, catgets(scmc_catd, 2, 18, + fprintf(stderr, CATGETS(scmc_catd, 2, 18, "%s: GetResource - couldn't allocate memory.\n"),ProgramName); exit(1); } @@ -502,7 +502,7 @@ open_display(void) error("%s: Malformed -display argument, \"%s\"\n", display); #else { - fprintf(stderr, catgets(scmc_catd, 2, 19, + fprintf(stderr, CATGETS(scmc_catd, 2, 19, "%s: Malformed -display argument: %s.\n"), ProgramName,display); exit(1); } @@ -515,7 +515,7 @@ open_display(void) error("%s: unable to open display %s.\n", display); #else { - fprintf(stderr, catgets(scmc_catd, 2, 17, + fprintf(stderr, CATGETS(scmc_catd, 2, 17, "%s: Unable to open display %s.\n"),ProgramName, display); exit(1); } @@ -716,7 +716,7 @@ void CheckResources(void) #ifdef MIT_R5 fprintf(stderr, "Unknown mode: "); #else - fprintf(stderr, "%s", catgets(scmc_catd, 2, 7, + fprintf(stderr, "%s", CATGETS(scmc_catd, 2, 7, "Unknown mode: ")); #endif Syntax(mode); diff --git a/cde/programs/dtsr/Imakefile b/cde/programs/dtsr/Imakefile index e7c801b9d..b58c478bd 100644 --- a/cde/programs/dtsr/Imakefile +++ b/cde/programs/dtsr/Imakefile @@ -10,7 +10,7 @@ # INCLUDES = -I. -I$(DTSEARCHSRC) -I$(DTSEARCHSRC)/raima -DEFINES = -DMAIN_PROGRAM +DEFINES = -DMAIN_PROGRAM -DNO_XLIB #ifdef AlphaArchitecture EXTRA_DEFINES = -DBYTE_SWAP -D_XOPEN_SOURCE -D_OSF_SOURCE @@ -36,41 +36,43 @@ SYS_LIBRARIES = -lc -lm PROGRAMS = $(PROGRAM1) $(PROGRAM2) $(PROGRAM3) $(PROGRAM4) $(PROGRAM5) \ $(PROGRAM6) $(PROGRAM7) $(PROGRAM9) $(PROGRAM10) +EXTRA_OBJS = MsgCat.o + PROGRAM1 = dtsrcreate SRCS1 = dtsrcreate.c -OBJS1 = dtsrcreate.o +OBJS1 = dtsrcreate.o $(EXTRA_OBJS) PROGRAM2 = dtsrdbrec SRCS2 = dtsrdbrec.c -OBJS2 = dtsrdbrec.o +OBJS2 = dtsrdbrec.o $(EXTRA_OBJS) PROGRAM3 = dtsrhan SRCS3 = dtsrhan.c -OBJS3 = dtsrhan.o +OBJS3 = dtsrhan.o $(EXTRA_OBJS) PROGRAM4 = dtsrload SRCS4 = dtsrload.c -OBJS4 = dtsrload.o +OBJS4 = dtsrload.o $(EXTRA_OBJS) PROGRAM5 = dtsrindex SRCS5 = dtsrindex.c -OBJS5 = dtsrindex.o +OBJS5 = dtsrindex.o $(EXTRA_OBJS) PROGRAM6 = dtsrdelete SRCS6 = tomita.c -OBJS6 = tomita.o +OBJS6 = tomita.o $(EXTRA_OBJS) PROGRAM7 = dtsrclean SRCS7 = dtsrclean.c -OBJS7 = dtsrclean.o +OBJS7 = dtsrclean.o $(EXTRA_OBJS) PROGRAM9 = huffcode SRCS9 = huffcode.c -OBJS9 = huffcode.o +OBJS9 = huffcode.o $(EXTRA_OBJS) PROGRAM10 = dtsrkdump SRCS10 = dtsrkdump.c -OBJS10 = dtsrkdump.o +OBJS10 = dtsrkdump.o $(EXTRA_OBJS) ComplexProgramTarget_1($(PROGRAM1),$(LOCAL_LIBRARIES), /* */) ComplexProgramTarget_2($(PROGRAM2),$(LOCAL_LIBRARIES), /* */) @@ -81,3 +83,5 @@ ComplexProgramTarget_6($(PROGRAM6),$(LOCAL_LIBRARIES), /* */) ComplexProgramTarget_7($(PROGRAM7),$(LOCAL_LIBRARIES) $(BYTE_SWAP_LIB), /* */) ComplexProgramTarget_9($(PROGRAM9),$(LOCAL_LIBRARIES), /* */) ComplexProgramTarget_10($(PROGRAM10),$(LOCAL_LIBRARIES), /* */) + +LinkSourceFile(MsgCat.c,$(DTSVCSRC)/DtUtil2) diff --git a/cde/programs/dtsr/dtsrclean.c b/cde/programs/dtsr/dtsrclean.c index 235b9c829..392b30de4 100644 --- a/cde/programs/dtsr/dtsrclean.c +++ b/cde/programs/dtsr/dtsrclean.c @@ -196,7 +196,7 @@ static void signal_shutdown (int sig) /* Prints usage statement to stderr. */ static void print_usage (void) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 1, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 1, "\nUSAGE: %s [options] \n" " Compresses unused d99 space and validates d00-d99 links.\n" " -p Progress dots printed every records (default %lu).\n" @@ -250,12 +250,12 @@ static void print_progress (char *label) } TERMINATE_LINE (); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 2, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 2, "%s: %s Compression %d%% (about %lu KB) in %ld:%02ld min:sec.\n") , aa_argv0, label, compression, bytes_in / 1000L, seconds / 60UL, seconds % 60UL); if (*label == 'F') - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 3, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 3, "%s: Counted %ld WORDS in %s.d99.\n") , aa_argv0, (long)reccount, arg_dbname); return; @@ -275,21 +275,21 @@ static void end_of_job (int exitcode, int show_flags) { TERMINATE_LINE (); if (exitcode >= 100) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 66, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 66, "%s Aborting after interrupt signal %d.\n"), PROGNAME"66", exitcode - 100); } if (validation_mode && corruption_count == 0L) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 4, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 4, "%s: No corrupted links detected.\n") , aa_argv0); if (corruption_count > 0L) { if (max_corruption > 0L && corruption_count >= max_corruption) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 193, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 193, "%s Aborting at %ld corrupted links.\n"), PROGNAME"193", corruption_count); else - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 194, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 194, "%s Detected%s %ld corrupted/incomplete link(s).\n"), PROGNAME"194", (validation_mode) ? " and corrected" : "", @@ -301,7 +301,7 @@ static void end_of_job (int exitcode, int show_flags) if (show_flags & SHOW_USAGE) print_usage (); if (show_flags & SHOW_EXITCODE) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 5, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 5, "%s: Exit code = %d.\n") , aa_argv0, exitcode); DtSearchExit (exitcode); } /* end_of_job() */ @@ -342,7 +342,7 @@ static void user_args_processor (int argc, char **argv) goto UNKNOWN_ARG; case 'm': - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 301, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 301, "%s The -m argument is no longer necessary.\n"), PROGNAME"301"); break; @@ -356,7 +356,7 @@ static void user_args_processor (int argc, char **argv) else { INVALID_ARG: fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 177, + CATGETS(dtsearch_catd, MS_dtsrclean, 177, "%s Invalid %.2s argument.\n"), PROGNAME"177", argptr); oops = TRUE; @@ -368,7 +368,7 @@ static void user_args_processor (int argc, char **argv) if (argptr[2] != '\0') { if ((frecids = fopen (argptr + 2, "w")) == NULL) { fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 802, + CATGETS(dtsearch_catd, MS_dtsrclean, 802, "%s Unable to open '%s' to output" " unreferenced d00 records:\n %s\n"), PROGNAME"802", argptr, strerror(errno)); @@ -395,7 +395,7 @@ static void user_args_processor (int argc, char **argv) UNKNOWN_ARG: default: - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 159, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 159, "%s Unknown argument: '%s'.\n"), PROGNAME"159", argptr); oops = TRUE; @@ -409,15 +409,15 @@ static void user_args_processor (int argc, char **argv) */ if (argc != 2) { if (argc <= 0) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 210, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 210, "%s Missing required dbname argument.\n"), PROGNAME"210"); if (argc <= 1) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 211, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 211, "%s Missing required newpath argument.\n"), PROGNAME"211"); if (argc > 2) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 212, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 212, "%s Too many arguments.\n"), PROGNAME"212"); oops = TRUE; @@ -428,7 +428,7 @@ static void user_args_processor (int argc, char **argv) /* DBNAME */ arg_dbname = argv[0]; if (strlen (arg_dbname) > 8) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 229, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 229, "%s Invalid database name '%s'.\n"), PROGNAME"229", arg_dbname); end_of_job (2, SHOW_USAGE); @@ -464,7 +464,7 @@ static void validation_error (DB_ADDR dbaorig) slot = ((slot + 1) * recslots - dba_offset) | (OR_D00 << 24); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 6, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 6, " DBA = %d:%ld (x%02x:%06lx), orig addr val = x%08lx\n" " Word='%c%s' offset=%ld addrs=%ld free=%d\n") , OR_D00, slot, OR_D00, slot, dbaorig, @@ -490,14 +490,14 @@ static void open_all_files struct stat fstatbuf; if ((*fp = fopen (fname, mode)) == NULL) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 439, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 439, "%s Can't open %s: %s\n"), PROGNAME"439", fname, strerror (errno)); *oops = TRUE; return; } if (fstat (fileno (*fp), &fstatbuf) == -1) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 440, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 440, "%s Can't access status of %s: %s\n"), PROGNAME"440", fname, strerror (errno)); *oops = TRUE; @@ -505,7 +505,7 @@ static void open_all_files } if (size) if ((*size = fstatbuf.st_size) <= 0L) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 499, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 499, "%s %s is empty.\n"), PROGNAME"499", fname); *oops = TRUE; @@ -524,7 +524,7 @@ static void copy_old_d2x_to_new char readbuf[1024 + 32]; int i, j; - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 7, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 7, "%s: Copying from old d2x files to %s...\n") , aa_argv0, fname_new); for (;;) { /* loop ends when eof set on input stream */ @@ -532,14 +532,14 @@ static void copy_old_d2x_to_new i = fread (readbuf, 1, sizeof (readbuf), fp_old); /* byte swap not required on pure copy operation */ if (errno) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 517, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 517, "%s Read error on %s: %s.\n"), PROGNAME"517", fname_old, strerror (errno)); end_of_job (3, SHOW_EXITCODE); } j = fwrite (readbuf, 1, i, fp_new); if (i != j) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 489, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 489, "%s Write error on %s: %s.\n"), PROGNAME"489", fname_new, strerror (errno)); end_of_job (3, SHOW_EXITCODE); @@ -705,7 +705,7 @@ static void copy_new_d99 (long keyfield) ret = fread (word_addrs, sizeof(DB_ADDR), (size_t)num_reads, fp_d99_old); if (errno || -1 == ret) { TERMINATE_LINE (); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 657, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 657, "%s Read error on %s: %s.\n"), PROGNAME"657", fname_d99_old, strerror (errno)); end_of_job (4, SHOW_PROGRESS + SHOW_EXITCODE); @@ -779,7 +779,7 @@ static void copy_new_d99 (long keyfield) if (dbaorig == -1L) { TERMINATE_LINE (); fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 111, + CATGETS(dtsearch_catd, MS_dtsrclean, 111, "*** %s DBA in d99 = -1. " "Probable overrun into expansion\n" " area due to incorrect count values " @@ -806,7 +806,7 @@ static void copy_new_d99 (long keyfield) if (dba >= total_num_addrs) { TERMINATE_LINE (); fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 222, + CATGETS(dtsearch_catd, MS_dtsrclean, 222, "*** %s DBA in d99 not in d00," " slot > max num docs.\n"), PROGNAME"222"); @@ -833,7 +833,7 @@ static void copy_new_d99 (long keyfield) *bvptr |= (is_odd_nibble) ? 0x04 : 0x40; TERMINATE_LINE (); fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 333, + CATGETS(dtsearch_catd, MS_dtsrclean, 333, "*** %s DBA in d99 does not exist in d00.\n"), PROGNAME"333"); validation_error (dbaorig); @@ -921,7 +921,7 @@ static void copy_new_d99 (long keyfield) if (num_writes != num_reads) { WRITE_ERROR: fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 665, + CATGETS(dtsearch_catd, MS_dtsrclean, 665, "%s Write error on %s: %s.\n"), PROGNAME"665", fname_d99_new, strerror(errno)); end_of_job (4, SHOW_PROGRESS + SHOW_EXITCODE); @@ -1001,13 +1001,13 @@ int main (int argc, char *argv[]) aa_argv0 = argv[0]; setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); time (&starttime); 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"), localtime (&starttime)); - printf ( catgets(dtsearch_catd, MS_dtsrclean, 11, + printf ( CATGETS(dtsearch_catd, MS_dtsrclean, 11, "%s Version %s. Run %s.\n") , aa_argv0, AUSAPI_VERSION, dbfpath); @@ -1037,11 +1037,11 @@ int main (int argc, char *argv[]) if ((ptr = getenv ("DBFPATH")) != NULL) { if (*ptr == 0) fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 12, + CATGETS(dtsearch_catd, MS_dtsrclean, 12, "%s: Ignoring empty DBFPATH environment variable.\n") , aa_argv0); else { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 13, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 13, "%s: Using DBFPATH = '%s'.\n") , aa_argv0, ptr); snprintf(full_dbname_old, sizeof(full_dbname_old), "%s", ptr); @@ -1068,7 +1068,7 @@ int main (int argc, char *argv[]) *ptr = '\0'; } if (strcmp (full_dbname_old, full_dbname_new) == 0) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 393, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 393, "%s Old and new directories are identical: '%s'.\n"), PROGNAME"393", full_dbname_old); end_of_job (2, SHOW_USAGE); @@ -1079,10 +1079,10 @@ int main (int argc, char *argv[]) */ strcat (full_dbname_old, arg_dbname); strcat (full_dbname_new, arg_dbname); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 14, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 14, "%s: Old files: '%s.d2x, .d99'.\n") , aa_argv0, full_dbname_old); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 15, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 15, "%s: New files: '%s.d2x, .d99'.\n") , aa_argv0, full_dbname_new); @@ -1126,16 +1126,16 @@ int main (int argc, char *argv[]) oops = TRUE; } if (oops) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 24, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 24, "%s: One or more new files already exist.\n") , aa_argv0); if (overlay_no) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 463, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 463, "%s Command line argument disallows file overlay.\n"), PROGNAME"463"); end_of_job (2, SHOW_EXITCODE); } - fputs (catgets(dtsearch_catd, MS_dtsrclean, 45, + fputs (CATGETS(dtsearch_catd, MS_dtsrclean, 45, " Is it ok to overlay files in new directory? [y/n] "), aa_stderr); @@ -1203,7 +1203,7 @@ int main (int argc, char *argv[]) * all holes were filled with good records. */ total_num_addrs = (dbrec.or_maxdba - (dba & 0xffffff) + 1) / recslots + 1; - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 25, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 25, "%s: curr reccnt=%ld, mxdba=%ld, sl/rec=%ld, tot#adr=%ld.\n") , aa_argv0, (long)dbrec.or_reccount, (long)dbrec.or_maxdba, (long)dbrec.or_recslots, (long)total_num_addrs); @@ -1216,7 +1216,7 @@ int main (int argc, char *argv[]) */ max_bitvec = (total_num_addrs >> 1) + 2; if ((bit_vector = malloc ((size_t)max_bitvec + 64)) == NULL) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 465, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 465, "%s WARNING: Can't allocate memory for bit vector.\n" " 'Validate' mode switched off.\n"), PROGNAME"465"); @@ -1233,7 +1233,7 @@ int main (int argc, char *argv[]) * records. */ x = dbrec.or_reccount / 50 + 1; /* x = recs per dot */ - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 26, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 26, "%s: Reading d00 file. Each dot appx %ld database documents...\n"), aa_argv0, (long)x); reccount = 0; @@ -1260,7 +1260,7 @@ int main (int argc, char *argv[]) dba1 = (dba + dba_offset) / recslots; /* ="rec number", base 1 */ if (dba1 >= total_num_addrs) { TERMINATE_LINE (); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 561, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 561, "%s DBA '%d:%ld' (rec #%ld) in d00 exceeds " "total num addrs %ld;\n" " Bit vector overflow because maxdba %ld" @@ -1286,12 +1286,12 @@ int main (int argc, char *argv[]) /* confirm that RECCOUNT record holds the correct number */ if (dbrec.or_reccount == reccount) { fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 27, + CATGETS(dtsearch_catd, MS_dtsrclean, 27, "%s: Confirmed %ld DOCUMENTS in %s.d00.\n") , aa_argv0, (long)dbrec.or_reccount, arg_dbname); } else { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 28, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 28, "%s: %ld DOCUMENTS actually in %s.d00 not =" " %ld count stored there.\n" " Count will be corrected in new d00 file.\n") , @@ -1310,7 +1310,7 @@ EXIT_INIT_VALIDATION:; dot_count = DOTS_PER_MSG; /* force initial msg after first * blk of recs */ TERMINATE_LINE (); - fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 29, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 29, "%s: Compressing into %s. Each dot appx %lu words...\n") , aa_argv0, arg_newpath, (unsigned long)recs_per_dot); @@ -1362,7 +1362,7 @@ EXIT_INIT_VALIDATION:; CRSET (PROGNAME "734", &dba, 0); CRREAD (PROGNAME "735", OR_OBJKEY, readbuf, 0); fprintf (aa_stderr, - catgets(dtsearch_catd, MS_dtsrclean, 444, + CATGETS(dtsearch_catd, MS_dtsrclean, 444, "*** %s d00 record '%s' is not referenced in d99.\n" " DBA = %d:%ld (x%02x:%06lx).\n") , PROGNAME"444", readbuf, OR_D00, diff --git a/cde/programs/dtsr/dtsrcreate.c b/cde/programs/dtsr/dtsrcreate.c index 18ca62a28..728dbe57a 100644 --- a/cde/programs/dtsr/dtsrcreate.c +++ b/cde/programs/dtsr/dtsrcreate.c @@ -169,7 +169,7 @@ static void confirm_ok_to_overwrite (char *fname) return; fclose (fptr); - printf ( catgets(dtsearch_catd, MS_initausd, 12, + printf ( CATGETS(dtsearch_catd, MS_initausd, 12, "\nFile '%s' already exists.\n" "Is it ok to overwrite it and other database files? [y,n] ") , newpath); @@ -198,7 +198,7 @@ static int change_max_wordsize (char *new_size) /* error if min and max specifications incompatible */ if (minwordsz > maxwordsz) { - printf (catgets (dtsearch_catd, MS_initausd, 5, + printf (CATGETS(dtsearch_catd, MS_initausd, 5, PROGNAME" Minimum word size %d greater " "than maximum word size %d.\n"), minwordsz, maxwordsz); @@ -218,13 +218,13 @@ static int change_max_wordsize (char *new_size) } if (maxwordsz != users_newsize) - printf (catgets (dtsearch_catd, MS_initausd, 8, + printf (CATGETS(dtsearch_catd, MS_initausd, 8, PROGNAME " Adjusted maximum word size to %d.\n"), maxwordsz); /* Give user a final warning about large word sizes */ if (maxwordsz > STANDARD_MAXWORD && language != DtSrLaDEU && !quiet_mode) - printf ("%s", catgets (dtsearch_catd, MS_initausd, 10, + printf ("%s", CATGETS(dtsearch_catd, MS_initausd, 10, PROGNAME" Specifying large maximum word sizes may " "significantly\n increase storage requirements.\n")); return TRUE; @@ -247,7 +247,7 @@ static int change_min_wordsize (char *new_size) /* error if min and max specifications incompatible */ if (minwordsz > maxwordsz) { - printf (catgets (dtsearch_catd, MS_initausd, 5, + printf (CATGETS(dtsearch_catd, MS_initausd, 5, PROGNAME " Minimum word size %d greater than " "maximum word size %d.\n"), minwordsz, maxwordsz); @@ -256,13 +256,13 @@ static int change_min_wordsize (char *new_size) if (!quiet_mode) { if (minwordsz != old_minwordsz) - printf (catgets (dtsearch_catd, MS_initausd, 6, + printf (CATGETS(dtsearch_catd, MS_initausd, 6, PROGNAME " Adjusted minimum word size to %d.\n"), minwordsz); /* give user a warning about short word sizes */ if (minwordsz < DEFAULT_MINWORD) - printf ("%s", catgets (dtsearch_catd, MS_initausd, 9, + printf ("%s", CATGETS(dtsearch_catd, MS_initausd, 9, PROGNAME " Specifying small minimum word sizes" " may require extensive\n" " editing of stopword file to prevent significantly\n" @@ -281,7 +281,7 @@ static void print_usage (void) { int i; - printf (catgets (dtsearch_catd, MS_initausd, + printf (CATGETS(dtsearch_catd, MS_initausd, 3, "\nUSAGE: %s [-options] dbname\n" " Creates and initializes DtSearch/AusText database files.\n" @@ -355,7 +355,7 @@ static void user_args_processor (int argc, char **argv) else { BAD_ARG: print_usage(); - printf (catgets (dtsearch_catd, MS_misc, 9, + printf (CATGETS(dtsearch_catd, MS_misc, 9, "%sInvalid command line argument '%s'.\a\n"), "\n"PROGNAME" ", ptr); DtSearchExit (2); @@ -418,7 +418,7 @@ BAD_ARG: if (language < 0) goto BAD_ARG; if (!quiet_mode && language > DtSrLaLAST) - printf ( catgets(dtsearch_catd, MS_initausd, 13, + printf ( CATGETS(dtsearch_catd, MS_initausd, 13, "%s Warning! you have specified " "an unsupported, custom language.\n" " You will have to provide your own " @@ -429,7 +429,7 @@ BAD_ARG: break; default: - printf (catgets (dtsearch_catd, MS_misc, 10, + printf (CATGETS(dtsearch_catd, MS_misc, 10, "%sIgnored unknown command line argument '%s'.\n"), PROGNAME " ", ptr); break; @@ -443,7 +443,7 @@ BAD_ARG: */ if (argc <= 0) { print_usage(); - printf (catgets (dtsearch_catd, MS_misc, 18, + printf (CATGETS(dtsearch_catd, MS_misc, 18, "%sDatabase name not specified.\n\a"), "\n"PROGNAME" "); DtSearchExit(2); } @@ -468,7 +468,7 @@ BAD_ARG: if (i < 1 || i > 8) { BAD_DBNAME: print_usage(); - printf (catgets (dtsearch_catd, MS_misc, 11, + printf (CATGETS(dtsearch_catd, MS_misc, 11, "%sInvalid database name '%s'.\a\n"), "\n"PROGNAME"346 ", ptr); DtSearchExit(2); @@ -482,7 +482,7 @@ BAD_DBNAME: /* Ensure semantic processing specified only for english language */ if (fzkeysz != 0 && language != DtSrLaENG && language != DtSrLaENG2) { print_usage(); - printf ( catgets(dtsearch_catd, MS_initausd, 14, + printf ( CATGETS(dtsearch_catd, MS_initausd, 14, "\n%s semantic processing is only available " "for English language databases.\n\a") , PROGNAME"340"); @@ -525,7 +525,7 @@ static void remove_d9x_file (char *extension) if (remove (newpath) != 0) { /* 'file not found' is not an error */ if (errno != ENOENT) { - printf (catgets (dtsearch_catd, MS_initausd, 244, + printf (CATGETS(dtsearch_catd, MS_initausd, 244, PROGNAME "244 Unable to remove '%s': %s\n"), newpath, strerror (errno)); DtSearchExit (5); @@ -562,14 +562,14 @@ static void create_new_dbd (FILE *f) confirm_ok_to_overwrite (newpath); if (chmod (newpath, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) { if (errno != ENOENT) { - printf (catgets (dtsearch_catd, MS_initausd, 214, nocopy_msg), + printf (CATGETS(dtsearch_catd, MS_initausd, 214, nocopy_msg), PROGNAME"515", modelpath, newpath, strerror(errno)); DtSearchExit (15); } } if ((g = fopen (newpath, "w+b")) == NULL) { - printf (catgets (dtsearch_catd, MS_initausd, 214, nocopy_msg), + printf (CATGETS(dtsearch_catd, MS_initausd, 214, nocopy_msg), PROGNAME"509", modelpath, newpath, strerror(errno)); DtSearchExit (4); } @@ -577,7 +577,7 @@ static void create_new_dbd (FILE *f) while ((i = fgetc (f)) != EOF) fputc (i, g); if (errno) { - printf (catgets (dtsearch_catd, MS_initausd, 214, nocopy_msg), + printf (CATGETS(dtsearch_catd, MS_initausd, 214, nocopy_msg), PROGNAME"531", modelpath, newpath, strerror(errno)); DtSearchExit (13); } @@ -622,14 +622,14 @@ int main (int argc, char *argv[]) struct or_lwordrec lwordrec; setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); aa_argv0 = argv[0]; max_ormisc_size = sizeof (miscrec.or_misc); maxwidth_sword = sizeof (swordrec.or_swordkey) - 1; maxwidth_lword = sizeof (lwordrec.or_lwordkey) - 1; - printf (catgets (dtsearch_catd, MS_misc, 4, + printf (CATGETS(dtsearch_catd, MS_misc, 4, "%s Version %s.\n"), aa_argv0, DtSrVERSION @@ -655,7 +655,7 @@ int main (int argc, char *argv[]) } else { print_usage(); - printf (catgets (dtsearch_catd, MS_initausd, 213, + printf (CATGETS(dtsearch_catd, MS_initausd, 213, default_unable_to_open_msg), "\n"PROGNAME"302", modelpath, strerror(errno)); DtSearchExit (4); @@ -676,7 +676,7 @@ int main (int argc, char *argv[]) } else if (errno != ENOENT) { print_usage(); - printf (catgets (dtsearch_catd, MS_initausd, 213, + printf (CATGETS(dtsearch_catd, MS_initausd, 213, default_unable_to_open_msg), "\n"PROGNAME"655", FNAME_MODEL, strerror(errno)); DtSearchExit (4); @@ -700,7 +700,7 @@ int main (int argc, char *argv[]) if (debug_mode) puts (PROGNAME"682 Never found it!"); print_usage(); - printf (catgets (dtsearch_catd, MS_initausd, 213, + printf (CATGETS(dtsearch_catd, MS_initausd, 213, default_unable_to_open_msg), "\n"PROGNAME"686", FNAME_MODEL, "Not found in either current or target directories. Use -d option\a"); @@ -715,7 +715,7 @@ DBD_OKAY: printf ("040*** d_open newpath = '%s'.\n", newpath); d_open (newpath, "o"); if (db_status != S_OKAY) { - printf (catgets (dtsearch_catd, MS_initausd, 230, + printf (CATGETS(dtsearch_catd, MS_initausd, 230, PROGNAME "230 Could not open database '%s'.\n"), newpath); puts (vista_msg (PROGNAME "231")); DtSearchExit (3); @@ -727,7 +727,7 @@ DBD_OKAY: printf ("042*** d_initialize.\n"); d_initialize (0); if (db_status != S_OKAY) { - printf (catgets (dtsearch_catd, MS_initausd, 239, + printf (CATGETS(dtsearch_catd, MS_initausd, 239, PROGNAME "239 Could not initialize database '%s'.\n"), newpath); puts (vista_msg (PROGNAME "240")); DtSearchExit (3); @@ -763,7 +763,7 @@ DBD_OKAY: if (i < 0) { /* Add in difference to INCREASE abstrsz */ dbrec.or_abstrsz -= i; - printf (catgets (dtsearch_catd, MS_misc, 433, + printf (CATGETS(dtsearch_catd, MS_misc, 433, "%1$sAdjusted maximum abstract size upward to %2$hd.\n"), PROGNAME "433 ", dbrec.or_abstrsz); } @@ -800,7 +800,7 @@ DBD_OKAY: printf ("060*** fillnew dbrec.\n"); d_fillnew (OR_DBREC, &dbrec, 0); if (db_status != S_OKAY) { - printf ("%s", catgets (dtsearch_catd, MS_initausd, 509, + printf ("%s", CATGETS(dtsearch_catd, MS_initausd, 509, PROGNAME "509 Could not initialize database header record.\n")); puts (vista_msg (PROGNAME "510")); DtSearchExit (3); @@ -816,7 +816,7 @@ DBD_OKAY: remove_d9x_file (".d99"); *newextp = 0; /* no extension suffixes for next msgs */ - printf (catgets (dtsearch_catd, MS_initausd, 24, + printf (CATGETS(dtsearch_catd, MS_initausd, 24, PROGNAME " Successfully initialized database '%s'.\n"), newpath); return 0; diff --git a/cde/programs/dtsr/dtsrdbrec.c b/cde/programs/dtsr/dtsrdbrec.c index 72ed69bd1..eec79c8f7 100644 --- a/cde/programs/dtsr/dtsrdbrec.c +++ b/cde/programs/dtsr/dtsrdbrec.c @@ -101,25 +101,25 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec) char *cptr; 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 { /* @@ -127,88 +127,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; @@ -221,59 +221,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); @@ -301,21 +301,21 @@ 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); 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"), localtime (&now)); - 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 \n"), aa_argv0); return 2; } @@ -323,21 +323,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; diff --git a/cde/programs/dtsr/dtsrhan.c b/cde/programs/dtsr/dtsrhan.c index 61fb4ddec..a0b6ad7ce 100644 --- a/cde/programs/dtsr/dtsrhan.c +++ b/cde/programs/dtsr/dtsrhan.c @@ -337,10 +337,10 @@ void open_outfile (void) if (!outmode_specified) if ((temp = fopen (outfile, "r")) != NULL) { fclose (temp); - printf ( catgets(dtsearch_catd, MS_chandel, 3, + printf ( CATGETS(dtsearch_catd, MS_chandel, 3, "Output file '%s' already exists.\n") , outfile); - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 4, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 4, "Append, overwrite, or quit? [a,o,q] ") ); i = tolower (getchar ()); @@ -355,7 +355,7 @@ void open_outfile (void) outstream = stdout; else { if ((outstream = fopen (outfile, outmode)) == NULL) { - printf ( catgets(dtsearch_catd, MS_chandel, 7, + printf ( CATGETS(dtsearch_catd, MS_chandel, 7, "Unable to open output file '%s'.\n") , outfile); exit (FILE_ERROR); } @@ -572,7 +572,7 @@ void process_profile (void) /*-- open file --*/ if ((prof = fopen (profile, "r")) == NULL) { - printf ( catgets(dtsearch_catd, MS_chandel, 11, + printf ( CATGETS(dtsearch_catd, MS_chandel, 11, "\nError - unable to open profile file '%s'.\n") , profile); exit (FILE_ERROR); } @@ -627,7 +627,7 @@ void process_profile (void) if (validate_id (tok)) strcpy (line_current->name, tok); else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -636,7 +636,7 @@ void process_profile (void) /*-- get first value token --*/ tok = my_strtok ('\0', del_string); if (!tok) { - printf ( catgets(dtsearch_catd, MS_chandel, 13, + printf ( CATGETS(dtsearch_catd, MS_chandel, 13, "Error line %d - identifier '%s' missing value(s).\n") , line_num, line_current->name); bad_profile = TRUE; @@ -647,7 +647,7 @@ void process_profile (void) else line_current->comp->column_number = atoi (tok); if (line_current->comp->column_number == 0) { - printf ( catgets(dtsearch_catd, MS_chandel, 14, + printf ( CATGETS(dtsearch_catd, MS_chandel, 14, "Error line %d - zero or bad value for '%s'.\n" " offensive token: %s.\n") , line_num, line_current->name, tok); @@ -658,7 +658,7 @@ void process_profile (void) tok = my_strtok ('\0', "\""); if (!tok) { if (line_current->comp->column_number == ANY) { - printf ( catgets(dtsearch_catd, MS_chandel, 15, + printf ( CATGETS(dtsearch_catd, MS_chandel, 15, "Error line %d - for identifier '%s', column has " "been set to ANY\n but there is no " "identifying signature string.\n") , @@ -694,7 +694,7 @@ void process_profile (void) else line_current->comp->column_number = atoi (tok); if (line_current->comp->column_number == 0) { - printf ( catgets(dtsearch_catd, MS_chandel, 16, + printf ( CATGETS(dtsearch_catd, MS_chandel, 16, "Error line %d - zero or bad value for " "identifier '%s'\n offensive token: %s.\n") , line_num, line_current->name, tok); @@ -705,13 +705,13 @@ void process_profile (void) tok = my_strtok ('\0', "\""); if (!tok) { if (line_current->comp->column_number == ANY) - printf ( catgets(dtsearch_catd, MS_chandel, 15, + printf ( CATGETS(dtsearch_catd, MS_chandel, 15, "Error line %d - for identifier '%s', column has " "been set to ANY\n but there is no " "identifying signature string.\n") , line_num, line_current->name); else - printf ( catgets(dtsearch_catd, MS_chandel, 18, + printf ( CATGETS(dtsearch_catd, MS_chandel, 18, "Error line %d - missing value for " "identifier '%s'\n") , line_num, line_current->name); @@ -753,7 +753,7 @@ void process_profile (void) field_current->is_month = TRUE; } else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -763,7 +763,7 @@ void process_profile (void) /*-- get constant value --*/ tok = my_strtok (NULL, "\""); if (!tok) { - printf ( catgets(dtsearch_catd, MS_chandel, 93, + printf ( CATGETS(dtsearch_catd, MS_chandel, 93, "Error line %d - '%s' string not " "enclosed in double quotes.\n"), line_num, field_current->name); @@ -777,7 +777,7 @@ void process_profile (void) /*-- get line id --*/ tok = my_strtok ('\0', del_string); if (!tok) { - printf ( catgets(dtsearch_catd, MS_chandel, 13, + printf ( CATGETS(dtsearch_catd, MS_chandel, 13, "Error line %d - identifier '%s' missing value(s).\n") , line_num, line_current->name); bad_profile = TRUE; @@ -788,7 +788,7 @@ void process_profile (void) /*-- get "string" --*/ tok = my_strtok ('\0', "\""); if (!tok) { - printf ( catgets(dtsearch_catd, MS_chandel, 93, + printf ( CATGETS(dtsearch_catd, MS_chandel, 93, "Error line %d - '%s' string not " "enclosed in double quotes.\n"), line_num, field_current->name); @@ -801,7 +801,7 @@ void process_profile (void) /*-- get offset --*/ tok = my_strtok ('\0', del_string); if (!tok) { - printf ( catgets(dtsearch_catd, MS_chandel, 13, + printf ( CATGETS(dtsearch_catd, MS_chandel, 13, "Error line %d - identifier '%s' missing value(s).\n") , line_num, line_current->name); bad_profile = TRUE; @@ -813,7 +813,7 @@ void process_profile (void) tok = my_strtok ('\0', del_string); /*******if (!tok && field_current->length == ANY) ************/ if (!tok) { - printf ( catgets(dtsearch_catd, MS_chandel, 13, + printf ( CATGETS(dtsearch_catd, MS_chandel, 13, "Error line %d - identifier '%s' missing value(s).\n") , line_num, line_current->name); bad_profile = TRUE; @@ -831,14 +831,14 @@ void process_profile (void) case DELIMITER: /*-- get next token - should be name of line --*/ if (warnings &&(bot_defined || top_defined)) - printf ( catgets(dtsearch_catd, MS_chandel, 23, + printf ( CATGETS(dtsearch_catd, MS_chandel, 23, "Warning line %d: Delimiter redefined.\n") , line_num); tok = my_strtok ('\0', del_string); if (validate_id (tok)) strcpy (top_rec_name, tok); else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n"), line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -857,7 +857,7 @@ void process_profile (void) bot_defined = TRUE; } else { BAD_DELIM_VAL: - printf ( catgets(dtsearch_catd, MS_chandel, 25, + printf ( CATGETS(dtsearch_catd, MS_chandel, 25, "Error line %d: delimiter not specified as " "'top' or 'bottom'.\n") , line_num); @@ -883,7 +883,7 @@ BAD_DELIM_VAL: } /* if it was a valid token */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 26, + printf ( CATGETS(dtsearch_catd, MS_chandel, 26, "Error line %d: invalid token '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -911,7 +911,7 @@ BAD_DELIM_VAL: } /* if it was a valid token */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 27, + printf ( CATGETS(dtsearch_catd, MS_chandel, 27, "Error line %d: invalid token '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -950,7 +950,7 @@ BAD_DELIM_VAL: } /* if in else */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, tok); bad_profile = TRUE; @@ -959,7 +959,7 @@ BAD_DELIM_VAL: } /* if validate... */ else { - printf (catgets(dtsearch_catd, MS_chandel, 12, + printf (CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -998,7 +998,7 @@ BAD_DELIM_VAL: } /* if in else */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, tok); bad_profile = TRUE; @@ -1007,7 +1007,7 @@ BAD_DELIM_VAL: } /* if validate... */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1046,7 +1046,7 @@ BAD_DELIM_VAL: } /* if in else */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, tok); bad_profile = TRUE; @@ -1055,7 +1055,7 @@ BAD_DELIM_VAL: } /* if validate... */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1094,7 +1094,7 @@ BAD_DELIM_VAL: } /* if in else */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, tok); bad_profile = TRUE; @@ -1103,7 +1103,7 @@ BAD_DELIM_VAL: } /* if validate... */ else { - printf ( catgets(dtsearch_catd, MS_chandel, 12, + printf ( CATGETS(dtsearch_catd, MS_chandel, 12, "Error line %d: invalid identifier '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1116,13 +1116,13 @@ BAD_DELIM_VAL: goto BAD_IMAGE; for (i = 0; i < strlen (tok); i++) tok[i] = tolower (tok[i]); - if (strcmp (tok, catgets (dtsearch_catd, MS_chandel, 34,"all")) == 0) + if (strcmp (tok, CATGETS(dtsearch_catd, MS_chandel, 34,"all")) == 0) imagemode = INCLUDE; - else if (strcmp (tok, catgets (dtsearch_catd, MS_chandel, 35, "none")) == 0) + else if (strcmp (tok, CATGETS(dtsearch_catd, MS_chandel, 35, "none")) == 0) imagemode = EXCLUDE; else { BAD_IMAGE: - printf ( catgets(dtsearch_catd, MS_chandel, 36, + printf ( CATGETS(dtsearch_catd, MS_chandel, 36, "Error line %d: image mode must be 'all' or " "'none' -'%s' not recognized.\n") , NULLORSTR(tok)); @@ -1143,7 +1143,7 @@ BAD_IMAGE: textmode = EXCLUDE; else { BAD_TEXT: - printf ( catgets(dtsearch_catd, MS_chandel, 37, + printf ( CATGETS(dtsearch_catd, MS_chandel, 37, "Error line %d: text mode must be 'all' or " "'none' - '%s' not recognized.\n") , NULLORSTR(tok)); bad_profile = TRUE; @@ -1154,14 +1154,14 @@ BAD_TEXT: case KEYCHAR: /*-- get next token - should be character for key type --*/ if (warnings && key_defined) - printf ( catgets(dtsearch_catd, MS_chandel, 38, + printf ( CATGETS(dtsearch_catd, MS_chandel, 38, "Warning line %d: Key character redefined.\n") , line_num); tok = my_strtok ('\0', del_string); if (validate_id (tok)) key_char = tok[0]; else { - printf ( catgets(dtsearch_catd, MS_chandel, 39, + printf ( CATGETS(dtsearch_catd, MS_chandel, 39, "Error line %d: invalid Key Character:'%c'.\n") , line_num, (tok)?tok[0]:'?'); bad_profile = TRUE; @@ -1172,7 +1172,7 @@ BAD_TEXT: case DATEFLD: if (date_pos_defined) { - printf ( catgets(dtsearch_catd, MS_chandel, 110, + printf ( CATGETS(dtsearch_catd, MS_chandel, 110, "Warning line %d - date field redefined.\n") , line_num); null_date_specified = FALSE; @@ -1187,7 +1187,7 @@ BAD_TEXT: strcpy (date_current->field_id, tok); else { /* Msg #111 used two places */ - printf ( catgets(dtsearch_catd, MS_chandel, 111, + printf ( CATGETS(dtsearch_catd, MS_chandel, 111, "Error line %d - bad identifier '%s' for date.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1211,7 +1211,7 @@ BAD_TEXT: strcpy (date_current->field_id, tok); else { /* Msg #111 used two places */ - printf ( catgets(dtsearch_catd, MS_chandel, 111, + printf ( CATGETS(dtsearch_catd, MS_chandel, 111, "Error line %d - bad identifier '%s' for date.\n"), line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1225,7 +1225,7 @@ BAD_TEXT: case KEY: /*-- building the key --*/ if (warnings && key_pos_defined) - printf ( catgets(dtsearch_catd, MS_chandel, 40, + printf ( CATGETS(dtsearch_catd, MS_chandel, 40, "Warning line %d - key field redefined.\n") , line_num); key_table = (struct key_id *) malloc (sizeof (struct key_id)); @@ -1245,7 +1245,7 @@ BAD_TEXT: strcpy (key_current->field_id, tok); } else { - printf ( catgets(dtsearch_catd, MS_chandel, 43, + printf ( CATGETS(dtsearch_catd, MS_chandel, 43, "Error line %d - bad identifier '%s' for key.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1260,7 +1260,7 @@ BAD_TEXT: if (validate_id (tok)) strcpy (key_current->field_id, tok); else { - printf ( catgets(dtsearch_catd, MS_chandel, 43, + printf ( CATGETS(dtsearch_catd, MS_chandel, 43, "Error line %d - bad identifier '%s' for key.\n") , line_num, tok); bad_profile = TRUE; @@ -1283,7 +1283,7 @@ BAD_TEXT: discard = FALSE; else { BAD_DISCARD: - printf ( catgets(dtsearch_catd, MS_chandel, 45, + printf ( CATGETS(dtsearch_catd, MS_chandel, 45, "Error line %d: unknown option for 'discard': " "'%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1302,7 +1302,7 @@ BAD_DISCARD: del_blanklines = FALSE; else { BAD_DELBLANKLINES: - printf ( catgets(dtsearch_catd, MS_chandel, 46, + printf ( CATGETS(dtsearch_catd, MS_chandel, 46, "Error line %d: unknown option for " "'delblanklines': '%s'.\n") , line_num, NULLORSTR(tok)); @@ -1342,7 +1342,7 @@ BAD_DELBLANKLINES: break; default: BAD_ABSTR: - printf ( catgets(dtsearch_catd, MS_chandel, 47, + printf ( CATGETS(dtsearch_catd, MS_chandel, 47, "Error line %d: Unknown option for abstract :'%s'\n"), line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1351,7 +1351,7 @@ BAD_ABSTR: break; default: - printf ( catgets(dtsearch_catd, MS_chandel, 48, + printf ( CATGETS(dtsearch_catd, MS_chandel, 48, "Error line %d -unknown identifier type '%s'.\n") , line_num, NULLORSTR(tok)); bad_profile = TRUE; @@ -1359,7 +1359,7 @@ BAD_ABSTR: } /* main switch for each line in profile */ } while (TRUE); /* read-a-line do loop */ if (!date_pos_defined) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_chandel, 115, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_chandel, 115, "%s Default object dates will be '%s'.\n") , PROGNAME"1288", now_str); if (bad_profile) @@ -1368,17 +1368,17 @@ BAD_ABSTR: /*---- Process tables, and check for identifiers referenced ----*/ if (!top_defined && !bot_defined) { bad_profile = TRUE; - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 49, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 49, "Error - delimiter not defined.\n") ); } if (!key_defined) { bad_profile = TRUE; - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 50, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 50, "Error - key-type character never defined.\n") ); } if (!key_pos_defined) { bad_profile = TRUE; - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 51, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 51, "Error - key never defined.\n") ); } if (bad_profile) @@ -1392,12 +1392,12 @@ BAD_ABSTR: line_current = line_current->next; } if (top_rec_name[0] != 0 && top_rec == NULL) { - printf ( catgets(dtsearch_catd, MS_chandel, 52, + printf ( CATGETS(dtsearch_catd, MS_chandel, 52, "Error - delimiter defined as '%s' was never found.\n") , top_rec_name); bad_profile = TRUE; } else if (strcmp (top_rec->head->text, line_mode) == 0) { - printf ( catgets(dtsearch_catd, MS_chandel, 53, + printf ( CATGETS(dtsearch_catd, MS_chandel, 53, "Error - delimiter defined as '%s' references a physical " "line in the record.\n Since the delimiter defines the " "physical lines\n it cannot be referenced as a physical line.\n"), @@ -1416,7 +1416,7 @@ BAD_ABSTR: line_current = line_current->next; } if (!found && !field_current->constant) { - printf ( catgets(dtsearch_catd, MS_chandel, 54, + printf ( CATGETS(dtsearch_catd, MS_chandel, 54, "Error - for field '%s', no line identifier matches '%s'.\n") , field_current->name, field_current->line_id); bad_profile = TRUE; @@ -1436,7 +1436,7 @@ BAD_ABSTR: field_current = field_current->next; } if (!found) { - printf ( catgets(dtsearch_catd, MS_chandel, 55, + printf ( CATGETS(dtsearch_catd, MS_chandel, 55, "Error - field include/exclude list included\n" " the field '%s', which was never defined.\n") , finclude_current->field_id); @@ -1457,7 +1457,7 @@ BAD_ABSTR: line_current = line_current->next; } if (!found) { - printf ( catgets(dtsearch_catd, MS_chandel, 56, + printf ( CATGETS(dtsearch_catd, MS_chandel, 56, "Error - image include/exclude list included\n" " the line '%s', which was never defined.\n") , include_current->line_id); @@ -1478,7 +1478,7 @@ BAD_ABSTR: line_current = line_current->next; } if (!found) { - printf ( catgets(dtsearch_catd, MS_chandel, 57, + printf ( CATGETS(dtsearch_catd, MS_chandel, 57, "Error - text include/exclude list included\n" " the line '%s', which was never defined.\n") , include_current->line_id); @@ -1505,7 +1505,7 @@ BAD_ABSTR: } } if (!found) { - printf ( catgets(dtsearch_catd, MS_chandel, 116, + printf ( CATGETS(dtsearch_catd, MS_chandel, 116, "Error - date references undefined field '%s'.\n"), date_current->field_id); bad_profile = TRUE; @@ -1538,7 +1538,7 @@ END_DATE_TABLE: field_current = field_current->next; } if (!found) { - printf ( catgets(dtsearch_catd, MS_chandel, 58, + printf ( CATGETS(dtsearch_catd, MS_chandel, 58, "Error - key definition references field '%s'\n" " which was never defined.\n") , key_current->field_id); @@ -1558,7 +1558,7 @@ END_DATE_TABLE: field_current = field_current->next; } if (!found) { - printf ( catgets(dtsearch_catd, MS_chandel, 59, + printf ( CATGETS(dtsearch_catd, MS_chandel, 59, "Error - abstract definition references field '%s'\n" " which was never defined.\n") , abstract_current->field_id); @@ -1691,7 +1691,7 @@ void write_record (void) /* Test final record write to check for full filesystem */ if (fprintf (outstream, "%c\n", CNTRL_L) <= 0) { - printf ( catgets(dtsearch_catd, MS_chandel, 124, + printf ( CATGETS(dtsearch_catd, MS_chandel, 124, "%s Unable to write to output file '%s':\n %s\n") , PROGNAME"1663", outfile, strerror(errno)); DtSearchExit (2); @@ -1715,7 +1715,7 @@ static void mmm_to_digits (struct field_id *fld) int i; if (months == NULL) - months = strdup (catgets(dtsearch_catd, MS_chandel, 125, + months = strdup (CATGETS(dtsearch_catd, MS_chandel, 125, "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC")); for (i=0; i<3; i++) valbuf[i] = toupper (fld->value[i]); @@ -1954,7 +1954,7 @@ void process_record (void) BAD_DATE_VALUE: objdate_tmptr = &nowtm; - printf ( catgets(dtsearch_catd, MS_chandel, 133, + printf ( CATGETS(dtsearch_catd, MS_chandel, 133, "Warning - '%s' is invalid date specification.\n" " Using '%s' date for record number %ld that began: %.30s\n") , date_value, now_str, rec_count, record_head->text); @@ -1981,12 +1981,12 @@ void process_record (void) key_current = key_current->next; } if (dummy && warnings) { - printf ( catgets(dtsearch_catd, MS_chandel, 68, + printf ( CATGETS(dtsearch_catd, MS_chandel, 68, "Warning - fields necessary for key not found.\n" " discarding record #%ld that began:\n %s\n") , rec_count, record_head->text); } else if (discard && meaningless && warnings) { - printf ( catgets(dtsearch_catd, MS_chandel, 69, + printf ( CATGETS(dtsearch_catd, MS_chandel, 69, "Warning - record #ld deemed meaningless, discarding...\n" " record began: %.60s\n") , rec_count, record_head->text); @@ -2061,7 +2061,7 @@ void process_infile (void) instream = stdin; else { if ((instream = fopen (infile, "rt")) == NULL) { - printf ( catgets(dtsearch_catd, MS_chandel, 70, + printf ( CATGETS(dtsearch_catd, MS_chandel, 70, " Unable to open input file '%s'.\n") , infile); exit (FILE_ERROR); } @@ -2197,7 +2197,7 @@ static void usage_msg (void) if (!warnings) return; - printf (catgets (dtsearch_catd, MS_chandel, 71, default_text), + printf (CATGETS(dtsearch_catd, MS_chandel, 71, default_text), aa_argv0, EXT_FZKEY); return; } /* usage_msg() */ @@ -2225,7 +2225,7 @@ static void user_arg_processor (int argc, char **argv) case 'w': if ((screen_width = atoi (argptr + 2)) == 0) { - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 72, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 72, "Invalid screen width specified.\n") ); bad_parm = TRUE; } @@ -2242,7 +2242,7 @@ static void user_arg_processor (int argc, char **argv) else if (argptr[2] == 'a') strcpy (outmode, "a"); else { - printf ( catgets(dtsearch_catd, MS_chandel, 75, + printf ( CATGETS(dtsearch_catd, MS_chandel, 75, "'%s' is invalid output mode.\n") , argptr); bad_parm = TRUE; } /* else */ @@ -2250,14 +2250,14 @@ static void user_arg_processor (int argc, char **argv) break; default: - printf ( catgets(dtsearch_catd, MS_chandel, 76, + printf ( CATGETS(dtsearch_catd, MS_chandel, 76, "Unknown command line argument '%s'.\n") , argptr); bad_parm = TRUE; } /*--switch--*/ } /*--while--*/ if (argc-- <= 0) { - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 77, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 77, "Missing required profile-file name.\n") ); bad_parm = TRUE; } @@ -2274,7 +2274,7 @@ static void user_arg_processor (int argc, char **argv) } if (argc-- <= 0) { - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 78, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 78, "Missing required input-file name.\n") ); bad_parm = TRUE; } @@ -2292,7 +2292,7 @@ static void user_arg_processor (int argc, char **argv) strcat(outfile,EXT_FZKEY); *****************/ if (strcmp (infile, "-") == 0) { - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 79, "Error - using " + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 79, "Error - using " "stdin as input, output filename is required!\n") ); exit (FILE_ERROR); } else { @@ -2321,38 +2321,38 @@ static void user_arg_processor (int argc, char **argv) /*-- Sanity checks --*/ /*-- duplicates? --*/ if (strcmp (infile, profile) == 0) { - printf ( catgets(dtsearch_catd, MS_chandel, 80, + printf ( CATGETS(dtsearch_catd, MS_chandel, 80, "Profile file and input file have same name:'%s'.\n") , infile); bad_parm = TRUE; } /* if */ if (strcmp (infile, outfile) == 0 && strcmp (infile, "-")) { - printf ( catgets(dtsearch_catd, MS_chandel, 81, + printf ( CATGETS(dtsearch_catd, MS_chandel, 81, "Input file and output file have same name:'%s'.\n") , infile); bad_parm = TRUE; } /* if */ if (strcmp (profile, outfile) == 0) { - printf ( catgets(dtsearch_catd, MS_chandel, 82, + printf ( CATGETS(dtsearch_catd, MS_chandel, 82, "Profile file and output file have same name:'%s'.\n") , profile); bad_parm = TRUE; } /* if */ if(warnings) { - printf ( catgets(dtsearch_catd, MS_chandel, 83, + printf ( CATGETS(dtsearch_catd, MS_chandel, 83, " Profile file: %s\n") , profile); if (strcmp (infile, "-") == 0) - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 84, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 84, " Input file: stdin\n") ); else - printf ( catgets(dtsearch_catd, MS_chandel, 85, + printf ( CATGETS(dtsearch_catd, MS_chandel, 85, " Input file: %s\n") , infile); if (strcmp (outfile, "-") == 0) - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 86, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 86, " Output file: stdout\n") ); else - printf ( catgets(dtsearch_catd, MS_chandel, 87, + printf ( CATGETS(dtsearch_catd, MS_chandel, 87, " Output file: %s\n") , outfile); } } /*--user_args_processor--*/ @@ -2377,8 +2377,8 @@ int main (int argc, char **argv) /*-- Initialization --*/ aa_argv0 = argv[0]; setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); - printf ( catgets(dtsearch_catd, MS_chandel, 88, + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); + printf ( CATGETS(dtsearch_catd, MS_chandel, 88, "%s. %s %s Text Filter.\n") , aa_argv0, PRODNAME, DtSrVERSION); @@ -2399,7 +2399,7 @@ int main (int argc, char **argv) signal (SIGINT, flag_shutdown); signal (SIGTERM, flag_shutdown); open_outfile (); - printf ( catgets(dtsearch_catd, MS_chandel, 89, + printf ( CATGETS(dtsearch_catd, MS_chandel, 89, "\nInterrupt with CTRL-C to exit gracefully " "at record boundary.\n Each dot is %ld records...\n"), RECS_PER_DOT); @@ -2407,17 +2407,17 @@ int main (int argc, char **argv) oops = fclose (outstream); fclose (instream); if (oops < 0) { - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 90, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 90, "\nError closing output file - disk full?\n") ); exit (FILE_ERROR); } } else { - printf ( "%s", catgets(dtsearch_catd, MS_chandel, 91, + printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 91, "Quitting due to errors in profile file.\n") ); exit (BAD_PROFILE); } - printf ( catgets(dtsearch_catd, MS_chandel, 92, + printf ( CATGETS(dtsearch_catd, MS_chandel, 92, "\n%s: Normal completion. %ld records processed. Exit code = 0.\n"), aa_argv0, rec_count); return 0; diff --git a/cde/programs/dtsr/dtsrindex.c b/cde/programs/dtsr/dtsrindex.c index bd2fc2384..26ab3005a 100644 --- a/cde/programs/dtsr/dtsrindex.c +++ b/cde/programs/dtsr/dtsrindex.c @@ -295,7 +295,7 @@ static void print_exit_code (int exit_code) /* Put total seconds into totalstart */ if (totalstart > 0) totalstart = time (NULL) - totalstart; - printf (catgets (dtsearch_catd, MS_cborodin, 206, + printf (CATGETS(dtsearch_catd, MS_cborodin, 206, "%s: Exit Code = %d, Total elapsed time %ldm %lds.\n"), aa_argv0, exit_code, totalstart / 60L, totalstart % 60L); return; @@ -380,7 +380,7 @@ void write_to_file (TREENODE * output_node) print_dba = print_dba->next_dba; num_addrs_for_word++; if (num_addrs_for_word >= batch_size) { - printf (catgets (dtsearch_catd, MS_cborodin, 280, + printf (CATGETS(dtsearch_catd, MS_cborodin, 280, "\n%s num_addrs_for_word (%ld) >= batchsz (%ld).\n"), PROGNAME"280", (long)num_addrs_for_word, (long)batch_size); DtSearchExit (91); @@ -449,7 +449,7 @@ void traverse_tree (void) /* Dheck for the empty tree */ if (root_node == NULL) { - printf (catgets (dtsearch_catd, MS_cborodin, 288, + printf (CATGETS(dtsearch_catd, MS_cborodin, 288, "%s Abort. There are no words in the input file %s.\n"), PROGNAME"288", fname_input); DtSearchExit (34); @@ -522,7 +522,7 @@ void traverse_tree (void) /********************************************************/ static void print_usage_msg (void) { - printf (catgets (dtsearch_catd, MS_cborodin, 17, + printf (CATGETS(dtsearch_catd, MS_cborodin, 17, "\n" "USAGE: %s -d [options] \n" " Listed default file name extensions can be overridden.\n" @@ -631,7 +631,7 @@ void user_args_processor (int argc, char **argv) case 'r': if ((recs_per_dot = atoi (argptr + 2)) <= 0) { - printf (catgets (dtsearch_catd, MS_cborodin, 577, + printf (CATGETS(dtsearch_catd, MS_cborodin, 577, "%s Invalid arg '%s'. Using default -r%d.\n"), PROGNAME"577", argptr, RECS_PER_DOT); recs_per_dot = RECS_PER_DOT; @@ -641,7 +641,7 @@ void user_args_processor (int argc, char **argv) case 'h': duprec_hashsize = atol (argptr + 2); if (duprec_hashsize == 0UL) - printf (catgets (dtsearch_catd, MS_cborodin, 539, + printf (CATGETS(dtsearch_catd, MS_cborodin, 539, "%s Duplicate record id checking disabled.\n"), PROGNAME"539"); break; @@ -649,7 +649,7 @@ void user_args_processor (int argc, char **argv) case 'b': batch_size = atol (argptr + 2); if (batch_size <= 0L) { - printf (catgets (dtsearch_catd, MS_cborodin, 595, + printf (CATGETS(dtsearch_catd, MS_cborodin, 595, "%s Invalid batch size argument '%s'.\n"), PROGNAME"595", argptr); goto BADPARM; @@ -666,7 +666,7 @@ void user_args_processor (int argc, char **argv) else cache_size = CACHE_SIZE; CACHE_ADJUSTED: - printf (catgets (dtsearch_catd, MS_cborodin, 600, + printf (CATGETS(dtsearch_catd, MS_cborodin, 600, "%sCache size readjusted to %d.\n"), PROGNAME "600 ", cache_size); break; @@ -703,7 +703,7 @@ CACHE_ADJUSTED: case 'd': /* May include both dicname and dicpath */ if (!segregate_dicname (argptr + 2)) { - printf (catgets (dtsearch_catd, MS_cborodin, 550, + printf (CATGETS(dtsearch_catd, MS_cborodin, 550, "%s '%s' is invalid path/database name.\n"), PROGNAME"550", argptr); goto BADPARM; @@ -712,7 +712,7 @@ CACHE_ADJUSTED: case 'i': /* (I)nput buffer size */ if ((inbufsz = atol (argptr + 2)) <= 0) { - printf (catgets (dtsearch_catd, MS_cborodin, 558, + printf (CATGETS(dtsearch_catd, MS_cborodin, 558, "%s Invalid input buffer size '%s'.\n"), PROGNAME"558", argptr); goto BADPARM; @@ -720,7 +720,7 @@ CACHE_ADJUSTED: break; default: - printf (catgets (dtsearch_catd, MS_cborodin, 567, + printf (CATGETS(dtsearch_catd, MS_cborodin, 567, "%s Unknown command line argument '%s'.\n"), PROGNAME"567", argptr); BADPARM: @@ -732,7 +732,7 @@ BADPARM: /* Validate input file name */ if (argc-- <= 0) { - printf (catgets (dtsearch_catd, MS_cborodin, 580, + printf (CATGETS(dtsearch_catd, MS_cborodin, 580, "%s Missing required input file name.\n"), PROGNAME"580"); goto BADPARM; @@ -743,7 +743,7 @@ BADPARM: /* Check for missing database name */ if (dicname[0] == 0) { - printf (catgets (dtsearch_catd, MS_cborodin, 589, + printf (CATGETS(dtsearch_catd, MS_cborodin, 589, "%s No database name specified (-d argument).\a\n"), PROGNAME"589"); goto BADPARM; @@ -786,7 +786,7 @@ static void put_addrs_2_dtbs_addr_file ( DtSrINT32 num_addrs; if (nitems >= batch_size) { - printf ( catgets(dtsearch_catd, MS_cborodin, 6, + printf ( CATGETS(dtsearch_catd, MS_cborodin, 6, "put_addrs_2_dtbs_addr_file() nitems=%d, batchsz=%ld\n") , (int)nitems, (long)batch_size); DtSearchExit (58); @@ -837,7 +837,7 @@ static void put_addrs_2_dtbs_addr_file ( num_writes = fwrite (word_addrs_ii, sizeof(DB_ADDR), (size_t)num_addrs, dtbs_addr_fp); if (num_writes != num_addrs) { - printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776), + printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776), PROGNAME"776", strerror(errno)); DtSearchExit (76); } @@ -848,7 +848,7 @@ static void put_addrs_2_dtbs_addr_file ( num_writes = fwrite (addrs_array, sizeof(DB_ADDR), (size_t)got_word.or_hwfree, dtbs_addr_fp); if (num_writes != got_word.or_hwfree) { - printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776), + printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776), PROGNAME"786", strerror(errno)); DtSearchExit (86); } @@ -863,7 +863,7 @@ static void put_addrs_2_dtbs_addr_file ( num_writes = fwrite (addrs_array, sizeof(DB_ADDR), (size_t)nitems, dtbs_addr_fp); if (num_writes != nitems) { - printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776), + printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776), PROGNAME"798", strerror(errno)); DtSearchExit (87); } @@ -871,7 +871,7 @@ static void put_addrs_2_dtbs_addr_file ( num_writes = fwrite (word_addrs_ii, sizeof(DB_ADDR), (size_t)num_addrs, dtbs_addr_fp); if (num_writes != num_addrs) { - printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776), + printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776), PROGNAME"889", strerror(errno)); DtSearchExit (89); } @@ -934,7 +934,7 @@ void write_2_dtbs_addr_file (void) num_addrs_ii = got_word.or_hwaddrs; if (num_addrs_ii > or_reccount) { - printf (catgets (dtsearch_catd, MS_cborodin, 713, + printf (CATGETS(dtsearch_catd, MS_cborodin, 713, "\n%s Word '%s' occurs in %ld records,\n" " but there are only %ld records in database!\n" " (This may be a good candidate for the stoplist).\n"), @@ -947,7 +947,7 @@ void write_2_dtbs_addr_file (void) if (fseek (dtbs_addr_fp, (long) got_word.or_hwoffset, SEEK_SET) != 0) { - printf (catgets (dtsearch_catd, MS_cborodin, 875, + printf (CATGETS(dtsearch_catd, MS_cborodin, 875, "\n%s Could not fseek d99 file to offset %ld.\n"), PROGNAME"875", got_word.or_hwoffset); DtSearchExit (98); @@ -955,7 +955,7 @@ void write_2_dtbs_addr_file (void) num_reads = fread (word_addrs_ii, sizeof(DB_ADDR), (size_t)num_addrs_ii, dtbs_addr_fp); if (num_reads != num_addrs_ii) { - printf (catgets (dtsearch_catd, MS_cborodin, 848, + printf (CATGETS(dtsearch_catd, MS_cborodin, 848, "\n%s Could not fread %ld bytes (%ld dba's) of d99 file\n" " at offset %ld. Number of dba's read (return code) = %ld.\n"), PROGNAME"848", sizeof(DB_ADDR) * num_addrs_ii, (long)num_addrs_ii, @@ -990,7 +990,7 @@ void write_2_dtbs_addr_file (void) temp1 = (*(word_addrs_ii + i) >> 8) - 1; /* = rec#, base 0 */ cur_byte = temp1 >> 3; /* get matching byte# in bit vector */ if (cur_byte >= bit_vector_size) { - printf ( catgets(dtsearch_catd, MS_cborodin, 9, + printf ( CATGETS(dtsearch_catd, MS_cborodin, 9, "\n%s Corrupted d99 file for word '%s',\n" " database address %ld @ file position %ld => bitvector[%ld]," " but max bitvector allocation = %ld.\n") , @@ -1134,7 +1134,7 @@ void write_new_word_2_dtbs (void) num_writes = fwrite (record_addr_word, sizeof(DB_ADDR), (size_t)got_word.or_hwfree, dtbs_addr_fp); if (num_writes != got_word.or_hwfree) { - printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776), + printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776), PROGNAME"960", strerror(errno)); DtSearchExit (96); } @@ -1167,7 +1167,7 @@ void fill_data1 (char *node_word) count_word_ii++; if (shutdown_now) { - printf (catgets (dtsearch_catd, MS_cborodin, 164, + printf (CATGETS(dtsearch_catd, MS_cborodin, 164, "\n%s Abort due to signal %d. Database %s\n" " probably corrupted. Restore backup database.\n"), PROGNAME"164", shutdown_now, dicname); @@ -1186,7 +1186,7 @@ void fill_data1 (char *node_word) (((float) num_of_diff_words / (float) count_word_ii - 1.) * (float) (time (NULL) - timestart)); - printf (catgets (dtsearch_catd, MS_cborodin, 849, + printf (CATGETS(dtsearch_catd, MS_cborodin, 849, "\n%s: Word #%ld, %.0f%% done. Est %lum %02lus " "to completion.\n"), aa_argv0, count_word_ii, @@ -1296,7 +1296,7 @@ static void load_into_bintree ( */ else { if ((newdba = malloc (sizeof(DBALIST))) == NULL) { - printf (catgets (dtsearch_catd, MS_cborodin, 374, + printf (CATGETS(dtsearch_catd, MS_cborodin, 374, msg_374), PROGNAME"1150"); DtSearchExit (26); } @@ -1379,15 +1379,15 @@ main (int argc, char **argv) /******************* INITIALIZE ******************/ setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); aa_argv0 = strdup (argv[0]); time (&elapsed); tmptr = localtime (&elapsed); strftime (buf, sizeof(buf), - 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"), tmptr); - printf (catgets (dtsearch_catd, MS_cborodin, 1, "%s. Run %s.\n"), + printf (CATGETS(dtsearch_catd, MS_cborodin, 1, "%s. Run %s.\n"), aa_argv0, buf); austext_exit_last = print_exit_code; batch_size = BATCH_SIZE; @@ -1430,7 +1430,7 @@ main (int argc, char **argv) /* Load database's parser, stemmer, and linguistic files into dblk. */ if (!load_language (&dblk, NULL)) { puts (DtSearchGetMessages()); - printf (catgets (dtsearch_catd, MS_cborodin, 1097, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1097, "%s Aborting due to errors in loading language files.\n"), PROGNAME"1097"); DtSearchExit(3); @@ -1481,7 +1481,7 @@ main (int argc, char **argv) new_dtbs_file = TRUE; if (dtbs_addr_fp == NULL) { /* msg 1068 used multiple places */ - printf (catgets (dtsearch_catd, MS_cborodin, 1068, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1068, "%s Can't open new inverted index file '%s': %s\n"), PROGNAME"1068", dtbs_addr_file, strerror(errno)); DtSearchExit (13); @@ -1493,7 +1493,7 @@ main (int argc, char **argv) /* read Header Information from d99 file */ if (!fread_d99_header (&fl_hdr, dtbs_addr_fp)) { /* msg 1068 used multiple places */ - printf (catgets (dtsearch_catd, MS_cborodin, 1068, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1068, "%s Can't read header data for '%s': %s\n"), PROGNAME"1422", dtbs_addr_file, strerror(errno)); DtSearchExit (13); @@ -1506,14 +1506,14 @@ main (int argc, char **argv) printf (PROGNAME"1336 Can't getcwd: %s.\n", strerror(errno)); if (!src) src = getenv ("PWD"); - printf (catgets (dtsearch_catd, MS_misc, 24, + printf (CATGETS(dtsearch_catd, MS_misc, 24, "%s: current working directory = '%s', .fzk file = '%s'\n"), aa_argv0, - (src) ? src : catgets (dtsearch_catd, MS_misc, 6, ""), + (src) ? src : CATGETS(dtsearch_catd, MS_misc, 6, ""), fname_input); if ((instream = fopen (fname_input, "rt")) == NULL) { BAD_INPUT_FILE: - printf (catgets (dtsearch_catd, MS_cborodin, 1083, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1083, "%s Can't read input file '%s': %s\n"), PROGNAME"1083", fname_input, strerror(errno)); DtSearchExit (14); @@ -1538,7 +1538,7 @@ BAD_INPUT_FILE: * the language's parser() a 'word' at a time, which * ultimately means a byte at a time. */ - printf (catgets (dtsearch_catd, MS_cborodin, 1108, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1108, "%s: Beginning Pass 1, reading records from '%s'.\n" " Each dot = %d records.\n"), aa_argv0, fname_input, recs_per_dot); @@ -1560,7 +1560,7 @@ BAD_INPUT_FILE: inbuf [inbufsz] = 0; /* just to be sure */ if (shutdown_now) { - printf (catgets (dtsearch_catd, MS_cborodin, 164, + printf (CATGETS(dtsearch_catd, MS_cborodin, 164, "\n%s: %s Abort due to signal %d. Database %s\n" " possibly corrupted. Restore backup database.\n"), aa_argv0, PROGNAME"1299", shutdown_now, dicname); @@ -1576,7 +1576,7 @@ BAD_INPUT_FILE: /*----- READ LINE #2, abstract -----*/ if (fgets (inbuf, inbufsz, instream) == NULL) { INVALID_FZK_FORMAT: - printf (catgets (dtsearch_catd, MS_cborodin, 1129, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1129, "%s: %s Invalid .fzk file format.\n"), fname_input, PROGNAME"1129"); DtSearchExit (22); @@ -1593,7 +1593,7 @@ INVALID_FZK_FORMAT: /* If necessary, discard long keys exactly like cravel */ if (strlen (cptr) >= DtSrMAX_DB_KEYSIZE) { - printf (catgets (dtsearch_catd, MS_cborodin, 659, + printf (CATGETS(dtsearch_catd, MS_cborodin, 659, "\n%s: %s Discarding record, key too long:\n '%s'.\n"), aa_argv0, PROGNAME"659", cptr); discard_to_ETX (&parg); @@ -1604,7 +1604,7 @@ INVALID_FZK_FORMAT: /* Skip duplicate record ids in same order as dtsrload */ i = is_duprec (db_key); if (i == 2) { /* out of memory */ - printf (catgets (dtsearch_catd, MS_cborodin, 374, msg_374), + printf (CATGETS(dtsearch_catd, MS_cborodin, 374, msg_374), PROGNAME"1317"); DtSearchExit (57); } @@ -1612,7 +1612,7 @@ INVALID_FZK_FORMAT: duplicate_recids++; if (dotcount > 0) putchar ('\n'); - printf (catgets (dtsearch_catd, MS_cborodin, 1402, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1402, "%s: Discarded duplicate rec #%lu '%s'.\n"), aa_argv0, record_count, db_key); discard_to_ETX (&parg); @@ -1631,7 +1631,7 @@ INVALID_FZK_FORMAT: normal_retncode = 1; /* = 'warning' */ if (dotcount > 0) putchar ('\n'); - printf (catgets (dtsearch_catd, MS_cborodin, 1168, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1168, "%s: %s Discarded '%s', key not in database.\n"), aa_argv0, PROGNAME"1168", displayable(db_key)); discard_to_ETX (&parg); @@ -1653,7 +1653,7 @@ INVALID_FZK_FORMAT: * if user failed to run dtsrload before dtsrindex? */ if (dba < 1 || dba > or_maxdba) { - printf ( catgets(dtsearch_catd, MS_cborodin, 21, + printf ( CATGETS(dtsearch_catd, MS_cborodin, 21, "\n%s '%s' record overflows word counter array.\n" "Record number %ld > maxdba %ld, dba=%ld, " "recslots=%ld, offs=%d.\n") , @@ -1665,7 +1665,7 @@ INVALID_FZK_FORMAT: temp_dba = dba - 1; /* = rec# starting at 0 */ cur_byte = temp_dba >> 3; /* bits to bytes: div by 8 */ if (cur_byte >= bit_vector_size) { - printf ( catgets(dtsearch_catd, MS_cborodin, 22, + printf ( CATGETS(dtsearch_catd, MS_cborodin, 22, "\n%s '%s' record in database (dba=%ld)\n" " overflows bitvector allocation (%ld >= %ld).\n") , PROGNAME"1475", displayable(db_key), (long)dba, @@ -1687,7 +1687,7 @@ INVALID_FZK_FORMAT: (((float) fstat_input.st_size / (float) bytes_in - 1.) * (float) (time (NULL) - timestart)); - printf (catgets (dtsearch_catd, MS_cborodin, 1190, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1190, "\n%s: Rec #%lu, %.0f%% done. " "Est %lum %02lus to end Pass 1.\n"), aa_argv0, @@ -1748,20 +1748,20 @@ INVALID_FZK_FORMAT: } if (duplicate_recids > 0L) { normal_retncode = 1; /* 'warning' */ - sprintf (buf, catgets (dtsearch_catd, MS_cborodin, 40, + sprintf (buf, CATGETS(dtsearch_catd, MS_cborodin, 40, "Ignored %ld duplicate records"), duplicate_recids); } else - strcpy (buf, catgets (dtsearch_catd, MS_cborodin, 41, + strcpy (buf, CATGETS(dtsearch_catd, MS_cborodin, 41, "No duplicate records found")); - printf (catgets (dtsearch_catd, MS_cborodin, 1225, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1225, "%s: Pass 1 completed in %lum %lus, read %lu records.\n" " %s, parsed %lu words.\n"), aa_argv0, elapsed / 60L, elapsed % 60L, record_count, buf, num_of_diff_words); if (record_count > batch_size) { - printf (catgets (dtsearch_catd, MS_cborodin, 33, + printf (CATGETS(dtsearch_catd, MS_cborodin, 33, "\n%s Number of incoming records exceeded %d.\n" " This will usually result in 'Out of Paging Space' " "error in Pass 2\n" @@ -1774,7 +1774,7 @@ INVALID_FZK_FORMAT: /*----------------- PASS 2: ----------------- * Traverse completed binary tree and write it to d99 file. */ - printf (catgets (dtsearch_catd, MS_cborodin, 1233, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1233, "%s: Beginning Pass 2: batch index traversal and database update.\n" " Each dot = %d words.\n"), aa_argv0, words_per_dot); @@ -1788,7 +1788,7 @@ INVALID_FZK_FORMAT: /* Write header information to the d99 file */ if (!fwrite_d99_header (&fl_hdr, dtbs_addr_fp)) { - printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776), + printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776), PROGNAME"1723", strerror(errno)); DtSearchExit (13); } @@ -1796,11 +1796,11 @@ INVALID_FZK_FORMAT: fclose (dtbs_addr_fp); elapsed = time (NULL) - timestart; - printf (catgets (dtsearch_catd, MS_cborodin, 1246, + printf (CATGETS(dtsearch_catd, MS_cborodin, 1246, "%s: Pass 2 completed in %lum %lus, updated %lu words.\n"), aa_argv0, elapsed / 60L, elapsed % 60L, count_word_ii); if (normal_retncode == 1) - printf (catgets (dtsearch_catd, MS_cborodin, 2, + printf (CATGETS(dtsearch_catd, MS_cborodin, 2, "%s: Warnings were detected.\n"), aa_argv0); DtSearchExit (normal_retncode); diff --git a/cde/programs/dtsr/dtsrkdump.c b/cde/programs/dtsr/dtsrkdump.c index c3cd233a8..0a025b942 100644 --- a/cde/programs/dtsr/dtsrkdump.c +++ b/cde/programs/dtsr/dtsrkdump.c @@ -117,7 +117,7 @@ void count_words (int index) else if (index == 4) vista_field = OR_HWORDKEY; else { - printf (catgets (dtsearch_catd, MS_dtsrkdump, 1, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 1, "%s Program Error Abort.\a\n"), PROGNAME"030"); DtSearchExit (4); @@ -164,7 +164,7 @@ void count_words (int index) printf ("\" "); while (tabstop++ < 22) putchar (' '); - printf (catgets(dtsearch_catd, MS_dtsrkdump, 2, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 2, "%c dba=%d:%-7ld ofs=%-9ld adr=%-6ld fre=%ld\n"), (addrs >= dbrec.or_reccount) ? '*' : ' ', dba >> 24, dba & 0xffffff, offset, addrs, free); @@ -227,17 +227,17 @@ int main (int argc, char *argv[]) sscanf ("$Revision: /main/3 $", "%*s %s", rcs_revision); setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); strftime (buf, sizeof (buf), "%m/%d/%Y, %I:%M %p", localtime (&now)); - printf (catgets(dtsearch_catd, MS_dtsrkdump, 3, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 3, "%s %s, engine %s. %s.\n"), aa_argv0, rcs_revision, AUSAPI_VERSION, buf); if (argc <= 1) { PRINT_USAGE: - printf (catgets(dtsearch_catd, MS_dtsrkdump, 4, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 4, "\nUSAGE: %s -o|w|ow [-v] [-t | -p] dbname\n" " Reads DtSearch key files and prints summary report.\n" " -o Keys examined are OBJECT record keys.\n" @@ -291,7 +291,7 @@ PRINT_USAGE: percent = atof (ptr + 1); if (percent <= 0.0 || percent > 100.0) { fprintf (stderr, - catgets (dtsearch_catd, MS_dtsrkdump, 5, + CATGETS(dtsearch_catd, MS_dtsrkdump, 5, "%s Invalid percent value %lf.\a\n"), PROGNAME"195", percent); goto PRINT_USAGE; @@ -304,7 +304,7 @@ PRINT_USAGE: do_wordkeys = TRUE; if ((min_threshold = atol (ptr + 1)) <= 0L) { fprintf (stderr, - catgets (dtsearch_catd, MS_dtsrkdump, 53, + CATGETS(dtsearch_catd, MS_dtsrkdump, 53, "%s Invalid threshold value.\a\n"), PROGNAME"198"); goto PRINT_USAGE; @@ -314,7 +314,7 @@ PRINT_USAGE: default: fprintf (stderr, - catgets (dtsearch_catd, MS_dtsrkdump, 55, + CATGETS(dtsearch_catd, MS_dtsrkdump, 55, "%s Unknown command line argument '%c'.\a\n"), PROGNAME"278", *ptr); goto PRINT_USAGE; @@ -325,13 +325,13 @@ PRINT_USAGE: oops = FALSE; if (argc <= 0) { - printf (catgets (dtsearch_catd, MS_dtsrkdump, 56, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 56, "%s Missing required database name.\a\n"), PROGNAME"267"); oops = TRUE; } if (!do_wordkeys && !do_objkeys) { - printf (catgets (dtsearch_catd, MS_dtsrkdump, 57, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 57, "%s Either -o or -w must be specified.\a\n"), PROGNAME"271"); oops = TRUE; @@ -359,7 +359,7 @@ PRINT_USAGE: /* test for valid database name */ i = strlen (ptr); if (i < 1 || i > 8) { - fprintf (stderr, catgets (dtsearch_catd, MS_dtsrkdump, 58, + fprintf (stderr, CATGETS(dtsearch_catd, MS_dtsrkdump, 58, "%s Invalid database name '%s'.\a\n"), PROGNAME"297", ptr); goto PRINT_USAGE; @@ -375,7 +375,7 @@ PRINT_USAGE: } maxdba = dbrec.or_maxdba; - printf (catgets(dtsearch_catd, MS_dtsrkdump, 60, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 60, "%s: '%s' reccount=%ld maxdba=%ld recslots=%hd minw=%hd maxw=%hd\n"), aa_argv0, dbname, dbrec.or_reccount, dbrec.or_maxdba, dbrec.or_recslots, @@ -392,7 +392,7 @@ PRINT_USAGE: if (min_threshold > 1 && min_threshold < dbrec.or_reccount) { - printf (catgets(dtsearch_catd, MS_dtsrkdump, 70, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 70, "%s Will only list words occurring " "in %ld or more records.\n"), aa_argv0, min_threshold); @@ -400,7 +400,7 @@ PRINT_USAGE: (float) min_threshold / (float) dbrec.or_reccount > .90; } else { - printf (catgets(dtsearch_catd, MS_dtsrkdump, 80, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 80, "%s: Listing all words in database.\n"), aa_argv0); listing_most_words = TRUE; @@ -445,7 +445,7 @@ PRINT_USAGE: while (i++ < DtSrMAX_DB_KEYSIZE) putchar (' '); - printf (catgets(dtsearch_catd, MS_dtsrkdump, 100, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 100, "dba x%08lx, %6ld\n"), dba, dba); } /* end verbose */ @@ -471,11 +471,11 @@ PRINT_USAGE: if (dbpath[0] == 0) buf[0] = 0; else - sprintf (buf, catgets(dtsearch_catd, MS_dtsrkdump, 110, + sprintf (buf, CATGETS(dtsearch_catd, MS_dtsrkdump, 110, " in %s"), dbpath); - printf (catgets(dtsearch_catd, MS_dtsrkdump, 120, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 120, "Object Summary for '%s'%s:\n"), dbname, buf); - puts (catgets(dtsearch_catd, MS_dtsrkdump, 130, + puts (CATGETS(dtsearch_catd, MS_dtsrkdump, 130, "Object Count by Keytypes:")); total = 0L; for (i = 0; i < 256; i++) { @@ -487,16 +487,16 @@ PRINT_USAGE: printf (" x%02x %6ld\n", i, counters[i]); } } - printf (catgets(dtsearch_catd, MS_dtsrkdump, 160, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 160, "TOTAL Objects Count = %ld\n"), total); - printf (catgets(dtsearch_catd, MS_dtsrkdump, 170, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 170, "Largest Object DBA = %ld\n"), maxdba); free (counters); } /* end do_objkeys */ if (do_wordkeys) { if (listing_most_words) - printf (catgets(dtsearch_catd, MS_dtsrkdump, 180, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 180, "%s: * Words marked with asterisk occur in every record.\n"), aa_argv0); @@ -519,16 +519,16 @@ PRINT_USAGE: if (dbpath[0] == 0) buf[0] = 0; else - sprintf (buf, catgets(dtsearch_catd, MS_dtsrkdump, 110, + sprintf (buf, CATGETS(dtsearch_catd, MS_dtsrkdump, 110, " in %s"), dbpath); - printf (catgets(dtsearch_catd, MS_dtsrkdump, 200, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 200, "Words Summary for '%s'%s:\n"), dbname, buf); total = 0L; for (i = 0; i < 6; i++) { printf (word_labels[i], counters[i]); total += counters[i]; } - printf (catgets(dtsearch_catd, MS_dtsrkdump, 210, + printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 210, "TOTAL Words Count = %ld\n"), total); free (counters); } /* end do_wordkeys */ diff --git a/cde/programs/dtsr/dtsrload.c b/cde/programs/dtsr/dtsrload.c index efb3ac551..6fb7e0731 100644 --- a/cde/programs/dtsr/dtsrload.c +++ b/cde/programs/dtsr/dtsrload.c @@ -225,7 +225,7 @@ static void user_args_processor (int argc, char **argv) if (argc <= 1) { PRINT_USAGE: - printf (catgets (dtsearch_catd, MS_cravel, 1, + printf (CATGETS(dtsearch_catd, MS_cravel, 1, "\nUSAGE: %s -d [options] infile\n" " Listed default file name extensions can be overridden.\n" " -d 1 - 8 char database name, incl optional path prefix.\n" @@ -261,7 +261,7 @@ PRINT_USAGE: case 'd': /* (D)ictionary */ /* May include both dicname and dicpath */ if (!segregate_dicname (argptr + 2)) { - printf (catgets (dtsearch_catd, MS_cravel, 246, + printf (CATGETS(dtsearch_catd, MS_cravel, 246, "\n%s '%s' is invalid path/dictionary name.\n"), PROGNAME, argptr); goto PRINT_USAGE; @@ -286,7 +286,7 @@ PRINT_USAGE: case 'p': if ((recs_per_dot = atoi (argptr + 2)) <= 0) { recs_per_dot = RECS_PER_DOT; - printf (catgets (dtsearch_catd, MS_cravel, 582, + printf (CATGETS(dtsearch_catd, MS_cravel, 582, "%sIgnored invalid progress dot argument '%s'.\n"), PROGNAME "582 ", argptr); } @@ -300,7 +300,7 @@ PRINT_USAGE: case 'h': duprec_hashsize = atol (argptr + 2); if (duprec_hashsize == 0UL) - printf (catgets (dtsearch_catd, MS_cravel, 13, + printf (CATGETS(dtsearch_catd, MS_cravel, 13, "%s Duplicate record id checking disabled.\n"), PROGNAME); break; @@ -312,7 +312,7 @@ PRINT_USAGE: default: UNKNOWN_ARG: - printf (catgets (dtsearch_catd, MS_cravel, 14, + printf (CATGETS(dtsearch_catd, MS_cravel, 14, "\n%s Unknown command line argument '%s'.\n"), PROGNAME, argptr); } /* endswitch */ @@ -320,7 +320,7 @@ UNKNOWN_ARG: /* validate input file name */ if (argc <= 0) { - puts (catgets (dtsearch_catd, MS_cravel, 15, + puts (CATGETS(dtsearch_catd, MS_cravel, 15, "\nMissing required input file name.\a")); goto PRINT_USAGE; } @@ -329,7 +329,7 @@ UNKNOWN_ARG: /* check for missing database name */ if (dicname[0] == 0) { - puts (catgets (dtsearch_catd, MS_cravel, 16, + puts (CATGETS(dtsearch_catd, MS_cravel, 16, "\nNo database name specified (-d argument).\a")); goto PRINT_USAGE; } @@ -351,7 +351,7 @@ static void count_all_records (void) { char keybuf[DtSrMAX_DB_KEYSIZE + 4]; - printf (catgets (dtsearch_catd, MS_cravel, 17, + printf (CATGETS(dtsearch_catd, MS_cravel, 17, "%s Initializing total record count " "in database by actually counting...\n"), PROGNAME); @@ -388,7 +388,7 @@ static void read_dbrec (void) { RECFRST (PROGNAME "285", OR_DBREC, 0); /* seqtl retrieval */ if (db_status != S_OKAY) { - printf (catgets (dtsearch_catd, MS_misc, 13, + printf (CATGETS(dtsearch_catd, MS_misc, 13, "%sNo DB record in database '%s'.\n" " The usual cause is failure to initialize " "the database (run initausd).\n"), @@ -426,7 +426,7 @@ static void read_dbrec (void) /* Confirm compatible program-database version numbers */ if (!is_compatible_version (dbrec.or_version, SCHEMA_VERSION)) { - printf (catgets(dtsearch_catd, MS_misc, 14, + printf (CATGETS(dtsearch_catd, MS_misc, 14, "%s Program schema version '%s' incompatible with " "database '%s' version '%s'.\n") , PROGNAME"245", SCHEMA_VERSION, dicname, dbrec.or_version); @@ -443,7 +443,7 @@ static void read_dbrec (void) blobs_are_used = TRUE; if (!(dbrec.or_compflags & ORC_COMPBLOB)) { /* = don't compress blobs */ - printf (catgets (dtsearch_catd, MS_cravel, 717, + printf (CATGETS(dtsearch_catd, MS_cravel, 717, "%s Aborting: Uncompressed blobs not yet supported.\n"), PROGNAME"717"); DtSearchExit (5); @@ -464,7 +464,7 @@ static void read_dbrec (void) maxdba = dbrec.or_maxdba; } - printf (catgets (dtsearch_catd, MS_cravel, 18, + printf (CATGETS(dtsearch_catd, MS_cravel, 18, "%s: '%s' schema ver = %s, rec count = %ld, last slot = %ld.\n"), aa_argv0, dicname, dbrec.or_version, (long)system_reccount, (long)maxdba); @@ -500,7 +500,7 @@ static void write_dbrec (void) } if (db_status != S_OKAY) vista_abort (PROGNAME "344"); - printf (catgets (dtsearch_catd, MS_cravel, 19, + printf (CATGETS(dtsearch_catd, MS_cravel, 19, "%s: Final database record count = %ld, last slot = %ld.\n"), aa_argv0, (long)system_reccount, (long)maxdba); return; @@ -521,7 +521,7 @@ static void print_progress (void) if (bytes_in <= 0L) bytes_in = fstat_input.st_size; /* make final msg "100%" */ TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 20, + printf (CATGETS(dtsearch_catd, MS_cravel, 20, "%s: %ld input records processed in %ldm %lds, (%ld%%).\n" " %ld duplicates, %ld new, %ld updates.\n"), aa_argv0, @@ -545,7 +545,7 @@ static void print_exit_code (int exit_code) putchar ('\n'); dotcount = 0; } - printf ( catgets(dtsearch_catd, MS_cravel, 2, + printf ( CATGETS(dtsearch_catd, MS_cravel, 2, "%s: Exit code = %d\n") , aa_argv0, exit_code); fflush (aa_stderr); @@ -589,7 +589,7 @@ static int load_next_miscrec (int first_call) if ((totbytes = dbrec.or_fzkeysz + dbrec.or_abstrsz) <= 0) return FALSE; if (dbrec.or_fzkeysz > 0) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_cravel, 522, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 522, "%s This version of %s does not support semantic databases.\n"), PROGNAME"522", aa_argv0); DtSearchExit (13); @@ -638,7 +638,7 @@ static int load_next_miscrec (int first_call) break; default: - fprintf (aa_stderr, catgets (dtsearch_catd, MS_misc, 25, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_misc, 25, "%sAbort due to program error.\n"), PROGNAME "549 "); DtSearchExit (54); @@ -877,16 +877,16 @@ int main (int argc, char *argv[]) /* Init globals */ setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); aa_argv0 = argv[0]; time (&starttime); tmptr = localtime (&starttime); starttimeobjd = tm2objdate (tmptr); strftime (linebuf, sizeof (linebuf), - 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"), tmptr); - printf (catgets (dtsearch_catd, MS_misc, 23, + printf (CATGETS(dtsearch_catd, MS_misc, 23, "%s: Version %s. Run %s.\n"), aa_argv0, DtSrVERSION, @@ -919,13 +919,13 @@ int main (int argc, char *argv[]) src = getcwd (linebuf, sizeof (linebuf)); if (!src) src = getenv ("PWD"); - printf (catgets (dtsearch_catd, MS_misc, 24, + printf (CATGETS(dtsearch_catd, MS_misc, 24, "%s: cwd = '%s', fzkfile = '%s'\n"), aa_argv0, - (src) ? src : catgets (dtsearch_catd, MS_misc, 6, ""), + (src) ? src : CATGETS(dtsearch_catd, MS_misc, 6, ""), fname_input); if ((infile = fopen (fname_input, "r")) == NULL) { - fprintf (aa_stderr, catgets (dtsearch_catd, MS_misc, 12, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_misc, 12, "%sUnable to open %s:\n %s\n"), PROGNAME "326 ", fname_input, strerror (errno)); DtSearchExit (6); @@ -939,7 +939,7 @@ int main (int argc, char *argv[]) * create correctly sized buffers for them. */ if (dbrec.or_fzkeysz > 0) { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_cravel, 522, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 522, "%s This version of %s does not support semantic databases.\n"), PROGNAME"523", aa_argv0); DtSearchExit (13); @@ -950,19 +950,19 @@ int main (int argc, char *argv[]) /* Get input file size for progress msgs */ if (fstat (fileno (infile), &fstat_input) == -1) { - fprintf (aa_stderr, catgets (dtsearch_catd, MS_cravel, 29, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 29, "%s Unable to get status for %s: %s\n"), PROGNAME"337", fname_input, strerror (errno)); DtSearchExit (10); } if (fstat_input.st_size <= 0L) { - fprintf (aa_stderr, catgets (dtsearch_catd, MS_cravel, 30, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 30, "%s File %s is empty.\n"), PROGNAME"343", fname_input); DtSearchExit (7); } - printf (catgets (dtsearch_catd, MS_cravel, 31, + printf (CATGETS(dtsearch_catd, MS_cravel, 31, "%s: Each dot = %d records processed.\n"), aa_argv0, recs_per_dot); @@ -1016,7 +1016,7 @@ int main (int argc, char *argv[]) if (shutdown_now) { TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_misc, 15, + printf (CATGETS(dtsearch_catd, MS_misc, 15, "%sReceived abort signal %d.\n"), PROGNAME"373 ", shutdown_now); write_dbrec (); /* at least update reccount and maxdba */ @@ -1040,7 +1040,7 @@ int main (int argc, char *argv[]) INVALID_FORMAT: normal_exitcode = EXIT_WARNING; TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 579, + printf (CATGETS(dtsearch_catd, MS_cravel, 579, "%s Discarded rec #%ld: Invalid .fzk file format.\n"), cptr, input_reccount); if (strcmp (linebuf, parg.etxdelim) != 0) @@ -1081,7 +1081,7 @@ int main (int argc, char *argv[]) if (strlen (db_key) > DtSrMAX_DB_KEYSIZE - 1) { normal_exitcode = EXIT_WARNING; TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 33, + printf (CATGETS(dtsearch_catd, MS_cravel, 33, "%s Discarded rec #%ld: Key too long:\n '%s'.\n"), PROGNAME"606", input_reccount, db_key); discard_to_ETX (&parg); @@ -1090,7 +1090,7 @@ int main (int argc, char *argv[]) if (!isalnum (db_key[0])) { normal_exitcode = EXIT_WARNING; TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 927, + printf (CATGETS(dtsearch_catd, MS_cravel, 927, "%s Discarded rec #%ld: First char (keytype) of key\n" " '%s' is not alphanumeric.\n"), PROGNAME"927", input_reccount, db_key); @@ -1102,7 +1102,7 @@ int main (int argc, char *argv[]) i = is_duprec (db_key); if (i == 2) { TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 34, + printf (CATGETS(dtsearch_catd, MS_cravel, 34, "%s Out of Memory! " "Set -h arg to a smaller number,\n" " or reduce the number of input records.\n"), @@ -1112,7 +1112,7 @@ int main (int argc, char *argv[]) else if (i == 1) { /* skip duplicate record id */ normal_exitcode = EXIT_WARNING; TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 35, + printf (CATGETS(dtsearch_catd, MS_cravel, 35, "%s: Discarded duplicate rec #%ld '%s'.\n"), aa_argv0, input_reccount, db_key); duplicate_recids++; @@ -1157,7 +1157,7 @@ int main (int argc, char *argv[]) goto INVALID_FORMAT; } TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 1086, + printf (CATGETS(dtsearch_catd, MS_cravel, 1086, "%s Record '%s' has invalid date format--" "using run date.\n"), PROGNAME"1086", uniqkey); @@ -1202,7 +1202,7 @@ int main (int argc, char *argv[]) gen_vec (fname_huffcode_tab); if (dbrec_hufid != gen_vec_hufid && dbrec_hufid != -1L) { TERMINATE_LINE - printf (catgets (dtsearch_catd, MS_cravel, 1153, + printf (CATGETS(dtsearch_catd, MS_cravel, 1153, "%s Current data compression table id" " in '%s' is %ld.\n" " Database '%s' previously compressed" @@ -1223,7 +1223,7 @@ int main (int argc, char *argv[]) if ((linebuf[0] = readchar_ftext (&parg)) == 0) { normal_exitcode = EXIT_WARNING; TERMINATE_LINE - printf ( catgets(dtsearch_catd, MS_cravel, 1215, + printf ( CATGETS(dtsearch_catd, MS_cravel, 1215, "%s Warning. Record '%s' has no text.\n"), PROGNAME"1215" , uniqkey); continue; @@ -1273,7 +1273,7 @@ int main (int argc, char *argv[]) */ if (created_reccount <= 0L && updated_reccount <= 0L) { normal_exitcode = EXIT_VANISH; - fprintf (stderr, catgets (dtsearch_catd, MS_cravel, 1048, + fprintf (stderr, CATGETS(dtsearch_catd, MS_cravel, 1048, "%sDatabase objects not changed because input " "file effectively empty.\n"), PROGNAME "1048 "); diff --git a/cde/programs/dtsr/huffcode.c b/cde/programs/dtsr/huffcode.c index 2215ba683..ea50fcab0 100644 --- a/cde/programs/dtsr/huffcode.c +++ b/cde/programs/dtsr/huffcode.c @@ -266,14 +266,14 @@ static int build_tree (void) * tree level, quit. */ if (hctree1[i].sort > MAX_BITLEN) { - fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 30, + fprintf (stderr, "%s", CATGETS(dtsearch_catd, MS_huff, 30, "\n183 Bit strings have grown too large. You probably " "have literals\n turned off with grossly unbalanced " "character counts.\n\7")); exit (2); } if (hctree1[curr].count >= total_count) { - fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 31, + fprintf (stderr, "%s", CATGETS(dtsearch_catd, MS_huff, 31, "\n191 Programming Error: Still trying to build\n" " Huffman Code Tree after root created.\n\7")); exit (2); @@ -391,7 +391,7 @@ static char *char_label (int x) return buf; } else if (x >= 128) { - snprintf(buf, sizeof(buf), "%s", catgets(dtsearch_catd, MS_huff, 32, + snprintf(buf, sizeof(buf), "%s", CATGETS(dtsearch_catd, MS_huff, 32, "(nonascii char, high bit set)")); return buf; } @@ -476,7 +476,7 @@ static void init_treebase (void) != NULL) { i = atoi (strtok (filebuf, DELIMITERS)); /* char */ if (i < 0 || i > 256) { - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 33, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 33, "366 Invalid file format for %s.\n"), filename_huf); exit (2); @@ -534,13 +534,13 @@ static void huffman_code (time_t idstamp) * Open both output files and verify they are not write protected. */ if ((outstream_huc = fopen (filename_huc, "w")) == NULL) { - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 34, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 34, "424 File '%s' failed to open for write. Is it read-only?\n"), filename_huc); exit (2); } if ((outstream_huf = fopen (filename_huf, "w")) == NULL) { - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 34, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 34, "439 File '%s' failed to open for write. Is it read-only?\n"), filename_huf); exit (2); @@ -602,7 +602,7 @@ static void huffman_code (time_t idstamp) /****************************************/ static void print_usage (void) { - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 35, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 35, "USAGE: huffcode [-lN | -l-] [-o] []\n" " -l specifies the 'literal' threshold count. Any character occurring\n" " <= times will be coded with the Huffman literal. Default is -l0,\n" @@ -663,7 +663,7 @@ static void user_args_processor (int argc, char **argv) BADARG: default: - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 36, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 36, "'%s' is invalid argument.\n"), argptr); print_usage (); exit (2); /* ABORT program */ @@ -673,7 +673,7 @@ static void user_args_processor (int argc, char **argv) /* test for required tree file name */ if (argc <= 0) { - fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 37, + fprintf (stderr, "%s", CATGETS(dtsearch_catd, MS_huff, 37, "576 Missing Huffman Code file names prefix.\n")); print_usage (); exit (2); @@ -695,7 +695,7 @@ static void user_args_processor (int argc, char **argv) if (!OK_to_overwrite) if ((stream = fopen (filename_huc, "r")) != NULL) { fclose (stream); - printf (catgets(dtsearch_catd, MS_huff, 38, + printf (CATGETS(dtsearch_catd, MS_huff, 38, "Decode file '%s' already exists. " "Is it OK to overwrite it? [y/n] "), filename_huc); @@ -729,8 +729,8 @@ int main (int argc, char *argv[]) time_t now, start_stamp; setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); - printf (catgets(dtsearch_catd, MS_huff, 40, + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); + printf (CATGETS(dtsearch_catd, MS_huff, 40, "HUFFCODE Version %s\n"), AUSAPI_VERSION); /* validate user's command line arguments */ @@ -739,15 +739,15 @@ int main (int argc, char *argv[]) /* initialize tree table, using the table file if it exists */ init_treebase (); if (total_count == 0L) - printf ("%s", catgets(dtsearch_catd, MS_huff, 41, + printf ("%s", CATGETS(dtsearch_catd, MS_huff, 41, "Huffman Code Tables will be newly created.\n")); else - printf (catgets(dtsearch_catd, MS_huff, 42, + printf (CATGETS(dtsearch_catd, MS_huff, 42, "Table '%s' already contains %ld Kbytes from previous runs.\n"), filename_huf, total_count / 1000L); if (!input_file_specified && no_huffcode_file) { - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 43, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 43, "645 Input file not specified and '%s' table file\n" " doesn't exist--nothing to do!\n"), filename_huf); @@ -759,14 +759,14 @@ int main (int argc, char *argv[]) if (input_file_specified) { if ((instream = fopen (filename_input, "rb")) == NULL) { BAD_INPUT_FILE: - fprintf (stderr, catgets(dtsearch_catd, MS_huff, 44, + fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 44, "Could not open input file '%s' or access status: %s\n"), filename_input, strerror (errno)); exit (2); } if (fstat (fileno (instream), &fstat_input) == -1) goto BAD_INPUT_FILE; - printf (catgets(dtsearch_catd, MS_huff, 45, + printf (CATGETS(dtsearch_catd, MS_huff, 45, "Input file '%s' contains about %ld Kbytes.\n"), filename_input, fstat_input.st_size / 1000L); @@ -777,7 +777,7 @@ int main (int argc, char *argv[]) /* echo progress to user every so often */ if (!(++bytes_in % 10000L)) - printf (catgets(dtsearch_catd, MS_huff, 46, + printf (CATGETS(dtsearch_catd, MS_huff, 46, "\r%ld%% done. %2ld Kbytes read. " "Estimate %3ld seconds to completion. "), (bytes_in * 100L) / fstat_input.st_size, @@ -793,13 +793,13 @@ int main (int argc, char *argv[]) /* build huffman code tree, write out files */ time (&now); /* this will be the official tree id time * stamp */ - printf (catgets(dtsearch_catd, MS_huff, 47, + printf (CATGETS(dtsearch_catd, MS_huff, 47, "Identifying timestamp will be '%ld'.\n" "%s Huffman Code Tables in '%s' and '%s'..."), now, (no_huffcode_file) ? - catgets(dtsearch_catd, MS_huff, 48, "Creating") : - catgets(dtsearch_catd, MS_huff, 49, "Rebuilding"), + CATGETS(dtsearch_catd, MS_huff, 48, "Creating") : + CATGETS(dtsearch_catd, MS_huff, 49, "Rebuilding"), filename_huf, filename_huc); huffman_code (now); diff --git a/cde/programs/dtsr/tomita.c b/cde/programs/dtsr/tomita.c index 31c1efc98..3b96ff639 100644 --- a/cde/programs/dtsr/tomita.c +++ b/cde/programs/dtsr/tomita.c @@ -126,7 +126,7 @@ char parsed_recid [2048]; /* Called from inside DtSearchExit() at austext_exit_last */ static void print_exit_code (int exit_code) { - printf ( catgets(dtsearch_catd, MS_tomita, 3, + printf ( CATGETS(dtsearch_catd, MS_tomita, 3, "%s: Exit Code = %d.\n") , aa_argv0, exit_code); return; @@ -145,7 +145,7 @@ static void print_exit_code (int exit_code) static void kill_delete (int sig) { shutdown_now = TRUE; - printf ( catgets(dtsearch_catd, MS_tomita, 1, + printf ( CATGETS(dtsearch_catd, MS_tomita, 1, "\n%s Received interrupt %d.\n" " Program will stop after current batch of deletions.\n") , PROGNAME"069", sig); @@ -190,14 +190,14 @@ static int change_database (char *newname) /* Invalid newname. If deleting, just say which database is invalid. */ retncode = 1; - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 4, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 4, "%s Database '%s' not found.\n") , PROGNAME"114", newname); if (prog == 'D') return FALSE; /* If browsing, tell user his options */ - fprintf (aa_stderr, "%s", catgets(dtsearch_catd, MS_tomita, 5, + fprintf (aa_stderr, "%s", CATGETS(dtsearch_catd, MS_tomita, 5, "Available choices are:") ); for (db = usrblk.dblist; db != NULL; db = db->link) fprintf (aa_stderr, " '%s'", db->name); @@ -233,7 +233,7 @@ static int parse_infbuf (char *infbuf) /* Parse first token (database name) */ if ((ptr = strtok (mybuf, " \t")) == NULL) { /* Msg #8 is used in two places */ - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 8, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 8, "%s Invalid input format: %.30s...\n") , PROGNAME"152", infbuf); retncode = 1; @@ -259,7 +259,7 @@ static int parse_infbuf (char *infbuf) ptr = strtok (ptr, (*ptr == '\"') ? "\"" : " \t"); if (ptr == NULL) { /* Msg #8 is used in two places */ - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 8, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 8, "%s Invalid input format: %.30s...\n") , PROGNAME"176", infbuf); retncode = 1; @@ -306,7 +306,7 @@ static int browser (void) } /* Write main menu prompt */ - printf ( catgets(dtsearch_catd, MS_tomita, 10, + printf ( CATGETS(dtsearch_catd, MS_tomita, 10, "\n---------- SHOW NEXT RECORD ----------- Database = '%s'\n" "q QUIT. Current Record Count = %ld\n" "p Toggle PAUSE from %s.\n" @@ -352,7 +352,7 @@ static int browser (void) case 'r': if (usrblk.objrec.or_objkey[0] == 0) { fprintf (aa_stderr, - catgets(dtsearch_catd, MS_tomita, 11, + CATGETS(dtsearch_catd, MS_tomita, 11, "%s Record buffer empty.\n"), PROGNAME"267"); continue; @@ -369,7 +369,7 @@ static int browser (void) case 'n': if (inf == NULL) { fprintf (aa_stderr, - catgets(dtsearch_catd, MS_tomita, 12, + CATGETS(dtsearch_catd, MS_tomita, 12, "%s Input file unavailable.\n"), PROGNAME"282"); continue; @@ -378,7 +378,7 @@ static int browser (void) if ((fgets (infbuf, sizeof (infbuf), inf)) == NULL) { fprintf (aa_stderr, - catgets(dtsearch_catd, MS_tomita, 13, + CATGETS(dtsearch_catd, MS_tomita, 13, "%s No more records in input file.\n"), PROGNAME"288"); fclose (inf); @@ -400,7 +400,7 @@ static int browser (void) ptr = strtok (userbuf, "\""); if (ptr == NULL || *ptr == 0) { fprintf (aa_stderr, - catgets(dtsearch_catd, MS_tomita, 14, + CATGETS(dtsearch_catd, MS_tomita, 14, "%s Invalid Record ID.\n"), PROGNAME"303"); continue; @@ -417,13 +417,13 @@ static int browser (void) */ fprintf (outf, DISCARD_FORMAT, usrblk.dblk->name, usrblk.objrec.or_objkey, usrblk.userid, datestr); - printf ( catgets(dtsearch_catd, MS_tomita, 15, + printf ( CATGETS(dtsearch_catd, MS_tomita, 15, "%s '%s' appended to file of confirmed deletions.\n") , PROGNAME"317", usrblk.objrec.or_objkey); continue; default: - printf ("%s", catgets(dtsearch_catd, MS_tomita, 16, "...what?\n")); + printf ("%s", CATGETS(dtsearch_catd, MS_tomita, 16, "...what?\n")); continue; } /* end switch */ @@ -439,7 +439,7 @@ static int browser (void) * address */ if (usrblk.retncode == OE_WRAPPED) - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 17, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 17, "%s %s Engine wrapped to next record.\n") , PROGNAME"333", OE_prodname); else if (usrblk.retncode != OE_OK) @@ -453,14 +453,14 @@ static int browser (void) DISPLAY_RECORD: /* display the record's cleartext, character by character */ - printf ( catgets(dtsearch_catd, MS_tomita, 18, + printf ( CATGETS(dtsearch_catd, MS_tomita, 18, "\n\n" "Record: '%s'\n" "Abstract: '%s'\n" "--------------------------------------\n") , usrblk.objrec.or_objkey, (usrblk.abstrbufsz > 0) ? usrblk.abstrbuf : - catgets (dtsearch_catd, MS_misc, 1, "")); + CATGETS(dtsearch_catd, MS_misc, 1, "")); pause_counter = 0; for (ptr = usrblk.cleartext; *ptr != 0; ptr++) { @@ -472,7 +472,7 @@ DISPLAY_RECORD: if (pausing && *ptr == '\n') { if (++pause_counter >= PAUSE_ROWS) { /* Msg 21 is used in two places */ - printf ( "%s", catgets(dtsearch_catd, MS_tomita, 21, + printf ( "%s", CATGETS(dtsearch_catd, MS_tomita, 21, "\n...push ENTER to continue... ") ); *userbuf = '\0'; @@ -491,7 +491,7 @@ DISPLAY_RECORD: /* display the user notes if any, character by character */ if (usrblk.notes != NULL) { - printf ( catgets(dtsearch_catd, MS_tomita, 20, + printf ( CATGETS(dtsearch_catd, MS_tomita, 20, "--------------------------------------\n" "End of Text Blob for '%s':\n\n" "User Notes:\n" @@ -504,7 +504,7 @@ DISPLAY_RECORD: if (pausing && *ptr == '\n') if (++pause_counter >= PAUSE_ROWS) { /* Msg 21 is used in two places */ - printf ( "%s", catgets(dtsearch_catd, MS_tomita, 21, + printf ( "%s", CATGETS(dtsearch_catd, MS_tomita, 21, "\n...push ENTER to continue... ") ); *userbuf = '\0'; @@ -633,7 +633,7 @@ KEEP_READING: first_err = FALSE; fputc ('\n', aa_stderr); } - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 24, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 24, "%s Database %s, '%s' not found.\n") , PROGNAME"482", parsed_dbname, parsed_recid); continue; @@ -676,7 +676,7 @@ static void deleter (char *infname) char buf[128]; if (!yesarg) { - printf ( catgets(dtsearch_catd, MS_tomita, 25, + printf ( CATGETS(dtsearch_catd, MS_tomita, 25, "\nDO NOT CONTINUE under any of the following circumstances:\n" "-> If the input file which lists record ids to be deleted is not\n" " named '%s'.\n" @@ -738,7 +738,7 @@ static void deleter (char *infname) seconds = elapsed - (3600L * hours); /* remaining after hours */ minutes = seconds / 60L; seconds = seconds - (60L * minutes); - printf ( catgets(dtsearch_catd, MS_tomita, 26, + printf ( CATGETS(dtsearch_catd, MS_tomita, 26, "%s %ld read, %ld deleted, %ldh %2ldm %2lds elapsed.\n" " Database '%s': Current record count = %ld, Batch size = %d.\n") , aa_argv0, records_read, records_deleted, @@ -768,7 +768,7 @@ static void deleter (char *infname) minutes = seconds / 60L; seconds = seconds - (60L * minutes); /* remaining after hours * & mins */ - printf ( catgets(dtsearch_catd, MS_tomita, 27, + printf ( CATGETS(dtsearch_catd, MS_tomita, 27, "%s %ld records read from input file. %ld were deleted and\n" " %ld were not found in %ld hours, %ld minutes, %ld seconds,\n") , aa_argv0, records_read, records_deleted, @@ -779,7 +779,7 @@ static void deleter (char *infname) elapsed = (records_deleted) ? elapsed / records_deleted : 0L; minutes = elapsed / 60L; seconds = elapsed - (60L * minutes); - printf ( catgets(dtsearch_catd, MS_tomita, 28, + printf ( CATGETS(dtsearch_catd, MS_tomita, 28, " or an average of %ld minutes, %ld seconds per record deleted.\n"), minutes, seconds); return; @@ -799,12 +799,12 @@ int main (int argc, char *argv[]) aa_argv0 = argv[0]; setlocale (LC_ALL, ""); - dtsearch_catd = catopen (FNAME_DTSRCAT, 0); + dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0); time (&mytime); strftime (timebuf, sizeof (timebuf), - 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"), localtime (&mytime)); - printf (catgets(dtsearch_catd, MS_tomita, 29, + printf (CATGETS(dtsearch_catd, MS_tomita, 29, "%s. Run %s.\n") , aa_argv0, timebuf); austext_exit_last = print_exit_code; @@ -816,7 +816,7 @@ int main (int argc, char *argv[]) /* Validate program number argument */ if (argc < 2) { BAD_ARGS: - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 30, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 30, "\nUSAGE: %s [options]\n" " -i Input file name. If not specified, defaults to %s.\n" " -d[v] Print debug statements.\n" @@ -877,7 +877,7 @@ BAD_ARGS: break; default: - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 31, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 31, "\n%s Unknown argument '%s'.\n") , PROGNAME"689", arg); goto BAD_ARGS; @@ -891,7 +891,7 @@ BAD_ARGS: */ if ((inf = fopen (infname, "r")) == NULL) { if (prog == 'D') { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 32, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 32, "%s Unable to open input file '%s'.\n") , PROGNAME"710", infname); goto BAD_ARGS; @@ -905,7 +905,7 @@ BAD_ARGS: if ((outf = fopen (outfname, "a ")) == NULL) /* the blank in "a " works around old aix bug */ { - fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 33, + fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 33, "\n%s Unable to open output file '%s'.\n") , PROGNAME"721", outfname); goto BAD_ARGS; @@ -913,7 +913,7 @@ BAD_ARGS: } /* Initialize the opera engine, i.e. open the database */ - printf ( catgets(dtsearch_catd, MS_tomita, 34, + printf ( CATGETS(dtsearch_catd, MS_tomita, 34, "Initializing %s engine...\n"), OE_prodname); strcpy (usrblk.userid, "ToMiTa"); @@ -931,7 +931,7 @@ BAD_ARGS: usrblk.request = OE_SHUTDOWN; Opera_Engine (); - printf ( "%s", catgets(dtsearch_catd, MS_tomita, 36, + printf ( "%s", CATGETS(dtsearch_catd, MS_tomita, 36, "Normal engine shutdown.\n") ); DtSearchExit (0); } /* main() */ diff --git a/cde/programs/dtstyle/Main.c b/cde/programs/dtstyle/Main.c index e6a6e8e4a..9a393a435 100644 --- a/cde/programs/dtstyle/Main.c +++ b/cde/programs/dtstyle/Main.c @@ -54,7 +54,7 @@ # include #endif #ifndef NO_MESSAGE_CATALOG -# include +# include
# define TRUE 1 # define FALSE 0 #endif diff --git a/cde/programs/dtudcexch/selectx.c b/cde/programs/dtudcexch/selectx.c index 520da5e6f..6124c9c6e 100644 --- a/cde/programs/dtudcexch/selectx.c +++ b/cde/programs/dtudcexch/selectx.c @@ -35,7 +35,7 @@ #include #include /* dtex add */ #include /* dtex add */ -#include +#include
#include #include diff --git a/cde/programs/dtudcexch/selectxlfd.c b/cde/programs/dtudcexch/selectxlfd.c index cfdfa9fd1..9d16924c5 100644 --- a/cde/programs/dtudcexch/selectxlfd.c +++ b/cde/programs/dtudcexch/selectxlfd.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include
#include #include #include diff --git a/cde/programs/dtudcexch/xlfdutil.c b/cde/programs/dtudcexch/xlfdutil.c index 3c21a5657..7c76719d4 100644 --- a/cde/programs/dtudcexch/xlfdutil.c +++ b/cde/programs/dtudcexch/xlfdutil.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include
#include diff --git a/cde/programs/dtudcfonted/cpyx.c b/cde/programs/dtudcfonted/cpyx.c index 0de53a710..93ae38251 100644 --- a/cde/programs/dtudcfonted/cpyx.c +++ b/cde/programs/dtudcfonted/cpyx.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include
#include #include diff --git a/cde/programs/dtudcfonted/selectx.c b/cde/programs/dtudcfonted/selectx.c index cd86af2f8..3cac1de09 100644 --- a/cde/programs/dtudcfonted/selectx.c +++ b/cde/programs/dtudcfonted/selectx.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include
#include #include diff --git a/cde/programs/dtudcfonted/xutil.c b/cde/programs/dtudcfonted/xutil.c index b4e2e28e5..8430b88d6 100644 --- a/cde/programs/dtudcfonted/xutil.c +++ b/cde/programs/dtudcfonted/xutil.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include
#include diff --git a/cde/programs/localized/util/Imakefile b/cde/programs/localized/util/Imakefile index 72b0650e8..b34269b6a 100644 --- a/cde/programs/localized/util/Imakefile +++ b/cde/programs/localized/util/Imakefile @@ -1,10 +1,13 @@ XCOMM $XConsortium: Imakefile /main/5 1996/09/30 14:12:43 drk $ -SRCS = merge.c mkcatdefs.c +DEFINES = -DNO_XLIB + +SRCS = merge.c mkcatdefs.c MsgCat.c all:: merge mkcatdefs -NormalProgramTarget(merge,merge.o,,,) +NormalProgramTarget(merge,merge.o MsgCat.o,,,) NormalProgramTarget(mkcatdefs,mkcatdefs.o,,,) DependTarget() +LinkSourceFile(MsgCat.c,$(DTSVCSRC)/DtUtil2) diff --git a/cde/programs/localized/util/merge.c b/cde/programs/localized/util/merge.c index 7ae9aa1df..ca6055124 100644 --- a/cde/programs/localized/util/merge.c +++ b/cde/programs/localized/util/merge.c @@ -95,13 +95,10 @@ #include #include #include -#include -#include -#include +#include
-#include - -nl_catd catfile[2] = {NULL, NULL}; /* [0] for primary, [1] for default */ +/* [0] for primary, [1] for default */ +nl_catd catfile[2] = {(nl_catd) -1, (nl_catd) -1}; char *big_buff; char *lang = NULL; char envvar[100]; @@ -174,11 +171,8 @@ void main (int argc, char *argv []) c = get_char (); } - if ( catfile[0] ) - catclose(catfile[0]); - - if ( catfile[1] ) - catclose(catfile[1]); + CATCLOSE(catfile[0]); + CATCLOSE(catfile[1]); unlink(pFilename); unlink(dFilename); @@ -257,7 +251,7 @@ void cat_open (void) } } - catfile[0] = catopen(pFilename, 0); + catfile[0] = CATOPEN(pFilename,0); if(dfile != NULL) { @@ -269,10 +263,10 @@ void cat_open (void) } - catfile[1] = catopen(dFilename, 0); + catfile[1] = CATOPEN(dFilename,0); /* if all fails */ - if (catfile[0] == NULL && catfile[1] == NULL) + if((catfile[0] == (nl_catd) -1) && (catfile[1] == (nl_catd) -1)) fatal("Can't open message files.\n", 0, 9); } @@ -286,9 +280,9 @@ int find_message (int msg) { int ret = 0; - if(catfile[0] != NULL) + if(catfile[0] != (nl_catd) -1) ret = find_msg_in_file(msg, 0); - if(ret == 0 && catfile[1] != NULL) + if(ret == 0 && catfile[1] != (nl_catd) -1) ret = find_msg_in_file(msg, 1); return ret; } @@ -303,7 +297,7 @@ int find_message (int msg) */ int find_msg_in_file (int msg, int file) { - big_buff = catgets(catfile[file],1,msg,"MSG_NOT_FOUND"); + big_buff = CATGETS(catfile[file],1,msg,"MSG_NOT_FOUND"); if ( strcmp(big_buff,"MSG_NOT_FOUND") ) return(1); else diff --git a/cde/programs/util/dttypes/dttypes.c b/cde/programs/util/dttypes/dttypes.c index 347067f93..c5bd0bd9c 100644 --- a/cde/programs/util/dttypes/dttypes.c +++ b/cde/programs/util/dttypes/dttypes.c @@ -46,11 +46,11 @@ static int rexp_errno = 0; #else #include #endif -#include #include
#include
#include
#include
+#include
#if !defined(NL_CAT_LOCALE) #define NL_CAT_LOCALE 0 @@ -189,7 +189,7 @@ rec_list(List *l) #endif { /* error */ - fprintf(stderr, catgets(dtcatd, 1, 36, "error in regular expression %s\n"), l->rec_name?l->rec_name:"(NULL)"); + fprintf(stderr, CATGETS(dtcatd, 1, 36, "error in regular expression %s\n"), l->rec_name?l->rec_name:"(NULL)"); exit(1); } @@ -203,7 +203,7 @@ rec_list(List *l) #endif { /* error */ - fprintf(stderr, catgets(dtcatd, 1, 36, "error in regular expression %s\n"), l->fld_name?l->fld_name:"(NULL)"); + fprintf(stderr, CATGETS(dtcatd, 1, 36, "error in regular expression %s\n"), l->fld_name?l->fld_name:"(NULL)"); exit(1); } @@ -217,7 +217,7 @@ rec_list(List *l) #endif { /* error */ - fprintf(stderr, catgets(dtcatd, 1, 36, "error in regular expression %s\n"), l->fld_value?l->fld_value:"(NULL)"); + fprintf(stderr, CATGETS(dtcatd, 1, 36, "error in regular expression %s\n"), l->fld_value?l->fld_value:"(NULL)"); exit(1); } @@ -231,7 +231,7 @@ rec_list(List *l) #endif { /* error */ - fprintf(stderr, catgets(dtcatd, 1, 36, "error in regular expression %s\n"), l->display_fld?l->display_fld:"(NULL)"); + fprintf(stderr, CATGETS(dtcatd, 1, 36, "error in regular expression %s\n"), l->display_fld?l->display_fld:"(NULL)"); exit(1); } @@ -263,14 +263,14 @@ rec_list(List *l) if((regexec(®ex_fn, fn, 0, NULL, 0) == 0) && ((fld_ptr->fieldValue==0? regexec(®ex_fv, - catgets(dtcatd, 1, 4, "NULL"), + CATGETS(dtcatd, 1, 4, "NULL"), 0, NULL, 0): regexec(®ex_fv, fv, 0, NULL, 0)) == 0)) #else if((advance(fn, expbuf_fn) != 0) && - ((fld_ptr->fieldValue==0?advance(catgets(dtcatd, 1, 4, "NULL"), expbuf_fv):advance(fv, expbuf_fv)) != 0)) + ((fld_ptr->fieldValue==0?advance(CATGETS(dtcatd, 1, 4, "NULL"), expbuf_fv):advance(fv, expbuf_fv)) != 0)) #endif { add_rec(rec, l); @@ -293,19 +293,19 @@ rec_list(List *l) (l->display_list&(1<display_list&(1<recordName?(char *)_DtDtsMMBosonToString(rec_ptr->recordName):catgets(dtcatd, 1, 6, "")); + printf(CATGETS(dtcatd, 1, 5, "=============== %s ===============\n"), + rec_ptr->recordName?(char *)_DtDtsMMBosonToString(rec_ptr->recordName):CATGETS(dtcatd, 1, 6, "")); } else if (l->display_list&(1<recordName?(char *)_DtDtsMMBosonToString(rec_ptr->recordName):catgets(dtcatd, 1, 8, "")); + printf(CATGETS(dtcatd, 1, 7, "%s\n"), + rec_ptr->recordName?(char *)_DtDtsMMBosonToString(rec_ptr->recordName):CATGETS(dtcatd, 1, 8, "")); } if(l->display_list&(1<pathId); - printf(catgets(dtcatd, 1, 9, "loaded from %s\n"), path?path:catgets(dtcatd, 1, 10, "Unknown")); + printf(CATGETS(dtcatd, 1, 9, "loaded from %s\n"), path?path:CATGETS(dtcatd, 1, 10, "Unknown")); } fld_ptr_list = _DtDtsMMGetPtr(rec_ptr->fieldList); @@ -328,12 +328,12 @@ rec_list(List *l) if(advance(fn, expbuf_df) !=0) #endif { - printf(catgets(dtcatd, 1, 11, "\t%s"), - fn?fn:catgets(dtcatd, 1, 12, "")); - printf(catgets(dtcatd, 1, 13, " :\t%s"), + printf(CATGETS(dtcatd, 1, 11, "\t%s"), + fn?fn:CATGETS(dtcatd, 1, 12, "")); + printf(CATGETS(dtcatd, 1, 13, " :\t%s"), fld_ptr->fieldValue?fv: - catgets(dtcatd, 1, 14, "")); - printf("%s", catgets(dtcatd, 1, 15, "\n")); + CATGETS(dtcatd, 1, 14, "")); + printf("%s", CATGETS(dtcatd, 1, 15, "\n")); } } @@ -341,15 +341,15 @@ rec_list(List *l) { if(l->display_list&(1<fieldName?fn:catgets(dtcatd, 1, 12, "")); + printf(CATGETS(dtcatd, 1, 11, "\t%s"), fld_ptr->fieldName?fn:CATGETS(dtcatd, 1, 12, "")); term++; } if(l->display_list&(1<fieldValue?fv:catgets(dtcatd, 1, 14, "")); + printf(CATGETS(dtcatd, 1, 13, " :\t%s"), fld_ptr->fieldValue?fv:CATGETS(dtcatd, 1, 14, "")); term++; } - if(term)printf("%s", catgets(dtcatd, 1, 15, "\n")); + if(term)printf("%s", CATGETS(dtcatd, 1, 15, "\n")); } _DtDtsMMSafeFree(fn); _DtDtsMMSafeFree(fv); @@ -382,7 +382,7 @@ parse_args(List *l, int argc, char **argv) for(i = 1; i < argc; i++) { - if(strcmp(argv[i], catgets(dtcatd, 1, 16, "-db")) == 0) + if(strcmp(argv[i], CATGETS(dtcatd, 1, 16, "-db")) == 0) { if(argv[i+1]) { @@ -397,15 +397,15 @@ parse_args(List *l, int argc, char **argv) error |= 1<display_list |= 1<display_fld = argv[++i]; } @@ -478,7 +478,7 @@ parse_args(List *l, int argc, char **argv) error |= 1<rec_name = new; l->db_name = "DATA_ATTRIBUTES"; l->display_list|= 1<