# HG changeset patch # User Aleksej Bobylev # Date 1453476274 -7200 # Node ID 27b321c14ae741b4748f692825faeed1ac8f91fd # Parent 962c4700fe2b82d1dda30b2e7dfc3feda548790b Add man2html, html2text diff -r 962c4700fe2b -r 27b321c14ae7 html2text/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/html2text/receipt Fri Jan 22 17:24:34 2016 +0200 @@ -0,0 +1,37 @@ +# SliTaz package receipt. + +PACKAGE="html2text" +VERSION="1.3.2a" +CATEGORY="utilities" +SHORT_DESC="Command line utility that converts HTML into plain text" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="GPL" +WEB_SITE="http://www.mbayer.de/html2text/" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WGET_URL="http://ftp.ibiblio.org/pub/linux/apps/www/converters/$TARBALL" + +DEPENDS="" +BUILD_DEPENDS="" + +# Rules to configure and make the package. +compile_rules() +{ + # http://www.mbayer.de/html2text/downloads/patch-utf8-html2text-1.3.2a.diff + patch -p1 -i $stuff/patch-utf8-html2text-1.3.2a.diff + + ./configure $CONFIGURE_ARGS + sed -i 's|/usr/local/bin|/usr/bin|; s|/usr/local/man|/usr/share/man|; + s|$(BINDIR)|$(DESTDIR)&|; s|$(MANDIR)|$(DESTDIR)&|; s|$(DOCDIR)|$(DESTDIR)&|' \ + $src/Makefile + make + mkdir -p $install/usr/bin $install/usr/share/man/man1 \ + $install/usr/share/man/man5 + make install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + cp -a $install/* $fs + rm -r $fs/usr/share/doc +} diff -r 962c4700fe2b -r 27b321c14ae7 html2text/stuff/patch-utf8-html2text-1.3.2a.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/html2text/stuff/patch-utf8-html2text-1.3.2a.diff Fri Jan 22 17:24:34 2016 +0200 @@ -0,0 +1,706 @@ +diff -r -u -bB html2text-1.3.2a/Area.C html2text-1.3.2a-patched/Area.C +--- html2text-1.3.2a/Area.C 2003-11-23 12:05:29.000000000 +0100 ++++ html2text-1.3.2a-patched/Area.C 2005-05-13 22:19:59.862137688 +0200 +@@ -36,10 +36,13 @@ + #include + + #include "Area.h" ++#include "html.h" + #include "string.h" + + #define LATIN1_nbsp 160 + ++extern int use_encoding; ++ + /* ------------------------------------------------------------------------- */ + + #define malloc_array(type, size)\ +@@ -81,6 +84,27 @@ + + /* ------------------------------------------------------------------------- */ + ++/* utf_length() and utf_width() ++ * ++ * Very simplified algorithm of calculating length of UTF-8 ++ * string. No check for errors. Counting only ASCII bytes and ++ * leading bytes of UTF-8 multibyte sequences. All bytes like ++ * 10xxxxxx are dropped. If USE_UTF8 is false then returns ++ * usual length. --YS ++ */ ++ ++unsigned int ++Line::utf_length(size_type f, size_type t) const ++{ ++ size_type m = (t < length_ ? t : length_); ++ size_type r = m - f; ++ if(USE_UTF8) { ++ for (int i = f; i < m; i++) ++ if((cells_[i].character & 0xc0) == 0x80) r--; ++ } ++ return r; ++} ++ + void + Line::resize(size_type l) + { +@@ -236,6 +260,23 @@ + return *this; + } + ++unsigned int ++Area::utf_width() ++{ ++ size_type r = width_; ++ if(USE_UTF8) { r = 0; ++ for (size_type yy = 0; yy < height_; yy++) { ++ size_type r1 = 0; ++ for (int i = width_ - 1; i >= 0; i--) { ++ if(!r1 && isspace(cells_[yy][i].character)) continue; ++ if((cells_[yy][i].character & 0xc0) != 0x80) r1++; ++ } ++ if(r < r1) r = r1; ++ } ++ } ++ return r; ++} ++ + void + Area::resize(size_type w, size_type h) + { +@@ -439,7 +480,7 @@ + char c = p->character; + char a = p->attribute; + +- if (c == (char) LATIN1_nbsp) c = ' '; ++ if (c == (char) LATIN1_nbsp && !USE_UTF8) c = ' '; + + if (a == Cell::NONE) { + os << c; +Nur in html2text-1.3.2a-patched/: Area.C.orig. +diff -r -u -bB html2text-1.3.2a/Area.h html2text-1.3.2a-patched/Area.h +--- html2text-1.3.2a/Area.h 2003-11-23 12:05:29.000000000 +0100 ++++ html2text-1.3.2a-patched/Area.h 2005-05-13 22:19:59.863137536 +0200 +@@ -81,6 +81,8 @@ + Cell &operator[](size_type x) { return cells_[x]; } + const Cell *cells() const { return cells_; } + ++ unsigned int utf_length(size_type f, size_type t) const; ++ + void resize(size_type l); + void enlarge(size_type l) { if (l > length_) resize(l); } + +@@ -134,6 +136,8 @@ + Cell *operator[](size_type y) { return cells_[y]; } + const Area &operator>>=(size_type rs); + ++ unsigned int utf_width(); ++ + void resize(size_type w, size_type h); + void enlarge(size_type w, size_type h); + +Nur in html2text-1.3.2a-patched/: Area.h.orig. +diff -r -u -bB html2text-1.3.2a/format.C html2text-1.3.2a-patched/format.C +--- html2text-1.3.2a/format.C 2003-11-23 12:05:29.000000000 +0100 ++++ html2text-1.3.2a-patched/format.C 2005-05-13 22:19:59.865137232 +0200 +@@ -1210,6 +1210,7 @@ + } + + Line::size_type to = from + 1; ++ int to_from; + + Line::size_type lbp = (Line::size_type) -1; // "Last break position". + +@@ -1238,18 +1239,20 @@ + to++; + } + +- if (to - from > w && lbp != (Area::size_type) -1) { to = lbp; break; } ++ if (line.utf_length(from,to) > w && lbp != (Area::size_type) -1) ++ { to = lbp; break; } + } + ++ to_from = line.utf_length(from,to); + /* + * Copy the "from...to" range from the "line" to the bottom of the "res" + * Area. + */ + Area::size_type x = 0; + Area::size_type len = to - from; +- if (halign == Area::LEFT || len >= w) { ; } else +- if (halign == Area::CENTER) { x += (w - len) / 2; } else +- if (halign == Area::RIGHT) { x += w - len; } ++ if (halign == Area::LEFT || to_from >= w) { ; } else ++ if (halign == Area::CENTER) { x += (w - to_from) / 2; } else ++ if (halign == Area::RIGHT) { x += w - to_from; } + res->insert(line.cells() + from, len, x, res->height()); + + /* +Nur in html2text-1.3.2a-patched/: format.C.orig. +diff -r -u -bB html2text-1.3.2a/html2text.C html2text-1.3.2a-patched/html2text.C +--- html2text-1.3.2a/html2text.C 2003-11-23 12:05:29.000000000 +0100 ++++ html2text-1.3.2a-patched/html2text.C 2005-05-13 22:19:59.868136776 +0200 +@@ -148,9 +148,10 @@ + -o Redirect output into \n\ + -nobs Do not use backspaces for boldface and underlining\n\ + -ascii Use plain ASCII for output instead of ISO-8859-1\n\ ++ -utf8 Assume both terminal and input stream are in UTF-8 mode\n\ + "; + +-int use_iso8859 = 1; ++int use_encoding = ISO8859; + + int + main(int argc, char **argv) +@@ -199,7 +200,8 @@ + if (!strcmp(arg, "-width" )) { width = atoi(argv[++i]); } else + if (!strcmp(arg, "-o" )) { output_file_name = argv[++i]; } else + if (!strcmp(arg, "-nobs" )) { use_backspaces = false; } else +- if (!strcmp(arg, "-ascii" )) { use_iso8859 = false; } else ++ if (!strcmp(arg, "-ascii" )) { use_encoding = ASCII; } else ++ if (!strcmp(arg, "-utf8" )) { use_encoding = UTF8; } else + { + std::cerr + << "Unrecognized command line option \"" +Nur in html2text-1.3.2a-patched/: html2text.C.orig. +diff -r -u -bB html2text-1.3.2a/html.h html2text-1.3.2a-patched/html.h +--- html2text-1.3.2a/html.h 2001-10-04 22:03:54.000000000 +0200 ++++ html2text-1.3.2a-patched/html.h 2005-05-13 22:19:59.866137080 +0200 +@@ -61,6 +61,11 @@ + + /* ------------------------------------------------------------------------- */ + ++enum {ASCII, ISO8859, UTF8}; ++#define USE_ISO8859 (use_encoding == ISO8859) ++#define USE_ASCII (use_encoding == ASCII) ++#define USE_UTF8 (use_encoding == UTF8) ++ + #define LATIN1_nbsp 160 + #define LATIN1_iexcl 161 + #define LATIN1_cent 162 +diff -r -u -bB html2text-1.3.2a/sgml.C html2text-1.3.2a-patched/sgml.C +--- html2text-1.3.2a/sgml.C 2003-11-23 12:09:11.000000000 +0100 ++++ html2text-1.3.2a-patched/sgml.C 2005-05-13 22:19:59.870136472 +0200 +@@ -62,261 +62,280 @@ + char name[8]; + int iso8859code; + char *asciistr; ++ unsigned long unicode; + } entities[] = { +- { "AElig", LATIN1_AElig, "AE" }, +- { "AMP", 0, "&" }, +- { "Aacute", LATIN1_Aacute, "A'" }, +- { "Acirc", LATIN1_Acirc, "A^" }, +- { "Agrave", LATIN1_Agrave, "A`" }, +- { "Alpha", 0, "A" }, +- { "Aring", LATIN1_Aring, "AA" }, +- { "Atilde", LATIN1_Atilde, "A~" }, +- { "Auml", LATIN1_Auml, "A\"" }, +- { "Beta", 0, "B" }, +- { "Ccedil", LATIN1_Ccedil, "C," }, +- { "Chi", 0, "H" }, +- { "Dagger", 0, "++" }, +- { "Delta", 0, "D" }, +- { "ETH", LATIN1_ETH, "D-" }, +- { "Eacute", LATIN1_Eacute, "E'" }, +- { "Ecirc", LATIN1_Ecirc, "E^" }, +- { "Egrave", LATIN1_Egrave, "E`" }, +- { "Epsilon", 0, "E" }, +- { "Eta", 0, "E" }, +- { "Euml", LATIN1_Euml, "E\"" }, +- { "GT", 0, ">" }, +- { "Gamma", 0, "G" }, +- { "Iacute", LATIN1_Iacute, "I'" }, +- { "Icirc", LATIN1_Icirc, "I^" }, +- { "Igrave", LATIN1_Igrave, "I`" }, +- { "Iota", 0, "I" }, +- { "Iuml", LATIN1_Iuml, "I\"" }, +- { "Kappa", 0, "K" }, +- { "LT", 0, "<" }, +- { "Lambda", 0, "L" }, +- { "Mu", 0, "M" }, +- { "Ntilde", LATIN1_Ntilde, "N~" }, +- { "Nu", 0, "N" }, +- { "OElig", 0, "OE" }, +- { "Oacute", LATIN1_Oacute, "O'" }, +- { "Ocirc", LATIN1_Ocirc, "O^" }, +- { "Ograve", LATIN1_Ograve, "O`" }, +- { "Omega", 0, "O" }, +- { "Omicron", 0, "O" }, +- { "Oslash", LATIN1_Oslash, "O/" }, +- { "Otilde", LATIN1_Otilde, "O~" }, +- { "Ouml", LATIN1_Ouml, "O\"" }, +- { "Phi", 0, "F" }, +- { "Pi", 0, "P" }, +- { "Prime", 0, "''" }, +- { "Psi", 0, "PS" }, +- { "QUOT", 0, "\"" }, +- { "Rho", 0, "R" }, +- { "Scaron", 0, "S" }, +- { "Sigma", 0, "S" }, +- { "THORN", LATIN1_THORN, "TH" }, +- { "Tau", 0, "T" }, +- { "Theta", 0, "TH" }, +- { "Uacute", LATIN1_Uacute, "U'" }, +- { "Ucirc", LATIN1_Ucirc, "U^" }, +- { "Ugrave", LATIN1_Ugrave, "U`" }, +- { "Upsilon", 0, "U" }, +- { "Uuml", LATIN1_Uuml, "U\"" }, +- { "Xi", 0, "X" }, +- { "Yacute", LATIN1_Yacute, "Y'" }, +- { "Yuml", 0, "Y\"" }, +- { "Zeta", 0, "Z" }, +- { "aacute", LATIN1_aacute, "a'" }, +- { "acirc", LATIN1_acirc, "a^" }, +- { "acute", LATIN1_acute, "'" }, +- { "aelig", LATIN1_aelig, "ae" }, +- { "agrave", LATIN1_agrave, "a`" }, ++ { "AElig", LATIN1_AElig, "AE", 0x00c6}, ++ { "AMP", 0, "&", 0x0026}, ++ { "Aacute", LATIN1_Aacute, "A'", 0x00c1}, ++ { "Acirc", LATIN1_Acirc, "A^", 0x00c2}, ++ { "Agrave", LATIN1_Agrave, "A`", 0x00c0}, ++ { "Alpha", 0, "A", 0x0391}, ++ { "Aring", LATIN1_Aring, "AA", 0x00c5}, ++ { "Atilde", LATIN1_Atilde, "A~", 0x00c3}, ++ { "Auml", LATIN1_Auml, "A\"", 0x00c4}, ++ { "Beta", 0, "B", 0x0392}, ++ { "Ccedil", LATIN1_Ccedil, "C,", 0x00c7}, ++ { "Chi", 0, "H", 0x03a7}, ++ { "Dagger", 0, "++", 0x2020}, ++ { "Delta", 0, "D", 0x0394}, ++ { "ETH", LATIN1_ETH, "D-", 0x00d0}, ++ { "Eacute", LATIN1_Eacute, "E'", 0x00c9}, ++ { "Ecirc", LATIN1_Ecirc, "E^", 0x00ca}, ++ { "Egrave", LATIN1_Egrave, "E`", 0x00c8}, ++ { "Epsilon", 0, "E", 0x0395}, ++ { "Eta", 0, "E", 0x0397}, ++ { "Euml", LATIN1_Euml, "E\"", 0x00cb}, ++ { "GT", 0, ">", 0x003e}, ++ { "Gamma", 0, "G", 0x0393}, ++ { "Iacute", LATIN1_Iacute, "I'", 0x00cd}, ++ { "Icirc", LATIN1_Icirc, "I^", 0x00ce}, ++ { "Igrave", LATIN1_Igrave, "I`", 0x00cc}, ++ { "Iota", 0, "I", 0x0399}, ++ { "Iuml", LATIN1_Iuml, "I\"", 0x00cf}, ++ { "Kappa", 0, "K", 0x039a}, ++ { "LT", 0, "<", 0x003c}, ++ { "Lambda", 0, "L", 0x039b}, ++ { "Mu", 0, "M", 0x039c}, ++ { "Ntilde", LATIN1_Ntilde, "N~", 0x00d1}, ++ { "Nu", 0, "N", 0x039d}, ++ { "OElig", 0, "OE", 0x0152}, ++ { "Oacute", LATIN1_Oacute, "O'", 0x00d3}, ++ { "Ocirc", LATIN1_Ocirc, "O^", 0x00d4}, ++ { "Ograve", LATIN1_Ograve, "O`", 0x00d2}, ++ { "Omega", 0, "O", 0x03a9}, ++ { "Omicron", 0, "O", 0x039f}, ++ { "Oslash", LATIN1_Oslash, "O/", 0x00d8}, ++ { "Otilde", LATIN1_Otilde, "O~", 0x00d5}, ++ { "Ouml", LATIN1_Ouml, "O\"", 0x00d6}, ++ { "Phi", 0, "F", 0x03a6}, ++ { "Pi", 0, "P", 0x03a0}, ++ { "Prime", 0, "''", }, ++ { "Psi", 0, "PS", 0x03a8}, ++ { "QUOT", 0, "\"", }, ++ { "Rho", 0, "R", 0x03a1}, ++ { "Scaron", 0, "S", 0x0161}, ++ { "Sigma", 0, "S", 0x03a3}, ++ { "THORN", LATIN1_THORN, "TH", 0x00de}, ++ { "Tau", 0, "T", 0x03a4}, ++ { "Theta", 0, "TH", 0x0398}, ++ { "Uacute", LATIN1_Uacute, "U'", 0x00da}, ++ { "Ucirc", LATIN1_Ucirc, "U^", 0x00db}, ++ { "Ugrave", LATIN1_Ugrave, "U`", 0x00d9}, ++ { "Upsilon", 0, "U", 0x03a5}, ++ { "Uuml", LATIN1_Uuml, "U\"", 0x00dc}, ++ { "Xi", 0, "X", 0x039e}, ++ { "Yacute", LATIN1_Yacute, "Y'", 0x00dd}, ++ { "Yuml", 0, "Y\"", 0x0178}, ++ { "Zeta", 0, "Z", 0x0396}, ++ { "aacute", LATIN1_aacute, "a'", 0x00e1}, ++ { "acirc", LATIN1_acirc, "a^", 0x00e2}, ++ { "acute", LATIN1_acute, "'", 0x00b4}, ++ { "aelig", LATIN1_aelig, "ae", 0x00e6}, ++ { "agrave", LATIN1_agrave, "a`", 0x00e0}, + { "alefsym", 0, "Aleph" }, +- { "alpha", 0, "a" }, ++ { "alpha", 0, "a", 0x03b1}, + { "amp", 0, "&" }, + { "and", 0, "AND" }, + { "ang", 0, "-V" }, + { "apos", 0, "'" }, +- { "aring", LATIN1_aring, "aa" }, +- { "asymp", 0, "~=" }, +- { "atilde", LATIN1_atilde, "a~" }, +- { "auml", LATIN1_auml, "a\"" }, ++ { "aring", LATIN1_aring, "aa", 0x00e5}, ++ { "asymp", 0, "~=", 0x2248}, ++ { "atilde", LATIN1_atilde, "a~", 0x00e3}, ++ { "auml", LATIN1_auml, "a\"", 0x00e5}, + { "bdquo", 0, "\"" }, +- { "beta", 0, "b" }, +- { "brvbar", LATIN1_brvbar, "|" }, +- { "bull", 0, " o " }, ++ { "beta", 0, "b", 0x03b2}, ++ { "brvbar", LATIN1_brvbar, "|", 0x00a6}, ++ { "bull", 0, " o ", 0x2022}, + { "cap", 0, "(U" }, +- { "ccedil", LATIN1_ccedil, "c," }, +- { "cedil", LATIN1_cedil, "," }, +- { "cent", LATIN1_cent, "-c-" }, +- { "chi", 0, "h" }, +- { "circ", 0, "^" }, ++ { "ccedil", LATIN1_ccedil, "c,", 0x00e7}, ++ { "cedil", LATIN1_cedil, ",", 0x00b8}, ++ { "cent", LATIN1_cent, "-c-", 0x00a2}, ++ { "chi", 0, "h", 0x03c7}, ++ { "circ", 0, "^", 0x005e}, + // { "clubs", 0, "[clubs]" }, + { "cong", 0, "?=" }, +- { "copy", LATIN1_copy, "(c)" }, ++ { "copy", LATIN1_copy, "(c)", 0x00a9}, + { "crarr", 0, "<-'" }, + { "cup", 0, ")U" }, +- { "curren", LATIN1_curren, "CUR" }, ++ { "curren", LATIN1_curren, "CUR", 0x00a4}, + { "dArr", 0, "vv" }, +- { "dagger", 0, "+" }, ++ { "dagger", 0, "+", 0x2020}, + { "darr", 0, "v" }, +- { "deg", LATIN1_deg, "DEG" }, +- { "delta", 0, "d" }, ++ { "deg", LATIN1_deg, "DEG", 0x00b0}, ++ { "delta", 0, "d", 0x03b4}, + // { "diams", 0, "[diamonds]" }, +- { "divide", LATIN1_divide, "/" }, +- { "eacute", LATIN1_eacute, "e'" }, +- { "ecirc", LATIN1_ecirc, "e^" }, +- { "egrave", LATIN1_egrave, "e`" }, ++ { "divide", LATIN1_divide, "/", 0x00f7}, ++ { "eacute", LATIN1_eacute, "e'", 0x00e9}, ++ { "ecirc", LATIN1_ecirc, "e^", 0x00ea}, ++ { "egrave", LATIN1_egrave, "e`", 0x00e8}, + { "empty", 0, "{}" }, +- { "epsilon", 0, "e" }, +- { "equiv", 0, "==" }, +- { "eta", 0, "e" }, +- { "eth", LATIN1_eth, "d-" }, +- { "euml", LATIN1_euml, "e\"" }, +- { "euro", 0, "EUR" }, ++ { "epsilon", 0, "e", 0x03b5}, ++ { "equiv", 0, "==", 0x2261}, ++ { "eta", 0, "e", 0x03b7}, ++ { "eth", LATIN1_eth, "d-", 0x00f0}, ++ { "euml", LATIN1_euml, "e\"", 0x00eb}, ++ { "euro", 0, "EUR", 0x20ac}, + { "exist", 0, "TE" }, + { "fnof", 0, "f" }, + { "forall", 0, "FA" }, +- { "frac12", LATIN1_frac12, " 1/2" }, +- { "frac14", LATIN1_frac14, " 1/4" }, +- { "frac34", LATIN1_frac34, " 3/4" }, ++ { "frac12", LATIN1_frac12, " 1/2",0x00bd}, ++ { "frac14", LATIN1_frac14, " 1/4",0x00bc}, ++ { "frac34", LATIN1_frac34, " 3/4",0x00be}, + { "frasl", 0, "/" }, +- { "gamma", 0, "g" }, +- { "ge", 0, ">=" }, +- { "gt", 0, ">" }, ++ { "gamma", 0, "g", 0x03b3}, ++ { "ge", 0, ">=", 0x2265}, ++ { "gt", 0, ">", 0x003e}, + { "hArr", 0, "<=>" }, + { "harr", 0, "<->" }, + // { "hearts", 0, "[hearts]" }, +- { "hellip", 0, "..." }, +- { "iacute", LATIN1_iacute, "i'" }, +- { "icirc", LATIN1_icirc, "i^" }, +- { "iexcl", LATIN1_iexcl, "!" }, +- { "igrave", LATIN1_igrave, "i`" }, ++ { "hellip", 0, "...", 0x2026}, ++ { "iacute", LATIN1_iacute, "i'", 0x00ed}, ++ { "icirc", LATIN1_icirc, "i^", 0x00ee}, ++ { "iexcl", LATIN1_iexcl, "!", 0x00a1}, ++ { "igrave", LATIN1_igrave, "i`", 0x00ec}, + { "image", 0, "Im" }, +- { "infin", 0, "oo" }, +- { "int", 0, "INT" }, +- { "iota", 0, "i" }, +- { "iquest", LATIN1_iquest, "?" }, ++ { "infin", 0, "oo", 0x221e}, ++ { "int", 0, "INT", 0x222b}, ++ { "iota", 0, "i", 0x03b9}, ++ { "iquest", LATIN1_iquest, "?", 0x00bf}, + { "isin", 0, "(-" }, +- { "iuml", LATIN1_iuml, "i\"" }, +- { "kappa", 0, "k" }, ++ { "iuml", LATIN1_iuml, "i\"", 0x00ef}, ++ { "kappa", 0, "k", 0x03ba}, + { "lArr", 0, "<=" }, +- { "lambda", 0, "l" }, ++ { "lambda", 0, "l", 0x03bb}, + { "lang", 0, "" }, + { "lsaquo", 0, "<" }, + { "lsquo", 0, "`" }, +- { "lt", 0, "<" }, +- { "macr", LATIN1_macr, "-" }, ++ { "lt", 0, "<", 0x003c}, ++ { "macr", LATIN1_macr, "-", 0x00af}, + { "mdash", 0, "--" }, +- { "micro", LATIN1_micro, "my" }, +- { "middot", LATIN1_middot, "." }, +- { "minus", 0, "-" }, +- { "mu", 0, "m" }, ++ { "micro", LATIN1_micro, "my", 0x00b5}, ++ { "middot", LATIN1_middot, ".", 0x00b7}, ++ { "minus", 0, "-", 0x2212}, ++ { "mu", 0, "m", 0x03bc}, + { "nabla", 0, "Nabla" }, +- { "nbsp", LATIN1_nbsp, " " }, ++ { "nbsp", LATIN1_nbsp, " ", 0x00a0}, + { "ndash", 0, "-" }, +- { "ne", 0, "!=" }, ++ { "ne", 0, "!=", 0x2260}, + { "ni", 0, "-)" }, + { "not", LATIN1_not, "NOT" }, + { "notin", 0, "!(-" }, + { "nsub", 0, "!(C" }, +- { "ntilde", LATIN1_ntilde, "n~" }, +- { "nu", 0, "n" }, +- { "oacute", LATIN1_oacute, "o'" }, +- { "ocirc", LATIN1_ocirc, "o^" }, ++ { "ntilde", LATIN1_ntilde, "n~", 0x00f1}, ++ { "nu", 0, "n", 0x03bd}, ++ { "oacute", LATIN1_oacute, "o'", 0x00f3}, ++ { "ocirc", LATIN1_ocirc, "o^", 0x00f4}, + { "oelig", 0, "oe" }, +- { "ograve", LATIN1_ograve, "o`" }, ++ { "ograve", LATIN1_ograve, "o`", 0x00f2}, + { "oline", LATIN1_macr, "-" }, +- { "omega", 0, "o" }, +- { "omicron", 0, "o" }, ++ { "omega", 0, "o", 0x03c9}, ++ { "omicron", 0, "o", 0x03bf}, + { "oplus", 0, "(+)" }, + { "or", 0, "OR" }, +- { "ordf", LATIN1_ordf, "-a" }, +- { "ordm", LATIN1_ordm, "-o" }, +- { "oslash", LATIN1_oslash, "o/" }, +- { "otilde", LATIN1_otilde, "o~" }, ++ { "ordf", LATIN1_ordf, "-a", 0x00aa}, ++ { "ordm", LATIN1_ordm, "-o", 0x00ba}, ++ { "oslash", LATIN1_oslash, "o/", 0x00f8}, ++ { "otilde", LATIN1_otilde, "o~", 0x00f5}, + { "otimes", 0, "(x)" }, +- { "ouml", LATIN1_ouml, "o\"" }, +- { "para", LATIN1_para, "P:" }, +- { "part", 0, "PART" }, +- { "permil", 0, " 0/00" }, ++ { "ouml", LATIN1_ouml, "o\"", 0x00f6}, ++ { "para", LATIN1_para, "P:", 0x00b6}, ++ { "part", 0, "PART",0x2202}, ++ { "permil", 0, " 0/00",0x2030}, + { "perp", 0, "-T" }, +- { "phi", 0, "f" }, +- { "pi", 0, "p" }, ++ { "phi", 0, "f", 0x03c6}, ++ { "pi", 0, "p", 0x03c0}, + { "piv", 0, "Pi" }, +- { "plusmn", LATIN1_plusmn, "+/-" }, +- { "pound", LATIN1_pound, "-L-" }, ++ { "plusmn", LATIN1_plusmn, "+/-", 0x00b1}, ++ { "pound", LATIN1_pound, "-L-", 0x00a3}, + { "prime", 0, "'" }, +- { "prod", 0, "PROD" }, ++ { "prod", 0, "PROD",0x220f}, + { "prop", 0, "0(" }, +- { "psi", 0, "ps" }, ++ { "psi", 0, "ps", 0x03c8}, + { "quot", 0, "\"" }, + { "rArr", 0, "=>" }, +- { "radic", 0, "SQRT" }, ++ { "radic", 0, "SQRT",0x221a}, + { "rang", 0, "/>" }, + { "raquo", LATIN1_raquo, ">>" }, +- { "rarr", 0, "->" }, ++ { "rarr", 0, "->", 0x2192}, + // { "rceil", 0, ">|" }, + { "rdquo", 0, "\"" }, + { "real", 0, "Re" }, +- { "reg", LATIN1_reg, "(R)" }, ++ { "reg", LATIN1_reg, "(R)", 0x00ae}, + // { "rfloor", 0, "|>" }, +- { "rho", 0, "r" }, ++ { "rho", 0, "r", 0x03c1}, + { "rsaquo", 0, ">" }, + { "rsquo", 0, "'" }, + { "sbquo", 0, "'" }, +- { "scaron", 0, "s" }, ++ { "scaron", 0, "s", 0x0161}, + { "sdot", 0, "DOT" }, +- { "sect", LATIN1_sect, "S:" }, ++ { "sect", LATIN1_sect, "S:", 0x00a7}, + { "shy", LATIN1_shy, "" }, +- { "sigma", 0, "s" }, +- { "sigmaf", 0, "s" }, ++ { "sigma", 0, "s", 0x03c3}, ++ { "sigmaf", 0, "s", 0x03c2}, + { "sim", 0, "~" }, + // { "spades", 0, "[spades]" }, + { "sub", 0, "(C" }, + { "sube", 0, "(_" }, +- { "sum", 0, "SUM" }, ++ { "sum", 0, "SUM", 0x2211}, + { "sup", 0, ")C" }, +- { "sup1", LATIN1_sup1, "^1" }, +- { "sup2", LATIN1_sup2, "^2" }, +- { "sup3", LATIN1_sup3, "^3" }, ++ { "sup1", LATIN1_sup1, "^1", 0x00b9}, ++ { "sup2", LATIN1_sup2, "^2", 0x00b2}, ++ { "sup3", LATIN1_sup3, "^3", 0x00b3}, + { "supe", 0, ")_" }, +- { "szlig", LATIN1_szlig, "ss" }, +- { "tau", 0, "t" }, ++ { "szlig", LATIN1_szlig, "ss", 0x00df}, ++ { "tau", 0, "t", 0x03c4}, + { "there4", 0, ".:" }, +- { "theta", 0, "th" }, +- { "thorn", LATIN1_thorn, "th" }, +- { "tilde", 0, "~" }, +- { "times", LATIN1_times, "x" }, +- { "trade", 0, "[TM]" }, ++ { "theta", 0, "th", 0x03b8}, ++ { "thorn", LATIN1_thorn, "th", 0x00fe}, ++ { "tilde", 0, "~", 0x02dc}, ++ { "times", LATIN1_times, "x", 0x00d7}, ++ { "trade", 0, "[TM]",0x2122}, + { "uArr", 0, "^^" }, +- { "uacute", LATIN1_uacute, "u'" }, ++ { "uacute", LATIN1_uacute, "u'", 0x00fa}, + { "uarr", 0, "^" }, +- { "ucirc", LATIN1_ucirc, "u^" }, +- { "ugrave", LATIN1_ugrave, "u`" }, +- { "uml", LATIN1_uml, "\"" }, +- { "upsilon", 0, "u" }, +- { "uuml", LATIN1_uuml, "u\"" }, ++ { "ucirc", LATIN1_ucirc, "u^", 0x00fb}, ++ { "ugrave", LATIN1_ugrave, "u`", 0x00f9}, ++ { "uml", LATIN1_uml, "\"", 0x00a8}, ++ { "upsilon", 0, "u", 0x03c5}, ++ { "uuml", LATIN1_uuml, "u\"", 0x00fc}, + { "weierp", 0, "P" }, +- { "xi", 0, "x" }, +- { "yacute", LATIN1_yacute, "y'" }, +- { "yen", LATIN1_yen, "YEN" }, +- { "yuml", LATIN1_yuml, "y\"" }, +- { "zeta", 0, "z" }, ++ { "xi", 0, "x", 0x03be}, ++ { "yacute", LATIN1_yacute, "y'", 0x00fd}, ++ { "yen", LATIN1_yen, "YEN", 0x00a5}, ++ { "yuml", LATIN1_yuml, "y\"", 0x00ff}, ++ { "zeta", 0, "z", 0x03b6}, + }; + +-extern int use_iso8859; ++extern int use_encoding; + + /* ------------------------------------------------------------------------- */ + ++char ubuf[4]; ++ ++char *mkutf(unsigned long x) ++{ ++ memset(ubuf, 0, 4); ++ if(x < 128) ubuf[0] = x; ++ else if(x < 0x800) { ++ ubuf[0] = (0xc0 | ((x >> 6) & 0x1f)); ++ ubuf[1] = (0x80 | (x & 0x3f)); ++ } ++ else { ++ ubuf[0] = (0xe0 | ((x >> 12) & 0x0f)); ++ ubuf[1] = (0x80 | ((x >> 6) & 0x3f)); ++ ubuf[2] = (0x80 | (x & 0x3f)); ++ } ++ return ubuf; ++} ++ + void + replace_sgml_entities(string *s) + { +@@ -330,9 +349,9 @@ + */ + while (j < l && s->at(j) != '&') ++j; + /* +- * We could convert high-bit chars to "é" here if use_iso8859 +- * is off, then let them be translated or not. Is the purpose of +- * !use_iso8859 to allow SGML entities to be seen, or to strongly ++ * We could convert high-bit chars to "é" here if USE_ASCII ++ * is on, then let them be translated or not. Is the purpose of ++ * USE_ASCII to allow SGML entities to be seen, or to strongly + * filter against high-ASCII chars that might blow up a terminal + * that doesn't speak ISO8859? For the moment, "allow SGML entities + * to be seen" -- no filtering here. +@@ -370,7 +389,11 @@ + if (!isdigit(c)) break; + x = 10 * x + c - '0'; + } +- if (use_iso8859 || (x < 128)) { ++ if (USE_UTF8) { ++ s->replace(beg, j - beg, mkutf(x)); ++ j = beg + 1; ++ } ++ else if (USE_ISO8859 && (x < 256) || USE_ASCII && (x < 128)) { + s->replace(beg, j - beg, 1, (char) x); + j = beg + 1; + } else { +@@ -408,13 +431,17 @@ + (int (*)(const void *, const void *)) strcmp + ); + if (entity != NULL) { +- if (use_iso8859 && entity->iso8859code) { ++ if (USE_ISO8859 && entity->iso8859code) { + s->replace(beg, j - beg, 1, (char) entity->iso8859code); + j = beg + 1; +- } else if (entity->asciistr) { ++ } else if (USE_ASCII && entity->asciistr) { + s->replace(beg, j - beg, entity->asciistr); + j = beg + 1; + } /* else don't replace it at all, we don't have a translation */ ++ else if(USE_UTF8 && entity->unicode) { ++ s->replace(beg, j - beg, mkutf(entity->unicode)); ++ j = beg + 1; ++ } + } + } else { + ; /* EXTENSION: Allow literal '&' sometimes. */ +diff -r -u -bB html2text-1.3.2a/table.C html2text-1.3.2a-patched/table.C +--- html2text-1.3.2a/table.C 2002-07-22 13:32:50.000000000 +0200 ++++ html2text-1.3.2a-patched/table.C 2005-05-13 22:19:59.871136320 +0200 +@@ -175,7 +175,7 @@ + - (*number_of_columns_return - 1) * (column_spacing + 0), + Area::LEFT // Yields better results than "p->halign"! + )); +- p->width = tmp.get() ? tmp->width() : 0; ++ p->width = tmp.get() ? tmp->utf_width() : 0; + } + p->minimized = false; + +@@ -308,7 +308,7 @@ + left_of_column + old_column_width - 1, + Area::LEFT // Yields better results than "lc.halign"! + )); +- w = tmp->width(); ++ w = tmp->utf_width(); + if (w >= left_of_column + old_column_width) lc.minimized = true; + } + if (w > left_of_column + new_column_width) { diff -r 962c4700fe2b -r 27b321c14ae7 man2html/description.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man2html/description.txt Fri Jan 22 17:24:34 2016 +0200 @@ -0,0 +1,10 @@ +View local man pages in the web browser. Typical usage: + + hman man2html + +Utility can search and show local man pages by it's name, and also list all +local man pages by categories using web interface for queries. + +This version was patched for SliTaz to produce clean and modern HTML layout +using SliTaz documents CSS styles, to fast search and display pages without +caching, etc. diff -r 962c4700fe2b -r 27b321c14ae7 man2html/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man2html/receipt Fri Jan 22 17:24:34 2016 +0200 @@ -0,0 +1,44 @@ +# SliTaz package receipt. + +PACKAGE="man2html" +VERSION="1.6g-7-slitaz" +CATEGORY="utilities" +SHORT_DESC="Man pages to HTML convertor written in C" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="BSD" +WEB_SITE="https://github.com/man-pages-zh/man2html" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WGET_URL="https://github.com/man-pages-zh/man2html/archive/$VERSION.tar.gz" + +DEPENDS="glib" +BUILD_DEPENDS="glib-dev" + +# Rules to configure and make the package. +compile_rules() +{ + patch -p1 -i $stuff/man2html-slitaz.diff + make && make install + + # translations + make pot + cp $stuff/ru.po $src/po + make LINGUAS=ru msgfmt + mkdir -p $install/usr/share/locale + cp -a $src/po/mo/* $install/usr/share/locale + + # compress man page + gzip $install/usr/share/man/man1/man2html.1 + + # install scripts + cp -a $src/hman.sh $install/usr/bin/hman + mkdir -p $install/var/www + cp -a $src/man.sh $install/var/www/man.cgi + chown www:www $install/var/www/man.cgi + chmod a+x $install/var/www/man.cgi +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + cp -a $install/* $fs +} diff -r 962c4700fe2b -r 27b321c14ae7 man2html/stuff/man2html-slitaz.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man2html/stuff/man2html-slitaz.diff Fri Jan 22 17:24:34 2016 +0200 @@ -0,0 +1,2357 @@ +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,89 @@ ++CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes -DGUNZIP='"gunzip"' `pkg-config --cflags --libs glib-2.0` ++# -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 ++OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o ++bindir = $(DESTDIR)$(PREFIX)/usr/bin ++mandir = $(DESTDIR)$(PREFIX)/usr/share/man ++vardir = $(DESTDIR)$(PREFIX)/var ++httpdir = $(DESTDIR)$(PREFIX)/home/httpd ++cgidir = $(DESTDIR)$(PREFIX)/var/www ++sharedir = $(DESTDIR)$(PREFIX)/usr/share/man2html ++cgiowner = www ++cgigroup = www ++CC ?= gcc ++ ++all: man2html hman ++ ++man2html: $(OBJECTS) ++ $(CC) -o man2html $(OBJECTS) $(CFLAGS) ++ ++pot: ++ mkdir -p po ++ xgettext -o po/man2html.pot -k_ -kN_ \ ++ --package-name="man2html" \ ++ --from-code="UTF-8" \ ++ cgibase.c man2html.c hman.sh man.sh ++ ++msgmerge: ++ @for l in $(LINGUAS); do \ ++ echo -n "Updating $$l po file."; \ ++ msgmerge -U po/$$l.po po/man2html.pot; \ ++ done; ++ ++msgfmt: ++ @for l in $(LINGUAS); do \ ++ echo "Compiling $$l mo file..."; \ ++ mkdir -p po/mo/$$l/LC_MESSAGES; \ ++ msgfmt -o po/mo/$$l/LC_MESSAGES/man2html.mo po/$$l.po; \ ++ done; ++ ++ ++# man2html: ../src/version.h ++ ++# This installs the man2html utility ++install: man2html ++ mkdir -p $(bindir) ++ install -m 755 man2html $(bindir) ++ mkdir -p $(mandir)/man1 ++ install -m 644 man2html.1 $(mandir)/man1/man2html.1 ++ ++install-scripts: install-man-scripts install-glimpse-stuff install-hman ++ ++# These are the scripts that allow pointing a browser at ++# http://localhost/cgi-bin/man/man2html ++# to work. ++install-man-scripts: ++ mkdir -p $(cgidir) ++ mkdir -p $(sharedir) ++ install -m 755 scripts/cgi-bin/man/* $(cgidir) ++ install -m 644 scripts/cgi-aux/man/* $(sharedir) ++ install -d -o $(cgiowner) -g $(cgigroup) -m 775 $(vardir)/man2html ++# (aux was renamed to cgi-aux since aux causes problems under DOS) ++ ++# If you have installed glimpse, and have compressed man pages, ++# then perhaps you also want these filters. ++install-glimpse-stuff: ++ install -m 644 glimpse_filters $(vardir)/man2html/.glimpse_filters ++ ++# In order not to have to type a long command like ++# netscape http://localhost/cgi-bin/man/man2html?section+topic ++# or ++# lynx lynxcgi:/home/httpd/cgi-bin/man/man2html?section+topic ++# it is convenient to have some shell script as a wrapper. ++# The script hman can be aliased to man. It uses an environment ++# variable MANHTMLPAGER to find out which browser you use, and ++# you can set MANHTMLHOST if the pages are not on localhost. ++hman: hman.sh ++ rm -f hman ++ sed -e 's,%version%,1.6g-7,' hman.sh > hman ++ ++install-hman: hman ++ install -m 555 hman $(bindir)/hman ++ install -m 644 hman.1 $(mandir)/man1/hman.1 ++ ++clean: ++ rm -f core hman man2html $(OBJECTS) *~ ++ ++spotless: clean ++ rm -f Makefile ++ ++$(OBJECTS): defs.h +--- a/abbrev.c ++++ b/abbrev.c +@@ -27,7 +27,7 @@ + "SSO", "System Services Overview", + "TEXT", "Editing Text Files", + "DOCS", "Formatting Documents", +- "TROFF", "Using nroff and troff", ++ "TROFF", "Using nroff and troff", + "INDEX", "Global Index", + "CPG", "C Programmer's Guide", + "CREF", "C Reference Manual", +@@ -46,7 +46,7 @@ + "CGI", "SunCGI Reference Manual", + "CORE", "SunCore Reference Manual", + "4ASSY", "Sun-4 Assembly Language Reference", +- "SARCH", "SPARC Architecture Manual", ++ "SARCH", "SPARC Architecture Manual", + "KR", "The C Programming Language", + 0, 0 }; + +--- a/cgibase.c ++++ b/cgibase.c +@@ -8,6 +8,8 @@ + #include /* tolower() */ + #include /* strlen() */ + #include "defs.h" ++#include ++#include + + /* + * The default is to use cgibase. With relative html style +@@ -21,8 +23,8 @@ + * and uses lynx, and we use lynxcgi:/usr/lib/cgi-bin. + */ + +-static char *man2htmlpath = "/cgi-bin/man/man2html"; /* default */ +-static char *cgibase_format = "http://%s"; /* host.domain:port */ ++static char *man2htmlpath = ""; /* default */ ++static char *cgibase_format = "%s"; /* host.domain:port */ + static char *cgibase_ll_format = "lynxcgi:%s"; /* directory */ + static char *cgibase = ""; /* default */ + +@@ -68,76 +70,46 @@ + relat_html_style = 1; + } + +-/* What shall we say in case of relat_html_style? */ +-static char *signature = "
\n" +-"This document was created by\n" +-"man2html,\n" +-"using the manual pages.
\n" +-"%s\n"; +- +-#define TIMEFORMAT "%T GMT, %B %d, %Y" +-#define TIMEBUFSZ 500 +- + void print_sig() + { +- char timebuf[TIMEBUFSZ]; +- struct tm *timetm; +- time_t now; +- +- timebuf[0] = 0; +-#ifdef TIMEFORMAT +- sprintf(timebuf, "Time: "); +- now=time(NULL); +- timetm=gmtime(&now); +- strftime(timebuf+6, TIMEBUFSZ-6, TIMEFORMAT, timetm); +- timebuf[TIMEBUFSZ-1] = 0; +-#endif +- printf(signature, cgibase, man2htmlpath, timebuf); ++ printf("\n
\n

