From 2dbf661e686b887d3519a9dc348fd57fb73cd30b Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 24 Jun 2003 13:12:34 +0000 Subject: [PATCH] *** empty log message *** --- Makefile.am | 122 +++++++---------- data-usr/dbformat.txt | 115 ++++++++++++++++ data-usr/flt.txt | 67 ++++++++++ data-usr/im.txt | 337 +++++++++++++++++++++++++++++++++++++++++++++++ data-usr/m17n-lib.sty | 69 +--------- data-usr/mainpage.txt | 61 +++++++++ doxyfile.in | 8 +- utils/refman-filter.sed | 1 + 8 files changed, 635 insertions(+), 145 deletions(-) create mode 100644 data-usr/dbformat.txt create mode 100644 data-usr/flt.txt create mode 100644 data-usr/im.txt create mode 100644 data-usr/mainpage.txt diff --git a/Makefile.am b/Makefile.am index 83bb0d5..573302a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,42 +1,16 @@ # -*- coding: euc-jp; -*- - -EXTRA_DIST = dev usr ja smallmule.gif - -# The followings are for maintainers only. +# This makefile is for maintainer only. if MAINTAINER_MODE SRCFILES = $(shell echo @M17NLIB@/src/*.[ch]) -STYLEPATH = @abs_srcdir@/styles - -LATEX_JA = ${STYLEPATH}/doxygen-m17n.sty \ - @abs_srcdir@/data-ja/header.tex \ - @abs_srcdir@/data-ja/introduction.tex \ - @abs_srcdir@/data-ja/m17n-basicC.tex \ - @abs_srcdir@/data-ja/m17n-X.tex \ - @abs_srcdir@/data-ja/m17n-database.tex \ - @abs_srcdir@/data-ja/conclusion.tex - -LATEX_USR = data-usr/m17n-lib.sty - -LATEX_DEV = ${STYLEPATH}/doxygen-m17n.sty \ - @abs_srcdir@/data-dev/header.tex \ - @abs_srcdir@/data-dev/conclusion.tex - -DOXYGEN = doxygen - PROJECT_NAME_EN = "The M17N Library" -PROJECT_NAME_JA = "Unix/Linux ÍÑ¿¸À¸ì¥é¥¤¥Ö¥é¥ê" +PROJECT_NAME_JA = "M17N ¿¸À¸ì¥é¥¤¥Ö¥é¥ê" -notarget: - @echo "Please specify one of the following targets:" - @echo " usr-latex ja-latex dev-latex" - @echo " usr-html ja-html dev-html" - @echo " usr ja dev" - @echo " all" +DOXYGEN = doxygen -all: usr ja dev man +all: usr ja dev usr-html html-usr: usr/html/index.html ja-html html-ja: ja/html/index.html @@ -52,81 +26,73 @@ usr: html-usr latex-usr man-usr ja: html-ja latex-ja dev: html-dev latex-dev -doxyfile-html.usr: doxyfile Makefile - sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \ - -e 's/%USR_JA_DEV%/usr/' \ - -e 's/%INPUT_FILTER%/usr/' \ - -e 's/%OUTPUT_LANGUAGE%/English/' \ - -e 's|%GENERATE_HTML%|YES|' \ +doxyfile-html: doxyfile Makefile + sed -e 's|%GENERATE_HTML%|YES|' \ -e 's|%GENERATE_LATEX%|NO|' \ -e 's|%GENERATE_MAN%|NO|' \ < $< >$@ -doxyfile-html.dev: doxyfile Makefile +doxyfile-html.usr: doxyfile-html Makefile sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \ - -e 's/%USR_JA_DEV%/dev/' \ - -e 's/%INPUT_FILTER%/dev/' \ + -e 's/%USR_JA_DEV%/usr/g' \ -e 's/%OUTPUT_LANGUAGE%/English/' \ - -e 's|%GENERATE_HTML%|YES|' \ - -e 's|%GENERATE_LATEX%|NO|' \ - -e 's|%GENERATE_MAN%|NO|' \ < $< >$@ -doxyfile-html.ja: doxyfile Makefile +doxyfile-html.dev: doxyfile-html Makefile + sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \ + -e 's/%USR_JA_DEV%/dev/g' \ + -e 's/%OUTPUT_LANGUAGE%/English/' \ + < $< >$@ + +doxyfile-html.ja: doxyfile-html Makefile sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_JA}|' \ - -e 's/%USR_JA_DEV%/ja/' \ - -e 's/%INPUT_FILTER%/ja/' \ + -e 's/%USR_JA_DEV%/ja/g' \ -e 's/%OUTPUT_LANGUAGE%/Japanese/' \ - -e 's|%GENERATE_HTML%|YES|' \ - -e 's|%GENERATE_LATEX%|NO|' \ + < $< >$@ + +doxyfile-latex: doxyfile Makefile + sed -e 's|%GENERATE_HTML%|NO|' \ + -e 's|%GENERATE_LATEX%|YES|' \ -e 's|%GENERATE_MAN%|NO|' \ < $< >$@ -doxyfile-latex.usr: doxyfile Makefile +doxyfile-latex.usr: doxyfile-latex Makefile sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \ - -e 's/%USR_JA_DEV%/usr/' \ - -e 's/%INPUT_FILTER%/usr/' \ + -e 's/%USR_JA_DEV%/usr/g' \ -e 's/%OUTPUT_LANGUAGE%/English/' \ - -e 's|%GENERATE_HTML%|NO|' \ - -e 's|%GENERATE_LATEX%|YES|' \ - -e 's|%GENERATE_MAN%|NO|' \ < $< >$@ -doxyfile-latex.dev: doxyfile Makefile +doxyfile-latex.dev: doxyfile-latex Makefile sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \ - -e 's/%USR_JA_DEV%/dev/' \ - -e 's/%INPUT_FILTER%/dev/' \ + -e 's/%USR_JA_DEV%/dev/g' \ -e 's/%OUTPUT_LANGUAGE%/English/' \ - -e 's|%GENERATE_HTML%|NO|' \ - -e 's|%GENERATE_LATEX%|YES|' \ - -e 's|%GENERATE_MAN%|NO|' \ < $< >$@ -doxyfile-latex.ja: doxyfile Makefile +doxyfile-latex.ja: doxyfile-latex Makefile sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_JA}|' \ - -e 's/%USR_JA_DEV%/ja/' \ - -e 's/%INPUT_FILTER%/ja/' \ + -e 's/%USR_JA_DEV%/ja/g' \ -e 's/%OUTPUT_LANGUAGE%/Japanese/' \ - -e 's|%GENERATE_HTML%|NO|' \ - -e 's|%GENERATE_LATEX%|YES|' \ - -e 's|%GENERATE_MAN%|NO|' \ < $< >$@ -doxyfile-man.usr: doxyfile Makefile - sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \ - -e 's/%USR_JA_DEV%/usr/' \ - -e 's/%INPUT_FILTER%/usr/' \ - -e 's/%OUTPUT_LANGUAGE%/English/' \ - -e 's|%GENERATE_HTML%|NO|' \ +doxyfile-man: doxyfile Makefile + sed -e 's|%GENERATE_HTML%|NO|' \ -e 's|%GENERATE_LATEX%|NO|' \ -e 's|%GENERATE_MAN%|YES|' \ < $< >$@ -%/html/index.html: doxyfile-html.% ${SRCFILES} data-%/mainpage.c m17n-lib.css +doxyfile-man.usr: doxyfile-man Makefile + 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 \ + utils/%_filter.rb m17n-lib.css rm -rf `dirname $@` ${DOXYGEN} $< -%/latex/refman.tex: doxyfile-latex.% ${SRCFILES} data-%/mainpage.c +%/latex/refman.tex: doxyfile-latex.% ${SRCFILES} data-%/mainpage.txt data-%/dbformat.txt \ + utils/%_filter.rb rm -rf `dirname $@` ${DOXYGEN} $< @@ -140,9 +106,7 @@ doxyfile-man.usr: doxyfile Makefile %/latex/m17n-lib.pdf: %/latex/m17n-lib.tex data-%/m17n-lib.sty utils/latex.sh utils/latex.sh `dirname $@ `pdflatex -doxyhead.txt: sample.c utils/mkheaderlist.rb - -%/man/man3/m17nIntro.3m: doxyfile-man.% ${SRCFILES} +%/man/man3/m17nIntro.3m: doxyfile-man.% ${SRCFILES} utils/%_filter.rb rm -rf `dirname $@` ${DOXYGEN} $< @@ -155,7 +119,8 @@ man/man3m/%.3m: usr/man/man3/%.3m sample.c utils/mkman.rb echo "MAN_OUTPUT = sample" >> doxytemp echo "OPTIMIZE_OUTPUT_FOR_C = yes" >> doxytemp ${DOXYGEN} doxytemp - [ -d "man/man3m" ] || mkdir -p man/man3m + [ -d man/man3m ] || mkdir -p man/man3m + rm -rf man/index.* ruby utils/mkman.rb usr rm -rf doxytemp sample @@ -169,6 +134,7 @@ man/ja/man3m/%.3m: ja/man/man3/%.3m sample-ja.c utils/mkman.rb echo "OPTIMIZE_OUTPUT_FOR_C = yes" >> doxytemp ${DOXYGEN} doxytemp [ -d "man/ja/man3m" ] || mkdir -p man/ja/man3m + rm -rf man/index.* ruby utils/mkman.rb ja rm -rf doxytemp sample @@ -188,5 +154,7 @@ latex/m17n-lib.ps: usr/latex/m17n-lib.ps pack: latex/m17n-lib.ps html/index.html man/man3m/m17nIntro.3m dist +.PRECIOUS: %/latex/m17n-lib.tex + endif DISTFILES = latex html man diff --git a/data-usr/dbformat.txt b/data-usr/dbformat.txt new file mode 100644 index 0000000..1981269 --- /dev/null +++ b/data-usr/dbformat.txt @@ -0,0 +1,115 @@ +/*** @addtogroup m17nDatabase */ +//// +/*** @{ */ +//// +/***@defgroup m17nDatabaseFormat DatabaseFormat + +This section describes the formats of predefined @e plist @e type data +in the m17n database. + +@section general General format + +The m17n library expects that the function mdatabase_load () returns a +plist of a specific format on loading data identified by a specific +set of tags. As the plist format used for the database data is +strongly limited, we can use the equivalent text of simple syntax +(S-expression) to represent the plist as below. + +The text consists of one or more @e elements . Each element +represents a property, i.e. a single element of a plist, and the +sequence of the elements constitute a plist. + +Elements are separated by one or more @e whitespaces, i.e. a space +(code 32), a tab (code 9), or a newline (code 10). Comments begin +with a semicolon (;) and extend to the end of the line. + +The key and the value of each property are determined based on the +form of element as below: + + + +EXAMPLE + +Suppose (K1:V1, K2:V2, ... ,Kn:Vn) represents a plist whose first +property key and value are K1 and V1, second key and value are K2 and +V2, and so on. Then the line: +@verbatim +abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456) +@endverbatim +is interpreted as follows. +@verbatim +(Msymbol:abc, + Minteger:123, + Mplist:(Msymbol:pqr, + Minteger:255), + Mtext:m"text, + Mplist:(Msymbol:_\_, + Mplist:(Mtext:string, + Msymbol:xyz), + Minteger:-456)) +@endverbatim + +The default database loader of the m17n library actually read a text +of this syntax from the database file. + +Here after we describes the plist format of each data by this syntax. + +@section flt Font Layout Table + +@verbinclude flt.txt + +@section im Input Method + +@verbinclude im.txt */ +//// +/*** @} */ +//// diff --git a/data-usr/flt.txt b/data-usr/flt.txt new file mode 100644 index 0000000..a75a8ad --- /dev/null +++ b/data-usr/flt.txt @@ -0,0 +1,67 @@ +;; FILE-FORMAT: +;; '(' +;; CATEGORY-TABLE GENERATOR +;; ( CATEGORY-TABLE ? GENERATOR ) * +;; ')' +;; +;; CATEGORY-TABLE ::= +;; '(' 'category' CATEGORY-SPEC + ')' +;; +;; CATEGORY-SPEC ::= +;; '(' CODE CATEGORY-CODE ')' +;; | +;; '(' CODE CHAR-CODE CATEGORY-CODE ')' +;; +;; CATEGORY-CODE ::= +;; [ '?A' .. '?Z' '?a' .. '?z' ] +;; +;; GENERATOR ::= +;; '(' 'generator' REGEX-RULE RULE-DEF * ')' +;; +;; RULE-DEF ::= +;; '(' RULE-NAME ( REGEXP-RULE | MATCH-RULE | MAP-RULE ) ')' +;; +;; REGEXP-RULE ::= +;; '(' REGEXP RULE-SEQ ')' | RULE-NAME +;; MATCH-RULE ::= +;; '(' MATCH-IDX RULE-SEQ ')' | RULE-NAME +;; +;; RULE-SEQ ::= +;; '(' ( REGEXP-RULE | MATCH-RULE | MAP-RULE | PREDEFINED ) ')' + +;; PREDEFIND ::= PREDEFIND-SIMLE | PREDEFIND-OTF +;; +;; PREDEFIND-SIMLE ::= '=' | '*' | '<' | '>' | '|' +;; +;; PREDEFIND-OTF ::= 'otf:SCRIPT-TAG[:LANGSYS-TAG]' +;; where +;; SCRIPT-TAG is OTF's ScriptTag name (four letters) listed at: +;; +;; LANGSYS-TAG is OTF's Language System name (four letters) listed at: +;; +;; ex: 'otf:deva' +;; +;; MAP-RULE ::= +;; '(' ( SEQ-TO-SEQ | RANGE-TO-CODE ) + ')' | RULE-NAME +;; +;; SEQ-TO-SEQ ::= +;; '(' CODE + '-1' ( COMPOSITION-RULE ? CODE ) * ')' +;; RANGE-TO-CODE ::= +;; '(' '(' CODE CODE ')' COMPOSITION-RULE ? CODE ')' +;; +;; COMPOSITION-RULE ::= 'VHOVH' +;; where V ::= ( 't' | 'c' | 'b' | 'B' ) +;; H ::= ( 'l' | 'c' | 'r' ) +;; O ::= ( '.' | XOFF | XOFF ? YOFF ) +;; XOFF ::= ('+' | '-') DIGITS +;; YOFF ::= ('<' | '>') DIGITS +;; Ex: 'tc+bc', 'Bl-10<20Br' +;; +;; Semantics of predefiend commands: +;; +;; '*': repeat the previous command if the command was successful. +;; '<': start grapheme cluster +;; '>': end grapheme cluster +;; '|': produce a special glyph whose code has category-code ' '. +;; '=': use the first glyph of the current run as is. +;; diff --git a/data-usr/im.txt b/data-usr/im.txt new file mode 100644 index 0000000..a107b4c --- /dev/null +++ b/data-usr/im.txt @@ -0,0 +1,337 @@ +;; FILE-FORMAT ::= +;; TITLE MAP-LIST MODULE-LIST ? STATE-LIST +;; +;; TITLE ::= +;; '(' title MTEXT ')' +;; +;; MAP-LIST ::= +;; '(' 'map' MAP * ')' +;; +;; MAP ::= +;; '(' MAP-NAME RULE * ')' +;; +;; MAP-NAME ::= +;; SYMBOL +;; +;; RULE ::= +;; '(' KEYSEQ MAP-ACTION * ')' +;; +;; KEYSEQ ::= +;; MTEXT | '(' [ SYMBOL | INTEGER ] * ')' +;; +;; MAP-ACTION ::= +;; ACTION +;; +;; ACTION ::= +;; MTEXT | CANDIDATES | '(' ACTION-NAME ACTION-ARG * ')' +;; +;; CANDIDATES ::= +;; '(' CANDIDATE-GROUP * ')' +;; +;; (in ASCTION, +;; MTEXT is a short form of "(insert MTEXT)" +;; CANDIDATES is a short form of "(candidates CANDIDATE-GROUP *)") +;; +;; ACTION-NAME ::= +;; 'insert' | 'candidates' | 'delete' | 'select' | 'select-group' +;; | 'move' | 'mark' | 'pushback' | 'undo' | 'shift' | 'call' +;; +;; ACTION-ARG ::= +;; INTEGER | SYMBOL | MTEXT | CANDIDATE-GROUP +;; +;; CANDIDATE-GROUP ::= +;; MTEXT | '(' MTEXT * ')' +;; +;; PREDEFINED-SYMBOL ::= +;; '@0' | '@1' | '@2' | '@3' | '@4' | '@5' | '@6' | '@7' | '@8' | '@9' +;; | '@<' | '@=' | '@>' | '@-' | '@+' +;; +;; MARKER ::= +;; PREDEFINED-SYMBOL | SYMBOL +;; +;; CANDIDATE-INDEX ::= +;; PREDEFINED-SYMBOL +;; +;; CANDIDATE-GROUP-INDEX ::= +;; PREDEFINED-SYMBOL + +;; ;; The first five actions ('insert' .. 'select-group') are for +;; ;; editing a text in the preediting buffer. The buffer can keep +;; ;; multiple markers. Each marker is represented by a symbol, and +;; ;; keeps a position between characters in the preediting buffer. + +;; ;; PREDEFINED-SYMBOL has special meanings when used as MARKER: +;; ;; '@0', '@1', ... '@9' +;; ;; The 0th, 1th, ... 9th position. +;; ;; '@<', '@=', '@>' +;; ;; The first, current, and end position. +;; ;; '@-', '@+' +;; ;; The previous and next position. + +;; ;; PREDEFINED-SYMBOL has special meanings when used as CANDIDATE-INDEX: +;; ;; '@0', '@1', ... '@9' +;; ;; The 0th, 1th, ... 9th candidate of the current candidate group. +;; ;; '@<', '@=', '@>' +;; ;; The first, current, and end candidate of the current candidate +;; ;; group. +;; ;; '@-' +;; ;; The previous candidate. If the current candidate is the +;; ;; first of the current candidate group, the last candidate of +;; ;; the previous candidate group. +;; ;; '@+' +;; ;; The next candidate. If the current candidate is the last of +;; ;; the current candidate group, the first candidate of the +;; ;; previous candidate group. + +;; ;; PREDEFINED-SYMBOL has special meanings when used as CANDIDATE-INDEX: +;; ;; '@0', '@1', ... '@9' +;; ;; The 0th, 1th, ... 9th candidate of the current candidate group. +;; ;; '@<', '@=', '@>' +;; ;; The first, current, and end candidate of the current candidate +;; ;; group. +;; ;; '@-' +;; ;; The previous candidate. If the current candidate is the +;; ;; first of the current candidate group, the last candidate of +;; ;; the previous candidate group. +;; ;; '@+' +;; ;; The next candidate. If the current candidate is the last of +;; ;; the current candidate group, the first candidate of the +;; ;; previous candidate group. + +;; ;; PREDEFINED-SYMBOL has special meanings when used as +;; ;; CANDIDATE-GROUP-INDEX: +;; ;; '@0', '@1', ... '@9' +;; ;; The 0th, 1th, ... 9th candidate group. +;; ;; '@<', '@=', '@>' +;; ;; The first, current, and end candidate group. +;; ;; '@-', '@+' +;; ;; The previous and the next candidate group. + +;; ;; (insert MTEXT) inserts MTEXT before @=. + +;; ;; (candidates CANDIDATE-GROUP *) set the current candidates list +;; ;; to the list of arguments, set the current candidate group to the +;; ;; first argument, insert the first candidate of the current group +;; ;; before @=, and mark the inserted text as the current candidate. +;; ;; Each element of CANDIDATE-GROUP represents a candidate, i.e. if +;; ;; CANDIDATE-GROUP is MTEXT, each character in MTEXT is a +;; ;; candidate, if CANDIDATE-GROUP is a list of MTEXT, each MTEXT is +;; ;; a candidate. + +;; ;; (select CANDIDATE-INDEX) replaces the current candidate with +;; ;; what specified by CANDIDATE-INDEX. If a candidate of the +;; ;; different candidate group is specified, set the current +;; ;; candidate group to that group. + +;; ;; (select-group CANDIDATE-GROUP-INDEX) sets the current candidate +;; ;; group to a group indicated by CANDIDATE-GROUP-INDEX, and relaces +;; ;; the current candiate with the candiate of the same index in the +;; ;; new group. + +;; ;; (delete MARKER) deletes characters between @= and the position +;; ;; specified by MARKER. + +;; ;; (move MARKER) sets @= to the position of specified by MARKER. + +;; ;; (mark MARKER) sets MARKER to the position of @=. MARKER must +;; ;; not be PREDEFINED-SYMBOL. + +;; ;; (pushback) pushbacks the latest key events to the event queue. + +;; ;; (undo) cancels the last key events. + +;; ;; (shift STATE-NAME) shifts the current state to the state +;; ;; specified by STATE-NAME. + +;; ;; (call FUNCTION ARG *) calls the function FUNCTION of an external +;; ;; module. FUNCTION must be defined in MODULE-LIST. + +;; ;; The function is called with a property list (MPlist *) that has +;; ;; these properties in this order. +;; ;; KEY VALUE +;; ;; --- ----- +;; ;; mtext The current preedit text. +;; ;; symbol The current state name (MSymbol). +;; ;; The remaining properties (if any) are ARGs. +;; ;; +;; ;; The function must return a property list (MPlist *) that +;; ;; represents a list of ACTIONs to take. + +;; MODULE-LIST ::= +;; '(' 'module' MODULE * ')' +;; +;; MODULE ::= +;; '(' MODULE-NAME FUNCTION * ')' +;; +;; MODULE-NAME ::= +;; MTEXT +;; +;; FUNCTION ::= +;; SYMBOL + +;; STATE-LIST ::= +;; '(' 'state' STATE * ')' +;; +;; STATE ::= +;; '(' STATE-NAME BRANCH * ')' +;; +;; STATE-NAME ::= +;; SYMBOL +;; +;; BRANCH ::= +;; '(' [ MAP-NAME | 'nil' ] BRANCH-ACTION * ')' + +;; ;; If MAP-NAME is specified, it must be a name of a map defined in +;; ;; MAP-LIST. Otherwise, BRANCH is the default branch of STATE. + +;; BRANCH-ACTION ::= +;; ACTION + + +;; Example: + +(title "sample") +(maps + (single + ("a" "A") + ("b" "B")) + (double + ("bb" (("BB" "Bb")))) + (select + ((Left) (select @-)) + ((Right) (select @+)))) + +(states + (init + (single) + (double (shift selection))) + (selection + (select))) + +;; When this input method is loaded, the following state transition +;; machine is created. + +;; STATE-TRANSITION-MACHINE ::= +;; '(' STATE-NAME ROOT-MAP ')' * +;; ROOT-MAP ::= TRANSITION-MAP +;; TRANSITION-MAP ::= +;; '(' INDEX [ KEY | 'nil' ] +;; MAP-ACTIONS TRANSITION-MAPS BRANCH-ACTIONS ')' +;; TRANSITION-MAPS ::= +;; '(' TRANSITION-MAP * ')' +;; MAP-ACTIONS ::= +;; '(' MAP-ACTION * ')' +;; BRANCH-ACTIONS ::= +;; '(' BRANCH-ACTION * ')' + +(init + (#0 nil nil + ((#1 'a' ((insert "A")) nil nil) + (#2 'b' ((insert "B")) + ((#3 'b' ((candidates (("BB" "Bb")))) nil (shift selection))) + nil)) + nil)) +(selection + (#4 nil nil + ((#5 'Left' ((delete @<) (select @-)) nil nil) + (#6 'Right' ((delete @<) (select @+)) nil nil)) + nil)) + +;; The state transition machine keeps these things: +;; STATE: the current state, initially 'init'. +;; MAP: current transition map, initially #0. +;; PREEDIT: the preediting buffer, initially empty. +;; MARKERS: the positions assigned to each marker, @= is initially 0. +;; PRODUCED: the produced text, initially empty. +;; CANDIDATE-LIST: the current candidate group list, initially NULL. +;; CANDIDATE-GROUP: the current candidate group, initially NULL. +;; CANDIDATE: the the current candidate, initially NULL. +;; +;; When MAP is changed to the root map of the initial state, PREEDIT +;; is concatenated to PRODUCED and reset to empty. This way, the +;; machine produces a text. +;; +;; The machine accepts one key KEY, handles it while updating internal +;; information, and return 'nil' (if KEY is correctly handled) or KEY +;; (if KEY can't be handled in the machine). + +;; Here we describes how the key sequence: +;; 'a' 'b' 'b' 'Right' 'b' 'a' +;; is handled by the machine and "aBbba" is produced. + +;; 'a' arrives. +;; +;; Lookup the transition maps of #0 for 'a' and find #1. Change MAP +;; to #1. Perform its map actions. Now PREEDIT contains "a". As it +;; has no sub transition maps, no branch actions, no state to shift, +;; change MAP to #0, the root map of the current state. +;; +;; As we have changed MAP to the root map of the initial map, +;; concatenate PREEDIT to PRODUCED, and reset PREEDIT to empty. +;; +;; Now we have consumed the key. As MAP has sub transition maps, wait +;; for the next key. + +;; 'b' arrives. +;; +;; Lookup #0 for 'b' and find #2. Change MAP to #2. Perform the map +;; actions. Now, PREEDIT contains "B". As it has sub transition +;; maps, and we have consumed the key, wait for the next key. + +;; 'b' arrives. +;; + +;; Lookup #2 for 'b' and find #3. Cancel the change in PREEDIT done +;; by the map actions of #2, and change MAP to #3. Perform the map +;; actions. Now, PREEDIT is "BB", CANDIDATE-LIST is (("BB" "Bb")), +;; CANDIDATE is "BB". As #3 has no sub transition maps and no branch +;; actions, change STATE to 'selection' and change MAP to #4, the root +;; map of 'selection'. As it has sub transition maps, and we have +;; consumed the key. Wait for the next key. + +;; 'Right' arrives. +;; +;; Lookup #4 for 'Right' and find #5. Change MAP to #5. Perform the +;; map actions. Now PREEDIT is "Bb". As #5 has no sub transition +;; maps, no branch actions, no state to shift, change MAP to #4 (the +;; initial map of the current state 'selection'. +;; +;; As #4 has sub transition maps, and we have consumed the key. Wait +;; for the next key. + +;; 'b' arrives. +;; +;; Lookup #4 for 'b' and fail. As #4 has no branch maps, no shift to +;; transit, change STATE to 'init', MAP to #0. +;; +;; As we have changed MAP to the root map of the initial map, +;; concatenate PREEDIT to PRODUCED, and reset PREEDIT to empty. Now +;; PRODUCED has "aBb". +;; +;; As we have not yet consumed the key 'b', handle it in MAP (#0). +;; +;; Lookup #0 for 'b' and find #2. Change MAP to #2. Perform the map +;; actions. Now, PREEDIT contains "B". As it has sub transition +;; maps, and we have consumed the key, wait for the next key. + +;; 'a' arrives. Lookup #2 for 'a' and fail. As #2 has no branch +;; actions, no state to shift, Change MAP to #0, the root map of the +;; current state. +;; +;; As we have changed MAP to the root map of the initial map, +;; concatenate PREEDIT to PRODUCED, and reset PREEDIT to empty. Now +;; PRODUCED has "aBbb". +;; +;; As we have not yet consumed the key 'a', handle it in MAP (#0). +;; +;; Lookup #0 for 'a' and find #1. Change MAP to #1. Perform its map +;; actions. Now PREEDIT contains "a". As it has no sub transition +;; maps, no branch actions, no state to shift, change MAP to #0, the +;; root map of the current state. +;; +;; As we have changed MAP to the root map of the initial map, +;; concatenate PREEDIT to PRODUCED, and reset PREEDIT to empty. Now +;; PRODUCED has "aBbba". + +;; Now we have consumed the key. As MAP has sub transition maps, wait +;; for the next key. diff --git a/data-usr/m17n-lib.sty b/data-usr/m17n-lib.sty index 7438636..e0cdb5f 100644 --- a/data-usr/m17n-lib.sty +++ b/data-usr/m17n-lib.sty @@ -1,8 +1,6 @@ % -*- coding: euc-jp; -*- \ProvidesPackage{m17n-lib} -%\usepackage{times} - %% Don't leave the space for marginal notes. \setlength{\textwidth}{\paperwidth} \addtolength{\textwidth}{-2in} @@ -18,76 +16,19 @@ \setlength{\marginparwidth}{0pt} \setlength{\footskip}{0pt} -%\def\sectionmark#1{\markboth -%{\MakeUppercase{\ifnum \c@secnumdepth>\z@ -% \thesection\hskip 1em\relax \fi #1}}{}} -%\def\sectionmark#1{\markboth{\MakeUppercase{#1}}{}} - %% Don't write footers. \rfoot[]{} \lfoot[]{} \cfoot[]{} - -%% Fixing incorrest indentation of the original `CompactItemize' -%% environment. -%% \renewenvironment{CompactItemize} -%% { -%% \bgroup -%% \def\@listi{\leftmargin\leftmargini -%% \parsep 0\p@ \@plus2.5\p@ \@minus\p@ -%% \topsep 10\p@ \@plus4\p@ \@minus6\p@ -%% \itemsep0\p@ \@plus2.5\p@ \@minus\p@} -%% \def\@listii {\leftmargin\leftmarginii -%% \labelwidth\leftmarginii -%% \advance\labelwidth-\labelsep -%% \topsep 5\p@ \@plus2.5\p@ \@minus\p@ -%% \parsep 0\p@ \@plus\p@ \@minus\p@ -%% \itemsep \parsep} -%% \begin{itemize} -%% \setlength{\leftskip}{-1.5em} -%% } -%% {\end{itemize}\egroup} - -%% \renewenvironment{Desc} -%% {\begin{list}{} -%% { -%% \settowidth{\labelwidth}{40pt} -%% \setlength{\leftmargin}{\labelwidth} -%% % \setlength{\parsep}{0pt} -%% \setlength{\itemsep}{-4pt} -%% \renewcommand{\makelabel}{\entrylabel} -%% } -%% } -%% {\end{list}} - +\def\footrule{} %% Use arabic numbers in the second level `enumerate' environment. \renewcommand\theenumii{\@arabic\c@enumii} -%% Treat `_' as a normal letter. -%% \catcode`\_11\relax +%% Add subsections to TOC. +\let\origtableofcontents\tableofcontents +\def\tableofcontents{\setcounter{tocdepth}{2}\origtableofcontents\clearpage} %% Make each section start with a new page. \let\origsection\section -\def\newsection{\cleardoublepage\origsection} -\def\sectionOnNewpage{\let\section\newsection} -\sectionOnNewpage - -%% Cross reference for IPA document. -\def\IPAlabel#1{\label{IPA:#1}} -\def\IPAref#1{\texttt{#1} (P.\pageref{IPA:#1})} -\def\IPApage#1{(P.\pageref{IPA:#1})} - -%% \let\origtt\tt -%% \let\origbf\bf -%% \newif\iftt -%% \def\tt{\tttrue\origtt} -%% \def\bf{\iftt\else\origbf\fi} -%% \def\em{\ttfamily\bfseries} -%{\catcode`"=\active\gdef"{{\catcode`"=12\verb+"+}}} -%\catcode`"=\active -%\def\includegraphics[#1]#2{} - -\let\origtableofcontents\tableofcontents -\def\tableofcontents{\setcounter{tocdepth}{2}\origtableofcontents\clearpage} -\def\footrule{} +\def\section{\cleardoublepage\origsection} diff --git a/data-usr/mainpage.txt b/data-usr/mainpage.txt new file mode 100644 index 0000000..85c1723 --- /dev/null +++ b/data-usr/mainpage.txt @@ -0,0 +1,61 @@ +/***@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. + +
    + +
  • It is an open source software. + +
  • It is for any GNU/Linux and Unix applications/libraries. + +
  • It realizes multilingualization of many aspects of +applications/libraries. + +
