1179N/A#
1370N/A# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
1179N/A#
1179N/A# Permission is hereby granted, free of charge, to any person obtaining a
1179N/A# copy of this software and associated documentation files (the "Software"),
1179N/A# to deal in the Software without restriction, including without limitation
1179N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1179N/A# and/or sell copies of the Software, and to permit persons to whom the
1179N/A# Software is furnished to do so, subject to the following conditions:
1179N/A#
1179N/A# The above copyright notice and this permission notice (including the next
1179N/A# paragraph) shall be included in all copies or substantial portions of the
1179N/A# Software.
1179N/A#
1179N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1179N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1179N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1179N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1179N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1179N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1179N/A# DEALINGS IN THE SOFTWARE.
1179N/A#
1179N/A
1179N/AIncludes Solaris changes for:
1179N/A4213490 Add support for SGML format man pages
1179N/A4226089 xman utility needs to display new SunOS directories
1179N/A4365478 Internationalize xman
1179N/A
1179N/Adiff --git a/buttons.c b/buttons.c
1370N/Aindex 4e5ed3c..e42c431 100644
1179N/A--- a/buttons.c
1179N/A+++ b/buttons.c
1068N/A@@ -36,6 +36,8 @@ from the X Consortium.
1068N/A
1370N/A #include "globals.h"
1370N/A #include "vendor.h"
1068N/A+#include <libintl.h>
1068N/A+#include <X11/Xlocale.h>
1068N/A
1370N/A /* The files with the icon bits in them. */
1370N/A
1370N/A@@ -45,6 +47,7 @@ from the X Consortium.
1068N/A
1068N/A static void CreateOptionMenu(ManpageGlobals * man_globals, Widget parent);
1068N/A static void CreateSectionMenu(ManpageGlobals * man_globals, Widget parent);
1068N/A+static void CreateMoreMenu(ManpageGlobals * man_globals, Widget parent);
1370N/A static void StartManpage(ManpageGlobals * man_globals, Boolean help,
1370N/A Boolean page);
1370N/A static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
1370N/A@@ -56,6 +59,7 @@ static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
1068N/A */
1068N/A
1068N/A #define TOPARGS 5
1068N/A+#define MAX_MENU 30
1068N/A
1370N/A Widget top; /* needed in PopupWarning, misc.c */
1068N/A
1370N/A@@ -216,7 +220,7 @@ CreateManpageWidget(ManpageGlobals * man_globals,
1068N/A {
1370N/A Arg arglist[MANPAGEARGS]; /* An argument list for widget creation */
1370N/A Cardinal num_args; /* The number of arguments in the list. */
1370N/A- Widget mytop, pane, hpane, mysections; /* Widgets */
1370N/A+ Widget mytop, pane, hpane, mysections, sect1; /* Widgets */
1370N/A ManPageWidgets *mpw = &(man_globals->manpagewidgets);
1068N/A
1370N/A num_args = (Cardinal) 0;
1370N/A@@ -243,8 +247,13 @@ CreateManpageWidget(ManpageGlobals * man_globals,
1370N/A num_args++;
1370N/A XtSetValues(mytop, arglist, num_args);
1068N/A
1068N/A+#ifdef SUNSOFT
1370N/A+ pane = XtCreateManagedWidget("Manpage_Vpane", panedWidgetClass, mytop, NULL,
1370N/A+ (Cardinal) 0);
1068N/A+#else
1370N/A pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
1370N/A (Cardinal) 0);
1068N/A+#endif
1068N/A
1068N/A /* Create menu bar. */
1068N/A
1370N/A@@ -264,16 +273,25 @@ CreateManpageWidget(ManpageGlobals * man_globals,
1370N/A mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
1370N/A hpane, arglist, num_args);
1068N/A
1370N/A+ if (sections > MAX_MENU) {
1370N/A+ num_args = 0;
1370N/A+ XtSetArg(arglist[num_args], XtNmenuName, MORE_MENU); num_args++;
1370N/A+ sect1 = XtCreateManagedWidget("More...", menuButtonWidgetClass,
1370N/A+ hpane, arglist, num_args);
1370N/A+ }
1068N/A+
1370N/A XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
1370N/A XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
1068N/A
1370N/A if (full_instance) {
1370N/A MakeSearchWidget(man_globals, mytop);
1370N/A CreateSectionMenu(man_globals, mytop);
1370N/A+ if (sections > MAX_MENU) CreateMoreMenu(man_globals, mytop);
1370N/A MakeSaveWidgets(man_globals, mytop);
1370N/A }
1370N/A else {
1370N/A XtSetSensitive(mysections, FALSE);
1370N/A+ if (sections > MAX_MENU) XtSetSensitive(sect1, FALSE);
1370N/A XtSetArg(arglist[0], XtNsensitive, FALSE);
1370N/A XtSetValues(man_globals->dir_entry, arglist, ONE);
1370N/A XtSetValues(man_globals->manpage_entry, arglist, ONE);
1370N/A@@ -287,8 +305,13 @@ CreateManpageWidget(ManpageGlobals * man_globals,
1370N/A XtSetValues(man_globals->print_entry, arglist, ONE);
1370N/A #endif /* INCLUDE_XPRINT_SUPPORT */
1068N/A
1068N/A+#ifdef SUNSOFT
1370N/A+ man_globals->label = XtCreateManagedWidget(MANNAME, labelWidgetClass,
1370N/A+ hpane, NULL, (Cardinal) 0);
1068N/A+#else
1370N/A man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
1370N/A hpane, NULL, (Cardinal) 0);
1068N/A+#endif
1068N/A
1068N/A /* Create Directory */
1068N/A
1370N/A@@ -336,7 +359,7 @@ StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page)
1068N/A
1370N/A if (page || help) {
1370N/A if (help)
1370N/A- strcpy(man_globals->manpage_title, "Xman Help");
1370N/A+ strcpy(man_globals->manpage_title, gettext("Xman Help"));
1068N/A
1370N/A if (man_globals->both_shown) {
1370N/A XtManageChild(dir);
1370N/A@@ -528,7 +551,7 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
1370N/A menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
1370N/A NULL, (Cardinal) 0);
1068N/A
1370N/A- for (i = 0; i < sections; i++) {
1370N/A+ for (i = 0; i < ((sections <= MAX_MENU) ? sections:sections/2) ; i++) {
1370N/A num_args = 0;
1370N/A XtSetArg(args[num_args], XtNlabel, manual[i].blabel);
1370N/A num_args++;
1370N/A@@ -547,6 +570,35 @@ CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
1370N/A }
1068N/A }
1068N/A
1068N/A+static void
1370N/A+CreateMoreMenu(ManpageGlobals * man_globals, Widget parent)
1068N/A+{
1370N/A+ Widget menu, entry;
1370N/A+ int i;
1370N/A+ MenuStruct * menu_struct;
1370N/A+ Arg args[1];
1370N/A+ Cardinal num_args;
1370N/A+ char entry_name[BUFSIZ];
1068N/A+
1370N/A+ menu = XtCreatePopupShell(MORE_MENU, simpleMenuWidgetClass, parent,
1370N/A+ NULL, (Cardinal) 0);
1068N/A+
1370N/A+ for (i = sections/2-1 ; i < sections ; i ++) {
1370N/A+ num_args = 0;
1370N/A+ XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
1370N/A+ snprintf(entry_name, sizeof(entry_name), "section%d", i);
1068N/A+
1370N/A+ entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
1370N/A+ menu, args, num_args);
1370N/A+ menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
1370N/A+ menu_struct->data = (caddr_t) man_globals;
1370N/A+ menu_struct->number = i;
1370N/A+ XtAddCallback(entry, XtNcallback, DirPopupCallback, (caddr_t) menu_struct);
1370N/A+ XtAddCallback(entry, XtNdestroyCallback,MenuDestroy, (caddr_t)menu_struct);
1068N/A+
1370N/A+ }
1068N/A+}
1068N/A+
1068N/A /* Function Name: CreateList
1068N/A * Description: this function prints a label in the directory list
1068N/A * Arguments: section - the manual section.
1370N/A@@ -592,7 +644,7 @@ MakeDirectoryBox(ManpageGlobals * man_globals, Widget parent, Widget * dir_disp,
1370N/A return;
1068N/A
1370N/A name = manual[section].blabel; /* Set the section name */
1370N/A- snprintf(label_name, sizeof(label_name), "Directory of: %s", name);
1370N/A+ snprintf(label_name, sizeof(label_name), gettext("Directory of: %s"),name);
1370N/A man_globals->section_name[section] = XtNewString(label_name);
1068N/A
1370N/A num_args = 0;
1370N/A@@ -691,7 +743,7 @@ FormUpWidgets(Widget parent, const char **full_size, const char **half_size)
1068N/A
1370N/A if (long_widget == (Widget) NULL) { /* Make sure we found one. */
1370N/A PopupWarning(GetGlobals(parent),
1370N/A- "Could not find longest widget, aborting...");
1370N/A+ gettext("Could not find longest widget, aborting..."));
1370N/A XtFree((char *) full_widgets);
1370N/A XtFree((char *) half_widgets);
1370N/A return;
1370N/A@@ -759,7 +811,7 @@ ConvertNamesToWidgets(Widget parent, const char **names)
1370N/A char error_buf[BUFSIZ];
1370N/A
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Could not find widget named '%s'", *names);
1370N/A+ gettext("Could not find widget named '%s'"), *names);
1370N/A PrintError(error_buf);
1370N/A XtFree((char *) ids);
1370N/A return (NULL);
1179N/Adiff --git a/defs.h b/defs.h
1370N/Aindex fe09b6b..22da1c7 100644
1179N/A--- a/defs.h
1179N/A+++ b/defs.h
1370N/A@@ -53,6 +53,7 @@ from the X Consortium.
1068N/A
1370N/A #define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
1370N/A #define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
1370N/A+#define MORE_MENU "moreMenu" /* Name of the More... Menu. */
1068N/A
1370N/A #define HELP_BUTTON "helpButton" /* Name of top help button */
1370N/A #define QUIT_BUTTON "quitButton" /* Name of top quit button */
1179N/Adiff --git a/handler.c b/handler.c
1370N/Aindex e61687e..351f60f 100644
1179N/A--- a/handler.c
1179N/A+++ b/handler.c
1370N/A@@ -41,6 +41,8 @@ from the X Consortium.
1068N/A #include <sys/stat.h>
1068N/A #include "globals.h"
1068N/A #include "vendor.h"
1068N/A+#include <libintl.h>
1068N/A+#include <X11/Xlocale.h>
1068N/A #ifdef INCLUDE_XPRINT_SUPPORT
1068N/A #include "printdialog.h"
1068N/A #include "print.h"
1370N/A@@ -309,8 +311,10 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
1370N/A char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
1068N/A
1370N/A if (*num_params != 1) {
1370N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1370N/A- "Xman - SaveFormattedPage: This action routine requires one argument.");
1370N/A+ snprintf(error_buf, sizeof(error_buf),
1370N/A+ gettext("%s This action routine requires one argument."),
1370N/A+ "Xman - SaveFormattedPage:");
1370N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1370N/A return;
1068N/A }
1068N/A
1370N/A@@ -347,14 +351,14 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
1370N/A /* make sure the formatted man page is fully accessible by the world */
1370N/A if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Couldn't set permissions on formatted man page '%s'.\n",
1370N/A+ gettext("Couldn't set permissions on formatted man page '%s'.\n"),
1370N/A man_globals->save_file);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A }
1370N/A }
1370N/A else {
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Error while executing the command '%s'.\n", cmdbuf);
1370N/A+ gettext("Error while executing the command '%s'.\n"), cmdbuf);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A }
1370N/A break;
1370N/A@@ -362,8 +366,9 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
1370N/A case 'c':
1370N/A break;
1370N/A default:
1370N/A- PopupWarning(man_globals, "Xman - SaveFormattedPage: "
1370N/A- "Unknown argument must be either 'Save' or 'Cancel'.");
1370N/A+ snprintf(error_buf, sizeof(error_buf), "%s %s", "Xman - SaveFormattedPage:",
1370N/A+ gettext("Unknown argument must be either 'Save' or 'Cancel'."));
1370N/A+ PopupWarning(man_globals, error_buf);
1370N/A return;
1370N/A }
1370N/A
1370N/A@@ -394,10 +399,13 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
1370N/A ManpageGlobals *man_globals;
1370N/A Arg arglist[1];
1370N/A Boolean sensitive;
1370N/A+ char error_buf[BUFSIZ];
1068N/A
1370N/A if (*num_params != 1) {
1370N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1370N/A- "Xman - GotoPage: This action routine requires one argument.");
1370N/A+ snprintf(error_buf, sizeof(error_buf),
1370N/A+ gettext("%s This action routine requires one argument."),
1370N/A+ gettext("Xman - GotoPage:"));
1370N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1370N/A return;
1370N/A }
1370N/A
1370N/A@@ -431,8 +439,8 @@ GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
1370N/A break;
1370N/A default:
1370N/A XtAppWarning(XtWidgetToApplicationContext(w),
1370N/A- "Xman - GotoPage: Unknown argument must be "
1370N/A- "either Manpage or Directory.");
1370N/A+ gettext("Xman - GotoPage: Unknown argument must be "
1370N/A+ "either Manpage or Directory."));
1370N/A return;
1370N/A }
1179N/A }
1370N/A@@ -553,12 +561,15 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
1068N/A {
1370N/A ManpageGlobals *man_globals = GetGlobals(w);
1370N/A FILE *file = NULL;
1370N/A+ char error_buf[BUFSIZ];
1068N/A
1370N/A XtPopdown(XtParent(XtParent(w))); /* popdown the search widget */
1068N/A
1370N/A if ((*num_params < 1) || (*num_params > 2)) {
1370N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1370N/A- "Xman - Search: This action routine requires one or two arguments.");
1370N/A+ snprintf(error_buf, sizeof(error_buf),
1370N/A+ gettext("%s This action routine requires one or two arguments."),
1370N/A+ gettext("Xman - Search:"));
1370N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1370N/A return;
1370N/A }
1068N/A
1370N/A@@ -576,8 +587,10 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
1370N/A file = NULL;
1370N/A break;
1068N/A default:
1370N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1370N/A- "Xman - Search: First parameter unknown.");
1370N/A+ snprintf(error_buf, sizeof(error_buf),
1370N/A+ gettext("%s First parameter unknown."),
1370N/A+ gettext("Xman - Search:"));
1370N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1370N/A file = NULL;
1370N/A break;
1068N/A }
1370N/A@@ -604,8 +617,9 @@ Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
1370N/A }
1370N/A break;
1370N/A default:
1370N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1370N/A- "Xman - Search: Second parameter unknown.");
1370N/A+ snprintf(error_buf, sizeof(error_buf),
1370N/A+ gettext("%s Second parameter unknown."), "Xman - Search:");
1370N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1370N/A break;
1370N/A }
1370N/A else {
1179N/Adiff --git a/help.c b/help.c
1370N/Aindex 2167d49..eb1a778 100644
1179N/A--- a/help.c
1179N/A+++ b/help.c
1370N/A@@ -35,6 +35,8 @@ from the X Consortium.
1068N/A */
1068N/A
1370N/A #include "globals.h"
1068N/A+#include <libintl.h>
1068N/A+#include <X11/Xlocale.h>
1068N/A
1068N/A /* Function Name: MakeHelpWidget.
1370N/A * Description: This function creates the help widget so that it will be
1068N/A@@ -66,7 +68,7 @@ MakeHelpWidget(void)
1370N/A return (FALSE);
1370N/A }
1068N/A
1370N/A- ChangeLabel(man_globals->label, "Xman Help");
1370N/A+ ChangeLabel(man_globals->label, gettext("Xman Help"));
1068N/A
1370N/A XtManageChild(man_globals->manpagewidgets.manpage);
1370N/A XtRealizeWidget(help_widget);
1179N/A@@ -99,7 +101,7 @@ OpenHelpfile(ManpageGlobals * man_globals)
1068N/A
1370N/A if ((help_file_ptr = fopen(resources.help_file, "r")) == NULL) {
1370N/A PopupWarning(man_globals,
1370N/A- "Could not open help file, NO HELP WILL BE AVAILABLE.");
1370N/A+ gettext("Could not open help file, NO HELP WILL BE AVAILABLE."));
1370N/A return (FALSE);
1370N/A }
1370N/A
1179N/Adiff --git a/main.c b/main.c
1370N/Aindex 4565a14..f75796d 100644
1179N/A--- a/main.c
1179N/A+++ b/main.c
1370N/A@@ -35,6 +35,8 @@ from the X Consortium.
424N/A */
424N/A
1370N/A #include "globals.h"
424N/A+#include <libintl.h>
424N/A+#include <X11/Xlocale.h>
424N/A #ifndef ZERO
424N/A #include <X11/Xaw/Cardinals.h>
1370N/A #endif /* ZERO */
1370N/A@@ -145,6 +147,7 @@ main(int argc, char **argv)
424N/A {
1370N/A XtAppContext app_con;
424N/A
1370N/A+ char *domaindir;
1370N/A saved_argc = argc;
1370N/A saved_argv = (char **) XtMalloc(argc * sizeof(char *));
1370N/A bcopy(argv, saved_argv, argc * sizeof(char *));
1370N/A@@ -157,6 +160,13 @@ main(int argc, char **argv)
1370N/A wm_delete_window =
1370N/A XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW", False);
424N/A
1370N/A+ textdomain("xman");
424N/A+
1370N/A+ if ((domaindir = getenv("TEXTDOMAINDIR")) == NULL) {
1370N/A+ domaindir = "/usr/X11/share/locale";
1370N/A+ }
1370N/A+ bindtextdomain("xman", domaindir);
424N/A+
1370N/A manglobals_context = XStringToContext(MANNAME);
424N/A
1370N/A AdjustDefResources();
1370N/A@@ -173,10 +183,10 @@ main(int argc, char **argv)
1370N/A XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
424N/A
1370N/A if (!resources.fonts.directory)
1370N/A- PrintError("Failed to get the directory font.");
1370N/A+ PrintError(gettext("Failed to get the directory font."));
424N/A
424N/A #ifdef DEBUG
1370N/A- printf("debugging mode\n");
1370N/A+ printf(gettext("debugging mode\n"));
424N/A #endif
424N/A
424N/A /*
1370N/A@@ -195,7 +205,7 @@ main(int argc, char **argv)
424N/A
1370N/A if ((sections = Man()) == 0)
1370N/A PrintError
1370N/A- ("There are no manual sections to display, check your MANPATH.");
1370N/A+ (gettext("There are no manual sections to display, check your MANPATH."));
424N/A
1370N/A if (resources.top_box_active)
1370N/A MakeTopBox();
1370N/A@@ -229,42 +239,53 @@ ArgError(int argc, char **argv)
424N/A {
1370N/A int i;
424N/A
1370N/A- static const char **syntax, *syntax_def[] = {
1370N/A- "-help", "Print this message",
1370N/A- "-helpfile <filename>", "Specifies the helpfile to use.",
1370N/A- "-bothshown", "Show both the directory and manpage at once.",
1370N/A- "-notopbox", "Starts with manpage rather than topbox.",
1370N/A- "-geometry <geom>", "Specifies the geometry of the top box.",
1370N/A- "=<geom>", "Specifies the geometry of the top box.",
1370N/A- "-pagesize <geom>", "Specifies the geometry of the manual page.",
1370N/A- "-bw <pixels>", "Width of all window borders.",
1370N/A- "-borderwidth <pixels>", "Width of all window borders.",
1370N/A- "-bd <color>", "Color of all window borders.",
1370N/A- "-bordercolor <color>", "Color of all window borders.",
1370N/A- "-fg <color>", "Foreground color for the application.",
1370N/A- "-foreground <color>", "Foreground color for the application.",
1370N/A- "-bg <color>", "Background color for the application.",
1370N/A- "-background <color>", "Background color for the application.",
1370N/A- "-display <display name>", "Specify a display that is not the default",
1370N/A- "-fn <font>", "Font to be used for button and label text.",
1370N/A- "-font <font>", "Font to be used for button and label text.",
1370N/A- "-name <name>", "Change the name used for retrieving resources.",
1370N/A- "-title <name>", "Change the name without affecting resources.",
1370N/A- "-xrm <resource>", "Specifies a resource on the command line.",
1370N/A- NULL, NULL,
1370N/A- };
1370N/A-
1370N/A- syntax = syntax_def;
1370N/A-
1370N/A for (i = 1; i < argc; i++)
1370N/A- (void) printf("This argument is unknown to Xman: %s\n", argv[i]);
1370N/A-
1370N/A- (void) printf("\nKnown arguments are:\n");
424N/A-
1370N/A- while (*syntax != NULL) {
1370N/A- printf("%-30s - %s\n", syntax[0], syntax[1]);
1370N/A- syntax += 2;
1370N/A- }
1370N/A+ (void) printf(gettext("This argument is unknown to Xman: %s\n"), argv[i]);
1370N/A+
1370N/A+ (void) printf(gettext("\nKnown arguments are:\n"));
1179N/A+
1370N/A+ printf("-help - %s\n",
1370N/A+ gettext("Print this message"));
1370N/A+ printf("-helpfile %s - %s\n", gettext("<filename> "),
1370N/A+ gettext("Specifies the helpfile to use."));
1370N/A+ printf("-bothshown - %s\n",
1370N/A+ gettext("Show both the directory and manpage at once."));
1370N/A+ printf("-notopbox - %s\n",
1370N/A+ gettext("Starts with manpage rather than topbox."));
1370N/A+ printf("-geometry %s - %s\n", gettext("<geom> "),
1370N/A+ gettext("Specifies the geometry of the top box."));
1370N/A+ printf("=%s - %s\n", gettext("<geom> "),
1370N/A+ gettext("Specifies the geometry of the top box."));
1370N/A+ printf("-pagesize %s - %s\n", gettext("<geom> "),
1370N/A+ gettext("Specifies the geometry of the manual page."));
1370N/A+ printf("-bw %s - %s\n", gettext("<pixels> "),
1370N/A+ gettext("Width of all window borders."));
1370N/A+ printf("-borderwidth %s - %s\n", gettext("<pixels> "),
1370N/A+ gettext("Width of all window borders."));
1370N/A+ printf("-bd %s - %s\n", gettext("<color> "),
1370N/A+ gettext("Color of all window borders."));
1370N/A+ printf("-bordercolor %s - %s\n", gettext("<color> "),
1370N/A+ gettext("Color of all window borders."));
1370N/A+ printf("-fg %s - %s\n", gettext("<color> "),
1370N/A+ gettext("Foreground color for the application."));
1370N/A+ printf("-foreground %s - %s\n", gettext("<color> "),
1370N/A+ gettext("Foreground color for the application."));
1370N/A+ printf("-bg %s - %s\n", gettext("<color> "),
1370N/A+ gettext("Background color for the application."));
1370N/A+ printf("-background %s - %s\n", gettext("<color> "),
1370N/A+ gettext("Background color for the application."));
1370N/A+ printf("-display %s - %s\n", gettext("<display name> "),
1370N/A+ gettext("Specify a display that is not the default"));
1370N/A+ printf("-fn %s - %s\n", gettext("<font> "),
1370N/A+ gettext("Font to be used for button and label text."));
1370N/A+ printf("-font %s - %s\n", gettext("<font> "),
1370N/A+ gettext("Font to be used for button and label text."));
1370N/A+ printf("-name %s - %s\n", gettext("<name> "),
1370N/A+ gettext("Change the name used for retrieving resources."));
1370N/A+ printf("-title %s - %s\n", gettext("<name> "),
1370N/A+ gettext("Change the name without affecting resources."));
1370N/A+ printf("-xrm %s - %s\n", gettext("<resource> "),
1370N/A+ gettext("Specifies a resource on the command line."));
424N/A }
424N/A
424N/A /* Function Name: AdjustDefResources
1179N/Adiff --git a/man.c b/man.c
1370N/Aindex e8432f0..5963a86 100644
1179N/A--- a/man.c
1179N/A+++ b/man.c
1370N/A@@ -31,6 +31,8 @@ from the X Consortium.
424N/A
1370N/A #include "globals.h"
1370N/A #include "vendor.h" /* vendor-specific defines and data */
424N/A+#include <libintl.h>
424N/A+#include <X11/Xlocale.h>
1370N/A
1370N/A #include <dirent.h>
424N/A
1370N/A@@ -157,7 +159,7 @@ Man(void)
1370N/A (sizeof(Manual) * num_alloced));
1370N/A if (manual == NULL)
1370N/A PrintError
1370N/A- ("Could not allocate memory for manual sections.");
1370N/A+ (gettext("Could not allocate memory for manual sections."));
1370N/A }
1370N/A InitManual(manual + sect, list->label);
1370N/A manual[sect].flags = list->flags;
1370N/A@@ -184,10 +186,10 @@ Man(void)
424N/A */
424N/A
1370N/A if (sect == 0)
1370N/A- PrintError("No manual pages found.");
1370N/A+ PrintError(gettext("No manual pages found."));
1370N/A manual = (Manual *) XtRealloc((char *) manual, (sizeof(Manual) * sect));
1370N/A if (manual == NULL)
1370N/A- PrintError("Could not allocate memory for manual sections.");
1370N/A+ PrintError(gettext("Could not allocate memory for manual sections."));
424N/A
1370N/A return (sect); /* return the number of man sections. */
1370N/A }
1370N/A@@ -209,7 +211,7 @@ SortList(SectionList ** list)
1370N/A SectionList *head, *last, *inner, *old;
424N/A
1370N/A if (*list == NULL)
1370N/A- PrintError("No manual sections to read, exiting.");
1370N/A+ PrintError(gettext("No manual sections to read, exiting."));
1370N/A
1370N/A /*
1370N/A * First step
1370N/A@@ -421,7 +423,7 @@ ReadCurrentSection(Manual * local_manual, char *path)
424N/A
1370N/A if ((dir = opendir(path)) == NULL) {
424N/A #ifdef DEBUG
1370N/A- snprintf(error_buf, sizeof(error_buf), "Can't open directory %s", path);
1370N/A+ snprintf(error_buf, sizeof(error_buf), gettext("Can't open directory %s"), path);
1370N/A PopupWarning(NULL, error_buf);
424N/A #endif /* DEBUG */
1370N/A return;
1370N/A@@ -507,7 +509,7 @@ ReadCurrentSection(Manual * local_manual, char *path)
1370N/A local_manual->entries_less_paths[nentries] =
1370N/A strrchr(local_manual->entries[nentries], '/');
1370N/A if (local_manual->entries_less_paths[nentries] == NULL)
1370N/A- PrintError("Internal error while cataloging manual pages.");
1370N/A+ PrintError(gettext("Internal error while cataloging manual pages."));
1370N/A ++nentries;
1370N/A }
1370N/A
1370N/A@@ -535,7 +537,7 @@ SortAndRemove(Manual * man, int number)
1370N/A register int i2 = 0;
1370N/A
424N/A #ifdef DEBUG
1370N/A- printf("sorting section %d - %s\n", i, man->blabel);
1370N/A+ printf(gettext("sorting section %d - %s\n"), i, man->blabel);
424N/A #endif /* DEBUG */
424N/A
1370N/A s1 = (char **) malloc(man->nentries * sizeof(char *));
1370N/A@@ -570,13 +572,13 @@ SortAndRemove(Manual * man, int number)
1370N/A l2 = man->entries_less_paths[j++];
1370N/A if (l2 == NULL)
1370N/A PrintError
1370N/A- ("Internal error while removing duplicate manual pages.");
1370N/A+ (gettext("Internal error while removing duplicate manual pages."));
1370N/A while (j < nentm1) {
1370N/A l1 = l2;
1370N/A l2 = man->entries_less_paths[j++];
1370N/A if (l2 == NULL)
1370N/A PrintError
1370N/A- ("Internal error while removing duplicate manual pages.");
1370N/A+ (gettext("Internal error while removing duplicate manual pages."));
1370N/A if (streq(l1, l2)) {
1370N/A j2 = j - 1;
1370N/A k = j2;
1370N/A@@ -931,7 +933,7 @@ DumpManual(int number)
1370N/A register int i, j;
1370N/A
1370N/A for (i = 0; i < number; i++) {
1370N/A- printf("label: %s\n", manual[i].blabel);
1370N/A+ printf("gettext(label: %s\n"), manual[i].blabel);
1370N/A for (j = 0; j < manual[i].nentries; j++)
1370N/A printf("%s\n", manual[i].entries[j]);
1370N/A }
1179N/Adiff --git a/misc.c b/misc.c
1370N/Aindex 33c69c7..ded2b85 100644
1179N/A--- a/misc.c
1179N/A+++ b/misc.c
1370N/A@@ -40,6 +40,8 @@ from the X Consortium.
424N/A
424N/A #include "globals.h"
424N/A #include "vendor.h"
1370N/A+#include <libintl.h>
1370N/A+#include <X11/Xlocale.h>
1370N/A #include <X11/Xos.h> /* sys/types.h and unistd.h included in here */
1370N/A #include <sys/stat.h>
1370N/A #include <errno.h>
1370N/A@@ -93,7 +95,7 @@ PopupWarning(ManpageGlobals * man_globals, const char *string)
1370N/A char buffer[BUFSIZ];
1370N/A Boolean hasPosition;
424N/A
1370N/A- snprintf(buffer, sizeof(buffer), "Xman Warning: %s", string);
1370N/A+ snprintf(buffer, sizeof(buffer), gettext("Xman Warning: %s"), string);
1370N/A hasPosition = FALSE;
1370N/A if (top) {
1370N/A n = 0;
1370N/A@@ -138,7 +140,7 @@ PopupWarning(ManpageGlobals * man_globals, const char *string)
424N/A void
1370N/A PrintError(const char *string)
424N/A {
1370N/A- fprintf(stderr, "Xman Error: %s\n", string);
1370N/A+ fprintf(stderr, gettext("Xman Error: %s\n"), string);
1370N/A exit(EXIT_FAILURE);
424N/A }
424N/A
1179N/A@@ -202,7 +204,7 @@ FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num)
424N/A
1370N/A temp = CreateManpageName(entry, 0, 0);
1370N/A snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
1370N/A- "The current manual page is: %s.", temp);
1370N/A+ gettext("The current manual page is: %s."), temp);
1370N/A XtFree(temp);
424N/A
1370N/A ParseEntry(entry, path, section, page);
1370N/A@@ -349,8 +351,8 @@ Uncompress(ManpageGlobals * man_globals, const char *filename)
1370N/A FILE *file;
1370N/A
1370N/A if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
1370N/A- PopupWarning(man_globals, "Something went wrong in retrieving the "
1370N/A- "uncompressed manual page try cleaning up /tmp.");
1370N/A+ PopupWarning(man_globals, gettext("Something went wrong in retrieving "
1370N/A+ "the uncompressed manual page. Try cleaning up /tmp."));
1370N/A return (NULL);
1370N/A }
424N/A
1370N/A@@ -379,8 +381,8 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
1370N/A if (stat(filename, &junk) != 0) { /* Check for existence of the file. */
1370N/A if (errno != ENOENT) {
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Error while stating file %s, errno = %d", filename,
1370N/A- errno);
1370N/A+ gettext("Error while stating file %s, errno = %d"),
1370N/A+ filename, errno);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A }
1370N/A return (FALSE);
1370N/A@@ -394,7 +396,7 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
1370N/A strcpy(tmp, MANTEMP); /* get a temp file. */
1370N/A fd = mkstemp(tmp);
1370N/A if (fd < 0) {
1370N/A- PopupWarning(man_globals, "Error creating a temp file");
1370N/A+ PopupWarning(man_globals, gettext("Error creating a temp file"));
1370N/A return FALSE;
424N/A }
1370N/A *output_file = fdopen(fd, "r");
1370N/A@@ -429,7 +431,7 @@ UncompressNamed(ManpageGlobals * man_globals, const char *filename,
1370N/A return (TRUE);
424N/A
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Error while uncompressing, command was: %s", cmdbuf);
1370N/A+ gettext("Error while uncompressing, command was: %s"), cmdbuf);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A return (FALSE);
424N/A }
1370N/A@@ -515,7 +517,7 @@ Format(ManpageGlobals * man_globals, const char *entry)
1370N/A if (!UncompressUnformatted(man_globals, entry, filename, &file)) {
1370N/A /* We Really could not find it, this should never happen, yea right. */
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Could not open manual page, %s", entry);
1370N/A+ gettext("Could not open manual page, %s"), entry);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A XtPopdown(XtParent(man_globals->standby));
1370N/A return (NULL);
1370N/A@@ -577,12 +579,22 @@ Format(ManpageGlobals * man_globals, const char *entry)
1370N/A ParseEntry(entry, path, sect, NULL);
424N/A
424N/A #ifndef HANDLE_ROFFSEQ
1370N/A+#ifdef SFORMAT /* Handle Solaris SGML pages */
424N/A+ if (sect[0] == 's') {
1370N/A+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s >> %s %s",
1370N/A+ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
1370N/A+ "2> /dev/null");
424N/A+ } else {
424N/A+#endif /* SFORMAT */
1370N/A snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s >> %s %s", path, TBL,
1370N/A filename, FORMAT, man_globals->tempfile, "2> /dev/null");
424N/A+#ifdef SFORMAT
424N/A+ }
424N/A+#endif
424N/A #else
1370N/A /* Handle more flexible way of specifying the formatting pipeline */
1370N/A if (!ConstructCommand(cmdbuf, path, filename, man_globals->tempfile)) {
1370N/A- PopupWarning(man_globals, "Constructed command was too long!");
1370N/A+ PopupWarning(man_globals, gettext("Constructed command was too long!"));
1370N/A fclose(file);
1370N/A file = NULL;
1370N/A }
1370N/A@@ -591,7 +603,7 @@ Format(ManpageGlobals * man_globals, const char *entry)
424N/A
1370N/A if (system(cmdbuf) != 0) { /* execute search. */
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Something went wrong trying to run the command: %s", cmdbuf);
1370N/A+ gettext("Something went wrong trying to run the command: %s"), cmdbuf);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A fclose(file);
1370N/A file = NULL;
1370N/A@@ -1000,7 +1012,7 @@ AddCursor(Widget w, Cursor cursor)
1370N/A Colormap c_map;
1370N/A
1370N/A if (!XtIsRealized(w)) {
1370N/A- PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
1370N/A+ PopupWarning(NULL, gettext("Widget is not realized, no cursor added.\n"));
1370N/A return;
424N/A }
424N/A
1370N/A@@ -1114,14 +1126,14 @@ ParseEntry(const char *entry, char *path, char *sect, char *page)
424N/A
1370N/A c = strrchr(temp, '/');
1370N/A if (c == NULL)
1370N/A- PrintError("Failed to find / in ParseEntry.");
1370N/A+ PrintError(gettext("Failed to find / in ParseEntry."));
1370N/A *c++ = '\0';
1370N/A if (page != NULL)
1370N/A strcpy(page, c);
424N/A
1370N/A c = strrchr(temp, '/');
1370N/A if (c == NULL)
1370N/A- PrintError("Failed to find / in ParseEntry.");
1370N/A+ PrintError(gettext("Failed to find / in ParseEntry."));
1370N/A *c++ = '\0';
424N/A #if defined(SFORMAT) && defined(SMAN)
1370N/A /* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
1370N/A@@ -1168,12 +1180,12 @@ GetGlobals(Widget w)
424N/A
1370N/A if (temp == NULL)
1370N/A XtAppError(XtWidgetToApplicationContext(w),
1370N/A- "Xman: Could not locate widget in tree, exiting");
1370N/A+ gettext("Xman: Could not locate widget in tree, exiting"));
424N/A
1370N/A if (XFindContext(XtDisplay(w), XtWindow(w),
1370N/A manglobals_context, &data) != XCSUCCESS)
1370N/A XtAppError(XtWidgetToApplicationContext(w),
1370N/A- "Xman: Could not find global data, exiting");
1370N/A+ gettext("Xman: Could not find global data, exiting"));
424N/A
1370N/A return ((ManpageGlobals *) data);
424N/A }
1370N/A@@ -1195,7 +1207,7 @@ SaveGlobals(Widget w, ManpageGlobals * globals)
1370N/A if (XSaveContext(XtDisplay(w), XtWindow(w), manglobals_context,
1370N/A (caddr_t) globals) != XCSUCCESS)
1370N/A XtAppError(XtWidgetToApplicationContext(w),
1370N/A- "Xman: Could not save global data, are you out of memory?");
1370N/A+ gettext("Xman: Could not save global data, are you out of memory?"));
424N/A }
424N/A
424N/A /* Function Name: RemoveGlobals
1370N/A@@ -1213,5 +1225,5 @@ RemoveGlobals(Widget w)
1370N/A if (XDeleteContext(XtDisplay(w), XtWindow(w),
1370N/A manglobals_context) != XCSUCCESS)
1370N/A XtAppError(XtWidgetToApplicationContext(w),
1370N/A- "Xman: Could not remove global data?");
1370N/A+ gettext("Xman: Could not remove global data?"));
424N/A }
1179N/Adiff --git a/search.c b/search.c
1370N/Aindex c28b997..749fe61 100644
1179N/A--- a/search.c
1179N/A+++ b/search.c
1370N/A@@ -31,6 +31,8 @@ from the X Consortium.
424N/A
424N/A #include "globals.h"
424N/A #include "vendor.h"
1370N/A+#include <libintl.h>
1370N/A+#include <X11/Xlocale.h>
424N/A
1370N/A /* Map <CR> and control-M to goto beginning of file. */
424N/A
1370N/A@@ -68,7 +70,7 @@ MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
1370N/A arglist, num_args);
1370N/A
1370N/A if ((text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
1370N/A- PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
1370N/A+ PopupWarning(NULL, gettext("Could not find text widget in MakeSearchWidget."));
1370N/A else
1370N/A XtSetKeyboardFocus(dialog, text);
424N/A
1370N/A@@ -84,7 +86,7 @@ MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
1370N/A if (((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
1370N/A ((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL))
1370N/A PopupWarning(NULL,
1370N/A- "Could not find manual search widget in MakeSearchWidget.");
1370N/A+ gettext("Could not find manual search widget in MakeSearchWidget."));
1370N/A else {
1370N/A static const char *half_size[] = {
1370N/A MANUALSEARCH, APROPOSSEARCH, NULL
1370N/A@@ -120,7 +122,7 @@ SearchString(ManpageGlobals * man_globals)
1370N/A return (XawDialogGetValueString(dialog));
424N/A
1370N/A PopupWarning(man_globals,
1370N/A- "Could not get the search string, no search will be preformed.");
1370N/A+ gettext("Could not get the search string, no search will be performed."));
1370N/A return (NULL);
424N/A }
424N/A
1370N/A@@ -163,16 +165,16 @@ DoSearch(ManpageGlobals * man_globals, int type)
1370N/A /* If the string is empty or starts with a space then do not search */
424N/A
1370N/A if (streq(search_string, "")) {
1370N/A- PopupWarning(man_globals, "Search string is empty.");
1370N/A+ PopupWarning(man_globals, gettext("Search string is empty."));
1370N/A return (NULL);
424N/A }
424N/A
1370N/A if (strlen(search_string) >= BUFSIZ) {
1370N/A- PopupWarning(man_globals, "Search string too long.");
1370N/A+ PopupWarning(man_globals, gettext("Search string too long."));
1370N/A return (NULL);
1370N/A }
1370N/A if (search_string[0] == ' ') {
1370N/A- PopupWarning(man_globals, "First character cannot be a space.");
1370N/A+ PopupWarning(man_globals, gettext("First character cannot be a space."));
1370N/A return (NULL);
424N/A }
424N/A
1370N/A@@ -205,7 +207,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
1370N/A }
1370N/A
1370N/A snprintf(label, sizeof(label),
1370N/A- "Results of apropos search on: %s", search_string);
1370N/A+ gettext("Results of apropos search on: %s"), search_string);
1370N/A
1370N/A #ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
1370N/A snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
1370N/A@@ -216,12 +218,12 @@ DoSearch(ManpageGlobals * man_globals, int type)
424N/A
1370N/A if (system(cmdbuf) != 0) { /* execute search. */
1370N/A snprintf(error_buf, sizeof(error_buf),
1370N/A- "Something went wrong trying to run %s\n", cmdbuf);
1370N/A+ gettext("Something went wrong trying to run %s\n"), cmdbuf);
1370N/A PopupWarning(man_globals, error_buf);
1370N/A }
1370N/A
1370N/A if ((file = fdopen(fd, "r")) == NULL)
1370N/A- PrintError("lost temp file? out of temp space?");
1370N/A+ PrintError(gettext("lost temp file? out of temp space?"));
424N/A
1370N/A /*
1370N/A * Since we keep the FD open we can remove the file safely, this
1370N/A@@ -230,8 +232,8 @@ DoSearch(ManpageGlobals * man_globals, int type)
424N/A
1370N/A remove(mantmp);
1370N/A
1370N/A- snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate",
1370N/A- search_string);
1370N/A+ snprintf(string_buf, sizeof(string_buf),
1370N/A+ gettext("%s: nothing appropriate"), search_string);
424N/A
1370N/A /*
1370N/A * Check first LOOKLINES lines for "nothing appropriate".
1370N/A@@ -270,8 +272,8 @@ DoSearch(ManpageGlobals * man_globals, int type)
1370N/A else { /* MANUAL SEARCH */
1370N/A file = DoManualSearch(man_globals, search_string);
1370N/A if (file == NULL) {
1370N/A- snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.",
1370N/A- search_string);
1370N/A+ snprintf(string_buf, sizeof(string_buf),
1370N/A+ gettext("No manual entry for %s."), search_string);
1370N/A ChangeLabel(man_globals->label, string_buf);
1370N/A if (man_globals->label == NULL)
1370N/A PopupWarning(man_globals, string_buf);
1370N/A@@ -286,6 +288,7 @@ DoSearch(ManpageGlobals * man_globals, int type)
1370N/A dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
1370N/A if (dialog == NULL)
1370N/A PopupWarning(man_globals, "Could not clear the search string.");
1370N/A+ PopupWarning(man_globals, gettext("Could not clear the search string."));
424N/A
1370N/A XtSetArg(arglist[0], XtNvalue, "");
1370N/A XtSetValues(dialog, arglist, (Cardinal) 1);
1370N/A@@ -372,7 +375,7 @@ BEntrySearch(char *string, char **first, int number)
424N/A
1370N/A head = strrchr(first[global_number + check], '/');
1370N/A if (head == NULL)
1370N/A- PrintError("index failure in BEntrySearch");
1370N/A+ PrintError(gettext("index failure in BEntrySearch"));
1370N/A head++;
424N/A
1370N/A tail = strrchr(head, '.');
1179N/Adiff --git a/vendor.c b/vendor.c
1370N/Aindex 903fc8c..0940f24 100644
1179N/A--- a/vendor.c
1179N/A+++ b/vendor.c
1370N/A@@ -32,6 +32,8 @@ from the X Consortium.
424N/A
424N/A #include "globals.h"
424N/A #include "vendor.h"
424N/A+#include <libintl.h>
424N/A+#include <X11/Xlocale.h>
424N/A
424N/A typedef struct sectionName {
1370N/A const char *name;
1370N/A@@ -229,11 +231,11 @@ AddStandardSections(SectionList ** list, const char *path)
1370N/A
1370N/A for (i = 0; i < numSections; i++) {
1370N/A snprintf(file, sizeof(file), "%s%s", SEARCHDIR, SectionNames[i].suffix);
1370N/A- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
1370N/A+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
1370N/A #ifdef SEARCHOTHER
1370N/A snprintf(file, sizeof(file), "%s%s", SEARCHOTHER,
1370N/A SectionNames[i].suffix);
1370N/A- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
1370N/A+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
424N/A #endif
424N/A }
1370N/A }