%s

\n
\n", ++ _("This document was created by man2html using the manual pages.")); + } + + void + include_file_html(char *g) { +- printf("%s>", g,g); ++ printf("%s>", g,g); + } + + void + man_page_html(char *sec, char *h) { +- if (relat_html_style) { +- if (!h) +- printf("" +- "Return to Main Contents"); +- else +- printf("%s", +- sec, h, sec, h); +- } else { +- if (!h) +- printf("Return to Main Contents", +- cgibase, man2htmlpath); +- else if (!sec) +- printf("%s", +- cgibase, man2htmlpath, sep, h, h); +- else +- printf("%s", +- cgibase, man2htmlpath, sep, sec, h, h); +- } ++ if (!h) ++ printf("%s", ++ _("Return to Main Contents")); ++ else if (!sec) ++ printf("%s", ++ h, h); ++ else ++ printf("%s", ++ sec, h, h); + } + + void + ftp_html(char *f) { +- printf("%s", f, f); ++ printf("%s", f, f); + } + + void + www_html(char *f) { +- printf("%s", f, f); ++ printf("%s", f, f); + } + + void + mailto_html(char *g) { +- printf("%s", g, g); ++ printf("%s", g, g); + } + + void + url_html(char *g) { +- printf("%s", g, g); ++ printf("%s", g, g); + } +--- a/hman.sh ++++ b/hman.sh +@@ -8,99 +8,83 @@ + # Usage examples: + # hman - get start page + # hman man2html - get man page for man2html +-# hman 7 locale - get section 7 man page for locale ++# hman 7 locale - get section 7 man page for locale + # hman 1 - section 1 index of names only + # hman 3 index - section 3 index names+descriptions + # hman -k editor - search all man pages for some string +-# hman -P arena ./twm.man - specify browser; specify man page ++# hman -P arena ./twm.man - specify browser; specify man page + # +-# hman from %version% ++# hman from 1.6g-7 + # + +-if [ x"$1" = x"-v" ] || [ x"$1" = x"-V" ]; then +- echo "`basename $0` from %version%" ++. /usr/lib/slitaz/httphelper.sh ++. /lib/libtaz.sh ++ ++# Internationalization ++export TEXTDOMAIN='man2html' ++_() { local T="$1"; shift; printf "$(gettext "$T")" "$@"; echo; } ++ ++ ++if [ "$1" == '-v' ] || [ "$1" == '-V' ]; then ++ echo "$(basename $0) v. 1.6g-slitaz" + exit 0 + fi + + # The user has to set MANHTMLPAGER (or he will get httpd-free lynx). + # Pick your favorite browser: lynx, xmosaic, netscape, arena, amaya, grail, ... +-if [ x"$MANHTMLPAGER" = x ] && ! which lynx > /dev/null ; then +- HMAN_BROWSER=sensible-browser +-else +- HMAN_BROWSER=${MANHTMLPAGER-lynxcgi} +-fi ++HMAN_BROWSER="${MANHTMLPAGER:-tazweb}" + +-# + # If the man pages are on a remote host, specify it in MANHTMLHOST. +-HOST=${MANHTMLHOST-localhost} ++HOST=${MANHTMLHOST:-localhost} + + # Perhaps the browser was specified on the command line? +-if [ "$#" -gt 1 ] && [ x"$1" = x"-P" ]; then +- HMAN_BROWSER="$2" +- shift; shift ++if [ "$#" -gt 1 ] && [ "$1" == '-P' ]; then ++ HMAN_BROWSER="$2" ++ shift; shift + fi + + # Perhaps the host was specified on the command line? +-if [ "$#" -gt 1 ] && [ x"$1" = x"-H" ]; then +- HOST="$2" +- shift; shift ++if [ "$#" -gt 1 ] && [ "$1" == '-H' ]; then ++ HOST="$2" ++ shift; shift + fi + +-# Interface to a live (already running) netscape browser. +-nsfunc () { +- if ( /bin/ps xc | grep -q 'netscape$' ) ; then +- if [ -x netscape-remote ] ; then +- exec netscape-remote -remote "openURL($1,new_window)" +- else +- exec netscape -remote "openURL($1,new_window)" +- fi +- else +- netscape $1 & +- fi +-} ++CGI="http://$HOST/man.cgi" + +-urlencode() { +- echo "$@" | perl -pe 'chomp(); s/([^A-Za-z0-9\ \_\-\.\/])/"%" . unpack("H*", $1)/eg; tr/ /+/;' ++enc() { ++ echo "$@" | sed -e 's|+|%2B|g; s| |+|g'; + } + +- +-case "$HMAN_BROWSER" in +- lynxcgi) +- HMAN_BROWSER=lynx +- CG="lynxcgi:/usr/lib/cgi-bin/man" +- ;; +- netscape) +- HMAN_BROWSER=nsfunc +- CG="http://$HOST/cgi-bin/man" +- ;; +- *) +- CG="http://$HOST/cgi-bin/man" +- ;; ++case "$#" in ++ 0) ++ $HMAN_BROWSER "$CGI";; ++ 1) ++ case "$1" in ++ 1|2|3|4|5|6|7|8|l|n) ++ $HMAN_BROWSER "$CGI?$1";; ++ /*) ++ $HMAN_BROWSER "$CGI?$(enc "$1")";; ++ */*) ++ $HMAN_BROWSER "$CGI?$(enc "$(realpath "$PWD/$1")")";; ++ *) ++ $HMAN_BROWSER "$CGI?$(enc "$1")";; ++ esac ++ ;; ++ 2) ++# case "$1" in ++# -k) ++# $HMAN_BROWSER "$CGI?search=$(enc "$2")";; ++# *) ++# if [ "$2" == 'index' ]; then ++# $HMAN_BROWSER "$CGI?whatis=$(enc "$1")" ++# else ++ $HMAN_BROWSER "$CGI?$(enc "$1 $2")" ++# fi ++# ;; ++# esac ++ ;; ++ *) ++ _ 'bad number of args';; + esac +- +- case "$#" in +- 0) $HMAN_BROWSER "$CG/man2html" ;; +- 1) case "$1" in +- 1|2|3|4|5|6|7|8|l|n) +- $HMAN_BROWSER "$CG/mansec?query=$1" ;; +- /*) +- $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1"`" ;; +- */*) +- $HMAN_BROWSER "$CG/man2html?query=`urlencode "$PWD/$1"`" ;; +- *) +- $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1"`" ;; +- esac ;; +- 2) case "$1" in +- -k) +- $HMAN_BROWSER "$CG/mansearch?query=`urlencode "$2"`" ;; +- *) +- if [ "$2" = index ]; then +- $HMAN_BROWSER "$CG/manwhatis?query=`urlencode "$1"`" +- else +- $HMAN_BROWSER "$CG/man2html?query=`urlencode "$1 $2"`" +- fi ;; +- esac ;; +- *) echo "bad number of args" ;; +- esac + + exit 0 +--- /dev/null ++++ b/man.sh +@@ -0,0 +1,292 @@ ++#!/bin/sh ++# man2html cgi script - uses /usr/bin/man2html to format man pages ++# aeb@cwi.nl - 980109 ++# Aleksej Bobylev , 2015-2016 ++ ++. /usr/lib/slitaz/httphelper.sh ++. /lib/libtaz.sh ++ ++# Internationalization. ++[ -e /etc/locale.conf ] && . /etc/locale.conf ++export TEXTDOMAIN='man2html' ++export LANG LC_ALL ++_() { local T="$1"; shift; printf "$(gettext "$T")" "$@"; echo; } ++ ++ ++SECTIONS="$(_ 'User Commands'):$(_ 'System Calls'):$(_ 'C Library Functions'):\ ++$(_ 'Devices and Network Interfaces'):$(_ 'File Formats'):\ ++$(_ 'Games and Demos'):$(_ 'Environments, Tables, and Troff Macros'):\ ++$(_ 'Maintenance Commands'):$(_ 'All available manual pages')" ++ ++query="$(GET query)" ++if [ -z "$query" ]; then ++ set -- $(echo $(GET) | tr '+' ' ') ++else ++ set -- $(echo $(GET query) | tr '+' ' ') ++fi ++ ++ ++if [ $1 == 'css' ]; then ++ # post css file on query ++ header 'Content-Type: text/css' ++ cat /usr/share/doc/slitaz-doc.css ++fi ++ ++if [ $# -eq 1 ]; then ++ case $1 in ++ 1|2|3|4|5|6|7|8|all) ++ if [ "$1" == 'all' ]; then ++ sec_n='9'; sec_folder='man?' ++ else ++ sec_n="$1"; sec_folder="man$1" ++ fi ++ sec_desc=$(echo "$SECTIONS" | cut -d':' -f $sec_n) ++ header ++ cat < ++ ++ ++ $1. $sec_desc ++ ++ ++

