diff -crN ./yelp/configure.in /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/configure.in
*** ./yelp/configure.in	Tue Sep  9 03:32:19 2003
--- /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/configure.in	Thu Oct 16 16:21:32 2003
***************
*** 67,72 ****
--- 67,94 ----
  YELP_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0 bonobo-activation-2.0| sed -e 's/^/ /' -e 's/ \+$//' -e 's/ \+/ -I /g' -e 's/^ \+//'`"
  AC_SUBST(YELP_IDL_INCLUDES)
  
+ dnl ====================================
+ dnl Check for extra man locations
+ dnl ====================================
+ AC_MSG_CHECKING([whether extra man locations exists])
+ AH_TEMPLATE([YELP_EXTRA_MAN_LOCATION],
+     ["Define to 1 if there is an OS specific source file to be used for man"])
+ the_host=`uname -s`
+ case "$the_host" in
+     *AIX*)
+         AC_DEFINE(YELP_EXTRA_MAN_LOCATION)
+         # .c extension will be added automagically (see src/Makefile.am)
+         YELP_EXTRA_MAN_SOURCE=yelp-man-aix
+         yelp_extra_man=yes
+         ;;
+     *)
+         yelp_extra_man=no
+         ;;
+ esac
+ AM_CONDITIONAL(YELP_EXTRA_MAN, test x$yelp_extra_man = xyes)
+ AC_SUBST(YELP_EXTRA_MAN_SOURCE)
+ AC_MSG_RESULT($yelp_extra_man)
+ 
  dnl Check for whereis
  AC_CANONICAL_HOST
    case $host in
diff -crN ./yelp/src/Makefile.am /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/Makefile.am
*** ./yelp/src/Makefile.am	Tue Jul  8 13:05:49 2003
--- /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/Makefile.am	Thu Oct 16 16:21:40 2003
***************
*** 1,3 ****
--- 1,4 ----
+ 
  SUBDIRS = man2html info2html
  
  INCLUDES =								\
***************
*** 9,20 ****
  	-DDATADIR=\""$(datadir)"\"					\
  	-DLIBDIR=\""$(libdir)"\"					\
  	-DIMAGEDIR=\""$(datadir)/images/yelp"\"				\
- 	-DGNOMELOCALEDIR=\""$(yelplocaledir)"\"				\
  	-DLIBGNOME_MAN2HTML=\"$(LIBGNOME_MAN2HTML)\"			\
  	-DLIBGNOME_INFO2HTML=\"$(LIBGNOME_INFO2HTML)\"			\
  	-DSERVERDIR=\"$(libexecdir)\"					\
  	-DBINDIR=\""$(bindir)"\"
  
  libexec_PROGRAMS = yelp-db2html
  bin_PROGRAMS = yelp yelp-pregenerate
  
--- 10,33 ----
  	-DDATADIR=\""$(datadir)"\"					\
  	-DLIBDIR=\""$(libdir)"\"					\
  	-DIMAGEDIR=\""$(datadir)/images/yelp"\"				\
  	-DLIBGNOME_MAN2HTML=\"$(LIBGNOME_MAN2HTML)\"			\
  	-DLIBGNOME_INFO2HTML=\"$(LIBGNOME_INFO2HTML)\"			\
  	-DSERVERDIR=\"$(libexecdir)\"					\
  	-DBINDIR=\""$(bindir)"\"
  
+ 
+ if HTML_WIDGET_GTKHTML1
+ html_widget_impl=yelp-html-gtkhtml1.c
+ else
+ html_widget_impl=yelp-html-gtkhtml2.c
+ endif
+ 
+ if YELP_EXTRA_MAN
+ yelp_extra_man_source=@YELP_EXTRA_MAN_SOURCE@.c
+ else
+ yelp_extra_man_source=
+ endif
+ 
  libexec_PROGRAMS = yelp-db2html
  bin_PROGRAMS = yelp yelp-pregenerate
  
***************
*** 82,87 ****
--- 95,101 ----
  	yelp-info.c		yelp-info.h				\
  	yelp-main.c							\
  	yelp-man.c		yelp-man.h				\
+ 	$(yelp_extra_man_source)					\
  	yelp-marshal-main.c						\
  	yelp-reader.c		yelp-reader.h				\
  	yelp-section.c		yelp-section.h				\
***************
*** 92,98 ****
  	yelp-view-index.c	yelp-view-index.h			\
  	yelp-view-toc.c		yelp-view-toc.h				\
  	yelp-window.c 		yelp-window.h				\
! 	yelp-uri.c	        yelp-uri.h
  
  yelp_LDADD =								\
  	@YELP_LIBS@							\
--- 106,112 ----
  	yelp-view-index.c	yelp-view-index.h			\
  	yelp-view-toc.c		yelp-view-toc.h				\
  	yelp-window.c 		yelp-window.h				\
! 	yelp-uri.c	        yelp-uri.h				
  
  yelp_LDADD =								\
  	@YELP_LIBS@							\
diff -crN ./yelp/src/yelp-man-aix.c /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/yelp-man-aix.c
*** ./yelp/src/yelp-man-aix.c	Thu Jan  1 01:00:00 1970
--- /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/yelp-man-aix.c	Thu Jun 26 16:03:00 2003
***************
*** 0 ****
--- 1,253 ----
+ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+ /* *
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License as
+  * published by the Free Software Foundation; either version 2 of the
+  * License, or (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  * General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public
+  * License along with this program; if not, write to the
+  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+  * Boston, MA 02111-1307, USA.
+  *
+  */
+ 
+ /*
+  * On AIX, man pages are stored in HTML format in some subdirectories 
+  * of /usr/share/man/info/$LANG/a_doc_lib/.
+  * This is known as the "hypertext information database".
+  * 
+  * AIX documentation in this database is grouped into three sections only :
+  *
+  *     - command manual pages    : 
+  *           - equivalent to man sections : C, 1, 6, 7, 8
+  *           - directories : /usr/share/man/info/$LANG/a_doc_lib/cmds/...
+  *
+  *     - subroutine manual pages : 
+  *           - equivalent to man sections : L, 2, 3
+  *           - directories : /usr/share/man/info/$LANG/a_doc_lib/libs/...
+  *
+  *     - file manual pages       : 
+  *           - equivalent to man sections : F, 4, 5
+  *           - directories : /usr/share/man/info/$LANG/a_doc_lib/files/...
+  *
+  * In these directories entry file name are formatted like this :
+  *    <entry>.htm
+  *    e.g. for the 'ls' command, the file is :
+  *         /usr/share/man/info/$LANG/a_doc_lib/cmds/aixcmds3/ls.htm
+  *
+  * NOTE: To found the man entries installed on the system, the functions
+  * below parse the file /usr/share/man/whatis. To make sure this file is
+  * up-to-date on your system execute the following command : catman -w
+  */
+ 
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+ 
+ #define d(x)
+ 
+ #include <libgnome/gnome-i18n.h>
+ 
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <string.h>
+ #include <stdio.h>
+ #include <dirent.h>
+ #include <unistd.h>
+ 
+ #include "yelp-section.h"
+ #include "yelp-util.h"
+ #include "yelp-man.h"
+ 
+ static gboolean
+ yelp_man_find_html_path(const char* name, int section, char* path)
+ {
+ 	DIR *dirh;
+ 	struct dirent *dent;
+ 	char          dirpath[PATH_MAX];
+ 	char          subdirpath[8];
+ 	char          cbuf[PATH_MAX] = "\0";
+ 	gboolean      found = FALSE;
+ 	char          *lang;
+ 
+ 	/* get section directory */
+ 	switch (section) {
+ 	case 1:
+ 	case 6:
+ 	case 7:
+ 	case 8:
+ 		g_strlcpy(subdirpath, "cmds", sizeof(subdirpath));
+ 		break;
+ 	case 4:
+ 	case 5:
+ 		g_strlcpy(subdirpath, "files", sizeof(subdirpath));
+ 		break;
+ 	case 2:
+ 	case 3:
+ 		g_strlcpy(subdirpath, "libs", sizeof(subdirpath));
+ 		break;
+ 	default:
+ 		return FALSE;
+ 		break;
+ 	}
+ 
+ 	/* get language */
+ 	lang = g_strdup(g_getenv ("LANG"));
+ 
+ 	if (lang == NULL || !strcmp(lang, "")) {
+ 		lang = g_strdup ("C");
+ 	}
+ 
+ 	g_snprintf(dirpath, sizeof(dirpath), 
+ 		   "/usr/share/man/info/%s/a_doc_lib/%s", lang, subdirpath);
+ 
+ 	while (TRUE) {
+ 
+ 		/* open a_doc_lib/<section> dir */
+ 		dirh = opendir (dirpath);
+ 		if (dirh) {
+ 			readdir (dirh);                 /* skip . & .. */
+ 			readdir (dirh);
+ 			
+ 			/* search corresponding html file in <section> subdirs*/
+ 			while (dent = readdir (dirh)) {
+ 				/* try to access corresponding .htm file */
+ 				g_snprintf(cbuf, sizeof(cbuf), "%s/%s/%s.htm", 
+ 					   dirpath, dent->d_name, name);
+ 				if (access(cbuf, R_OK) < 0) { 
+ 					continue;
+ 				} else {
+ 					found = TRUE;
+ 					break;
+ 				}
+ 			}
+ 			closedir (dirh);
+ 		}
+ 		
+ 		/* if the file wasn't found using current lang, retry with C */
+ 		if (!found && strcmp(lang,"C")) {
+ 			g_strlcpy(lang, "C", 2);
+ 			g_snprintf(dirpath, sizeof(dirpath), 
+ 				   "/usr/share/man/info/%s/a_doc_lib/%s", 
+ 				   lang, subdirpath);
+ 			continue;
+ 		} else {
+ 			break;
+ 		}
+ 	}
+ 	
+ 	g_free(lang);
+ 
+ 	if (found) {
+ 		g_snprintf(path, PATH_MAX, "ghelp:%s", cbuf);
+ 	}
+ 
+ 	return found;
+ }
+ 
+ static void 
+ yelp_man_populate_tree_from_whatis (GHashTable *section_hash)
+ {
+ #define WHATIS_FILE  "/usr/share/man/whatis"
+ #define MAX_LINE_LEN 1024
+         FILE* f;
+         char line[MAX_LINE_LEN];
+         char page[MAX_LINE_LEN];
+         char section[4];
+         int  secnum, i, j;
+ 	char uribuf[PATH_MAX], titlebuf[128];
+ 	struct TreeNode *node;
+ 	YelpSection     *yelp_section;
+ 	gboolean         rc;
+ 	YelpURI         *uri;
+ 	
+         if ( access(WHATIS_FILE, F_OK | R_OK) < 0) {
+                 d(g_print("\"%s\" does not exist\n", WHATIS_FILE));
+                 return;
+         }
+ 
+         f = fopen(WHATIS_FILE, "r");
+         if (f == NULL) {
+                 d(g_print("Failed to open \"%s\"\n", WHATIS_FILE));
+                 return;
+         }
+ 
+         while( fgets(line, MAX_LINE_LEN, f) != NULL) {
+ 		
+                 /* retrieve page name */
+                 i = 0;
+                 while (i < MAX_LINE_LEN && line[i] != '(' && line[i] != '\0') {
+                         page[i] = line[i];
+                         i++;
+                 }
+                 if (i >= MAX_LINE_LEN || line[i] != '(')
+                         break;
+                 page[i] = '\0';
+ 
+                 /* retrieve section
+ 		 * section is: "name(section)^I"
+ 		 * we must check the "^I" because we can have:
+ 		 * "dlopen(), dlsym(), dlerror(), dlclose() (3X)^I"
+ 		 */
+ 
+                 i++;
+                 j = 0;
+                 while( i+1 < MAX_LINE_LEN &&
+ 		       !(line[i] == ')' && line[i+1] == '\t') &&
+ 		       line[i+1] != '\0') {
+                         section[j] = line[i];
+                         i++;
+                         j++;
+                 }
+                 if (i+1 >= MAX_LINE_LEN || line[i] != ')')
+                         break;
+                 section[j] = '\0';
+                 secnum = atoi(section);
+ 
+ 		/* add uri in tree */
+ 		g_snprintf (titlebuf, sizeof (titlebuf), "%s (%s)", 
+ 			    page, section);
+ 			
+ 		rc = yelp_man_find_html_path(page, secnum, uribuf);
+ 		if (rc == FALSE) {
+ 			g_snprintf (uribuf, sizeof (uribuf), "man:%s.%c",
+ 				    page, secnum);
+ 		}
+ 
+ 		node = g_hash_table_lookup (section_hash, section);
+ 		if (node == NULL) {
+ 			char buf[2];
+ 			buf[0] = secnum; buf[1] = 0;
+ 			
+ 			node = g_hash_table_lookup (section_hash, buf);
+ 		}
+ 			
+ 		g_assert (node != NULL);
+ 		
+ 		any_man_pages = TRUE;
+ 		
+ 		uri = yelp_uri_new (uribuf);
+ 		yelp_section = yelp_section_new (YELP_SECTION_DOCUMENT,
+ 						 titlebuf, uri);
+ 		yelp_uri_unref (uri);
+ 		
+ 		node->pages = g_list_prepend (node->pages, yelp_section);
+ 		
+ 		man_index = g_list_prepend (man_index, yelp_section);
+ 	}
+ 
+         fclose(f);
+ }
+  
+ void 
+ yelp_man_populate_tree_from_extra_locations(GHashTable *section_hash) 
+ {
+ 	yelp_man_populate_tree_from_whatis(section_hash);
+ }
+ 
diff -crN ./yelp/src/yelp-man.c /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/yelp-man.c
*** ./yelp/src/yelp-man.c	Thu Aug 22 01:03:32 2002
--- /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/yelp-man.c	Wed Nov 20 15:28:41 2002
***************
*** 1,3 ****
--- 1,4 ----
+ 
  /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  /*
   * Copyright (C) 2002 Red Hat Inc.
***************
*** 42,63 ****
  #include "yelp-util.h"
  #include "yelp-man.h"
  
! struct TreeNode {
! 	char  *name;
! 
! 	GList *tree_nodes;
! 
! 	GList *pages; /* YelpSections */
! };
! 
! struct TreeData {
! 	char            *name;
! 	struct TreeData *children;
! 	char            *section;
! };
! 
! static gboolean  any_man_pages = FALSE;
! static GList    *man_index = NULL;
  
  /* Caller must free this */
  static char *
--- 43,50 ----
  #include "yelp-util.h"
  #include "yelp-man.h"
  
! gboolean  any_man_pages = FALSE;
! GList    *man_index = NULL;
  
  /* Caller must free this */
  static char *
***************
*** 193,199 ****
  		g_free (section);
  		g_free (filename);
  	}
- 
  	closedir (dirh);
  }
  
--- 180,185 ----
***************
*** 674,679 ****
--- 660,669 ----
  		}
  	}
  
+ #ifdef YELP_EXTRA_MAN_LOCATION
+ 	yelp_man_populate_tree_from_extra_locations(section_hash);
+ #endif
+ 
  	yelp_man_cleanup_initial_tree (root);
  	
  	if (!any_man_pages) {
diff -crN ./yelp/src/yelp-man.h /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/yelp-man.h
*** ./yelp/src/yelp-man.h	Sun Mar  3 18:39:36 2002
--- /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/src/yelp-man.h	Wed Oct 30 13:42:36 2002
***************
*** 1,3 ****
--- 1,4 ----
+ 
  /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  /*
   * Copyright (C) 2002 Red Hat Inc.
***************
*** 27,30 ****
--- 28,53 ----
  
  gboolean yelp_man_init (GNode *tree, GList **index);
  
+ 
+ struct TreeNode {
+ 	char  *name;
+ 
+ 	GList *tree_nodes;
+ 
+ 	GList *pages; /* YelpSections */
+ };
+ 
+ struct TreeData {
+ 	char            *name;
+ 	struct TreeData *children;
+ 	char            *section;
+ };
+ 
+ extern gboolean  any_man_pages;
+ extern GList    *man_index;
+ 
+ #ifdef YELP_EXTRA_MAN_LOCATION
+ void yelp_man_populate_tree_from_extra_locations(GHashTable *section_hash);
+ #endif
+ 
  #endif /* __YELP_MAN_H__ */
diff -crN ./yelp/stylesheets/docbook/Makefile.am /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/stylesheets/docbook/Makefile.am
*** ./yelp/stylesheets/docbook/Makefile.am	Sun Jun  2 16:37:11 2002
--- /gestconf/project/GNOME_ACL/GNOME/build/sh_build_GNOME/src/./yelp/stylesheets/docbook/Makefile.am	Mon Sep 16 13:20:10 2002
***************
*** 11,17 ****
  install-data-local:													
  	$(mkinstalldirs) $(DESTDIR)$(DOCBOOK_DIR);									\
  	echo '-- Installing VERSION';											\
! 	$(INSTALL_DATA) VERSION $(DESTDIR)$(DOCBOOK_DIR);								\
  	echo '-- Installing catalog';											\
  	$(mkinstalldirs) $(DESTDIR)$(datadir)/yelp;
  	$(INSTALL_DATA) catalog $(DESTDIR)$(datadir)/yelp;								\
--- 11,17 ----
  install-data-local:													
  	$(mkinstalldirs) $(DESTDIR)$(DOCBOOK_DIR);									\
  	echo '-- Installing VERSION';											\
! 	$(INSTALL_DATA) $(srcdir)/VERSION $(DESTDIR)$(DOCBOOK_DIR);								\
  	echo '-- Installing catalog';											\
  	$(mkinstalldirs) $(DESTDIR)$(datadir)/yelp;
  	$(INSTALL_DATA) catalog $(DESTDIR)$(datadir)/yelp;								\
