#
and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
Includes Solaris changes for:
4213490 Add support for SGML format man pages
4226089 xman utility needs to display new SunOS directories
4365478 Internationalize xman
@@ -36,6 +36,8 @@ from the X Consortium.
/* The files with the icon bits in them. */
@@ -45,6 +47,7 @@ from the X Consortium.
static void CreateOptionMenu(ManpageGlobals * man_globals, Widget parent);
static void CreateSectionMenu(ManpageGlobals * man_globals, Widget parent);
+static void CreateMoreMenu(ManpageGlobals * man_globals, Widget parent);
static void StartManpage(ManpageGlobals * man_globals, Boolean help,
static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
@@ -56,6 +59,7 @@ static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
Widget top; /* needed in PopupWarning,
misc.c */
@@ -216,7 +220,7 @@ CreateManpageWidget(ManpageGlobals * man_globals,
Arg arglist[MANPAGEARGS]; /* An argument list for widget creation */
Cardinal num_args; /* The number of arguments in the list. */
- Widget mytop, pane, hpane, mysections; /* Widgets */
+ Widget mytop, pane, hpane, mysections, sect1; /* Widgets */
ManPageWidgets *mpw = &(man_globals->manpagewidgets);
@@ -243,8 +247,13 @@ CreateManpageWidget(ManpageGlobals * man_globals,
XtSetValues(mytop, arglist, num_args);
+ pane = XtCreateManagedWidget("Manpage_Vpane", panedWidgetClass, mytop, NULL,
pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
@@ -264,16 +273,25 @@ CreateManpageWidget(ManpageGlobals * man_globals,
mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
hpane, arglist, num_args);
+ if (sections > MAX_MENU) {
+ XtSetArg(arglist[num_args], XtNmenuName, MORE_MENU); num_args++;
+ sect1 = XtCreateManagedWidget("More...", menuButtonWidgetClass,
+ hpane, arglist, num_args);
XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
MakeSearchWidget(man_globals, mytop);
CreateSectionMenu(man_globals, mytop);
+ if (sections > MAX_MENU) CreateMoreMenu(man_globals, mytop);
MakeSaveWidgets(man_globals, mytop);
XtSetSensitive(mysections, FALSE);
+ if (sections > MAX_MENU) XtSetSensitive(sect1, FALSE);
XtSetArg(arglist[0], XtNsensitive, FALSE);
XtSetValues(man_globals->dir_entry, arglist, ONE);
XtSetValues(man_globals->manpage_entry, arglist, ONE);
@@ -287,8 +305,13 @@ CreateManpageWidget(ManpageGlobals * man_globals,
XtSetValues(man_globals->print_entry, arglist, ONE);
#endif /* INCLUDE_XPRINT_SUPPORT */
+ man_globals->label = XtCreateManagedWidget(MANNAME, labelWidgetClass,
+ hpane, NULL, (Cardinal) 0);
man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
hpane, NULL, (Cardinal) 0);
@@ -336,7 +359,7 @@ StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page)
- strcpy(man_globals->manpage_title, "Xman Help");
+ strcpy(man_globals->manpage_title, gettext("Xman Help"));
if (man_globals->both_shown) {
@@ -528,7 +551,7 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
- for (i = 0; i < sections; i++) {
+ for (i = 0; i < ((sections <= MAX_MENU) ? sections:sections/2) ; i++) {
XtSetArg(args[num_args], XtNlabel, manual[i].blabel);
@@ -547,6 +570,35 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
+CreateMoreMenu(ManpageGlobals * man_globals, Widget parent)
+ MenuStruct * menu_struct;
+ char entry_name[BUFSIZ];
+ menu = XtCreatePopupShell(MORE_MENU, simpleMenuWidgetClass, parent,
+ for (i = sections/2-1 ; i < sections ; i ++) {
+ XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
+ snprintf(entry_name, sizeof(entry_name), "section%d", i);
+ entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
+ menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
+ menu_struct->data = (caddr_t) man_globals;
+ menu_struct->number = i;
+ XtAddCallback(entry, XtNcallback, DirPopupCallback, (caddr_t) menu_struct);
+ XtAddCallback(entry, XtNdestroyCallback,MenuDestroy, (caddr_t)menu_struct);
/* Function Name: CreateList
* Description: this function prints a label in the directory list
* Arguments: section - the manual section.
@@ -592,7 +644,7 @@ MakeDirectoryBox(ManpageGlobals * man_globals, Widget parent, Widget * dir_disp,
name = manual[section].blabel; /* Set the section name */
- snprintf(label_name, sizeof(label_name), "Directory of: %s", name);
+ snprintf(label_name, sizeof(label_name), gettext("Directory of: %s"),name);
man_globals->section_name[section] = XtNewString(label_name);
@@ -691,7 +743,7 @@ FormUpWidgets(Widget parent, const char **full_size, const char **half_size)
if (long_widget == (Widget) NULL) { /* Make sure we found one. */
PopupWarning(GetGlobals(parent),
- "Could not find longest widget, aborting...");
+ gettext("Could not find longest widget, aborting..."));
XtFree((char *) full_widgets);
XtFree((char *) half_widgets);
@@ -759,7 +811,7 @@ ConvertNamesToWidgets(Widget parent, const char **names)
snprintf(error_buf, sizeof(error_buf),
- "Could not find widget named '%s'", *names);
+ gettext("Could not find widget named '%s'"), *names);
index fe09b6b..22da1c7 100644
@@ -53,6 +53,7 @@ from the X Consortium.
#define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
#define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
+#define MORE_MENU "moreMenu" /* Name of the More... Menu. */
#define HELP_BUTTON "helpButton" /* Name of top help button */
#define QUIT_BUTTON "quitButton" /* Name of top quit button */
index e61687e..351f60f 100644
@@ -41,6 +41,8 @@ from the X Consortium.
#ifdef INCLUDE_XPRINT_SUPPORT
@@ -309,8 +311,10 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
- XtAppWarning(XtWidgetToApplicationContext(w),
- "Xman - SaveFormattedPage: This action routine requires one argument.");
+ snprintf(error_buf, sizeof(error_buf),
+ gettext("%s This action routine requires one argument."),
+ "Xman - SaveFormattedPage:");
+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
@@ -347,14 +351,14 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
/* make sure the formatted man page is fully accessible by the world */
if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
snprintf(error_buf, sizeof(error_buf),
- "Couldn't set permissions on formatted man page '%s'.\n",
+ gettext("Couldn't set permissions on formatted man page '%s'.\n"),
PopupWarning(man_globals, error_buf);
snprintf(error_buf, sizeof(error_buf),
- "Error while executing the command '%s'.\n", cmdbuf);
+ gettext("Error while executing the command '%s'.\n"), cmdbuf);
PopupWarning(man_globals, error_buf);
@@ -362,8 +366,9 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
- PopupWarning(man_globals, "Xman - SaveFormattedPage: "
- "Unknown argument must be either 'Save' or 'Cancel'.");
+ snprintf(error_buf, sizeof(error_buf), "%s %s", "Xman - SaveFormattedPage:",
+ gettext("Unknown argument must be either 'Save' or 'Cancel'."));
+ PopupWarning(man_globals, error_buf);
@@ -394,10 +399,13 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
ManpageGlobals *man_globals;
+ char error_buf[BUFSIZ];
- XtAppWarning(XtWidgetToApplicationContext(w),
- "Xman - GotoPage: This action routine requires one argument.");
+ snprintf(error_buf, sizeof(error_buf),
+ gettext("%s This action routine requires one argument."),
+ gettext("Xman - GotoPage:"));
+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
@@ -431,8 +439,8 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
XtAppWarning(XtWidgetToApplicationContext(w),
- "Xman - GotoPage: Unknown argument must be "
- "either Manpage or Directory.");
+ gettext("Xman - GotoPage: Unknown argument must be "
+ "either Manpage or Directory."));
@@ -553,12 +561,15 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
ManpageGlobals *man_globals = GetGlobals(w);
+ char error_buf[BUFSIZ];
XtPopdown(XtParent(XtParent(w))); /* popdown the search widget */
if ((*num_params < 1) || (*num_params > 2)) {
- XtAppWarning(XtWidgetToApplicationContext(w),
- "Xman - Search: This action routine requires one or two arguments.");
+ snprintf(error_buf, sizeof(error_buf),
+ gettext("%s This action routine requires one or two arguments."),
+ gettext("Xman - Search:"));
+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
@@ -576,8 +587,10 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
- XtAppWarning(XtWidgetToApplicationContext(w),
- "Xman - Search: First parameter unknown.");
+ snprintf(error_buf, sizeof(error_buf),
+ gettext("%s First parameter unknown."),
+ gettext("Xman - Search:"));
+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
@@ -604,8 +617,9 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
- XtAppWarning(XtWidgetToApplicationContext(w),
- "Xman - Search: Second parameter unknown.");
+ snprintf(error_buf, sizeof(error_buf),
+ gettext("%s Second parameter unknown."), "Xman - Search:");
+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
@@ -35,6 +35,8 @@ from the X Consortium.
/* Function Name: MakeHelpWidget.
* Description: This function creates the help widget so that it will be
@@ -66,7 +68,7 @@ MakeHelpWidget(void)
- ChangeLabel(man_globals->label, "Xman Help");
+ ChangeLabel(man_globals->label, gettext("Xman Help"));
XtRealizeWidget(help_widget);
@@ -99,7 +101,7 @@ OpenHelpfile(ManpageGlobals * man_globals)
PopupWarning(man_globals,
- "Could not open help file, NO HELP WILL BE AVAILABLE.");
+ gettext("Could not open help file, NO HELP WILL BE AVAILABLE."));
@@ -35,6 +35,8 @@ from the X Consortium.
@@ -145,6 +147,7 @@ main(int argc, char **argv)
saved_argv = (char **) XtMalloc(argc * sizeof(char *));
bcopy(argv, saved_argv, argc * sizeof(char *));
@@ -157,6 +160,13 @@ main(int argc, char **argv)
XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW", False);
+ if ((domaindir = getenv("TEXTDOMAINDIR")) == NULL) {
+ bindtextdomain("xman", domaindir);
manglobals_context = XStringToContext(MANNAME);
@@ -173,10 +183,10 @@ main(int argc, char **argv)
XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
- PrintError("Failed to get the directory font.");
+ PrintError(gettext("Failed to get the directory font."));
- printf("debugging mode\n");
+ printf(gettext("debugging mode\n"));
@@ -195,7 +205,7 @@ main(int argc, char **argv)
if ((sections = Man()) == 0)
- ("There are no manual sections to display, check your MANPATH.");
+ (gettext("There are no manual sections to display, check your MANPATH."));
@@ -229,42 +239,53 @@ ArgError(int argc, char **argv)
- static const char **syntax, *syntax_def[] = {
- "-help", "Print this message",
- "-helpfile <filename>", "Specifies the helpfile to use.",
- "-bothshown", "Show both the directory and manpage at once.",
- "-notopbox", "Starts with manpage rather than topbox.",
- "-geometry <geom>", "Specifies the geometry of the top box.",
- "=<geom>", "Specifies the geometry of the top box.",
- "-pagesize <geom>", "Specifies the geometry of the manual page.",
- "-bw <pixels>", "Width of all window borders.",
- "-borderwidth <pixels>", "Width of all window borders.",
- "-bd <color>", "Color of all window borders.",
- "-bordercolor <color>", "Color of all window borders.",
- "-fg <color>", "Foreground color for the application.",
- "-foreground <color>", "Foreground color for the application.",
- "-bg <color>", "Background color for the application.",
- "-background <color>", "Background color for the application.",
- "-display <display name>", "Specify a display that is not the default",
- "-fn <font>", "Font to be used for button and label text.",
- "-font <font>", "Font to be used for button and label text.",
- "-name <name>", "Change the name used for retrieving resources.",
- "-title <name>", "Change the name without affecting resources.",
- "-xrm <resource>", "Specifies a resource on the command line.",
for (i = 1; i < argc; i++)
- (void) printf("This argument is unknown to Xman: %s\n", argv[i]);
- (void) printf("\nKnown arguments are:\n");
- while (*syntax != NULL) {
- printf("%-30s - %s\n", syntax[0], syntax[1]);
+ (void) printf(gettext("This argument is unknown to Xman: %s\n"), argv[i]);
+ (void) printf(gettext("\nKnown arguments are:\n"));
+ gettext("Print this message"));
+ printf("-helpfile %s - %s\n", gettext("<filename> "),
+ gettext("Specifies the helpfile to use."));
+ printf("-bothshown - %s\n",
+ gettext("Show both the directory and manpage at once."));
+ printf("-notopbox - %s\n",
+ gettext("Starts with manpage rather than topbox."));
+ printf("-geometry %s - %s\n", gettext("<geom> "),
+ gettext("Specifies the geometry of the top box."));
+ printf("=%s - %s\n", gettext("<geom> "),
+ gettext("Specifies the geometry of the top box."));
+ printf("-pagesize %s - %s\n", gettext("<geom> "),
+ gettext("Specifies the geometry of the manual page."));
+ printf("-bw %s - %s\n", gettext("<pixels> "),
+ gettext("Width of all window borders."));
+ printf("-borderwidth %s - %s\n", gettext("<pixels> "),
+ gettext("Width of all window borders."));
+ printf("-bd %s - %s\n", gettext("<color> "),
+ gettext("Color of all window borders."));
+ printf("-bordercolor %s - %s\n", gettext("<color> "),
+ gettext("Color of all window borders."));
+ printf("-fg %s - %s\n", gettext("<color> "),
+ gettext("Foreground color for the application."));
+ printf("-foreground %s - %s\n", gettext("<color> "),
+ gettext("Foreground color for the application."));
+ printf("-bg %s - %s\n", gettext("<color> "),
+ gettext("Background color for the application."));
+ printf("-background %s - %s\n", gettext("<color> "),
+ gettext("Background color for the application."));
+ printf("-display %s - %s\n", gettext("<display name> "),
+ gettext("Specify a display that is not the default"));
+ printf("-fn %s - %s\n", gettext("<font> "),
+ gettext("Font to be used for button and label text."));
+ printf("-font %s - %s\n", gettext("<font> "),
+ gettext("Font to be used for button and label text."));
+ printf("-name %s - %s\n", gettext("<name> "),
+ gettext("Change the name used for retrieving resources."));
+ printf("-title %s - %s\n", gettext("<name> "),
+ gettext("Change the name without affecting resources."));
+ printf("-xrm %s - %s\n", gettext("<resource> "),
+ gettext("Specifies a resource on the command line."));
/* Function Name: AdjustDefResources
index e8432f0..5963a86 100644
@@ -31,6 +31,8 @@ from the X Consortium.
#include "
vendor.h" /* vendor-specific defines and data */
@@ -157,7 +159,7 @@ Man(void)
(sizeof(Manual) * num_alloced));
- ("Could not allocate memory for manual sections.");
+ (gettext("Could not allocate memory for manual sections."));
InitManual(manual + sect, list->label);
manual[sect].flags = list->flags;
@@ -184,10 +186,10 @@ Man(void)
- PrintError("No manual pages found.");
+ PrintError(gettext("No manual pages found."));
manual = (Manual *) XtRealloc((char *) manual, (sizeof(Manual) * sect));
- PrintError("Could not allocate memory for manual sections.");
+ PrintError(gettext("Could not allocate memory for manual sections."));
return (sect); /* return the number of man sections. */
@@ -209,7 +211,7 @@ SortList(SectionList ** list)
SectionList *head, *last, *inner, *old;
- PrintError("No manual sections to read, exiting.");
+ PrintError(gettext("No manual sections to read, exiting."));
@@ -421,7 +423,7 @@ ReadCurrentSection(Manual * local_manual, char *path)
if ((dir = opendir(path)) == NULL) {
- snprintf(error_buf, sizeof(error_buf), "Can't open directory %s", path);
+ snprintf(error_buf, sizeof(error_buf), gettext("Can't open directory %s"), path);
PopupWarning(NULL, error_buf);
@@ -507,7 +509,7 @@ ReadCurrentSection(Manual * local_manual, char *path)
local_manual->entries_less_paths[nentries] =
strrchr(local_manual->entries[nentries], '/');
if (local_manual->entries_less_paths[nentries] == NULL)
- PrintError("Internal error while cataloging manual pages.");
+ PrintError(gettext("Internal error while cataloging manual pages."));
@@ -535,7 +537,7 @@ SortAndRemove(Manual * man, int number)
- printf("sorting section %d - %s\n", i, man->blabel);
+ printf(gettext("sorting section %d - %s\n"), i, man->blabel);
s1 = (char **) malloc(man->nentries * sizeof(char *));
@@ -570,13 +572,13 @@ SortAndRemove(Manual * man, int number)
l2 = man->entries_less_paths[j++];
- ("Internal error while removing duplicate manual pages.");
+ (gettext("Internal error while removing duplicate manual pages."));
l2 = man->entries_less_paths[j++];
- ("Internal error while removing duplicate manual pages.");
+ (gettext("Internal error while removing duplicate manual pages."));
@@ -931,7 +933,7 @@ DumpManual(int number)
for (i = 0; i < number; i++) {
- printf("label: %s\n", manual[i].blabel);
+ printf("gettext(label: %s\n"), manual[i].blabel);
for (j = 0; j < manual[i].nentries; j++)
printf("%s\n", manual[i].entries[j]);
@@ -40,6 +40,8 @@ from the X Consortium.
@@ -93,7 +95,7 @@ PopupWarning(ManpageGlobals * man_globals, const char *string)
- snprintf(buffer, sizeof(buffer), "Xman Warning: %s", string);
+ snprintf(buffer, sizeof(buffer), gettext("Xman Warning: %s"), string);
@@ -138,7 +140,7 @@ PopupWarning(ManpageGlobals * man_globals, const char *string)
PrintError(const char *string)
- fprintf(stderr, "Xman Error: %s\n", string);
+ fprintf(stderr, gettext("Xman Error: %s\n"), string);
@@ -202,7 +204,7 @@ FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num)
temp = CreateManpageName(entry, 0, 0);
snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
- "The current manual page is: %s.", temp);
+ gettext("The current manual page is: %s."), temp);
ParseEntry(entry, path, section, page);
@@ -349,8 +351,8 @@ Uncompress(ManpageGlobals * man_globals, const char *filename)
if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
- PopupWarning(man_globals, "Something went wrong in retrieving the "
- "uncompressed manual page try cleaning up /tmp.");
+ PopupWarning(man_globals, gettext("Something went wrong in retrieving "
+ "the uncompressed manual page. Try cleaning up /tmp."));
@@ -379,8 +381,8 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
if (stat(filename, &junk) != 0) { /* Check for existence of the file. */
snprintf(error_buf, sizeof(error_buf),
- "Error while stating file %s, errno = %d", filename,
+ gettext("Error while stating file %s, errno = %d"),
PopupWarning(man_globals, error_buf);
@@ -394,7 +396,7 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
strcpy(tmp, MANTEMP); /* get a temp file. */
- PopupWarning(man_globals, "Error creating a temp file");
+ PopupWarning(man_globals, gettext("Error creating a temp file"));
*output_file = fdopen(fd, "r");
@@ -429,7 +431,7 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
snprintf(error_buf, sizeof(error_buf),
- "Error while uncompressing, command was: %s", cmdbuf);
+ gettext("Error while uncompressing, command was: %s"), cmdbuf);
PopupWarning(man_globals, error_buf);
@@ -515,7 +517,7 @@ Format(ManpageGlobals * man_globals, const char *entry)
if (!UncompressUnformatted(man_globals, entry, filename, &file)) {
/* We Really could not find it, this should never happen, yea right. */
snprintf(error_buf, sizeof(error_buf),
- "Could not open manual page, %s", entry);
+ gettext("Could not open manual page, %s"), entry);
PopupWarning(man_globals, error_buf);
XtPopdown(XtParent(man_globals->standby));
@@ -577,12 +579,22 @@ Format(ManpageGlobals * man_globals, const char *entry)
ParseEntry(entry, path, sect, NULL);
+#ifdef SFORMAT /* Handle Solaris SGML pages */
+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s >> %s %s",
+ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s >> %s %s", path, TBL,
filename, FORMAT, man_globals->tempfile, "2>
/dev/null");
/* Handle more flexible way of specifying the formatting pipeline */
if (!ConstructCommand(cmdbuf, path, filename, man_globals->tempfile)) {
- PopupWarning(man_globals, "Constructed command was too long!");
+ PopupWarning(man_globals, gettext("Constructed command was too long!"));
@@ -591,7 +603,7 @@ Format(ManpageGlobals * man_globals, const char *entry)
if (system(cmdbuf) != 0) { /* execute search. */
snprintf(error_buf, sizeof(error_buf),
- "Something went wrong trying to run the command: %s", cmdbuf);
+ gettext("Something went wrong trying to run the command: %s"), cmdbuf);
PopupWarning(man_globals, error_buf);
@@ -1000,7 +1012,7 @@ AddCursor(Widget w, Cursor cursor)
- PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
+ PopupWarning(NULL, gettext("Widget is not realized, no cursor added.\n"));
@@ -1114,14 +1126,14 @@ ParseEntry(const char *entry, char *path, char *sect, char *page)
- PrintError("Failed to find / in ParseEntry.");
+ PrintError(gettext("Failed to find / in ParseEntry."));
- PrintError("Failed to find / in ParseEntry.");
+ PrintError(gettext("Failed to find / in ParseEntry."));
#if defined(SFORMAT) && defined(SMAN)
/* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
@@ -1168,12 +1180,12 @@ GetGlobals(Widget w)
XtAppError(XtWidgetToApplicationContext(w),
- "Xman: Could not locate widget in tree, exiting");
+ gettext("Xman: Could not locate widget in tree, exiting"));
if (XFindContext(XtDisplay(w), XtWindow(w),
manglobals_context, &data) != XCSUCCESS)
XtAppError(XtWidgetToApplicationContext(w),
- "Xman: Could not find global data, exiting");
+ gettext("Xman: Could not find global data, exiting"));
return ((ManpageGlobals *) data);
@@ -1195,7 +1207,7 @@ SaveGlobals(Widget w, ManpageGlobals * globals)
if (XSaveContext(XtDisplay(w), XtWindow(w), manglobals_context,
(caddr_t) globals) != XCSUCCESS)
XtAppError(XtWidgetToApplicationContext(w),
- "Xman: Could not save global data, are you out of memory?");
+ gettext("Xman: Could not save global data, are you out of memory?"));
/* Function Name: RemoveGlobals
@@ -1213,5 +1225,5 @@ RemoveGlobals(Widget w)
if (XDeleteContext(XtDisplay(w), XtWindow(w),
manglobals_context) != XCSUCCESS)
XtAppError(XtWidgetToApplicationContext(w),
- "Xman: Could not remove global data?");
+ gettext("Xman: Could not remove global data?"));