$(_ 'Section %s: %s' $1 "$sec_desc")

++
$(_ 'Manual Pages')
++

++EOT ++ ++ case $1 in ++ 1) _ "Section 1 of the manual describes user commands and tools, for example, file \ ++manipulation tools, shells, compilers, web browsers, file and image viewers and editors, and so \ ++on.";; ++ 2) _ "Section 2 of the manual describes the Linux system calls. A system call is \ ++an entry point into the Linux kernel.";; ++ 3) _ "Section 3 of the manual describes all library functions excluding the \ ++library functions (system call wrappers) described in Section 2, which implement system calls.";; ++ 4) _ "Section 4 of the manual describes special files (devices).";; ++ 5) _ "Section 5 of the manual describes various file formats, as well as the \ ++corresponding C structures, if any.";; ++ 6) _ "Section 6 of the manual describes all the games and funny little programs \ ++available on the system.";; ++ 7) _ "Section 7 of the manual provides overviews on various topics, and describes \ ++conventions and protocols, character set standards, the standard filesystem layout, and \ ++miscellaneous other things.";; ++ 8) _ "Section 8 of the manual describes commands which either can be or are used \ ++only by the superuser, like system-administration commands, daemons, and hardware-related \ ++commands.";; ++ esac ++ ++ [ "$1" != 'all' ] && echo "intro($1)" ++ echo '

