8N/A * Created: October 22, 1987
919N/A saved_argv = (char **)XtMalloc(argc * sizeof(char *));
919N/A bcopy(argv, saved_argv, argc * sizeof(char *));
919N/A wm_delete_window = XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW",
8N/A+ textdomain("xman");
8N/A+ if((domaindir = getenv("TEXTDOMAINDIR")) == NULL) {
606N/A+ bindtextdomain("xman", domaindir);
606N/A manglobals_context = XStringToContext(MANNAME);
606N/A XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
606N/A- PrintError("Failed to get the directory font.");
606N/A+ PrintError(gettext("Failed to get the directory font."));
606N/A- printf("debugging mode\n");
606N/A+ printf(gettext("debugging mode\n"));
606N/A if ( (sections = Man()) == 0 )
606N/A- PrintError("There are no manual sections to display, check your MANPATH.");
606N/A+ PrintError(gettext("There are no manual sections to display, check your MANPATH."));
98N/A /* Function Name: ArgError
606N/A- * Description: Prints error message about unknow arguments.
98N/A+ * Description: Prints error message about unknown arguments.
747N/A * Arguments: argc, argv - args not understood.
8N/A- static char **syntax, *syntax_def[] = {
493N/A- "-help", "Print this message",
493N/A- "-helpfile <filename>", "Specifies the helpfile to use.",
380N/A- "-bothshown", "Show both the directory and manpage at once.",
493N/A- "-notopbox", "Starts with manpage rather than topbox.",
493N/A- "-geometry <geom>", "Specifies the geometry of the top box.",
493N/A- "=<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(gettext("This argument is unknown to Xman: %s\n"), argv[i]);
- (void) printf("\nKnown arguments are:\n");
+ (void) printf(gettext("\nKnown arguments are:\n"));
- while ( *syntax != NULL ) {
- printf("%-30s - %s\n", syntax[0], syntax[1]);
+ 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
---
man.c Fri Aug 10 07:14:12 2007
+++
man.c Mon Apr 14 14:11:10 2008
#include "
vendor.h" /* vendor-specific defines and data */
manual = (Manual *) XtRealloc ( (char *) manual,
(sizeof(Manual) * num_alloced));
- PrintError("Could not allocate memory for manual sections.");
+ PrintError(gettext("Could not allocate memory for manual sections."));
InitManual( manual + sect, list->label );
manual[sect].flags = list->flags;
- 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. */
SectionList *head, *last, *inner, *old;
- PrintError("No manual sections to read, exiting.");
+ PrintError(gettext("No manual sections to read, exiting."));
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);
local_manual->entries_less_paths[nentries] =
rindex(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."));
- 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 *));
l2 = man->entries_less_paths[j++];
- PrintError("Internal error while removing duplicate manual pages.");
+ PrintError(gettext("Internal error while removing duplicate manual pages."));
l2 = man->entries_less_paths[j++];
- PrintError("Internal error while removing duplicate manual pages."
+ PrintError(gettext("Internal error while removing duplicate manual pages."
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]);
---
help.c Fri Aug 10 07:14:12 2007
+++
help.c Fri Aug 10 07:14:12 2007
* Created: January 19, 1988
extern Atom wm_delete_window; /* in
main.c */
- ChangeLabel(man_globals->label, "Xman Help");
+ ChangeLabel(man_globals->label, gettext("Xman Help"));
XtRealizeWidget( help_widget );
PopupWarning(man_globals,
- "Could not open help file, NO HELP WILL BE AVALIABLE.");
+ gettext("Could not open help file, NO HELP WILL BE AVALIABLE."));
#ifdef INCLUDE_XPRINT_SUPPORT
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);
/* make sure the formatted man page is fully accessible by the world */
if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
- "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);
- sprintf(error_buf, "Error while executing the command '%s'.\n",
+ sprintf(error_buf, gettext("Error while executing the command '%s'.\n"),
PopupWarning( man_globals, error_buf);
sprintf(error_buf,"%s %s", "Xman - SaveFormattedPagee:",
- "Unknown argument must be either 'Save' or 'Cancel'.");
+ gettext("Unknown argument must be either 'Save' or 'Cancel'."));
PopupWarning(man_globals, error_buf);
- 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);
man_globals->dir_shown = TRUE;
- sprintf(error_buf,"%s %s", "Xman - GotoPage: Unknown argument must be",
- "either Manpage or Directory.");
+ sprintf(error_buf,"%s %s", gettext("Xman - GotoPage: Unknown argument must be"),
+ gettext("either Manpage or Directory."));
XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
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);
- 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);
- 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);
* Created: October 27, 1987
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, Boolean page);
static Widget * ConvertNamesToWidgets(Widget parent, char ** names);
extern Atom wm_delete_window; /* in
main.c */
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);
XtSetValues(mytop, arglist, num_args);
+ pane = XtCreateManagedWidget("Manpage_Vpane", panedWidgetClass, mytop, NULL,
pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
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);
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);
- strcpy(man_globals->manpage_title, "Xman Help");
+ strcpy(man_globals->manpage_title, gettext("Xman Help"));
if (man_globals->both_shown) {
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); num_args++;
sprintf(entry_name, "section%d", i);
+CreateMoreMenu(man_globals, parent)
+ManpageGlobals * man_globals;
+ 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++;
+ sprintf(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.
name = manual[section].blabel; /* Set the section name */
- sprintf(label_name,"Directory of: %s",name);
+ snprintf(label_name, sizeof(label_name), gettext("Directory of: %s"),name);
man_globals->section_name[section] = StrAlloc(label_name);
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);
- sprintf(error_buf, "Could not find widget named '%s'", *names);
+ snprintf(error_buf, sizeof(error_buf),
+ gettext("Could not find widget named '%s'"), *names);
---
defs.h Fri Aug 10 07:14:12 2007
+++
defs.h Tue Apr 15 15:46:28 2008
#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 */
---
misc.c Fri Aug 10 07:14:12 2007
+++
misc.c Tue Apr 15 16:24:49 2008
- snprintf( buffer, sizeof(buffer), "Xman Warning: %s", string);
+ snprintf( buffer, sizeof(buffer), gettext("Xman Warning: %s"), string);
PrintError(char * string)
- fprintf(stderr,"Xman Error: %s\n",string);
+ fprintf(stderr,gettext("Xman Error: %s\n"),string);
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);
else if ((file = fopen(tmp_file, "r")) == NULL) {
- sprintf(error_buf, "Something went wrong in retrieving the %s",
- "uncompressed manual page try cleaning up /tmp.");
+ sprintf(error_buf, gettext("Something went wrong in retrieving the %s"),
+ gettext("uncompressed manual page try cleaning up /tmp."));
PopupWarning(man_globals, error_buf);
if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
- sprintf(error_buf, "Something went wrong in retrieving the %s",
- "uncompressed manual page try cleaning up /tmp.");
+ sprintf(error_buf, gettext("Something went wrong in retrieving the %s"),
+ gettext("uncompressed manual page try cleaning up /tmp."));
PopupWarning(man_globals, error_buf);
if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
snprintf(error_buf, sizeof(error_buf),
- "Error while stating file %s, errno = %d", filename, errno);
+ gettext("Error while stating file %s, errno = %d"), filename, errno);
PopupWarning(man_globals, error_buf);
- PopupWarning(man_globals, "Error creating a temp file");
+ PopupWarning(man_globals, gettext("Error creating a temp file"));
*output_fd = fdopen(fd, "r");
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);
/* 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) );
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 %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");
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)) {
- sprintf(error_buf, "Constructed command was too long!");
+ sprintf(error_buf, gettext("Constructed command was too long!"));
PopupWarning(man_globals, error_buf);
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);
if ((file = fopen(man_globals->tempfile,"r")) == NULL) {
- sprintf(error_buf, "Something went wrong in retrieving the %s",
- "temp file, try cleaning up /tmp");
+ sprintf(error_buf, gettext("Something went wrong in retrieving the %s"),
+ gettext("temp file, try cleaning up /tmp"));
PopupWarning(man_globals, error_buf);
- PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
+ PopupWarning(NULL, gettext("Widget is not realized, no cursor added.\n"));
- PrintError("index failure in ParseEntry.");
+ PrintError(gettext("index failure in ParseEntry."));
- PrintError("index failure in ParseEntry.");
+ PrintError(gettext("index failure in ParseEntry."));
#if defined(SFORMAT) && defined(SMAN)
/* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
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);
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
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?"));
if ( (text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
- PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
+ PopupWarning(NULL, gettext("Could not find text widget in MakeSearchWidget."));
XtSetKeyboardFocus(dialog, text);
if ( ((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL) )
- "Could not find manual search widget in MakeSearchWidget.");
+ gettext("Could not find manual search widget in MakeSearchWidget."));
static char * half_size[] = {
MANUALSEARCH, APROPOSSEARCH, NULL
return(XawDialogGetValueString(dialog));
PopupWarning(man_globals,
- "Could not get the search string, no search will be preformed.");
+ gettext("Could not get the search string, no search will be preformed."));
/* If the string is empty or starts with a space then do not search */
if ( streq(search_string,"") ) {
- PopupWarning(man_globals, "Search string is empty.");
+ PopupWarning(man_globals, gettext("Search string is empty."));
if (strlen(search_string) >= BUFSIZ) {
- PopupWarning(man_globals, "Search string too long.");
+ PopupWarning(man_globals, gettext("Search string too long."));
if (search_string[0] == ' ') {
- PopupWarning(man_globals, "First character cannot be a space.");
+ PopupWarning(man_globals, gettext("First character cannot be a space."));
snprintf(label, sizeof(label),
- "Results of apropos search on: %s", search_string);
+ gettext("Results of apropos search on: %s"), search_string);
#ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
if(system(cmdbuf) != 0) { /* execute search. */
- snprintf(error_buf, sizeof(error_buf), "Something went wrong trying to run %s\n",cmdbuf);
+ snprintf(error_buf, sizeof(error_buf), gettext("Something went wrong trying to run %s\n"),cmdbuf);
PopupWarning(man_globals, error_buf);
if((file = fopen(mantmp,"r")) == NULL)
- PrintError("lost temp file? out of temp space?");
+ PrintError(gettext("lost temp file? out of temp space?"));
* Since we keep the FD open we can unlink the file safely, this
- snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate", search_string);
+ snprintf(string_buf, sizeof(string_buf), gettext("%s: nothing appropriate"), search_string);
* Check first LOOKLINES lines for "nothing appropriate".
else { /* MANUAL SEACH */
file = DoManualSearch(man_globals, search_string);
- snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
+ snprintf(string_buf, sizeof(string_buf), gettext("No manual entry for %s."), search_string);
ChangeLabel(man_globals->label, string_buf);
if (man_globals->label == NULL)
PopupWarning(man_globals, string_buf);
dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
- PopupWarning(man_globals, "Could not clear the search string.");
+ PopupWarning(man_globals, gettext("Could not clear the search string."));
XtSetArg(arglist[0], XtNvalue, "");
XtSetValues(dialog, arglist, (Cardinal) 1);
head = rindex(first[ global_number + check ], '/');
- PrintError("index failure in BEntrySearch");
+ PrintError(gettext("index failure in BEntrySearch"));
tail = rindex(head, '.');
typedef struct sectionName {
{"(1m) Maintenance Commands", "1m"},
{"(1s) SunOS Specific Commands", "1s"},
{"(2) System Calls", "2"},
- {"(3) C Library Functions", "3"},
+ {"(3) Introduction to Library Functions", "3"},
+ {"(3adm) General Administrative Library Functions", "3adm"},
+ {"(3aio) Asynchronous I/O Library Functions", "3aio"},
{"(3b)
SunOS/BSD Compatibility Functions", "3b"},
+ {"(3bsm) Security and Auditing Library Functions", "3bsm"},
{"(3c) C Library Functions", "3c"},
- {"(3e) ELF Library Functions", "3e"},
+ {"(3cfgadm) Configuration Administration Library Functions", "3cfgadm"},
+ {"(3crypt) Encryption and Decryption Library", "3crypt"},
+ {"(3curses) Curses Library Functions", "3curses"},
+ {"(3devid) Device ID Library Functions", "3devid"},
+ {"(3devinfo) Device Information Library Functions", "3devinfo"},
+ {"(3dl) Dynamic Linking Library Functions", "3dl"},
+ {"(3dmi) DMI Library Functions", "3dmi"},
+ {"(3door) Door Library Functions", "3door"},
+ {"(3e) C Library Functions", "3e"},
+ {"(3elf) ELF Library Functions", "3elf"},
+ {"(3ext) Extended Library Functions", "3ext"},
{"(3g) C Library Functions", "3g"},
- {"(3i) Wid Character Functions", "3i"},
+ {"(3gen) String Pattern-Matching Library Functions", "3gen"},
+ {"(3head) Headers", "3head"},
+ {"(3i) Wide Character Functions", "3i"},
{"(3k) Kernel VM Library Functions", "3k"},
- {"(3m) Mathematical Library", "3m"},
+ {"(3krb) Kerberos Library Functions", "3krb"},
+ {"(3kstat) Kernel Statistics Library Functions", "3kstat"},
+ {"(3kvm) Kernel VM Library Functions", "3kvm"},
+ {"(3layout) Layout Services Library Functions", "3layout"},
+ {"(3ldap) LDAP Library Functions", "3ldap"},
+ {"(3lib) Interface Libraries", "3lib"},
+ {"(3libucb)
SunOS/BSD Compatibility Interface Libraries", "3libucb"},
+ {"(3m) Mathematical Library Functions", "3m"},
+ {"(3mail) User Mailbox Library Functions", "3mail"},
+ {"(3malloc) Memory Allocation Library Functions", "3malloc"},
+ {"(3mp) Integer Mathematical Library Functions", "3mp"},
{"(3n) Network Functions", "3n"},
- {"(3r) RPC Services Library", "3r"},
+ {"(3nsl) Networking Services Library Functions", "3nsl"},
+ {"(3pam) PAM Library Functions", "3pam"},
+ {"(3plot) Graphics Interface Library Functions", "3plot"},
+ {"(3proc) Process Control Library Functions", "3proc"},
+ {"(3r) Realtime Library", "3r"},
+ {"(3rac) Remote Asynchronous Calls Library Functions", "3rac"},
+ {"(3resolv) Resolver Library Functions", "3resolv"},
+ {"(3rpc) RPC Library Functions", "3rpc"},
+ {"(3rt) Realtime Library Functions", "3rt"},
{"(3s) Standard I/O Functions", "3s"},
+ {"(3sched) LWP Scheduling Library Functions", "3sched"},
+ {"(3sec) File Access Control Library Functions", "3sec"},
+ {"(3secdb) Security Attributes Database Library Functions", "3secdb"},
+ {"(3snmp) SNMP Library Functions", "3snmp"},
+ {"(3socket) Sockets Library Functions", "3socket"},
- {"(3t) Threads Library", "3t"},
+ {"(3t) Threads Library Functions", "3t"},
+ {"(3thr) Threads Library Functions", "3thr"},
+ {"(3tnf) TNF Library Functions", "3tnf"},
+ {"(3ucb)
SunOS/BSD Compatibility Library Functions", "3ucb"},
+ {"(3volmgt) Volume Management Library Functions", "3volmgt"},
{"(3x) Miscellaneous Library Functions", "3x"},
+ {"(3xc)
X/Open Curses Library Functions", "3xc"},
+ {"(3xcurses)
X/Open Curses Library Functions", "3xcurses"},
+ {"(3xfn) XFN Interface Library Functions", "3xfn"},
+ {"(3xn)
X/Open Networking Services Library Functions", "3xn"},
+ {"(3xnet)
X/Open Networking Services Library Functions", "3xnet"},
+ {"(3X11) X Window System: Xlib Functions", "3X11"},
+ {"(3Xext) X Window System: Protocol Extension Functions", "3Xext"},
+ {"(3Xi) X Window System: Input Extension Functions", "3Xi"},
+ {"(3Xmu) X Window System: Miscellaneous Utility Functions", "3Xmu"},
+ {"(3Xp) X Window System: Print Extension Functions", "3Xp"},
+ {"(3Xt) X Window System: Toolkit Intrinsics Functions", "3Xt"},
{"(4) File Formats", "4"},
{"(4b) Misc. Reference Manual Pages", "4b"},
{"(5) Environments, Tables, and TROFF Macros", "5"},
{"(9s) DDI and DKI Data Structures", "9s"},
for (i=0; i < numSections; i++) {
sprintf(file, "%s%s", SEARCHDIR, SectionNames[i].suffix);
- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
sprintf(file, "%s%s", SEARCHOTHER, SectionNames[i].suffix);
- AddNewSection(list, path, file, SectionNames[i].name, TRUE);
+ AddNewSection(list, path, file, gettext(SectionNames[i].name), TRUE);
sprintf(file, "%s%s", SEARCHDIR, *p++);
- AddNewSection(list, path, file, message, flags);
+ AddNewSection(list, path, file, gettext(message), flags);