Date: Thu, 15 Feb 2001 17:15:19 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: arch@FreeBSD.org Cc: Andrey Chernov <ache@FreeBSD.org>, Dag-Erling Smorgrav <des@FreeBSD.org> Subject: Proposed change for ISO_8859-1 catpages Message-ID: <20010215171519.A24192@sunbay.com>
next in thread | raw e-mail | index | archive | help
--rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi! The attached patch will create /usr/share/man/en.ISO_8859-1 tree. man* subdirectories here will just be symlinks to the corresponding directories in /usr/share/man. cat* are true subdirectories. This adds nice ability to display and store /usr/share/man manpages in the correct eight-bit Latin-1 charset for all ISO_8859-1 locales, as opposed to the 7-bit ASCII output produced now. Let me illustrate this by example. Suppose, your locale is de_DE.ISO_8859-1, and you are looking for a cat(1) manpage. man(1) will first look for a localized cat(1) manpage in the following locale directories, in that order: /usr/share/man/de_DE.ISO_8859-1/man1 /usr/share/man/de.ISO_8859-1/man1 If a match is found in the de_DE.ISO_8859-1/man1 directory (Germany), that page will be passed to groff(1) with -Tlatin1 device, which will produce the correct Latin-1 output in German. The output (catpage) will then be stored by man(1) on disk in the de_DE.ISO_8859-1/cat1 directory, and displayed to a requesting user. If the match is not found, man(1) will look for a localized cat(1) manpage in the de.ISO_8859-1/man1 directory (which matches all de_*.ISO_8859-1 locales). If the match is found here, groff(1) will produce Latin-1 output, and man(1) will store the catpage in the de.ISO_8859-1/cat1 directory. If the localized manpage could not be found, man(1) will look for an Engligh cat(1) manpage with the same charset as in locale, i.e., in the /usr/share/man/en.ISO_8859-1/man1 directory. If found, groff(1) will produce the Latin-1 output, and man(1) will then store catpage in the en.ISO_8859-1/cat1. If all three searches above fail, man(1) will attempt a search in /usr/share/man/man1, will find the cat.1* here, and pass it to groff(1) with -Tascii device. This will produce 7-bit ASCII catpage which will be stored on disk in the /usr/share/man/cat1. (For a full list of rules of how man(1) searches for the manpage, please refer to the -o option description in the man(1) manpage, revision 1.14 or higher.) **************************** Now the problem. To make this patch actually do its job, and create symbolic links for /usr/share/man/man* in /usr/share/man/en.ISO_8859-1/, we need to drop the -d flag from mtree(8) call for BSD.usr.dist: Index: Makefile =================================================================== RCS file: /home/ncvs/src/etc/Makefile,v retrieving revision 1.240 diff -u -p -r1.240 Makefile --- Makefile 2001/01/09 22:28:17 1.240 +++ Makefile 2001/02/15 15:05:29 @@ -153,7 +153,7 @@ distribution: distrib-dirs: mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr + mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ -p ${DESTDIR}/usr/include mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ So, are there any objections or goaheds? :-) Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: BSD.usr.dist =================================================================== RCS file: /home/ncvs/src/etc/mtree/BSD.usr.dist,v retrieving revision 1.213 diff -u -p -r1.213 BSD.usr.dist --- BSD.usr.dist 2001/02/15 12:25:48 1.213 +++ BSD.usr.dist 2001/02/15 13:31:46 @@ -634,7 +634,52 @@ .. catn .. - ja uname=root + en.ISO_8859-1 uname=root + cat1 + .. + cat1aout + .. + cat2 + .. + cat3 + .. + cat4 + i386 + .. + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + i386 + .. + .. + cat9 + i386 + .. + .. + catn + .. +/set uname=root +/set type=link + man1 link=../man1 + man1aout link=../man1aout + man2 link=../man2 + man3 link=../man3 + man4 link=../man4 + man5 link=../man5 + man6 link=../man6 + man7 link=../man7 + man8 link=../man8 + man9 link=../man9 + mann link=../mann +/set type=dir + .. + ja +/set uname=man cat1 .. cat2 --rwEMma7ioTxnRzrJ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010215171519.A24192>