' ++ ++ temp="$(mktemp)"; temp2="$(mktemp)" ++ for dir in $(find /usr/share/man -type d -name "$sec_folder"); do ++ ls $dir | sed 's|\.\([0-9]\)\.*[bgx]*z*2*$|:\1|' ++ # fix sorting 'feature': leading '_' always ignored by `sort` ++ done | sed 's|_|zzzzzzzz|g' | sort -fu | sed 's|zzzzzzzz|_|g' | \ ++ awk -F' ' -vtemp="$temp" -vtemp2="$temp2" ' ++ { ++ split($1, man, ":"); ++ ++ letter = tolower(substr(man[1], 1, 1)); ++ if (letter != last_letter) { ++ last_letter = letter; ++ letter_index[++num_letters] = letter; ++ print "

" toupper(letter) "

" > temp; ++ } ++ lnk = man[1]; gsub("+", "%2b", lnk); ++ printf "%s(%s) ", lnk, man[2], man[1], man[2] > temp; ++ } ++ END { ++ # Print out alphabetic quick index and other links ++ for (i = 1; i <= num_letters; i++) { ++ print "" toupper(letter_index[i]) "" > temp2; ++ } ++ } ++ ' ++ if [ -s "$temp" ]; then ++ echo '
'; cat "$temp2"; echo '
' ++ cat "$temp" ++ echo '
'; cat "$temp2"; echo '
' ++ fi ++ ++ rm -f "$temp" "$temp2" ++ ++ cat < ++
$(_ 'Sections')
++
    ++EOT ++ for i in $(seq 8); do ++ sec_desc=$(echo "$SECTIONS" | cut -d':' -f $i) ++ echo "
  1. $sec_desc
  2. " ++ done ++ cat < ++

    $(_ 'All Sections')

    ++
++ ++ ++ ++EOT ++ exit 0 ++ ;; ++ esac ++fi ++ ++# Find the required page - expect to be called with "man2html [sec] page". ++# There may a prefixed "-M manpath" option. ++ ++if [ $# -ge 2 -a "$1" == '-M' ]; then ++ MANPATH="$2" ++ export MANPATH ++ shift; shift ++ MP=' using the given MANPATH' ++else ++ MP='' ++fi ++ ++ ++# If no arguments given, show a start page. ++ ++if [ $# -eq 0 ]; then ++ header ++ cat < ++ ++ ++ ++ $(_ 'Manual Pages - Main Contents') ++ ++ ++ ++

$(_ 'Manual Pages - Main Contents')

++
$(_ 'Name and Section lookup')
++
++ ++ ++
++

$(_ "You can enter a program name, possibly preceded by the section, the directories to search \ ++(with -M) or a full name. For example:")

++ ++
    ++
  • find
  • ++
  • 1 find
  • ++
  • -M /usr/share/man:/opt/man:/usr/local/share/man find
  • ++
  • /usr/share/man/man1/gperf.1
  • ++
++
++ ++
$(_ 'Index of pages')
++ ++
    ++EOT ++ for i in $(seq 8); do ++ sec_desc=$(echo "$SECTIONS" | cut -d':' -f $i) ++ echo "
  1. $sec_desc
  2. " ++ done ++ cat < ++

    $(_ 'All Sections')

    ++
++ ++ ++ ++ ++EOT ++ exit 0 ++fi ++ ++if [ $# -gt 2 ]; then ++ man2html -E "man2html: bad invocation: too many arguments" ++ exit 0 ++fi ++ ++# A single argument may be an explicitly give path name ++# Otherwise, find it ++ ++if [ $# -eq 1 ]; then ++ arg=${1//%2b/+} ++ case "$arg" in ++ /*) PAGE="$arg";; ++ *.*) PAGE=$(find /usr/share/man \( -type f -o -type l \) \( -name "$arg" -o -name "$arg.gz" -o -name "$arg.bz2" -o -name "$arg.xz" \));; ++ *) PAGE=$(find /usr/share/man \( -type f -o -type l \) \( -name "$arg.*" -o -name "$arg.*.gz" -o -name "$arg.*.bz2" -o -name "$arg.*.xz" \));; ++ esac ++else ++ arg=${2//%2b/+} ++ PAGE="$( ++ for dir in $(find /usr/share/man -type d -name man$1); do ++ find $dir \( -type f -o -type l \) -name "$arg.$1*" ++ done)" ++fi ++ ++if [ -z "$PAGE" ]; then ++ complaint="$(_ 'Cannot find a page')" ++ if [ $# -eq 1 ]; then ++ complaint="$(_ 'Cannot find a page for %s %s' $1 $MP)" ++ else ++ complaint="$(_ 'Cannot find a page for %s in section %s %s') $2 $1 $MP" ++ fi ++ man2html -E "

$complaint

" ++ exit 0 ++fi ++ ++if [ "$(echo "$PAGE" | wc -l)" -gt 1 ]; then ++ header ++ cat < ++$(_ 'Multiple pages') ++ ++

$(_ 'Multiple pages found')

++
++
    ++EOT ++ echo "$PAGE" | awk -F'/' '{ ++ if ($5 ~ "man") { ++ split($6, man, "."); ++ printf "
  • %s (%s)
  • \n", $0, man[1], man[2]; ++ } else { ++ split($7, man, "."); ++ printf "
  • %s (%s) — %s
  • \n", $0, man[1], man[2], $5; ++ } ++ }' ++ sed 's|^.*$|
  • &
  • |' ++ echo '
' ++ exit 0 ++fi ++ ++if [ -r "$PAGE" ]; then ++ tmpman="$(mktemp)" ++ # Unpack man page ++ case "$PAGE" in ++ *.gz) zcat "$PAGE" > "$tmpman";; ++ *.bz2) bzcat "$PAGE" > "$tmpman";; ++ *.xz) xzcat "$PAGE" > "$tmpman";; ++ *) cp "$PAGE" "$tmpman";; ++ esac ++ ++ # Check for link ++ line="$(fgrep -v '.\"' "$tmpman" | head -n1)" ++ case "$line" in ++ .so*) ++ link="$(echo "$line" | cut -d'/' -f2)" ++ header "HTTP/1.1 301 Moved Permanently" \ ++ "Location: ?$link" ++ ;; ++ *) ++ # Convert page to HTML ++ man2html "$tmpman" ++ ;; ++ esac ++ ++ # Clean ++ rm "$tmpman" ++else ++ man2html -E "Strange... Cannot find (or read) $PAGE." ++fi ++exit 0 +--- a/man2html.c ++++ b/man2html.c +@@ -21,14 +21,17 @@ + #include + #include + #include "defs.h" +-#include "../src/version.h" ++#include "version.h" ++#include ++#include ++#define GETTEXT_PACKAGE "man2html" + + /* BSD mandoc Bd/Ed example(?) blocks */ + #define BD_LITERAL 1 + #define BD_INDENT 2 + + #define SIZE(a) (sizeof(a)/sizeof(*a)) +-#define DOCTYPE "\n" ++#define DOCTYPE "\n" + #define CONTENTTYPE "Content-type: text/html; charset=UTF-8\n\n" + + static char NEWLINE[2]="\n"; +@@ -58,28 +61,13 @@ + + static char charb[3]; + +-#ifdef GUNZIP +-/* from src/utils.c */ +-static int +-is_shell_safe(const char *ss, int quoted) { +- char *bad = " ;'\\\"<>|"; +- char *p; + +- if (quoted) +- bad++; /* allow a space inside quotes */ +- for (p = bad; *p; p++) +- if (strchr(ss, *p)) +- return 0; +- return 1; +-} +-#endif +- + /* reads the entire manpage into buffer *buf and returns number of chars read */ + static int + read_manpage_into_buffer(char *path, char **buf) { + int compressed = 0; + FILE * f = NULL; +- char * ext; ++ /* char * ext; */ + int l = 0; + struct stat stbuf; + +@@ -94,26 +82,6 @@ + char * tmp = NULL; + char * command = NULL; + char * openpath = path; +-#ifdef GUNZIP +- +- if (is_shell_safe(openpath, 1)) { +- ext = strrchr(openpath, '.'); +- compressed = (ext && !strcmp(ext, ".gz")); +- +- if (!compressed && stat(openpath, &stbuf)) { +- tmp = (char*) xmalloc(strlen(path) + 4); +- sprintf(tmp, "%s.gz", path); +- if ((compressed = !stat(tmp, &stbuf))) +- openpath = tmp; +- } +- } +- +- if (compressed) { +- command = (char*) xmalloc(strlen(openpath) + sizeof(GUNZIP) + 4); +- sprintf(command, GUNZIP " '%s'", openpath); +- f = popen(command, "r"); +- } else +-#endif + f = fopen(openpath, "r"); + + if (tmp) free(tmp); +@@ -170,7 +138,7 @@ + + h = chardef; + if (h->nr != V('*','*')) { +- printf("chardef corrupted\n"); ++ printf("%s\n", _("chardef corrupted")); + exit(1); + } + +@@ -216,7 +184,7 @@ + ** Add the links to the output. + ** At the moment the following are recognized: + ** +- ** name(*) -> ../man?/name.* ++ ** name(*) -> ?name.* + ** method://string -> method://string + ** www.host.name -> http://www.host.name + ** ftp.host.name -> ftp://ftp.host.name +@@ -453,8 +421,8 @@ + #define DL 1 + #define UL 2 + #define OL 3 +-static char *dl_open[4] = { "", "
\n", "
    ", "
      " }; +-static char *dl_close[4] = { "", "
\n", "", "" }; ++static char *dl_open[4] = { "", "
\n", "
    ", "
      " }; ++static char *dl_close[4] = { "", "
\n", "", "" }; + + static inline void + dl_begin(void) { +@@ -462,7 +430,7 @@ + out_html(dl_open[DL]); + dl_set[itemdepth]=DL; + } +- out_html("
"); ++ out_html("
"); + } + + static inline void +@@ -481,14 +449,14 @@ + itemdepth++; + if (itemdepth < SIZE(dl_set)) + dl_set[itemdepth]=noDL; +- out_html("
"); ++ out_html("
"); + } + + static inline void + dl_endlevel(void) { + if (itemdepth) { + dl_end(); +- out_html("
\n"); ++ out_html("
\n"); + itemdepth--; + } + } +@@ -538,12 +506,12 @@ + + #define FO0 "" + #define FC0 "" +-#define FO1 "" +-#define FC1 "" +-#define FO2 "" +-#define FC2 "" +-#define FO3 "" +-#define FC3 "" ++#define FO1 "" ++#define FC1 "" ++#define FO2 "" ++#define FC2 "" ++#define FO3 "" ++#define FC3 "" + + char *switchfont[16] = { "" , FC0 FO1, FC0 FO2, FC0 FO3, + FC1 FO0, "" , FC1 FO2, FC1 FO3, +@@ -588,14 +556,16 @@ + i=current_font; + sizebuf[0]=0; + strcat(sizebuf, change_to_font(0)); +- if (current_size) strcat(sizebuf, ""); ++ if (current_size) strcat(sizebuf, ""); + current_size=nr; + if (nr) { + int l; +- strcat(sizebuf, "0) sizebuf[l++]='+'; else sizebuf[l++]='-',nr=-nr; + sizebuf[l++]=nr+'0'; ++ sizebuf[l++]='p'; ++ sizebuf[l++]='t'; + sizebuf[l++]='"'; + sizebuf[l++]='>'; + sizebuf[l]=0; +@@ -775,7 +745,7 @@ + skip_escape=exskipescape; + intresult=j; + break; +- case 'l': h="
"; curpos=0; ++ case 'l': h="
"; curpos=0; + case 'b': + case 'v': + case 'x': +@@ -812,7 +782,7 @@ + case 'c': no_newline_output=1; break; + case '{': newline_for_fun++; h="";break; + case '}': if (newline_for_fun) newline_for_fun--; h="";break; +- case 'p': h="
\n";curpos=0; break; ++ case 'p': h="
\n";curpos=0; break; + case 't': h="\t";curpos=(curpos+8)&0xfff8; break; + case '<': h="<";curpos++; break; + case '>': h=">";curpos++; break; +@@ -1021,7 +991,7 @@ + out_html(change_to_size(0)); + if (!fillout) { + fillout=1; +- out_html(""); ++ out_html(""); + } + while (*h && *h!='\n') h++; + if (h[-1]==';') { +@@ -1197,45 +1167,45 @@ + currow=currow->prev; + } + /* produce html output */ +- if (center) out_html("
"); +- if (box==2) out_html("
"); +- out_html(""); ++ if (box==2) out_html(""); ++ out_html(""); + curfield=currow->first; + while (curfield) { + if (curfield->align!='S' && curfield->align!='^') { +- out_html("align) { + case 'N': + curfield->space+=4; + case 'R': +- out_html(" ALIGN=right"); ++ out_html(" style=\"text-align: right\""); + break; + case 'C': +- out_html(" ALIGN=center"); ++ out_html(" style=\"text-align: center\""); + default: + break; + } + if (!curfield->valign && curfield->rowspan>1) +- out_html(" VALIGN=center"); ++ out_html(" style=\"vertical-align: center\""); + if (curfield->colspan>1) { + char buf[5]; +- out_html(" COLSPAN="); ++ out_html(" colspan="); + sprintf(buf, "%i", curfield->colspan); + out_html(buf); + } + if (curfield->rowspan>1) { + char buf[5]; +- out_html(" ROWSPAN="); ++ out_html(" rowspan="); + sprintf(buf, "%i", curfield->rowspan); + out_html(buf); + } +@@ -1244,8 +1214,8 @@ + if (curfield->size) out_html(change_to_size(curfield->size)); + if (curfield->font) out_html(change_to_font(curfield->font)); + switch (curfield->align) { +- case '=': out_html("

"); break; +- case '_': out_html("
"); break; ++ case '=': out_html("

"); break; ++ case '_': out_html("
"); break; + default: + if (curfield->contents) out_html(curfield->contents); + break; +@@ -1255,20 +1225,20 @@ + if (curfield->font) out_html(change_to_font(0)); + if (curfield->size) out_html(change_to_size(0)); + if (j>=maxcol && curfield->align>'@' && curfield->align!='_') +- out_html("
"); +- out_html(""); ++ out_html("
"); ++ out_html(""); + } + curfield=curfield->next; + } +- out_html("
\n"); ++ out_html("\n"); + currow=currow->next; + } +- if (box && !border) out_html("
"); ++ out_html("
\n"); + currow=layout; + while (currow) { + j=0; +- out_html("
"); +- out_html("
"); +- if (box==2) out_html(""); +- if (center) out_html("
\n"); ++ if (box && !border) out_html(""); ++ out_html(""); ++ if (box==2) out_html(""); ++ if (center) out_html("\n"); + else out_html("\n"); +- if (!oldfillout) out_html("
");
++    if (!oldfillout) out_html("
");
+     fillout=oldfillout;
+     out_html(change_to_size(oldsize));
+     out_html(change_to_font(oldfont));
+@@ -1401,7 +1371,7 @@
+ 		case '&': value = (value && value2); break;
+ 		case ':': value = (value || value2); break;
+ 		default: fprintf(stderr,
+-				 "man2html: Unknown operator %c.\n", oper);
++				_("man2html: Unknown operator %c.\n"), oper);
+ 		}
+ 		oper=0;
+ 	    }
+@@ -1489,42 +1459,42 @@
+ 
+ 
+ char *section_list[] = {
+-    "1", "User Commands ",
+-    "1C", "User Commands",
+-    "1G", "User Commands",
+-    "1S", "User Commands",
+-    "1V", "User Commands ",
+-    "2", "System Calls",
+-    "2V", "System Calls",
+-    "3", "C Library Functions",
+-    "3C", "Compatibility Functions",
+-    "3F", "Fortran Library Routines",
+-    "3K", "Kernel VM Library Functions",
+-    "3L", "Lightweight Processes Library",
+-    "3M", "Mathematical Library",
+-    "3N", "Network Functions",
+-    "3R", "RPC Services Library",
+-    "3S", "Standard I/O Functions",
+-    "3V", "C Library Functions",
+-    "3X", "Miscellaneous Library Functions",
+-    "4", "Devices and Network Interfaces",
+-    "4F", "Protocol Families",
+-    "4I", "Devices and Network Interfaces",
+-    "4M", "Devices and Network Interfaces",
+-    "4N", "Devices and Network Interfaces",
+-    "4P", "Protocols",
+-    "4S", "Devices and Network Interfaces",
+-    "4V", "Devices and Network Interfaces",
+-    "5", "File Formats",
+-    "5V", "File Formats",
+-    "6", "Games and Demos",
+-    "7", "Environments, Tables, and Troff Macros",
+-    "7V", "Environments, Tables, and Troff Macros",
+-    "8", "Maintenance Commands",
+-    "8C", "Maintenance Commands",
+-    "8S", "Maintenance Commands",
+-    "8V", "Maintenance Commands",
+-    "L", "Local Commands",
++    "1",  N_("User Commands"),
++    "1C", N_("User Commands"),
++    "1G", N_("User Commands"),
++    "1S", N_("User Commands"),
++    "1V", N_("User Commands"),
++    "2",  N_("System Calls"),
++    "2V", N_("System Calls"),
++    "3",  N_("C Library Functions"),
++    "3C", N_("Compatibility Functions"),
++    "3F", N_("Fortran Library Routines"),
++    "3K", N_("Kernel VM Library Functions"),
++    "3L", N_("Lightweight Processes Library"),
++    "3M", N_("Mathematical Library"),
++    "3N", N_("Network Functions"),
++    "3R", N_("RPC Services Library"),
++    "3S", N_("Standard I/O Functions"),
++    "3V", N_("C Library Functions"),
++    "3X", N_("Miscellaneous Library Functions"),
++    "4",  N_("Devices and Network Interfaces"),
++    "4F", N_("Protocol Families"),
++    "4I", N_("Devices and Network Interfaces"),
++    "4M", N_("Devices and Network Interfaces"),
++    "4N", N_("Devices and Network Interfaces"),
++    "4P", N_("Protocols"),
++    "4S", N_("Devices and Network Interfaces"),
++    "4V", N_("Devices and Network Interfaces"),
++    "5",  N_("File Formats"),
++    "5V", N_("File Formats"),
++    "6",  N_("Games and Demos"),
++    "7",  N_("Environments, Tables, and Troff Macros"),
++    "7V", N_("Environments, Tables, and Troff Macros"),
++    "8",  N_("Maintenance Commands"),
++    "8C", N_("Maintenance Commands"),
++    "8S", N_("Maintenance Commands"),
++    "8V", N_("Maintenance Commands"),
++    "L",  N_("Local Commands"),
+ /* for Solaris: 
+     "1", "User Commands",
+     "1B", "SunOS/BSD Compatibility Package Commands",
+@@ -1593,7 +1563,7 @@
+     "9s", "DDI and DKI Data Structures",
+     "L", "Local Commands",
+ */
+-    NULL, "Misc. Reference Manual Pages",
++    NULL, N_("Misc. Reference Manual Pages"),
+     NULL, NULL
+ };
+ 
+@@ -1604,7 +1574,7 @@
+ 
+     if (!c) return "";
+     while (section_list[i] && strcmp(c,section_list[i])) i=i+2;
+-    if (section_list[i+1]) return section_list[i+1];
++    if (section_list[i+1]) return _(section_list[i+1]);
+     else return c;
+ }
+ 
+@@ -1636,10 +1606,10 @@
+     if (level != subs) {
+ 	manidx_need(6);
+ 	if (subs) {
+-	    strcpy(manidx+mip, "\n");
++	    strcpy(manidx+mip, "\n");
+ 	    mip += 6;
+ 	} else {
+-	    strcpy(manidx+mip, "
\n"); ++ strcpy(manidx+mip, "
\n"); + mip += 5; + } + } +@@ -1647,7 +1617,7 @@ + + scan_troff(item, 1, &c); + manidx_need(100 + strlen(c)); +- sprintf(manidx+mip, "
%s
\n", label, c); ++ sprintf(manidx+mip, "
%s
\n", label, c); + if (c) free(c); + while (manidx[mip]) mip++; + } +@@ -1834,8 +1804,8 @@ + } + break; + case V('b','r'): +- if (still_dd) out_html("
"); +- else out_html("
\n"); ++ if (still_dd) out_html("
"); ++ else out_html("
\n"); + curpos=0; + c=c+j; + if (c[0] == escapesym) { c=scan_escape(c+1); } +@@ -1865,17 +1835,17 @@ + c=skip_till_newline(c); + /* center next i lines */ + if (i>0) { +- out_html("
\n"); ++ out_html("
\n"); + while (i && *c) { + char *line=NULL; + c=scan_troff(c,1, &line); +- if (line && strncmp(line, "
", 4)) { ++ if (line && strncmp(line, "
", 4)) { + out_html(line); +- out_html("
\n"); ++ out_html("
\n"); + i--; + } + } +- out_html("
\n"); ++ out_html("\n"); + curpos=0; + } + break; +@@ -1906,7 +1876,7 @@ + if (!fillout) { + out_html(change_to_font(0)); + out_html(change_to_size('0')); +- out_html("
\n"); ++ out_html("
\n"); + } + curpos=0; + fillout=1; +@@ -1981,7 +1951,7 @@ + if (fillout) { + out_html(change_to_font(0)); + out_html(change_to_size('0')); +- out_html("
\n");
++		out_html("
\n");
+ 	    }
+ 	    curpos=0;
+ 	    fillout=0;
+@@ -2002,7 +1972,7 @@
+ 	    break;
+ 	case V('s','p'):
+ 	    c=c+j;
+-	    if (fillout) out_html("

"); else { ++ if (fillout) out_html("

"); else { + out_html(NEWLINE); + NEWLINE[0]='\n'; + } +@@ -2033,30 +2003,15 @@ + *c = 0; + scan_troff(h,1, &name); + if (name[3] == '/') h=name+3; else h=name; +-#if NOCGI +- if (!out_length) { +- char *t,*s; +- t=strrchr(fname, '/'); +- if (!t) t=fname; +- fprintf(stderr, "ln -s %s.html %s.html\n", h, t); +- s=strrchr(t, '.');if (!s) s=t; +- printf(CONTENTTYPE DOCTYPE); +- printf(" Man page of %s\n" +- "\n" +- "See the man page for %s.\n" +- "\n", +- s, h, h); +- } else +-#endif + { + /* this works alright, except for section 3 */ + if ((l = read_manpage_into_buffer(h, &buf)) < 0) { + fprintf(stderr, +- "man2html: unable to open or read file %s\n", h); +- out_html("

" +- "man2html: unable to open or read file\n"); ++ _("man2html: unable to open or read file %s\n"), h); ++ out_html("
"); ++ out_html(_("man2html: unable to open or read file\n")); + out_html(h); +- out_html("
\n"); ++ out_html("
\n"); + } else { + buf[0]=buf[l]='\n'; + buf[l+1]=buf[l+2]=0; +@@ -2085,7 +2040,7 @@ + #if 0 + dl_down(); + #endif +- out_html("
\n"); ++ out_html("
\n"); + c=c+j; + c=scan_expression(c, &j); + for (i=0; i"); ++ out_html("
"); + curpos = 0; + break; + case V('T','P'): +@@ -2172,7 +2127,7 @@ + /* somewhere a definition ends with '.TP' */ + if (!*c) still_dd=1; else { + c=scan_troff(c,1,NULL); +- out_html("
"); ++ out_html("
"); + } + curpos=0; + break; +@@ -2195,20 +2150,20 @@ + fprintf(idxfile,"\n"); + } + #endif +- out_html("' and '<' solves it, but creates + ** some space. A normal space does not work. + */ +- out_html("\">"); ++ out_html("\">"); + break; + case V('P',' '): + case V('P','\n'): + case V('L','P'): + case V('P','P'): + dl_end(); +- if (fillout) out_html("

\n"); else { ++ if (fillout) out_html("

\n"); else { + out_html(NEWLINE); + NEWLINE[0]='\n'; + } +@@ -2272,19 +2227,29 @@ + out_html(change_to_size(0)); + if (!fillout) { + fillout=1; +- out_html("

"); ++ out_html("
"); + } + trans_char(c,'"', '\a'); + add_to_index(mode, c); +- out_html(" \n

"); +- else out_html("\"> \n

"); ++ ++ if (mode) { ++ out_html("

"); ++ } else { ++ out_html("

\n\n
\n

"); ++ } ++ + mandoc_synopsis = (strncmp(c, "SYNOPSIS", 8) == 0); + c = (mandoc_command ? scan_troff_mandoc : scan_troff)(c,1,NULL); +- if (mode) out_html("

\n"); +- else out_html("\n"); ++ ++ if (mode) ++ out_html("\n"); ++ else ++ out_html("\n"); ++ + curpos=0; + break; + case V('T','S'): +@@ -2315,7 +2280,7 @@ + int skip=0; + output_possible=1; + printf(CONTENTTYPE DOCTYPE); +- out_html("Man page of "); ++ out_html("<html><head>\n<meta charset=\"UTF-8\">\n<title>"); + scan_troff(wordlist[0], 0, &t); + /* we need to remove all html tags */ + for (s=q=t; *s; s++) { +@@ -2324,11 +2289,14 @@ + else if (!skip) *q++ = *s; + } + *q = '\0'; +- out_html(t); ++ char buff[256]; ++ sprintf(buff, _("Man page of %s"), t); ++ out_html(buff); + free(t); +- out_html("\n\n

"); ++ out_html("\n\n\n

"); + scan_troff(wordlist[0], 0, NULL); +- out_html("

\nSection: "); ++ out_html("

\n
\n"); ++ out_html(_("Section: ")); + if (words>4) + scan_troff(wordlist[4], 0, NULL); + else +@@ -2336,14 +2304,17 @@ + out_html(" ("); + scan_troff(wordlist[1], 0, NULL); + if (words>2) { +- out_html(")
Updated: "); ++ out_html(")
"); ++ out_html(_("Updated: ")); + scan_troff(wordlist[2], 1, NULL); + } else out_html(")"); +- out_html("
Index\n"); ++ out_html("
"); ++ out_html(_("Index")); ++ out_html("\n"); + man_page_html(0,0); /* Return to Main Contents */ + *sl='\n'; +- out_html("
\n"); +- if (mandoc_command) out_html("
BSD mandoc
"); ++ out_html("
\n"); ++ if (mandoc_command) out_html("
\nBSD mandoc
"); + } + c = sl+1; + } else +@@ -2507,7 +2478,7 @@ + dl_newlevel_type(DL); + if (nl) + *nl = t; +- if (fillout) out_html("

\n"); else { ++ if (fillout) out_html("

\n"); else { + out_html(NEWLINE); + NEWLINE[0]='\n'; + } +@@ -2518,7 +2489,7 @@ + case V('E','l'): /* BSD mandoc */ + c=c+j; + dl_endlevel_type(); +- if (fillout) out_html("

\n"); else { ++ if (fillout) out_html("

\n"); else { + out_html(NEWLINE); + NEWLINE[0]='\n'; + } +@@ -2528,7 +2499,7 @@ + case V('I','t'): /* BSD mandoc */ + c=c+j; + if (dl_type(DL)) { +- out_html("

"); ++ out_html("
"); + out_html(change_to_font('B')); + if (*c == '\n') { + /* Don't allow embedded comms after a newline */ +@@ -2543,9 +2514,9 @@ + if (inXo) + still_dd = 1; + else +- out_html("
"); ++ out_html("
"); + } else if (dl_type(UL) || dl_type(OL)) { +- out_html("
  • "); ++ out_html("
  • "); + c=scan_troff_mandoc(c,1,NULL); + out_html(NEWLINE); + } +@@ -2559,7 +2530,7 @@ + c=c+j; + if (inXo) { + if (still_dd) +- out_html("
    "); ++ out_html("
    "); + inXo = 0; + } + break; +@@ -2594,12 +2565,12 @@ + case V('D','l'): /* BSD mandoc */ + c=c+j; + out_html(NEWLINE); +- out_html("
    "); ++ out_html("
    "); + out_html(change_to_font('L')); + if (*c == '\n') c++; + c=scan_troff_mandoc(c, 1, NULL); + out_html(change_to_font('R')); +- out_html("
    "); ++ out_html("
    "); + if (fillout) curpos++; else curpos=0; + break; + case V('B','d'): /* BSD mandoc */ +@@ -2615,14 +2586,14 @@ + mandoc_bd_options = 0; /* Remember options for terminating Bl */ + if (strstr(c, "-offset indent")) { + mandoc_bd_options |= BD_INDENT; +- out_html("
    \n"); ++ out_html("
    \n"); + } + if (strstr(c, "-literal") || strstr(c, "-unfilled")) { + if (fillout) { + mandoc_bd_options |= BD_LITERAL; + out_html(change_to_font(0)); + out_html(change_to_size('0')); +- out_html("
    \n");
    ++		       out_html("
    \n");
    + 		  }
    + 		  curpos=0;
    + 		  fillout=0;
    +@@ -2637,18 +2608,18 @@
    + 		  if (!fillout) {
    + 		       out_html(change_to_font(0));
    + 		       out_html(change_to_size('0'));
    +-		       out_html("
    \n"); ++ out_html("
    \n"); + } + } + if (mandoc_bd_options & BD_INDENT) +- out_html("
    \n"); ++ out_html("
    \n"); + curpos=0; + fillout=1; + c=skip_till_newline(c); + break; + case V('B','e'): /* BSD mandoc */ + c=c+j; +- if (fillout) out_html("

    "); else { ++ if (fillout) out_html("

    "); else { + out_html(NEWLINE); + NEWLINE[0]='\n'; + } +@@ -2715,7 +2686,7 @@ + if (fillout) curpos++; else curpos=0; + break; + case V('P','p'): /* BSD mandoc */ +- if (fillout) out_html("

    \n"); else { ++ if (fillout) out_html("

    \n"); else { + out_html(NEWLINE); + NEWLINE[0]='\n'; + } +@@ -2726,9 +2697,9 @@ + trans_char(c,'"','\a'); + c=c+j; + if (*c == '\n') c++; +- out_html("``"); ++ out_html("“"); + c=scan_troff_mandoc(c, 1, NULL); +- out_html("''"); ++ out_html("”"); + out_html(NEWLINE); + if (fillout) curpos++; else curpos=0; + break; +@@ -2800,12 +2771,22 @@ + trans_char(c,'"','\a'); + c=c+j; + if (*c == '\n') c++; +- out_html("`"); ++ out_html("‘"); + c=scan_troff_mandoc(c, 1, NULL); +- out_html("'"); ++ out_html("’"); + out_html(NEWLINE); + if (fillout) curpos++; else curpos=0; + break; ++ case V('A','q'): /* BSD mandoc */ ++ trans_char(c,'"','\a'); ++ c=c+j; ++ if (*c == '\n') c++; ++ out_html("⟨"); ++ c=scan_troff_mandoc(c, 1, NULL); ++ out_html("⟩"); ++ out_html(NEWLINE); ++ if (fillout) curpos++; else curpos=0; ++ break; + case V('A','r'): /* BSD mandoc */ + /* parse one line in italics */ + out_html(change_to_font('I')); +@@ -2855,7 +2836,7 @@ + */ + static int count = 0; /* Don't break on the first Nm */ + if (count) { +- out_html("
    "); ++ out_html("
    "); + } else { + char *end, t=0 /* just for gcc */; + end = strchr(c, '\n'); +@@ -3038,7 +3019,7 @@ + if (h[-1] == '\n' && still_dd && isalnum(*h)) { + /* sometimes a .HP request is not followed by a .br request */ + FLUSHIBP; +- out_html("

    "); ++ out_html("
    "); + curpos=0; + still_dd=0; + } +@@ -3108,12 +3089,12 @@ + curpos++; + } + } else { +- out_html(""); ++ out_html(""); + while (curpos < tabstops[curtab]) { + out_html(" "); + curpos++; + } +- out_html(""); ++ out_html(""); + } + } + } +@@ -3122,7 +3103,7 @@ + if (*h == ' ' && (h[-1] == '\n' || usenbsp)) { + FLUSHIBP; + if (!usenbsp && fillout) { +- out_html("
    "); ++ out_html("
    "); + curpos=0; + } + usenbsp=fillout; +@@ -3196,13 +3177,13 @@ + + switch(status) { + case 403: +- printf("Status: 403 Forbidden\n"); ++ printf("HTTP/1.1 403 Forbidden\n"); + break; + case 404: +- printf("Status: 404 Not Found\n"); ++ printf("HTTP/1.1 404 Not Found\n"); + break; + case 500: +- printf("Status: 500 Internal Server Error\n"); ++ printf("HTTP/1.1 500 Internal Server Error\n"); + break; + case 0: + default: +@@ -3210,12 +3191,13 @@ + } + + printf(CONTENTTYPE DOCTYPE); +- printf("%s\n" +- "\n

    %s

    \n", s, s); ++ printf("\n\n\n%s\n" ++ "\n\n" ++ "\n

    %s

    \n
    \n", s, s); + va_start(p, t); + vfprintf(stdout, t, p); + va_end(p); +- printf("\n"); ++ printf("
    \n\n"); + exit(0); + } + +@@ -3223,8 +3205,8 @@ + xstrdup(const char *s) { + char *p = strdup(s); + if (p == NULL) +- error_page(500, "Out of memory", +- "Sorry, out of memory, aborting...\n"); ++ error_page(500, _("Out of memory"), ++ _("Sorry, out of memory, aborting...\n")); + return p; + } + +@@ -3232,8 +3214,8 @@ + xmalloc(size_t size) { + void *p = malloc(size); + if (p == NULL) +- error_page(500, "Out of memory", +- "Sorry, out of memory, aborting...\n"); ++ error_page(500, _("Out of memory"), ++ _("Sorry, out of memory, aborting...\n")); + return p; + } + +@@ -3241,16 +3223,16 @@ + xrealloc(void *ptr, size_t size) { + void *p = realloc(ptr,size); + if (p == NULL) +- error_page(500, "Out of memory", +- "Sorry, out of memory, aborting...\n"); ++ error_page(500, _("Out of memory"), ++ _("Sorry, out of memory, aborting...\n")); + return p; + } + + static void + usage(void) { +- error_page(500, "man2html: bad invocation", +- "Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n" +- "or: man2html -r [filename]\n"); ++ error_page(500, _("man2html: bad invocation"), ++ _("Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n" ++ "or: man2html -r [filename]\n")); + } + + static void +@@ -3273,7 +3255,7 @@ + } + #if 0 + else /* complain or not - this need not be fatal */ +- error_page("Error", "man2html: could not chdir to %s", s); ++ error_page(_("Error"), _("man2html: could not chdir to %s"), s); + #endif + } + } +@@ -3291,6 +3273,11 @@ + */ + int + main(int argc, char **argv) { ++ setlocale (LC_ALL, ""); ++ bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale"); ++ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); ++ textdomain (GETTEXT_PACKAGE); ++ + int l, c; + char *buf, *filename, *fnam = NULL; + +@@ -3309,7 +3296,7 @@ + case 'D': + goto_dir(optarg, 0, 0); break; + case 'E': +- error_page(0, "Error", "%s", optarg); break; ++ error_page(0, _("Error"), "%s", optarg); break; + case 'h': + set_cgibase("localhost"); break; + case 'H': +@@ -3362,7 +3349,7 @@ + + l = read_manpage_into_buffer(fnam, &buf); + if (l < 0) +- error_page(404, "File not found", "Could not open %s\n", fname); ++ error_page(404, _("File not found"), _("Could not open %s\n"), fname); + + buf[0] = '\n'; + buf[l+1] = '\n'; +@@ -3379,34 +3366,34 @@ + out_html(change_to_size(0)); + if (!fillout) { + fillout=1; +- out_html(""); ++ out_html(""); + } + out_html(NEWLINE); + if (output_possible) { + /*   for mosaic users */ + if (manidx) { +- printf("
    \n 

    Index

    \n
    \n"); ++ printf("
  • \n\n
    \n

    %s

    \n\n
    \n", _("Index")); + manidx[mip]=0; + printf("%s", manidx); +- if (subs) printf("
    \n"); +- printf("\n"); ++ if (subs) printf("\n"); ++ printf("\n"); + } + print_sig(); +- printf("\n\n"); ++ printf("\n\n"); + } else { + if (!filename) + filename = fname; + if (*filename == '/') +- error_page(403, "Invalid Man Page", +- "The requested file %s is not a valid (unformatted) " ++ error_page(403, _("Invalid Man Page"), ++ _("The requested file %s is not a valid (unformatted) " + "man page.\nIf the file is a formatted man page, " + "you could try to load the\n" +- "plain file.\n", ++ "plain file.\n"), + filename, filename); + else +- error_page(403, "Invalid Man Page", +- "The requested file %s is not a valid (unformatted) " +- "man page.", filename); ++ error_page(403, _("Invalid Man Page"), ++ _("The requested file %s is not a valid (unformatted) " ++ "man page."), filename); + } + if (idxfile) + fclose(idxfile); +--- a/scripts/cgi-bin/man/man2html ++++ b/scripts/cgi-bin/man/man2html +@@ -8,11 +8,11 @@ + + # Do we need lynxcgi URLs? For the moment our criterion is + # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset. +-AGENT="${HTTP_USER_AGENT-unknown}" ++AGENT="${HTTP_USER_AGENT:-unknown}" + + case "$AGENT" in + Lynx*|lynx*) +- HH="${HTTP_HOST-nohh}" ++ HH="${HTTP_HOST:-nohh}" + SED="s/%lynx //" + ;; + *) +@@ -21,7 +21,7 @@ + ;; + esac + +-SERVER="${SERVER_NAME-localhost}" ++SERVER="${SERVER_NAME:-localhost}" + case "$HH" in + nohh) + LL="-l" +--- a/scripts/cgi-bin/man/mansearch ++++ b/scripts/cgi-bin/man/mansearch +@@ -7,11 +7,11 @@ + + # Do we need lynxcgi URLs? For the moment our criterion is + # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset. +-AGENT="${HTTP_USER_AGENT-unknown}" ++AGENT="${HTTP_USER_AGENT:-unknown}" + + case "$AGENT" in + Lynx*|lynx*) +- HH="${HTTP_HOST-nohh}" ++ HH="${HTTP_HOST:-nohh}" + SED="s/%lynx //" + ;; + *) +@@ -20,7 +20,7 @@ + ;; + esac + +-SERVER="${SERVER_NAME-localhost}" ++SERVER="${SERVER_NAME:-localhost}" + case "$HH" in + nohh) + CG="lynxcgi:/usr/lib/cgi-bin/man" +--- a/scripts/cgi-bin/man/mansearchhelp ++++ b/scripts/cgi-bin/man/mansearchhelp +@@ -4,17 +4,17 @@ + + # Do we need lynxcgi URLs? For the moment our criterion is + # 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset. +-AGENT="${HTTP_USER_AGENT-unknown}" ++AGENT="${HTTP_USER_AGENT:-unknown}" + case "$AGENT" in + Lynx*|lynx*) +- HH="${HTTP_HOST-nohh}" ++ HH="${HTTP_HOST:-nohh}" + ;; + *) + HH=nolynx + ;; + esac + +-SERVER="${SERVER_NAME-localhost}" ++SERVER="${SERVER_NAME:-localhost}" + case "$HH" in + nohh) + CG="lynxcgi:/usr/lib/cgi-bin/man" +--- a/strdefs.c ++++ b/strdefs.c +@@ -27,266 +27,333 @@ + { V('.','V'), 1, 0, NULL }, /* the me package tests for this */ + { 0, 0, 0, NULL } }; + ++ ++/* Characters written according to http://mdocml.bsd.lv/man/mandoc_char.7.html */ ++ + static STRDEF standardstring[] = { +- { V('<','='), 2, "<=", NULL }, /* less equal */ +- { V('>','='), 2, ">=;", NULL }, /* greather equal */ +- { V('A','m'), 1, "&", NULL }, /* infinity */ +- { V('B','a'), 1, "|", NULL }, /* vartical bar */ +- { V('G','e'), 2, ">=;", NULL }, /* greather equal */ +- { V('G','t'), 1, ">", NULL }, /* greather than */ +- { V('I','f'), 1, "∞", NULL }, /* infinity */ +- { V('L','e'), 2, "<=", NULL }, /* less equal */ +- { V('L','q'), 1, "“", NULL }, /* left double quote */ +- { V('L','t'), 1, "<", NULL }, /* less than */ +- { V('N','a'), 3, "NaN", NULL }, /* not a number */ +- { V('N','e'), 2, "!=", NULL }, /* not equal */ +- { V('P','i'), 2, "Pi", NULL }, /* pi */ +- { V('P','m'), 1, "±", NULL }, /* plus minus */ +- { V('R',' '), 1, "®", NULL }, +- { V('R','q'), 1, "”", NULL }, /* right double quote */ +- { V('a','a'), 1, "'", NULL }, /* accute accent */ +- { V('g','a'), 1, "`", NULL }, /* grave accent */ +- { V('l','q'), 2, "``", NULL }, +- { V('q',' '), 1, """, NULL }, /* straight double quote */ +- { V('r','q'), 2, "''", NULL }, +- { V('u','a'), 1, "^", NULL }, /* upwards arrow */ ++ { V('<','='), 1, "≤", NULL }, /* less-than-equal */ ++ { V('>','='), 1, "≥", NULL }, /* greater-than-equal */ ++ { V('A','i'), 4, "ANSI", NULL }, /* ANSI standard name */ ++ { V('A','m'), 1, "&", NULL }, /* ampersand */ ++ { V('B','a'), 1, "|", NULL }, /* vertical bar */ ++ { V('G','e'), 1, "≥", NULL }, /* greater-than-equal */ ++ { V('G','t'), 1, ">", NULL }, /* greater-than */ ++ { V('I','f'), 8, "infinity", NULL }, /* infinity */ ++ { V('L','e'), 1, "≤", NULL }, /* less-than-equal */ ++ { V('L','q'), 1, "“", NULL }, /* left-double-quote */ ++ { V('L','t'), 1, "<", NULL }, /* less-than */ ++ { V('N','a'), 3, "NaN", NULL }, /* NaN */ ++ { V('N','e'), 1, "≠", NULL }, /* not equal */ ++ { V('P','i'), 2, "pi", NULL }, /* pi */ ++ { V('P','m'), 1, "±", NULL }, /* plus-minus */ ++ { V('P','x'), 5, "POSIX", NULL }, /* POSIX standard name */ ++ { V('R',' '), 1, "®", NULL }, /* restricted mark */ ++ { V('R','q'), 1, "”", NULL }, /* right-double-quote */ ++ { V('T','m'), 4, "(Tm)", NULL }, /* trade mark */ ++ { V('a','a'), 1, "´", NULL }, /* acute */ ++ { V('g','a'), 1, "`", NULL }, /* grave */ ++ { V('l','p'), 1, "(", NULL }, /* left-parenthesis */ ++ { V('l','q'), 1, "“", NULL }, /* left double-quote */ ++ { V('q',' '), 1, """, NULL }, /* double-quote */ ++ { V('r','p'), 1, ")", NULL }, /* right-parenthesis */ ++ { V('r','q'), 1, "”", NULL }, /* right double-quote */ ++ { V('u','a'), 1, "↑", NULL }, /* up-arrow */ ++ { V('v','a'), 1, "↕", NULL }, /* up-down arrow */ + { 0, 0, NULL, NULL} + }; + + static STRDEF standardchar[] = { +- { V('*','*'), 1, "*", NULL }, /* math star */ +- { V('*','A'), 1, "Α", NULL }, +- { V('*','B'), 1, "Β", NULL }, +- { V('*','C'), 1, "Ξ", NULL }, +- { V('*','D'), 1, "Δ", NULL }, +- { V('*','E'), 1, "Ε", NULL }, +- { V('*','F'), 1, "Φ", NULL }, +- { V('*','G'), 1, "Γ", NULL }, +- { V('*','H'), 1, "Θ", NULL }, +- { V('*','I'), 1, "Ι", NULL }, +- { V('*','K'), 1, "Κ", NULL }, +- { V('*','L'), 1, "Λ", NULL }, +- { V('*','M'), 1, "Μ", NULL }, +- { V('*','N'), 1, "Ν", NULL }, +- { V('*','O'), 1, "Ο", NULL }, +- { V('*','P'), 1, "Π", NULL }, +- { V('*','Q'), 1, "Ψ", NULL }, +- { V('*','R'), 1, "Ρ", NULL }, +- { V('*','S'), 1, "Σ", NULL }, +- { V('*','T'), 1, "Τ", NULL }, +- { V('*','U'), 1, "Υ", NULL }, +- { V('*','W'), 1, "Ω", NULL }, +- { V('*','X'), 1, "Χ", NULL }, +- { V('*','Y'), 1, "Η", NULL }, +- { V('*','Z'), 1, "Ζ", NULL }, +- { V('*','a'), 1, "α", NULL }, +- { V('*','b'), 1, "β", NULL }, +- { V('*','c'), 1, "ξ", NULL }, +- { V('*','d'), 1, "δ", NULL }, +- { V('*','e'), 1, "ε", NULL }, +- { V('*','f'), 1, "φ", NULL }, +- { V('*','g'), 1, "γ", NULL }, +- { V('*','h'), 1, "θ", NULL }, +- { V('*','i'), 1, "ι", NULL }, +- { V('*','k'), 1, "κ", NULL }, +- { V('*','l'), 1, "λ", NULL }, +- { V('*','m'), 1, "μ", NULL }, +- { V('*','n'), 1, "ν", NULL }, +- { V('*','o'), 1, "ο", NULL }, +- { V('*','p'), 1, "π", NULL }, +- { V('*','q'), 1, "ψ", NULL }, +- { V('*','r'), 1, "ρ", NULL }, +- { V('*','s'), 1, "σ", NULL }, +- { V('*','t'), 1, "τ", NULL }, +- { V('*','u'), 1, "υ", NULL }, +- { V('*','w'), 1, "ω", NULL }, +- { V('*','x'), 1, "χ", NULL }, +- { V('*','y'), 1, "η", NULL }, +- { V('*','z'), 1, "ζ", NULL }, +- { V('\'','A'), 1, "Á", NULL }, +- { V('\'','E'), 1, "É", NULL }, +- { V('\'','I'), 1, "Í", NULL }, +- { V('\'','O'), 1, "Ó", NULL }, +- { V('\'','U'), 1, "Ú", NULL }, +- { V('\'','Y'), 1, "Ý", NULL }, +- { V('\'','a'), 1, "á", NULL }, +- { V('\'','e'), 1, "é", NULL }, +- { V('\'','i'), 1, "í", NULL }, +- { V('\'','o'), 1, "ó", NULL }, +- { V('\'','u'), 1, "ú", NULL }, +- { V('\'','y'), 1, "ý", NULL }, +- { V('!','='), 1, "≠", NULL }, +- { V('%','0'), 1, "‰", NULL }, +- { V('+','-'), 1, "±", NULL }, +- { V(',','C'), 1, "Ç", NULL }, +- { V(',','c'), 1, "ç", NULL }, +- { V('-','>'), 1, "→", NULL }, +- { V('-','D'), 1, "Ð", NULL }, +- { V('.','i'), 1, "ı", NULL }, +- { V('/','L'), 1, "Ł", NULL }, +- { V('/','O'), 1, "Ø", NULL }, +- { V('/','l'), 1, "ł", NULL }, +- { V('/','o'), 1, "ø", NULL }, +- { V('1','2'), 1, "½", NULL }, +- { V('1','4'), 1, "¼", NULL }, +- { V('3','4'), 1, "¾", NULL }, +- { V(':','A'), 1, "Ä", NULL }, +- { V(':','E'), 1, "Ë", NULL }, +- { V(':','I'), 1, "Ï", NULL }, +- { V(':','O'), 1, "Ö", NULL }, +- { V(':','U'), 1, "Ü", NULL }, +- { V(':','a'), 1, "ä", NULL }, +- { V(':','e'), 1, "ë", NULL }, +- { V(':','i'), 1, "ï", NULL }, +- { V(':','o'), 1, "ö", NULL }, +- { V(':','u'), 1, "ü", NULL }, +- { V(':','y'), 1, "ÿ", NULL }, +- { V('<','-'), 1, "←", NULL }, +- { V('<','='), 1, "≤", NULL }, +- { V('<','>'), 1, "↔", NULL }, +- { V('=','='), 1, "≡", NULL }, +- { V('=','~'), 1, "≅", NULL }, +- { V('>','='), 1, "≥", NULL }, +- { V('A','E'), 1, "Æ", NULL }, +- { V('A','h'), 1, "&alepfsym;", NULL }, +- { V('C','R'), 1, "␍", NULL }, +- { V('C','s'), 1, "¤", NULL }, +- { V('D','o'), 1, "$", NULL }, +- { V('E','u'), 1, "€", NULL }, +- { V('F','c'), 1, "»", NULL }, +- { V('F','i'), 3, "ffi", NULL }, +- { V('F','l'), 3, "ffl", NULL }, +- { V('F','o'), 1, "«", NULL }, +- { V('O','E'), 1, "Œ", NULL }, +- { V('P','o'), 1, "£", NULL }, +- { V('S','1'), 1, "¹", NULL }, +- { V('S','2'), 1, "²", NULL }, +- { V('S','3'), 1, "³", NULL }, +- { V('S','d'), 1, "ð", NULL }, +- { V('T','P'), 1, "Þ", NULL }, +- { V('T','p'), 1, "þ", NULL }, +- { V('Y','e'), 1, "¥", NULL }, +- { V('^','A'), 1, "Â", NULL }, +- { V('^','E'), 1, "Ê", NULL }, +- { V('^','I'), 1, "Î", NULL }, +- { V('^','O'), 1, "Ô", NULL }, +- { V('^','U'), 1, "Û", NULL }, +- { V('^','a'), 1, "â", NULL }, +- { V('^','e'), 1, "ê", NULL }, +- { V('^','i'), 1, "î", NULL }, +- { V('^','o'), 1, "ô", NULL }, +- { V('^','u'), 1, "û", NULL }, +- { V('`','A'), 1, "À", NULL }, +- { V('`','E'), 1, "È", NULL }, +- { V('`','I'), 1, "Ì", NULL }, +- { V('`','O'), 1, "Ò", NULL }, +- { V('`','U'), 1, "Ù", NULL }, +- { V('`','a'), 1, "à", NULL }, +- { V('`','e'), 1, "è", NULL }, +- { V('`','i'), 1, "ì", NULL }, +- { V('`','o'), 1, "ò", NULL }, +- { V('`','u'), 1, "ù", NULL }, +- { V('a','a'), 1, "´", NULL }, +- { V('a','e'), 1, "æ", NULL }, +- { V('a','p'), 1, "≈", NULL }, +- { V('a','q'), 1, "'", NULL }, +- { V('a','t'), 1, "@", NULL }, +- { V('a','~'), 1, "~", NULL }, +- { V('b','a'), 1, "|", NULL }, +- { V('b','b'), 1, "|", NULL }, +- { V('b','r'), 1, "|", NULL }, +- { V('b','r'), 1, "|", NULL }, +- { V('b','u'), 1, "•", NULL }, +- { V('b','v'), 1, "|", NULL }, +- { V('c','*'), 1, "⊗", NULL }, +- { V('c','+'), 1, "⊕", NULL }, +- { V('c','i'), 1, "○", NULL }, +- { V('c','o'), 1, "©", NULL }, +- { V('c','q'), 1, "'", NULL }, +- { V('c','t'), 1, "¢", NULL }, +- { V('d','A'), 1, "⇓", NULL }, +- { V('d','a'), 1, "↓", NULL }, +- { V('d','d'), 1, "=", NULL }, +- { V('d','e'), 1, "°", NULL }, +- { V('d','g'), 1, "-", NULL }, +- { V('d','i'), 1, "÷", NULL }, +- { V('d','q'), 1, """, NULL }, +- { V('e','m'), 3, "---", NULL }, /* em dash */ +- { V('e','n'), 1, "-", NULL }, /* en dash */ +- { V('e','q'), 1, "=", NULL }, +- { V('e','s'), 1, "Ø", NULL }, +- { V('e','u'), 1, "€", NULL }, +- { V('f','/'), 1, "⁄", NULL }, +- { V('f','c'), 1, "›", NULL }, +- { V('f','f'), 2, "ff", NULL }, +- { V('f','i'), 2, "fi", NULL }, +- { V('f','l'), 2, "fl", NULL }, +- { V('f','m'), 1, "´", NULL }, +- { V('f','o'), 1, "‹", NULL }, +- { V('g','a'), 1, "`", NULL }, +- { V('h','A'), 1, "⇔", NULL }, +- { V('h','y'), 1, "-", NULL }, +- { V('i','f'), 1, "∞", NULL }, +- { V('i','s'), 8, "Integral", NULL }, /* integral sign */ +- { V('l','A'), 1, "⇐", NULL }, +- { V('l','B'), 1, "[", NULL }, +- { V('l','C'), 1, "{", NULL }, +- { V('l','a'), 1, "<", NULL }, +- { V('l','b'), 1, "[", NULL }, +- { V('l','c'), 2, "|¯", NULL }, +- { V('l','f'), 2, "|_", NULL }, +- { V('l','h'), 1, "☚", NULL }, +- { V('l','k'), 1, "{", NULL }, +- { V('l','q'), 1, "\"", NULL }, +- { V('l','z'), 1, "◊", NULL }, +- { V('m','c'), 1, "µ", NULL }, +- { V('m','i'), 1, "-", NULL }, +- { V('m','u'), 1, "×", NULL }, +- { V('n','o'), 1, "¬", NULL }, +- { V('o','A'), 1, "Å", NULL }, +- { V('o','a'), 1, "å", NULL }, +- { V('o','e'), 1, "œ", NULL }, +- { V('o','q'), 1, "'", NULL }, +- { V('o','r'), 1, "|", NULL }, +- { V('p','d'), 1, "d", NULL }, /* partial derivative */ +- { V('p','l'), 1, "+", NULL }, +- { V('p','s'), 1, "¶", NULL }, +- { V('r','!'), 1, "¡", NULL }, +- { V('r','?'), 1, "¿", NULL }, +- { V('r','A'), 1, "⇒", NULL }, +- { V('r','B'), 1, "]", NULL }, +- { V('r','C'), 1, "}", NULL }, +- { V('r','a'), 1, ">", NULL }, +- { V('r','c'), 2, "¯|", NULL }, +- { V('r','f'), 2, "_|", NULL }, +- { V('r','g'), 1, "®", NULL }, +- { V('r','h'), 1, "☛", NULL }, +- { V('r','k'), 1, "}", NULL }, +- { V('r','n'), 1, "¯", NULL }, +- { V('r','q'), 1, "\"", NULL }, +- { V('r','s'), 1, "\\", NULL }, +- { V('r','u'), 1, "_", NULL }, +- { V('s','c'), 1, "§", NULL }, +- { V('s','h'), 1, "#", NULL }, +- { V('s','l'), 1, "/", NULL }, +- { V('s','q'), 1, "□", NULL }, +- { V('s','s'), 1, "ß", NULL }, +- { V('t','f'), 1, "∴", NULL }, +- { V('t','i'), 1, "~", NULL }, +- { V('t','m'), 1, "™", NULL }, +- { V('t','s'), 1, "s", NULL }, /* should be terminal sigma */ +- { V('u','A'), 1, "⇑", NULL }, +- { V('u','a'), 1, "↑", NULL }, +- { V('u','l'), 1, "_", NULL }, +- { V('~','A'), 1, "Ã", NULL }, +- { V('~','N'), 1, "Ñ", NULL }, +- { V('~','O'), 1, "Õ", NULL }, +- { V('~','a'), 1, "ã", NULL }, +- { V('~','n'), 1, "ñ", NULL }, +- { V('~','o'), 1, "õ", NULL }, ++ { V('*','*'), 1, "∗", NULL }, /* asterisk */ ++ { V('*','A'), 1, "Α", NULL }, /* Alpha */ ++ { V('*','B'), 1, "Β", NULL }, /* Beta */ ++ { V('*','C'), 1, "Ξ", NULL }, /* Xi */ ++ { V('*','D'), 1, "Δ", NULL }, /* Delta */ ++ { V('*','E'), 1, "Ε", NULL }, /* Epsilon */ ++ { V('*','F'), 1, "Φ", NULL }, /* Phi */ ++ { V('*','G'), 1, "Γ", NULL }, /* Gamma */ ++ { V('*','H'), 1, "Θ", NULL }, /* Theta */ ++ { V('*','I'), 1, "Ι", NULL }, /* Iota */ ++ { V('*','K'), 1, "Κ", NULL }, /* Kappa */ ++ { V('*','L'), 1, "Λ", NULL }, /* Lambda */ ++ { V('*','M'), 1, "Μ", NULL }, /* Mu */ ++ { V('*','N'), 1, "Ν", NULL }, /* Nu */ ++ { V('*','O'), 1, "Ο", NULL }, /* Omicron */ ++ { V('*','P'), 1, "Π", NULL }, /* Pi */ ++ { V('*','Q'), 1, "Ψ", NULL }, /* Psi */ ++ { V('*','R'), 1, "Ρ", NULL }, /* Rho */ ++ { V('*','S'), 1, "Σ", NULL }, /* Sigma */ ++ { V('*','T'), 1, "Τ", NULL }, /* Tau */ ++ { V('*','U'), 1, "Υ", NULL }, /* Upsilon */ ++ { V('*','W'), 1, "Ω", NULL }, /* Omega */ ++ { V('*','X'), 1, "Χ", NULL }, /* Chi */ ++ { V('*','Y'), 1, "Η", NULL }, /* Eta */ ++ { V('*','Z'), 1, "Ζ", NULL }, /* Zeta */ ++ { V('*','a'), 1, "α", NULL }, /* alpha */ ++ { V('*','b'), 1, "β", NULL }, /* beta */ ++ { V('*','c'), 1, "ξ", NULL }, /* xi */ ++ { V('*','d'), 1, "δ", NULL }, /* delta */ ++ { V('*','e'), 1, "ε", NULL }, /* epsilon */ ++ { V('*','f'), 1, "φ", NULL }, /* phi */ ++ { V('*','g'), 1, "γ", NULL }, /* gamma */ ++ { V('*','h'), 1, "θ", NULL }, /* theta */ ++ { V('*','i'), 1, "ι", NULL }, /* iota */ ++ { V('*','k'), 1, "κ", NULL }, /* kappa */ ++ { V('*','l'), 1, "λ", NULL }, /* lambda */ ++ { V('*','m'), 1, "μ", NULL }, /* mu */ ++ { V('*','n'), 1, "ν", NULL }, /* nu */ ++ { V('*','o'), 1, "ο", NULL }, /* omicron */ ++ { V('*','p'), 1, "π", NULL }, /* pi */ ++ { V('*','q'), 1, "ψ", NULL }, /* psi */ ++ { V('*','r'), 1, "ρ", NULL }, /* rho */ ++ { V('*','s'), 1, "σ", NULL }, /* sigma */ ++ { V('*','t'), 1, "τ", NULL }, /* tau */ ++ { V('*','u'), 1, "υ", NULL }, /* upsilon */ ++ { V('*','w'), 1, "ω", NULL }, /* omega */ ++ { V('*','x'), 1, "χ", NULL }, /* chi */ ++ { V('*','y'), 1, "η", NULL }, /* eta */ ++ { V('*','z'), 1, "ζ", NULL }, /* zeta */ ++ { V('\'','A'), 1, "Á", NULL }, /* acute A */ ++ { V('\'','E'), 1, "É", NULL }, /* acute E */ ++ { V('\'','I'), 1, "Í", NULL }, /* acute I */ ++ { V('\'','O'), 1, "Ó", NULL }, /* acute O */ ++ { V('\'','U'), 1, "Ú", NULL }, /* acute U */ ++ { V('\'','Y'), 1, "Ý", NULL }, /* Yacute (*) */ ++ { V('\'','a'), 1, "á", NULL }, /* acute a */ ++ { V('\'','e'), 1, "é", NULL }, /* acute e */ ++ { V('\'','i'), 1, "í", NULL }, /* acute i */ ++ { V('\'','o'), 1, "ó", NULL }, /* acute o */ ++ { V('\'','u'), 1, "ú", NULL }, /* acute u */ ++ { V('\'','y'), 1, "ý", NULL }, /* yacute (*) */ ++ { V('!','='), 1, "≠", NULL }, /* not equal */ ++ { V('%','0'), 1, "‰", NULL }, /* per-thousand */ ++ { V('+','-'), 1, "±", NULL }, /* plus-minus */ ++ { V('+','e'), 1, "ϵ", NULL }, /* epsilon variant */ ++ { V('+','f'), 1, "φ", NULL }, /* phi variant */ ++ { V('+','h'), 1, "ϑ", NULL }, /* theta variant */ ++ { V('+','p'), 1, "ϖ", NULL }, /* pi variant */ ++ { V(',','C'), 1, "Ç", NULL }, /* cedilla C */ ++ { V(',','c'), 1, "ç", NULL }, /* cedilla c */ ++ { V('-','+'), 1, "∓", NULL }, /* minus-plus */ ++ { V('-','>'), 1, "→", NULL }, /* right arrow */ ++ { V('-','D'), 1, "Ð", NULL }, /* Eth */ ++ { V('-','h'), 1, "ℏ", NULL }, /* Planck constant over 2π */ ++ { V('.','i'), 1, "ı", NULL }, /* dotless i */ ++ { V('.','j'), 1, "ȷ", NULL }, /* dotless j */ ++ { V('/','L'), 1, "Ł", NULL }, /* stroke L */ ++ { V('/','O'), 1, "Ø", NULL }, /* stroke O */ ++ { V('/','_'), 1, "∠", NULL }, /* angle */ ++ { V('/','l'), 1, "ł", NULL }, /* stroke l */ ++ { V('/','o'), 1, "ø", NULL }, /* stroke o */ ++ { V('1','2'), 1, "½", NULL }, /* 1/2 (*) */ ++ { V('1','4'), 1, "¼", NULL }, /* 1/4 (*) */ ++ { V('3','4'), 1, "¾", NULL }, /* 3/4 (*) */ ++ { V('3','d'), 1, "∴", NULL }, /* therefore */ ++ { V(':','A'), 1, "Ä", NULL }, /* dieresis A */ ++ { V(':','E'), 1, "Ë", NULL }, /* dieresis E */ ++ { V(':','I'), 1, "Ï", NULL }, /* dieresis I */ ++ { V(':','O'), 1, "Ö", NULL }, /* dieresis O */ ++ { V(':','U'), 1, "Ü", NULL }, /* dieresis U */ ++ { V(':','a'), 1, "ä", NULL }, /* dieresis a */ ++ { V(':','e'), 1, "ë", NULL }, /* dieresis e */ ++ { V(':','i'), 1, "ï", NULL }, /* dieresis i */ ++ { V(':','o'), 1, "ö", NULL }, /* dieresis o */ ++ { V(':','u'), 1, "ü", NULL }, /* dieresis u */ ++ { V(':','y'), 1, "ÿ", NULL }, /* dieresis y */ ++ { V('<','-'), 1, "←", NULL }, /* left arrow */ ++ { V('<','<'), 1, "≪", NULL }, /* much less */ ++ { V('<','='), 1, "≤", NULL }, /* less-than-equal */ ++ { V('<','>'), 1, "↔", NULL }, /* left-right arrow */ ++ { V('=','='), 1, "≡", NULL }, /* equivalent */ ++ { V('=','~'), 1, "≅", NULL }, /* approximately equal */ ++ { V('>','='), 1, "≥", NULL }, /* greater-than-equal */ ++ { V('>','>'), 1, "≫", NULL }, /* much greater */ ++ { V('A','E'), 1, "Æ", NULL }, /* AE ligature */ ++ { V('A','N'), 1, "∧", NULL }, /* logical and */ ++ { V('A','h'), 1, "ℵ", NULL }, /* aleph */ ++ { V('B','q'), 1, "„", NULL }, /* right low double-quote */ ++ { V('C','R'), 1, "↵", NULL }, /* carriage return */ ++ { V('C','s'), 1, "¤", NULL }, /* Scandinavian */ ++ { V('D','o'), 1, "$", NULL }, /* dollar */ ++ { V('E','u'), 1, "€", NULL }, /* Euro symbol */ ++ { V('F','c'), 1, "»", NULL }, /* right guillemet */ ++ { V('F','i'), 1, "ffi", NULL }, /* ffi ligature */ ++ { V('F','l'), 1, "ffl", NULL }, /* ffl ligature */ ++ { V('F','n'), 1, "ƒ", NULL }, /* florin */ ++ { V('F','o'), 1, "«", NULL }, /* left guillemet */ ++ { V('I','J'), 1, "IJ", NULL }, /* IJ ligature */ ++ { V('I','m'), 1, "ℑ", NULL }, /* imaginary */ ++ { V('O','E'), 1, "Œ", NULL }, /* OE ligature */ ++ { V('O','K'), 1, "✓", NULL }, /* check mark */ ++ { V('O','R'), 1, "∨", NULL }, /* logical or */ ++ { V('P','o'), 1, "£", NULL }, /* pound */ ++ { V('R','e'), 1, "ℜ", NULL }, /* real */ ++ { V('S','1'), 1, "¹", NULL }, /* sup1 (*) */ ++ { V('S','2'), 1, "²", NULL }, /* sup2 (*) */ ++ { V('S','3'), 1, "³", NULL }, /* sup3 (*) */ ++ { V('S','d'), 1, "ð", NULL }, /* eth */ ++ { V('T','P'), 1, "Þ", NULL }, /* Thorn */ ++ { V('T','p'), 1, "þ", NULL }, /* thorn */ ++ { V('Y','e'), 1, "¥", NULL }, /* yen */ ++ { V('^','A'), 1, "Â", NULL }, /* circumflex A */ ++ { V('^','E'), 1, "Ê", NULL }, /* circumflex E */ ++ { V('^','I'), 1, "Î", NULL }, /* circumflex I */ ++ { V('^','O'), 1, "Ô", NULL }, /* circumflex O */ ++ { V('^','U'), 1, "Û", NULL }, /* circumflex U */ ++ { V('^','a'), 1, "â", NULL }, /* circumflex a */ ++ { V('^','e'), 1, "ê", NULL }, /* circumflex e */ ++ { V('^','i'), 1, "î", NULL }, /* circumflex i */ ++ { V('^','o'), 1, "ô", NULL }, /* circumflex o */ ++ { V('^','u'), 1, "û", NULL }, /* circumflex u */ ++ { V('`','A'), 1, "À", NULL }, /* grave A */ ++ { V('`','E'), 1, "È", NULL }, /* grave E */ ++ { V('`','I'), 1, "Ì", NULL }, /* grave I */ ++ { V('`','O'), 1, "Ò", NULL }, /* grave O */ ++ { V('`','U'), 1, "Ù", NULL }, /* grave U */ ++ { V('`','a'), 1, "à", NULL }, /* grave a */ ++ { V('`','e'), 1, "è", NULL }, /* grave e */ ++ { V('`','i'), 1, "ì", NULL }, /* grave i */ ++ { V('`','o'), 1, "ò", NULL }, /* grave o */ ++ { V('`','u'), 1, "ù", NULL }, /* grave u */ ++ { V('a','"'), 1, "˝", NULL }, /* Hungarian umlaut */ ++ { V('a','-'), 1, "¯", NULL }, /* macron */ ++ { V('a','.'), 1, "˙", NULL }, /* dotted */ ++ { V('a','^'), 1, "^", NULL }, /* circumflex */ ++ { V('a','a'), 1, "´", NULL }, /* acute */ ++ { V('a','b'), 1, "˘", NULL }, /* breve */ ++ { V('a','c'), 1, "¸", NULL }, /* cedilla */ ++ { V('a','d'), 1, "¨", NULL }, /* dieresis */ ++ { V('a','e'), 1, "æ", NULL }, /* ae ligature */ ++ { V('a','h'), 1, "ˇ", NULL }, /* caron */ ++ { V('a','o'), 1, "˚", NULL }, /* ring */ ++ { V('a','p'), 1, "∼", NULL }, /* tilde operator */ ++ { V('a','q'), 1, "'", NULL }, /* apostrophe quote (text) */ ++ { V('a','t'), 1, "@", NULL }, /* at */ ++ { V('a','~'), 1, "~", NULL }, /* tilde */ ++ { V('b','a'), 1, "|", NULL }, /* bar */ ++ { V('b','b'), 1, "¦", NULL }, /* broken bar */ ++ { V('b','r'), 1, "│", NULL }, /* box rule */ ++ { V('b','q'), 1, "‚", NULL }, /* right low single-quote */ ++ { V('b','u'), 1, "•", NULL }, /* bullet */ ++ { V('b','v'), 1, "⎪", NULL }, /* brace extension */ ++ { V('c','*'), 1, "⊗", NULL }, /* circle-multiply */ ++ { V('c','+'), 1, "⊕", NULL }, /* circle-plus */ ++ { V('c','a'), 1, "∩", NULL }, /* intersection */ ++ { V('c','i'), 1, "○", NULL }, /* circle */ ++ { V('c','o'), 1, "©", NULL }, /* copyright */ ++ { V('c','q'), 1, "’", NULL }, /* right single-quote */ ++ { V('c','t'), 1, "¢", NULL }, /* cent */ ++ { V('c','u'), 1, "∪", NULL }, /* union */ ++ { V('d','A'), 1, "⇓", NULL }, /* down double-arrow */ ++ { V('d','a'), 1, "↓", NULL }, /* down arrow */ ++ { V('d','d'), 1, "‡", NULL }, /* double dagger */ ++ { V('d','e'), 1, "°", NULL }, /* degree */ ++ { V('d','g'), 1, "†", NULL }, /* dagger */ ++ { V('d','i'), 1, "÷", NULL }, /* divide */ ++ { V('d','q'), 1, "\"", NULL }, /* double quote (text) */ ++ { V('e','m'), 1, "—", NULL }, /* em-dash */ ++ { V('e','n'), 1, "–", NULL }, /* en-dash */ ++ { V('e','q'), 1, "=", NULL }, /* equal */ ++ { V('e','s'), 1, "∅", NULL }, /* empty set */ ++ { V('e','u'), 1, "€", NULL }, /* Euro symbol */ ++ { V('f','/'), 1, "⁄", NULL }, /* fraction */ ++ { V('f','a'), 1, "∀", NULL }, /* universal quantifier */ ++ { V('f','c'), 1, "›", NULL }, /* right single guillemet */ ++ { V('f','f'), 1, "ff", NULL }, /* ff ligature */ ++ { V('f','i'), 1, "fi", NULL }, /* fi ligature */ ++ { V('f','l'), 1, "fl", NULL }, /* fl ligature */ ++ { V('f','m'), 1, "′", NULL }, /* minute */ ++ { V('f','o'), 1, "‹", NULL }, /* left single guillemet */ ++ { V('g','a'), 1, "`", NULL }, /* grave */ ++ { V('g','r'), 1, "∇", NULL }, /* gradient */ ++ { V('h','A'), 1, "⇔", NULL }, /* left-right double-arrow */ ++ { V('h','a'), 1, "^", NULL }, /* hat (text) */ ++ { V('h','o'), 1, "˛", NULL }, /* ogonek */ ++ { V('h','y'), 1, "‐", NULL }, /* hyphen */ ++ { V('i','b'), 1, "⊆", NULL }, /* reflexive subset */ ++ { V('i','f'), 1, "∞", NULL }, /* infinity */ ++ { V('i','j'), 1, "ij", NULL }, /* ij ligature */ ++ { V('i','p'), 1, "⊇", NULL }, /* reflexive superset */ ++ { V('i','s'), 1, "∫", NULL }, /* integral */ ++ { V('l','A'), 1, "⇐", NULL }, /* left double-arrow */ ++ { V('l','B'), 1, "[", NULL }, /* left bracket */ ++ { V('l','C'), 1, "{", NULL }, /* left brace */ ++ { V('l','a'), 1, "⟨", NULL }, /* left angle */ ++ { V('l','b'), 1, "⎩", NULL }, /* bottom-left hooked brace */ ++ { V('l','c'), 1, "⌈", NULL }, /* left-ceiling */ ++ { V('l','f'), 1, "⌊", NULL }, /* left-floor */ ++ { V('l','h'), 1, "☜", NULL }, /* left hand */ ++ { V('l','k'), 1, "⎨", NULL }, /* mid-left hooked brace */ ++ { V('l','q'), 1, "“", NULL }, /* left double-quote */ ++ { V('l','t'), 1, "⎧", NULL }, /* top-left hooked brace */ ++ { V('l','z'), 1, "◊", NULL }, /* lozenge */ ++ { V('m','c'), 1, "µ", NULL }, /* micro */ ++ { V('m','i'), 1, "−", NULL }, /* minus */ ++ { V('m','o'), 1, "∈", NULL }, /* element */ ++ { V('m','u'), 1, "×", NULL }, /* multiply */ ++ { V('n','b'), 1, "⊄", NULL }, /* not subset */ ++ { V('n','c'), 1, "⊅", NULL }, /* not superset */ ++ { V('n','e'), 1, "≢", NULL }, /* not equivalent */ ++ { V('n','m'), 1, "∉", NULL }, /* not element */ ++ { V('n','o'), 1, "¬", NULL }, /* logical not */ ++ { V('o','A'), 1, "Å", NULL }, /* ring A */ ++ { V('o','a'), 1, "å", NULL }, /* ring a */ ++ { V('o','e'), 1, "œ", NULL }, /* oe ligature */ ++ { V('o','q'), 1, "‘", NULL }, /* left single-quote */ ++ { V('o','r'), 1, "|", NULL }, /* bitwise or */ ++ { V('p','c'), 1, "·", NULL }, /* center-dot */ ++ { V('p','d'), 1, "∂", NULL }, /* partial differential */ ++ { V('p','l'), 1, "+", NULL }, /* plus */ ++ { V('p','p'), 1, "⊥", NULL }, /* perpendicular */ ++ { V('p','s'), 1, "¶", NULL }, /* paragraph */ ++ { V('p','t'), 1, "∝", NULL }, /* proportionate */ ++ { V('r','!'), 1, "¡", NULL }, /* upside-down exclamation */ ++ { V('r','?'), 1, "¿", NULL }, /* upside-down question */ ++ { V('r','A'), 1, "⇒", NULL }, /* right double-arrow */ ++ { V('r','B'), 1, "]", NULL }, /* right bracket */ ++ { V('r','C'), 1, "}", NULL }, /* right brace */ ++ { V('r','a'), 1, "⟩", NULL }, /* right angle */ ++ { V('r','b'), 1, "⎭", NULL }, /* bottom-right hooked brace */ ++ { V('r','c'), 1, "⌉", NULL }, /* right-ceiling */ ++ { V('r','f'), 1, "⌋", NULL }, /* right-floor */ ++ { V('r','g'), 1, "®", NULL }, /* registered */ ++ { V('r','h'), 1, "☞", NULL }, /* right hand */ ++ { V('r','k'), 1, "⎬", NULL }, /* mid-right hooked brace */ ++ { V('r','l'), 1, "‾", NULL }, /* overline */ ++ { V('r','n'), 1, "‾", NULL }, /* overline */ ++ { V('r','q'), 1, "”", NULL }, /* right double-quote */ ++ { V('r','s'), 1, "\\", NULL }, /* backward slash */ ++ { V('r','t'), 1, "⎫", NULL }, /* top-left hooked brace */ ++ { V('r','u'), 1, "_", NULL }, /* (*) */ ++ { V('s','b'), 1, "⊂", NULL }, /* proper subset */ ++ { V('s','c'), 1, "§", NULL }, /* section */ ++ { V('s','d'), 1, "″", NULL }, /* second */ ++ { V('s','h'), 1, "#", NULL }, /* hash (pound) */ ++ { V('s','l'), 1, "/", NULL }, /* forward slash */ ++ { V('s','p'), 1, "⊃", NULL }, /* proper superset */ ++ { V('s','q'), 1, "□", NULL }, /* white square */ ++ { V('s','r'), 1, "√", NULL }, /* square root */ ++ { V('s','s'), 1, "ß", NULL }, /* German eszett */ ++ { V('s','t'), 1, "∋", NULL }, /* such that */ ++ { V('t','e'), 1, "∃", NULL }, /* existential quantifier */ ++ { V('t','f'), 1, "∴", NULL }, /* therefore */ ++ { V('t','i'), 1, "~", NULL }, /* tilde (text) */ ++ { V('t','m'), 1, "™", NULL }, /* trademarked */ ++ { V('t','s'), 1, "ς", NULL }, /* sigma terminal */ ++ { V('u','A'), 1, "⇑", NULL }, /* up double-arrow */ ++ { V('u','a'), 1, "↑", NULL }, /* up arrow */ ++ { V('u','l'), 1, "_", NULL }, /* underscore */ ++ { V('v','A'), 1, "⇕", NULL }, /* up-down double-arrow */ ++ { V('v','a'), 1, "↕", NULL }, /* up-down arrow */ ++ { V('|','='), 1, "≃", NULL }, /* asymptotically equal */ ++ { V('~','='), 1, "≈", NULL }, /* almost equal */ ++ { V('~','A'), 1, "Ã", NULL }, /* tilde A */ ++ { V('~','N'), 1, "Ñ", NULL }, /* tilde N */ ++ { V('~','O'), 1, "Õ", NULL }, /* tilde O */ ++ { V('~','a'), 1, "ã", NULL }, /* tilde a */ ++ { V('~','n'), 1, "ñ", NULL }, /* tilde n */ ++ { V('~','o'), 1, "õ", NULL }, /* tilde o */ ++ { V('~','~'), 1, "≈", NULL }, /* almost equal */ + { 0, 0, NULL, NULL } +- +- + }; + + void stdinit(void) { +--- /dev/null ++++ b/version.h +@@ -0,0 +1 @@ ++#define version "1.6g-7-slitaz" diff -r 962c4700fe2b -r 27b321c14ae7 man2html/stuff/ru.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man2html/stuff/ru.po Fri Jan 22 17:24:34 2016 +0200 @@ -0,0 +1,430 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: man2html\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-18 22:36+0200\n" +"PO-Revision-Date: 2016-01-18 22:41+0200\n" +"Last-Translator: Aleksej Bobylev \n" +"Language-Team: \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.6\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: cgibase.c:76 +msgid "This document was created by man2html using the manual pages." +msgstr "Этот документ создан man2html из страницы руководства." + +#: cgibase.c:88 +msgid "Return to Main Contents" +msgstr "Вернуться на главную" + +#: man2html.c:141 +msgid "chardef corrupted" +msgstr "chardef поврежден" + +#: man2html.c:1374 +#, c-format +msgid "man2html: Unknown operator %c.\n" +msgstr "man2html: неизвестный оператор %c.\n" + +#: man2html.c:1462 man2html.c:1463 man2html.c:1464 man2html.c:1465 +#: man2html.c:1466 man.sh:16 +msgid "User Commands" +msgstr "Команды пользователя" + +#: man2html.c:1467 man2html.c:1468 man.sh:16 +msgid "System Calls" +msgstr "Системные вызовы" + +#: man2html.c:1469 man2html.c:1478 man.sh:16 +msgid "C Library Functions" +msgstr "Библиотечные функции C" + +#: man2html.c:1470 +msgid "Compatibility Functions" +msgstr "Функции совместимости" + +#: man2html.c:1471 +msgid "Fortran Library Routines" +msgstr "Библиотечные подпрограммы Fortran" + +#: man2html.c:1472 +msgid "Kernel VM Library Functions" +msgstr "Библиотечные функции Kernel VM" + +#: man2html.c:1473 +msgid "Lightweight Processes Library" +msgstr "Библиотека легковесных процессов" + +#: man2html.c:1474 +msgid "Mathematical Library" +msgstr "Математическая библиотека" + +#: man2html.c:1475 +msgid "Network Functions" +msgstr "Сетевые функции" + +#: man2html.c:1476 +msgid "RPC Services Library" +msgstr "Библиотека сервисов RPC" + +#: man2html.c:1477 +msgid "Standard I/O Functions" +msgstr "Стандартные функции ввода-вывода" + +#: man2html.c:1479 +msgid "Miscellaneous Library Functions" +msgstr "Разнообразные библиотечные функции" + +#: man2html.c:1480 man2html.c:1482 man2html.c:1483 man2html.c:1484 +#: man2html.c:1486 man2html.c:1487 man.sh:17 +msgid "Devices and Network Interfaces" +msgstr "Устройства и сетевые интерфейсы" + +#: man2html.c:1481 +msgid "Protocol Families" +msgstr "Семейства протоколов" + +#: man2html.c:1485 +msgid "Protocols" +msgstr "Протоколы" + +#: man2html.c:1488 man2html.c:1489 man.sh:17 +msgid "File Formats" +msgstr "Форматы файлов" + +#: man2html.c:1490 man.sh:18 +msgid "Games and Demos" +msgstr "Игры и демо" + +#: man2html.c:1491 man2html.c:1492 man.sh:18 +msgid "Environments, Tables, and Troff Macros" +msgstr "Окружение, таблицы и макросы Troff" + +#: man2html.c:1493 man2html.c:1494 man2html.c:1495 man2html.c:1496 man.sh:19 +msgid "Maintenance Commands" +msgstr "Команды обслуживания" + +#: man2html.c:1497 +msgid "Local Commands" +msgstr "Локальные команды" + +#: man2html.c:1566 +msgid "Misc. Reference Manual Pages" +msgstr "Разнообразные справочные руководства" + +#: man2html.c:2010 +#, c-format +msgid "man2html: unable to open or read file %s\n" +msgstr "man2html: не удалось открыть или прочитать файл %s\n" + +#: man2html.c:2012 +msgid "man2html: unable to open or read file\n" +msgstr "man2html: не удалось открыть или прочитать файл\n" + +#: man2html.c:2293 +#, c-format +msgid "Man page of %s" +msgstr "Страница руководства %s" + +#: man2html.c:2299 +msgid "Section: " +msgstr "Раздел: " + +#: man2html.c:2308 +msgid "Updated: " +msgstr "Обновлено: " + +#: man2html.c:2312 man2html.c:3375 +msgid "Index" +msgstr "Оглавление" + +#: man2html.c:3208 man2html.c:3217 man2html.c:3226 +msgid "Out of memory" +msgstr "Недостаточно памяти" + +#: man2html.c:3209 man2html.c:3218 man2html.c:3227 +msgid "Sorry, out of memory, aborting...\n" +msgstr "К сожалению, недостаточно памяти, завершение…\n" + +#: man2html.c:3233 +msgid "man2html: bad invocation" +msgstr "man2html: плохой вызов" + +#: man2html.c:3234 +msgid "" +"Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n" +"or: man2html -r [filename]\n" +msgstr "" +"Вызов: man2html [-l|-h хост.домен:порт] [-p|-q] [имя_файла]\n" +"или: man2html -r [имя_файла]\n" + +#: man2html.c:3258 man2html.c:3299 +msgid "Error" +msgstr "Ошибка" + +#: man2html.c:3258 +#, c-format +msgid "man2html: could not chdir to %s" +msgstr "man2html: не удалось перейти в папку %s" + +#: man2html.c:3352 +msgid "File not found" +msgstr "Файл не найден" + +#: man2html.c:3352 +#, c-format +msgid "Could not open %s\n" +msgstr "Не удалось открыть %s\n" + +#: man2html.c:3387 man2html.c:3394 +msgid "Invalid Man Page" +msgstr "Недопустимая страница руководства" + +#: man2html.c:3388 +#, c-format +msgid "" +"The requested file %s is not a valid (unformatted) man page.\n" +"If the file is a formatted man page, you could try to load the\n" +"plain file.\n" +msgstr "" +"Запрошенный файл %s не является допустимой (неформатированной) страницей " +"руководства.\n" +"В случае, если этот файл является форматированной страницей, вы можете " +"попробовать загрузить ее как\n" +"обычный файл.\n" + +#: man2html.c:3395 +#, c-format +msgid "The requested file %s is not a valid (unformatted) man page." +msgstr "" +"Запрошенный файл %s не является допустимой (неформатированной) страницей " +"руководства." + +#: hman.sh:87 +msgid "bad number of args" +msgstr "плохое количество аргументов" + +#: man.sh:19 +msgid "All available manual pages" +msgstr "Все доступные страницы руководства" + +#: man.sh:52 +msgid "Section %s: %s" +msgstr "Раздел %s: %s" + +#: man.sh:53 +msgid "Manual Pages" +msgstr "Страницы руководства" + +#: man.sh:58 +msgid "" +"Section 1 of the manual describes user commands and tools, for example, file " +"manipulation tools, shells, compilers, web browsers, file and image viewers " +"and editors, and so on." +msgstr "" +"Раздел 1 руководства описывает пользовательские команды и инструменты, такие " +"как команды для работы с файлами, оболочки, компиляторы, браузеры, программы " +"для просмотра и редактирования файлов и графики, и так далее." + +#: man.sh:61 +msgid "" +"Section 2 of the manual describes the Linux system calls. A system call is " +"an entry point into the Linux kernel." +msgstr "" +"Раздел 2 руководства описывает системные вызовы Linux. Системный вызов " +"является точкой входа в ядро Linux." + +#: man.sh:63 +msgid "" +"Section 3 of the manual describes all library functions excluding the " +"library functions (system call wrappers) described in Section 2, which " +"implement system calls." +msgstr "" +"Раздел 3 руководства описывает все библиотечные функции кроме библиотечных " +"функций (оберток системных вызовов), описанных в разделе 2, которые " +"реализуют системные вызовы." + +#: man.sh:65 +msgid "Section 4 of the manual describes special files (devices)." +msgstr "Раздел 4 руководства описывает специальные файлы (устройства)." + +#: man.sh:66 +msgid "" +"Section 5 of the manual describes various file formats, as well as the " +"corresponding C structures, if any." +msgstr "" +"Раздел 5 руководства описывает различные форматов файлов, а также " +"соответствующие структуры C, если таковые имеются." + +#: man.sh:68 +msgid "" +"Section 6 of the manual describes all the games and funny little programs " +"available on the system." +msgstr "" +"Раздел 6 руководства описывает все игры и забавные программы, имеющиеся в " +"системе." + +#: man.sh:70 +msgid "" +"Section 7 of the manual provides overviews on various topics, and describes " +"conventions and protocols, character set standards, the standard filesystem " +"layout, and miscellaneous other things." +msgstr "" +"Раздел 7 руководства содержит обзоры на различные темы, описывает соглашения " +"и протоколы, стандартные наборы символов, макет стандартной файловой системы " +"и прочее." + +#: man.sh:73 +msgid "" +"Section 8 of the manual describes commands which either can be or are used " +"only by the superuser, like system-administration commands, daemons, and " +"hardware-related commands." +msgstr "" +"Раздел 8 руководства описывает команды супер-пользователя, такие как команды " +"администрирования системы, службы и команды, связанные с аппаратным " +"обеспечением." + +#: man.sh:116 +msgid "Sections" +msgstr "Разделы" + +#: man.sh:125 man.sh:189 +msgid "All Sections" +msgstr "Все разделы" + +#: man.sh:158 man.sh:162 +msgid "Manual Pages - Main Contents" +msgstr "Страницы руководств — главная" + +#: man.sh:163 +msgid "Name and Section lookup" +msgstr "Поиск по имени и разделу" + +#: man.sh:166 +msgid "Search" +msgstr "Искать" + +#: man.sh:168 +msgid "" +"You can enter a program name, possibly preceded by the section, the " +"directories to search (with -M) or a full name. For example:" +msgstr "" +"Можно ввести название программы (возможно предварив его номером раздела), " +"папку со страницами руководств (после -M) или полное название файла " +"руководства. Например:" + +#: man.sh:179 +msgid "Index of pages" +msgstr "Оглавление страниц" + +#: man.sh:193 +msgid "The original man2html program and scripts are due to %s and %s." +msgstr "Оригинальная версия man2html и скрипты разработаны %s и %s." + +#: man.sh:196 +msgid "This version is from %s maintained by %s." +msgstr "Эта версия %s сопровождается %s." + +#: man.sh:229 +msgid "Cannot find a page" +msgstr "Не удалось найти страницу" + +#: man.sh:231 +msgid "Cannot find a page for %s %s" +msgstr "Не удалось найти страницу %s %s" + +#: man.sh:233 +msgid "Cannot find a page for %s in section %s %s" +msgstr "Не удалось найти страницу %s в разделе %s %s" + +#: man.sh:243 +msgid "Multiple pages" +msgstr "Выбор" + +#: man.sh:245 +msgid "Multiple pages found" +msgstr "Найдено несколько страниц" + +#~ msgid "" +#~ "User Commands:System Calls:C Library Functions:Devices and Network " +#~ "Interfaces:File Formats:Games and Demos:Environments, Tables, and Troff " +#~ "Macros:Maintenance Commands:All available manual pages" +#~ msgstr "" +#~ "Команды пользователя:Системные вызовы:Библиотечные функции C:Устройства и " +#~ "сетевые интерфейсы:Форматы файлов:Игры и демо:Окружение, таблицы и " +#~ "макросы Troff:Команды технического обслуживания:Все доступные страницы " +#~ "руководств" + +#~ msgid "" +#~ "Section 1 of the manual describes user commands and tools, for example, " +#~ "file \n" +#~ "manipulation tools, shells, compilers, web browsers, file and image " +#~ "viewers and editors, and so \n" +#~ "on." +#~ msgstr "" +#~ "Раздел 1 руководства описывает пользовательские команды и инструменты, " +#~ "такие как команды для работы с файлами, оболочки, компиляторы, браузеры, " +#~ "программы для просмотра и редактирования файлов и графики, и так далее." + +#~ msgid "" +#~ "Section 2 of the manual describes the Linux system calls. A system call " +#~ "is \n" +#~ "an entry point into the Linux kernel." +#~ msgstr "" +#~ "Раздел 2 руководства описывает системные вызовы Linux. Системный вызов " +#~ "является точкой входа в ядро Linux." + +#~ msgid "" +#~ "Section 3 of the manual describes all library functions excluding the \n" +#~ "library functions (system call wrappers) described in Section 2, which " +#~ "implement system calls." +#~ msgstr "" +#~ "Раздел 3 руководства описывает все библиотечные функции кроме " +#~ "библиотечных функций (оберток системных вызовов), описанных в разделе 2, " +#~ "которые реализуют системные вызовы." + +#~ msgid "" +#~ "Section 5 of the manual describes various file formats, as well as the \n" +#~ "corresponding C structures, if any." +#~ msgstr "" +#~ "Раздел 5 руководства описывает различные форматов файлов, а также " +#~ "соответствующие структуры C, если таковые имеются." + +#~ msgid "" +#~ "Section 6 of the manual describes all the games and funny little " +#~ "programs \n" +#~ "available on the system." +#~ msgstr "" +#~ "Раздел 6 руководства описывает все игры и забавные программы, имеющиеся в " +#~ "системе." + +#~ msgid "" +#~ "Section 7 of the manual provides overviews on various topics, and " +#~ "describes \n" +#~ "conventions and protocols, character set standards, the standard " +#~ "filesystem layout, and \n" +#~ "miscellaneous other things." +#~ msgstr "" +#~ "Раздел 7 руководства содержит обзоры на различные темы, описывает " +#~ "соглашения и протоколы, стандартные наборы символов, макет стандартной " +#~ "файловой системы и прочее." + +#~ msgid "" +#~ "Section 8 of the manual describes commands which either can be or are " +#~ "used \n" +#~ "only by the superuser, like system-administration commands, daemons, and " +#~ "hardware-related \n" +#~ "commands." +#~ msgstr "" +#~ "Раздел 8 руководства описывает команды супер-пользователя, такие как " +#~ "команды системы администрирования, службы и команды, связанные с " +#~ "аппаратным обеспечением."