1068N/A@@ -36,6 +36,8 @@ from the X Consortium.
1068N/A * Created: October 27, 1987
1068N/A@@ -47,6 +49,7 @@ from the X Consortium.
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);
1068N/A static void StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page);
1068N/A static Widget * ConvertNamesToWidgets(Widget parent, char ** names);
1068N/A@@ -57,6 +60,7 @@ static Widget * ConvertNamesToWidgets(Wi
1068N/A@@ -213,7 +217,7 @@ Boolean full_instance)
1068N/A Arg arglist[MANPAGEARGS]; /* An argument list for widget creation */
1068N/A Cardinal num_args; /* The number of arguments in the list. */
1068N/A- Widget mytop, pane, hpane, mysections; /* Widgets */
1068N/A+ Widget mytop, pane, hpane, mysections, sect1; /* Widgets */
1068N/A ManPageWidgets * mpw = &(man_globals->manpagewidgets);
1068N/A@@ -240,8 +244,13 @@ Boolean full_instance)
1068N/A XtSetValues(mytop, arglist, num_args);
1068N/A+ pane = XtCreateManagedWidget("Manpage_Vpane", panedWidgetClass, mytop, NULL,
1068N/A pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
1068N/A@@ -259,15 +268,24 @@ Boolean full_instance)
1068N/A mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
1068N/A+ XtSetArg(arglist[num_args], XtNmenuName, MORE_MENU); num_args++;
1068N/A+ sect1 = XtCreateManagedWidget("More...", menuButtonWidgetClass,
1068N/A+ hpane, arglist, num_args);
1068N/A XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
1068N/A XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
1068N/A MakeSearchWidget(man_globals, mytop);
1068N/A CreateSectionMenu(man_globals, mytop);
1068N/A+ if(sections > MAX_MENU) CreateMoreMenu(man_globals, mytop);
1068N/A MakeSaveWidgets(man_globals, mytop);
1068N/A XtSetSensitive(mysections, FALSE);
1068N/A+ if(sections > MAX_MENU) XtSetSensitive(sect1, FALSE);
1068N/A XtSetArg(arglist[0], XtNsensitive, FALSE);
1068N/A XtSetValues(man_globals->dir_entry, arglist, ONE);
1068N/A XtSetValues(man_globals->manpage_entry, arglist, ONE);
1068N/A@@ -281,8 +299,13 @@ Boolean full_instance)
1068N/A XtSetValues(man_globals->print_entry, arglist, ONE);
1068N/A #endif /* INCLUDE_XPRINT_SUPPORT */
1068N/A+ man_globals->label = XtCreateManagedWidget(MANNAME, labelWidgetClass,
1068N/A+ hpane, NULL, (Cardinal) 0);
1068N/A man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
1068N/A hpane, NULL, (Cardinal) 0);
1068N/A@@ -330,7 +353,7 @@ StartManpage(ManpageGlobals * man_global
1068N/A- strcpy(man_globals->manpage_title, "Xman Help");
1068N/A+ strcpy(man_globals->manpage_title, gettext("Xman Help"));
1068N/A if (man_globals->both_shown) {
1068N/A@@ -519,7 +542,7 @@ CreateSectionMenu(ManpageGlobals * man_g
1068N/A menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
1068N/A- for (i = 0 ; i < sections ; i ++) {
1068N/A+ for (i = 0 ; i < ((sections <= MAX_MENU) ? sections:sections/2) ; i ++) {
1068N/A XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
1068N/A sprintf(entry_name, "section%d", i);
1068N/A@@ -535,6 +558,37 @@ CreateSectionMenu(ManpageGlobals * man_g
1068N/A+CreateMoreMenu(man_globals, parent)
1068N/A+ManpageGlobals * man_globals;
1068N/A+ menu = XtCreatePopupShell(MORE_MENU, simpleMenuWidgetClass, parent,
1068N/A+ for (i = sections/2-1 ; i < sections ; i ++) {
1068N/A+ XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
1068N/A+ sprintf(entry_name, "section%d", i);
1068N/A+ entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
1068N/A+ menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
1068N/A+ menu_struct->data = (caddr_t) man_globals;
1068N/A+ XtAddCallback(entry, XtNcallback, DirPopupCallback, (caddr_t) menu_struct);
1068N/A+ XtAddCallback(entry, XtNdestroyCallback,MenuDestroy, (caddr_t)menu_struct);
1068N/A /* Function Name: CreateList
1068N/A * Description: this function prints a label in the directory list
1068N/A * Arguments: section - the manual section.
1068N/A@@ -579,7 +633,7 @@ MakeDirectoryBox(ManpageGlobals *man_glo
1068N/A name = manual[section].blabel; /* Set the section name */
1068N/A- sprintf(label_name,"Directory of: %s",name);
1068N/A+ snprintf(label_name, sizeof(label_name), gettext("Directory of: %s"),name);
1068N/A man_globals->section_name[section] = StrAlloc(label_name);
1068N/A@@ -677,7 +731,7 @@ FormUpWidgets(Widget parent, char ** ful
1068N/A if (long_widget == (Widget) NULL) { /* Make sure we found one. */
1068N/A PopupWarning(GetGlobals(parent),
1068N/A- "Could not find longest widget, aborting...");
1068N/A+ gettext("Could not find longest widget, aborting..."));
1068N/A XtFree((char *)full_widgets);
1068N/A XtFree((char *)half_widgets);
1068N/A@@ -745,7 +799,8 @@ ConvertNamesToWidgets(Widget parent, cha
1068N/A- sprintf(error_buf, "Could not find widget named '%s'", *names);
1068N/A+ snprintf(error_buf, sizeof(error_buf),
1068N/A+ gettext("Could not find widget named '%s'"), *names);
1068N/A@@ -51,6 +51,7 @@ from the X Consortium.
1068N/A #define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
1068N/A #define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
1068N/A+#define MORE_MENU "moreMenu" /* Name of the More... Menu. */
1068N/A #define HELP_BUTTON "helpButton" /* Name of top help button */
1068N/A #define QUIT_BUTTON "quitButton" /* Name of top quit button */
1068N/A@@ -43,6 +43,8 @@ from the X Consortium.
1068N/A #ifdef INCLUDE_XPRINT_SUPPORT
1068N/A@@ -309,8 +311,10 @@ SaveFormattedPage(Widget w, XEvent * eve
1068N/A char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
1068N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1068N/A- "Xman - SaveFormattedPage: This action routine requires one argument.");
1068N/A+ snprintf(error_buf, sizeof(error_buf),
1068N/A+ gettext("%s This action routine requires one argument."),
1068N/A+ "Xman - SaveFormattedPage:");
1068N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1068N/A@@ -347,12 +351,12 @@ SaveFormattedPage(Widget w, XEvent * eve
1068N/A /* make sure the formatted man page is fully accessible by the world */
1068N/A if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
1068N/A- "Couldn't set permissions on formatted man page '%s'.\n",
1068N/A+ gettext("Couldn't set permissions on formatted man page '%s'.\n"),
1068N/A PopupWarning( man_globals, error_buf);
1068N/A- sprintf(error_buf, "Error while executing the command '%s'.\n",
1068N/A+ sprintf(error_buf, gettext("Error while executing the command '%s'.\n"),
1068N/A PopupWarning( man_globals, error_buf);
1068N/A@@ -362,7 +366,7 @@ SaveFormattedPage(Widget w, XEvent * eve
1068N/A sprintf(error_buf,"%s %s", "Xman - SaveFormattedPagee:",
1068N/A- "Unknown argument must be either 'Save' or 'Cancel'.");
1068N/A+ gettext("Unknown argument must be either 'Save' or 'Cancel'."));
1068N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -397,8 +401,10 @@ GotoPage(Widget w, XEvent * event, Strin
1068N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1068N/A- "Xman - GotoPage: This action routine requires one argument.");
1068N/A+ snprintf(error_buf, sizeof(error_buf),
1068N/A+ gettext("%s This action routine requires one argument."),
1068N/A+ gettext("Xman - GotoPage:"));
1068N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1068N/A@@ -431,8 +437,8 @@ GotoPage(Widget w, XEvent * event, Strin
1068N/A man_globals->dir_shown = TRUE;
1068N/A- sprintf(error_buf,"%s %s", "Xman - GotoPage: Unknown argument must be",
1068N/A- "either Manpage or Directory.");
1068N/A+ sprintf(error_buf,"%s %s", gettext("Xman - GotoPage: Unknown argument must be"),
1068N/A+ gettext("either Manpage or Directory."));
1068N/A XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1068N/A Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
1068N/A ManpageGlobals * man_globals = GetGlobals(w);
1068N/A XtPopdown( XtParent(XtParent(w)) ); /* popdown the search widget */
1068N/A if ( (*num_params < 1) || (*num_params > 2) ) {
1068N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1068N/A- "Xman - Search: This action routine requires one or two arguments.");
1068N/A+ snprintf(error_buf, sizeof(error_buf),
1068N/A+ gettext("%s This action routine requires one or two arguments."),
1068N/A+ gettext("Xman - Search:"));
1068N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1068N/A@@ -574,8 +583,10 @@ Search(Widget w, XEvent * event, String
1068N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1068N/A- "Xman - Search: First parameter unknown.");
1068N/A+ snprintf(error_buf, sizeof(error_buf),
1068N/A+ gettext("%s First parameter unknown."),
1068N/A+ gettext("Xman - Search:"));
1068N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1068N/A@@ -600,8 +611,9 @@ Search(Widget w, XEvent * event, String
1068N/A- XtAppWarning(XtWidgetToApplicationContext(w),
1068N/A- "Xman - Search: Second parameter unknown.");
1068N/A+ snprintf(error_buf, sizeof(error_buf),
1068N/A+ gettext("%s Second parameter unknown."), "Xman - Search:");
1068N/A+ XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
1068N/A@@ -36,6 +36,8 @@ from the X Consortium.
1068N/A * Created: January 19, 1988
1068N/A /* Function Name: MakeHelpWidget.
1068N/A@@ -66,7 +68,7 @@ MakeHelpWidget(void)
1068N/A- ChangeLabel(man_globals->label, "Xman Help");
1068N/A+ ChangeLabel(man_globals->label, gettext("Xman Help"));
1068N/A XtRealizeWidget( help_widget );
1068N/A@@ -99,7 +101,7 @@ OpenHelpfile(ManpageGlobals * man_global
1068N/A- "Could not open help file, NO HELP WILL BE AVALIABLE.");
1068N/A+ gettext("Could not open help file, NO HELP WILL BE AVALIABLE."));
1068N/A@@ -37,6 +37,8 @@ from the X Consortium.
424N/A * Created: October 22, 1987
1068N/A@@ -146,6 +148,7 @@ int main(int argc, char ** argv)
424N/A saved_argv = (char **)XtMalloc(argc * sizeof(char *));
424N/A bcopy(argv, saved_argv, argc * sizeof(char *));
1068N/A@@ -158,6 +161,13 @@ int main(int argc, char ** argv)
424N/A wm_delete_window = XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW",
424N/A+ if((domaindir = getenv("TEXTDOMAINDIR")) == NULL) {
424N/A+ bindtextdomain("xman", domaindir);
424N/A manglobals_context = XStringToContext(MANNAME);
1068N/A@@ -174,10 +184,10 @@ int main(int argc, char ** argv)
424N/A XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
424N/A- PrintError("Failed to get the directory font.");
424N/A+ PrintError(gettext("Failed to get the directory font."));
424N/A- printf("debugging mode\n");
424N/A+ printf(gettext("debugging mode\n"));
1068N/A@@ -195,7 +205,7 @@ int main(int argc, char ** argv)
424N/A if ( (sections = Man()) == 0 )
424N/A- PrintError("There are no manual sections to display, check your MANPATH.");
424N/A+ PrintError(gettext("There are no manual sections to display, check your MANPATH."));
1068N/A@@ -219,7 +229,7 @@ int main(int argc, char ** argv)
424N/A /* Function Name: ArgError
424N/A- * Description: Prints error message about unknow arguments.
424N/A+ * Description: Prints error message about unknown arguments.
424N/A * Arguments: argc, argv - args not understood.
1068N/A@@ -229,42 +239,53 @@ ArgError(int argc, char ** argv)
424N/A- static char **syntax, *syntax_def[] = {
424N/A- "-help", "Print this message",
424N/A- "-helpfile <filename>", "Specifies the helpfile to use.",
424N/A- "-bothshown", "Show both the directory and manpage at once.",
424N/A- "-notopbox", "Starts with manpage rather than topbox.",
424N/A- "-geometry <geom>", "Specifies the geometry of the top box.",
424N/A- "=<geom>", "Specifies the geometry of the top box.",
424N/A- "-pagesize <geom>", "Specifies the geometry of the manual page.",
424N/A- "-bw <pixels>", "Width of all window borders.",
424N/A- "-borderwidth <pixels>", "Width of all window borders.",
424N/A- "-bd <color>", "Color of all window borders.",
424N/A- "-bordercolor <color>", "Color of all window borders.",
424N/A- "-fg <color>", "Foreground color for the application.",
424N/A- "-foreground <color>", "Foreground color for the application.",
424N/A- "-bg <color>", "Background color for the application.",
424N/A- "-background <color>", "Background color for the application.",
424N/A- "-display <display name>", "Specify a display that is not the default",
424N/A- "-fn <font>", "Font to be used for button and label text.",
424N/A- "-font <font>", "Font to be used for button and label text.",
424N/A- "-name <name>", "Change the name used for retrieving resources.",
424N/A- "-title <name>", "Change the name without affecting resources.",
424N/A- "-xrm <resource>", "Specifies a resource on the command line.",
424N/A for (i = 1; i < argc ; i++)
424N/A- (void) printf("This argument is unknown to Xman: %s\n", argv[i]);
424N/A+ (void) printf(gettext("This argument is unknown to Xman: %s\n"), argv[i]);
424N/A- (void) printf("\nKnown arguments are:\n");
424N/A+ (void) printf(gettext("\nKnown arguments are:\n"));
424N/A- while ( *syntax != NULL ) {
424N/A- printf("%-30s - %s\n", syntax[0], syntax[1]);
424N/A+ printf("-help - %s\n",
424N/A+ gettext("Print this message"));
424N/A+ printf("-helpfile %s - %s\n", gettext("<filename> "),
424N/A+ gettext("Specifies the helpfile to use."));
424N/A+ printf("-bothshown - %s\n",
424N/A+ gettext("Show both the directory and manpage at once."));
424N/A+ printf("-notopbox - %s\n",
424N/A+ gettext("Starts with manpage rather than topbox."));
424N/A+ printf("-geometry %s - %s\n", gettext("<geom> "),
424N/A+ gettext("Specifies the geometry of the top box."));
424N/A+ printf("=%s - %s\n", gettext("<geom> "),
424N/A+ gettext("Specifies the geometry of the top box."));
424N/A+ printf("-pagesize %s - %s\n", gettext("<geom> "),
424N/A+ gettext("Specifies the geometry of the manual page."));
424N/A+ printf("-bw %s - %s\n", gettext("<pixels> "),
424N/A+ gettext("Width of all window borders."));
424N/A+ printf("-borderwidth %s - %s\n", gettext("<pixels> "),
424N/A+ gettext("Width of all window borders."));
424N/A+ printf("-bd %s - %s\n", gettext("<color> "),
424N/A+ gettext("Color of all window borders."));
424N/A+ printf("-bordercolor %s - %s\n", gettext("<color> "),
424N/A+ gettext("Color of all window borders."));
424N/A+ printf("-fg %s - %s\n", gettext("<color> "),
424N/A+ gettext("Foreground color for the application."));
424N/A+ printf("-foreground %s - %s\n", gettext("<color> "),
424N/A+ gettext("Foreground color for the application."));
424N/A+ printf("-bg %s - %s\n", gettext("<color> "),
424N/A+ gettext("Background color for the application."));
424N/A+ printf("-background %s - %s\n", gettext("<color> "),
424N/A+ gettext("Background color for the application."));
424N/A+ printf("-display %s - %s\n", gettext("<display name> "),
424N/A+ gettext("Specify a display that is not the default"));
424N/A+ printf("-fn %s - %s\n", gettext("<font> "),
424N/A+ gettext("Font to be used for button and label text."));
424N/A+ printf("-font %s - %s\n", gettext("<font> "),
424N/A+ gettext("Font to be used for button and label text."));
424N/A+ printf("-name %s - %s\n", gettext("<name> "),
424N/A+ gettext("Change the name used for retrieving resources."));
424N/A+ printf("-title %s - %s\n", gettext("<name> "),
424N/A+ gettext("Change the name without affecting resources."));
424N/A+ printf("-xrm %s - %s\n", gettext("<resource> "),
424N/A+ gettext("Specifies a resource on the command line."));
424N/A /* Function Name: AdjustDefResources
1068N/A@@ -31,7 +31,8 @@ from the X Consortium.
1068N/A@@ -171,7 +172,7 @@ Man(void)
424N/A manual = (Manual *) XtRealloc ( (char *) manual,
424N/A (sizeof(Manual) * num_alloced));
424N/A- PrintError("Could not allocate memory for manual sections.");
424N/A+ PrintError(gettext("Could not allocate memory for manual sections."));
424N/A InitManual( manual + sect, list->label );
424N/A manual[sect].flags = list->flags;
1068N/A@@ -198,10 +199,10 @@ Man(void)
424N/A- PrintError("No manual pages found.");
424N/A+ PrintError(gettext("No manual pages found."));
424N/A manual = (Manual *) XtRealloc( (char *) manual, (sizeof(Manual) * sect));
424N/A- PrintError("Could not allocate memory for manual sections.");
424N/A+ PrintError(gettext("Could not allocate memory for manual sections."));
424N/A return(sect); /* return the number of man sections. */
1068N/A@@ -223,7 +224,7 @@ SortList(SectionList ** list)
424N/A SectionList *head, *last, *inner, *old;
424N/A- PrintError("No manual sections to read, exiting.");
424N/A+ PrintError(gettext("No manual sections to read, exiting."));
1068N/A@@ -426,7 +427,7 @@ ReadCurrentSection(Manual * local_manual
424N/A if((dir = opendir(path)) == NULL) {
424N/A- snprintf(error_buf, sizeof(error_buf), "Can't open directory %s", path);
424N/A+ snprintf(error_buf, sizeof(error_buf), gettext("Can't open directory %s"), path);
424N/A PopupWarning(NULL, error_buf);
1068N/A@@ -512,7 +513,7 @@ ReadCurrentSection(Manual * local_manual
424N/A local_manual->entries_less_paths[nentries] =
424N/A rindex(local_manual->entries[nentries], '/');
424N/A if ( local_manual->entries_less_paths[nentries] == NULL )
424N/A- PrintError("Internal error while cataloging manual pages.");
424N/A+ PrintError(gettext("Internal error while cataloging manual pages."));
1068N/A@@ -540,7 +541,7 @@ SortAndRemove(Manual *man, int number)
424N/A- printf("sorting section %d - %s\n", i, man->blabel);
424N/A+ printf(gettext("sorting section %d - %s\n"), i, man->blabel);
424N/A s1 = (char **)malloc(man->nentries * sizeof(char *));
1068N/A@@ -571,14 +572,14 @@ SortAndRemove(Manual *man, int number)
424N/A l2 = man->entries_less_paths[j++];
424N/A- PrintError("Internal error while removing duplicate manual pages.");
424N/A+ PrintError(gettext("Internal error while removing duplicate manual pages."));
424N/A l2 = man->entries_less_paths[j++];
424N/A- PrintError("Internal error while removing duplicate manual pages."
424N/A+ PrintError(gettext("Internal error while removing duplicate manual pages."
1068N/A@@ -980,7 +981,7 @@ DumpManual(int number)
424N/A for ( i = 0; i < number; i++) {
424N/A- printf("label: %s\n", manual[i].blabel);
424N/A+ printf("gettext(label: %s\n"), manual[i].blabel);
424N/A for (j = 0; j < manual[i].nentries; j++)
424N/A printf("%s\n", manual[i].entries[j]);
1068N/A@@ -41,6 +41,8 @@ from the X Consortium.
1068N/A@@ -98,7 +100,7 @@ PopupWarning(ManpageGlobals * man_global
424N/A- snprintf( buffer, sizeof(buffer), "Xman Warning: %s", string);
424N/A+ snprintf( buffer, sizeof(buffer), gettext("Xman Warning: %s"), string);
1068N/A@@ -140,7 +142,7 @@ PopupWarning(ManpageGlobals * man_global
424N/A PrintError(char * string)
424N/A- fprintf(stderr,"Xman Error: %s\n",string);
424N/A+ fprintf(stderr,gettext("Xman Error: %s\n"),string);
1068N/A@@ -202,7 +204,7 @@ FindManualFile(ManpageGlobals * man_glob
424N/A temp = CreateManpageName(entry, 0, 0);
424N/A snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
424N/A- "The current manual page is: %s.", temp);
424N/A+ gettext("The current manual page is: %s."), temp);
424N/A ParseEntry(entry, path, section, page);
1068N/A@@ -328,14 +330,14 @@ Uncompress(ManpageGlobals * man_globals,
424N/A else if ((file = fopen(tmp_file, "r")) == NULL) {
424N/A- sprintf(error_buf, "Something went wrong in retrieving the %s",
424N/A- "uncompressed manual page try cleaning up /tmp.");
424N/A+ sprintf(error_buf, gettext("Something went wrong in retrieving the %s"),
424N/A+ gettext("uncompressed manual page try cleaning up /tmp."));
424N/A PopupWarning(man_globals, error_buf);
424N/A if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
424N/A- sprintf(error_buf, "Something went wrong in retrieving the %s",
424N/A- "uncompressed manual page try cleaning up /tmp.");
424N/A+ sprintf(error_buf, gettext("Something went wrong in retrieving the %s"),
424N/A+ gettext("uncompressed manual page try cleaning up /tmp."));
424N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -373,7 +375,7 @@ UncompressNamed(ManpageGlobals * man_glo
424N/A if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
424N/A snprintf(error_buf, sizeof(error_buf),
424N/A- "Error while stating file %s, errno = %d", filename, errno);
424N/A+ gettext("Error while stating file %s, errno = %d"), filename, errno);
424N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -390,7 +392,7 @@ UncompressNamed(ManpageGlobals * man_glo
424N/A- PopupWarning(man_globals, "Error creating a temp file");
424N/A+ PopupWarning(man_globals, gettext("Error creating a temp file"));
424N/A *output_fd = fdopen(fd, "r");
1068N/A@@ -420,7 +422,7 @@ UncompressNamed(ManpageGlobals * man_glo
424N/A snprintf(error_buf, sizeof(error_buf),
424N/A- "Error while uncompressing, command was: %s", cmdbuf);
424N/A+ gettext("Error while uncompressing, command was: %s"), cmdbuf);
424N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -516,7 +518,7 @@ Format(ManpageGlobals * man_globals, cha
424N/A /* We Really could not find it, this should never happen, yea right. */
424N/A snprintf(error_buf, sizeof(error_buf),
424N/A- "Could not open manual page, %s", entry);
424N/A+ gettext("Could not open manual page, %s"), entry);
424N/A PopupWarning(man_globals, error_buf);
424N/A XtPopdown( XtParent(man_globals->standby) );
1068N/A@@ -573,6 +575,19 @@ Format(ManpageGlobals * man_globals, cha
424N/A ParseEntry(entry, path, sect, NULL);
424N/A+#ifdef SFORMAT /* Handle Solaris SGML pages */
424N/A+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s > %s %s",
424N/A+ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
424N/A+ snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s | %s %s >> %s %s",
424N/A+ path, SFORMAT, filename, TBL, FORMAT, man_globals->tempfile,
424N/A snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s > %s %s", path, TBL,
1068N/A@@ -580,10 +595,13 @@ Format(ManpageGlobals * man_globals, cha
424N/A snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s >> %s %s", path, TBL,
424N/A /* Handle more flexible way of specifying the formatting pipeline */
424N/A if (! ConstructCommand(cmdbuf, path, filename, man_globals->tempfile)) {
424N/A- sprintf(error_buf, "Constructed command was too long!");
424N/A+ sprintf(error_buf, gettext("Constructed command was too long!"));
424N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -592,15 +610,15 @@ Format(ManpageGlobals * man_globals, cha
424N/A if(system(cmdbuf) != 0) { /* execute search. */
424N/A snprintf(error_buf, sizeof(error_buf),
424N/A- "Something went wrong trying to run the command: %s", cmdbuf);
424N/A+ gettext("Something went wrong trying to run the command: %s"), cmdbuf);
424N/A PopupWarning(man_globals, error_buf);
424N/A if ((file = fopen(man_globals->tempfile,"r")) == NULL) {
424N/A- sprintf(error_buf, "Something went wrong in retrieving the %s",
424N/A- "temp file, try cleaning up /tmp");
424N/A+ sprintf(error_buf, gettext("Something went wrong in retrieving the %s"),
424N/A+ gettext("temp file, try cleaning up /tmp"));
424N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -1071,7 +1089,7 @@ AddCursor(Widget w, Cursor cursor)
424N/A if (!XtIsRealized(w)) {
424N/A- PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
424N/A+ PopupWarning(NULL, gettext("Widget is not realized, no cursor added.\n"));
1068N/A@@ -1182,14 +1200,14 @@ ParseEntry(char *entry, char *path, char
424N/A- PrintError("index failure in ParseEntry.");
424N/A+ PrintError(gettext("index failure in ParseEntry."));
424N/A- PrintError("index failure in ParseEntry.");
424N/A+ PrintError(gettext("index failure in ParseEntry."));
424N/A #if defined(SFORMAT) && defined(SMAN)
424N/A /* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
1068N/A@@ -1236,12 +1254,12 @@ GetGlobals(Widget w)
424N/A XtAppError(XtWidgetToApplicationContext(w),
424N/A- "Xman: Could not locate widget in tree, exiting");
424N/A+ gettext("Xman: Could not locate widget in tree, exiting"));
424N/A if (XFindContext(XtDisplay(w), XtWindow(w),
424N/A manglobals_context, &data) != XCSUCCESS)
424N/A XtAppError(XtWidgetToApplicationContext(w),
424N/A- "Xman: Could not find global data, exiting");
424N/A+ gettext("Xman: Could not find global data, exiting"));
424N/A return( (ManpageGlobals *) data);
1068N/A@@ -1263,7 +1281,7 @@ SaveGlobals(Widget w, ManpageGlobals * g
424N/A if (XSaveContext(XtDisplay(w), XtWindow(w), manglobals_context,
424N/A (caddr_t) globals) != XCSUCCESS)
424N/A XtAppError(XtWidgetToApplicationContext(w),
424N/A- "Xman: Could not save global data, are you out of memory?");
424N/A+ gettext("Xman: Could not save global data, are you out of memory?"));
424N/A /* Function Name: RemoveGlobals
1068N/A@@ -1281,5 +1299,5 @@ RemoveGlobals(Widget w)
424N/A if (XDeleteContext(XtDisplay(w), XtWindow(w),
424N/A manglobals_context) != XCSUCCESS)
424N/A XtAppError(XtWidgetToApplicationContext(w),
424N/A- "Xman: Could not remove global data?");
424N/A+ gettext("Xman: Could not remove global data?"));
1068N/A@@ -30,7 +30,8 @@ from the X Consortium.
1068N/A@@ -70,7 +71,7 @@ MakeSearchWidget(ManpageGlobals * man_gl
424N/A if ( (text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
424N/A- PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
424N/A+ PopupWarning(NULL, gettext("Could not find text widget in MakeSearchWidget."));
424N/A XtSetKeyboardFocus(dialog, text);
1068N/A@@ -86,7 +87,7 @@ MakeSearchWidget(ManpageGlobals * man_gl
424N/A if ( ((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
424N/A ((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL) )
424N/A- "Could not find manual search widget in MakeSearchWidget.");
424N/A+ gettext("Could not find manual search widget in MakeSearchWidget."));
424N/A static char * half_size[] = {
424N/A MANUALSEARCH, APROPOSSEARCH, NULL
1068N/A@@ -121,7 +122,7 @@ ManpageGlobals * man_globals)
424N/A return(XawDialogGetValueString(dialog));
424N/A PopupWarning(man_globals,
424N/A- "Could not get the search string, no search will be preformed.");
424N/A+ gettext("Could not get the search string, no search will be preformed."));
1068N/A@@ -165,16 +166,16 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A /* If the string is empty or starts with a space then do not search */
424N/A if ( streq(search_string,"") ) {
424N/A- PopupWarning(man_globals, "Search string is empty.");
424N/A+ PopupWarning(man_globals, gettext("Search string is empty."));
424N/A if (strlen(search_string) >= BUFSIZ) {
424N/A- PopupWarning(man_globals, "Search string too long.");
424N/A+ PopupWarning(man_globals, gettext("Search string too long."));
424N/A if (search_string[0] == ' ') {
424N/A- PopupWarning(man_globals, "First character cannot be a space.");
424N/A+ PopupWarning(man_globals, gettext("First character cannot be a space."));
1068N/A@@ -210,7 +211,7 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A snprintf(label, sizeof(label),
424N/A- "Results of apropos search on: %s", search_string);
424N/A+ gettext("Results of apropos search on: %s"), search_string);
424N/A #ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
424N/A snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
1068N/A@@ -219,7 +220,7 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A if(system(cmdbuf) != 0) { /* execute search. */
424N/A- snprintf(error_buf, sizeof(error_buf), "Something went wrong trying to run %s\n",cmdbuf);
424N/A+ snprintf(error_buf, sizeof(error_buf), gettext("Something went wrong trying to run %s\n"),cmdbuf);
424N/A PopupWarning(man_globals, error_buf);
1068N/A@@ -228,7 +229,7 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A if((file = fopen(mantmp,"r")) == NULL)
424N/A- PrintError("lost temp file? out of temp space?");
424N/A+ PrintError(gettext("lost temp file? out of temp space?"));
424N/A * Since we keep the FD open we can unlink the file safely, this
1068N/A@@ -237,7 +238,7 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A- snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate", search_string);
424N/A+ snprintf(string_buf, sizeof(string_buf), gettext("%s: nothing appropriate"), search_string);
424N/A * Check first LOOKLINES lines for "nothing appropriate".
1068N/A@@ -276,7 +277,7 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A else { /* MANUAL SEACH */
424N/A file = DoManualSearch(man_globals, search_string);
424N/A- snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
424N/A+ snprintf(string_buf, sizeof(string_buf), gettext("No manual entry for %s."), search_string);
424N/A ChangeLabel(man_globals->label, string_buf);
424N/A if (man_globals->label == NULL)
424N/A PopupWarning(man_globals, string_buf);
1068N/A@@ -290,7 +291,7 @@ DoSearch(ManpageGlobals * man_globals, i
424N/A dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
424N/A- PopupWarning(man_globals, "Could not clear the search string.");
424N/A+ PopupWarning(man_globals, gettext("Could not clear the search string."));
424N/A XtSetArg(arglist[0], XtNvalue, "");
424N/A XtSetValues(dialog, arglist, (Cardinal) 1);
1068N/A@@ -377,7 +378,7 @@ int number)
424N/A head = rindex(first[ global_number + check ], '/');
424N/A- PrintError("index failure in BEntrySearch");
424N/A+ PrintError(gettext("index failure in BEntrySearch"));
424N/A tail = rindex(head, '.');
1068N/A@@ -34,6 +34,8 @@ from the X Consortium.
424N/A typedef struct sectionName {
1068N/A@@ -100,21 +102,74 @@ static SectionNameRec SectionNames[] = {
424N/A {"(1m) Maintenance Commands", "1m"},
424N/A {"(1s) SunOS Specific Commands", "1s"},
424N/A {"(2) System Calls", "2"},
424N/A- {"(3) C Library Functions", "3"},
424N/A+ {"(3) Introduction to Library Functions", "3"},
424N/A+ {"(3adm) General Administrative Library Functions", "3adm"},
424N/A+ {"(3aio) Asynchronous I/O Library Functions", "3aio"},
424N/A+ {"(3bsm) Security and Auditing Library Functions", "3bsm"},
424N/A {"(3c) C Library Functions", "3c"},
424N/A- {"(3e) ELF Library Functions", "3e"},
424N/A+ {"(3cfgadm) Configuration Administration Library Functions", "3cfgadm"},
424N/A+ {"(3crypt) Encryption and Decryption Library", "3crypt"},
424N/A+ {"(3curses) Curses Library Functions", "3curses"},
424N/A+ {"(3devid) Device ID Library Functions", "3devid"},
424N/A+ {"(3devinfo) Device Information Library Functions", "3devinfo"},
424N/A+ {"(3dl) Dynamic Linking Library Functions", "3dl"},
424N/A+ {"(3dmi) DMI Library Functions", "3dmi"},
424N/A+ {"(3door) Door Library Functions", "3door"},
424N/A+ {"(3e) C Library Functions", "3e"},
424N/A+ {"(3elf) ELF Library Functions", "3elf"},
424N/A+ {"(3ext) Extended Library Functions", "3ext"},
424N/A {"(3g) C Library Functions", "3g"},
424N/A- {"(3i) Wid Character Functions", "3i"},
424N/A+ {"(3gen) String Pattern-Matching Library Functions", "3gen"},
424N/A+ {"(3head) Headers", "3head"},
424N/A+ {"(3i) Wide Character Functions", "3i"},
424N/A {"(3k) Kernel VM Library Functions", "3k"},
424N/A- {"(3m) Mathematical Library", "3m"},
424N/A+ {"(3krb) Kerberos Library Functions", "3krb"},
424N/A+ {"(3kstat) Kernel Statistics Library Functions", "3kstat"},
424N/A+ {"(3kvm) Kernel VM Library Functions", "3kvm"},
424N/A+ {"(3layout) Layout Services Library Functions", "3layout"},
424N/A+ {"(3ldap) LDAP Library Functions", "3ldap"},
424N/A+ {"(3lib) Interface Libraries", "3lib"},
424N/A+ {"(3libucb)
SunOS/BSD Compatibility Interface Libraries", "3libucb"},
424N/A+ {"(3m) Mathematical Library Functions", "3m"},
424N/A+ {"(3mail) User Mailbox Library Functions", "3mail"},
424N/A+ {"(3malloc) Memory Allocation Library Functions", "3malloc"},
424N/A+ {"(3mp) Integer Mathematical Library Functions", "3mp"},
424N/A {"(3n) Network Functions", "3n"},
424N/A- {"(3r) RPC Services Library", "3r"},
424N/A+ {"(3nsl) Networking Services Library Functions", "3nsl"},
424N/A+ {"(3pam) PAM Library Functions", "3pam"},
424N/A+ {"(3plot) Graphics Interface Library Functions", "3plot"},
424N/A+ {"(3proc) Process Control Library Functions", "3proc"},
424N/A+ {"(3r) Realtime Library", "3r"},
424N/A+ {"(3rac) Remote Asynchronous Calls Library Functions", "3rac"},
424N/A+ {"(3resolv) Resolver Library Functions", "3resolv"},
424N/A+ {"(3rpc) RPC Library Functions", "3rpc"},
424N/A+ {"(3rt) Realtime Library Functions", "3rt"},
424N/A {"(3s) Standard I/O Functions", "3s"},
424N/A+ {"(3sched) LWP Scheduling Library Functions", "3sched"},
424N/A+ {"(3sec) File Access Control Library Functions", "3sec"},
424N/A+ {"(3secdb) Security Attributes Database Library Functions", "3secdb"},
424N/A+ {"(3snmp) SNMP Library Functions", "3snmp"},
424N/A+ {"(3socket) Sockets Library Functions", "3socket"},
424N/A #if OSMINORVERSION == 5
424N/A- {"(3t) Threads Library", "3t"},
424N/A+ {"(3t) Threads Library Functions", "3t"},
424N/A+ {"(3thr) Threads Library Functions", "3thr"},
424N/A+ {"(3tnf) TNF Library Functions", "3tnf"},
424N/A+ {"(3volmgt) Volume Management Library Functions", "3volmgt"},
424N/A {"(3x) Miscellaneous Library Functions", "3x"},
424N/A+ {"(3xcurses)
X/Open Curses Library Functions", "3xcurses"},
424N/A+ {"(3xfn) XFN Interface Library Functions", "3xfn"},
424N/A+ {"(3xn)
X/Open Networking Services Library Functions", "3xn"},
424N/A+ {"(3xnet)
X/Open Networking Services Library Functions", "3xnet"},
424N/A+ {"(3X11) X Window System: Xlib Functions", "3X11"},
424N/A+ {"(3Xext) X Window System: Protocol Extension Functions", "3Xext"},
424N/A+ {"(3Xi) X Window System: Input Extension Functions", "3Xi"},
424N/A+ {"(3Xmu) X Window System: Miscellaneous Utility Functions", "3Xmu"},
424N/A+ {"(3Xp) X Window System: Print Extension Functions", "3Xp"},
424N/A+ {"(3Xt) X Window System: Toolkit Intrinsics Functions", "3Xt"},
424N/A {"(4) File Formats", "4"},
424N/A {"(4b) Misc. Reference Manual Pages", "4b"},
424N/A {"(5) Environments, Tables, and TROFF Macros", "5"},
1068N/A@@ -133,6 +188,7 @@ static SectionNameRec SectionNames[] = {
424N/A {"(9s) DDI and DKI Data Structures", "9s"},
1068N/A@@ -188,10 +244,10 @@ char * path)
424N/A for (i=0; i < numSections; i++) {
424N/A sprintf(file, "%s%s", SEARCHDIR, SectionNames[i].suffix);
424N/A- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
424N/A+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
424N/A sprintf(file, "%s%s", SEARCHOTHER, SectionNames[i].suffix);
424N/A- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
424N/A+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
1068N/A@@ -252,7 +308,7 @@ char *path)
424N/A int flags = (int) *p++;
424N/A sprintf(file, "%s%s", SEARCHDIR, *p++);
424N/A- AddNewSection(list, path, file, message, flags);
424N/A+ AddNewSection(list, path, file, gettext(message), flags);