wok annotate man2html/stuff/man2html-slitaz.diff @ rev 20234

Up Dropbear (2018.76) again
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 05 13:05:36 2018 +0100 (2018-03-05)
parents
children
rev   line source
al@18840 1 --- /dev/null
al@18840 2 +++ b/Makefile
al@18840 3 @@ -0,0 +1,89 @@
al@18840 4 +CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes -DGUNZIP='"gunzip"' `pkg-config --cflags --libs glib-2.0`
al@18840 5 +# -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0
al@18840 6 +OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
al@18840 7 +bindir = $(DESTDIR)$(PREFIX)/usr/bin
al@18840 8 +mandir = $(DESTDIR)$(PREFIX)/usr/share/man
al@18840 9 +vardir = $(DESTDIR)$(PREFIX)/var
al@18840 10 +httpdir = $(DESTDIR)$(PREFIX)/home/httpd
al@18840 11 +cgidir = $(DESTDIR)$(PREFIX)/var/www
al@18840 12 +sharedir = $(DESTDIR)$(PREFIX)/usr/share/man2html
al@18840 13 +cgiowner = www
al@18840 14 +cgigroup = www
al@18840 15 +CC ?= gcc
al@18840 16 +
al@18840 17 +all: man2html hman
al@18840 18 +
al@18840 19 +man2html: $(OBJECTS)
al@18840 20 + $(CC) -o man2html $(OBJECTS) $(CFLAGS)
al@18840 21 +
al@18840 22 +pot:
al@18840 23 + mkdir -p po
al@18840 24 + xgettext -o po/man2html.pot -k_ -kN_ \
al@18840 25 + --package-name="man2html" \
al@18840 26 + --from-code="UTF-8" \
al@18840 27 + cgibase.c man2html.c hman.sh man.sh
al@18840 28 +
al@18840 29 +msgmerge:
al@18840 30 + @for l in $(LINGUAS); do \
al@18840 31 + echo -n "Updating $$l po file."; \
al@18840 32 + msgmerge -U po/$$l.po po/man2html.pot; \
al@18840 33 + done;
al@18840 34 +
al@18840 35 +msgfmt:
al@18840 36 + @for l in $(LINGUAS); do \
al@18840 37 + echo "Compiling $$l mo file..."; \
al@18840 38 + mkdir -p po/mo/$$l/LC_MESSAGES; \
al@18840 39 + msgfmt -o po/mo/$$l/LC_MESSAGES/man2html.mo po/$$l.po; \
al@18840 40 + done;
al@18840 41 +
al@18840 42 +
al@18840 43 +# man2html: ../src/version.h
al@18840 44 +
al@18840 45 +# This installs the man2html utility
al@18840 46 +install: man2html
al@18840 47 + mkdir -p $(bindir)
al@18840 48 + install -m 755 man2html $(bindir)
al@18840 49 + mkdir -p $(mandir)/man1
al@18840 50 + install -m 644 man2html.1 $(mandir)/man1/man2html.1
al@18840 51 +
al@18840 52 +install-scripts: install-man-scripts install-glimpse-stuff install-hman
al@18840 53 +
al@18840 54 +# These are the scripts that allow pointing a browser at
al@18840 55 +# http://localhost/cgi-bin/man/man2html
al@18840 56 +# to work.
al@18840 57 +install-man-scripts:
al@18840 58 + mkdir -p $(cgidir)
al@18840 59 + mkdir -p $(sharedir)
al@18840 60 + install -m 755 scripts/cgi-bin/man/* $(cgidir)
al@18840 61 + install -m 644 scripts/cgi-aux/man/* $(sharedir)
al@18840 62 + install -d -o $(cgiowner) -g $(cgigroup) -m 775 $(vardir)/man2html
al@18840 63 +# (aux was renamed to cgi-aux since aux causes problems under DOS)
al@18840 64 +
al@18840 65 +# If you have installed glimpse, and have compressed man pages,
al@18840 66 +# then perhaps you also want these filters.
al@18840 67 +install-glimpse-stuff:
al@18840 68 + install -m 644 glimpse_filters $(vardir)/man2html/.glimpse_filters
al@18840 69 +
al@18840 70 +# In order not to have to type a long command like
al@18840 71 +# netscape http://localhost/cgi-bin/man/man2html?section+topic
al@18840 72 +# or
al@18840 73 +# lynx lynxcgi:/home/httpd/cgi-bin/man/man2html?section+topic
al@18840 74 +# it is convenient to have some shell script as a wrapper.
al@18840 75 +# The script hman can be aliased to man. It uses an environment
al@18840 76 +# variable MANHTMLPAGER to find out which browser you use, and
al@18840 77 +# you can set MANHTMLHOST if the pages are not on localhost.
al@18840 78 +hman: hman.sh
al@18840 79 + rm -f hman
al@18840 80 + sed -e 's,%version%,1.6g-7,' hman.sh > hman
al@18840 81 +
al@18840 82 +install-hman: hman
al@18840 83 + install -m 555 hman $(bindir)/hman
al@18840 84 + install -m 644 hman.1 $(mandir)/man1/hman.1
al@18840 85 +
al@18840 86 +clean:
al@18840 87 + rm -f core hman man2html $(OBJECTS) *~
al@18840 88 +
al@18840 89 +spotless: clean
al@18840 90 + rm -f Makefile
al@18840 91 +
al@18840 92 +$(OBJECTS): defs.h
al@18840 93 --- a/abbrev.c
al@18840 94 +++ b/abbrev.c
al@18840 95 @@ -27,7 +27,7 @@
al@18840 96 "SSO", "System Services Overview",
al@18840 97 "TEXT", "Editing Text Files",
al@18840 98 "DOCS", "Formatting Documents",
al@18840 99 - "TROFF", "Using <B>nroff</B> and <B>troff</B>",
al@18840 100 + "TROFF", "Using <b>nroff</b> and <b>troff</b>",
al@18840 101 "INDEX", "Global Index",
al@18840 102 "CPG", "C Programmer's Guide",
al@18840 103 "CREF", "C Reference Manual",
al@18840 104 @@ -46,7 +46,7 @@
al@18840 105 "CGI", "SunCGI Reference Manual",
al@18840 106 "CORE", "SunCore Reference Manual",
al@18840 107 "4ASSY", "Sun-4 Assembly Language Reference",
al@18840 108 - "SARCH", "<FONT SIZE=\"-1\">SPARC</FONT> Architecture Manual",
al@18840 109 + "SARCH", "SPARC Architecture Manual",
al@18840 110 "KR", "The C Programming Language",
al@18840 111 0, 0 };
al@18840 112
al@18840 113 --- a/cgibase.c
al@18840 114 +++ b/cgibase.c
al@18840 115 @@ -8,6 +8,8 @@
al@18840 116 #include <ctype.h> /* tolower() */
al@18840 117 #include <string.h> /* strlen() */
al@18840 118 #include "defs.h"
al@18840 119 +#include <glib.h>
al@18840 120 +#include <glib/gi18n.h>
al@18840 121
al@18840 122 /*
al@18840 123 * The default is to use cgibase. With relative html style
al@18840 124 @@ -21,8 +23,8 @@
al@18840 125 * and uses lynx, and we use lynxcgi:/usr/lib/cgi-bin.
al@18840 126 */
al@18840 127
al@18840 128 -static char *man2htmlpath = "/cgi-bin/man/man2html"; /* default */
al@18840 129 -static char *cgibase_format = "http://%s"; /* host.domain:port */
al@18840 130 +static char *man2htmlpath = ""; /* default */
al@18840 131 +static char *cgibase_format = "%s"; /* host.domain:port */
al@18840 132 static char *cgibase_ll_format = "lynxcgi:%s"; /* directory */
al@18840 133 static char *cgibase = ""; /* default */
al@18840 134
al@18840 135 @@ -68,76 +70,46 @@
al@18840 136 relat_html_style = 1;
al@18840 137 }
al@18840 138
al@18840 139 -/* What shall we say in case of relat_html_style? */
al@18840 140 -static char *signature = "<HR>\n"
al@18840 141 -"This document was created by\n"
al@18840 142 -"<A HREF=\"%s%s\">man2html</A>,\n"
al@18840 143 -"using the manual pages.<BR>\n"
al@18840 144 -"%s\n";
al@18840 145 -
al@18840 146 -#define TIMEFORMAT "%T GMT, %B %d, %Y"
al@18840 147 -#define TIMEBUFSZ 500
al@18840 148 -
al@18840 149 void print_sig()
al@18840 150 {
al@18840 151 - char timebuf[TIMEBUFSZ];
al@18840 152 - struct tm *timetm;
al@18840 153 - time_t now;
al@18840 154 -
al@18840 155 - timebuf[0] = 0;
al@18840 156 -#ifdef TIMEFORMAT
al@18840 157 - sprintf(timebuf, "Time: ");
al@18840 158 - now=time(NULL);
al@18840 159 - timetm=gmtime(&now);
al@18840 160 - strftime(timebuf+6, TIMEBUFSZ-6, TIMEFORMAT, timetm);
al@18840 161 - timebuf[TIMEBUFSZ-1] = 0;
al@18840 162 -#endif
al@18840 163 - printf(signature, cgibase, man2htmlpath, timebuf);
al@18840 164 + printf("</section>\n<footer>\n<p>%s</p>\n</footer>\n",
al@18840 165 + _("This document was created by <b>man2html</b> using the manual pages."));
al@18840 166 }
al@18840 167
al@18840 168 void
al@18840 169 include_file_html(char *g) {
al@18840 170 - printf("<A HREF=\"file:///usr/include/%s\">%s</A>&gt;", g,g);
al@18840 171 + printf("<a href=\"file:///usr/include/%s\">%s</a>&gt;", g,g);
al@18840 172 }
al@18840 173
al@18840 174 void
al@18840 175 man_page_html(char *sec, char *h) {
al@18840 176 - if (relat_html_style) {
al@18840 177 - if (!h)
al@18840 178 - printf("<A HREF=\"../index.html\">"
al@18840 179 - "Return to Main Contents</A>");
al@18840 180 - else
al@18840 181 - printf("<A HREF=\"../man%s/%s.%s.html\">%s</A>",
al@18840 182 - sec, h, sec, h);
al@18840 183 - } else {
al@18840 184 - if (!h)
al@18840 185 - printf("<A HREF=\"%s%s\">Return to Main Contents</A>",
al@18840 186 - cgibase, man2htmlpath);
al@18840 187 - else if (!sec)
al@18840 188 - printf("<A HREF=\"%s%s%c%s\">%s</A>",
al@18840 189 - cgibase, man2htmlpath, sep, h, h);
al@18840 190 - else
al@18840 191 - printf("<A HREF=\"%s%s%c%s+%s\">%s</A>",
al@18840 192 - cgibase, man2htmlpath, sep, sec, h, h);
al@18840 193 - }
al@18840 194 + if (!h)
al@18840 195 + printf("<a href=\"?\">%s</a>",
al@18840 196 + _("Return to Main Contents"));
al@18840 197 + else if (!sec)
al@18840 198 + printf("<a href=\"?%s\">%s</a>",
al@18840 199 + h, h);
al@18840 200 + else
al@18840 201 + printf("<a href=\"?%s+%s\">%s</a>",
al@18840 202 + sec, h, h);
al@18840 203 }
al@18840 204
al@18840 205 void
al@18840 206 ftp_html(char *f) {
al@18840 207 - printf("<A HREF=\"ftp://%s\">%s</A>", f, f);
al@18840 208 + printf("<a href=\"ftp://%s\">%s</a>", f, f);
al@18840 209 }
al@18840 210
al@18840 211 void
al@18840 212 www_html(char *f) {
al@18840 213 - printf("<A HREF=\"http://%s\">%s</A>", f, f);
al@18840 214 + printf("<a href=\"http://%s\">%s</a>", f, f);
al@18840 215 }
al@18840 216
al@18840 217 void
al@18840 218 mailto_html(char *g) {
al@18840 219 - printf("<A HREF=\"mailto:%s\">%s</A>", g, g);
al@18840 220 + printf("<a href=\"mailto:%s\">%s</a>", g, g);
al@18840 221 }
al@18840 222
al@18840 223 void
al@18840 224 url_html(char *g) {
al@18840 225 - printf("<A HREF=\"%s\">%s</A>", g, g);
al@18840 226 + printf("<a href=\"%s\">%s</a>", g, g);
al@18840 227 }
al@18840 228 --- a/hman.sh
al@18840 229 +++ b/hman.sh
al@18840 230 @@ -8,99 +8,83 @@
al@18840 231 # Usage examples:
al@18840 232 # hman - get start page
al@18840 233 # hman man2html - get man page for man2html
al@18840 234 -# hman 7 locale - get section 7 man page for locale
al@18840 235 +# hman 7 locale - get section 7 man page for locale
al@18840 236 # hman 1 - section 1 index of names only
al@18840 237 # hman 3 index - section 3 index names+descriptions
al@18840 238 # hman -k editor - search all man pages for some string
al@18840 239 -# hman -P arena ./twm.man - specify browser; specify man page
al@18840 240 +# hman -P arena ./twm.man - specify browser; specify man page
al@18840 241 #
al@18840 242 -# hman from %version%
al@18840 243 +# hman from 1.6g-7
al@18840 244 #
al@18840 245
al@18840 246 -if [ x"$1" = x"-v" ] || [ x"$1" = x"-V" ]; then
al@18840 247 - echo "`basename $0` from %version%"
al@18840 248 +. /usr/lib/slitaz/httphelper.sh
al@18840 249 +. /lib/libtaz.sh
al@18840 250 +
al@18840 251 +# Internationalization
al@18840 252 +export TEXTDOMAIN='man2html'
al@18840 253 +_() { local T="$1"; shift; printf "$(gettext "$T")" "$@"; echo; }
al@18840 254 +
al@18840 255 +
al@18840 256 +if [ "$1" == '-v' ] || [ "$1" == '-V' ]; then
al@18840 257 + echo "$(basename $0) v. 1.6g-slitaz"
al@18840 258 exit 0
al@18840 259 fi
al@18840 260
al@18840 261 # The user has to set MANHTMLPAGER (or he will get httpd-free lynx).
al@18840 262 # Pick your favorite browser: lynx, xmosaic, netscape, arena, amaya, grail, ...
al@18840 263 -if [ x"$MANHTMLPAGER" = x ] && ! which lynx > /dev/null ; then
al@18840 264 - HMAN_BROWSER=sensible-browser
al@18840 265 -else
al@18840 266 - HMAN_BROWSER=${MANHTMLPAGER-lynxcgi}
al@18840 267 -fi
al@18840 268 +HMAN_BROWSER="${MANHTMLPAGER:-tazweb}"
al@18840 269
al@18840 270 -#
al@18840 271 # If the man pages are on a remote host, specify it in MANHTMLHOST.
al@18840 272 -HOST=${MANHTMLHOST-localhost}
al@18840 273 +HOST=${MANHTMLHOST:-localhost}
al@18840 274
al@18840 275 # Perhaps the browser was specified on the command line?
al@18840 276 -if [ "$#" -gt 1 ] && [ x"$1" = x"-P" ]; then
al@18840 277 - HMAN_BROWSER="$2"
al@18840 278 - shift; shift
al@18840 279 +if [ "$#" -gt 1 ] && [ "$1" == '-P' ]; then
al@18840 280 + HMAN_BROWSER="$2"
al@18840 281 + shift; shift
al@18840 282 fi
al@18840 283
al@18840 284 # Perhaps the host was specified on the command line?
al@18840 285 -if [ "$#" -gt 1 ] && [ x"$1" = x"-H" ]; then
al@18840 286 - HOST="$2"
al@18840 287 - shift; shift
al@18840 288 +if [ "$#" -gt 1 ] && [ "$1" == '-H' ]; then
al@18840 289 + HOST="$2"
al@18840 290 + shift; shift
al@18840 291 fi
al@18840 292
al@18840 293 -# Interface to a live (already running) netscape browser.
al@18840 294 -nsfunc () {
al@18840 295 - if ( /bin/ps xc | grep -q 'netscape$' ) ; then
al@18840 296 - if [ -x netscape-remote ] ; then
al@18840 297 - exec netscape-remote -remote "openURL($1,new_window)"
al@18840 298 - else
al@18840 299 - exec netscape -remote "openURL($1,new_window)"
al@18840 300 - fi
al@18840 301 - else
al@18840 302 - netscape $1 &
al@18840 303 - fi
al@18840 304 -}
al@18840 305 +CGI="http://$HOST/man.cgi"
al@18840 306
al@18840 307 -urlencode() {
al@18840 308 - echo "$@" | perl -pe 'chomp(); s/([^A-Za-z0-9\ \_\-\.\/])/"%" . unpack("H*", $1)/eg; tr/ /+/;'
al@18840 309 +enc() {
al@18840 310 + echo "$@" | sed -e 's|+|%2B|g; s| |+|g';
al@18840 311 }
al@18840 312
al@18840 313 -
al@18840 314 -case "$HMAN_BROWSER" in
al@18840 315 - lynxcgi)
al@18840 316 - HMAN_BROWSER=lynx
al@18840 317 - CG="lynxcgi:/usr/lib/cgi-bin/man"
al@18840 318 - ;;
al@18840 319 - netscape)
al@18840 320 - HMAN_BROWSER=nsfunc
al@18840 321 - CG="http://$HOST/cgi-bin/man"
al@18840 322 - ;;
al@18840 323 - *)
al@18840 324 - CG="http://$HOST/cgi-bin/man"
al@18840 325 - ;;
al@18840 326 +case "$#" in
al@18840 327 + 0)
al@18840 328 + $HMAN_BROWSER "$CGI";;
al@18840 329 + 1)
al@18840 330 + case "$1" in
al@18840 331 + 1|2|3|4|5|6|7|8|l|n)
al@18840 332 + $HMAN_BROWSER "$CGI?$1";;
al@18840 333 + /*)
al@18840 334 + $HMAN_BROWSER "$CGI?$(enc "$1")";;
al@18840 335 + */*)
al@18840 336 + $HMAN_BROWSER "$CGI?$(enc "$(realpath "$PWD/$1")")";;
al@18840 337 + *)
al@18840 338 + $HMAN_BROWSER "$CGI?$(enc "$1")";;
al@18840 339 + esac
al@18840 340 + ;;
al@18840 341 + 2)
al@18840 342 +# case "$1" in
al@18840 343 +# -k)
al@18840 344 +# $HMAN_BROWSER "$CGI?search=$(enc "$2")";;
al@18840 345 +# *)
al@18840 346 +# if [ "$2" == 'index' ]; then
al@18840 347 +# $HMAN_BROWSER "$CGI?whatis=$(enc "$1")"
al@18840 348 +# else
al@18840 349 + $HMAN_BROWSER "$CGI?$(enc "$1 $2")"
al@18840 350 +# fi
al@18840 351 +# ;;
al@18840 352 +# esac
al@18840 353 + ;;
al@18840 354 + *)
al@18840 355 + _ 'bad number of args';;
al@18840 356 esac
al@18840 357 -
al@18840 358 - case "$#" in
al@18840 359 - 0) $HMAN_BROWSER "$CG/man2html" ;;
al@18840 360 - 1) case "$1" in
al@18840 361 - 1|2|3|4|5|6|7|8|l|n)
al@18840 362 - $HMAN_BROWSER "$CG/mansec?query=$1" ;;
al@18840 363 - /*)
al@18840 364 - $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1"`" ;;
al@18840 365 - */*)
al@18840 366 - $HMAN_BROWSER "$CG/man2html?query=`urlencode "$PWD/$1"`" ;;
al@18840 367 - *)
al@18840 368 - $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1"`" ;;
al@18840 369 - esac ;;
al@18840 370 - 2) case "$1" in
al@18840 371 - -k)
al@18840 372 - $HMAN_BROWSER "$CG/mansearch?query=`urlencode "$2"`" ;;
al@18840 373 - *)
al@18840 374 - if [ "$2" = index ]; then
al@18840 375 - $HMAN_BROWSER "$CG/manwhatis?query=`urlencode "$1"`"
al@18840 376 - else
al@18840 377 - $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1 $2"`"
al@18840 378 - fi ;;
al@18840 379 - esac ;;
al@18840 380 - *) echo "bad number of args" ;;
al@18840 381 - esac
al@18840 382
al@18840 383 exit 0
al@18840 384 --- /dev/null
al@18840 385 +++ b/man.sh
al@18840 386 @@ -0,0 +1,292 @@
al@18840 387 +#!/bin/sh
al@18840 388 +# man2html cgi script - uses /usr/bin/man2html to format man pages
al@18840 389 +# aeb@cwi.nl - 980109
al@18840 390 +# Aleksej Bobylev <al.bobylev@gmail.com>, 2015-2016
al@18840 391 +
al@18840 392 +. /usr/lib/slitaz/httphelper.sh
al@18840 393 +. /lib/libtaz.sh
al@18840 394 +
al@18840 395 +# Internationalization.
al@18840 396 +[ -e /etc/locale.conf ] && . /etc/locale.conf
al@18840 397 +export TEXTDOMAIN='man2html'
al@18840 398 +export LANG LC_ALL
al@18840 399 +_() { local T="$1"; shift; printf "$(gettext "$T")" "$@"; echo; }
al@18840 400 +
al@18840 401 +
al@18840 402 +SECTIONS="$(_ 'User Commands'):$(_ 'System Calls'):$(_ 'C Library Functions'):\
al@18840 403 +$(_ 'Devices and Network Interfaces'):$(_ 'File Formats'):\
al@18840 404 +$(_ 'Games and Demos'):$(_ 'Environments, Tables, and Troff Macros'):\
al@18840 405 +$(_ 'Maintenance Commands'):$(_ 'All available manual pages')"
al@18840 406 +
al@18840 407 +query="$(GET query)"
al@18840 408 +if [ -z "$query" ]; then
al@18840 409 + set -- $(echo $(GET) | tr '+' ' ')
al@18840 410 +else
al@18840 411 + set -- $(echo $(GET query) | tr '+' ' ')
al@18840 412 +fi
al@18840 413 +
al@18840 414 +
al@18840 415 +if [ $1 == 'css' ]; then
al@18840 416 + # post css file on query
al@18840 417 + header 'Content-Type: text/css'
al@18840 418 + cat /usr/share/doc/slitaz-doc.css
al@18840 419 +fi
al@18840 420 +
al@18840 421 +if [ $# -eq 1 ]; then
al@18840 422 + case $1 in
al@18840 423 + 1|2|3|4|5|6|7|8|all)
al@18840 424 + if [ "$1" == 'all' ]; then
al@18840 425 + sec_n='9'; sec_folder='man?'
al@18840 426 + else
al@18840 427 + sec_n="$1"; sec_folder="man$1"
al@18840 428 + fi
al@18840 429 + sec_desc=$(echo "$SECTIONS" | cut -d':' -f $sec_n)
al@18840 430 + header
al@18840 431 + cat <<EOT
al@18840 432 +<!DOCTYPE html>
al@18840 433 +<html>
al@18840 434 +<head>
al@18840 435 + <title>$1. $sec_desc</title>
al@18840 436 + <link rel="stylesheet" href="?css">
al@18840 437 +</head>
al@18840 438 +<body><header><h1>$(_ 'Section %s: %s' $1 "$sec_desc")</h1></header>
al@18840 439 + <section><header>$(_ 'Manual Pages')</header>
al@18840 440 + <p>
al@18840 441 +EOT
al@18840 442 +
al@18840 443 + case $1 in
al@18840 444 + 1) _ "Section 1 of the manual describes user commands and tools, for example, file \
al@18840 445 +manipulation tools, shells, compilers, web browsers, file and image viewers and editors, and so \
al@18840 446 +on.";;
al@18840 447 + 2) _ "Section 2 of the manual describes the Linux system calls. A system call is \
al@18840 448 +an entry point into the Linux kernel.";;
al@18840 449 + 3) _ "Section 3 of the manual describes all library functions excluding the \
al@18840 450 +library functions (system call wrappers) described in Section 2, which implement system calls.";;
al@18840 451 + 4) _ "Section 4 of the manual describes special files (devices).";;
al@18840 452 + 5) _ "Section 5 of the manual describes various file formats, as well as the \
al@18840 453 +corresponding C structures, if any.";;
al@18840 454 + 6) _ "Section 6 of the manual describes all the games and funny little programs \
al@18840 455 +available on the system.";;
al@18840 456 + 7) _ "Section 7 of the manual provides overviews on various topics, and describes \
al@18840 457 +conventions and protocols, character set standards, the standard filesystem layout, and \
al@18840 458 +miscellaneous other things.";;
al@18840 459 + 8) _ "Section 8 of the manual describes commands which either can be or are used \
al@18840 460 +only by the superuser, like system-administration commands, daemons, and hardware-related \
al@18840 461 +commands.";;
al@18840 462 + esac
al@18840 463 +
al@18840 464 + [ "$1" != 'all' ] && echo "<b><a href=\"?intro.$1\">intro</a></b>($1)"
al@18840 465 + echo '</p>'
al@18840 466 +
al@18840 467 + temp="$(mktemp)"; temp2="$(mktemp)"
al@18840 468 + for dir in $(find /usr/share/man -type d -name "$sec_folder"); do
al@18840 469 + ls $dir | sed 's|\.\([0-9]\)\.*[bgx]*z*2*$|:\1|'
al@18840 470 + # fix sorting 'feature': leading '_' always ignored by `sort`
al@18840 471 + done | sed 's|_|zzzzzzzz|g' | sort -fu | sed 's|zzzzzzzz|_|g' | \
al@18840 472 + awk -F' ' -vtemp="$temp" -vtemp2="$temp2" '
al@18840 473 + {
al@18840 474 + split($1, man, ":");
al@18840 475 +
al@18840 476 + letter = tolower(substr(man[1], 1, 1));
al@18840 477 + if (letter != last_letter) {
al@18840 478 + last_letter = letter;
al@18840 479 + letter_index[++num_letters] = letter;
al@18840 480 + print "<h3 id=\"l" letter "\">" toupper(letter) "</h3>" > temp;
al@18840 481 + }
al@18840 482 + lnk = man[1]; gsub("+", "%2b", lnk);
al@18840 483 + printf "<b><a href=\"?%s.%s\">%s</a></b>(%s) ", lnk, man[2], man[1], man[2] > temp;
al@18840 484 + }
al@18840 485 + END {
al@18840 486 + # Print out alphabetic quick index and other links
al@18840 487 + for (i = 1; i <= num_letters; i++) {
al@18840 488 + print "<a href=\"#l" letter_index[i] section "\">" toupper(letter_index[i]) "</a>" > temp2;
al@18840 489 + }
al@18840 490 + }
al@18840 491 + '
al@18840 492 + if [ -s "$temp" ]; then
al@18840 493 + echo '<hr>'; cat "$temp2"; echo '<hr>'
al@18840 494 + cat "$temp"
al@18840 495 + echo '<hr>'; cat "$temp2"; echo '<hr>'
al@18840 496 + fi
al@18840 497 +
al@18840 498 + rm -f "$temp" "$temp2"
al@18840 499 +
al@18840 500 + cat <<EOT
al@18840 501 + </section>
al@18840 502 + <section><header>$(_ 'Sections')</header>
al@18840 503 + <ol>
al@18840 504 +EOT
al@18840 505 + for i in $(seq 8); do
al@18840 506 + sec_desc=$(echo "$SECTIONS" | cut -d':' -f $i)
al@18840 507 + echo "<li><a href=\"?$i\">$sec_desc</a></li>"
al@18840 508 + done
al@18840 509 + cat <<EOT
al@18840 510 + </ol>
al@18840 511 + <p><a href="?all">$(_ 'All Sections')</a></p>
al@18840 512 +</section>
al@18840 513 +
al@18840 514 +</body>
al@18840 515 +</html>
al@18840 516 +EOT
al@18840 517 + exit 0
al@18840 518 + ;;
al@18840 519 + esac
al@18840 520 +fi
al@18840 521 +
al@18840 522 +# Find the required page - expect to be called with "man2html [sec] page".
al@18840 523 +# There may a prefixed "-M manpath" option.
al@18840 524 +
al@18840 525 +if [ $# -ge 2 -a "$1" == '-M' ]; then
al@18840 526 + MANPATH="$2"
al@18840 527 + export MANPATH
al@18840 528 + shift; shift
al@18840 529 + MP=' using the given MANPATH'
al@18840 530 +else
al@18840 531 + MP=''
al@18840 532 +fi
al@18840 533 +
al@18840 534 +
al@18840 535 +# If no arguments given, show a start page.
al@18840 536 +
al@18840 537 +if [ $# -eq 0 ]; then
al@18840 538 + header
al@18840 539 + cat <<EOT
al@18840 540 +<!DOCTYPE html>
al@18840 541 +<html>
al@18840 542 +<head>
al@18840 543 + <meta charset="UTF-8">
al@18840 544 + <title>$(_ 'Manual Pages - Main Contents')</title>
al@18840 545 + <link rel="stylesheet" href="?css">
al@18840 546 +</head>
al@18840 547 +<body>
al@18840 548 +<header><h1>$(_ 'Manual Pages - Main Contents')</h1></header>
al@18840 549 +<section><header>$(_ 'Name and Section lookup')</header>
al@18840 550 + <form method="GET">
al@18840 551 + <input name="query" size="40">
al@18840 552 + <button type="submit">$(_ 'Search')</button>
al@18840 553 + </form>
al@18840 554 + <p>$(_ "You can enter a program name, possibly preceded by the section, the directories to search \
al@18840 555 +(with -M) or a full name. For example:")</p>
al@18840 556 +
al@18840 557 + <ul>
al@18840 558 + <li><tt>find</tt></li>
al@18840 559 + <li><tt>1 find</tt></li>
al@18840 560 + <li><tt>-M /usr/share/man:/opt/man:/usr/local/share/man find</tt></li>
al@18840 561 + <li><tt>/usr/share/man/man1/gperf.1</tt></li>
al@18840 562 + </ul>
al@18840 563 +</section>
al@18840 564 +
al@18840 565 +<section><header>$(_ 'Index of pages')</header>
al@18840 566 +
al@18840 567 + <ol>
al@18840 568 +EOT
al@18840 569 + for i in $(seq 8); do
al@18840 570 + sec_desc=$(echo "$SECTIONS" | cut -d':' -f $i)
al@18840 571 + echo "<li><a href=\"?$i\">$sec_desc</a></li>"
al@18840 572 + done
al@18840 573 + cat <<EOT
al@18840 574 + </ol>
al@18840 575 + <p><a href="?all">$(_ 'All Sections')</a></p>
al@18840 576 +</section>
al@18840 577 +
al@18840 578 +<footer>
al@18840 579 + <p>$(_ 'The original man2html program and scripts are due to %s and %s.' \
al@18840 580 + '<a href="http://wsinwp01.win.tue.nl:1234/index.html">Richard Verhoeven</a>' \
al@18840 581 + '<a href="mailto:michael@actrix.gen.nz">Michael Hamilton</a>')
al@18840 582 + $(_ 'This version is from %s maintained by %s.' 'man-1.6g' \
al@18840 583 + '<a href="mailto:flucifredi@acm.org">Federico Lucifredi</a>')</p>
al@18840 584 +</footer>
al@18840 585 +</body>
al@18840 586 +</html>
al@18840 587 +EOT
al@18840 588 + exit 0
al@18840 589 +fi
al@18840 590 +
al@18840 591 +if [ $# -gt 2 ]; then
al@18840 592 + man2html -E "man2html: bad invocation: too many arguments"
al@18840 593 + exit 0
al@18840 594 +fi
al@18840 595 +
al@18840 596 +# A single argument may be an explicitly give path name
al@18840 597 +# Otherwise, find it
al@18840 598 +
al@18840 599 +if [ $# -eq 1 ]; then
al@18840 600 + arg=${1//%2b/+}
al@18840 601 + case "$arg" in
al@18840 602 + /*) PAGE="$arg";;
al@18840 603 + *.*) PAGE=$(find /usr/share/man \( -type f -o -type l \) \( -name "$arg" -o -name "$arg.gz" -o -name "$arg.bz2" -o -name "$arg.xz" \));;
al@18840 604 + *) PAGE=$(find /usr/share/man \( -type f -o -type l \) \( -name "$arg.*" -o -name "$arg.*.gz" -o -name "$arg.*.bz2" -o -name "$arg.*.xz" \));;
al@18840 605 + esac
al@18840 606 +else
al@18840 607 + arg=${2//%2b/+}
al@18840 608 + PAGE="$(
al@18840 609 + for dir in $(find /usr/share/man -type d -name man$1); do
al@18840 610 + find $dir \( -type f -o -type l \) -name "$arg.$1*"
al@18840 611 + done)"
al@18840 612 +fi
al@18840 613 +
al@18840 614 +if [ -z "$PAGE" ]; then
al@18840 615 + complaint="$(_ 'Cannot find a page')"
al@18840 616 + if [ $# -eq 1 ]; then
al@18840 617 + complaint="$(_ 'Cannot find a page for <b>%s</b> %s' $1 $MP)"
al@18840 618 + else
al@18840 619 + complaint="$(_ 'Cannot find a page for <b>%s</b> in section <b>%s</b> %s') $2 $1 $MP"
al@18840 620 + fi
al@18840 621 + man2html -E "<p>$complaint</p>"
al@18840 622 + exit 0
al@18840 623 +fi
al@18840 624 +
al@18840 625 +if [ "$(echo "$PAGE" | wc -l)" -gt 1 ]; then
al@18840 626 + header
al@18840 627 + cat <<EOT
al@18840 628 +<!DOCTYPE html>
al@18840 629 +<html><head><title>$(_ 'Multiple pages')</title>
al@18840 630 +<link rel="stylesheet" href="?css"></link></head>
al@18840 631 +<body><header><h1>$(_ 'Multiple pages found')</h1></header>
al@18840 632 + <section>
al@18840 633 + <ul>
al@18840 634 +EOT
al@18840 635 + echo "$PAGE" | awk -F'/' '{
al@18840 636 + if ($5 ~ "man") {
al@18840 637 + split($6, man, ".");
al@18840 638 + printf "<li><a href=\"?%s\">%s</a> (%s)</li>\n", $0, man[1], man[2];
al@18840 639 + } else {
al@18840 640 + split($7, man, ".");
al@18840 641 + printf "<li><a href=\"?%s\">%s</a> (%s) — %s</li>\n", $0, man[1], man[2], $5;
al@18840 642 + }
al@18840 643 + }'
al@18840 644 + sed 's|^.*$|<li><a href="?&">&</a></li>|'
al@18840 645 + echo '</ul></section></body></html>'
al@18840 646 + exit 0
al@18840 647 +fi
al@18840 648 +
al@18840 649 +if [ -r "$PAGE" ]; then
al@18840 650 + tmpman="$(mktemp)"
al@18840 651 + # Unpack man page
al@18840 652 + case "$PAGE" in
al@18840 653 + *.gz) zcat "$PAGE" > "$tmpman";;
al@18840 654 + *.bz2) bzcat "$PAGE" > "$tmpman";;
al@18840 655 + *.xz) xzcat "$PAGE" > "$tmpman";;
al@18840 656 + *) cp "$PAGE" "$tmpman";;
al@18840 657 + esac
al@18840 658 +
al@18840 659 + # Check for link
al@18840 660 + line="$(fgrep -v '.\"' "$tmpman" | head -n1)"
al@18840 661 + case "$line" in
al@18840 662 + .so*)
al@18840 663 + link="$(echo "$line" | cut -d'/' -f2)"
al@18840 664 + header "HTTP/1.1 301 Moved Permanently" \
al@18840 665 + "Location: ?$link"
al@18840 666 + ;;
al@18840 667 + *)
al@18840 668 + # Convert page to HTML
al@18840 669 + man2html "$tmpman"
al@18840 670 + ;;
al@18840 671 + esac
al@18840 672 +
al@18840 673 + # Clean
al@18840 674 + rm "$tmpman"
al@18840 675 +else
al@18840 676 + man2html -E "Strange... Cannot find (or read) $PAGE."
al@18840 677 +fi
al@18840 678 +exit 0
al@18840 679 --- a/man2html.c
al@18840 680 +++ b/man2html.c
al@18840 681 @@ -21,14 +21,17 @@
al@18840 682 #include <ctype.h>
al@18840 683 #include <sys/stat.h>
al@18840 684 #include "defs.h"
al@18840 685 -#include "../src/version.h"
al@18840 686 +#include "version.h"
al@18840 687 +#include <glib.h>
al@18840 688 +#include <glib/gi18n.h>
al@18840 689 +#define GETTEXT_PACKAGE "man2html"
al@18840 690
al@18840 691 /* BSD mandoc Bd/Ed example(?) blocks */
al@18840 692 #define BD_LITERAL 1
al@18840 693 #define BD_INDENT 2
al@18840 694
al@18840 695 #define SIZE(a) (sizeof(a)/sizeof(*a))
al@18840 696 -#define DOCTYPE "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
al@18840 697 +#define DOCTYPE "<!DOCTYPE html>\n"
al@18840 698 #define CONTENTTYPE "Content-type: text/html; charset=UTF-8\n\n"
al@18840 699
al@18840 700 static char NEWLINE[2]="\n";
al@18840 701 @@ -58,28 +61,13 @@
al@18840 702
al@18840 703 static char charb[3];
al@18840 704
al@18840 705 -#ifdef GUNZIP
al@18840 706 -/* from src/utils.c */
al@18840 707 -static int
al@18840 708 -is_shell_safe(const char *ss, int quoted) {
al@18840 709 - char *bad = " ;'\\\"<>|";
al@18840 710 - char *p;
al@18840 711
al@18840 712 - if (quoted)
al@18840 713 - bad++; /* allow a space inside quotes */
al@18840 714 - for (p = bad; *p; p++)
al@18840 715 - if (strchr(ss, *p))
al@18840 716 - return 0;
al@18840 717 - return 1;
al@18840 718 -}
al@18840 719 -#endif
al@18840 720 -
al@18840 721 /* reads the entire manpage into buffer *buf and returns number of chars read */
al@18840 722 static int
al@18840 723 read_manpage_into_buffer(char *path, char **buf) {
al@18840 724 int compressed = 0;
al@18840 725 FILE * f = NULL;
al@18840 726 - char * ext;
al@18840 727 + /* char * ext; */
al@18840 728 int l = 0;
al@18840 729 struct stat stbuf;
al@18840 730
al@18840 731 @@ -94,26 +82,6 @@
al@18840 732 char * tmp = NULL;
al@18840 733 char * command = NULL;
al@18840 734 char * openpath = path;
al@18840 735 -#ifdef GUNZIP
al@18840 736 -
al@18840 737 - if (is_shell_safe(openpath, 1)) {
al@18840 738 - ext = strrchr(openpath, '.');
al@18840 739 - compressed = (ext && !strcmp(ext, ".gz"));
al@18840 740 -
al@18840 741 - if (!compressed && stat(openpath, &stbuf)) {
al@18840 742 - tmp = (char*) xmalloc(strlen(path) + 4);
al@18840 743 - sprintf(tmp, "%s.gz", path);
al@18840 744 - if ((compressed = !stat(tmp, &stbuf)))
al@18840 745 - openpath = tmp;
al@18840 746 - }
al@18840 747 - }
al@18840 748 -
al@18840 749 - if (compressed) {
al@18840 750 - command = (char*) xmalloc(strlen(openpath) + sizeof(GUNZIP) + 4);
al@18840 751 - sprintf(command, GUNZIP " '%s'", openpath);
al@18840 752 - f = popen(command, "r");
al@18840 753 - } else
al@18840 754 -#endif
al@18840 755 f = fopen(openpath, "r");
al@18840 756
al@18840 757 if (tmp) free(tmp);
al@18840 758 @@ -170,7 +138,7 @@
al@18840 759
al@18840 760 h = chardef;
al@18840 761 if (h->nr != V('*','*')) {
al@18840 762 - printf("chardef corrupted\n");
al@18840 763 + printf("%s\n", _("chardef corrupted"));
al@18840 764 exit(1);
al@18840 765 }
al@18840 766
al@18840 767 @@ -216,7 +184,7 @@
al@18840 768 ** Add the links to the output.
al@18840 769 ** At the moment the following are recognized:
al@18840 770 **
al@18840 771 - ** name(*) -> ../man?/name.*
al@18840 772 + ** name(*) -> ?name.*
al@18840 773 ** method://string -> method://string
al@18840 774 ** www.host.name -> http://www.host.name
al@18840 775 ** ftp.host.name -> ftp://ftp.host.name
al@18840 776 @@ -453,8 +421,8 @@
al@18840 777 #define DL 1
al@18840 778 #define UL 2
al@18840 779 #define OL 3
al@18840 780 -static char *dl_open[4] = { "", "<DL COMPACT>\n", "<UL>", "<OL>" };
al@18840 781 -static char *dl_close[4] = { "", "</DL>\n", "</UL>", "</OL>" };
al@18840 782 +static char *dl_open[4] = { "", "<dl compact>\n", "<ul>", "<ol>" };
al@18840 783 +static char *dl_close[4] = { "", "</dl>\n", "</ul>", "</ol>" };
al@18840 784
al@18840 785 static inline void
al@18840 786 dl_begin(void) {
al@18840 787 @@ -462,7 +430,7 @@
al@18840 788 out_html(dl_open[DL]);
al@18840 789 dl_set[itemdepth]=DL;
al@18840 790 }
al@18840 791 - out_html("<DT>");
al@18840 792 + out_html("<dt>");
al@18840 793 }
al@18840 794
al@18840 795 static inline void
al@18840 796 @@ -481,14 +449,14 @@
al@18840 797 itemdepth++;
al@18840 798 if (itemdepth < SIZE(dl_set))
al@18840 799 dl_set[itemdepth]=noDL;
al@18840 800 - out_html("<DL COMPACT><DT><DD>");
al@18840 801 + out_html("<dl compact><dt><dd>");
al@18840 802 }
al@18840 803
al@18840 804 static inline void
al@18840 805 dl_endlevel(void) {
al@18840 806 if (itemdepth) {
al@18840 807 dl_end();
al@18840 808 - out_html("</DL>\n");
al@18840 809 + out_html("</dl>\n");
al@18840 810 itemdepth--;
al@18840 811 }
al@18840 812 }
al@18840 813 @@ -538,12 +506,12 @@
al@18840 814
al@18840 815 #define FO0 ""
al@18840 816 #define FC0 ""
al@18840 817 -#define FO1 "<I>"
al@18840 818 -#define FC1 "</I>"
al@18840 819 -#define FO2 "<B>"
al@18840 820 -#define FC2 "</B>"
al@18840 821 -#define FO3 "<TT>"
al@18840 822 -#define FC3 "</TT>"
al@18840 823 +#define FO1 "<i>"
al@18840 824 +#define FC1 "</i>"
al@18840 825 +#define FO2 "<b>"
al@18840 826 +#define FC2 "</b>"
al@18840 827 +#define FO3 "<tt>"
al@18840 828 +#define FC3 "</tt>"
al@18840 829
al@18840 830 char *switchfont[16] = { "" , FC0 FO1, FC0 FO2, FC0 FO3,
al@18840 831 FC1 FO0, "" , FC1 FO2, FC1 FO3,
al@18840 832 @@ -588,14 +556,16 @@
al@18840 833 i=current_font;
al@18840 834 sizebuf[0]=0;
al@18840 835 strcat(sizebuf, change_to_font(0));
al@18840 836 - if (current_size) strcat(sizebuf, "</FONT>");
al@18840 837 + if (current_size) strcat(sizebuf, "</span>");
al@18840 838 current_size=nr;
al@18840 839 if (nr) {
al@18840 840 int l;
al@18840 841 - strcat(sizebuf, "<FONT SIZE=\"");
al@18840 842 + strcat(sizebuf, "<span style=\"font-size: ");
al@18840 843 l=strlen(sizebuf);
al@18840 844 if (nr>0) sizebuf[l++]='+'; else sizebuf[l++]='-',nr=-nr;
al@18840 845 sizebuf[l++]=nr+'0';
al@18840 846 + sizebuf[l++]='p';
al@18840 847 + sizebuf[l++]='t';
al@18840 848 sizebuf[l++]='"';
al@18840 849 sizebuf[l++]='>';
al@18840 850 sizebuf[l]=0;
al@18840 851 @@ -775,7 +745,7 @@
al@18840 852 skip_escape=exskipescape;
al@18840 853 intresult=j;
al@18840 854 break;
al@18840 855 - case 'l': h="<HR>"; curpos=0;
al@18840 856 + case 'l': h="<hr>"; curpos=0;
al@18840 857 case 'b':
al@18840 858 case 'v':
al@18840 859 case 'x':
al@18840 860 @@ -812,7 +782,7 @@
al@18840 861 case 'c': no_newline_output=1; break;
al@18840 862 case '{': newline_for_fun++; h="";break;
al@18840 863 case '}': if (newline_for_fun) newline_for_fun--; h="";break;
al@18840 864 - case 'p': h="<BR>\n";curpos=0; break;
al@18840 865 + case 'p': h="<br>\n";curpos=0; break;
al@18840 866 case 't': h="\t";curpos=(curpos+8)&0xfff8; break;
al@18840 867 case '<': h="&lt;";curpos++; break;
al@18840 868 case '>': h="&gt;";curpos++; break;
al@18840 869 @@ -1021,7 +991,7 @@
al@18840 870 out_html(change_to_size(0));
al@18840 871 if (!fillout) {
al@18840 872 fillout=1;
al@18840 873 - out_html("</PRE>");
al@18840 874 + out_html("</pre>");
al@18840 875 }
al@18840 876 while (*h && *h!='\n') h++;
al@18840 877 if (h[-1]==';') {
al@18840 878 @@ -1197,45 +1167,45 @@
al@18840 879 currow=currow->prev;
al@18840 880 }
al@18840 881 /* produce html output */
al@18840 882 - if (center) out_html("<CENTER>");
al@18840 883 - if (box==2) out_html("<TABLE BORDER><TR><TD>");
al@18840 884 - out_html("<TABLE");
al@18840 885 + if (center) out_html("<div style=\"margin: 0 auto\">");
al@18840 886 + if (box==2) out_html("<table border><tr><td>");
al@18840 887 + out_html("<table");
al@18840 888 if (box || border) {
al@18840 889 - out_html(" BORDER");
al@18840 890 - if (!border) out_html("><TR><TD><TABLE");
al@18840 891 - if (expand) out_html(" WIDTH=100%");
al@18840 892 + out_html(" border");
al@18840 893 + if (!border) out_html("><tr><td><table");
al@18840 894 + if (expand) out_html(" width=100%");
al@18840 895 }
al@18840 896 out_html(">\n");
al@18840 897 currow=layout;
al@18840 898 while (currow) {
al@18840 899 j=0;
al@18840 900 - out_html("<TR VALIGN=top>");
al@18840 901 + out_html("<tr style=\"vertical-align: top\">");
al@18840 902 curfield=currow->first;
al@18840 903 while (curfield) {
al@18840 904 if (curfield->align!='S' && curfield->align!='^') {
al@18840 905 - out_html("<TD");
al@18840 906 + out_html("<td");
al@18840 907 switch (curfield->align) {
al@18840 908 case 'N':
al@18840 909 curfield->space+=4;
al@18840 910 case 'R':
al@18840 911 - out_html(" ALIGN=right");
al@18840 912 + out_html(" style=\"text-align: right\"");
al@18840 913 break;
al@18840 914 case 'C':
al@18840 915 - out_html(" ALIGN=center");
al@18840 916 + out_html(" style=\"text-align: center\"");
al@18840 917 default:
al@18840 918 break;
al@18840 919 }
al@18840 920 if (!curfield->valign && curfield->rowspan>1)
al@18840 921 - out_html(" VALIGN=center");
al@18840 922 + out_html(" style=\"vertical-align: center\"");
al@18840 923 if (curfield->colspan>1) {
al@18840 924 char buf[5];
al@18840 925 - out_html(" COLSPAN=");
al@18840 926 + out_html(" colspan=");
al@18840 927 sprintf(buf, "%i", curfield->colspan);
al@18840 928 out_html(buf);
al@18840 929 }
al@18840 930 if (curfield->rowspan>1) {
al@18840 931 char buf[5];
al@18840 932 - out_html(" ROWSPAN=");
al@18840 933 + out_html(" rowspan=");
al@18840 934 sprintf(buf, "%i", curfield->rowspan);
al@18840 935 out_html(buf);
al@18840 936 }
al@18840 937 @@ -1244,8 +1214,8 @@
al@18840 938 if (curfield->size) out_html(change_to_size(curfield->size));
al@18840 939 if (curfield->font) out_html(change_to_font(curfield->font));
al@18840 940 switch (curfield->align) {
al@18840 941 - case '=': out_html("<HR><HR>"); break;
al@18840 942 - case '_': out_html("<HR>"); break;
al@18840 943 + case '=': out_html("<hr><hr>"); break;
al@18840 944 + case '_': out_html("<hr>"); break;
al@18840 945 default:
al@18840 946 if (curfield->contents) out_html(curfield->contents);
al@18840 947 break;
al@18840 948 @@ -1255,20 +1225,20 @@
al@18840 949 if (curfield->font) out_html(change_to_font(0));
al@18840 950 if (curfield->size) out_html(change_to_size(0));
al@18840 951 if (j>=maxcol && curfield->align>'@' && curfield->align!='_')
al@18840 952 - out_html("<BR>");
al@18840 953 - out_html("</TD>");
al@18840 954 + out_html("<br>");
al@18840 955 + out_html("</td>");
al@18840 956 }
al@18840 957 curfield=curfield->next;
al@18840 958 }
al@18840 959 - out_html("</TR>\n");
al@18840 960 + out_html("</tr>\n");
al@18840 961 currow=currow->next;
al@18840 962 }
al@18840 963 - if (box && !border) out_html("</TABLE>");
al@18840 964 - out_html("</TABLE>");
al@18840 965 - if (box==2) out_html("</TABLE>");
al@18840 966 - if (center) out_html("</CENTER>\n");
al@18840 967 + if (box && !border) out_html("</table>");
al@18840 968 + out_html("</table>");
al@18840 969 + if (box==2) out_html("</table>");
al@18840 970 + if (center) out_html("</div>\n");
al@18840 971 else out_html("\n");
al@18840 972 - if (!oldfillout) out_html("<PRE>");
al@18840 973 + if (!oldfillout) out_html("<pre>");
al@18840 974 fillout=oldfillout;
al@18840 975 out_html(change_to_size(oldsize));
al@18840 976 out_html(change_to_font(oldfont));
al@18840 977 @@ -1401,7 +1371,7 @@
al@18840 978 case '&': value = (value && value2); break;
al@18840 979 case ':': value = (value || value2); break;
al@18840 980 default: fprintf(stderr,
al@18840 981 - "man2html: Unknown operator %c.\n", oper);
al@18840 982 + _("man2html: Unknown operator %c.\n"), oper);
al@18840 983 }
al@18840 984 oper=0;
al@18840 985 }
al@18840 986 @@ -1489,42 +1459,42 @@
al@18840 987
al@18840 988
al@18840 989 char *section_list[] = {
al@18840 990 - "1", "User Commands ",
al@18840 991 - "1C", "User Commands",
al@18840 992 - "1G", "User Commands",
al@18840 993 - "1S", "User Commands",
al@18840 994 - "1V", "User Commands ",
al@18840 995 - "2", "System Calls",
al@18840 996 - "2V", "System Calls",
al@18840 997 - "3", "C Library Functions",
al@18840 998 - "3C", "Compatibility Functions",
al@18840 999 - "3F", "Fortran Library Routines",
al@18840 1000 - "3K", "Kernel VM Library Functions",
al@18840 1001 - "3L", "Lightweight Processes Library",
al@18840 1002 - "3M", "Mathematical Library",
al@18840 1003 - "3N", "Network Functions",
al@18840 1004 - "3R", "RPC Services Library",
al@18840 1005 - "3S", "Standard I/O Functions",
al@18840 1006 - "3V", "C Library Functions",
al@18840 1007 - "3X", "Miscellaneous Library Functions",
al@18840 1008 - "4", "Devices and Network Interfaces",
al@18840 1009 - "4F", "Protocol Families",
al@18840 1010 - "4I", "Devices and Network Interfaces",
al@18840 1011 - "4M", "Devices and Network Interfaces",
al@18840 1012 - "4N", "Devices and Network Interfaces",
al@18840 1013 - "4P", "Protocols",
al@18840 1014 - "4S", "Devices and Network Interfaces",
al@18840 1015 - "4V", "Devices and Network Interfaces",
al@18840 1016 - "5", "File Formats",
al@18840 1017 - "5V", "File Formats",
al@18840 1018 - "6", "Games and Demos",
al@18840 1019 - "7", "Environments, Tables, and Troff Macros",
al@18840 1020 - "7V", "Environments, Tables, and Troff Macros",
al@18840 1021 - "8", "Maintenance Commands",
al@18840 1022 - "8C", "Maintenance Commands",
al@18840 1023 - "8S", "Maintenance Commands",
al@18840 1024 - "8V", "Maintenance Commands",
al@18840 1025 - "L", "Local Commands",
al@18840 1026 + "1", N_("User Commands"),
al@18840 1027 + "1C", N_("User Commands"),
al@18840 1028 + "1G", N_("User Commands"),
al@18840 1029 + "1S", N_("User Commands"),
al@18840 1030 + "1V", N_("User Commands"),
al@18840 1031 + "2", N_("System Calls"),
al@18840 1032 + "2V", N_("System Calls"),
al@18840 1033 + "3", N_("C Library Functions"),
al@18840 1034 + "3C", N_("Compatibility Functions"),
al@18840 1035 + "3F", N_("Fortran Library Routines"),
al@18840 1036 + "3K", N_("Kernel VM Library Functions"),
al@18840 1037 + "3L", N_("Lightweight Processes Library"),
al@18840 1038 + "3M", N_("Mathematical Library"),
al@18840 1039 + "3N", N_("Network Functions"),
al@18840 1040 + "3R", N_("RPC Services Library"),
al@18840 1041 + "3S", N_("Standard I/O Functions"),
al@18840 1042 + "3V", N_("C Library Functions"),
al@18840 1043 + "3X", N_("Miscellaneous Library Functions"),
al@18840 1044 + "4", N_("Devices and Network Interfaces"),
al@18840 1045 + "4F", N_("Protocol Families"),
al@18840 1046 + "4I", N_("Devices and Network Interfaces"),
al@18840 1047 + "4M", N_("Devices and Network Interfaces"),
al@18840 1048 + "4N", N_("Devices and Network Interfaces"),
al@18840 1049 + "4P", N_("Protocols"),
al@18840 1050 + "4S", N_("Devices and Network Interfaces"),
al@18840 1051 + "4V", N_("Devices and Network Interfaces"),
al@18840 1052 + "5", N_("File Formats"),
al@18840 1053 + "5V", N_("File Formats"),
al@18840 1054 + "6", N_("Games and Demos"),
al@18840 1055 + "7", N_("Environments, Tables, and Troff Macros"),
al@18840 1056 + "7V", N_("Environments, Tables, and Troff Macros"),
al@18840 1057 + "8", N_("Maintenance Commands"),
al@18840 1058 + "8C", N_("Maintenance Commands"),
al@18840 1059 + "8S", N_("Maintenance Commands"),
al@18840 1060 + "8V", N_("Maintenance Commands"),
al@18840 1061 + "L", N_("Local Commands"),
al@18840 1062 /* for Solaris:
al@18840 1063 "1", "User Commands",
al@18840 1064 "1B", "SunOS/BSD Compatibility Package Commands",
al@18840 1065 @@ -1593,7 +1563,7 @@
al@18840 1066 "9s", "DDI and DKI Data Structures",
al@18840 1067 "L", "Local Commands",
al@18840 1068 */
al@18840 1069 - NULL, "Misc. Reference Manual Pages",
al@18840 1070 + NULL, N_("Misc. Reference Manual Pages"),
al@18840 1071 NULL, NULL
al@18840 1072 };
al@18840 1073
al@18840 1074 @@ -1604,7 +1574,7 @@
al@18840 1075
al@18840 1076 if (!c) return "";
al@18840 1077 while (section_list[i] && strcmp(c,section_list[i])) i=i+2;
al@18840 1078 - if (section_list[i+1]) return section_list[i+1];
al@18840 1079 + if (section_list[i+1]) return _(section_list[i+1]);
al@18840 1080 else return c;
al@18840 1081 }
al@18840 1082
al@18840 1083 @@ -1636,10 +1606,10 @@
al@18840 1084 if (level != subs) {
al@18840 1085 manidx_need(6);
al@18840 1086 if (subs) {
al@18840 1087 - strcpy(manidx+mip, "</DL>\n");
al@18840 1088 + strcpy(manidx+mip, "</dl>\n");
al@18840 1089 mip += 6;
al@18840 1090 } else {
al@18840 1091 - strcpy(manidx+mip, "<DL>\n");
al@18840 1092 + strcpy(manidx+mip, "<dl>\n");
al@18840 1093 mip += 5;
al@18840 1094 }
al@18840 1095 }
al@18840 1096 @@ -1647,7 +1617,7 @@
al@18840 1097
al@18840 1098 scan_troff(item, 1, &c);
al@18840 1099 manidx_need(100 + strlen(c));
al@18840 1100 - sprintf(manidx+mip, "<DT><A HREF=\"#%s\">%s</A><DD>\n", label, c);
al@18840 1101 + sprintf(manidx+mip, "<dt><a href=\"#%s\">%s</a></dt><dd>\n", label, c);
al@18840 1102 if (c) free(c);
al@18840 1103 while (manidx[mip]) mip++;
al@18840 1104 }
al@18840 1105 @@ -1834,8 +1804,8 @@
al@18840 1106 }
al@18840 1107 break;
al@18840 1108 case V('b','r'):
al@18840 1109 - if (still_dd) out_html("<DD>");
al@18840 1110 - else out_html("<BR>\n");
al@18840 1111 + if (still_dd) out_html("<dd>");
al@18840 1112 + else out_html("<br>\n");
al@18840 1113 curpos=0;
al@18840 1114 c=c+j;
al@18840 1115 if (c[0] == escapesym) { c=scan_escape(c+1); }
al@18840 1116 @@ -1865,17 +1835,17 @@
al@18840 1117 c=skip_till_newline(c);
al@18840 1118 /* center next i lines */
al@18840 1119 if (i>0) {
al@18840 1120 - out_html("<CENTER>\n");
al@18840 1121 + out_html("<div style=\"margin: 0 auto\">\n");
al@18840 1122 while (i && *c) {
al@18840 1123 char *line=NULL;
al@18840 1124 c=scan_troff(c,1, &line);
al@18840 1125 - if (line && strncmp(line, "<BR>", 4)) {
al@18840 1126 + if (line && strncmp(line, "<br>", 4)) {
al@18840 1127 out_html(line);
al@18840 1128 - out_html("<BR>\n");
al@18840 1129 + out_html("<br>\n");
al@18840 1130 i--;
al@18840 1131 }
al@18840 1132 }
al@18840 1133 - out_html("</CENTER>\n");
al@18840 1134 + out_html("</div>\n");
al@18840 1135 curpos=0;
al@18840 1136 }
al@18840 1137 break;
al@18840 1138 @@ -1906,7 +1876,7 @@
al@18840 1139 if (!fillout) {
al@18840 1140 out_html(change_to_font(0));
al@18840 1141 out_html(change_to_size('0'));
al@18840 1142 - out_html("</PRE>\n");
al@18840 1143 + out_html("</pre>\n");
al@18840 1144 }
al@18840 1145 curpos=0;
al@18840 1146 fillout=1;
al@18840 1147 @@ -1981,7 +1951,7 @@
al@18840 1148 if (fillout) {
al@18840 1149 out_html(change_to_font(0));
al@18840 1150 out_html(change_to_size('0'));
al@18840 1151 - out_html("<PRE>\n");
al@18840 1152 + out_html("<pre>\n");
al@18840 1153 }
al@18840 1154 curpos=0;
al@18840 1155 fillout=0;
al@18840 1156 @@ -2002,7 +1972,7 @@
al@18840 1157 break;
al@18840 1158 case V('s','p'):
al@18840 1159 c=c+j;
al@18840 1160 - if (fillout) out_html("<P>"); else {
al@18840 1161 + if (fillout) out_html("<p>"); else {
al@18840 1162 out_html(NEWLINE);
al@18840 1163 NEWLINE[0]='\n';
al@18840 1164 }
al@18840 1165 @@ -2033,30 +2003,15 @@
al@18840 1166 *c = 0;
al@18840 1167 scan_troff(h,1, &name);
al@18840 1168 if (name[3] == '/') h=name+3; else h=name;
al@18840 1169 -#if NOCGI
al@18840 1170 - if (!out_length) {
al@18840 1171 - char *t,*s;
al@18840 1172 - t=strrchr(fname, '/');
al@18840 1173 - if (!t) t=fname;
al@18840 1174 - fprintf(stderr, "ln -s %s.html %s.html\n", h, t);
al@18840 1175 - s=strrchr(t, '.');if (!s) s=t;
al@18840 1176 - printf(CONTENTTYPE DOCTYPE);
al@18840 1177 - printf("<HTML><HEAD><TITLE> Man page of %s</TITLE>\n"
al@18840 1178 - "</HEAD><BODY>\n"
al@18840 1179 - "See the man page for <A HREF=\"%s.html\">%s</A>.\n"
al@18840 1180 - "</BODY></HTML>\n",
al@18840 1181 - s, h, h);
al@18840 1182 - } else
al@18840 1183 -#endif
al@18840 1184 {
al@18840 1185 /* this works alright, except for section 3 */
al@18840 1186 if ((l = read_manpage_into_buffer(h, &buf)) < 0) {
al@18840 1187 fprintf(stderr,
al@18840 1188 - "man2html: unable to open or read file %s\n", h);
al@18840 1189 - out_html("<BLOCKQUOTE>"
al@18840 1190 - "man2html: unable to open or read file\n");
al@18840 1191 + _("man2html: unable to open or read file %s\n"), h);
al@18840 1192 + out_html("<blockquote>");
al@18840 1193 + out_html(_("man2html: unable to open or read file\n"));
al@18840 1194 out_html(h);
al@18840 1195 - out_html("</BLOCKQUOTE>\n");
al@18840 1196 + out_html("</blockquote>\n");
al@18840 1197 } else {
al@18840 1198 buf[0]=buf[l]='\n';
al@18840 1199 buf[l+1]=buf[l+2]=0;
al@18840 1200 @@ -2085,7 +2040,7 @@
al@18840 1201 #if 0
al@18840 1202 dl_down();
al@18840 1203 #endif
al@18840 1204 - out_html("<BR>\n");
al@18840 1205 + out_html("<br>\n");
al@18840 1206 c=c+j;
al@18840 1207 c=scan_expression(c, &j);
al@18840 1208 for (i=0; i<j; i++) out_html("&nbsp;");
al@18840 1209 @@ -2163,7 +2118,7 @@
al@18840 1210 if (words) {
al@18840 1211 scan_troff(wordlist[0], 1,NULL);
al@18840 1212 }
al@18840 1213 - out_html("<DD>");
al@18840 1214 + out_html("<dd>");
al@18840 1215 curpos = 0;
al@18840 1216 break;
al@18840 1217 case V('T','P'):
al@18840 1218 @@ -2172,7 +2127,7 @@
al@18840 1219 /* somewhere a definition ends with '.TP' */
al@18840 1220 if (!*c) still_dd=1; else {
al@18840 1221 c=scan_troff(c,1,NULL);
al@18840 1222 - out_html("<DD>");
al@18840 1223 + out_html("<dd>");
al@18840 1224 }
al@18840 1225 curpos=0;
al@18840 1226 break;
al@18840 1227 @@ -2195,20 +2150,20 @@
al@18840 1228 fprintf(idxfile,"\n");
al@18840 1229 }
al@18840 1230 #endif
al@18840 1231 - out_html("<A NAME=\"");
al@18840 1232 + out_html("<span id=\"");
al@18840 1233 out_html(idxlabel);
al@18840 1234 /* this will not work in mosaic (due to a bug).
al@18840 1235 ** Adding '&nbsp;' between '>' and '<' solves it, but creates
al@18840 1236 ** some space. A normal space does not work.
al@18840 1237 */
al@18840 1238 - out_html("\"></A>");
al@18840 1239 + out_html("\"></span>");
al@18840 1240 break;
al@18840 1241 case V('P',' '):
al@18840 1242 case V('P','\n'):
al@18840 1243 case V('L','P'):
al@18840 1244 case V('P','P'):
al@18840 1245 dl_end();
al@18840 1246 - if (fillout) out_html("<P>\n"); else {
al@18840 1247 + if (fillout) out_html("<p>\n"); else {
al@18840 1248 out_html(NEWLINE);
al@18840 1249 NEWLINE[0]='\n';
al@18840 1250 }
al@18840 1251 @@ -2272,19 +2227,29 @@
al@18840 1252 out_html(change_to_size(0));
al@18840 1253 if (!fillout) {
al@18840 1254 fillout=1;
al@18840 1255 - out_html("</PRE>");
al@18840 1256 + out_html("</pre>");
al@18840 1257 }
al@18840 1258 trans_char(c,'"', '\a');
al@18840 1259 add_to_index(mode, c);
al@18840 1260 - out_html("<A NAME=\"");
al@18840 1261 - out_html(label);
al@18840 1262 - /* &nbsp; for mosaic users */
al@18840 1263 - if (mode) out_html("\">&nbsp;</A>\n<H3>");
al@18840 1264 - else out_html("\">&nbsp;</A>\n<H2>");
al@18840 1265 +
al@18840 1266 + if (mode) {
al@18840 1267 + out_html("<h3 id=\"");
al@18840 1268 + out_html(label);
al@18840 1269 + out_html("\">");
al@18840 1270 + } else {
al@18840 1271 + out_html("</section>\n\n<section id=\"");
al@18840 1272 + out_html(label);
al@18840 1273 + out_html("\">\n<h2>");
al@18840 1274 + }
al@18840 1275 +
al@18840 1276 mandoc_synopsis = (strncmp(c, "SYNOPSIS", 8) == 0);
al@18840 1277 c = (mandoc_command ? scan_troff_mandoc : scan_troff)(c,1,NULL);
al@18840 1278 - if (mode) out_html("</H3>\n");
al@18840 1279 - else out_html("</H2>\n");
al@18840 1280 +
al@18840 1281 + if (mode)
al@18840 1282 + out_html("</h3>\n");
al@18840 1283 + else
al@18840 1284 + out_html("</h2>\n");
al@18840 1285 +
al@18840 1286 curpos=0;
al@18840 1287 break;
al@18840 1288 case V('T','S'):
al@18840 1289 @@ -2315,7 +2280,7 @@
al@18840 1290 int skip=0;
al@18840 1291 output_possible=1;
al@18840 1292 printf(CONTENTTYPE DOCTYPE);
al@18840 1293 - out_html("<HTML><HEAD><TITLE>Man page of ");
al@18840 1294 + out_html("<html><head>\n<meta charset=\"UTF-8\">\n<title>");
al@18840 1295 scan_troff(wordlist[0], 0, &t);
al@18840 1296 /* we need to remove all html tags */
al@18840 1297 for (s=q=t; *s; s++) {
al@18840 1298 @@ -2324,11 +2289,14 @@
al@18840 1299 else if (!skip) *q++ = *s;
al@18840 1300 }
al@18840 1301 *q = '\0';
al@18840 1302 - out_html(t);
al@18840 1303 + char buff[256];
al@18840 1304 + sprintf(buff, _("Man page of %s"), t);
al@18840 1305 + out_html(buff);
al@18840 1306 free(t);
al@18840 1307 - out_html("</TITLE>\n</HEAD><BODY>\n<H1>");
al@18840 1308 + out_html("</title>\n<link rel=\"stylesheet\" href=\"?css\">\n</head><body>\n<header><h1>");
al@18840 1309 scan_troff(wordlist[0], 0, NULL);
al@18840 1310 - out_html("</H1>\nSection: ");
al@18840 1311 + out_html("</h1></header>\n<section>\n");
al@18840 1312 + out_html(_("Section: "));
al@18840 1313 if (words>4)
al@18840 1314 scan_troff(wordlist[4], 0, NULL);
al@18840 1315 else
al@18840 1316 @@ -2336,14 +2304,17 @@
al@18840 1317 out_html(" (");
al@18840 1318 scan_troff(wordlist[1], 0, NULL);
al@18840 1319 if (words>2) {
al@18840 1320 - out_html(")<BR>Updated: ");
al@18840 1321 + out_html(")<br>");
al@18840 1322 + out_html(_("Updated: "));
al@18840 1323 scan_troff(wordlist[2], 1, NULL);
al@18840 1324 } else out_html(")");
al@18840 1325 - out_html("<BR><A HREF=\"#index\">Index</A>\n");
al@18840 1326 + out_html("<br><a href=\"#index\">");
al@18840 1327 + out_html(_("Index"));
al@18840 1328 + out_html("</a>\n");
al@18840 1329 man_page_html(0,0); /* Return to Main Contents */
al@18840 1330 *sl='\n';
al@18840 1331 - out_html("<HR>\n");
al@18840 1332 - if (mandoc_command) out_html("<BR>BSD mandoc<BR>");
al@18840 1333 + out_html("<hr>\n");
al@18840 1334 + if (mandoc_command) out_html("<br>\nBSD mandoc<br>");
al@18840 1335 }
al@18840 1336 c = sl+1;
al@18840 1337 } else
al@18840 1338 @@ -2507,7 +2478,7 @@
al@18840 1339 dl_newlevel_type(DL);
al@18840 1340 if (nl)
al@18840 1341 *nl = t;
al@18840 1342 - if (fillout) out_html("<P>\n"); else {
al@18840 1343 + if (fillout) out_html("<p>\n"); else {
al@18840 1344 out_html(NEWLINE);
al@18840 1345 NEWLINE[0]='\n';
al@18840 1346 }
al@18840 1347 @@ -2518,7 +2489,7 @@
al@18840 1348 case V('E','l'): /* BSD mandoc */
al@18840 1349 c=c+j;
al@18840 1350 dl_endlevel_type();
al@18840 1351 - if (fillout) out_html("<P>\n"); else {
al@18840 1352 + if (fillout) out_html("<p>\n"); else {
al@18840 1353 out_html(NEWLINE);
al@18840 1354 NEWLINE[0]='\n';
al@18840 1355 }
al@18840 1356 @@ -2528,7 +2499,7 @@
al@18840 1357 case V('I','t'): /* BSD mandoc */
al@18840 1358 c=c+j;
al@18840 1359 if (dl_type(DL)) {
al@18840 1360 - out_html("<DT>");
al@18840 1361 + out_html("<dt>");
al@18840 1362 out_html(change_to_font('B'));
al@18840 1363 if (*c == '\n') {
al@18840 1364 /* Don't allow embedded comms after a newline */
al@18840 1365 @@ -2543,9 +2514,9 @@
al@18840 1366 if (inXo)
al@18840 1367 still_dd = 1;
al@18840 1368 else
al@18840 1369 - out_html("<DD>");
al@18840 1370 + out_html("<dd>");
al@18840 1371 } else if (dl_type(UL) || dl_type(OL)) {
al@18840 1372 - out_html("<LI>");
al@18840 1373 + out_html("<li>");
al@18840 1374 c=scan_troff_mandoc(c,1,NULL);
al@18840 1375 out_html(NEWLINE);
al@18840 1376 }
al@18840 1377 @@ -2559,7 +2530,7 @@
al@18840 1378 c=c+j;
al@18840 1379 if (inXo) {
al@18840 1380 if (still_dd)
al@18840 1381 - out_html("<DD>");
al@18840 1382 + out_html("<dd>");
al@18840 1383 inXo = 0;
al@18840 1384 }
al@18840 1385 break;
al@18840 1386 @@ -2594,12 +2565,12 @@
al@18840 1387 case V('D','l'): /* BSD mandoc */
al@18840 1388 c=c+j;
al@18840 1389 out_html(NEWLINE);
al@18840 1390 - out_html("<BLOCKQUOTE>");
al@18840 1391 + out_html("<blockquote>");
al@18840 1392 out_html(change_to_font('L'));
al@18840 1393 if (*c == '\n') c++;
al@18840 1394 c=scan_troff_mandoc(c, 1, NULL);
al@18840 1395 out_html(change_to_font('R'));
al@18840 1396 - out_html("</BLOCKQUOTE>");
al@18840 1397 + out_html("</blockquote>");
al@18840 1398 if (fillout) curpos++; else curpos=0;
al@18840 1399 break;
al@18840 1400 case V('B','d'): /* BSD mandoc */
al@18840 1401 @@ -2615,14 +2586,14 @@
al@18840 1402 mandoc_bd_options = 0; /* Remember options for terminating Bl */
al@18840 1403 if (strstr(c, "-offset indent")) {
al@18840 1404 mandoc_bd_options |= BD_INDENT;
al@18840 1405 - out_html("<BLOCKQUOTE>\n");
al@18840 1406 + out_html("<blockquote>\n");
al@18840 1407 }
al@18840 1408 if (strstr(c, "-literal") || strstr(c, "-unfilled")) {
al@18840 1409 if (fillout) {
al@18840 1410 mandoc_bd_options |= BD_LITERAL;
al@18840 1411 out_html(change_to_font(0));
al@18840 1412 out_html(change_to_size('0'));
al@18840 1413 - out_html("<PRE>\n");
al@18840 1414 + out_html("<pre>\n");
al@18840 1415 }
al@18840 1416 curpos=0;
al@18840 1417 fillout=0;
al@18840 1418 @@ -2637,18 +2608,18 @@
al@18840 1419 if (!fillout) {
al@18840 1420 out_html(change_to_font(0));
al@18840 1421 out_html(change_to_size('0'));
al@18840 1422 - out_html("</PRE>\n");
al@18840 1423 + out_html("</pre>\n");
al@18840 1424 }
al@18840 1425 }
al@18840 1426 if (mandoc_bd_options & BD_INDENT)
al@18840 1427 - out_html("</BLOCKQUOTE>\n");
al@18840 1428 + out_html("</blockquote>\n");
al@18840 1429 curpos=0;
al@18840 1430 fillout=1;
al@18840 1431 c=skip_till_newline(c);
al@18840 1432 break;
al@18840 1433 case V('B','e'): /* BSD mandoc */
al@18840 1434 c=c+j;
al@18840 1435 - if (fillout) out_html("<P>"); else {
al@18840 1436 + if (fillout) out_html("<p>"); else {
al@18840 1437 out_html(NEWLINE);
al@18840 1438 NEWLINE[0]='\n';
al@18840 1439 }
al@18840 1440 @@ -2715,7 +2686,7 @@
al@18840 1441 if (fillout) curpos++; else curpos=0;
al@18840 1442 break;
al@18840 1443 case V('P','p'): /* BSD mandoc */
al@18840 1444 - if (fillout) out_html("<P>\n"); else {
al@18840 1445 + if (fillout) out_html("<p>\n"); else {
al@18840 1446 out_html(NEWLINE);
al@18840 1447 NEWLINE[0]='\n';
al@18840 1448 }
al@18840 1449 @@ -2726,9 +2697,9 @@
al@18840 1450 trans_char(c,'"','\a');
al@18840 1451 c=c+j;
al@18840 1452 if (*c == '\n') c++;
al@18840 1453 - out_html("``");
al@18840 1454 + out_html("“");
al@18840 1455 c=scan_troff_mandoc(c, 1, NULL);
al@18840 1456 - out_html("''");
al@18840 1457 + out_html("”");
al@18840 1458 out_html(NEWLINE);
al@18840 1459 if (fillout) curpos++; else curpos=0;
al@18840 1460 break;
al@18840 1461 @@ -2800,12 +2771,22 @@
al@18840 1462 trans_char(c,'"','\a');
al@18840 1463 c=c+j;
al@18840 1464 if (*c == '\n') c++;
al@18840 1465 - out_html("`");
al@18840 1466 + out_html("‘");
al@18840 1467 c=scan_troff_mandoc(c, 1, NULL);
al@18840 1468 - out_html("'");
al@18840 1469 + out_html("’");
al@18840 1470 out_html(NEWLINE);
al@18840 1471 if (fillout) curpos++; else curpos=0;
al@18840 1472 break;
al@18840 1473 + case V('A','q'): /* BSD mandoc */
al@18840 1474 + trans_char(c,'"','\a');
al@18840 1475 + c=c+j;
al@18840 1476 + if (*c == '\n') c++;
al@18840 1477 + out_html("⟨");
al@18840 1478 + c=scan_troff_mandoc(c, 1, NULL);
al@18840 1479 + out_html("⟩");
al@18840 1480 + out_html(NEWLINE);
al@18840 1481 + if (fillout) curpos++; else curpos=0;
al@18840 1482 + break;
al@18840 1483 case V('A','r'): /* BSD mandoc */
al@18840 1484 /* parse one line in italics */
al@18840 1485 out_html(change_to_font('I'));
al@18840 1486 @@ -2855,7 +2836,7 @@
al@18840 1487 */
al@18840 1488 static int count = 0; /* Don't break on the first Nm */
al@18840 1489 if (count) {
al@18840 1490 - out_html("<BR>");
al@18840 1491 + out_html("<br>");
al@18840 1492 } else {
al@18840 1493 char *end, t=0 /* just for gcc */;
al@18840 1494 end = strchr(c, '\n');
al@18840 1495 @@ -3038,7 +3019,7 @@
al@18840 1496 if (h[-1] == '\n' && still_dd && isalnum(*h)) {
al@18840 1497 /* sometimes a .HP request is not followed by a .br request */
al@18840 1498 FLUSHIBP;
al@18840 1499 - out_html("<DD>");
al@18840 1500 + out_html("<dd>");
al@18840 1501 curpos=0;
al@18840 1502 still_dd=0;
al@18840 1503 }
al@18840 1504 @@ -3108,12 +3089,12 @@
al@18840 1505 curpos++;
al@18840 1506 }
al@18840 1507 } else {
al@18840 1508 - out_html("<TT>");
al@18840 1509 + out_html("<tt>");
al@18840 1510 while (curpos < tabstops[curtab]) {
al@18840 1511 out_html("&nbsp;");
al@18840 1512 curpos++;
al@18840 1513 }
al@18840 1514 - out_html("</TT>");
al@18840 1515 + out_html("</tt>");
al@18840 1516 }
al@18840 1517 }
al@18840 1518 }
al@18840 1519 @@ -3122,7 +3103,7 @@
al@18840 1520 if (*h == ' ' && (h[-1] == '\n' || usenbsp)) {
al@18840 1521 FLUSHIBP;
al@18840 1522 if (!usenbsp && fillout) {
al@18840 1523 - out_html("<BR>");
al@18840 1524 + out_html("<br>");
al@18840 1525 curpos=0;
al@18840 1526 }
al@18840 1527 usenbsp=fillout;
al@18840 1528 @@ -3196,13 +3177,13 @@
al@18840 1529
al@18840 1530 switch(status) {
al@18840 1531 case 403:
al@18840 1532 - printf("Status: 403 Forbidden\n");
al@18840 1533 + printf("HTTP/1.1 403 Forbidden\n");
al@18840 1534 break;
al@18840 1535 case 404:
al@18840 1536 - printf("Status: 404 Not Found\n");
al@18840 1537 + printf("HTTP/1.1 404 Not Found\n");
al@18840 1538 break;
al@18840 1539 case 500:
al@18840 1540 - printf("Status: 500 Internal Server Error\n");
al@18840 1541 + printf("HTTP/1.1 500 Internal Server Error\n");
al@18840 1542 break;
al@18840 1543 case 0:
al@18840 1544 default:
al@18840 1545 @@ -3210,12 +3191,13 @@
al@18840 1546 }
al@18840 1547
al@18840 1548 printf(CONTENTTYPE DOCTYPE);
al@18840 1549 - printf("<HTML><HEAD><TITLE>%s</TITLE></HEAD>\n"
al@18840 1550 - "<BODY>\n<H1>%s</H1>\n", s, s);
al@18840 1551 + printf("<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>%s</title>\n"
al@18840 1552 + "<link rel=\"stylesheet\" href=\"?css\">\n</head>\n"
al@18840 1553 + "<body>\n<header><h1>%s</h1></header>\n<section>\n", s, s);
al@18840 1554 va_start(p, t);
al@18840 1555 vfprintf(stdout, t, p);
al@18840 1556 va_end(p);
al@18840 1557 - printf("</BODY></HTML>\n");
al@18840 1558 + printf("</section>\n</body></html>\n");
al@18840 1559 exit(0);
al@18840 1560 }
al@18840 1561
al@18840 1562 @@ -3223,8 +3205,8 @@
al@18840 1563 xstrdup(const char *s) {
al@18840 1564 char *p = strdup(s);
al@18840 1565 if (p == NULL)
al@18840 1566 - error_page(500, "Out of memory",
al@18840 1567 - "Sorry, out of memory, aborting...\n");
al@18840 1568 + error_page(500, _("Out of memory"),
al@18840 1569 + _("Sorry, out of memory, aborting...\n"));
al@18840 1570 return p;
al@18840 1571 }
al@18840 1572
al@18840 1573 @@ -3232,8 +3214,8 @@
al@18840 1574 xmalloc(size_t size) {
al@18840 1575 void *p = malloc(size);
al@18840 1576 if (p == NULL)
al@18840 1577 - error_page(500, "Out of memory",
al@18840 1578 - "Sorry, out of memory, aborting...\n");
al@18840 1579 + error_page(500, _("Out of memory"),
al@18840 1580 + _("Sorry, out of memory, aborting...\n"));
al@18840 1581 return p;
al@18840 1582 }
al@18840 1583
al@18840 1584 @@ -3241,16 +3223,16 @@
al@18840 1585 xrealloc(void *ptr, size_t size) {
al@18840 1586 void *p = realloc(ptr,size);
al@18840 1587 if (p == NULL)
al@18840 1588 - error_page(500, "Out of memory",
al@18840 1589 - "Sorry, out of memory, aborting...\n");
al@18840 1590 + error_page(500, _("Out of memory"),
al@18840 1591 + _("Sorry, out of memory, aborting...\n"));
al@18840 1592 return p;
al@18840 1593 }
al@18840 1594
al@18840 1595 static void
al@18840 1596 usage(void) {
al@18840 1597 - error_page(500, "man2html: bad invocation",
al@18840 1598 - "Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n"
al@18840 1599 - "or: man2html -r [filename]\n");
al@18840 1600 + error_page(500, _("man2html: bad invocation"),
al@18840 1601 + _("Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n"
al@18840 1602 + "or: man2html -r [filename]\n"));
al@18840 1603 }
al@18840 1604
al@18840 1605 static void
al@18840 1606 @@ -3273,7 +3255,7 @@
al@18840 1607 }
al@18840 1608 #if 0
al@18840 1609 else /* complain or not - this need not be fatal */
al@18840 1610 - error_page("Error", "man2html: could not chdir to %s", s);
al@18840 1611 + error_page(_("Error"), _("man2html: could not chdir to %s"), s);
al@18840 1612 #endif
al@18840 1613 }
al@18840 1614 }
al@18840 1615 @@ -3291,6 +3273,11 @@
al@18840 1616 */
al@18840 1617 int
al@18840 1618 main(int argc, char **argv) {
al@18840 1619 + setlocale (LC_ALL, "");
al@18840 1620 + bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
al@18840 1621 + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
al@18840 1622 + textdomain (GETTEXT_PACKAGE);
al@18840 1623 +
al@18840 1624 int l, c;
al@18840 1625 char *buf, *filename, *fnam = NULL;
al@18840 1626
al@18840 1627 @@ -3309,7 +3296,7 @@
al@18840 1628 case 'D':
al@18840 1629 goto_dir(optarg, 0, 0); break;
al@18840 1630 case 'E':
al@18840 1631 - error_page(0, "Error", "%s", optarg); break;
al@18840 1632 + error_page(0, _("Error"), "%s", optarg); break;
al@18840 1633 case 'h':
al@18840 1634 set_cgibase("localhost"); break;
al@18840 1635 case 'H':
al@18840 1636 @@ -3362,7 +3349,7 @@
al@18840 1637
al@18840 1638 l = read_manpage_into_buffer(fnam, &buf);
al@18840 1639 if (l < 0)
al@18840 1640 - error_page(404, "File not found", "Could not open %s\n", fname);
al@18840 1641 + error_page(404, _("File not found"), _("Could not open %s\n"), fname);
al@18840 1642
al@18840 1643 buf[0] = '\n';
al@18840 1644 buf[l+1] = '\n';
al@18840 1645 @@ -3379,34 +3366,34 @@
al@18840 1646 out_html(change_to_size(0));
al@18840 1647 if (!fillout) {
al@18840 1648 fillout=1;
al@18840 1649 - out_html("</PRE>");
al@18840 1650 + out_html("</pre>");
al@18840 1651 }
al@18840 1652 out_html(NEWLINE);
al@18840 1653 if (output_possible) {
al@18840 1654 /* &nbsp; for mosaic users */
al@18840 1655 if (manidx) {
al@18840 1656 - printf("<HR>\n<A NAME=\"index\">&nbsp;</A><H2>Index</H2>\n<DL>\n");
al@18840 1657 + printf("</section>\n\n<section id=\"index\">\n<h2>%s</h2>\n\n<dl>\n", _("Index"));
al@18840 1658 manidx[mip]=0;
al@18840 1659 printf("%s", manidx);
al@18840 1660 - if (subs) printf("</DL>\n");
al@18840 1661 - printf("</DL>\n");
al@18840 1662 + if (subs) printf("</dl>\n");
al@18840 1663 + printf("</dl>\n");
al@18840 1664 }
al@18840 1665 print_sig();
al@18840 1666 - printf("</BODY>\n</HTML>\n");
al@18840 1667 + printf("</body>\n</html>\n");
al@18840 1668 } else {
al@18840 1669 if (!filename)
al@18840 1670 filename = fname;
al@18840 1671 if (*filename == '/')
al@18840 1672 - error_page(403, "Invalid Man Page",
al@18840 1673 - "The requested file %s is not a valid (unformatted) "
al@18840 1674 + error_page(403, _("Invalid Man Page"),
al@18840 1675 + _("The requested file %s is not a valid (unformatted) "
al@18840 1676 "man page.\nIf the file is a formatted man page, "
al@18840 1677 "you could try to load the\n"
al@18840 1678 - "<A HREF=\"file://%s\">plain file</A>.\n",
al@18840 1679 + "<a href=\"file://%s\">plain file</a>.\n"),
al@18840 1680 filename, filename);
al@18840 1681 else
al@18840 1682 - error_page(403, "Invalid Man Page",
al@18840 1683 - "The requested file %s is not a valid (unformatted) "
al@18840 1684 - "man page.", filename);
al@18840 1685 + error_page(403, _("Invalid Man Page"),
al@18840 1686 + _("The requested file %s is not a valid (unformatted) "
al@18840 1687 + "man page."), filename);
al@18840 1688 }
al@18840 1689 if (idxfile)
al@18840 1690 fclose(idxfile);
al@18840 1691 --- a/scripts/cgi-bin/man/man2html
al@18840 1692 +++ b/scripts/cgi-bin/man/man2html
al@18840 1693 @@ -8,11 +8,11 @@
al@18840 1694
al@18840 1695 # Do we need lynxcgi URLs? For the moment our criterion is
al@18840 1696 # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
al@18840 1697 -AGENT="${HTTP_USER_AGENT-unknown}"
al@18840 1698 +AGENT="${HTTP_USER_AGENT:-unknown}"
al@18840 1699
al@18840 1700 case "$AGENT" in
al@18840 1701 Lynx*|lynx*)
al@18840 1702 - HH="${HTTP_HOST-nohh}"
al@18840 1703 + HH="${HTTP_HOST:-nohh}"
al@18840 1704 SED="s/%lynx //"
al@18840 1705 ;;
al@18840 1706 *)
al@18840 1707 @@ -21,7 +21,7 @@
al@18840 1708 ;;
al@18840 1709 esac
al@18840 1710
al@18840 1711 -SERVER="${SERVER_NAME-localhost}"
al@18840 1712 +SERVER="${SERVER_NAME:-localhost}"
al@18840 1713 case "$HH" in
al@18840 1714 nohh)
al@18840 1715 LL="-l"
al@18840 1716 --- a/scripts/cgi-bin/man/mansearch
al@18840 1717 +++ b/scripts/cgi-bin/man/mansearch
al@18840 1718 @@ -7,11 +7,11 @@
al@18840 1719
al@18840 1720 # Do we need lynxcgi URLs? For the moment our criterion is
al@18840 1721 # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
al@18840 1722 -AGENT="${HTTP_USER_AGENT-unknown}"
al@18840 1723 +AGENT="${HTTP_USER_AGENT:-unknown}"
al@18840 1724
al@18840 1725 case "$AGENT" in
al@18840 1726 Lynx*|lynx*)
al@18840 1727 - HH="${HTTP_HOST-nohh}"
al@18840 1728 + HH="${HTTP_HOST:-nohh}"
al@18840 1729 SED="s/%lynx //"
al@18840 1730 ;;
al@18840 1731 *)
al@18840 1732 @@ -20,7 +20,7 @@
al@18840 1733 ;;
al@18840 1734 esac
al@18840 1735
al@18840 1736 -SERVER="${SERVER_NAME-localhost}"
al@18840 1737 +SERVER="${SERVER_NAME:-localhost}"
al@18840 1738 case "$HH" in
al@18840 1739 nohh)
al@18840 1740 CG="lynxcgi:/usr/lib/cgi-bin/man"
al@18840 1741 --- a/scripts/cgi-bin/man/mansearchhelp
al@18840 1742 +++ b/scripts/cgi-bin/man/mansearchhelp
al@18840 1743 @@ -4,17 +4,17 @@
al@18840 1744
al@18840 1745 # Do we need lynxcgi URLs? For the moment our criterion is
al@18840 1746 # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
al@18840 1747 -AGENT="${HTTP_USER_AGENT-unknown}"
al@18840 1748 +AGENT="${HTTP_USER_AGENT:-unknown}"
al@18840 1749 case "$AGENT" in
al@18840 1750 Lynx*|lynx*)
al@18840 1751 - HH="${HTTP_HOST-nohh}"
al@18840 1752 + HH="${HTTP_HOST:-nohh}"
al@18840 1753 ;;
al@18840 1754 *)
al@18840 1755 HH=nolynx
al@18840 1756 ;;
al@18840 1757 esac
al@18840 1758
al@18840 1759 -SERVER="${SERVER_NAME-localhost}"
al@18840 1760 +SERVER="${SERVER_NAME:-localhost}"
al@18840 1761 case "$HH" in
al@18840 1762 nohh)
al@18840 1763 CG="lynxcgi:/usr/lib/cgi-bin/man"
al@18840 1764 --- a/strdefs.c
al@18840 1765 +++ b/strdefs.c
al@18840 1766 @@ -27,266 +27,333 @@
al@18840 1767 { V('.','V'), 1, 0, NULL }, /* the me package tests for this */
al@18840 1768 { 0, 0, 0, NULL } };
al@18840 1769
al@18840 1770 +
al@18840 1771 +/* Characters written according to http://mdocml.bsd.lv/man/mandoc_char.7.html */
al@18840 1772 +
al@18840 1773 static STRDEF standardstring[] = {
al@18840 1774 - { V('<','='), 2, "&lt;=", NULL }, /* less equal */
al@18840 1775 - { V('>','='), 2, "&gt=;", NULL }, /* greather equal */
al@18840 1776 - { V('A','m'), 1, "&amp;", NULL }, /* infinity */
al@18840 1777 - { V('B','a'), 1, "|", NULL }, /* vartical bar */
al@18840 1778 - { V('G','e'), 2, "&gt=;", NULL }, /* greather equal */
al@18840 1779 - { V('G','t'), 1, "&gt;", NULL }, /* greather than */
al@18840 1780 - { V('I','f'), 1, "&infin;", NULL }, /* infinity */
al@18840 1781 - { V('L','e'), 2, "&lt;=", NULL }, /* less equal */
al@18840 1782 - { V('L','q'), 1, "&ldquo;", NULL }, /* left double quote */
al@18840 1783 - { V('L','t'), 1, "&lt;", NULL }, /* less than */
al@18840 1784 - { V('N','a'), 3, "NaN", NULL }, /* not a number */
al@18840 1785 - { V('N','e'), 2, "!=", NULL }, /* not equal */
al@18840 1786 - { V('P','i'), 2, "Pi", NULL }, /* pi */
al@18840 1787 - { V('P','m'), 1, "&plusmn;", NULL }, /* plus minus */
al@18840 1788 - { V('R',' '), 1, "&#174;", NULL },
al@18840 1789 - { V('R','q'), 1, "&rdquo;", NULL }, /* right double quote */
al@18840 1790 - { V('a','a'), 1, "'", NULL }, /* accute accent */
al@18840 1791 - { V('g','a'), 1, "`", NULL }, /* grave accent */
al@18840 1792 - { V('l','q'), 2, "``", NULL },
al@18840 1793 - { V('q',' '), 1, "&quot;", NULL }, /* straight double quote */
al@18840 1794 - { V('r','q'), 2, "''", NULL },
al@18840 1795 - { V('u','a'), 1, "^", NULL }, /* upwards arrow */
al@18840 1796 + { V('<','='), 1, "≤", NULL }, /* less-than-equal */
al@18840 1797 + { V('>','='), 1, "≥", NULL }, /* greater-than-equal */
al@18840 1798 + { V('A','i'), 4, "ANSI", NULL }, /* ANSI standard name */
al@18840 1799 + { V('A','m'), 1, "&amp;", NULL }, /* ampersand */
al@18840 1800 + { V('B','a'), 1, "|", NULL }, /* vertical bar */
al@18840 1801 + { V('G','e'), 1, "≥", NULL }, /* greater-than-equal */
al@18840 1802 + { V('G','t'), 1, "&gt;", NULL }, /* greater-than */
al@18840 1803 + { V('I','f'), 8, "infinity", NULL }, /* infinity */
al@18840 1804 + { V('L','e'), 1, "≤", NULL }, /* less-than-equal */
al@18840 1805 + { V('L','q'), 1, "“", NULL }, /* left-double-quote */
al@18840 1806 + { V('L','t'), 1, "&lt;", NULL }, /* less-than */
al@18840 1807 + { V('N','a'), 3, "NaN", NULL }, /* NaN */
al@18840 1808 + { V('N','e'), 1, "≠", NULL }, /* not equal */
al@18840 1809 + { V('P','i'), 2, "pi", NULL }, /* pi */
al@18840 1810 + { V('P','m'), 1, "±", NULL }, /* plus-minus */
al@18840 1811 + { V('P','x'), 5, "POSIX", NULL }, /* POSIX standard name */
al@18840 1812 + { V('R',' '), 1, "®", NULL }, /* restricted mark */
al@18840 1813 + { V('R','q'), 1, "”", NULL }, /* right-double-quote */
al@18840 1814 + { V('T','m'), 4, "(Tm)", NULL }, /* trade mark */
al@18840 1815 + { V('a','a'), 1, "´", NULL }, /* acute */
al@18840 1816 + { V('g','a'), 1, "`", NULL }, /* grave */
al@18840 1817 + { V('l','p'), 1, "(", NULL }, /* left-parenthesis */
al@18840 1818 + { V('l','q'), 1, "“", NULL }, /* left double-quote */
al@18840 1819 + { V('q',' '), 1, "&quot;", NULL }, /* double-quote */
al@18840 1820 + { V('r','p'), 1, ")", NULL }, /* right-parenthesis */
al@18840 1821 + { V('r','q'), 1, "”", NULL }, /* right double-quote */
al@18840 1822 + { V('u','a'), 1, "↑", NULL }, /* up-arrow */
al@18840 1823 + { V('v','a'), 1, "↕", NULL }, /* up-down arrow */
al@18840 1824 { 0, 0, NULL, NULL}
al@18840 1825 };
al@18840 1826
al@18840 1827 static STRDEF standardchar[] = {
al@18840 1828 - { V('*','*'), 1, "*", NULL }, /* math star */
al@18840 1829 - { V('*','A'), 1, "&Alpha;", NULL },
al@18840 1830 - { V('*','B'), 1, "&Beta;", NULL },
al@18840 1831 - { V('*','C'), 1, "&Xi;", NULL },
al@18840 1832 - { V('*','D'), 1, "&Delta;", NULL },
al@18840 1833 - { V('*','E'), 1, "&Epsilon;", NULL },
al@18840 1834 - { V('*','F'), 1, "&Phi;", NULL },
al@18840 1835 - { V('*','G'), 1, "&Gamma;", NULL },
al@18840 1836 - { V('*','H'), 1, "&Theta;", NULL },
al@18840 1837 - { V('*','I'), 1, "&Iota;", NULL },
al@18840 1838 - { V('*','K'), 1, "&Kappa;", NULL },
al@18840 1839 - { V('*','L'), 1, "&Lambda;", NULL },
al@18840 1840 - { V('*','M'), 1, "&Mu;", NULL },
al@18840 1841 - { V('*','N'), 1, "&Nu;", NULL },
al@18840 1842 - { V('*','O'), 1, "&Omicron;", NULL },
al@18840 1843 - { V('*','P'), 1, "&Pi;", NULL },
al@18840 1844 - { V('*','Q'), 1, "&Psi;", NULL },
al@18840 1845 - { V('*','R'), 1, "&Rho;", NULL },
al@18840 1846 - { V('*','S'), 1, "&Sigma;", NULL },
al@18840 1847 - { V('*','T'), 1, "&Tau;", NULL },
al@18840 1848 - { V('*','U'), 1, "&Upsilon;", NULL },
al@18840 1849 - { V('*','W'), 1, "&Omega;", NULL },
al@18840 1850 - { V('*','X'), 1, "&Chi;", NULL },
al@18840 1851 - { V('*','Y'), 1, "&Eta;", NULL },
al@18840 1852 - { V('*','Z'), 1, "&Zeta;", NULL },
al@18840 1853 - { V('*','a'), 1, "&alpha;", NULL },
al@18840 1854 - { V('*','b'), 1, "&beta;", NULL },
al@18840 1855 - { V('*','c'), 1, "&xi;", NULL },
al@18840 1856 - { V('*','d'), 1, "&delta;", NULL },
al@18840 1857 - { V('*','e'), 1, "&epsilon;", NULL },
al@18840 1858 - { V('*','f'), 1, "&phi;", NULL },
al@18840 1859 - { V('*','g'), 1, "&gamma;", NULL },
al@18840 1860 - { V('*','h'), 1, "&theta;", NULL },
al@18840 1861 - { V('*','i'), 1, "&iota;", NULL },
al@18840 1862 - { V('*','k'), 1, "&kappa;", NULL },
al@18840 1863 - { V('*','l'), 1, "&lambda;", NULL },
al@18840 1864 - { V('*','m'), 1, "&mu;", NULL },
al@18840 1865 - { V('*','n'), 1, "&nu;", NULL },
al@18840 1866 - { V('*','o'), 1, "&omicron;", NULL },
al@18840 1867 - { V('*','p'), 1, "&pi;", NULL },
al@18840 1868 - { V('*','q'), 1, "&psi;", NULL },
al@18840 1869 - { V('*','r'), 1, "&rho;", NULL },
al@18840 1870 - { V('*','s'), 1, "&sigma;", NULL },
al@18840 1871 - { V('*','t'), 1, "&tau;", NULL },
al@18840 1872 - { V('*','u'), 1, "&upsilon;", NULL },
al@18840 1873 - { V('*','w'), 1, "&omega;", NULL },
al@18840 1874 - { V('*','x'), 1, "&chi;", NULL },
al@18840 1875 - { V('*','y'), 1, "&eta;", NULL },
al@18840 1876 - { V('*','z'), 1, "&zeta;", NULL },
al@18840 1877 - { V('\'','A'), 1, "&Aacute;", NULL },
al@18840 1878 - { V('\'','E'), 1, "&Eacute;", NULL },
al@18840 1879 - { V('\'','I'), 1, "&Iacute;", NULL },
al@18840 1880 - { V('\'','O'), 1, "&Oacute;", NULL },
al@18840 1881 - { V('\'','U'), 1, "&Uacute;", NULL },
al@18840 1882 - { V('\'','Y'), 1, "&Yacute;", NULL },
al@18840 1883 - { V('\'','a'), 1, "&aacute;", NULL },
al@18840 1884 - { V('\'','e'), 1, "&eacute;", NULL },
al@18840 1885 - { V('\'','i'), 1, "&iacute;", NULL },
al@18840 1886 - { V('\'','o'), 1, "&oacute;", NULL },
al@18840 1887 - { V('\'','u'), 1, "&uacute;", NULL },
al@18840 1888 - { V('\'','y'), 1, "&yacute;", NULL },
al@18840 1889 - { V('!','='), 1, "&ne;", NULL },
al@18840 1890 - { V('%','0'), 1, "&permil;", NULL },
al@18840 1891 - { V('+','-'), 1, "&plusmn;", NULL },
al@18840 1892 - { V(',','C'), 1, "&Ccedil;", NULL },
al@18840 1893 - { V(',','c'), 1, "&ccedil;", NULL },
al@18840 1894 - { V('-','>'), 1, "&rarr;", NULL },
al@18840 1895 - { V('-','D'), 1, "&ETH;", NULL },
al@18840 1896 - { V('.','i'), 1, "&#x131;", NULL },
al@18840 1897 - { V('/','L'), 1, "&#x141;", NULL },
al@18840 1898 - { V('/','O'), 1, "&Oslash;", NULL },
al@18840 1899 - { V('/','l'), 1, "&#x142;", NULL },
al@18840 1900 - { V('/','o'), 1, "&oslash;", NULL },
al@18840 1901 - { V('1','2'), 1, "&#189;", NULL },
al@18840 1902 - { V('1','4'), 1, "&#188;", NULL },
al@18840 1903 - { V('3','4'), 1, "&#190;", NULL },
al@18840 1904 - { V(':','A'), 1, "&Auml;", NULL },
al@18840 1905 - { V(':','E'), 1, "&Euml;", NULL },
al@18840 1906 - { V(':','I'), 1, "&Iuml;", NULL },
al@18840 1907 - { V(':','O'), 1, "&Ouml;", NULL },
al@18840 1908 - { V(':','U'), 1, "&Uuml;", NULL },
al@18840 1909 - { V(':','a'), 1, "&auml;", NULL },
al@18840 1910 - { V(':','e'), 1, "&euml;", NULL },
al@18840 1911 - { V(':','i'), 1, "&iuml;", NULL },
al@18840 1912 - { V(':','o'), 1, "&ouml;", NULL },
al@18840 1913 - { V(':','u'), 1, "&uuml;", NULL },
al@18840 1914 - { V(':','y'), 1, "&yuml;", NULL },
al@18840 1915 - { V('<','-'), 1, "&larr;", NULL },
al@18840 1916 - { V('<','='), 1, "&le;", NULL },
al@18840 1917 - { V('<','>'), 1, "&harr;", NULL },
al@18840 1918 - { V('=','='), 1, "&equiv;", NULL },
al@18840 1919 - { V('=','~'), 1, "&cong;", NULL },
al@18840 1920 - { V('>','='), 1, "&ge;", NULL },
al@18840 1921 - { V('A','E'), 1, "&AElig;", NULL },
al@18840 1922 - { V('A','h'), 1, "&alepfsym;", NULL },
al@18840 1923 - { V('C','R'), 1, "&#x240d;", NULL },
al@18840 1924 - { V('C','s'), 1, "&curren;", NULL },
al@18840 1925 - { V('D','o'), 1, "$", NULL },
al@18840 1926 - { V('E','u'), 1, "&euro;", NULL },
al@18840 1927 - { V('F','c'), 1, "&raquo;", NULL },
al@18840 1928 - { V('F','i'), 3, "ffi", NULL },
al@18840 1929 - { V('F','l'), 3, "ffl", NULL },
al@18840 1930 - { V('F','o'), 1, "&laquo;", NULL },
al@18840 1931 - { V('O','E'), 1, "&OElig;", NULL },
al@18840 1932 - { V('P','o'), 1, "&pound;", NULL },
al@18840 1933 - { V('S','1'), 1, "&sup1;", NULL },
al@18840 1934 - { V('S','2'), 1, "&sup2;", NULL },
al@18840 1935 - { V('S','3'), 1, "&sup3;", NULL },
al@18840 1936 - { V('S','d'), 1, "&eth;", NULL },
al@18840 1937 - { V('T','P'), 1, "&THORN;", NULL },
al@18840 1938 - { V('T','p'), 1, "&thorn;", NULL },
al@18840 1939 - { V('Y','e'), 1, "&yen;", NULL },
al@18840 1940 - { V('^','A'), 1, "&Acirc;", NULL },
al@18840 1941 - { V('^','E'), 1, "&Ecirc;", NULL },
al@18840 1942 - { V('^','I'), 1, "&Icirc;", NULL },
al@18840 1943 - { V('^','O'), 1, "&Ocirc;", NULL },
al@18840 1944 - { V('^','U'), 1, "&Ucirc;", NULL },
al@18840 1945 - { V('^','a'), 1, "&acirc;", NULL },
al@18840 1946 - { V('^','e'), 1, "&ecirc;", NULL },
al@18840 1947 - { V('^','i'), 1, "&icirc;", NULL },
al@18840 1948 - { V('^','o'), 1, "&ocirc;", NULL },
al@18840 1949 - { V('^','u'), 1, "&ucirc;", NULL },
al@18840 1950 - { V('`','A'), 1, "&Agrave;", NULL },
al@18840 1951 - { V('`','E'), 1, "&Egrave;", NULL },
al@18840 1952 - { V('`','I'), 1, "&Igrave;", NULL },
al@18840 1953 - { V('`','O'), 1, "&Ograve;", NULL },
al@18840 1954 - { V('`','U'), 1, "&Ugrave;", NULL },
al@18840 1955 - { V('`','a'), 1, "&agrave;", NULL },
al@18840 1956 - { V('`','e'), 1, "&egrave;", NULL },
al@18840 1957 - { V('`','i'), 1, "&igrave;", NULL },
al@18840 1958 - { V('`','o'), 1, "&ograve;", NULL },
al@18840 1959 - { V('`','u'), 1, "&ugrave;", NULL },
al@18840 1960 - { V('a','a'), 1, "&acute;", NULL },
al@18840 1961 - { V('a','e'), 1, "&aelig;", NULL },
al@18840 1962 - { V('a','p'), 1, "&asymp;", NULL },
al@18840 1963 - { V('a','q'), 1, "'", NULL },
al@18840 1964 - { V('a','t'), 1, "@", NULL },
al@18840 1965 - { V('a','~'), 1, "~", NULL },
al@18840 1966 - { V('b','a'), 1, "|", NULL },
al@18840 1967 - { V('b','b'), 1, "|", NULL },
al@18840 1968 - { V('b','r'), 1, "|", NULL },
al@18840 1969 - { V('b','r'), 1, "|", NULL },
al@18840 1970 - { V('b','u'), 1, "&bull;", NULL },
al@18840 1971 - { V('b','v'), 1, "|", NULL },
al@18840 1972 - { V('c','*'), 1, "&otimes;", NULL },
al@18840 1973 - { V('c','+'), 1, "&oplus;", NULL },
al@18840 1974 - { V('c','i'), 1, "&#x25cb;", NULL },
al@18840 1975 - { V('c','o'), 1, "&#169;", NULL },
al@18840 1976 - { V('c','q'), 1, "'", NULL },
al@18840 1977 - { V('c','t'), 1, "&#162;", NULL },
al@18840 1978 - { V('d','A'), 1, "&dArr;", NULL },
al@18840 1979 - { V('d','a'), 1, "&darr;", NULL },
al@18840 1980 - { V('d','d'), 1, "=", NULL },
al@18840 1981 - { V('d','e'), 1, "&#176;", NULL },
al@18840 1982 - { V('d','g'), 1, "-", NULL },
al@18840 1983 - { V('d','i'), 1, "&#247;", NULL },
al@18840 1984 - { V('d','q'), 1, "&quot;", NULL },
al@18840 1985 - { V('e','m'), 3, "---", NULL }, /* em dash */
al@18840 1986 - { V('e','n'), 1, "-", NULL }, /* en dash */
al@18840 1987 - { V('e','q'), 1, "=", NULL },
al@18840 1988 - { V('e','s'), 1, "&#216;", NULL },
al@18840 1989 - { V('e','u'), 1, "&euro;", NULL },
al@18840 1990 - { V('f','/'), 1, "&frasl;", NULL },
al@18840 1991 - { V('f','c'), 1, "&rsaquo;", NULL },
al@18840 1992 - { V('f','f'), 2, "ff", NULL },
al@18840 1993 - { V('f','i'), 2, "fi", NULL },
al@18840 1994 - { V('f','l'), 2, "fl", NULL },
al@18840 1995 - { V('f','m'), 1, "&#180;", NULL },
al@18840 1996 - { V('f','o'), 1, "&lsaquo;", NULL },
al@18840 1997 - { V('g','a'), 1, "`", NULL },
al@18840 1998 - { V('h','A'), 1, "&hArr;", NULL },
al@18840 1999 - { V('h','y'), 1, "-", NULL },
al@18840 2000 - { V('i','f'), 1, "&infin;", NULL },
al@18840 2001 - { V('i','s'), 8, "Integral", NULL }, /* integral sign */
al@18840 2002 - { V('l','A'), 1, "&lArr;", NULL },
al@18840 2003 - { V('l','B'), 1, "[", NULL },
al@18840 2004 - { V('l','C'), 1, "{", NULL },
al@18840 2005 - { V('l','a'), 1, "&lt;", NULL },
al@18840 2006 - { V('l','b'), 1, "[", NULL },
al@18840 2007 - { V('l','c'), 2, "|&#175;", NULL },
al@18840 2008 - { V('l','f'), 2, "|_", NULL },
al@18840 2009 - { V('l','h'), 1, "&#x261a;", NULL },
al@18840 2010 - { V('l','k'), 1, "<FONT SIZE=\"+2\">{</FONT>", NULL },
al@18840 2011 - { V('l','q'), 1, "\"", NULL },
al@18840 2012 - { V('l','z'), 1, "&loz;", NULL },
al@18840 2013 - { V('m','c'), 1, "&micro;", NULL },
al@18840 2014 - { V('m','i'), 1, "-", NULL },
al@18840 2015 - { V('m','u'), 1, "&#215;", NULL },
al@18840 2016 - { V('n','o'), 1, "&#172;", NULL },
al@18840 2017 - { V('o','A'), 1, "&Aring;", NULL },
al@18840 2018 - { V('o','a'), 1, "&aring;", NULL },
al@18840 2019 - { V('o','e'), 1, "&oelig;", NULL },
al@18840 2020 - { V('o','q'), 1, "'", NULL },
al@18840 2021 - { V('o','r'), 1, "|", NULL },
al@18840 2022 - { V('p','d'), 1, "d", NULL }, /* partial derivative */
al@18840 2023 - { V('p','l'), 1, "+", NULL },
al@18840 2024 - { V('p','s'), 1, "&para;", NULL },
al@18840 2025 - { V('r','!'), 1, "&iexcl;", NULL },
al@18840 2026 - { V('r','?'), 1, "&iquest;", NULL },
al@18840 2027 - { V('r','A'), 1, "&rArr;", NULL },
al@18840 2028 - { V('r','B'), 1, "]", NULL },
al@18840 2029 - { V('r','C'), 1, "}", NULL },
al@18840 2030 - { V('r','a'), 1, "&gt;", NULL },
al@18840 2031 - { V('r','c'), 2, "&#175;|", NULL },
al@18840 2032 - { V('r','f'), 2, "_|", NULL },
al@18840 2033 - { V('r','g'), 1, "&#174;", NULL },
al@18840 2034 - { V('r','h'), 1, "&#x261b;", NULL },
al@18840 2035 - { V('r','k'), 1, "<FONT SIZE=\"+2\">}</FONT>", NULL },
al@18840 2036 - { V('r','n'), 1, "&#175;", NULL },
al@18840 2037 - { V('r','q'), 1, "\"", NULL },
al@18840 2038 - { V('r','s'), 1, "\\", NULL },
al@18840 2039 - { V('r','u'), 1, "_", NULL },
al@18840 2040 - { V('s','c'), 1, "&#167;", NULL },
al@18840 2041 - { V('s','h'), 1, "#", NULL },
al@18840 2042 - { V('s','l'), 1, "/", NULL },
al@18840 2043 - { V('s','q'), 1, "&#x25a1;", NULL },
al@18840 2044 - { V('s','s'), 1, "&szlig;", NULL },
al@18840 2045 - { V('t','f'), 1, "&there4;", NULL },
al@18840 2046 - { V('t','i'), 1, "~", NULL },
al@18840 2047 - { V('t','m'), 1, "&trade;", NULL },
al@18840 2048 - { V('t','s'), 1, "s", NULL }, /* should be terminal sigma */
al@18840 2049 - { V('u','A'), 1, "&uArr;", NULL },
al@18840 2050 - { V('u','a'), 1, "&uarr;", NULL },
al@18840 2051 - { V('u','l'), 1, "_", NULL },
al@18840 2052 - { V('~','A'), 1, "&Atilde;", NULL },
al@18840 2053 - { V('~','N'), 1, "&Ntilde;", NULL },
al@18840 2054 - { V('~','O'), 1, "&Otilde;", NULL },
al@18840 2055 - { V('~','a'), 1, "&atilde;", NULL },
al@18840 2056 - { V('~','n'), 1, "&ntilde;", NULL },
al@18840 2057 - { V('~','o'), 1, "&otilde;", NULL },
al@18840 2058 + { V('*','*'), 1, "∗", NULL }, /* asterisk */
al@18840 2059 + { V('*','A'), 1, "Α", NULL }, /* Alpha */
al@18840 2060 + { V('*','B'), 1, "Β", NULL }, /* Beta */
al@18840 2061 + { V('*','C'), 1, "Ξ", NULL }, /* Xi */
al@18840 2062 + { V('*','D'), 1, "Δ", NULL }, /* Delta */
al@18840 2063 + { V('*','E'), 1, "Ε", NULL }, /* Epsilon */
al@18840 2064 + { V('*','F'), 1, "Φ", NULL }, /* Phi */
al@18840 2065 + { V('*','G'), 1, "Γ", NULL }, /* Gamma */
al@18840 2066 + { V('*','H'), 1, "Θ", NULL }, /* Theta */
al@18840 2067 + { V('*','I'), 1, "Ι", NULL }, /* Iota */
al@18840 2068 + { V('*','K'), 1, "Κ", NULL }, /* Kappa */
al@18840 2069 + { V('*','L'), 1, "Λ", NULL }, /* Lambda */
al@18840 2070 + { V('*','M'), 1, "Μ", NULL }, /* Mu */
al@18840 2071 + { V('*','N'), 1, "Ν", NULL }, /* Nu */
al@18840 2072 + { V('*','O'), 1, "Ο", NULL }, /* Omicron */
al@18840 2073 + { V('*','P'), 1, "Π", NULL }, /* Pi */
al@18840 2074 + { V('*','Q'), 1, "Ψ", NULL }, /* Psi */
al@18840 2075 + { V('*','R'), 1, "Ρ", NULL }, /* Rho */
al@18840 2076 + { V('*','S'), 1, "Σ", NULL }, /* Sigma */
al@18840 2077 + { V('*','T'), 1, "Τ", NULL }, /* Tau */
al@18840 2078 + { V('*','U'), 1, "Υ", NULL }, /* Upsilon */
al@18840 2079 + { V('*','W'), 1, "Ω", NULL }, /* Omega */
al@18840 2080 + { V('*','X'), 1, "Χ", NULL }, /* Chi */
al@18840 2081 + { V('*','Y'), 1, "Η", NULL }, /* Eta */
al@18840 2082 + { V('*','Z'), 1, "Ζ", NULL }, /* Zeta */
al@18840 2083 + { V('*','a'), 1, "α", NULL }, /* alpha */
al@18840 2084 + { V('*','b'), 1, "β", NULL }, /* beta */
al@18840 2085 + { V('*','c'), 1, "ξ", NULL }, /* xi */
al@18840 2086 + { V('*','d'), 1, "δ", NULL }, /* delta */
al@18840 2087 + { V('*','e'), 1, "ε", NULL }, /* epsilon */
al@18840 2088 + { V('*','f'), 1, "φ", NULL }, /* phi */
al@18840 2089 + { V('*','g'), 1, "γ", NULL }, /* gamma */
al@18840 2090 + { V('*','h'), 1, "θ", NULL }, /* theta */
al@18840 2091 + { V('*','i'), 1, "ι", NULL }, /* iota */
al@18840 2092 + { V('*','k'), 1, "κ", NULL }, /* kappa */
al@18840 2093 + { V('*','l'), 1, "λ", NULL }, /* lambda */
al@18840 2094 + { V('*','m'), 1, "μ", NULL }, /* mu */
al@18840 2095 + { V('*','n'), 1, "ν", NULL }, /* nu */
al@18840 2096 + { V('*','o'), 1, "ο", NULL }, /* omicron */
al@18840 2097 + { V('*','p'), 1, "π", NULL }, /* pi */
al@18840 2098 + { V('*','q'), 1, "ψ", NULL }, /* psi */
al@18840 2099 + { V('*','r'), 1, "ρ", NULL }, /* rho */
al@18840 2100 + { V('*','s'), 1, "σ", NULL }, /* sigma */
al@18840 2101 + { V('*','t'), 1, "τ", NULL }, /* tau */
al@18840 2102 + { V('*','u'), 1, "υ", NULL }, /* upsilon */
al@18840 2103 + { V('*','w'), 1, "ω", NULL }, /* omega */
al@18840 2104 + { V('*','x'), 1, "χ", NULL }, /* chi */
al@18840 2105 + { V('*','y'), 1, "η", NULL }, /* eta */
al@18840 2106 + { V('*','z'), 1, "ζ", NULL }, /* zeta */
al@18840 2107 + { V('\'','A'), 1, "Á", NULL }, /* acute A */
al@18840 2108 + { V('\'','E'), 1, "É", NULL }, /* acute E */
al@18840 2109 + { V('\'','I'), 1, "Í", NULL }, /* acute I */
al@18840 2110 + { V('\'','O'), 1, "Ó", NULL }, /* acute O */
al@18840 2111 + { V('\'','U'), 1, "Ú", NULL }, /* acute U */
al@18840 2112 + { V('\'','Y'), 1, "Ý", NULL }, /* Yacute (*) */
al@18840 2113 + { V('\'','a'), 1, "á", NULL }, /* acute a */
al@18840 2114 + { V('\'','e'), 1, "é", NULL }, /* acute e */
al@18840 2115 + { V('\'','i'), 1, "í", NULL }, /* acute i */
al@18840 2116 + { V('\'','o'), 1, "ó", NULL }, /* acute o */
al@18840 2117 + { V('\'','u'), 1, "ú", NULL }, /* acute u */
al@18840 2118 + { V('\'','y'), 1, "ý", NULL }, /* yacute (*) */
al@18840 2119 + { V('!','='), 1, "≠", NULL }, /* not equal */
al@18840 2120 + { V('%','0'), 1, "‰", NULL }, /* per-thousand */
al@18840 2121 + { V('+','-'), 1, "±", NULL }, /* plus-minus */
al@18840 2122 + { V('+','e'), 1, "ϵ", NULL }, /* epsilon variant */
al@18840 2123 + { V('+','f'), 1, "φ", NULL }, /* phi variant */
al@18840 2124 + { V('+','h'), 1, "ϑ", NULL }, /* theta variant */
al@18840 2125 + { V('+','p'), 1, "ϖ", NULL }, /* pi variant */
al@18840 2126 + { V(',','C'), 1, "Ç", NULL }, /* cedilla C */
al@18840 2127 + { V(',','c'), 1, "ç", NULL }, /* cedilla c */
al@18840 2128 + { V('-','+'), 1, "∓", NULL }, /* minus-plus */
al@18840 2129 + { V('-','>'), 1, "→", NULL }, /* right arrow */
al@18840 2130 + { V('-','D'), 1, "Ð", NULL }, /* Eth */
al@18840 2131 + { V('-','h'), 1, "ℏ", NULL }, /* Planck constant over 2π */
al@18840 2132 + { V('.','i'), 1, "ı", NULL }, /* dotless i */
al@18840 2133 + { V('.','j'), 1, "ȷ", NULL }, /* dotless j */
al@18840 2134 + { V('/','L'), 1, "Ł", NULL }, /* stroke L */
al@18840 2135 + { V('/','O'), 1, "Ø", NULL }, /* stroke O */
al@18840 2136 + { V('/','_'), 1, "∠", NULL }, /* angle */
al@18840 2137 + { V('/','l'), 1, "ł", NULL }, /* stroke l */
al@18840 2138 + { V('/','o'), 1, "ø", NULL }, /* stroke o */
al@18840 2139 + { V('1','2'), 1, "½", NULL }, /* 1/2 (*) */
al@18840 2140 + { V('1','4'), 1, "¼", NULL }, /* 1/4 (*) */
al@18840 2141 + { V('3','4'), 1, "¾", NULL }, /* 3/4 (*) */
al@18840 2142 + { V('3','d'), 1, "∴", NULL }, /* therefore */
al@18840 2143 + { V(':','A'), 1, "Ä", NULL }, /* dieresis A */
al@18840 2144 + { V(':','E'), 1, "Ë", NULL }, /* dieresis E */
al@18840 2145 + { V(':','I'), 1, "Ï", NULL }, /* dieresis I */
al@18840 2146 + { V(':','O'), 1, "Ö", NULL }, /* dieresis O */
al@18840 2147 + { V(':','U'), 1, "Ü", NULL }, /* dieresis U */
al@18840 2148 + { V(':','a'), 1, "ä", NULL }, /* dieresis a */
al@18840 2149 + { V(':','e'), 1, "ë", NULL }, /* dieresis e */
al@18840 2150 + { V(':','i'), 1, "ï", NULL }, /* dieresis i */
al@18840 2151 + { V(':','o'), 1, "ö", NULL }, /* dieresis o */
al@18840 2152 + { V(':','u'), 1, "ü", NULL }, /* dieresis u */
al@18840 2153 + { V(':','y'), 1, "ÿ", NULL }, /* dieresis y */
al@18840 2154 + { V('<','-'), 1, "←", NULL }, /* left arrow */
al@18840 2155 + { V('<','<'), 1, "≪", NULL }, /* much less */
al@18840 2156 + { V('<','='), 1, "≤", NULL }, /* less-than-equal */
al@18840 2157 + { V('<','>'), 1, "↔", NULL }, /* left-right arrow */
al@18840 2158 + { V('=','='), 1, "≡", NULL }, /* equivalent */
al@18840 2159 + { V('=','~'), 1, "≅", NULL }, /* approximately equal */
al@18840 2160 + { V('>','='), 1, "≥", NULL }, /* greater-than-equal */
al@18840 2161 + { V('>','>'), 1, "≫", NULL }, /* much greater */
al@18840 2162 + { V('A','E'), 1, "Æ", NULL }, /* AE ligature */
al@18840 2163 + { V('A','N'), 1, "∧", NULL }, /* logical and */
al@18840 2164 + { V('A','h'), 1, "ℵ", NULL }, /* aleph */
al@18840 2165 + { V('B','q'), 1, "„", NULL }, /* right low double-quote */
al@18840 2166 + { V('C','R'), 1, "↵", NULL }, /* carriage return */
al@18840 2167 + { V('C','s'), 1, "¤", NULL }, /* Scandinavian */
al@18840 2168 + { V('D','o'), 1, "$", NULL }, /* dollar */
al@18840 2169 + { V('E','u'), 1, "€", NULL }, /* Euro symbol */
al@18840 2170 + { V('F','c'), 1, "»", NULL }, /* right guillemet */
al@18840 2171 + { V('F','i'), 1, "ffi", NULL }, /* ffi ligature */
al@18840 2172 + { V('F','l'), 1, "ffl", NULL }, /* ffl ligature */
al@18840 2173 + { V('F','n'), 1, "ƒ", NULL }, /* florin */
al@18840 2174 + { V('F','o'), 1, "«", NULL }, /* left guillemet */
al@18840 2175 + { V('I','J'), 1, "IJ", NULL }, /* IJ ligature */
al@18840 2176 + { V('I','m'), 1, "ℑ", NULL }, /* imaginary */
al@18840 2177 + { V('O','E'), 1, "Œ", NULL }, /* OE ligature */
al@18840 2178 + { V('O','K'), 1, "✓", NULL }, /* check mark */
al@18840 2179 + { V('O','R'), 1, "∨", NULL }, /* logical or */
al@18840 2180 + { V('P','o'), 1, "£", NULL }, /* pound */
al@18840 2181 + { V('R','e'), 1, "ℜ", NULL }, /* real */
al@18840 2182 + { V('S','1'), 1, "¹", NULL }, /* sup1 (*) */
al@18840 2183 + { V('S','2'), 1, "²", NULL }, /* sup2 (*) */
al@18840 2184 + { V('S','3'), 1, "³", NULL }, /* sup3 (*) */
al@18840 2185 + { V('S','d'), 1, "ð", NULL }, /* eth */
al@18840 2186 + { V('T','P'), 1, "Þ", NULL }, /* Thorn */
al@18840 2187 + { V('T','p'), 1, "þ", NULL }, /* thorn */
al@18840 2188 + { V('Y','e'), 1, "¥", NULL }, /* yen */
al@18840 2189 + { V('^','A'), 1, "Â", NULL }, /* circumflex A */
al@18840 2190 + { V('^','E'), 1, "Ê", NULL }, /* circumflex E */
al@18840 2191 + { V('^','I'), 1, "Î", NULL }, /* circumflex I */
al@18840 2192 + { V('^','O'), 1, "Ô", NULL }, /* circumflex O */
al@18840 2193 + { V('^','U'), 1, "Û", NULL }, /* circumflex U */
al@18840 2194 + { V('^','a'), 1, "â", NULL }, /* circumflex a */
al@18840 2195 + { V('^','e'), 1, "ê", NULL }, /* circumflex e */
al@18840 2196 + { V('^','i'), 1, "î", NULL }, /* circumflex i */
al@18840 2197 + { V('^','o'), 1, "ô", NULL }, /* circumflex o */
al@18840 2198 + { V('^','u'), 1, "û", NULL }, /* circumflex u */
al@18840 2199 + { V('`','A'), 1, "À", NULL }, /* grave A */
al@18840 2200 + { V('`','E'), 1, "È", NULL }, /* grave E */
al@18840 2201 + { V('`','I'), 1, "Ì", NULL }, /* grave I */
al@18840 2202 + { V('`','O'), 1, "Ò", NULL }, /* grave O */
al@18840 2203 + { V('`','U'), 1, "Ù", NULL }, /* grave U */
al@18840 2204 + { V('`','a'), 1, "à", NULL }, /* grave a */
al@18840 2205 + { V('`','e'), 1, "è", NULL }, /* grave e */
al@18840 2206 + { V('`','i'), 1, "ì", NULL }, /* grave i */
al@18840 2207 + { V('`','o'), 1, "ò", NULL }, /* grave o */
al@18840 2208 + { V('`','u'), 1, "ù", NULL }, /* grave u */
al@18840 2209 + { V('a','"'), 1, "˝", NULL }, /* Hungarian umlaut */
al@18840 2210 + { V('a','-'), 1, "¯", NULL }, /* macron */
al@18840 2211 + { V('a','.'), 1, "˙", NULL }, /* dotted */
al@18840 2212 + { V('a','^'), 1, "^", NULL }, /* circumflex */
al@18840 2213 + { V('a','a'), 1, "´", NULL }, /* acute */
al@18840 2214 + { V('a','b'), 1, "˘", NULL }, /* breve */
al@18840 2215 + { V('a','c'), 1, "¸", NULL }, /* cedilla */
al@18840 2216 + { V('a','d'), 1, "¨", NULL }, /* dieresis */
al@18840 2217 + { V('a','e'), 1, "æ", NULL }, /* ae ligature */
al@18840 2218 + { V('a','h'), 1, "ˇ", NULL }, /* caron */
al@18840 2219 + { V('a','o'), 1, "˚", NULL }, /* ring */
al@18840 2220 + { V('a','p'), 1, "∼", NULL }, /* tilde operator */
al@18840 2221 + { V('a','q'), 1, "'", NULL }, /* apostrophe quote (text) */
al@18840 2222 + { V('a','t'), 1, "@", NULL }, /* at */
al@18840 2223 + { V('a','~'), 1, "~", NULL }, /* tilde */
al@18840 2224 + { V('b','a'), 1, "|", NULL }, /* bar */
al@18840 2225 + { V('b','b'), 1, "¦", NULL }, /* broken bar */
al@18840 2226 + { V('b','r'), 1, "│", NULL }, /* box rule */
al@18840 2227 + { V('b','q'), 1, "‚", NULL }, /* right low single-quote */
al@18840 2228 + { V('b','u'), 1, "•", NULL }, /* bullet */
al@18840 2229 + { V('b','v'), 1, "⎪", NULL }, /* brace extension */
al@18840 2230 + { V('c','*'), 1, "⊗", NULL }, /* circle-multiply */
al@18840 2231 + { V('c','+'), 1, "⊕", NULL }, /* circle-plus */
al@18840 2232 + { V('c','a'), 1, "∩", NULL }, /* intersection */
al@18840 2233 + { V('c','i'), 1, "○", NULL }, /* circle */
al@18840 2234 + { V('c','o'), 1, "©", NULL }, /* copyright */
al@18840 2235 + { V('c','q'), 1, "’", NULL }, /* right single-quote */
al@18840 2236 + { V('c','t'), 1, "¢", NULL }, /* cent */
al@18840 2237 + { V('c','u'), 1, "∪", NULL }, /* union */
al@18840 2238 + { V('d','A'), 1, "⇓", NULL }, /* down double-arrow */
al@18840 2239 + { V('d','a'), 1, "↓", NULL }, /* down arrow */
al@18840 2240 + { V('d','d'), 1, "‡", NULL }, /* double dagger */
al@18840 2241 + { V('d','e'), 1, "°", NULL }, /* degree */
al@18840 2242 + { V('d','g'), 1, "†", NULL }, /* dagger */
al@18840 2243 + { V('d','i'), 1, "÷", NULL }, /* divide */
al@18840 2244 + { V('d','q'), 1, "\"", NULL }, /* double quote (text) */
al@18840 2245 + { V('e','m'), 1, "—", NULL }, /* em-dash */
al@18840 2246 + { V('e','n'), 1, "–", NULL }, /* en-dash */
al@18840 2247 + { V('e','q'), 1, "=", NULL }, /* equal */
al@18840 2248 + { V('e','s'), 1, "∅", NULL }, /* empty set */
al@18840 2249 + { V('e','u'), 1, "€", NULL }, /* Euro symbol */
al@18840 2250 + { V('f','/'), 1, "⁄", NULL }, /* fraction */
al@18840 2251 + { V('f','a'), 1, "∀", NULL }, /* universal quantifier */
al@18840 2252 + { V('f','c'), 1, "›", NULL }, /* right single guillemet */
al@18840 2253 + { V('f','f'), 1, "ff", NULL }, /* ff ligature */
al@18840 2254 + { V('f','i'), 1, "fi", NULL }, /* fi ligature */
al@18840 2255 + { V('f','l'), 1, "fl", NULL }, /* fl ligature */
al@18840 2256 + { V('f','m'), 1, "′", NULL }, /* minute */
al@18840 2257 + { V('f','o'), 1, "‹", NULL }, /* left single guillemet */
al@18840 2258 + { V('g','a'), 1, "`", NULL }, /* grave */
al@18840 2259 + { V('g','r'), 1, "∇", NULL }, /* gradient */
al@18840 2260 + { V('h','A'), 1, "⇔", NULL }, /* left-right double-arrow */
al@18840 2261 + { V('h','a'), 1, "^", NULL }, /* hat (text) */
al@18840 2262 + { V('h','o'), 1, "˛", NULL }, /* ogonek */
al@18840 2263 + { V('h','y'), 1, "‐", NULL }, /* hyphen */
al@18840 2264 + { V('i','b'), 1, "⊆", NULL }, /* reflexive subset */
al@18840 2265 + { V('i','f'), 1, "∞", NULL }, /* infinity */
al@18840 2266 + { V('i','j'), 1, "ij", NULL }, /* ij ligature */
al@18840 2267 + { V('i','p'), 1, "⊇", NULL }, /* reflexive superset */
al@18840 2268 + { V('i','s'), 1, "∫", NULL }, /* integral */
al@18840 2269 + { V('l','A'), 1, "⇐", NULL }, /* left double-arrow */
al@18840 2270 + { V('l','B'), 1, "[", NULL }, /* left bracket */
al@18840 2271 + { V('l','C'), 1, "{", NULL }, /* left brace */
al@18840 2272 + { V('l','a'), 1, "⟨", NULL }, /* left angle */
al@18840 2273 + { V('l','b'), 1, "⎩", NULL }, /* bottom-left hooked brace */
al@18840 2274 + { V('l','c'), 1, "⌈", NULL }, /* left-ceiling */
al@18840 2275 + { V('l','f'), 1, "⌊", NULL }, /* left-floor */
al@18840 2276 + { V('l','h'), 1, "☜", NULL }, /* left hand */
al@18840 2277 + { V('l','k'), 1, "⎨", NULL }, /* mid-left hooked brace */
al@18840 2278 + { V('l','q'), 1, "“", NULL }, /* left double-quote */
al@18840 2279 + { V('l','t'), 1, "⎧", NULL }, /* top-left hooked brace */
al@18840 2280 + { V('l','z'), 1, "◊", NULL }, /* lozenge */
al@18840 2281 + { V('m','c'), 1, "µ", NULL }, /* micro */
al@18840 2282 + { V('m','i'), 1, "−", NULL }, /* minus */
al@18840 2283 + { V('m','o'), 1, "∈", NULL }, /* element */
al@18840 2284 + { V('m','u'), 1, "×", NULL }, /* multiply */
al@18840 2285 + { V('n','b'), 1, "⊄", NULL }, /* not subset */
al@18840 2286 + { V('n','c'), 1, "⊅", NULL }, /* not superset */
al@18840 2287 + { V('n','e'), 1, "≢", NULL }, /* not equivalent */
al@18840 2288 + { V('n','m'), 1, "∉", NULL }, /* not element */
al@18840 2289 + { V('n','o'), 1, "¬", NULL }, /* logical not */
al@18840 2290 + { V('o','A'), 1, "Å", NULL }, /* ring A */
al@18840 2291 + { V('o','a'), 1, "å", NULL }, /* ring a */
al@18840 2292 + { V('o','e'), 1, "œ", NULL }, /* oe ligature */
al@18840 2293 + { V('o','q'), 1, "‘", NULL }, /* left single-quote */
al@18840 2294 + { V('o','r'), 1, "|", NULL }, /* bitwise or */
al@18840 2295 + { V('p','c'), 1, "·", NULL }, /* center-dot */
al@18840 2296 + { V('p','d'), 1, "∂", NULL }, /* partial differential */
al@18840 2297 + { V('p','l'), 1, "+", NULL }, /* plus */
al@18840 2298 + { V('p','p'), 1, "⊥", NULL }, /* perpendicular */
al@18840 2299 + { V('p','s'), 1, "¶", NULL }, /* paragraph */
al@18840 2300 + { V('p','t'), 1, "∝", NULL }, /* proportionate */
al@18840 2301 + { V('r','!'), 1, "¡", NULL }, /* upside-down exclamation */
al@18840 2302 + { V('r','?'), 1, "¿", NULL }, /* upside-down question */
al@18840 2303 + { V('r','A'), 1, "⇒", NULL }, /* right double-arrow */
al@18840 2304 + { V('r','B'), 1, "]", NULL }, /* right bracket */
al@18840 2305 + { V('r','C'), 1, "}", NULL }, /* right brace */
al@18840 2306 + { V('r','a'), 1, "⟩", NULL }, /* right angle */
al@18840 2307 + { V('r','b'), 1, "⎭", NULL }, /* bottom-right hooked brace */
al@18840 2308 + { V('r','c'), 1, "⌉", NULL }, /* right-ceiling */
al@18840 2309 + { V('r','f'), 1, "⌋", NULL }, /* right-floor */
al@18840 2310 + { V('r','g'), 1, "®", NULL }, /* registered */
al@18840 2311 + { V('r','h'), 1, "☞", NULL }, /* right hand */
al@18840 2312 + { V('r','k'), 1, "⎬", NULL }, /* mid-right hooked brace */
al@18840 2313 + { V('r','l'), 1, "‾", NULL }, /* overline */
al@18840 2314 + { V('r','n'), 1, "‾", NULL }, /* overline */
al@18840 2315 + { V('r','q'), 1, "”", NULL }, /* right double-quote */
al@18840 2316 + { V('r','s'), 1, "\\", NULL }, /* backward slash */
al@18840 2317 + { V('r','t'), 1, "⎫", NULL }, /* top-left hooked brace */
al@18840 2318 + { V('r','u'), 1, "_", NULL }, /* (*) */
al@18840 2319 + { V('s','b'), 1, "⊂", NULL }, /* proper subset */
al@18840 2320 + { V('s','c'), 1, "§", NULL }, /* section */
al@18840 2321 + { V('s','d'), 1, "″", NULL }, /* second */
al@18840 2322 + { V('s','h'), 1, "#", NULL }, /* hash (pound) */
al@18840 2323 + { V('s','l'), 1, "/", NULL }, /* forward slash */
al@18840 2324 + { V('s','p'), 1, "⊃", NULL }, /* proper superset */
al@18840 2325 + { V('s','q'), 1, "□", NULL }, /* white square */
al@18840 2326 + { V('s','r'), 1, "√", NULL }, /* square root */
al@18840 2327 + { V('s','s'), 1, "ß", NULL }, /* German eszett */
al@18840 2328 + { V('s','t'), 1, "∋", NULL }, /* such that */
al@18840 2329 + { V('t','e'), 1, "∃", NULL }, /* existential quantifier */
al@18840 2330 + { V('t','f'), 1, "∴", NULL }, /* therefore */
al@18840 2331 + { V('t','i'), 1, "~", NULL }, /* tilde (text) */
al@18840 2332 + { V('t','m'), 1, "™", NULL }, /* trademarked */
al@18840 2333 + { V('t','s'), 1, "ς", NULL }, /* sigma terminal */
al@18840 2334 + { V('u','A'), 1, "⇑", NULL }, /* up double-arrow */
al@18840 2335 + { V('u','a'), 1, "↑", NULL }, /* up arrow */
al@18840 2336 + { V('u','l'), 1, "_", NULL }, /* underscore */
al@18840 2337 + { V('v','A'), 1, "⇕", NULL }, /* up-down double-arrow */
al@18840 2338 + { V('v','a'), 1, "↕", NULL }, /* up-down arrow */
al@18840 2339 + { V('|','='), 1, "≃", NULL }, /* asymptotically equal */
al@18840 2340 + { V('~','='), 1, "≈", NULL }, /* almost equal */
al@18840 2341 + { V('~','A'), 1, "Ã", NULL }, /* tilde A */
al@18840 2342 + { V('~','N'), 1, "Ñ", NULL }, /* tilde N */
al@18840 2343 + { V('~','O'), 1, "Õ", NULL }, /* tilde O */
al@18840 2344 + { V('~','a'), 1, "ã", NULL }, /* tilde a */
al@18840 2345 + { V('~','n'), 1, "ñ", NULL }, /* tilde n */
al@18840 2346 + { V('~','o'), 1, "õ", NULL }, /* tilde o */
al@18840 2347 + { V('~','~'), 1, "≈", NULL }, /* almost equal */
al@18840 2348 { 0, 0, NULL, NULL }
al@18840 2349 -
al@18840 2350 -
al@18840 2351 };
al@18840 2352
al@18840 2353 void stdinit(void) {
al@18840 2354 --- /dev/null
al@18840 2355 +++ b/version.h
al@18840 2356 @@ -0,0 +1 @@
al@18840 2357 +#define version "1.6g-7-slitaz"