pkgdata_DATA = \
usr/html/index.html \
- usr/man3m/m17nIntro.3m \
- usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps
+ usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
+ man/man1/m17nconfig.1 \
+ man/man3/m17nIntro.3m17n \
+ man/man5/m17nDatabaseFormat.5
pkgdatadir = $(datadir)/m17n-lib
-EXTRA_DIST = usr/html usr/man3m usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps
+EXTRA_DIST = usr/html usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
+ man/man1 man/man3 man/man5
install-pkgdataDATA: $(pkgdata_DATA)
- $(mkinstalldirs) $(pkgdatadir)/html $(mandir)/man3m
+ $(mkinstalldirs) $(pkgdatadir)/html
+ $(mkinstalldirs) $(mandir)/man1 $(mandir)/man3 $(mandir)/man5
$(INSTALL_DATA) usr/latex/m17n-lib.dvi $(pkgdatadir)/m17n-lib.dvi
$(INSTALL_DATA) usr/latex/m17n-lib.ps $(pkgdatadir)/m17n-lib.ps
cd usr/html; \
for f in *.html; do $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; done
- cd usr/man3m; \
- for f in *.3m; do $(INSTALL_DATA) $$f $(mandir)/man3m/$$f; done
+ cd usr/html; \
+ for f in *.png; do $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; done
+ cd man/man1; \
+ for f in *.1; do $(INSTALL_DATA) $$f $(mandir)/man1/$$f; done
+ cd man/man3; \
+ for f in *.3m17n; do $(INSTALL_DATA) $$f $(mandir)/man3/$$f; done
+ cd man/man5; \
+ for f in *.5; do $(INSTALL_DATA) $$f $(mandir)/man5/$$f; done
#
# The followings are for maintainers only.
#
if MAINTAINER_MODE
-SRCFILES = $(shell echo @M17NLIB@/src/*.[ch] @M17NLIB@/example/README.txt)
-
PROJECT_NAME_EN = "The M17N Library"
PROJECT_NAME_JA = "M17N ¿¸À¸ì¥é¥¤¥Ö¥é¥ê"
PROJECT_VERSION = @PACKAGE_VERSION@
DOXYGEN = doxygen
-usr-html html-usr: usr/html/index.html usr/html/parrot.gif
-ja-html html-ja: ja/html/index.html ja/html/parrot.gif
-dev-html html-dev: dev/html/index.html dev/html/parrot.gif
+SRC_MAN1 = \
+ data/m17n-config.txt \
+ data/mconv.txt \
+ data/mview.txt \
+ data/mdate.txt \
+ data/mdump.txt \
+ data/medit.txt
+
+SRC_MAN3 = \
+ @M17NLIB@/src/m17n-core.h \
+ @M17NLIB@/src/m17n.h \
+ @M17NLIB@/src/m17n-gui.h \
+ @M17NLIB@/src/m17n-X.h \
+ @M17NLIB@/src/m17n-err.h \
+ @M17NLIB@/src
+
+SRC_MAN5 = \
+ data/dbformat.txt
+
+SRC_ALL = \
+ data/mainpage.txt ${SRC_MAN3} ${SRC_MAN1} ${SRC_MAN5}
+
+usr-html html-usr: usr/html/index.html usr/html/parrot.png
+ja-html html-ja: ja/html/index.html ja/html/parrot.png
+dev-html html-dev: dev/html/index.html dev/html/parrot.png
usr-latex latex-usr: usr/latex/m17n-lib.ps
ja-latex latex-ja: ja/latex/m17n-lib.ps
dev-latex latex-dev: dev/latex/m17n-lib.ps
-usr-man man-usr: usr/man3m/m17nIntro.3m
-ja-man man-ja: ja/man3m/m17nIntro.3m
+usr-man man-usr: man/man1/m17n-config.1 man/man3/m17nIntro.3m17n man/man5/m17nDatabaseFormat.5
+ja-man man-ja: ja/man3/m17nIntro.3m
usr: html-usr latex-usr man-usr
ja: html-ja latex-ja
doxyfile-html: doxyfile
sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
- -e 's|%M17NLIB%|@M17NLIB@|' \
+ -e 's|%INPUT%|${SRC_ALL}|' \
-e 's|%GENERATE_HTML%|YES|' \
-e 's|%GENERATE_LATEX%|NO|' \
-e 's|%GENERATE_MAN%|NO|' \
doxyfile-latex: doxyfile
sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
- -e 's|%M17NLIB%|@M17NLIB@|' \
+ -e 's|%INPUT%|${SRC_ALL}|' \
-e 's|%GENERATE_HTML%|NO|' \
-e 's|%GENERATE_LATEX%|YES|' \
-e 's|%GENERATE_MAN%|NO|' \
-e 's/%OUTPUT_LANGUAGE%/Japanese/' \
< $< >$@
-doxyfile-man: doxyfile
+doxyfile-man1: doxyfile
+ sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
+ -e 's|%INPUT%|${SRC_MAN1}|' \
+ -e 's|%GENERATE_HTML%|NO|' \
+ -e 's|%GENERATE_LATEX%|NO|' \
+ -e 's|%GENERATE_MAN%|YES|' \
+ -e 's|%MAN_EXTENSION%|.1|' \
+ < $< >$@
+
+doxyfile-man3: doxyfile
+ sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
+ -e 's|%INPUT%|${SRC_MAN3}|' \
+ -e 's|%GENERATE_HTML%|NO|' \
+ -e 's|%GENERATE_LATEX%|NO|' \
+ -e 's|%GENERATE_MAN%|YES|' \
+ -e 's|%MAN_EXTENSION%|.3m17n|' \
+ < $< >$@
+
+doxyfile-man5: doxyfile
sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
- -e 's|%M17NLIB%|@M17NLIB@|' \
+ -e 's|%INPUT%|${SRC_MAN5}|' \
-e 's|%GENERATE_HTML%|NO|' \
-e 's|%GENERATE_LATEX%|NO|' \
-e 's|%GENERATE_MAN%|YES|' \
+ -e 's|%MAN_EXTENSION%|.5|' \
< $< >$@
-doxyfile-man.usr: doxyfile-man
+doxyfile-man%.usr: doxyfile-man%
sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \
-e 's/%USR_JA_DEV%/usr/g' \
-e 's/%OUTPUT_LANGUAGE%/English/' \
< $< >$@
-%/html/index.html: doxyfile-html.% ${SRCFILES} \
+data/mainpage.txt:
+
+data/dbformat.txt:
+
+data/m17n-config.txt: @M17NLIB@/m17n-config.in
+ sed -n -e '/BEG-DOXYGEN/,/END-DOXYGEN/ p' < $< > $@
+
+data/%.txt: @M17NLIB@/example/%.c
+ sed -n -e '/BEG-DOXYGEN/,/END-DOXYGEN/ p' < $< > $@
+
+%/html/index.html: doxyfile-html.% ${SRC_ALL} \
header.html footer.html \
- data-%/mainpage.txt data-%/dbformat.txt \
utils/%_filter.rb m17n-lib.css
rm -rf `dirname $@`
${DOXYGEN} $<
-%/html/parrot.gif: parrot.gif
+%/html/parrot.png: parrot.png
cp $< $@
-%/latex/refman.tex: doxyfile-latex.% ${SRCFILES} data-%/mainpage.txt data-%/dbformat.txt \
- utils/%_filter.rb
+%/latex/refman.tex: doxyfile-latex.% ${SRC_ALL} utils/%_filter.rb
rm -rf `dirname $@`
${DOXYGEN} $<
%/latex/m17n-lib.pdf: %/latex/m17n-lib.tex data-%/m17n-lib.sty utils/latex.sh
utils/latex.sh `dirname $@` pdflatex
-%/man/man3/m17nIntro.3m: doxyfile-man.% ${SRCFILES} utils/%_filter.rb
+%/man/man1/m17n-config.1: doxyfile-man1.% ${SRC_MAN1} utils/%_filter.rb
+ rm -rf `dirname $@`
+ ${DOXYGEN} $<
+
+%/man/man3/m17nIntro.3m17n: doxyfile-man3.% ${SRC_MAN3} utils/%_filter.rb
+ rm -rf `dirname $@`
+ ${DOXYGEN} $<
+
+%/man/man5/m17nDatabaseFormat.5: doxyfile-man5.% ${SRC_MAN5} utils/%_filter.rb
rm -rf `dirname $@`
${DOXYGEN} $<
-usr/man3m/%.3m: usr/man/man3/%.3m sample.c utils/mkman.rb
+sample/man3/SampleGroup.3: sample.c
+ [ -d sample ] || mkdir sample
+ [ -d sample/man3 ] || mkdir sample/man3
-${DOXYGEN} -g doxytemp
echo "INPUT = sample.c" >> doxytemp
echo "GENERATE_LATEX = NO" >> doxytemp
echo "MAN_OUTPUT = sample" >> doxytemp
echo "OPTIMIZE_OUTPUT_FOR_C = yes" >> doxytemp
${DOXYGEN} doxytemp
- [ -d usr/man3m ] || mkdir -p usr/man3m
- rm -rf usr/man3m/index.*
- ruby utils/mkman.rb usr
- rm -rf doxytemp sample
+ rm -rf doxytemp
+
+man/man1/%: usr/man/man1/% sample/man3/SampleGroup.3 utils/mkman.rb
+ $(mkinstalldirs) man/man1
+ rm -rf doxywork man/man1/*
+ ruby utils/mkman.rb 1 usr/man/man1 man/man1
+
+man/man3/%: usr/man/man3/% sample/man3/SampleGroup.3 utils/mkman.rb
+ $(mkinstalldirs) man/man3
+ rm -rf doxywork usr/man3/*
+ ruby utils/mkman.rb 3m17n usr/man/man3 man/man3
+
+man/man5/%: usr/man/man5/% sample/man3/SampleGroup.3 utils/mkman.rb
+ $(mkinstalldirs) man/man5
+ rm -rf doxywork usr/man5/*
+ ruby utils/mkman.rb 5 usr/man/man5 man/man5
ja/man3m/%.3m: ja/man/man3/%.3m sample-ja.c utils/mkman.rb
-${DOXYGEN} -g doxytemp
WEBDIR = /project/web/extra/m17n-lib/m17n-docs
-web: $(pkgdata_DATA)
+web: usr-html
[ -d ${WEBDIR} ] || mkdir ${WEBDIR}
[ -f ${distdir}.tar.gz ] || make dist
cp ${distdir}.tar.gz ${WEBDIR}
cp usr/html/* ${WEBDIR}
-.PRECIOUS: %/latex/m17n-lib.tex %/man/man3/m17nIntro.3m
+.PRECIOUS: %/latex/m17n-lib.tex %/man/man3/m17nIntro.3m ${SRC_ALL}
endif
-INPUT-METDHO ::=
+INPUT-METHOD ::=
'(' TITLE MAP-LIST MODULE-LIST ? STATE-LIST ')'
TITLE ::=
\ProvidesPackage{m17n-lib}
-%% Copyright (C) 2003 -*- coding: euc-jp; -*-
-%% National Institute of Advanced Industrial Science and Technology (AIST)
-%% Registration Number H15PRO112
-
-%% This file is part of the m17n library.
-
-%% The m17n library is free software; you can redistribute it and/or
-%% modify it under the terms of the GNU General Public License as
-%% published by the Free Software Foundation; either version 2, or (at
-%% your option) any later version.
-
-%% The m17n library is distributed in the hope that it will be useful,
-%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-%% GNU General Public License for more details.
-
-%% You should have received a copy of the GNU General Public License
-%% along with the m17n library; see the file COPYING. If not, write to
-%% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-%% Boston, MA 02111-1307, USA.
-
%% Don't leave the space for marginal notes.
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}
%% Run the above hook before printing TOC.
\let\origtableofcontents\tableofcontents
\def\tableofcontents{\m17nhook\origtableofcontents\clearpage}
+
+%% Add Index section to the table of contents.
+\let\origprintindex\printindex
+\def\printindex{\addcontentsline{toc}{section}{Index}\origprintindex}
@section usage How to use it?
Just include <m17n.h> in your program, and link it with the m17n
-library by -lm17n. See the documentation of the module \link
-m17nIntro Introduction \endlink for the detail.
+library by -lm17n. See @ref m17nIntro @latexonly
+(P.\pageref{group__m17nIntro}) @endlatexonly for the detail.
@section contact Contact us:
--- /dev/null
+/***@page m17nDatabaseFormat Data format of the m17n database
+
+@section dbformat General format
+
+The mdatabase_load () function returns the data specified by tags in
+the form of plist if the first tag is not @c Mchartable nor @c
+Mcharset. The keys of the returned plist are limited to
+<tt>Minteger</tt>, <tt>Msymbol</tt>, <tt>Mtext</tt>, and
+<tt>Mplist</tt>. The type of the value is unambiguously determined by
+the corresponding key. If the key is <tt>Minteger</tt>, the value is
+an integer. If the key is <tt>Msymbol</tt>, the value is a symbol.
+And so on.
+
+A number of expressions are possible to represent a plist. For
+instance, we can use the form <tt>(K1:V1, K2:V2, ..., Kn:Vn)</tt> to
+represent a plist whose first property key and value are K1 and V1,
+second key and value are K2 and V2, and so on. However, we can use a
+simpler expression here because the types of plists used in the m17n
+database are fairly restricted.
+
+Hereafter, we use an expression, which is similar to S-expression, to
+represent a plist. (Actually, the default database loader of the m17n
+library is designed to read data files written in this expression.)
+
+The expression consists of one or more <i>elements</i>. Each element
+represents a property, i.e. a single element of a plist.
+
+Elements are separated by one or more <i>whitespaces</i>, i.e. a space
+(code 32), a tab (code 9), or a newline (code 10). Comments begin
+with a semicolon (<tt>;</tt>) and extend to the end of the line.
+
+The key and the value of each property are determined based on the
+type of the element as explained below.
+
+<ul>
+
+<li> INTEGER
+
+An element that matches the regular expression <tt>-?[0-9]+</tt> or
+<tt>0[xX][0-9A-Fa-f]+</tt> represents a property whose key is
+<tt>Minteger</tt>. An element matching the former expression is
+interpreted as an integer in decimal notation, and one matching the
+latter is interpreted as an integer in hexadecimal notation. The
+value of the property is the result of interpretation.
+
+For instance, the element <tt>0xA0</tt> represents a property whose value is
+160 in decimal.
+
+<li> SYMBOL
+
+An element that matches the regular expression
+<tt>[^-0-9(]([^\\()]|\\.)+</tt> represents a property whose key is
+<tt> Msymbol</tt>. In the element, <tt>\\t</tt>, <tt>\\n</tt>,
+<tt>\\r</tt>, and <tt>\\e</tt> are replaced with tab (code 9), newline
+(code 10), carriage return (code 13), and escape (code 27)
+respectively. Other characters following a backslash is interpreted
+as it is. The value of the property is the symbol having the
+resulting string as its name.
+
+For instance, the element <tt>abc\ def</tt> represents a property
+whose value is the symbol having the name "abc def".
+
+<li> M-TEXT
+
+An element that matches the regular expression <tt>"([^"]|\\")*"</tt>
+represents a property whose key is <tt>Mtext</tt>. The backslash escape
+explained above also applies here. Moreover, each part in the
+element matching the regular expression <tt>
+\\[xX][0-9A-Fa-f][0-9A-Fa-f]</tt> is replaced with its hexadecimal
+interpretation.
+
+After having resolved the backslash escapes, the byte sequence between
+the double quotes is interpreted as a UTF-8 sequence and decoded into
+an M-text. This M-text is the value of the property.
+
+<li> PLIST
+
+Zero or more elements surrounded by a pair of parentheses represent a
+property whose key is <tt>Mplist</tt>. Whitespaces before and after a
+parenthesis can be omitted. The value of the property is a plist,
+which is the result of recursive interpretation of the elements
+between the parentheses.
+
+</ul>
+
+EXAMPLE
+
+Here is an example of plist that is written in the expression
+explained above.
+
+@verbatim
+abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
+@endverbatim
+
+It represents the following plist:
+
+@verbatim
+(Msymbol:abc,
+ Minteger:123,
+ Mplist:(Msymbol:pqr,
+ Minteger:255),
+ Mtext:m"text,
+ Mplist:(Msymbol:_\_,
+ Mplist:(Mtext:string,
+ Msymbol:xyz),
+ Minteger:-456))
+@endverbatim
+
+@section fontenc Font Encoding
+
+The m17n library loads information about the encoding of each font
+form the m17n database by the tags \<font, encoding\>. The plist
+format of the data is as follows:
+
+@verbatim
+FONT-ENCODING ::=
+ PER-FONT-INFO *
+
+PER-FONT-INFO ::=
+ '(' FONT-SPEC ENCODING ')'
+
+FONT-SPEC ::=
+ '('
+ [ FOUNDRY FAMILY [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ] ] ] ] ] REGISTRY
+ ')'
+@endverbatim
+
+@c FOUNDRY to @c REGISTRY are symbols specifying the corresponding
+XLFD font name fields. Omitted symbols are regarded as @c nil, and
+@c nil means a wild card. For instance, this @c FONT-SPEC:
+
+@verbatim
+ (nil alice0\ lao iso8859-1)
+@endverbatim
+
+should be applied to all fonts whose family is "alice0 lao", and
+registry is "iso8859-1".
+
+@c ENCODING is a symbol representing a charset. A font matching @c
+FONT-SPEC supports all characters of the charset, and a character code
+is mapped to the corresponding glyph code of the font by this charset.
+
+
+@section fontsize Font Resizing
+
+In some case, a font contains incorrect information about its size
+(typically in the case of a hacked TrueType font), which results in a
+bad text layout when such a font is used in combination with the other
+fonts. To overcome this problem, the m17n library loads information
+about font-size correction from the m17n database by the tags \<font,
+resize\>. The plist format of the data is as follows:
+
+@verbatim
+FONT-RESIZE ::=
+ PER-FONT-INFO *
+
+PER-FONT-INFO ::=
+ '(' FONT-SPEC RESIZE-RATIO ')'
+
+FONT-SPEC ::=
+ '('
+ [ FOUNDRY FAMILY [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ] ] ] ] ] REGISTRY
+ ')'
+@endverbatim
+
+The meanings of @c FOUNDRY to @c REGISTRY are the same as @e Font @e
+Encoding. @c RESIZE-RATIO is an integer number specifying by
+percentage how much the font-size must be adjusted. For instance,
+this @c PER-FONT-INFO:
+
+@verbatim
+ ((devanagari-cdac) 150)
+@endverbatim
+
+means that, to use a font of registry "devanagari-cdac" with a
+specific size, we have to open an 1.5 times bigger one.
+
+@section fontset Fontset
+
+The m17n library loads a fontset definition from the m17n database by
+the tags \<fontset, FONTSET-NAME\>. The plist format of the data is
+as follows:
+
+@verbatim
+FONTSET ::=
+ PER-SCRIPT * PER-CHARSET * FALLBACK *
+
+PER-SCRIPT ::=
+ '(' SCRIPT PER-LANGUAGE + ')'
+
+PER-LANGUAGE ::=
+ '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
+
+PER-CHARSET ::=
+ '(' CHARSET FONT-SPEC-ELEMENT + ')'
+
+FALLBACK ::=
+ FONT-SPEC-ELEMENT
+
+FONT-SPEC-ELEMENT ::=
+ '(' FONT-SPEC [ FLT-NAME ] ')'
+
+FONT-SPEC ::=
+ '('
+ [ FOUNDRY FAMILY [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ] ] ] ] ] REGISTRY
+ ')'
+@endverbatim
+
+@c SCRIPT is a symbol of script name (e.g. latin, han) or @c nil. @c
+LANGUAGE is a two-letter symbol of language name code defined by ISO
+639 (e.g. ja, zh) or @c nil. The meanings of @c FOUNDRY to @c
+REGISTRY are the same as @e Font @e Encoding. @c FLT-NAME is a name
+of @ref flt.
+
+For instance, this @c PER_SCRIPT:
+
+@verbatim
+(han
+ (ja
+ ((jisx0208.1983-0)))
+ (zh
+ ((gb2312.1980-0)))
+ (nil
+ ((big5-0))))
+@endverbatim
+
+instructs the rendering engine to use a font of registry
+"jisx0208.1983-0" for a "han" character that has @c Mlanguage text
+propert "ja" if the character is in the repertories of such fonts.
+Otherwise, try a font of registry "gb2312.1980-0" or "big5-0". If a
+"han" character does not have @c Mlangauge text property, try all
+three fonts.
+
+@section flt Font Layout Table
+
+Usually, the rendering engine converts character codes of into glyph
+codes one by one by consulting information about encoding of each
+selected font. But, for rendering a text that requires complicated
+layouting (e.g. Thai and Indic), such an one to one conversion is not
+sufficient. In addition, some glyphs must be shifted 2-dimensionally
+on the screen. For such a case, a font layout table (FLT in short)
+must be used.
+
+A FLT can contain the information equivarent to OpenType Layout Table
+(CMAP, GSUB, and GPOS) in addition to the information about how to
+extract a grapheme cluster and how to re-order characters.
+
+The m17n library loads a FLT from the m17n database by the tags
+\<font, layouter, FLT-NAME\>. The plist format of the data is as
+follows:
+
+@verbinclude flt.txt
+
+@section im Input Method
+
+@verbinclude im.txt
+
+*/
+
+////
--- /dev/null
+/***@mainpage The M17N Library Documentation
+
+@section what What is the m17n library?
+
+The @e m17n @e library is a multilingual text processing library for
+the C language.
+
+<ul>
+
+<li> It is a free and open source software.
+
+<li> It is for any GNU/Linux and Unix applications/libraries.
+
+<li> It realizes multilingualization of many aspects of
+applications/libraries.
+
+</ul>
+
+The word "m17n" is an abbreviation of "multilingualization".
+
+The m17n library provides following facilities to handle
+multilingual text.
+
+<ul>
+
+<li> @e M-text: A data structure for a multilingual text. It is
+basically a string but with attributes called text property, and
+is designed to substitute for the C string. It is the most important
+object of the m17n library.
+
+<li> Functions for creating and processing M-texts.
+
+<li> Functions for converting M-texts from/to strings encoded in
+various existing formats.
+
+<li> A huge character space, which contains all the Unicode
+characters and more non-Unicode characters.
+
+<li> @e Chartable: A data structure that contains per-character
+information efficiently.
+
+<li> Functions for inputting and displaying M-text on a window
+system.
+
+</ul>
+
+@section usage How to use it?
+
+Just include <m17n.h> in your program, and link it with the m17n
+library by -lm17n. See @ref m17nIntro @latexonly
+(P.\pageref{group__m17nIntro}) @endlatexonly for the detail.
+
+@section contact Contact us:
+
+Global IT Security Group\n
+National Information Technology Research Institute\n
+Institute of Advanced Industrial Science and Technology
+
+Web: http://www.m17n.org/m17n-lib/
+
+Bug report: m17n-lib-bug@m17n.org
+
+Mailing list (English): m17n-lib@m17n.org
+
+Mailing list (Japanese): m17n-lib-ja@m17n.org
+*/
+////
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = "data-%USR_JA_DEV%/mainpage.txt"
-INPUT += "%M17NLIB%/src/m17n-core.h"
-INPUT += "%M17NLIB%/src/m17n.h"
-INPUT += "%M17NLIB%/src/m17n-gui.h"
-INPUT += "%M17NLIB%/src/m17n-X.h"
-INPUT += "%M17NLIB%/src/m17n-err.h"
-INPUT += "%M17NLIB%/src/"
-INPUT += "data-%USR_JA_DEV%/dbformat.txt"
-INPUT += "%M17NLIB%/example/README.txt"
+INPUT = %INPUT%
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
-MAN_EXTENSION = .3m
+MAN_EXTENSION = %MAN_EXTENSION%
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
# then it will generate one additional man file for each entity
#! /usr/local/bin/ruby
+# Usage: mkman.rb SRCDIR DSTDIR
+
#¼Â¹Ô¤¹¤ë¤È/tmp/doxyman¤ò¤Ä¤«¤Ã¤Æ¥Õ¥¡¥¤¥ë¤òʬ¤±¡¢
#¤â¤È¤Îdirectory¤Ë¤«¤¤Ê¤ª¤¹¡£
# see also ¤ÎÃæ¿È¤ò woman ¸þ¤±¤Ë½ñ¤´¹¤¨¤ë¡£
-usr_or_ja=$*[0]
+$manext="."+$*[0]
#
# Setting up directory names.
#
$currentdir = Dir.pwd+"/"
+$srcdir=$currentdir+$*[1]+"/"
+$dstdir=$currentdir+$*[2]+"/"
$doxywork = $currentdir+"doxywork/"
-$srcman3 = $currentdir+usr_or_ja+"/man/man3/"
-if usr_or_ja == "usr"
- $dstman3m = $currentdir+"/usr/man3m/"
-else
- $dstman3m = $currentdir+"/ja/man3m/"
-end
$sampledir="sample/man3/"
-
$headfile = $currentdir+"manhead"
+
headbuf = open($headfile, "r").readlines
#
def datastructure(struct)
- text = open(struct.concat(".3m"),"r").readlines
+ text = open(struct.concat($manext),"r").readlines
buf = []
#short_text¤Î´Ø¿ô̾¤Î£²¹Ô¸å¤¬brief¡£
brief = short_text[short_text.index(short_text.find{|i| i.index(ffname)}) + 2]
#´Ø¿ô¤´¤È¤Î¥Õ¥¡¥¤¥ë¤òºî¤ë¡£
- file = open($doxywork+fname+".3m", "w")
+ file = open($doxywork+fname+$manext, "w")
file.puts("@function")
#¥Ø¥Ã¥À
/^\.TH \"([^"]*)\"\s/ =~ title
Dir.mkdir $doxywork unless FileTest.directory? $doxywork
-Dir.chdir($srcman3)
+Dir.chdir($srcdir)
Dir.open(".").each{|filename|
#############################rewriting files
-Dir.chdir($dstman3m)
+Dir.chdir($dstdir)
Dir.open(".").each{|f| File.delete(f) if FileTest.file?(f)}
else buf = orewrite(text)
end
- filetowrite = open($dstman3m+filename,"w")
+ filetowrite = open($dstdir+filename,"w")
filetowrite.puts(headbuf)
filetowrite.puts(buf)
filetowrite.flush