# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# Usage: MODULES.html.sh > MODULES.html
+# Usage: MODULES.html.sh [--cvs-urls|--git-urls] > MODULES.html
# Extend the PATH so that gnulib-tool is found.
PATH=`dirname "$0"`:$PATH; export PATH
POSIX2001_URL='file:/packages/www/www.opengroup.org/susv3' ;;
esac
+repo_url_prefix=
+repo_url_suffix=
+if test $# != 0; then
+ case "$1" in
+ --cvs-urls)
+ # Generate URLs to the official gnulib CVS repository.
+ repo_url_prefix='http://cvs.sv.gnu.org/viewcvs/*checkout*/gnulib/'
+ repo_url_suffix='?root=gnulib&content-type=text/plain'
+ ;;
+ --git-urls)
+ # Generate URLs to the official gnulib git repository.
+ repo_url_prefix='http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f='
+ repo_url_suffix=''
+ ;;
+ esac
+fi
+# For sed replacements: Escape the '&'.
+repo_url_suffix_repl=`echo "$repo_url_suffix" | sed -e 's,[&],\\\&,'`
+
sed_lt='s,<,\<,g'
sed_gt='s,>,\>,g'
sed_escape_dot='s,\.,\\.,g'
func_begin TR
- element='<A NAME="module='$1'"></A><A HREF="modules/'$1'">'$1'</A>'
+ element='<A NAME="module='$1'"></A><A HREF="'$repo_url_prefix'modules/'$1$repo_url_suffix'">'$1'</A>'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
includes=`gnulib-tool --extract-include-directive $1`
files=`gnulib-tool --extract-filelist $1`
element=`echo "$includes" \
| sed -e "$sed_lt" -e "$sed_gt" -e "$sed_remove_trailing_empty_line" \
- -e 's,^#include "\(.*\)"$,#include "<A HREF="lib/\1">\1</A>",' \
+ -e 's,^#include "\(.*\)"$,#include "<A HREF="'$repo_url_prefix'lib/\1'$repo_url_suffix_repl'">\1</A>",' \
-e 's,^#include <'"${posix_headers}"'\.h>$,#include \<<A HREF="'"$POSIX2001_URL"'xbd/\1.h.html">\1.h</A>\>,' \
-e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
test -n "$element" || element='---'
| sed -e '/^$/d' \
| sed -n -e "$sed_choose_lib_files" \
| sed -e '/^'"${includefile}"'$/d' \
- -e 's,^\(.*\)$,<A HREF="lib/\1">\1</A>,' \
+ -e 's,^\(.*\)$,<A HREF="'$repo_url_prefix'lib/\1'$repo_url_suffix_repl'">\1</A>,' \
-e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
test -n "$element" || element='---'
func_echo "<TD ALIGN=LEFT VALIGN=TOP>$element"
| sed -e "$sed_remove_trailing_empty_line" \
| sed -n -e "$sed_choose_m4_files" \
| sed -e '/^onceonly/d' \
- -e 's,^\(.*\)$,<A HREF="m4/\1">\1</A>,'; \
+ -e 's,^\(.*\)$,<A HREF="'$repo_url_prefix'm4/\1'$repo_url_suffix_repl'">\1</A>,'; \
gnulib-tool --extract-autoconf-snippet $1 \
| sed -e "$sed_remove_trailing_empty_line") \
| sed -e 's/$/<BR>/' | tr -d "$trnl" | sed -e 's/<BR>$//'`
func_module stpncpy
func_module c-strcase
func_module strcase
+ func_module c-strcaseeq
func_module c-strcasestr
func_module strcasestr
func_module strchrnul
func_module strdup
+ func_module streq
func_module strnlen
func_module strnlen1
func_module strndup
func_module strtoumax
func_end_table
+ element="Extended multibyte and wide character utilities <wchar.h>"
+ element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
+ func_section_wrap isoc_sup_wchar
+ func_wrap H3
+ func_echo "$element"
+
+ func_begin_table
+ func_module wchar
+ func_end_table
+
element="Wide character classification and mapping utilities <wctype.h>"
element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
func_section_wrap isoc_sup_wctype
func_begin_table
func_module chown
func_module dup2
+ func_module fchdir
func_module ftruncate
func_module getaddrinfo
func_module getcwd
func_module ssize_t
func_module strtok_r
func_module sys_stat
+ func_module sys_time
func_module tsearch
func_module unistd
func_module utime
func_module iconv
func_module striconv
func_module xstriconv
+ func_module striconveh
+ func_module striconveha
func_module iconvme
func_module localcharset
func_module hard-locale
func_echo "$element"
func_echo '<PRE>'
- echo "$missed_files" | sed -e 's,^\(.*\)$,<A HREF="\1">\1</A>,'
+ echo "$missed_files" | sed -e 's,^\(.*\)$,<A HREF="'$repo_url_prefix'\1'$repo_url_suffix_repl'">\1</A>,'
echo '</PRE>'
fi