+ +The word "m17n" is an abbreviation of "multilingualization". + +The m17n library provides following facilities to handle +multilingual text. + +
    + +
  • @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. + +
  • Functions for creating and processing M-texts. + +
  • Functions for converting M-texts from/to strings encoded in +various existing formats. + +
  • A huge character space, which contains all the Unicode +characters and more non-Unicode characters. + +
  • @e Chartable: A data structure that contains per-character +information efficiently. + +
  • Functions for inputting and displaying M-text on a window +system. + +
+ +@section usage How to use it? + +Just include 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. + +@section contact Contact us: + +Global IT Security Group\n +Information Technology Research Institute\n +Institute of Advanced Industrial Science and Technology + +E-mail: mule-aist@m17n.org + +*/ +//// diff --git a/doxyfile.in b/doxyfile.in index fa523c7..6bb4126 100644 --- a/doxyfile.in +++ b/doxyfile.in @@ -308,7 +308,7 @@ WARN_LOGFILE = warning # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = "data-%USR_JA_DEV%/mainpage.c" "@M17NLIB@/src/m17n-core.h" "@M17NLIB@/src/m17n.h" "@M17NLIB@/src/m17n-win.h" "@M17NLIB@/src/m17n-X.h" "@M17NLIB@/src/m17n-err.h" "@M17NLIB@/src/" +INPUT = "data-%USR_JA_DEV%/mainpage.txt" "@M17NLIB@/src/m17n-core.h" "@M17NLIB@/src/m17n.h" "@M17NLIB@/src/m17n-win.h" "@M17NLIB@/src/m17n-X.h" "@M17NLIB@/src/m17n-err.h" "@M17NLIB@/src/" "data-%USR_JA_DEV%/dbformat.txt" # 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 @@ -340,7 +340,7 @@ EXCLUDE_PATTERNS = font-flt.c font-ft.c link*.c # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = data-%USR_JA_DEV% # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -362,7 +362,7 @@ IMAGE_PATH = /project/mule/m17n-lib/docs/doxygen/images # input file. Doxygen will then use the output that the filter program writes # to standard output. -INPUT_FILTER = @abs_srcdir@/utils/%INPUT_FILTER%_filter.rb +INPUT_FILTER = @abs_srcdir@/utils/%USR_JA_DEV%_filter.rb # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source @@ -513,7 +513,7 @@ PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = m17n-lib +EXTRA_PACKAGES = m17n-lib times # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until diff --git a/utils/refman-filter.sed b/utils/refman-filter.sed index 7a2a3f9..fd8421c 100644 --- a/utils/refman-filter.sed +++ b/utils/refman-filter.sed @@ -1,3 +1,4 @@ +/documentclass/ s/a4paper/a4paper,twoside/ /The M17N Library Module Index/,/files/ d /The M17N Library File Documentation/,/printindex/ d $ i \ -- 1.7.10.4