summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-02-20 15:02:27 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-02-22 10:23:15 (GMT)
commit4da4ddea3a40049f90c6d2bfb27bc3de564160c8 (patch) (side-by-side diff)
tree839a49d9a3d1cb75aae16acf0348825c0c760715
parentc8a6eb71afdf2c9572fcdc7b617b1356b2f75daa (diff)
downloaddico-4da4ddea3a40049f90c6d2bfb27bc3de564160c8.tar.gz
dico-4da4ddea3a40049f90c6d2bfb27bc3de564160c8.tar.bz2
Avoid introducing gnulib dependencies to libdico
After pulling updates from gnulib, it was discovered that it had added an unwanted dependency to the libdico. The dependency was added b redefining fseek to rpl_fseek in the config.h. Of course, that's quite OK for user programs and in fact that's one of the purposes of gnulib, so it's doing its job all right. However, this kind of depedencies is not acceptable in installable libraries, such as libdico. There are two ways of fixing this: (1) by including libgnu to the libdico, or (2) by creating pristine (i.e. stripped of any gnulib stuff) version of config.h and using it in the library sources. The first approach was used in mailutils for the libmu_aux convenience library. However, in dico I wouldn't like to introduce additional dependencies to the installable libraries and modules, therefore second approach has been chosen. Two separare configuration headers are introduced: include/prog/config.h Configuration header with gnulib dependencies. It is used by libxdico, and user-space programs: dico, dicod, idxgcide and some test programs. include/lib/config.h Pristine header, free from any gnulib additions. It is used by all installable libraries, including dicod modules. In order to create pristine header, bootstrap uses specially prepared temporary edition of configure.ac, which is stripped off any gl_.* statements. This approach introduces additional difficulties. The two header files are of course listed in the AC_CONFIG_HEADERS statement in configure.ac. Autotools give precedence to the first one. It is the only file for which autoheader creates the .h.in template. Further, automake creates in each Makefile.am the DEFAULT_INCLUDES statement, which lists the directory part of the first header, and this value is used in the compiler command line. This means that to include the pristine header, its path prefix needs to be specified. To avoid this, the nostdinc option is passed to AM_INIT_AUTOMAKE. As a side effect, it makes it impossible to build libltdl in the recursive mode (although its Makefile.am pretends otherwise). Thus, libltdl is built in nonrecursive mode from the main Makefile.am. Similar problem occurs with the gnulib itself, although in this case its bootstrapping tool provides sufficient mechanisms to help overcome it. Gnulib is built as a sub-library of libxdico. As a side effect, the libextra library is no longer needed. Another side effect is that the rewritten bootstrap script made it possible to use gnulib-tool directly, instead of using gnulib/build-aux/bootstrap wrapper. Following bugs are fixed by this change: https://puszcza.gnu.org.ua/bugs/?416 https://puszcza.gnu.org.ua/bugs/?417 https://puszcza.gnu.org.ua/bugs/?418 Almost all files in the project are affected by this change. However, some changes are pure bugfixes. These are: * lib/mergesort.c (mergesort): Rename to dico_mergesort to avoid name clash on Free and OpenBSD. * lib/stream.c (dico_stream_getdelim): Fix memory reallocation algorithm. * lib/utf8.c (utf8_wc_strstr): Reset errno to 0. * lib/libi18n.c: Don't depend on gnu/configmake.h * modules/wordnet/module.ac: Move definition of WORDNET_COND out of conditional context. This fixes the functionality of the configure --without-wordnet option. Some obsolete and unused files have been removed. These are: * include/gjdict.xbm * lib/bushu.dat * lib/bushu.h * lib/cursor.xbm * lib/jiscvt.c * makedict/ Main set of changes is: * bootstrap: Mostly rewritten as described above. * GNUmakefile: New file for the ease of maintenance. * maint/bootstrap.mk: New file. * gnulib.modules: Moved to maint/ * maint/printflike: New file. Lists printf-like functions for gettext. * configure.boot: Use AC_CONFIG_HEADERS with two header files. Use nostdinc option to AM_INIT_AUTOMAKE. (LTDL_INIT): Use nonrecursive option. (DICO_PROG_CONFIG,DICO_LIB_CONFIG) (DICO_PROG_INCLUDES,DICO_MODULE_INCLUDES): New substitution variables. (GRECS_HOST_PROJECT_INCLUDES): Fix value. (COND_LIBDICOSASL): New conditional. * Makefile.am: Build libltdl. * lib/Makefile.am: Move convenience libraries to another directory. Build only libdico. * dico/Makefile.am: Fix LDADD and includes. * dicod/Makefile.am: Likewise. * dicod/tests/Makefile.am: Likewise. * lib/tests/Makefile.am: Likewise. * modules/*/Makefile.am: Likewise. The directory struture is reorganized and the sources of convenience libraries moved to a separate directory: * xdico/Makefile.am: New file * xdico/appi18n.c * xdico/gsaslstr.c * xdico/iputil.c * xdico/timer.c * xdico/userprivs.c * xdico/xalloc-die.c * xdico/xhostname.c * xdico/xscript.c * xdico/xstream.c * xdico/xtkn.c * xdico/xutil.c: All moved from lib * xdico/gnu/Makefile.am: New file. * xdico/gnu: Gnulib sources imported to this directory.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitignore1
-rw-r--r--GNUmakefile11
-rw-r--r--Makefile.am24
-rw-r--r--NEWS4
-rw-r--r--README2
-rw-r--r--README-alpha2
-rw-r--r--README-hacking2
-rw-r--r--am/lib.m42
-rw-r--r--am/testdir.m42
-rw-r--r--app/python/mediawiki.py2
-rwxr-xr-xbootstrap557
-rw-r--r--configure.boot41
-rw-r--r--dico/Makefile.am15
-rw-r--r--dico/autologin.c2
-rw-r--r--dico/cmdline.opt3
-rw-r--r--dico/connect.c2
-rw-r--r--dico/dico-priv.h2
-rw-r--r--dico/dico.c2
-rw-r--r--dico/func.c2
-rw-r--r--dico/lookup.c2
-rw-r--r--dico/pager.c2
-rw-r--r--dico/saslauth.c2
-rw-r--r--dico/shell.c2
-rw-r--r--dicod/Makefile.am12
-rw-r--r--dicod/accesslog.c2
-rw-r--r--dicod/acl.c2
-rw-r--r--dicod/alias.c2
-rw-r--r--dicod/auth.c2
-rw-r--r--dicod/capa.c2
-rw-r--r--dicod/ckpass.c2
-rw-r--r--dicod/cmdline.opt3
-rw-r--r--dicod/commands.c2
-rw-r--r--dicod/database.c2
-rw-r--r--dicod/dbtext.c2
-rw-r--r--dicod/dicod.c2
-rw-r--r--dicod/dicod.h3
-rw-r--r--dicod/gsasl.c2
-rw-r--r--dicod/ident.c2
-rw-r--r--dicod/lang.c2
-rw-r--r--dicod/lev.c2
-rw-r--r--dicod/lint.c2
-rw-r--r--dicod/loader.c2
-rw-r--r--dicod/main.c3
-rw-r--r--dicod/markup.c2
-rw-r--r--dicod/mime.c2
-rw-r--r--dicod/ostream.c2
-rw-r--r--dicod/pp-setup2
-rw-r--r--dicod/regex.c2
-rw-r--r--dicod/result.c2
-rw-r--r--dicod/server.c2
-rw-r--r--dicod/stat.c2
-rw-r--r--dicod/stratcl.c2
-rw-r--r--dicod/tests/Makefile.am12
-rw-r--r--dicod/tests/alias.at2
-rw-r--r--dicod/tests/apop.at2
-rw-r--r--dicod/tests/apopauth.c2
-rw-r--r--dicod/tests/atlocal.in2
-rw-r--r--dicod/tests/def.at2
-rw-r--r--dicod/tests/descr.at2
-rw-r--r--dicod/tests/echo.c2
-rw-r--r--dicod/tests/help00.at2
-rw-r--r--dicod/tests/help01.at2
-rw-r--r--dicod/tests/help02.at2
-rw-r--r--dicod/tests/help03.at2
-rw-r--r--dicod/tests/info.at2
-rw-r--r--dicod/tests/match.at2
-rw-r--r--dicod/tests/nodef.at2
-rw-r--r--dicod/tests/nomatch.at2
-rw-r--r--dicod/tests/showdb.at2
-rw-r--r--dicod/tests/showstrat.at2
-rw-r--r--dicod/tests/startup.at2
-rw-r--r--dicod/tests/testsuite.at2
-rw-r--r--dicod/tests/virt01.at2
-rw-r--r--dicod/tests/virt02.at2
-rw-r--r--dicod/tests/virt03.at2
-rw-r--r--dicod/tests/virt04.at2
-rw-r--r--dicod/tests/vis00.at2
-rw-r--r--dicod/tests/vis01.at2
-rw-r--r--dicod/tests/vis02.at2
-rw-r--r--dicod/virtual.c2
-rw-r--r--dicod/xidle.c2
-rw-r--r--dicod/xversion.c2
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/dico.12
-rw-r--r--doc/dico.texi2
-rw-r--r--doc/dicod.8in2
-rw-r--r--doc/dicod.conf.5in2
-rw-r--r--doc/html.init2
-rw-r--r--doc/proto.texi2
-rw-r--r--doc/strat.texi2
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/glossary.scm2
-rw-r--r--examples/listdict.scm2
-rw-r--r--examples/textdict.py2
m---------gnulib0
-rw-r--r--gnulibinit.conf74
-rw-r--r--include/.gitignore2
-rw-r--r--include/Makefile.am4
-rw-r--r--include/appi18n.h2
-rw-r--r--include/dico.h2
-rw-r--r--include/dico/Makefile.am2
-rw-r--r--include/dico/assoc.h2
-rw-r--r--include/dico/diag.h2
-rw-r--r--include/dico/filter.h2
-rw-r--r--include/dico/list.h2
-rw-r--r--include/dico/markup.h2
-rw-r--r--include/dico/parseopt.h2
-rw-r--r--include/dico/strat.h2
-rw-r--r--include/dico/stream.h2
-rw-r--r--include/dico/tokenize.h2
-rw-r--r--include/dico/types.h2
-rw-r--r--include/dico/udb.h2
-rw-r--r--include/dico/url.h2
-rw-r--r--include/dico/utf8.h2
-rw-r--r--include/dico/util.h2
-rw-r--r--include/dico/xlat.h2
-rw-r--r--include/gjdict.xbm28
-rw-r--r--include/gsaslstr.h2
-rw-r--r--include/libi18n.h2
-rw-r--r--include/testsuite.inc2
-rw-r--r--include/xdico.h2
-rw-r--r--lib/Makefile.am33
-rw-r--r--lib/argcv.c8
-rw-r--r--lib/assoc.c6
-rw-r--r--lib/base64.c7
-rw-r--r--lib/bsearch.c6
-rw-r--r--lib/bushu.dat286
-rw-r--r--lib/bushu.h28
-rw-r--r--lib/crlfstr.c6
-rw-r--r--lib/cursor.xbm6
-rw-r--r--lib/dbgstream.c6
-rw-r--r--lib/diag.c6
-rw-r--r--lib/fdiostr.c6
-rw-r--r--lib/fdstream.c6
-rw-r--r--lib/fltstream.c6
-rw-r--r--lib/header.c6
-rw-r--r--lib/iostr.c6
-rw-r--r--lib/jiscvt.c243
-rw-r--r--lib/key.c6
-rw-r--r--lib/levenshtein.c6
-rw-r--r--lib/libi18n.c7
-rw-r--r--lib/linetrimstr.c6
-rw-r--r--lib/list.c6
-rw-r--r--lib/logstream.c2
-rw-r--r--lib/mapstream.c6
-rw-r--r--lib/markup.c6
-rw-r--r--lib/mergesort.c16
-rw-r--r--lib/parseopt.c6
-rw-r--r--lib/qp.c7
-rw-r--r--lib/soundex.c6
-rw-r--r--lib/strat.c6
-rw-r--r--lib/stream.c22
-rw-r--r--lib/tests/Makefile.am4
-rw-r--r--lib/tests/atlocal.in2
-rw-r--r--lib/tests/crlf00.at2
-rw-r--r--lib/tests/crlf01.at2
-rw-r--r--lib/tests/crlf02.at2
-rw-r--r--lib/tests/crlf03.at2
-rw-r--r--lib/tests/crlf04.at2
-rw-r--r--lib/tests/crlf05.at2
-rw-r--r--lib/tests/crlftool.c6
-rw-r--r--lib/tests/dlev00.at2
-rw-r--r--lib/tests/dlev01.at2
-rw-r--r--lib/tests/itrsh.c6
-rw-r--r--lib/tests/itrsh.h2
-rw-r--r--lib/tests/lev00.at2
-rw-r--r--lib/tests/lev01.at2
-rw-r--r--lib/tests/levtest.c6
-rw-r--r--lib/tests/linetrim.c6
-rw-r--r--lib/tests/list.at2
-rw-r--r--lib/tests/listop.c6
-rw-r--r--lib/tests/lntrim00.at2
-rw-r--r--lib/tests/lntrim01.at2
-rw-r--r--lib/tests/lntrim02.at2
-rw-r--r--lib/tests/lntrim03.at2
-rw-r--r--lib/tests/soundex.at2
-rw-r--r--lib/tests/soundex.c6
-rw-r--r--lib/tests/strcasecmp.at2
-rw-r--r--lib/tests/strlen.at2
-rw-r--r--lib/tests/strncasecmp.at2
-rw-r--r--lib/tests/testsuite.at2
-rw-r--r--lib/tests/tolower.at2
-rw-r--r--lib/tests/toupper.at2
-rw-r--r--lib/tests/utf8.c6
-rw-r--r--lib/tests/wcstrcasecmp.at2
-rw-r--r--lib/tests/wcstrchr.at2
-rw-r--r--lib/tests/wcstrcmp.at2
-rw-r--r--lib/tests/wcstrncasecmp.at2
-rw-r--r--lib/tests/wcstrncmp.at2
-rw-r--r--lib/tests/wcstrstr.at2
-rw-r--r--lib/tokenize.c6
-rw-r--r--lib/udb.c6
-rw-r--r--lib/url.c6
-rw-r--r--lib/utf8.c8
-rw-r--r--lib/utf8_is_alnum.c4
-rw-r--r--lib/utf8_is_space.c4
-rw-r--r--lib/util.c7
-rw-r--r--lib/xlat.c6
-rw-r--r--maint/bootstrap.mk18
-rw-r--r--maint/gnulib.modules (renamed from gnulib.modules)8
-rw-r--r--maint/printflike9
-rw-r--r--makedict/.gitignore2
-rw-r--r--makedict/compile.c632
-rw-r--r--makedict/index.c769
-rw-r--r--makedict/main.c69
-rw-r--r--makedict/makedict.h109
-rw-r--r--makedict/makedict.opt71
-rw-r--r--makedict/romaji.c325
-rw-r--r--makedict/utils.c54
-rw-r--r--modules/dict.org/Makefile.am4
-rw-r--r--modules/dict.org/dictorg.c2
-rw-r--r--modules/dict.org/dictorg.h6
-rw-r--r--modules/dict.org/dictstr.c2
-rw-r--r--modules/dict.org/tests/Makefile.am2
-rw-r--r--modules/dict.org/tests/allchars.at2
-rw-r--r--modules/dict.org/tests/alnum.at2
-rw-r--r--modules/dict.org/tests/define.at2
-rw-r--r--modules/dict.org/tests/exact.at2
-rw-r--r--modules/dict.org/tests/ovdefmime.at2
-rw-r--r--modules/dict.org/tests/ovdefnomime.at2
-rw-r--r--modules/dict.org/tests/ovexact.at2
-rw-r--r--modules/dict.org/tests/ovshowdb.at2
-rw-r--r--modules/dict.org/tests/prefix.at2
-rw-r--r--modules/dict.org/tests/showdb.at2
-rw-r--r--modules/dict.org/tests/showinfo.at2
-rw-r--r--modules/dict.org/tests/suffix.at2
-rw-r--r--modules/dict.org/tests/testsuite.at2
-rw-r--r--modules/dict.org/tests/vdefine.at2
-rw-r--r--modules/dict.org/tests/vexact.at2
-rw-r--r--modules/dict.org/tests/vshowdb.at2
-rw-r--r--modules/dict.org/tests/word.at2
-rw-r--r--modules/gcide/Makefile.am18
-rw-r--r--modules/gcide/ent.c6
-rw-r--r--modules/gcide/gcide.c6
-rw-r--r--modules/gcide/gcide.h2
-rw-r--r--modules/gcide/grk.c6
-rw-r--r--modules/gcide/idx.c6
-rw-r--r--modules/gcide/idxgcide-cli.opt2
-rw-r--r--modules/gcide/idxgcide.l6
-rw-r--r--modules/gcide/markup.l6
-rw-r--r--modules/gcide/tests/Makefile.am3
-rw-r--r--modules/gcide/tests/all.at2
-rw-r--r--modules/gcide/tests/atlocal.in2
-rw-r--r--modules/gcide/tests/autoidx.at2
-rw-r--r--modules/gcide/tests/def00.at2
-rw-r--r--modules/gcide/tests/def01.at2
-rw-r--r--modules/gcide/tests/def02.at2
-rw-r--r--modules/gcide/tests/def03.at2
-rw-r--r--modules/gcide/tests/def04.at2
-rw-r--r--modules/gcide/tests/def05.at2
-rw-r--r--modules/gcide/tests/def06.at2
-rw-r--r--modules/gcide/tests/degcide.c6
-rw-r--r--modules/gcide/tests/descr.at2
-rw-r--r--modules/gcide/tests/exact.at2
-rw-r--r--modules/gcide/tests/exgrk.c2
-rw-r--r--modules/gcide/tests/greek.at2
-rw-r--r--modules/gcide/tests/greek.c6
-rw-r--r--modules/gcide/tests/idx.at2
-rw-r--r--modules/gcide/tests/info.at2
-rw-r--r--modules/gcide/tests/markup.at2
-rw-r--r--modules/gcide/tests/nopr.at2
-rw-r--r--modules/gcide/tests/prefix.at2
-rw-r--r--modules/gcide/tests/testsuite.at2
-rw-r--r--modules/gcide/webchr.c6
-rw-r--r--modules/guile/Makefile.am7
-rw-r--r--modules/guile/guile.c6
-rw-r--r--modules/guile/module.ac2
-rw-r--r--modules/guile/tests/Makefile.am2
-rw-r--r--modules/guile/tests/atlocal.in2
-rw-r--r--modules/guile/tests/define.at2
-rw-r--r--modules/guile/tests/exact.at2
-rw-r--r--modules/guile/tests/lev.at2
-rw-r--r--modules/guile/tests/mime.at2
-rw-r--r--modules/guile/tests/mime2.at2
-rw-r--r--modules/guile/tests/prefix.at2
-rw-r--r--modules/guile/tests/showdb.at2
-rw-r--r--modules/guile/tests/showinfo.at2
-rw-r--r--modules/guile/tests/showlang.at2
-rw-r--r--modules/guile/tests/suffix.at2
-rw-r--r--modules/guile/tests/testsuite.at2
-rw-r--r--modules/ldap/Makefile.am4
-rw-r--r--modules/ldap/ldap.c6
-rw-r--r--modules/ldap/module.ac2
-rw-r--r--modules/metaphone2/Makefile.am4
-rw-r--r--modules/metaphone2/metaphone2.c6
-rw-r--r--modules/metaphone2/tests/Makefile.am2
-rw-r--r--modules/metaphone2/tests/atlocal.in2
-rw-r--r--modules/metaphone2/tests/build.at2
-rw-r--r--modules/metaphone2/tests/comp00.at2
-rw-r--r--modules/metaphone2/tests/comp01.at2
-rw-r--r--modules/metaphone2/tests/comp02.at2
-rw-r--r--modules/metaphone2/tests/encode.at2
-rw-r--r--modules/metaphone2/tests/match00.at2
-rw-r--r--modules/metaphone2/tests/testsuite.at2
-rw-r--r--modules/nprefix/Makefile.am4
-rw-r--r--modules/nprefix/nprefix.c6
-rw-r--r--modules/nprefix/tests/Makefile.am2
-rw-r--r--modules/nprefix/tests/atlocal.in2
-rw-r--r--modules/nprefix/tests/np00.at2
-rw-r--r--modules/nprefix/tests/np01.at2
-rw-r--r--modules/nprefix/tests/np02.at2
-rw-r--r--modules/nprefix/tests/np03.at2
-rw-r--r--modules/nprefix/tests/np04.at2
-rw-r--r--modules/nprefix/tests/testsuite.at2
-rw-r--r--modules/outline/Makefile.am4
-rw-r--r--modules/outline/outline.c6
-rw-r--r--modules/outline/tests/Makefile.am2
-rw-r--r--modules/outline/tests/atlocal.in2
-rw-r--r--modules/outline/tests/define.at2
-rw-r--r--modules/outline/tests/dlev.at2
-rw-r--r--modules/outline/tests/dnlev.at2
-rw-r--r--modules/outline/tests/exact.at2
-rw-r--r--modules/outline/tests/lev.at2
-rw-r--r--modules/outline/tests/mime.at2
-rw-r--r--modules/outline/tests/nlev.at2
-rw-r--r--modules/outline/tests/prefix.at2
-rw-r--r--modules/outline/tests/re.at2
-rw-r--r--modules/outline/tests/regexp.at2
-rw-r--r--modules/outline/tests/showdb.at2
-rw-r--r--modules/outline/tests/showinfo.at2
-rw-r--r--modules/outline/tests/showlang.at2
-rw-r--r--modules/outline/tests/soundex.at2
-rw-r--r--modules/outline/tests/suffix.at2
-rw-r--r--modules/outline/tests/testsuite.at2
-rw-r--r--modules/pam/Makefile.am4
-rw-r--r--modules/pam/module.ac2
-rw-r--r--modules/pam/pam.c6
-rw-r--r--modules/pcre/Makefile.am4
-rw-r--r--modules/pcre/module.ac2
-rw-r--r--modules/pcre/pcre.c6
-rw-r--r--modules/python/Makefile.am2
-rw-r--r--modules/python/module.ac2
-rw-r--r--modules/python/python.c5
-rw-r--r--modules/python/python2.c5
-rw-r--r--modules/python/tests/Makefile.am2
-rw-r--r--modules/python/tests/atlocal.in2
-rw-r--r--modules/python/tests/define.at2
-rw-r--r--modules/python/tests/exact.at2
-rw-r--r--modules/python/tests/lev.at2
-rw-r--r--modules/python/tests/mime.at2
-rw-r--r--modules/python/tests/prefix.at2
-rw-r--r--modules/python/tests/showdb.at2
-rw-r--r--modules/python/tests/showinfo.at2
-rw-r--r--modules/python/tests/showlang.at2
-rw-r--r--modules/python/tests/testsuite.at2
-rw-r--r--modules/stratall/Makefile.am4
-rw-r--r--modules/stratall/stratall.c6
-rw-r--r--modules/stratall/tests/Makefile.am2
-rw-r--r--modules/stratall/tests/atlocal.in2
-rw-r--r--modules/stratall/tests/testsuite.at2
-rw-r--r--modules/stub.am2
-rw-r--r--modules/substr/Makefile.am4
-rw-r--r--modules/substr/substr.c6
-rw-r--r--modules/substr/tests/Makefile.am2
-rw-r--r--modules/substr/tests/atlocal.in2
-rw-r--r--modules/substr/tests/testsuite.at2
-rw-r--r--modules/template.scm2
-rw-r--r--modules/template/Makefile.am4
-rw-r--r--modules/template/module.c6
-rw-r--r--modules/template/tests/Makefile.am2
-rw-r--r--modules/template/tests/atlocal.in2
-rw-r--r--modules/template/tests/testsuite.at2
-rw-r--r--modules/word/Makefile.am4
-rw-r--r--modules/word/tests/Makefile.am2
-rw-r--r--modules/word/tests/atlocal.in2
-rw-r--r--modules/word/tests/first.at2
-rw-r--r--modules/word/tests/last.at2
-rw-r--r--modules/word/tests/testsuite.at2
-rw-r--r--modules/word/tests/word.at2
-rw-r--r--modules/word/word.c6
-rw-r--r--modules/wordnet/Makefile.am8
-rw-r--r--modules/wordnet/module.ac5
-rw-r--r--modules/wordnet/wordnet.c6
-rw-r--r--po/POTFILES.in15
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/gcider2
-rw-r--r--utils/Makefile.am1
-rw-r--r--utils/bushu.awk178
-rw-r--r--xdico/.gitignore2
-rw-r--r--xdico/Makefile.am (renamed from makedict/Makefile.am)64
-rw-r--r--xdico/appi18n.c (renamed from lib/appi18n.c)7
-rw-r--r--xdico/gnu/Makefile.am19
-rw-r--r--xdico/gsaslstr.c (renamed from lib/gsaslstr.c)6
-rw-r--r--xdico/iputil.c (renamed from lib/iputil.c)7
-rw-r--r--xdico/timer.c (renamed from lib/timer.c)6
-rw-r--r--xdico/userprivs.c (renamed from lib/userprivs.c)6
-rw-r--r--xdico/xalloc-die.c (renamed from lib/xalloc-die.c)6
-rw-r--r--xdico/xhostname.c (renamed from lib/xhostname.c)6
-rw-r--r--xdico/xscript.c (renamed from lib/xscript.c)6
-rw-r--r--xdico/xstream.c (renamed from lib/xstream.c)6
-rw-r--r--xdico/xtkn.c (renamed from lib/xtkn.c)6
-rw-r--r--xdico/xutil.c (renamed from lib/xutil.c)6
392 files changed, 1080 insertions, 3747 deletions
diff --git a/.gitignore b/.gitignore
index cdfd171..9b4f628 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,7 +39,6 @@ dicoweb/lib
dicoweb/lib64
dicoweb/settings.py
gmon.out
-gnu
gnulibinit
libltdl
libtool
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..9966c71
--- a/dev/null
+++ b/GNUmakefile
@@ -0,0 +1,11 @@
+# Maintainer's make file for dico.
+#
+ifneq (,$(wildcard Makefile))
+ include Makefile
+configure.ac: configure.boot
+ ./bootstrap
+else
+$(if $(MAKECMDGOALS),$(MAKECMDGOALS),all):
+ $(MAKE) -f maint/bootstrap.mk
+ $(MAKE) $(MAKECMDGOALS)
+endif
diff --git a/Makefile.am b/Makefile.am
index 4e4225c..2b04a6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2000, 2008-2010, 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,14 +17,13 @@
ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I gint -I imprimatur
SUBDIRS=\
+ .\
include\
- utils\
examples\
gint\
- gnu\
grecs\
+ xdico\
lib\
- libltdl\
dicod\
modules\
dico\
@@ -32,7 +31,6 @@ SUBDIRS=\
imprimatur\
doc\
po
-#FIXME: add these when ready: makedict client fonts
EXTRA_DIST = ChangeLog.2008 configure.boot bootstrap DISTFILES
@@ -41,6 +39,22 @@ dist-hook:
-T $(abs_top_srcdir)/DISTFILES | \
tar -C $(distdir) -x -f -
+BUILT_SOURCES =
+
+AM_CPPFLAGS = @DICO_LIB_CONFIG@
+#LT_CONFIG_H = config.h
+AM_LDFLAGS =
+
+include_HEADERS =
+noinst_LTLIBRARIES =
+lib_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
+
+CLEANFILES =
+MOSTLYCLEANFILES =
+
+include libltdl/Makefile.inc
+
# Start Git ChangeLog from this date.
gen_start_date = 2008-05-05
diff --git a/NEWS b/NEWS
index fc3b124..baffaa0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,9 @@
-GNU Dico NEWS -- history of user-visible changes. 2019-02-19
+GNU Dico NEWS -- history of user-visible changes. 2019-02-22
See the end of file for copying conditions.
Please send Dico bug reports to <bug-dico@gnu.org.ua>
-Version 2.7.90 (git)
+Version 2.7.91 (git)
* Fix memory access errors
diff --git a/README b/README
index fa3de5a..8da135c 100644
--- a/README
+++ b/README
@@ -202,7 +202,7 @@ Send bug reports to <bug-dico@gnu.org>.
* Copyright information:
-Copyright (C) 2008-2018 Sergey Poznyakoff
+Copyright (C) 2008-2019 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/README-alpha b/README-alpha
index d48f306..0e5e6eb 100644
--- a/README-alpha
+++ b/README-alpha
@@ -46,7 +46,7 @@ See the files INSTALL and README for the detailed instructions.
* Copyright information:
-Copyright (C) 2008-2018 Sergey Poznyakoff
+Copyright (C) 2008-2019 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/README-hacking b/README-hacking
index 2c8affb..8fefede 100644
--- a/README-hacking
+++ b/README-hacking
@@ -78,7 +78,7 @@ start hacking on your new module.
* Copyright information
-Copyright (C) 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+Copyright (C) 2008-2019 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/am/lib.m4 b/am/lib.m4
index c97de28..1f9ddf4 100644
--- a/am/lib.m4
+++ b/am/lib.m4
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2010-2018 Sergey Poznyakoff
+# Copyright (C) 2010-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/am/testdir.m4 b/am/testdir.m4
index 213a0de..e9da667 100644
--- a/am/testdir.m4
+++ b/am/testdir.m4
@@ -1,6 +1,6 @@
# testdir.m4 serial 1
# This file is part of GNU Dico
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/app/python/mediawiki.py b/app/python/mediawiki.py
index 97bf3aa..3087f30 100644
--- a/app/python/mediawiki.py
+++ b/app/python/mediawiki.py
@@ -2,7 +2,7 @@
# Mediawiki module for Python
# This file is part of GNU Dico.
# Copyright (C) 2008-2010, 2012 Wojciech Polak
-# 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/bootstrap b/bootstrap
index be55f18..c663a47 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# This file is part of GNU Dico
-# Copyright (C) 2014, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2014-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,18 +18,20 @@
=head1 NAME
bootstrap - Bootstrap the Dico project
-
+
=head1 SYNOPSIS
B<bootstrap>
-[B<-ahmnv>]
+[B<-ahmnv>]
[B<--add>]
[B<--dry-run>]
-[B<--help>]
+[B<--help>]
[B<--new>]
[B<--modules>]
-[B<--skip-reconfig>]
+[B<--skip-reconfig>]
[B<--verbose>]
+[B<--quiet>]
+[B<--skip-po>]
[I<NAME>...]
=head1 DESCRIPTION
@@ -44,7 +46,9 @@ When run without arguments performs the following actions:
=item 1. Pulls in git submodules.
-=item 2. Creates autoconf/automake sources for building Dico modules.
+=item 2. Creates directories and placeholders for automatically generated files
+
+=item 3. Creates autoconf/automake sources for building Dico modules.
Recreates F<configure.ac> and F<modules/Makefile.am> from stub files
F<configure.boot> and F<modules/stub.am>. The list of modules is obtained
@@ -55,19 +59,42 @@ Additional F<configure.ac> code for each module is obtained from
file F<module.ac> in each module directory. See the description of
this file in section B<FILES>.
-=item 3. Bootstraps the B<gnulib> submodule.
+=item 4. Bootstraps the B<gnulib> submodule.
+
+The F<gnulib-tool> is run with arguments deduced from files
+F<configure.ac> and F<maint/gnulib.modules>.
+
+=item 5. Creates the file F<po/Makevars>
+
+This file is created from F<po/Makevsrs.template> using the information
+obtained from F<configure.ac> and F<maint/printflike>.
+
+=item 6. Downloads new translations (F<*.po> files) into the F<po> directory.
+
+This step can be skipped using the B<--skip-po> option.
+
+=item 7. Creates a pristine configuration header file
-=back
+The pristine configuration header file is a version of F<config.h>
+stripped off any defines added by B<gnulib>. It is used by library
+source files to avoid introducing dependency on B<gnulib>.
+
+The name of the pristine header file is taken from the second argument
+of the B<AC_CONFIG_HEADERS> statement in the F<configure.boot> file.
+
+=item 8. Reconfigures the project.
+
+=back
The program must be run from the Dico source tree topmost directory.
-
+
When given the B<-m> (B<--modules>) option, only the second step is
performed.
When the B<-a> (B<--add>, B<--new>) option is given, the program creates
basic infrastructure for modules named in the command line. For each
I<NAME> from the command line it creates directory F<modules/I<NAME>>
-and populates it with files from the directory F<modules/template>. To
+and populates it with files from the directory F<modules/template>. To
this effect, it reads the list of file names from the section B<FILE LIST>
of the file F<modules/template/README>. This file is in Emacs outline format.
The B<FILE LIST> section lists file names relative to the F<modules/template>
@@ -84,19 +111,18 @@ are replaced with their actual values in the destination file. This process
is discussed in detail in section B<FILES>, below.
Finally, the files F<configure.ac> and F<modules/Makefile.am> are recreated
-to take into account the newly created modules.
-
-By default, the program prints only error diagnostics. That means that
-upon success, it will terminate quietly, without producing a single line
-on output. This can be changed using the B<-v> (or B<--verbose>) option.
-When the option is given once, the program prints general description before
-running each of the three steps described above. Two B<-v> options instruct
-it to also print whatever output that was generated when running auxiliary
-commands. Finally, three B<-v>'s produce additional debugging information.
+to take into account the newly created modules.
+
+By default, the program prints a succint report of what is being done.
+This can be changed using the B<-q> (B<--quiet>) and B<-v> (or B<--verbose>)
+options. The B<-q> (B<--quiet>) option instructs the program to suppress
+any output excepting error messages. The B<-v> (or B<--verbose>) option,
+on the contrary, instructs it to also print whatever output that was
+generated when running auxiliary commands.
The B<-n> (B<--dry-run>) option instructs the tool to print what would have
been done without actually doing it.
-
+
=head1 OPTIONS
=over 4
@@ -105,24 +131,28 @@ been done without actually doing it.
Create basic infrastructure for modules named in the command line and
add them to F<configure.ac> and F<modules/Makefile.am>
-
+
=item B<-n>, B<--dry-run>
-Don't do anything, just print what would have been done.
+Don't do anything, just print what would have been done.
=item B<-m>, B<--modules>
Run only the second step: creation of autoconf/automake sources for
-Dico modules.
+Dico modules.
+
+=item B<--skip-po>
+
+Don't synchronize localization files with the Translation Project.
=item B<-s>, B<--skip-reconfigure>
Don't run B<autoreconf>. Takes effect only with B<--add> (B<--new>) or
-B<--modules>.
-
+B<--modules>.
+
=item B<-v>, B<--verbose>
-Increase output verbosity. Multiple options accumulate.
+Increase output verbosity. Multiple options accumulate.
=back
@@ -132,7 +162,7 @@ verbatim:
=over 4
=item B<--gnulib-srcdir=>I<DIRNAME>
-
+
Specifies the local directory where B<gnulib> sources reside. Use this if
you already have gnulib sources on your machine, and do not want to waste
your bandwidth downloading them again.
@@ -145,29 +175,29 @@ to a correct gnulib snapshot.
=item B<--skip-po>
Do not download po files.
-
-=back
-
+
+=back
+
The following options cause the program to display informative text and
-exit:
-
-=over 4
-
+exit:
+
+=over 4
+
=item B<-h>
Show a short usage summary.
=item B<--help>
-Show man page.
+Show man page.
=item B<--usage>
-Show a concise command line syntax reminder.
-
+Show a concise command line syntax reminder.
+
=back
-
-=head1 FILES
+
+=head1 FILES
The following files are used as templates to create output files. When
creating output file, each line from the corresponding template is read,
@@ -194,7 +224,7 @@ and the input file contains:
dnl <HEADING#>
-Then, the resulting expansion will be:
+Then, the resulting expansion will be:
dnl This file is generated automatically.
dnl Please, do not edit.
@@ -203,8 +233,8 @@ Then, the resulting expansion will be:
The macro variables are specific for each file, and are described below.
For each file, a special comment sequence is defined. Lines beginning
-with that sequence are omitted from the output.
-
+with that sequence are omitted from the output.
+
=over 4
=item F<configure.boot>
@@ -236,9 +266,9 @@ where MODNAME is the module name and STATUS is the module status variable
(which produces B<yes> or B<no> at configure time, depending on whether
the module is enabled or not).
-This is intended for use in B<AC_CONFIG_COMMANDS>.
+This is intended for use in B<AC_CONFIG_COMMANDS>.
-=item B<STATUS_DEFN>
+=item B<STATUS_DEFN>
A list of assignments for module status variables, intended
for use in B<AC_CONFIG_COMMANDS>.
@@ -248,10 +278,10 @@ for use in B<AC_CONFIG_COMMANDS>.
The following code illustrates the use of the latter two variables:
AC_CONFIG_COMMANDS([status],[
-echo<STATUS_OUTPUT>
+echo<STATUS_OUTPUT>
],
- [<STATUS_DEFN>])
-
+ [<STATUS_DEFN>])
+
=item F<modules/*/module.ac>
This file is optional. If present, it contains the B<autoconf> code for
@@ -273,7 +303,7 @@ Use I<NAME> as module name when creating variable names for that module. This
is useful when the module name contains symbols that cannot be used in variable
names (as in, e.g. B<dict.org>).
-=item B<## module description: I<TEXT>>
+=item B<## module description: I<TEXT>>
Use I<TEXT> as module description in B<STATUS_OUTPUT> (see F<configure.boot>).
@@ -284,7 +314,7 @@ Reserved for future use.
=back
As well as other B<##> comments, these comments do not appear in the output.
-
+
=item F<modules/stub.am>
Produces the file F<modules/Makefile.am>. Comment marker is B<##>.
@@ -292,14 +322,14 @@ Produces the file F<modules/Makefile.am>. Comment marker is B<##>.
Macro variables:
=over 8
-
+
=item B<HEADING>
Same as in F<configure.boot>.
=item B<MODULES>
-Produces B<Makefille.am> code for the B<SUBDIRS> variable.
+Produces B<Makefille.am> code for the B<SUBDIRS> variable.
=item B<TEMPLATE>
@@ -308,12 +338,22 @@ F<modules/template/README>.
=back
-=back
-
+=item F<maint/gnulib.modules>
+
+List of B<gnulib> modules to be imported to the package and additional
+options to B<gnulib-tool>.
+
+=item maint/printflike
+
+List of I<printf-like> programs for generating the C<XGETTEXT_OPTIONS>
+variable in F<po/Makevars>.
+
+=back
+
The following template files are processed when creating new modules:
-=over 4
-
+=over 4
+
=item F<modules/template/module.c>
produces the file F<modules/I<NAME>/I<NAME>.c>. Comment marker is B<//>.
@@ -326,12 +366,12 @@ Macro variables:
Expands to the name of the module.
-=back
-
+=back
+
=item Any F<Makefile.am> files in the F<modules/template> directory
Comment marker is B<##>.
-
+
Macro variables:
=over 8
@@ -342,12 +382,12 @@ Expands to the name of the module.
=back
-=back
+=back
-The files F<modules/template/tests/atlocal.in> and
+The files F<modules/template/tests/atlocal.in> and
F<modules/template/tests/testsuite.at> follow the same rules as
F<Makefile.am>.
-
+
=head1 EXIT CODES
=over 4
@@ -362,19 +402,19 @@ Command line usage error.
=item B<66>
-Can't open input file.
-
+Can't open input file.
+
=item B<73>
-Can't create output file.
+Can't create output file.
=back
=head1 BUGS
Error handling can be made better.
-
-=cut
+
+=cut
use strict;
use Getopt::Long qw(:config gnu_getopt no_ignore_case);
@@ -399,15 +439,16 @@ my $progdescr = "Recreate Dico module autoconf structure";
my $addmod;
my $dry_run;
my $verbose;
+my $quiet;
my $modules;
my $skip_reconf;
-my @gnulib_options;
+my $skip_po;
my $autoconf = "module.ac";
my $config_stub = "configure.boot";
my $makefile_stub = "modules/stub.am";
my $makefile = "modules/Makefile.am";
my %outfile;
-
+my %pkg_info;
my %categories; # not used now
sub error {
@@ -430,7 +471,7 @@ my $status = 0;
sub rewrite_configure_ac {
my $ref = shift;
-
+
my %vartab = (
'overwrite' => 1,
'tempfile' => 1,
@@ -441,7 +482,7 @@ To recreate, run $progname from the top of Dico source tree.
",
'MODULES' => sub {
my $s;
-
+
foreach my $name (sort keys %{$ref}) {
my $h = $ref->{$name};
$s .= "# Module $name\n";
@@ -557,7 +598,7 @@ if ${acname}_COND
${acname}_DIR=$name
endif
EOT
-;
+;
$ref->{$name}{SUBDIRS} = "\$(${acname}_DIR)";
}
$ref->{$name}{status} = 1
@@ -594,8 +635,8 @@ EOT
$status = EX_DATAERR;
return;
}
- }
-
+ }
+
if ($verbose>2) {
print STDERR "module $name:\n";
print STDERR Dumper($ref->{$name});
@@ -612,7 +653,7 @@ sub replace_macro {
if (ref($ref->{$name}) eq 'CODE') {
$s = &{$ref->{$name}};
} else {
- $s = $ref->{$name};
+ $s = $ref->{$name};
}
} else {
$s = "<$name>";
@@ -633,11 +674,11 @@ sub make_file {
make_path($dir, {error=>\my $err});
if (@$err) {
for my $diag (@$err) {
- my ($file, $message) = %$diag;
- $file = $dir if ($file eq '');
- error("error creating $file: $message");
- }
- exit(EX_CANTCREAT);
+ my ($file, $message) = %$diag;
+ $file = $dir if ($file eq '');
+ error("error creating $file: $message");
+ }
+ exit(EX_CANTCREAT);
}
}
}
@@ -676,7 +717,7 @@ sub make_file {
close($ifd);
close($ofd);
}
-}
+}
sub read_file_list {
open(my $fd, '<', 'modules/template/README') or die;
@@ -707,7 +748,8 @@ sub read_file_list {
sub create_module {
my $modname = shift;
- error("Creating framework for module $modname", fd => \*STDOUT) if $verbose;
+ error("Creating framework for module $modname", fd => \*STDOUT)
+ unless $quiet;
my %variables = (
'./module.c' => { rename => sub { s/module/${modname}/; },
ignorecomm => '//',
@@ -728,7 +770,7 @@ sub create_module {
}
my $template_dir = 'modules/template';
-
+
foreach my $file (read_file_list) {
# my $subdir = $dir . '/' . dirname($file);
# unless (-d $subdir) {
@@ -744,18 +786,18 @@ sub create_module {
do {
if (exists($variables{$key})
|| exists($variables{$key = basename($file)})) {
- $vartab = $variables{$key};
+ $vartab = $variables{$key};
}
if ($vartab && exists($vartab->{ref})) {
- $key = $vartab->{ref};
- goto VARTAB;
+ $key = $vartab->{ref};
+ goto VARTAB;
}
};
- my $outfile = $file;
- if ($vartab && exists($vartab->{rename})) {
+ my $outfile = $file;
+ if ($vartab && exists($vartab->{rename})) {
local $_ = $outfile;
- &{$vartab->{rename}};
+ &{$vartab->{rename}};
$outfile = $_;
}
make_file("$template_dir/$file", "$dir/$outfile", $vartab);
@@ -791,8 +833,9 @@ sub modproc {
my %modtab;
my @modnames = map { s#modules/##; $_; } grep { $_ ne 'modules/template' && -d $_; } glob "modules/*";
- error("Bootstrapping dico modules", fd => \*STDOUT) if $verbose;
-
+ error("Bootstrapping dico modules", fd => \*STDOUT)
+ unless $quiet;
+
foreach my $m (@modnames) {
add_module($m, \%modtab);
}
@@ -808,8 +851,21 @@ sub modproc {
}
}
+sub get_command_name {
+ my $cmd = shift;
+ if ($cmd =~ /\s/) {
+ unshift @_, split /\s+/, $cmd;
+ $cmd = shift;
+ }
+ if ($cmd =~ /^(sh|perl)$/) {
+ $cmd = shift;
+ }
+ return $cmd;
+}
+
sub run {
- error("running @_", prefix=>'DEBUG') if $verbose>2;
+ my $id = get_command_name(@_);
+ error("running @_", prefix=>'DEBUG') if $verbose>2;
return if $dry_run;
my $out = gensym;
my $err = gensym;
@@ -817,21 +873,21 @@ sub run {
open(my $in, "<&", \*STDIN) or die "can't dup STDIN: $!";
my $pid = open3($in, $out, $err, @_);
my $logpid;
- if ($verbose > 1) {
+ if ($verbose) {
$logpid = fork();
if ($logpid == 0) {
while (<$out>) {
chomp;
- error($_, fd => \*STDOUT, prefix => "[@_]");
+ error($_, fd => \*STDOUT, prefix => "[$id]");
}
exit;
- }
+ }
}
-
+
while (<$err>) {
chomp;
next if /^(libtoolize|autoreconf):/ && !$verbose;
- error($_, prefix => "[@_]");
+ error($_, prefix => "[$id]");
}
waitpid($pid, 0);
my $ret = $?;
@@ -843,23 +899,279 @@ sub run {
abend(EX_CANTCREAT, "@_ exited with status $e");
}
waitpid($logpid, 0) if defined $logpid;
-}
+}
+
+sub gnulib_modlist {
+ my @options;
+ my @include;
+ my @exclude;
+ open(my $fd, '<', 'maint/gnulib.modules')
+ or abend(EX_NOINPUT, "can't open maint/gnulib.modules: $!");
+ while (<$fd>) {
+ chomp;
+ s/\s+$//;
+ s/^\s+//;
+ next if /^#/ or /^$/;
+ if (/^(--.+?)\s*(?:=\s*(.+))/) {
+ push @options, "$1".($2 ? "=$2" : '');
+ } elsif (/^[!](.+)/) {
+ push @exclude, $1;
+ } else {
+ push @include, $_;
+ }
+ }
+ close $fd;
+ return (
+ @options,
+ (map { "--avoid=$_" } @exclude),
+ @include
+ );
+}
+
sub gnulib_init {
- my $gnulib = 'gnulibinit';
- unless (-l $gnulib) {
- symlink('gnulib/build-aux/bootstrap', $gnulib)
- or abend(EX_CANTCREAT, "can't symlink gnulib/build-aux/bootstrap: $!");
+ error("Bootstrapping gnulib", fd => \*STDOUT) unless $quiet;
+ my @import_options = qw(
+ --import
+ --local-dir=gl
+ --m4-base=m4
+ --doc-base=doc
+ --tests-base=tests
+ --aux-dir=build-aux
+ --makefile-name=gnulib.am
+ --no-conditional-dependencies
+ --macro-prefix=gl);
+ push @import_options, '--verbose' if $verbose;
+ run("sh", "gnulib/gnulib-tool",
+ @import_options,
+ gnulib_modlist);
+}
+
+sub po_makevars_template {
+ my $file = shift;
+ return if -f $file;
+ open(my $fd, '>', $file)
+ or abend(EX_CANTCREAT, "cannot create $file: $!");
+ print $fd <<'EOT';
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+EOT
+}
+
+sub make_tree {
+ error("Creating placeholders", fd => \*STDOUT) unless $quiet;
+ return if $dry_run;
+ my %dirs;
+ $dirs{$pkg_info{AC_CONFIG_MACRO_DIR}} = 1
+ if exists $pkg_info{AC_CONFIG_MACRO_DIR};
+ if (exists($pkg_info{AC_CONFIG_HEADERS})) {
+ my @d = map { dirname($_) } @{$pkg_info{AC_CONFIG_HEADERS}};
+ @dirs{@d} = (1) x @d;
+ }
+
+ foreach my $dir (keys %dirs) {
+ unless (-d $dir) {
+ mkdir $dir
+ or abend(EX_CANTCREAT, "cannot create directory $dir: $!");
+ }
+ }
+
+ foreach my $cf (map { "$_.in" } @{$pkg_info{AC_CONFIG_HEADERS}}) {
+ unless (-f $cf) {
+ open(my $fd, '>', $cf)
+ or abend(EX_CANTCREAT, "can't create placeholder file $cf: $!");
+ close($fd);
+ }
+ }
+
+ # FIXME include/lib/config.h
+ po_makevars_template('po/Makevars.template');
+
+ unless (-f 'ChangeLog') {
+ open(my $fd, '>', 'ChangeLog')
+ or abend(EX_CANTCREAT, "cannot create ChangeLog: $!");
+ print $fd <<EOT;
+This file is a placeholder. It will be replaced with the actual ChangeLog
+by make dist. Run make ChangeLog if you wish to create it earlier.
+EOT
}
- error("Bootstrapping gnulib", fd => \*STDOUT) if $verbose;
- run('sh', $gnulib, @gnulib_options);
+}
+
+sub make_pristine_conf {
+ my $cfname;
+ my ($ofd, $tempname) = tempfile(DIR => '.',
+ TEMPLATE => 'configure.XXXXXX');
+ open(my $ifd, '<', 'configure.ac')
+ or abend(EX_DATAERR, "can't open configure.ac for reading: $!");
+ while (<$ifd>) {
+ next if /^gl_/;
+ if (s/^AC_CONFIG_HEADERS\(\[?(.+?)\]?\).*/$1/) {
+ my @cf = split;
+ if (@cf > 1) {
+ $cfname = $cf[1];
+ print $ofd "AC_CONFIG_HEADERS($cfname)\n";
+ next;
+ }
+ }
+ print $ofd $_;
+ }
+ close $ofd;
+ close $ifd;
+ if ($cfname) {
+ error("Generating pristine config header in ${cfname}.in",
+ fd => \*STDOUT) unless $quiet;
+ run("autoheader --force $tempname");
+ }
+ unlink $tempname;
}
sub reconf {
return if $status || $skip_reconf;
- error("Reconfiguring", fd => \*STDOUT) if $verbose;
- run("autoreconf -i -s");
-}
+ error("Reconfiguring", fd => \*STDOUT) unless $quiet;
+ run("autoreconf -i -s -f");
+ make_pristine_conf();
+}
+
+sub get_pkg_info {
+ my $m4_prog = q{divert(-1)
+changequote([,])
+define([X_PRINT],[divert(0)$1divert(-1)])
+define([AC_INIT],[X_PRINT([PACKAGE_NAME:$1
+PACKAGE_BUGREPORT:$3
+])])
+define([AC_CONFIG_HEADERS],
+[X_PRINT([[$0]:$1
+])])
+define([AC_CONFIG_MACRO_DIR],[X_PRINT([[$0]:$1
+])])
+ };
+
+ my $tmp = File::Temp->new();
+ print $tmp $m4_prog;
+ close $tmp;
+ open(my $fh, '-|', 'm4', $tmp->filename, 'configure.boot')
+ or abend(EX_NOINPUT, "Can't run m4: $!");
+ while (<$fh>) {
+ chomp;
+ my ($k,$v) = split /:/, $_, 2;
+ $pkg_info{$k} = $v;
+ }
+ close $fh;
+
+ ($pkg_info{PACKAGE_TARNAME} = $pkg_info{PACKAGE_NAME}) =~ s/^GNU\s+//;
+ $pkg_info{PACKAGE_BUGREPORT} =
+ "bug-$pkg_info{PACKAGE_TARNAME}\@gnu.org.ua"
+ unless $pkg_info{PACKAGE_BUGREPORT};
+ if (exists($pkg_info{AC_CONFIG_HEADERS})) {
+ $pkg_info{AC_CONFIG_HEADERS} = [split /\s+/, $pkg_info{AC_CONFIG_HEADERS}]
+ }
+}
+
+my %po_var = (
+ COPYRIGHT_HOLDER => "Sergey Poznyakoff", # FIXME
+);
+
+sub fill_xgettext_options {
+ my $file = shift;
+ open(my $ifd, '<', $file)
+ or abend(EX_NOINPUT, "Can't open $file: $!");
+ $po_var{XGETTEXT_OPTIONS} = [map {
+ chomp;
+ s/\s+$//;
+ s/^\s+//;
+ if (/^(.+?):(\d)$/) {
+ "--flag=$1:$2:pass-c-format"
+ } else {
+ ()
+ }
+ } <$ifd>];
+ close $ifd;
+}
+
+sub po_init {
+ my $template = "po/Makevars.template";
+ error("Creating po/Makevars", fd => \*STDOUT) unless $quiet;
+ return if $dry_run;
+
+ $po_var{MSGID_BUGS_ADDRESS} = $pkg_info{PACKAGE_BUGREPORT};
+ fill_xgettext_options('maint/printflike') if -f 'maint/printflike';
+
+ open(my $ifd, '<', $template)
+ or abend(EX_NOINPUT, "Can't open $template: $!");
+ open(my $ofd, '>', 'po/Makevars')
+ or abend(EX_CANTCREAT, "Can't create po/Makevars: $!");
+ while (<$ifd>) {
+ chomp;
+ if (/^\s*([A-Za-z_][A-Za-z_0-9]+)\s*=/) {
+ if (exists($po_var{$1})) {
+ if (ref($po_var{$1}) eq 'ARRAY') {
+ print $ofd join("\\\n ", $_, @{$po_var{$1}})
+ . "\n";
+ } else {
+ print $ofd "$1 = $po_var{$1}\n";
+ }
+ next;
+ }
+ }
+ print $ofd "$_\n";
+ }
+ close $ifd;
+ close $ofd;
+ po_sync($pkg_info{PACKAGE_TARNAME}) unless $skip_po
+}
+
+sub po_sync {
+ my $domain = shift;
+ error("Updating po files", fd => \*STDOUT) unless $quiet;
+ my @rsync_options = qw(
+ --copy-links
+ --recursive
+ --times
+ --compress);
+ push @rsync_options, '--verbose' if $verbose;
+ run('rsync',
+ @rsync_options,
+ "rsync://translationproject.org/tp/latest/$domain/", 'po');
+}
END {
cleanup;
@@ -869,28 +1181,31 @@ $SIG{HUP} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = \&cleanup;
#
GetOptions("h" => sub {
- pod2usage(-message => "$progname: $progdescr",
- -exitstatus => 0);
- },
- "help" => sub {
- pod2usage(-exitstatus => EX_OK, -verbose => 2);
- },
+ pod2usage(-message => "$progname: $progdescr",
+ -exitstatus => 0);
+ },
+ "help" => sub {
+ pod2usage(-exitstatus => EX_OK, -verbose => 2);
+ },
"usage" => sub {
- pod2usage(-exitstatus => EX_OK, -verbose => 0);
- },
+ pod2usage(-exitstatus => EX_OK, -verbose => 0);
+ },
"add|new|a" => \$addmod,
- "dry-run|n" => \$dry_run,
- "verbose|v+" => \$verbose,
+ "dry-run|n" => \$dry_run,
+ "verbose|v+" => \$verbose,
+ "quiet|q" => \$quiet,
"modules|m" => \$modules,
"skip-reconfigure|s" => \$skip_reconf,
- "gnulib-srcdir=s" => sub { push @gnulib_options, "--$_[0]=$_[1]" },
- "skip-po|no-git" => sub { push @gnulib_options, "--$_[0]" }
+ "skip-po" => \$skip_po
) or exit(EX_USAGE);
abend(EX_USAGE, "must run from the Dico source tree topmost directory")
unless checksrc();
++$verbose if $dry_run;
+$verbose = 0 if $quiet;
+
+get_pkg_info();
if ($addmod) {
abend(EX_USAGE, "not enough arguments") unless @ARGV;
@@ -906,11 +1221,14 @@ if ($addmod) {
} elsif ($#ARGV >= 0) {
abend(EX_USAGE, "too many arguments; did you mean --new?");
} elsif (-d '.git') {
- error("Initializing submodules", fd => \*STDOUT) if $verbose;
+ error("Initializing submodules", fd => \*STDOUT) unless $quiet;
run('git submodule init');
run('git submodule update');
+ make_tree();
modproc();
gnulib_init();
+ po_init();
+ reconf();
} else {
error("this does not look like a clone of the Dico repository");
error("did you mean --modules?");
@@ -918,4 +1236,3 @@ if ($addmod) {
}
exit($status);
-
diff --git a/configure.boot b/configure.boot
index 57a1ffa..4008d54 100644
--- a/configure.boot
+++ b/configure.boot
@@ -28,12 +28,12 @@ dnl Process this file with -*- autoconf -*- to produce a configure script.
# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
-AC_INIT([GNU dico], 2.7.90, [bug-dico@gnu.org])
+AC_INIT([GNU dico], 2.7.91, [bug-dico@gnu.org])
AC_CONFIG_SRCDIR([dicod/main.c])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(include/prog/config.h include/lib/config.h)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR(m4)
-AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 dist-xz std-options subdir-objects])
+AM_INIT_AUTOMAKE([1.11 nostdinc gnits tar-ustar dist-bzip2 dist-xz std-options subdir-objects])
dnl Enable silent rules by default:
AM_SILENT_RULES([yes])
@@ -52,9 +52,7 @@ AC_PROG_LEX
LT_PREREQ(2.4)
LT_CONFIG_LTDL_DIR([libltdl])
LT_INIT([dlopen])
-LTDL_INIT([recursive])
-LT_WITH_LTDL
-AC_CONFIG_FILES([libltdl/Makefile])
+LTDL_INIT([nonrecursive])
dnl Checks for libraries.
AC_CHECK_LIB(socket, socket)
@@ -115,7 +113,7 @@ AC_CHECK_LIB(crypt, crypt)
AM_ICONV
AM_GNU_GETTEXT([external], [need-formatstring-macros])
AM_GNU_GETTEXT_VERSION([0.18])
-AC_CONFIG_LINKS(include/gettext.h:gnu/gettext.h)
+AC_CONFIG_LINKS(include/gettext.h:xdico/gnu/gettext.h)
LOG_FACILITY="LOG_DAEMON"
@@ -151,10 +149,27 @@ if test -z "$DEFAULT_VERSION_INCLUDE_DIR"; then
DEFAULT_VERSION_INCLUDE_DIR='$(pkgdatadir)/$(VERSION)/include'
fi
+AC_SUBST([DICO_PROG_CONFIG],['-I$(top_builddir)/include/prog'])
+AC_SUBST([DICO_LIB_CONFIG],['-I$(top_builddir)/include/lib'])
+
+AC_SUBST([DICO_PROG_INCLUDES],[dnl
+'$(DICO_PROG_CONFIG)\
+ -I$(top_srcdir)/include\
+ -I$(top_builddir)/include\
+ -I$(top_srcdir)/xdico/gnu\
+ -I$(top_builddir)/xdico/gnu\
+ $(GRECS_INCLUDES)'])
+
+AC_SUBST([DICO_MODULE_INCLUDES],[dnl
+'-I$(srcdir)\
+ $(DICO_LIB_CONFIG)\
+ -I$(top_srcdir)/include\
+ -I$(top_builddir)/include\
+ $(GRECS_INCLUDES)'])
+
# Grecs configuration system
GRECS_SETUP(grecs, [shared tests getopt git2chg sockaddr-list])
-GRECS_HOST_PROJECT_INCLUDES='-I$(top_srcdir)/gnu -I$(top_builddir)/gnu'
-GRECS_HOST_PROJECT_LDADD='$(top_builddir)/gnu/libgnu.la'
+GRECS_HOST_PROJECT_INCLUDES='$(DICO_LIB_CONFIG) -I$(top_builddir)/include'
# Tcl/tk
AC_ARG_WITH([tk],
@@ -250,8 +265,8 @@ status_gsasl=no
MU_CHECK_GSASL(0.2.5, [
AC_DEFINE(WITH_GSASL,1,[Define if GNU SASL is present])
status_gsasl=yes
- AC_SUBST(BUILD_LIBDICOSASL,'libdicosasl.a')
- AC_SUBST(LIBDICOSASL,'$(top_builddir)/lib/libdicosasl.a')])
+ AC_SUBST(LIBDICOSASL,'$(top_builddir)/xdico/libdicosasl.a')])
+AM_CONDITIONAL([COND_LIBDICOSASL],[test "$status_gsasl" = yes])
<MODULES>
@@ -295,9 +310,9 @@ AC_CONFIG_FILES([Makefile
include/Makefile
include/dico/Makefile
examples/Makefile
- utils/Makefile
gint/Makefile
- gnu/Makefile
+ xdico/gnu/Makefile
+ xdico/Makefile
lib/Makefile
dicod/Makefile
modules/Makefile
diff --git a/dico/Makefile.am b/dico/Makefile.am
index 97c28b8..ba7f9e9 100644
--- a/dico/Makefile.am
+++ b/dico/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,22 +28,17 @@ dico_SOURCES = \
shell.c
LDADD=\
- ../lib/libxdico.a\
- ../gnu/libgnu.la\
- ../lib/libextra.a\
+ ../xdico/libxdico.la\
../lib/libdico.la\
$(READLINE_LIBS)\
@LIBINTL@ @LIBICONV@\
@LIBDICOSASL@\
- @GSASL_LIBS@\
- @LIBLTDL@
+ @GSASL_LIBS@
AM_CPPFLAGS=\
-DDEFAULT_DICT_SERVER="\"$(DEFAULT_DICT_SERVER)\""\
- -I$(top_srcdir)/include\
- -I$(top_srcdir)/gnu\
- -I../gnu\
- @GRECS_INCLUDES@ @LTDLINCL@
+ -I${srcdir}\
+ @DICO_PROG_INCLUDES@
SUFFIXES=.opt .c
diff --git a/dico/autologin.c b/dico/autologin.c
index c10611e..09030a1 100644
--- a/dico/autologin.c
+++ b/dico/autologin.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/cmdline.opt b/dico/cmdline.opt
index 8d44a41..3460c07 100644
--- a/dico/cmdline.opt
+++ b/dico/cmdline.opt
@@ -1,6 +1,5 @@
/* This file is part of GNU Dico. -*- c -*-
- Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey
- Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/connect.c b/dico/connect.c
index 1344ddc..86c3850 100644
--- a/dico/connect.c
+++ b/dico/connect.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/dico-priv.h b/dico/dico-priv.h
index 09fae15..9b4e103 100644
--- a/dico/dico-priv.h
+++ b/dico/dico-priv.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/dico.c b/dico/dico.c
index 2d375b4..20c6ab3 100644
--- a/dico/dico.c
+++ b/dico/dico.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/func.c b/dico/func.c
index 8be3078..aca7b13 100644
--- a/dico/func.c
+++ b/dico/func.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/lookup.c b/dico/lookup.c
index eaf854f..e0bf0ab 100644
--- a/dico/lookup.c
+++ b/dico/lookup.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/pager.c b/dico/pager.c
index 856e99f..385236e 100644
--- a/dico/pager.c
+++ b/dico/pager.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/saslauth.c b/dico/saslauth.c
index 6052b30..e9fa79e 100644
--- a/dico/saslauth.c
+++ b/dico/saslauth.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dico/shell.c b/dico/shell.c
index 39d4cfb..6f79f08 100644
--- a/dico/shell.c
+++ b/dico/shell.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/Makefile.am b/dicod/Makefile.am
index 116ab2b..80e59d1 100644
--- a/dicod/Makefile.am
+++ b/dicod/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,18 +56,14 @@ AM_CPPFLAGS = \
-DDEFAULT_VERSION_INCLUDE_DIR=\"$(DEFAULT_VERSION_INCLUDE_DIR)\"\
-DDEFAULT_INCLUDE_DIR=\"$(DEFAULT_INCLUDE_DIR)\"\
-DDEFAULT_PREPROCESSOR="$(DEFAULT_PREPROCESSOR)"\
- -I$(top_srcdir)/include\
- -I$(top_srcdir)/gnu\
- -I../gnu\
- @GRECS_INCLUDES@ @LTDLINCL@
+ -I$(srcdir)\
+ @DICO_PROG_INCLUDES@ @LTDLINCL@
AM_YFLAGS = -dtv
AM_LFLAGS = -dvp
LDADD=\
- ../lib/libxdico.a\
- ../gnu/libgnu.la\
- ../lib/libextra.a\
+ ../xdico/libxdico.la\
../lib/libdico.la\
@LIBINTL@ @LIBICONV@\
@LIBDICOSASL@\
diff --git a/dicod/accesslog.c b/dicod/accesslog.c
index 0e6eddf..aa4d177 100644
--- a/dicod/accesslog.c
+++ b/dicod/accesslog.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/acl.c b/dicod/acl.c
index 4f8357a..2c23c87 100644
--- a/dicod/acl.c
+++ b/dicod/acl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/alias.c b/dicod/alias.c
index 2c12717..8b89d79 100644
--- a/dicod/alias.c
+++ b/dicod/alias.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/auth.c b/dicod/auth.c
index 8c8ed92..97927e5 100644
--- a/dicod/auth.c
+++ b/dicod/auth.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/capa.c b/dicod/capa.c
index af36a4a..b8a8eb7 100644
--- a/dicod/capa.c
+++ b/dicod/capa.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/ckpass.c b/dicod/ckpass.c
index aa53be6..bab8086 100644
--- a/dicod/ckpass.c
+++ b/dicod/ckpass.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/cmdline.opt b/dicod/cmdline.opt
index a7b2c57..494aa81 100644
--- a/dicod/cmdline.opt
+++ b/dicod/cmdline.opt
@@ -1,6 +1,5 @@
/* This file is part of GNU Dico. -*- c -*-
- Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey
- Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/commands.c b/dicod/commands.c
index d21ff74..a38c729 100644
--- a/dicod/commands.c
+++ b/dicod/commands.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/database.c b/dicod/database.c
index 4f12e7c..50f545d 100644
--- a/dicod/database.c
+++ b/dicod/database.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/dbtext.c b/dicod/dbtext.c
index 6ab3548..0f7c4c7 100644
--- a/dicod/dbtext.c
+++ b/dicod/dbtext.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/dicod.c b/dicod/dicod.c
index be737ed..2b0e173 100644
--- a/dicod/dicod.c
+++ b/dicod/dicod.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/dicod.h b/dicod/dicod.h
index d554e25..13303d7 100644
--- a/dicod/dicod.h
+++ b/dicod/dicod.h
@@ -1,6 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey
- Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/gsasl.c b/dicod/gsasl.c
index d296c8a..1586499 100644
--- a/dicod/gsasl.c
+++ b/dicod/gsasl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/ident.c b/dicod/ident.c
index c12fbc3..756df72 100644
--- a/dicod/ident.c
+++ b/dicod/ident.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/lang.c b/dicod/lang.c
index 062d647..a965e82 100644
--- a/dicod/lang.c
+++ b/dicod/lang.c
@@ -1,5 +1,5 @@
/* This file is part of Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/lev.c b/dicod/lev.c
index 1bb14b6..7a65583 100644
--- a/dicod/lev.c
+++ b/dicod/lev.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/lint.c b/dicod/lint.c
index 03494ee..b25c7da 100644
--- a/dicod/lint.c
+++ b/dicod/lint.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/loader.c b/dicod/loader.c
index 60289cc..cd44c25 100644
--- a/dicod/loader.c
+++ b/dicod/loader.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/main.c b/dicod/main.c
index 7eeb213..88a02e4 100644
--- a/dicod/main.c
+++ b/dicod/main.c
@@ -1,6 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey
- Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/markup.c b/dicod/markup.c
index c2cc189..419dfe3 100644
--- a/dicod/markup.c
+++ b/dicod/markup.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/mime.c b/dicod/mime.c
index c5b29d2..2a5ee8e 100644
--- a/dicod/mime.c
+++ b/dicod/mime.c
@@ -1,5 +1,5 @@
/* This file is part of Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/ostream.c b/dicod/ostream.c
index 74e90d5..1e30bb4 100644
--- a/dicod/ostream.c
+++ b/dicod/ostream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/pp-setup b/dicod/pp-setup
index 2d30c8d..343c3f7 100644
--- a/dicod/pp-setup
+++ b/dicod/pp-setup
@@ -1,6 +1,6 @@
divert(-1) dnl -*- m4 -*-
# This file is part of GNU Dico
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/regex.c b/dicod/regex.c
index 7535b82..7db7a69 100644
--- a/dicod/regex.c
+++ b/dicod/regex.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/result.c b/dicod/result.c
index e0c9b0e..1225d79 100644
--- a/dicod/result.c
+++ b/dicod/result.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/server.c b/dicod/server.c
index 7993ecd..9bdcf31 100644
--- a/dicod/server.c
+++ b/dicod/server.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/stat.c b/dicod/stat.c
index 2a55baa..e40a826 100644
--- a/dicod/stat.c
+++ b/dicod/stat.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/stratcl.c b/dicod/stratcl.c
index 88e8b89..96ab17e 100644
--- a/dicod/stratcl.c
+++ b/dicod/stratcl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/Makefile.am b/dicod/tests/Makefile.am
index 4d25271..1505a85 100644
--- a/dicod/tests/Makefile.am
+++ b/dicod/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,9 +55,7 @@ echo_la_LDFLAGS = -module -avoid-version -no-undefined
noinst_PROGRAMS=apopauth
apopauth_SOURCES=apopauth.c
apopauth_LDADD=\
- ../../lib/libxdico.a\
- ../../gnu/libgnu.la\
- ../../lib/libextra.a\
+ ../../xdico/libxdico.la\
../../lib/libdico.la\
$(READLINE_LIBS)\
@LIBINTL@ @LIBICONV@\
@@ -66,11 +64,7 @@ apopauth_LDADD=\
@LIBLTDL@
AM_CPPFLAGS = \
- -I$(top_srcdir)/include\
- -I$(top_builddir)/include\
- -I$(top_srcdir)/gnu\
- -I$(top_builddir)/gnu\
- @GRECS_INCLUDES@
+ @DICO_PROG_INCLUDES@
## ------------ ##
## Test suite. ##
diff --git a/dicod/tests/alias.at b/dicod/tests/alias.at
index ffd0c71..3c2ecf0 100644
--- a/dicod/tests/alias.at
+++ b/dicod/tests/alias.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/apop.at b/dicod/tests/apop.at
index ff13142..5a665e8 100644
--- a/dicod/tests/apop.at
+++ b/dicod/tests/apop.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/apopauth.c b/dicod/tests/apopauth.c
index 6285de0..649af4a 100644
--- a/dicod/tests/apopauth.c
+++ b/dicod/tests/apopauth.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/atlocal.in b/dicod/tests/atlocal.in
index e4b6586..6f5e2de 100644
--- a/dicod/tests/atlocal.in
+++ b/dicod/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_top_builddir@/dicod:@abs_builddir@:$PATH
diff --git a/dicod/tests/def.at b/dicod/tests/def.at
index 7d761cc..f907e15 100644
--- a/dicod/tests/def.at
+++ b/dicod/tests/def.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/descr.at b/dicod/tests/descr.at
index 76ffa78..97139a6 100644
--- a/dicod/tests/descr.at
+++ b/dicod/tests/descr.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/echo.c b/dicod/tests/echo.c
index e33eeab..937a4b9 100644
--- a/dicod/tests/echo.c
+++ b/dicod/tests/echo.c
@@ -1,5 +1,5 @@
/* An "echo" database for GNU Dico test suite.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/help00.at b/dicod/tests/help00.at
index ea9ff67..24082fb 100644
--- a/dicod/tests/help00.at
+++ b/dicod/tests/help00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/help01.at b/dicod/tests/help01.at
index 1b65baf..2a4d0dd 100644
--- a/dicod/tests/help01.at
+++ b/dicod/tests/help01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/help02.at b/dicod/tests/help02.at
index 138bb6b..141a76c 100644
--- a/dicod/tests/help02.at
+++ b/dicod/tests/help02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/help03.at b/dicod/tests/help03.at
index 1149805..751d274 100644
--- a/dicod/tests/help03.at
+++ b/dicod/tests/help03.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/info.at b/dicod/tests/info.at
index 95aa39e..770b397 100644
--- a/dicod/tests/info.at
+++ b/dicod/tests/info.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/match.at b/dicod/tests/match.at
index 83503e8..9343393 100644
--- a/dicod/tests/match.at
+++ b/dicod/tests/match.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/nodef.at b/dicod/tests/nodef.at
index d2d8b7e..a0b885a 100644
--- a/dicod/tests/nodef.at
+++ b/dicod/tests/nodef.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/nomatch.at b/dicod/tests/nomatch.at
index 60b9459..cfcfbd4 100644
--- a/dicod/tests/nomatch.at
+++ b/dicod/tests/nomatch.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/showdb.at b/dicod/tests/showdb.at
index c84140d..74923be 100644
--- a/dicod/tests/showdb.at
+++ b/dicod/tests/showdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/showstrat.at b/dicod/tests/showstrat.at
index aa0b3ff..efed769 100644
--- a/dicod/tests/showstrat.at
+++ b/dicod/tests/showstrat.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/startup.at b/dicod/tests/startup.at
index 1c68e2b..bd7577c 100644
--- a/dicod/tests/startup.at
+++ b/dicod/tests/startup.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/testsuite.at b/dicod/tests/testsuite.at
index 29f2170..137fd7e 100644
--- a/dicod/tests/testsuite.at
+++ b/dicod/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/virt01.at b/dicod/tests/virt01.at
index 6582de2..fd86cba 100644
--- a/dicod/tests/virt01.at
+++ b/dicod/tests/virt01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/virt02.at b/dicod/tests/virt02.at
index acd4fb5..bd002ef 100644
--- a/dicod/tests/virt02.at
+++ b/dicod/tests/virt02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/virt03.at b/dicod/tests/virt03.at
index 0722a02..dcd7100 100644
--- a/dicod/tests/virt03.at
+++ b/dicod/tests/virt03.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/virt04.at b/dicod/tests/virt04.at
index 540976f..1ab2870 100644
--- a/dicod/tests/virt04.at
+++ b/dicod/tests/virt04.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/vis00.at b/dicod/tests/vis00.at
index 1defb7e..b685080 100644
--- a/dicod/tests/vis00.at
+++ b/dicod/tests/vis00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/vis01.at b/dicod/tests/vis01.at
index b50188c..7ed11dc 100644
--- a/dicod/tests/vis01.at
+++ b/dicod/tests/vis01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/tests/vis02.at b/dicod/tests/vis02.at
index 00ae375..ab410fb 100644
--- a/dicod/tests/vis02.at
+++ b/dicod/tests/vis02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/dicod/virtual.c b/dicod/virtual.c
index f884ce8..5964ec5 100644
--- a/dicod/virtual.c
+++ b/dicod/virtual.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2018 Sergey Poznyakoff
+ Copyright (C) 2018-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/xidle.c b/dicod/xidle.c
index 051d23c..6310c32 100644
--- a/dicod/xidle.c
+++ b/dicod/xidle.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/dicod/xversion.c b/dicod/xversion.c
index ac20542..ed80733 100644
--- a/dicod/xversion.c
+++ b/dicod/xversion.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ffab492..3ff6452 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2008-2018 Sergey Poznyakoff
+# Copyright (C) 2008-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/doc/dico.1 b/doc/dico.1
index bad0ea7..9a46f75 100644
--- a/doc/dico.1
+++ b/doc/dico.1
@@ -1,5 +1,5 @@
.\" This file is part of GNU Dico
-.\" Copyright (C) 2014-2018 Sergey Poznyakoff
+.\" Copyright (C) 2014-2019 Sergey Poznyakoff
.\"
.\" GNU Dico is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
diff --git a/doc/dico.texi b/doc/dico.texi
index a1d92fb..046b573 100644
--- a/doc/dico.texi
+++ b/doc/dico.texi
@@ -39,7 +39,7 @@ Published by the Free Software Foundation,
51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
-Copyright @copyright{} 2008-2018 Sergey Poznyakoff
+Copyright @copyright{} 2008-2019 Sergey Poznyakoff
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/doc/dicod.8in b/doc/dicod.8in
index 72ed6b9..fef4ff9 100644
--- a/doc/dicod.8in
+++ b/doc/dicod.8in
@@ -1,5 +1,5 @@
.\" This file is part of GNU Dico -*- nroff -*-
-.\" Copyright (C) 2014-2018 Sergey Poznyakoff
+.\" Copyright (C) 2014-2019 Sergey Poznyakoff
.\"
.\" GNU Dico is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
diff --git a/doc/dicod.conf.5in b/doc/dicod.conf.5in
index 1d2506a..fea44fe 100644
--- a/doc/dicod.conf.5in
+++ b/doc/dicod.conf.5in
@@ -1,5 +1,5 @@
.\" This file is part of GNU Dico
-.\" Copyright (C) 2014-2018 Sergey Poznyakoff
+.\" Copyright (C) 2014-2019 Sergey Poznyakoff
.\"
.\" GNU Dico is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
diff --git a/doc/html.init b/doc/html.init
index 4f1d26b..94b9b2e 100644
--- a/doc/html.init
+++ b/doc/html.init
@@ -1,5 +1,5 @@
# Texi2any configuration for Dico documentation. -*- perl -*-
-# Copyright (C) 2009-2018 Sergey Poznyakoff
+# Copyright (C) 2009-2019 Sergey Poznyakoff
#
# Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/doc/proto.texi b/doc/proto.texi
index c0b8652..099a6b9 100644
--- a/doc/proto.texi
+++ b/doc/proto.texi
@@ -1,5 +1,5 @@
@c This file is part of the GNU Dico manual.
-@c Copyright (C) 2008-2018 Sergey Poznyakoff
+@c Copyright (C) 2008-2019 Sergey Poznyakoff
@c This file is distributed under GFDL 1.1 or any later version
@c published by the Free Software Foundation.
This appendix describes commands understood by Dico dictionary
diff --git a/doc/strat.texi b/doc/strat.texi
index ea48602..c8c9a2f 100644
--- a/doc/strat.texi
+++ b/doc/strat.texi
@@ -1,5 +1,5 @@
@c This file is part of the GNU Dico manual.
-@c Copyright (C) 2012-2018 Sergey Poznyakoff
+@c Copyright (C) 2012-2019 Sergey Poznyakoff
@c This file is distributed under GFDL 1.1 or any later version
@c published by the Free Software Foundation.
This appendix summarizes search strategies available for use in Dico
diff --git a/examples/Makefile.am b/examples/Makefile.am
index a7c5cc5..ef268d7 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2008-2018 Sergey Poznyakoff
+# Copyright (C) 2008-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/examples/glossary.scm b/examples/glossary.scm
index 307a0a5..72732f4 100644
--- a/examples/glossary.scm
+++ b/examples/glossary.scm
@@ -1,5 +1,5 @@
;;;; This file is part of GNU Dico
-;;;; Copyright (C) 2008-2018 Sergey Poznyakoff
+;;;; Copyright (C) 2008-2019 Sergey Poznyakoff
;;;;
;;;; GNU Dico is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
diff --git a/examples/listdict.scm b/examples/listdict.scm
index 929a416..9913c2d 100644
--- a/examples/listdict.scm
+++ b/examples/listdict.scm
@@ -1,5 +1,5 @@
;;;; This file is part of GNU Dico.
-;;;; Copyright (C) 2008-2018 Sergey Poznyakoff
+;;;; Copyright (C) 2008-2019 Sergey Poznyakoff
;;;;
;;;; GNU Dico is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
diff --git a/examples/textdict.py b/examples/textdict.py
index b15773a..ea04ad5 100644
--- a/examples/textdict.py
+++ b/examples/textdict.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# Copyright (C) 2008-2018 Sergey Poznyakoff
+# Copyright (C) 2008-2019 Sergey Poznyakoff
# Copyright (C) 2008, 2012 Wojciech Polak
#
# GNU Dico is free software; you can redistribute it and/or modify
diff --git a/gnulib b/gnulib
-Subproject fd9f1acededd74f8cd095e657528aa8fad18353
+Subproject 35e462817a08e484b4cddbb9ef25019f6910fc5
diff --git a/gnulibinit.conf b/gnulibinit.conf
deleted file mode 100644
index 81075dd..0000000
--- a/gnulibinit.conf
+++ b/dev/null
@@ -1,74 +0,0 @@
-# Bootstrap configuration for Dico. -*- shell-script -*-
-# Copyright (C) 2008, 2010, 2012, 2014, 2017 Sergey Poznyakoff
-#
-# Dico 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 3, or (at your option)
-# any later version.
-#
-# Dico 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 Dico. If not, see <http://www.gnu.org/licenses/>.
-
-source_base=gnu
-gnulib_name=libgnu
-gnulib_mk=Makefile.am
-
-MODAVOID="xalloc-die openat-die"
-
-if [ -n "$MODAVOID" ]; then
- gnulib_tool_option_extras="`echo $MODAVOID | sed 's/\([^ ][^ ]*\)/--avoid &/g'`"
-fi
-
-# gnulib modules used by this package.
-gnulib_modules=`grep '^[^#]' gnulib.modules`
-
-## I18N
-NLS_MARKERS="\
- asprintf:2\
- vasprintf:2\
- config_error:3\
- config_warning:3\
- dico_log:3\
- dico_die:4"
-
-# Additional xgettext options to use. Use "\\\newline" to break lines.
-if [ -n "$NLS_MARKERS" ]; then
- XGETTEXT_OPTIONS="$XGETTEXT_OPTIONS "`echo $NLS_MARKERS | tr ' ' '\n' | sed 's/.*/ --flag=&:pass-c-format\\\\\\\\\\\\/'`"
-"
-fi
-
-# Bug address
-extract_bug_address='
- /^AC-INIT-BUG-ADDRESS/{
- s/[][]//g
- s/.*=//p
- }
-'
-
-COPYRIGHT_HOLDER="Sergey Poznyakoff"
-MSGID_BUGS_ADDRESS=`echo 'changequote([,])' | m4 -D'AC_INIT=AC-INIT-BUG-ADDRESS=$3' - configure.ac | sed -n "$extract_bug_address"`
-if test -z "$MSGID_BUGS_ADDRESS"; then
- MSGID_BUGS_ADDRESS="bug-${package}@gnu.org.ua"
-fi
-
-# Read local configuration file
-if [ -r .bootstrap ]; then
- echo "$0: Reading configuration file .bootstrap"
- eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*"
-fi
-
-test -d $source_base || mkdir $source_base
-
-git submodule init || exit $?
-git submodule update || exit $?
-
-cat > ChangeLog <<EOT
-This file is a placeholder. It will be replaced with the actual ChangeLog
-by make dist. Run make ChangeLog if you wish to create it earlier.
-EOT
-
diff --git a/include/.gitignore b/include/.gitignore
index f03dd4d..ff19506 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -1 +1,3 @@
gettext.h
+/prog
+/lib
diff --git a/include/Makefile.am b/include/Makefile.am
index 560054f..ca61d11 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,6 +26,4 @@ pkginclude_HEADERS = dico.h
SUBDIRS = dico
-#pkgdata_DATA = gjdict.xbm
-#EXTRA_DIST = gjdict.xbm
diff --git a/include/appi18n.h b/include/appi18n.h
index 7c5b926..6bd243e 100644
--- a/include/appi18n.h
+++ b/include/appi18n.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico.h b/include/dico.h
index 50b393b..4032ce7 100644
--- a/include/dico.h
+++ b/include/dico.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/Makefile.am b/include/dico/Makefile.am
index c444956..37b3b22 100644
--- a/include/dico/Makefile.am
+++ b/include/dico/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2008-2018 Sergey Poznyakoff
+# Copyright (C) 2008-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/include/dico/assoc.h b/include/dico/assoc.h
index a0bc71f..7883d96 100644
--- a/include/dico/assoc.h
+++ b/include/dico/assoc.h
@@ -1,5 +1,5 @@
/* This file is part of Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/diag.h b/include/dico/diag.h
index e5091ee..b5969bb 100644
--- a/include/dico/diag.h
+++ b/include/dico/diag.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/filter.h b/include/dico/filter.h
index 832ba8e..7ed964a 100644
--- a/include/dico/filter.h
+++ b/include/dico/filter.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/list.h b/include/dico/list.h
index 8b8b938..2ae1968 100644
--- a/include/dico/list.h
+++ b/include/dico/list.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/markup.h b/include/dico/markup.h
index 8a84f28..17b0c82 100644
--- a/include/dico/markup.h
+++ b/include/dico/markup.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/parseopt.h b/include/dico/parseopt.h
index aa54587..930bbca 100644
--- a/include/dico/parseopt.h
+++ b/include/dico/parseopt.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/strat.h b/include/dico/strat.h
index 63e574d..ac1ed5a 100644
--- a/include/dico/strat.h
+++ b/include/dico/strat.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/stream.h b/include/dico/stream.h
index 8c4132a..95d5d1d 100644
--- a/include/dico/stream.h
+++ b/include/dico/stream.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/tokenize.h b/include/dico/tokenize.h
index 4e28135..2d782d0 100644
--- a/include/dico/tokenize.h
+++ b/include/dico/tokenize.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/types.h b/include/dico/types.h
index e007745..d38aec7 100644
--- a/include/dico/types.h
+++ b/include/dico/types.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/udb.h b/include/dico/udb.h
index 3f596db..64a3e19 100644
--- a/include/dico/udb.h
+++ b/include/dico/udb.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/url.h b/include/dico/url.h
index 9039df8..c6929d0 100644
--- a/include/dico/url.h
+++ b/include/dico/url.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/utf8.h b/include/dico/utf8.h
index 807f6b7..a828cc5 100644
--- a/include/dico/utf8.h
+++ b/include/dico/utf8.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/util.h b/include/dico/util.h
index d1bd731..491d7d3 100644
--- a/include/dico/util.h
+++ b/include/dico/util.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/dico/xlat.h b/include/dico/xlat.h
index 2117485..9e3f9b9 100644
--- a/include/dico/xlat.h
+++ b/include/dico/xlat.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/gjdict.xbm b/include/gjdict.xbm
deleted file mode 100644
index 7ca5c51..0000000
--- a/include/gjdict.xbm
+++ b/dev/null
@@ -1,28 +0,0 @@
-#define gjdict_width 48
-#define gjdict_height 48
-static unsigned char gjdict_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x00, 0x00,
- 0x00, 0x00, 0x83, 0x61, 0x00, 0x00, 0x00, 0x20, 0x86, 0x21, 0x00, 0x00,
- 0x00, 0x20, 0x06, 0x10, 0x03, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0x00,
- 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0x00, 0x18, 0x00, 0x00, 0x01, 0x00,
- 0x00, 0x18, 0xff, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00,
- 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00,
- 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x33, 0x33, 0x02, 0x00, 0x00, 0x00, 0x38, 0x03, 0x02, 0x00,
- 0x00, 0x00, 0x1c, 0x03, 0x02, 0x00, 0x00, 0x00, 0x0e, 0x03, 0x06, 0x00,
- 0x00, 0x80, 0x03, 0xff, 0x07, 0x00, 0x00, 0x78, 0x00, 0xfe, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
diff --git a/include/gsaslstr.h b/include/gsaslstr.h
index 2d4cbca..ecee38f 100644
--- a/include/gsaslstr.h
+++ b/include/gsaslstr.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/libi18n.h b/include/libi18n.h
index 910f852..dbf8fe8 100644
--- a/include/libi18n.h
+++ b/include/libi18n.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/testsuite.inc b/include/testsuite.inc
index e8687e9..9df9e31 100644
--- a/include/testsuite.inc
+++ b/include/testsuite.inc
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/include/xdico.h b/include/xdico.h
index 2417b77..fafef0b 100644
--- a/include/xdico.h
+++ b/include/xdico.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 03eee1c..81e8b00 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,13 +16,14 @@
SUBDIRS = . tests
-AM_CPPFLAGS = -I${top_srcdir}/include -I${top_srcdir}/gnu -I../gnu
+AM_CPPFLAGS = \
+ @DICO_LIB_CONFIG@\
+ -I${top_srcdir}/include\
+ -I${top_builddir}/include\
+ -DLOCALEDIR=\"$(localedir)\"
lib_LTLIBRARIES = libdico.la
-noinst_LIBRARIES=libxdico.a libextra.a @BUILD_LIBDICOSASL@
-EXTRA_LIBRARIES=libdicosasl.a
-
libdico_la_SOURCES=\
argcv.c\
assoc.c\
@@ -62,25 +63,3 @@ libdico_la_SOURCES=\
libdico_la_LDFLAGS = -version-info 2:0:0
libdico_la_LIBADD = ../grecs/src/libgrecs.la
-libxdico_a_SOURCES=\
- appi18n.c\
- iputil.c\
- jiscvt.c\
- timer.c\
- userprivs.c\
- xhostname.c\
- xscript.c\
- xstream.c\
- xtkn.c\
- xutil.c
-
-libextra_a_SOURCES=xalloc-die.c
-
-libdicosasl_a_SOURCES=\
- gsaslstr.c
-
-noinst_HEADERS=\
- cursor.xbm\
- bushu.h
-
-EXTRA_DIST=bushu.dat
diff --git a/lib/argcv.c b/lib/argcv.c
index cf972d6..bd2493b 100644
--- a/lib/argcv.c
+++ b/lib/argcv.c
@@ -1,6 +1,5 @@
/* argcv.c - simple functions for parsing input based on whitespace
- Copyright (C) 1999-2001, 2003-2006, 2008, 2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1999-2019 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,10 +16,7 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
+#include <config.h>
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
diff --git a/lib/assoc.c b/lib/assoc.c
index dbff113..644ae2e 100644
--- a/lib/assoc.c
+++ b/lib/assoc.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/base64.c b/lib/base64.c
index 7acc3ff..747122e 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -1,6 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 1999-2001, 2004-2005, 2007-2008, 2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1999-2019 Free Software Foundation, Inc.
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <errno.h>
diff --git a/lib/bsearch.c b/lib/bsearch.c
index ad1691e..bfa5dfb 100644
--- a/lib/bsearch.c
+++ b/lib/bsearch.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2018 Sergey Poznyakoff
+ Copyright (C) 2018-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "dico.h"
/* Searches a sorted array of NELEM objects, the initial element being
diff --git a/lib/bushu.dat b/lib/bushu.dat
deleted file mode 100644
index 4f2da3d..0000000
--- a/lib/bushu.dat
+++ b/dev/null
@@ -1,286 +0,0 @@
-# This file is part of GNU Dico.
-# Copyright (C) 1998-2018 Sergey Poznyakoff
-#
-# GNU Dico 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 3, or (at your option)
-# any later version.
-#
-# GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>.
-
-# This file describes standard kanji radicals (bushu)
-# Syntax is:
-# i. Any line beginning with a # is a comment.
-# ii. =<number> on the line by themselves mean the radicals below have
-# <number> strokes.
-# iii. <number> - radical number; char in bushu font has the same number.
-# iv. <number> <number> - radical number with corresponding char number.
-
-=1
-1
-2
-3
-4
-5
-6
-=2
-7
-8
-9
-10 245
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-=3
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-64
-85
-94
-140
-162
-163
-170
-=4
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-96
-113
-114
-125
-130
-140
-162
-=5
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-71
-81
-85
-92
-122
-145
-=6
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-=7
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-163
-164
-165
-166
-131
-134
-136
-199
-=8
-167
-168
-169
-170
-171
-172
-173
-174
-175
-184
-210
-=9
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-=10
-187
-188
-189
-190
-191
-192
-193
-194
-178
-212
-=11
-195
-196
-197
-198
-199
-200
-213
-=12
-201
-202
-203
-204
-211
-=13
-205
-206
-207
-208
-=14
-209
-210
-=15
-211
-=16
-212
-213
-=17
-214
-
diff --git a/lib/bushu.h b/lib/bushu.h
deleted file mode 100644
index 02b1957..0000000
--- a/lib/bushu.h
+++ b/dev/null
@@ -1,28 +0,0 @@
-/* $Id$
- */
-
-#define BushuError -1
-#define BushuStrict 0
-#define BushuAbsolute 1
-#define BushuFuzzy 2
-
-typedef struct {
- int type;
- int bushu;
- int numstrokes;
- int off;
-} TempBushu;
-
-int parse_bushu(char *, TempBushu *);
-int decode_bushu(Matchdir, TempBushu *, Bushu *);
-void format_bushu(char *, int /* radical */ , int /* strokes */);
-
-extern int bushu_num[];
-extern int bushu_stroke[];
-extern int bushu_var_stroke[];
-extern int bushu_index[];
-extern int bushu_count[];
-extern char bushu_string[][2];
-extern int bushu_last;
-extern int max_bushu_strokes;
-extern int max_bushu_count;
diff --git a/lib/crlfstr.c b/lib/crlfstr.c
index 1946296..eb8f9bf 100644
--- a/lib/crlfstr.c
+++ b/lib/crlfstr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <libi18n.h>
#include <stdlib.h>
diff --git a/lib/cursor.xbm b/lib/cursor.xbm
deleted file mode 100644
index e37007f..0000000
--- a/lib/cursor.xbm
+++ b/dev/null
@@ -1,6 +0,0 @@
-#define cursor_width 16
-#define cursor_height 16
-static char cursor_bits[] = {
- 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff,
- 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff,
- 0xfe, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0x00, 0x00};
diff --git a/lib/dbgstream.c b/lib/dbgstream.c
index 50ca515..cc563b3 100644
--- a/lib/dbgstream.c
+++ b/lib/dbgstream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@
/* Implementation of a "debug stream", a write-only stream useful
for printing debugging diagnostics. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/diag.c b/lib/diag.c
index 6195bae..f8614ff 100644
--- a/lib/diag.c
+++ b/lib/diag.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/lib/fdiostr.c b/lib/fdiostr.c
index 0fc89e5..bec7465 100644
--- a/lib/fdiostr.c
+++ b/lib/fdiostr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
diff --git a/lib/fdstream.c b/lib/fdstream.c
index 63e44f8..10fb13c 100644
--- a/lib/fdstream.c
+++ b/lib/fdstream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/lib/fltstream.c b/lib/fltstream.c
index dc9d8ef..6348cc7 100644
--- a/lib/fltstream.c
+++ b/lib/fltstream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <errno.h>
#include <dico.h>
#include <string.h>
diff --git a/lib/header.c b/lib/header.c
index bfa2bbd..7e4c740 100644
--- a/lib/header.c
+++ b/lib/header.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/iostr.c b/lib/iostr.c
index 3f90366..419f563 100644
--- a/lib/iostr.c
+++ b/lib/iostr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <libi18n.h>
diff --git a/lib/jiscvt.c b/lib/jiscvt.c
deleted file mode 100644
index d49eba5..0000000
--- a/lib/jiscvt.c
+++ b/dev/null
@@ -1,243 +0,0 @@
-/* This file is part of GNU Dico.
- * Copyright (C) 1998-2018 Sergey Poznyakoff
- *
- * GNU Dico 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 of the License, or
- * (at your option) any later version.
- *
- * GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-
-typedef unsigned char uchar;
-
-struct cvt_tab {
- uchar in1;
- uchar in2_range[2];
- uchar out1;
- uchar out2;
-};
-
-static struct cvt_tab *tab_lookup(struct cvt_tab*, int);
-
-#define NITEMS(t) sizeof(t)/sizeof((t)[0])
-#define Escape 27
-
-struct cvt_tab shin_to_shift_tab[] = {
- { 0x21, { 0x21, 0x60 }, 0x81, 0x40 }, /* symbols, operators, musical
- notations */
- { 0x21, { 0x60, 0x7f }, 0x81, 0x80 }, /* .... */
- { 0x22, { 0x21, 0x2e }, 0x81, 0x9f },
- { 0x23, { 0x30, 0x39 }, 0x82, 0x4f },
- { 0x23, { 0x41, 0x5a }, 0x82, 0x60 }, /* Roman alphabet (caps) */
- { 0x23, { 0x61, 0x7a }, 0x82, 0x81 }, /* Roman alphabet */
- { 0x24, { 0x21, 0x73 }, 0x82, 0x9f }, /* Hiragana */
- { 0x25, { 0x21, 0x60 }, 0x83, 0x40 }, /* Katakana */
- { 0x25, { 0x60, 0x77 }, 0x83, 0x80 },
- { 0x26, { 0x21, 0x38 }, 0x83, 0x9f }, /* Greek alphabet (caps) */
- { 0x26, { 0x41, 0x58 }, 0x81, 0xbf }, /* Greek alphabet */
- { 0x27, { 0x21, 0x60 }, 0x84, 0x40 }, /* Russian alphabet */
- { 0x27, { 0x60, 0x72 }, 0x84, 0x80 },
- { 0x28, { 0x21, 0x40 }, 0x84, 0x9f }, /* line graphic characters */
- /* Kanji */
- { 0x30, { 0x21, 0x7e }, 0x88, 0x9F },
- { 0x31, { 0x21, 0x60 }, 0x89, 0x40 },
- { 0x31, { 0x60, 0x7e }, 0x89, 0x80 },
- { 0x32, { 0x21, 0x7e }, 0x89, 0x9f },
- { 0x33, { 0x21, 0x60 }, 0x8a, 0x40 },
- { 0x33, { 0x60, 0x7e }, 0x8a, 0x80 },
- { 0x34, { 0x21, 0x7e }, 0x8a, 0x9f },
- { 0x35, { 0x21, 0x60 }, 0x8b, 0x40 },
- { 0x35, { 0x60, 0x7e }, 0x8b, 0x80 },
- { 0x36, { 0x21, 0x7e }, 0x8b, 0x9f },
- { 0x37, { 0x21, 0x60 }, 0x8c, 0x40 },
- { 0x37, { 0x60, 0x7e }, 0x8c, 0x80 },
- { 0x38, { 0x21, 0x7e }, 0x8c, 0x9f },
- { 0x39, { 0x21, 0x60 }, 0x8d, 0x40 },
- { 0x39, { 0x60, 0x7e }, 0x8d, 0x80 },
- { 0x3a, { 0x21, 0x7e }, 0x8d, 0x9f },
- { 0x3b, { 0x21, 0x60 }, 0x8e, 0x40 },
- { 0x3b, { 0x60, 0x7e }, 0x8e, 0x80 },
- { 0x3c, { 0x21, 0x7e }, 0x8e, 0x9f },
- { 0x3d, { 0x21, 0x60 }, 0x8f, 0x40 },
- { 0x3d, { 0x60, 0x7e }, 0x8f, 0x80 },
- { 0x3e, { 0x21, 0x7e }, 0x8f, 0x9f },
- { 0x3f, { 0x21, 0x60 }, 0x90, 0x40 },
- { 0x3f, { 0x60, 0x7e }, 0x90, 0x80 },
- { 0x40, { 0x21, 0x7e }, 0x90, 0x9f },
- { 0x41, { 0x21, 0x60 }, 0x91, 0x40 },
- { 0x41, { 0x60, 0x7e }, 0x91, 0x80 },
- { 0x42, { 0x21, 0x7e }, 0x91, 0x9f },
- { 0x43, { 0x21, 0x60 }, 0x92, 0x40 },
- { 0x43, { 0x60, 0x7e }, 0x92, 0x80 },
- { 0x44, { 0x21, 0x7e }, 0x92, 0x9f },
- { 0x45, { 0x21, 0x60 }, 0x93, 0x40 },
- { 0x45, { 0x60, 0x7e }, 0x93, 0x80 },
- { 0x46, { 0x21, 0x7e }, 0x93, 0x9f },
- { 0x47, { 0x21, 0x60 }, 0x94, 0x40 },
- { 0x47, { 0x60, 0x7e }, 0x94, 0x80 },
- { 0x48, { 0x21, 0x7e }, 0x94, 0x9f },
- { 0x49, { 0x21, 0x60 }, 0x95, 0x40 },
- { 0x49, { 0x60, 0x7e }, 0x95, 0x80 },
- { 0x4a, { 0x21, 0x7e }, 0x95, 0x9f },
- { 0x4b, { 0x21, 0x60 }, 0x96, 0x40 },
- { 0x4b, { 0x60, 0x7e }, 0x96, 0x80 },
- { 0x4c, { 0x21, 0x7e }, 0x96, 0x9f },
- { 0x4d, { 0x21, 0x60 }, 0x97, 0x40 },
- { 0x4d, { 0x60, 0x7e }, 0x97, 0x80 },
- { 0x4e, { 0x21, 0x7e }, 0x97, 0x9f },
- { 0x4f, { 0x21, 0x60 }, 0x98, 0x40 },
- { 0x4f, { 0x60, 0x7e }, 0x98, 0x80 },
- { 0 }
-};
-
-struct cvt_tab shift_to_shin_tab[] = {
- { 0x81, { 0x40, 0x7f }, 0x21, 0x21 }, /* symbols, operators, musical
- notations */
- { 0x81, { 0x80, 0x9e }, 0x21, 0x60 },
- { 0x81, { 0x9f, 0xac }, 0x22, 0x21 },
- { 0x82, { 0x4f, 0x58 }, 0x23, 0x30 },
- { 0x82, { 0x60, 0x79 }, 0x23, 0x41 }, /* Roman alphabet (caps) */
- { 0x82, { 0x81, 0x9a }, 0x23, 0x61 }, /* Roman alphabet */
- { 0x82, { 0x9f, 0xf1 }, 0x24, 0x21 }, /* Hiragana */
- { 0x83, { 0x40, 0x7f }, 0x25, 0x21 }, /* Katakana */
- { 0x83, { 0x80, 0x96 }, 0x25, 0x60 },
- { 0x83, { 0x9f, 0xb6 }, 0x26, 0x21 }, /* Greek alphabet (caps) */
- { 0x81, { 0xbf, 0xd6 }, 0x26, 0x41 }, /* Greek alphabet */
- { 0x84, { 0x40, 0x7f }, 0x27, 0x21 }, /* Russian alphabet */
- { 0x84, { 0x80, 0x91 }, 0x27, 0x60 },
- { 0x84, { 0x9f, 0xbe }, 0x28, 0x21 }, /* line graphic characters */
- /* Kanji: */
- { 0x88, { 0x9F, 0xFC }, 0x30, 0x21 },
- { 0x89, { 0x40, 0x7f }, 0x31, 0x21 },
- { 0x89, { 0x80, 0x9e }, 0x31, 0x60 },
- { 0x89, { 0x9f, 0xfc }, 0x32, 0x21 },
- { 0x8a, { 0x40, 0x7f }, 0x33, 0x21 },
- { 0x8a, { 0x80, 0x9e }, 0x33, 0x60 },
- { 0x8a, { 0x9f, 0xfc }, 0x34, 0x21 },
- { 0x8b, { 0x40, 0x7f }, 0x35, 0x21 },
- { 0x8b, { 0x80, 0x9e }, 0x35, 0x60 },
- { 0x8b, { 0x9f, 0xfc }, 0x36, 0x21 },
- { 0x8c, { 0x40, 0x7f }, 0x37, 0x21 },
- { 0x8c, { 0x80, 0x9e }, 0x37, 0x60 },
- { 0x8c, { 0x9f, 0xfc }, 0x38, 0x21 },
- { 0x8d, { 0x40, 0x7f }, 0x39, 0x21 },
- { 0x8d, { 0x80, 0x9e }, 0x39, 0x60 },
- { 0x8d, { 0x9f, 0xfc }, 0x3a, 0x21 },
- { 0x8e, { 0x40, 0x7f }, 0x3b, 0x21 },
- { 0x8e, { 0x80, 0x9e }, 0x3b, 0x60 },
- { 0x8e, { 0x9f, 0xfc }, 0x3c, 0x21 },
- { 0x8f, { 0x40, 0x7f }, 0x3d, 0x21 },
- { 0x8f, { 0x80, 0x9e }, 0x3d, 0x60 },
- { 0x8f, { 0x9f, 0xfc }, 0x3e, 0x21 },
- { 0x90, { 0x40, 0x7f }, 0x3f, 0x21 },
- { 0x90, { 0x80, 0x9e }, 0x3f, 0x60 },
- { 0x90, { 0x9f, 0xfc }, 0x40, 0x21 },
- { 0x91, { 0x40, 0x7f }, 0x41, 0x21 },
- { 0x91, { 0x80, 0x9e }, 0x41, 0x60 },
- { 0x91, { 0x9f, 0xfc }, 0x42, 0x21 },
- { 0x92, { 0x40, 0x7f }, 0x43, 0x21 },
- { 0x92, { 0x80, 0x9e }, 0x43, 0x60 },
- { 0x92, { 0x9f, 0xfc }, 0x44, 0x21 },
- { 0x93, { 0x40, 0x7f }, 0x45, 0x21 },
- { 0x93, { 0x80, 0x9e }, 0x45, 0x60 },
- { 0x93, { 0x9f, 0xfc }, 0x46, 0x21 },
- { 0x94, { 0x40, 0x7f }, 0x47, 0x21 },
- { 0x94, { 0x80, 0x9e }, 0x47, 0x60 },
- { 0x94, { 0x9f, 0xfc }, 0x48, 0x21 },
- { 0x95, { 0x40, 0x7f }, 0x49, 0x21 },
- { 0x95, { 0x80, 0x9e }, 0x49, 0x60 },
- { 0x95, { 0x9f, 0xfc }, 0x4a, 0x21 },
- { 0x96, { 0x40, 0x7f }, 0x4b, 0x21 },
- { 0x96, { 0x80, 0x9e }, 0x4b, 0x60 },
- { 0x96, { 0x9f, 0xfc }, 0x4c, 0x21 },
- { 0x97, { 0x40, 0x7f }, 0x4d, 0x21 },
- { 0x97, { 0x80, 0x9e }, 0x4d, 0x60 },
- { 0x97, { 0x9f, 0xfc }, 0x4e, 0x21 },
- { 0x98, { 0x40, 0x7f }, 0x4f, 0x21 },
- { 0x98, { 0x80, 0x9e }, 0x4f, 0x60 },
- { 0 }
-};
-
-
-struct cvt_tab *
-tab_lookup(struct cvt_tab *tab, int c)
-{
- for (; tab->in1 > 0; tab++)
- if (tab->in1 == c)
- return tab;
- return NULL;
-}
-
-int
-convert(uchar *text, int len, struct cvt_tab *tab)
-{
- int i, c, c2;
- struct cvt_tab *t;
-
- for (i = 0; i < len; i+=2, text+=2) {
- c = text[0];
- if ((t = tab_lookup(tab, c))) {
- c2 = text[1];
- for ( ; t->in1 == c; t++) {
- if (t->in2_range[0] <= c2 && c2 <= t->in2_range[1]) {
- break;
- }
- }
- if (t->in1 == c) {
- c2 -= t->in2_range[0] - t->out2;
- text[0] = t->out1;
- text[1] = c2;
- } else {
- break;
- }
- } else {
- break;
- }
- }
- return i;
-}
-
-
-int
-shift_to_shin(char *text, int len)
-{
- return convert((uchar*) text, len, shift_to_shin_tab);
-}
-
-int
-euc_to_shin(uchar *text, int len)
-{
- int i;
-
- for (i = 0; i < len; i++) {
- *text++ -= 0x80;
- }
- return len;
-}
-
-int
-shin_to_euc(uchar *text, int len)
-{
- int i;
-
- for (i = 0; i < len; i++) {
- *text++ += 0x80;
- }
- return len;
-}
-
-
-
diff --git a/lib/key.c b/lib/key.c
index 66269ac..0f768e1 100644
--- a/lib/key.c
+++ b/lib/key.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <errno.h>
#include <stdlib.h>
diff --git a/lib/levenshtein.c b/lib/levenshtein.c
index b1087f6..745ea01 100644
--- a/lib/levenshtein.c
+++ b/lib/levenshtein.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2007-2018 Sergey Poznyakoff
+ Copyright (C) 2007-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
diff --git a/lib/libi18n.c b/lib/libi18n.c
index e44a599..ad5d742 100644
--- a/lib/libi18n.c
+++ b/lib/libi18n.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,11 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <gettext.h>
-#include <configmake.h>
#include <locale.h>
static int libdico_initialized;
diff --git a/lib/linetrimstr.c b/lib/linetrimstr.c
index 7cd100e..4c57545 100644
--- a/lib/linetrimstr.c
+++ b/lib/linetrimstr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <libi18n.h>
#include <stdlib.h>
diff --git a/lib/list.c b/lib/list.c
index 46a9de4..de977a3 100644
--- a/lib/list.c
+++ b/lib/list.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <sys/types.h>
#include <stdlib.h>
diff --git a/lib/logstream.c b/lib/logstream.c
index de8de98..a1ab381 100644
--- a/lib/logstream.c
+++ b/lib/logstream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/mapstream.c b/lib/mapstream.c
index 60c5392..2ebb020 100644
--- a/lib/mapstream.c
+++ b/lib/mapstream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <errno.h>
diff --git a/lib/markup.c b/lib/markup.c
index 714a74f..f88e620 100644
--- a/lib/markup.c
+++ b/lib/markup.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/mergesort.c b/lib/mergesort.c
index 6c35283..de63350 100644
--- a/lib/mergesort.c
+++ b/lib/mergesort.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2018 Sergey Poznyakoff
+ Copyright (C) 2018-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,13 +14,11 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "dico.h"
#include <string.h>
-static void *mergesort(void *a, void *b, size_t nmemb, size_t size,
+static void *dico_mergesort(void *a, void *b, size_t nmemb, size_t size,
int (*comp)(const void *, const void *, void *),
void *closure);
static void merge(void *source, void *work, size_t size,
@@ -38,7 +36,7 @@ dico_sort(void *base, size_t nmemb, size_t size,
tmp = calloc(nmemb, size);
if (!tmp)
return -1;
- res = mergesort(base, tmp, nmemb, size, comp, closure);
+ res = dico_mergesort(base, tmp, nmemb, size, comp, closure);
if (res != base)
memcpy(base, res, nmemb * size);
free(tmp);
@@ -52,9 +50,9 @@ min(size_t a, size_t b)
}
static void *
-mergesort(void *a, void *b, size_t nmemb, size_t size,
- int (*comp)(const void *, const void *, void *),
- void *closure)
+dico_mergesort(void *a, void *b, size_t nmemb, size_t size,
+ int (*comp)(const void *, const void *, void *),
+ void *closure)
{
size_t width;
diff --git a/lib/parseopt.c b/lib/parseopt.c
index 9dd1065..84a9738 100644
--- a/lib/parseopt.c
+++ b/lib/parseopt.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <libi18n.h>
diff --git a/lib/qp.c b/lib/qp.c
index ebff210..c2be1bb 100644
--- a/lib/qp.c
+++ b/lib/qp.c
@@ -1,6 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 1999-2001, 2004-2005, 2007-2008, 2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1999-2019 Free Software Foundation, Inc.
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
diff --git a/lib/soundex.c b/lib/soundex.c
index 4bd743d..dadaab3 100644
--- a/lib/soundex.c
+++ b/lib/soundex.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2007-2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2007-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <ctype.h>
diff --git a/lib/strat.c b/lib/strat.c
index ad14fd9..65dc092 100644
--- a/lib/strat.c
+++ b/lib/strat.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/stream.c b/lib/stream.c
index 6498f87..f05ab15 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,14 +14,11 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
-#include <size_max.h>
#define _STR_DIRTY 0x1000 /* Buffer dirty */
#define _STR_ERR 0x2000 /* Permanent error state */
@@ -572,26 +569,19 @@ dico_stream_getdelim(dico_stream_t stream, char **pbuf, size_t *psize,
/* Make enough space for len+1 (for final NUL) bytes. */
if (cur_len + 1 >= n) {
- size_t needed_max =
- SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
- size_t needed = 2 * n + 1; /* Be generous. */
char *new_lineptr;
-
- if (needed_max < needed)
- needed = needed_max;
- if (cur_len + 1 >= needed) {
+
+ if ((size_t) -1 / 3 * 2 <= n) {
rc = EOVERFLOW;
break;
}
-
- new_lineptr = realloc(lineptr, needed);
+ n += (n + 1) / 2;
+ new_lineptr = realloc(lineptr, n);
if (new_lineptr == NULL) {
rc = ENOMEM;
break;
}
-
lineptr = new_lineptr;
- n = needed;
}
lineptr[cur_len] = c;
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 543144c..94a32e2 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
## Non-installable programs
## -------------------------- ##
-AM_CPPFLAGS = -I${top_srcdir}/include @GRECS_INCLUDES@
+AM_CPPFLAGS = @DICO_LIB_CONFIG@ -I${top_srcdir}/include -I${top_builddir}/include @GRECS_INCLUDES@
noinst_PROGRAMS = \
levtest\
linetrim\
diff --git a/lib/tests/atlocal.in b/lib/tests/atlocal.in
index 2a1c39f..0cd1a32 100644
--- a/lib/tests/atlocal.in
+++ b/lib/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:$top_srcdir:$srcdir:$PATH
diff --git a/lib/tests/crlf00.at b/lib/tests/crlf00.at
index faf7bed..67c0068 100644
--- a/lib/tests/crlf00.at
+++ b/lib/tests/crlf00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/crlf01.at b/lib/tests/crlf01.at
index 03e41e5..4b7b407 100644
--- a/lib/tests/crlf01.at
+++ b/lib/tests/crlf01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/crlf02.at b/lib/tests/crlf02.at
index 58dcf7a..9f41494 100644
--- a/lib/tests/crlf02.at
+++ b/lib/tests/crlf02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/crlf03.at b/lib/tests/crlf03.at
index e51a886..7c2d10f 100644
--- a/lib/tests/crlf03.at
+++ b/lib/tests/crlf03.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/crlf04.at b/lib/tests/crlf04.at
index b3dde03..e744e90 100644
--- a/lib/tests/crlf04.at
+++ b/lib/tests/crlf04.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/crlf05.at b/lib/tests/crlf05.at
index bc29f41..bf415c0 100644
--- a/lib/tests/crlf05.at
+++ b/lib/tests/crlf05.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/crlftool.c b/lib/tests/crlftool.c
index 26a366b..de7a71f 100644
--- a/lib/tests/crlftool.c
+++ b/lib/tests/crlftool.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/tests/dlev00.at b/lib/tests/dlev00.at
index 0708c7e..4c3403e 100644
--- a/lib/tests/dlev00.at
+++ b/lib/tests/dlev00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/dlev01.at b/lib/tests/dlev01.at
index 0932a8f..cb7a7cb 100644
--- a/lib/tests/dlev01.at
+++ b/lib/tests/dlev01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/itrsh.c b/lib/tests/itrsh.c
index 5767bc9..6d1b291 100644
--- a/lib/tests/itrsh.c
+++ b/lib/tests/itrsh.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
#include <getopt.h>
diff --git a/lib/tests/itrsh.h b/lib/tests/itrsh.h
index fd8a48a..1b726e6 100644
--- a/lib/tests/itrsh.h
+++ b/lib/tests/itrsh.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/lev00.at b/lib/tests/lev00.at
index 96bca41..0af402e 100644
--- a/lib/tests/lev00.at
+++ b/lib/tests/lev00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/lev01.at b/lib/tests/lev01.at
index 4ce9327..d4d55df 100644
--- a/lib/tests/lev01.at
+++ b/lib/tests/lev01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/levtest.c b/lib/tests/levtest.c
index 51de090..2b4516b 100644
--- a/lib/tests/levtest.c
+++ b/lib/tests/levtest.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
#include <dico.h>
diff --git a/lib/tests/linetrim.c b/lib/tests/linetrim.c
index 0f2d6d0..4c1126e 100644
--- a/lib/tests/linetrim.c
+++ b/lib/tests/linetrim.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/tests/list.at b/lib/tests/list.at
index 0b2a2be..1cbe34e 100644
--- a/lib/tests/list.at
+++ b/lib/tests/list.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/listop.c b/lib/tests/listop.c
index 55c2210..665f25e 100644
--- a/lib/tests/listop.c
+++ b/lib/tests/listop.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/lib/tests/lntrim00.at b/lib/tests/lntrim00.at
index 1791549..ec3ec7f 100644
--- a/lib/tests/lntrim00.at
+++ b/lib/tests/lntrim00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/lntrim01.at b/lib/tests/lntrim01.at
index fd8a5b7..41494a0 100644
--- a/lib/tests/lntrim01.at
+++ b/lib/tests/lntrim01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/lntrim02.at b/lib/tests/lntrim02.at
index 570f17c..ff29ad7 100644
--- a/lib/tests/lntrim02.at
+++ b/lib/tests/lntrim02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/lntrim03.at b/lib/tests/lntrim03.at
index bc503cf..35b8adb 100644
--- a/lib/tests/lntrim03.at
+++ b/lib/tests/lntrim03.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/soundex.at b/lib/tests/soundex.at
index 1eee199..225d2f1 100644
--- a/lib/tests/soundex.at
+++ b/lib/tests/soundex.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/soundex.c b/lib/tests/soundex.c
index b0f1e2b..a212232 100644
--- a/lib/tests/soundex.c
+++ b/lib/tests/soundex.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2016-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <dico.h>
diff --git a/lib/tests/strcasecmp.at b/lib/tests/strcasecmp.at
index 504ec02..ccb79d5 100644
--- a/lib/tests/strcasecmp.at
+++ b/lib/tests/strcasecmp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/strlen.at b/lib/tests/strlen.at
index 4c21d0d..a3e226c 100644
--- a/lib/tests/strlen.at
+++ b/lib/tests/strlen.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/strncasecmp.at b/lib/tests/strncasecmp.at
index 4807dec..d7150a3 100644
--- a/lib/tests/strncasecmp.at
+++ b/lib/tests/strncasecmp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/testsuite.at b/lib/tests/testsuite.at
index bbbb14c..1965abd 100644
--- a/lib/tests/testsuite.at
+++ b/lib/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/tolower.at b/lib/tests/tolower.at
index 3a920f8..53961a9 100644
--- a/lib/tests/tolower.at
+++ b/lib/tests/tolower.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/toupper.at b/lib/tests/toupper.at
index e3dbac8..1c12d2e 100644
--- a/lib/tests/toupper.at
+++ b/lib/tests/toupper.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/utf8.c b/lib/tests/utf8.c
index ce6c040..9b1d9ab 100644
--- a/lib/tests/utf8.c
+++ b/lib/tests/utf8.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/tests/wcstrcasecmp.at b/lib/tests/wcstrcasecmp.at
index 9780ac7..b3e41e9 100644
--- a/lib/tests/wcstrcasecmp.at
+++ b/lib/tests/wcstrcasecmp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/wcstrchr.at b/lib/tests/wcstrchr.at
index 86908bc..1495bd5 100644
--- a/lib/tests/wcstrchr.at
+++ b/lib/tests/wcstrchr.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/wcstrcmp.at b/lib/tests/wcstrcmp.at
index e21712e..9b64bf8 100644
--- a/lib/tests/wcstrcmp.at
+++ b/lib/tests/wcstrcmp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/wcstrncasecmp.at b/lib/tests/wcstrncasecmp.at
index 0aa03a2..1bbe91d 100644
--- a/lib/tests/wcstrncasecmp.at
+++ b/lib/tests/wcstrncasecmp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/wcstrncmp.at b/lib/tests/wcstrncmp.at
index 0a6b31a..2576fd6 100644
--- a/lib/tests/wcstrncmp.at
+++ b/lib/tests/wcstrncmp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tests/wcstrstr.at b/lib/tests/wcstrstr.at
index a53c7b9..b0e36fe 100644
--- a/lib/tests/wcstrstr.at
+++ b/lib/tests/wcstrstr.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/lib/tokenize.c b/lib/tokenize.c
index 577837d..b6d65eb 100644
--- a/lib/tokenize.c
+++ b/lib/tokenize.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
diff --git a/lib/udb.c b/lib/udb.c
index c2ba9cc..f86ada5 100644
--- a/lib/udb.c
+++ b/lib/udb.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <dico/udb.h>
#include <sys/types.h>
diff --git a/lib/url.c b/lib/url.c
index 063631f..3f6c08a 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2003-2018 Sergey Poznyakoff
+ Copyright (C) 2003-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <errno.h>
diff --git a/lib/utf8.c b/lib/utf8.c
index 999bce1..a25c613 100644
--- a/lib/utf8.c
+++ b/lib/utf8.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2007-2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2007-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <limits.h>
#include <errno.h>
@@ -2101,6 +2099,8 @@ utf8_wc_strstr(const unsigned *text, const unsigned *pattern)
size_t pattern_len = utf8_wc_strlen(pattern);
size_t *nextab;
+ errno = 0;
+
/* Handle corner cases */
if (pattern_len > text_len)
return NULL;
diff --git a/lib/utf8_is_alnum.c b/lib/utf8_is_alnum.c
index d3cc6b6..6b6cec9 100644
--- a/lib/utf8_is_alnum.c
+++ b/lib/utf8_is_alnum.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "dico.h"
static const unsigned start[] = {
diff --git a/lib/utf8_is_space.c b/lib/utf8_is_space.c
index 68529a0..d641017 100644
--- a/lib/utf8_is_space.c
+++ b/lib/utf8_is_space.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "dico.h"
static const unsigned start[] = {
diff --git a/lib/util.c b/lib/util.c
index cd4dfb9..0939aac 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,11 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
-#include <xalloc.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
diff --git a/lib/xlat.c b/lib/xlat.c
index cd60210..3e746df 100644
--- a/lib/xlat.c
+++ b/lib/xlat.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdlib.h>
#include <strings.h>
diff --git a/maint/bootstrap.mk b/maint/bootstrap.mk
new file mode 100644
index 0000000..1c15499
--- a/dev/null
+++ b/maint/bootstrap.mk
@@ -0,0 +1,18 @@
+# SYNOPSIS
+# make bootstrap
+#
+# DESRIPTION
+# Bootstrap a freshly cloned copy of dico.
+#
+
+ChangeLog: Makefile
+ $(MAKE) ChangeLog
+
+Makefile: Makefile.am configure
+ ./configure
+
+configure: configure.ac
+
+configure.ac: configure.boot
+ ./bootstrap
+
diff --git a/gnulib.modules b/maint/gnulib.modules
index 674011c..beeed32 100644
--- a/gnulib.modules
+++ b/maint/gnulib.modules
@@ -1,6 +1,12 @@
# List of gnulib modules needed for GNU Dico.
# A module name per line. Empty lines and comments are ignored.
+# Lines starting with '--' are treated as gnulib-tool options. Surplus
+# whitespace is removed.
+--libtool
+--lib = libgnu
+--source-base = xdico/gnu
+
c-strcase
crypto/des
crypto/md5
@@ -28,3 +34,5 @@ vasprintf
xalloc
xgetdomainname
xgethostname
+!xalloc-die
+!openat-die
diff --git a/maint/printflike b/maint/printflike
new file mode 100644
index 0000000..821d4ca
--- a/dev/null
+++ b/maint/printflike
@@ -0,0 +1,9 @@
+_:1
+N_:1
+error:3
+asprintf:2
+vasprintf:2
+config_error:3
+config_warning:3
+dico_log:3\
+dico_die:4"
diff --git a/makedict/.gitignore b/makedict/.gitignore
deleted file mode 100644
index 7f6dc5f..0000000
--- a/makedict/.gitignore
+++ b/dev/null
@@ -1,2 +0,0 @@
-makedict
-makedict.c
diff --git a/makedict/compile.c b/makedict/compile.c
deleted file mode 100644
index 1474cda..0000000
--- a/makedict/compile.c
+++ b/dev/null
@@ -1,632 +0,0 @@
-/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <makedict.h>
-#include <ctype.h>
-
-unsigned numberofkanji = 0, highestkanji = 0, lowestkanji = 0;
-unsigned nedict = 0; /* number of edict entiries */
-
-
-#define isws(c) (c == ' ' || c == '\t')
-
-#define TOK_ENGLISH 256
-#define TOK_KANA 257
-#define TOK_KANJI 258
-#define TOK_NUMBER 259
-#define TOK_EOL '\n'
-
-struct dict_token {
- int type;
- size_t length;
- unsigned char *string;
-};
-
-static struct obstack stk;
-static FILE *infile;
-static char *filename;
-static int line_num;
-static struct dict_token token;
-
-void
-skip_to_eol(void)
-{
- int c;
-
- while ((c = getc(infile)) != EOF) {
- if (c == '\n') {
- ungetc(c, infile);
- return;
- }
- }
-}
-
-void
-skip_to_delim(char *str)
-{
- int c;
-
- while ((c = getc(infile)) != EOF) {
- if (strchr(str, c) == 0) {
- ungetc(c, infile);
- return;
- }
- }
-}
-
-void
-copy_to(int firstc, int term)
-{
- int c;
-
- if (firstc)
- obstack_1grow(&stk, firstc);
- while ((c = getc(infile)) != EOF && c != term)
- obstack_1grow(&stk, c);
- obstack_1grow(&stk, 0);
- token.string = obstack_finish(&stk);
- token.length = strlen(token.string);
-}
-
-void
-copy_kana(int firstc)
-{
- int c1, c2;
- int okurigana = 0;
- int done = 0;
-
- c1 = firstc;
-
- do {
- switch (c1) {
- case '.':
- okurigana++;
- obstack_1grow(&stk, 0x21);
- obstack_1grow(&stk, 0x4a);
- break;
- case '-':
- obstack_1grow(&stk, 0x21);
- obstack_1grow(&stk, 0x41);
- continue;
-
- case ' ':
- done++;
- break;
-
- default:
- if (c1 < 127) {
- if (okurigana) {
- /* FIXME: emit warning? */
- }
- done++;
- } else {
- c2 = getc(infile);
- obstack_1grow(&stk, c1 & 0x7f);
- obstack_1grow(&stk, c2 & 0x7f);
- }
- break;
- }
-
- } while (!done && (c1 = getc(infile)) != EOF);
-
- if (okurigana) {
- /* add closing parenthesis */
- obstack_1grow(&stk, 0x21);
- obstack_1grow(&stk, 0x4b);
- }
- obstack_1grow(&stk, 0);
- obstack_1grow(&stk, 0);
-
- token.string = obstack_finish(&stk);
- token.length = strlen(token.string);
-}
-
-int
-nextkn(void)
-{
- int c;
-
- again:
- while ((c = getc(infile)) != EOF && isws(c))
- ;
-
- if (c == EOF)
- return token.type = 0;
-
- if (c == '#') {
- skip_to_eol();
- goto again;
- } else if (c == '\n') {
- return token.type = '\n';
- } else if (c == '{') {
- copy_to(0, '}');
- return token.type = TOK_ENGLISH;
- } else if (c > 127) {
- copy_kana(c);
- return token.type = TOK_KANA;
- } else {
- copy_to(c, ' ');
- if (isdigit(c))
- return token.type = TOK_NUMBER;
- else
- return token.type = token.string[0];
- }
- /*NOTREACHED*/
-}
-
-int
-edict_nextkn(void)
-{
- int c;
-
- again:
- while ((c = getc(infile)) != EOF && isws(c))
- ;
-
- if (c == EOF)
- return token.type = 0;
-
- if (c == '#') {
- skip_to_eol();
- goto again;
- } else if (c == '\n') {
- return token.type = '\n';
- } else if (c == '[') {
- char *p;
-
- copy_to(0, ']');
- /* convert to JIS */
- for (p = token.string; *p; p++)
- *p &= 0x7f;
- return token.type = TOK_KANA;
- } else if (c > 127) {
- copy_kana(c);
- return token.type = TOK_KANJI;
- } else if (c == '/') {
- if ((c = getc(infile)) == EOF)
- return token.type = 0;
- else if (c == '\n')
- return token.type = TOK_EOL;
-
- copy_to(c, '/');
- ungetc('/', infile);
- return token.type = TOK_ENGLISH;
- } else {
- copy_to(c, '\n');
- return token.type = token.string[0];
- }
- /*NOTREACHED*/
-}
-
-enum text_type {
- TEXT_ENGLISH,
- TEXT_YOMI,
- TEXT_PINYIN
-};
-
-struct text_hdr {
- struct text_hdr *next;
- enum text_type type;
- int length;
- char *string;
-};
-
-
-size_t
-coalesce_text(struct text_hdr *text_chain, enum text_type type,
- char *delim, size_t delimlen)
-{
- struct text_hdr *textp;
- size_t len = 0;
-
- for (textp = text_chain; textp; textp = textp->next) {
- if (textp->type == type) {
- if (len) {
- obstack_grow(&stk, delim, delimlen);
- len += delimlen;
- }
- obstack_grow(&stk, textp->string, textp->length);
- len += textp->length;
- }
- }
- return len;
-}
-
-unsigned long
-get_number(const char *str, int base, unsigned long maxval, char *delim)
-{
- unsigned long val;
- char *p;
-
- val = strtoul(str, &p, base);
- if (*p && !(delim && strchr(delim, *p))) {
- dico_log(L_ERR, 0, "%s:%d: not a valid number (%s)",
- filename, line_num, str);
- return 0;
- }
- if (val > maxval) {
- dico_log(L_ERR, 0, "%s:%d: %s: value out of allowed range (0..%lu)",
- filename, line_num, str, maxval);
- return 0;
- }
- return val;
-}
-
-#define ADD_TEXT(t,str,len) \
- text = obstack_alloc(&stk, sizeof(*text)); \
- text->next = NULL; \
- if (text_tail) \
- text_tail->next = text; \
- else \
- text_head = text; \
- text_tail = text; \
- text->type = t; \
- text->length = len; \
- text->string = str;
-
-void
-compile_kanjidic(DB *dbp)
-{
- DictEntry entry, *ep;
- struct text_hdr *text_head, *text_tail, *text;
- size_t length, offset;
- int kanji;
- int rc;
- XChar2b buff[2];
- int pflag;
- void *stkroot;
- char *p;
- long num;
-
- infile = open_compressed(kanjidict, &pflag);
- if (infile == NULL) {
- dico_die(1, L_ERR, errno, "cannot open kanjidic file `%s'", kanjidict);
- return;
- }
- if (verbose)
- printf("processing dictionary %s\n", kanjidict);
- filename = kanjidict;
- line_num = 0;
-
- obstack_init(&stk);
- obstack_1grow(&stk, 0);
- stkroot = obstack_finish(&stk);
-
- text_head = text_tail = NULL;
- while (nextkn() != 0) {
- line_num++;
-
- if (token.type == TOK_EOL)
- continue;
-
- if (token.type != TOK_KANA || token.length != 2) {
- dico_log(L_ERR, 0, "%s:%d: unrecognized line",
- filename, line_num);
- skip_to_eol();
- continue;
- }
-
- if (nextkn() != TOK_NUMBER) {
- dico_log(L_ERR, 0, "%s:%d: expected JIS code but found `%s'",
- filename, line_num, token.string);
- skip_to_eol();
- continue;
- }
-
- kanji = strtol(token.string, &p, 16);
- if (!isws(*p) && *p != 0) {
- dico_log(L_ERR, 0, "%s:%d: unrecognized line\n",
- filename, line_num);
- skip_to_eol();
- continue;
- }
-
- memset(&entry, 0, sizeof(entry));
-
- while (nextkn() != TOK_EOL && token.type != 0) {
- switch (token.type) {
- case 'F':
- entry.frequency = get_number(token.string + 1, 10, USHRT_MAX,
- NULL);
- break;
-
- case 'G':
- entry.grade_level = get_number(token.string + 1, 10,
- UCHAR_MAX, NULL);
- break;
-
- case 'H':
- entry.Hindex = get_number(token.string + 1, 10,
- USHRT_MAX, NULL);
- break;
-
- case 'N':
- entry.Nindex = get_number(token.string + 1, 10,
- USHRT_MAX, NULL);
- break;
-
- case 'Q':
- /* FIXME: 5th corner is ignored */
- entry.Qindex = get_number(token.string + 1, 10,
- USHRT_MAX, ".");
- break;
-
- case 'U':
- entry.Uindex = get_number(token.string + 1, 16,
- USHRT_MAX, NULL);
- break;
-
- case 'B':
- entry.bushu.bushu = get_number(token.string + 1, 10,
- USHRT_MAX, NULL);
- break;
-
- case 'S':
- entry.bushu.numstrokes = get_number(token.string + 1, 10,
- USHRT_MAX, NULL);
- break;
-
- case 'Y':
- ADD_TEXT(TEXT_PINYIN, token.string + 1, token.length-1);
- break;
-
- case 'P': /* skip code */
- p = token.string;
- num = strtol(p+1, &p, 10);
- if (*p != '-')
- break;
- num <<= 8;
- num |= strtol(p+1, &p, 10);
- if (*p != '-')
- break;
- num <<= 8;
- num |= strtol(p+1, &p, 10);
- entry.skip = num;
- break;
-
- case TOK_ENGLISH:
- ADD_TEXT(TEXT_ENGLISH, token.string, token.length);
- break;
-
- case TOK_KANA:
- ADD_TEXT(TEXT_YOMI, token.string, token.length);
- break;
- }
- }
-
- if (lowestkanji == highestkanji && highestkanji == 0) {
- lowestkanji = highestkanji = kanji;
- } else {
- if (kanji < lowestkanji)
- lowestkanji = kanji;
- if (kanji > highestkanji)
- highestkanji = kanji;
- }
-
- /* Begin preparing final entry */
- obstack_grow(&stk, &entry, sizeof(entry));
- obstack_1grow(&stk, 0);
- offset = 1;
-
- buff[0].byte1 = (kanji & 0xff00) >> 8;
- buff[0].byte2 = (kanji & 0xff);
- buff[1].byte1 = 0;
- buff[1].byte2 = 0;
- obstack_grow(&stk, buff, sizeof(buff));
- entry.kanji = offset;
- offset += sizeof(buff);
- entry.Jindex = kanji;
-
- /* Finally, collect and save text blocks */
- /* 1. English */
- length = coalesce_text(text_head, TEXT_ENGLISH, "|", 1);
- /*FIXME: setmaxlen_8(length);*/
- obstack_1grow(&stk, 0);
- entry.english = offset;
- offset += length + 1;
-
- /* 2. Pinyin */
- length = coalesce_text(text_head, TEXT_PINYIN, "|", 1);
- /*FIXME: setmaxlen_8(length);*/
- obstack_1grow(&stk, 0);
- entry.pinyin = offset;
- offset += length + 1;
-
- /* 3. Yomi */
- length = coalesce_text(text_head, TEXT_YOMI, "\x21\x21", 2);
- /* FIXME: setmaxlen_yomi((XChar2b*)buffer+1);*/
- obstack_1grow(&stk, 0);
- obstack_1grow(&stk, 0);
- entry.yomi = offset;
- offset += length + 2;
-
- ep = obstack_finish(&stk);
- memcpy(ep, &entry, sizeof(entry));
-
- rc = insert_dict_entry(dbp, numberofkanji, ep, sizeof(entry) + offset);
- if (rc)
- dico_log(L_ERR, 0, "%s:%d: failed to insert entry: %s",
- filename, line_num, db_strerror(rc));
-
- numberofkanji++;
- if (verbose > 1 && numberofkanji % 1000 == 0) {
- putchar('.');
- fflush(stdout);
- }
-
- obstack_free(&stk, stkroot);
- obstack_1grow(&stk, 0);
- stkroot = obstack_finish(&stk);
- text_head = text_tail = NULL;
- }
- if (verbose > 1)
- puts("");
-
- if (pflag)
- pclose(infile);
- else
- fclose(infile);
-
- obstack_free(&stk, NULL);
-}
-
-void
-compile_edict(DB *dbp)
-{
- DictEntry entry, *ep;
- int pflag;
- struct text_hdr *text_head, *text_tail, *text;
- char *kanji = NULL, *yomi = NULL;
- size_t kanji_len, yomi_len;
- char *stkroot;
- size_t offset, length;
- int rc;
-
- infile = open_compressed(edict, &pflag);
- if (infile == NULL) {
- dico_die(1, L_ERR, errno, "cannot open edict file `%s'", edict);
- return;
- }
- if (verbose)
- printf("processing dictionary %s\n", edict);
-
- line_num = 0;
- filename = edict;
-
- obstack_init(&stk);
- obstack_1grow(&stk, 0);
- stkroot = obstack_finish(&stk);
- text_head = text_tail = NULL;
-
- while (edict_nextkn()) {
- line_num++;
-
- if (token.type == TOK_EOL)
- continue;
-
- if (token.type != TOK_KANJI) {
- dico_log(L_ERR, 0, "%s:%d: unrecognized line",
- filename, line_num);
- skip_to_eol();
- continue;
- }
-
- if (strcmp(token.string, "\x21\x29\x21\x29\x21\x29\x21\x29") == 0) {
- /* copyright mark: "" */
- skip_to_eol();
- continue;
- }
-
- if (verbose > 1 && nedict % 1000 == 0) {
- putchar('.');
- fflush(stdout);
- }
-
- memset(&entry, 0, sizeof(entry));
-
- kanji = token.string;
- kanji_len = token.length;
-
- if (edict_nextkn() == TOK_KANA) {
- yomi = token.string;
- yomi_len = token.length;
- /*FIXME setmaxlen_16((XChar2b*)token.string);*/
- } else {
- yomi = kanji;
- yomi_len = kanji_len;
-
- if (token.type == TOK_ENGLISH) {
- ADD_TEXT(TEXT_ENGLISH, token.string, token.length);
- } else {
- dico_log(L_ERR, 0, "%s:%d: unrecognized string",
- filename, line_num);
- }
- }
-
- while (edict_nextkn() == TOK_ENGLISH) {
- ADD_TEXT(TEXT_ENGLISH, token.string, token.length);
- }
-
- if (token.type != TOK_EOL && token.type != 0) {
- dico_log(L_ERR, 0, "%s:%d: junk after end of line",
- filename, line_num);
- skip_to_eol();
- }
-
- obstack_grow(&stk, &entry, sizeof(entry));
- obstack_1grow(&stk, 0);
- offset = 1;
- obstack_grow(&stk, kanji, kanji_len);
- obstack_1grow(&stk, 0);
- obstack_1grow(&stk, 0);
- entry.kanji = offset;
- offset += kanji_len + 2;
-
- obstack_grow(&stk, yomi, yomi_len);
- obstack_1grow(&stk, 0);
- obstack_1grow(&stk, 0);
- entry.yomi = offset;
- offset += yomi_len + 2;
-
- length = coalesce_text(text_head, TEXT_ENGLISH, "|", 1);
- obstack_1grow(&stk, 0);
- entry.english = offset;
- offset += length + 1;
- /*FIXME: setmaxlen_8(length+1);*/
-
- ep = obstack_finish(&stk);
- memcpy(ep, &entry, sizeof(entry));
-
- rc = insert_dict_entry(dbp, numberofkanji + nedict,
- ep, sizeof(entry) + offset);
- nedict++;
- if (rc)
- dico_log(L_ERR, 0, "%s:%d: failed to insert entry: %s",
- filename, line_num, db_strerror(rc));
-
- obstack_free(&stk, stkroot);
- obstack_1grow(&stk, 0);
- stkroot = obstack_finish(&stk);
- text_head = text_tail = NULL;
- }
-
- obstack_free(&stk, NULL);
- if (pflag)
- pclose(infile);
- else
- fclose(infile);
-
- if (verbose > 1)
- puts("");
-}
-
-int
-compile(void)
-{
- DB *dbp;
-
- dbp = open_db();
- compile_kanjidic(dbp);
- compile_edict(dbp);
- iterate_db(dbp);
- count_xref(dbp);
- close_db(dbp);
- if (verbose) {
- printf("%d kanji (from %4X to %4X)\n%d dictionary entries\n",
- numberofkanji, lowestkanji, highestkanji, nedict);
- }
- return 0;
-}
diff --git a/makedict/index.c b/makedict/index.c
deleted file mode 100644
index 6e6058f..0000000
--- a/makedict/index.c
+++ b/dev/null
@@ -1,769 +0,0 @@
-/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <makedict.h>
-#include <ctype.h>
-
-#define __CAT2(a,b) a ## b
-
-#define DCL_GET(field) \
- int \
- __CAT2(get_,field)(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey) \
- { \
- DictEntry *dict = (DictEntry *)pdata->data; \
- \
- memset(skey, 0, sizeof(DBT)); \
- skey->data = &dict->field; \
- skey->size = sizeof(dict->field); \
- return 0; \
- }
-
-#define DCL_GETS(field,inc) \
- int \
- __CAT2(get_,field)(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey) \
- { \
- DictEntry *dict = (DictEntry *)pdata->data; \
- \
- memset(skey, 0, sizeof(DBT)); \
- skey->data = DICT_PTR(dict,field); \
- skey->size = strlen(skey->data) + inc; \
- return 0; \
- }
-
-#define DCL_CMP_NUM(type) \
- int \
- __CAT2(cmp_,type)(DB *dbp, const DBT *a, const DBT *b) \
- { \
- type an, bn; \
- \
- an = *(type*)a->data; \
- bn = *(type*)b->data; \
- if (an < bn) \
- return -1; \
- else if (an > bn) \
- return 1; \
- return 0; \
- }
-
-DCL_GET(Jindex)
-DCL_GET(Uindex)
-DCL_GET(Qindex)
-DCL_GET(frequency)
-DCL_GET(Nindex)
-DCL_GET(Hindex)
-DCL_GET(grade_level)
-DCL_GET(bushu)
-DCL_GET(skip)
-DCL_GETS(english,1)
-DCL_GETS(pinyin,1)
-DCL_GETS(kanji,2)
-DCL_GETS(yomi,2)
-
-DCL_CMP_NUM(Ushort)
-DCL_CMP_NUM(Uchar)
-DCL_CMP_NUM(unsigned)
-
-int
-cmp_bushu(DB *dbp, const DBT *a, const DBT *b)
-{
- const Bushu *ap = a->data;
- const Bushu *bp = b->data;
-
- if (ap->bushu < bp->bushu)
- return -1;
- else if (ap->bushu > bp->bushu)
- return 1;
-
- if (ap->numstrokes < bp->numstrokes)
- return -1;
- else if (ap->numstrokes > bp->numstrokes)
- return 1;
-
- return 0;
-}
-
-/* FIXME: These two must ignore locale settings */
-int
-cmp_c_string(DB *dbp, const DBT *a, const DBT *b)
-{
- const char *astr = a->data;
- const char *bstr = b->data;
- return strcmp(astr, bstr);
-}
-
-int
-cmp_ci_string(DB *dbp, const DBT *a, const DBT *b)
-{
- const char *astr = a->data;
- const char *bstr = b->data;
- return strcasecmp(astr, bstr);
-}
-
-/* FIXME: Not the same, but suffices for the time being. */
-#define cmp_cw_string cmp_c_string
-
-int
-cmp_xref(DB *dbp, const DBT *a, const DBT *b)
-{
- const Xref *xa = a->data;
- const Xref *xb = b->data;
-
- if (xa->kanji < xb->kanji)
- return -1;
- else if (xa->kanji > xb->kanji)
- return 1;
-
- if (xa->pos == USHRT_MAX || xb->pos == USHRT_MAX)
- return 0;
- else if (xa->pos < xb->pos)
- return -1;
- else if (xa->pos > xb->pos)
- return 1;
- return 0;
-}
-
-
-int
-simple_list_iter(struct dbidx *idx, unsigned num, char *p)
-{
- DBT key, content;
- size_t len;
- int stop = 0;
-
- memset(&content, 0, sizeof content);
- content.data = &num;
- content.size = sizeof(num);
-
- while (!stop) {
- int rc;
-
- while (*p && isspace(*p))
- p++;
- if (!*p)
- break;
- for (len = 0; p[len] && p[len] != '|'; len++)
- ;
- if (p[len] == 0)
- stop = 1;
- else
- p[len] = 0;
-
- memset(&key, 0, sizeof key);
- key.data = p;
- key.size = len + 1;
- p += len + 1;
-
- /*printf("%s/%u\n", key.data,num);*/
- rc = idx->dbp->put(idx->dbp, NULL, &key, &content, 0);
- if (rc && rc != DB_KEYEXIST) {
- dico_log(L_ERR, 0, "%s: failed to insert entry %s/%u: %s",
- idx->name, (char*)key.data, num, db_strerror(rc));
- }
- }
- return 0;
-}
-
-
-int
-pinyin_iter(struct dbidx *idx, unsigned num, DictEntry *ep)
-{
- return simple_list_iter(idx, num, DICT_PINYIN_PTR(ep));
-}
-
-
-int
-english_iter(struct dbidx *idx, unsigned num, DictEntry *ep)
-{
- return simple_list_iter(idx, num, DICT_ENGLISH_PTR(ep));
-}
-
-
-#define WORDDELIM " \t(){}[]&.,;:?!'`\"+-*/^%$#@~|\\<>"
-
-#define isdelim(c) strchr(WORDDELIM, c)
-
-char *auxiliary_words[] = {
- "a", "an", "the",
- "this", "that", "these", "those",
- "in", "to", "into",
- "from",
- "on", "up", "upon",
- "through", "thru",
- "with", "within", "without",
- "out", "of", "by",
- "for",
- "one", "one's",
- "and", "or",
- "as", "at",
- "before", "after"
-};
-
-int
-auxword(char *str, int len)
-{
- int i;
-
- for (i = 0; i < NUMITEMS(auxiliary_words); i++)
- if (strncasecmp(auxiliary_words[i], str, len) == 0)
- return 1;
- return 0;
-}
-
-int
-single_word(char *text)
-{
- while (*text && !isdelim(*text))
- ++text;
- return *text == 0;
-}
-
-int
-simplify_text(char *buf, char *text, int size)
-{
- int cnt = 0;
- int len;
- char *word;
-
- if (!text)
- return 0;
-
- if (single_word(text)) {
- strncpy(buf, text, size);
- buf[size-1] = 0;
- return 1;
- }
- while (size > 0) {
- /* Skip delimiters */
- while (*text && isdelim(*text)) {
- if (*text == '(')
- break;
- ++text;
- }
- if (!*text)
- break;
-
- /* Eliminate parenthesized words */
- if (*text == '(') {
- while (*text && *text++ != ')') ;
- if (!*text)
- break;
- continue;
- }
-
- /* Determine the word boundary */
- word = text;
- for (len = 0; word[len] && !isdelim(word[len]); len++) ;
- text += len;
-
- /* If aux. word -- throw it away */
- if (auxword(word, len))
- continue;
-
- /* Copy word to buffer */
- cnt++;
- if (len > size)
- len = size;
- size -= len;
-
- while (len--)
- *buf++ = *word++;
- if (size) {
- *buf++ = ' ';
- size--;
- }
- }
- *buf = 0;
- return cnt;
-}
-
-int
-words_iter(struct dbidx *idx, unsigned num, DictEntry *ep)
-{
- DBT key, content;
- char *p;
- char *buf;
- size_t len;
- int stop = 0;
-
- memset(&content, 0, sizeof content);
- content.data = &num;
- content.size = sizeof(num);
-
- p = DICT_ENGLISH_PTR(ep);
- if (*p == 0)
- return 0;
- len = strlen(p);
- buf = malloc(len + 1);
- simplify_text(buf, p, len);
- p = buf;
- while (!stop) {
- int rc;
-
- while (*p && isspace(*p))
- p++;
- if (!*p)
- break;
- for (len = 0; p[len] && !isspace(p[len]); len++)
- ;
- if (p[len] == 0)
- stop = 1;
- else
- p[len] = 0;
-
- memset(&key, 0, sizeof key);
- key.data = p;
- key.size = len + 1;
- p += len + 1;
-
- /*printf("%s/%u\n", key.data,num);*/
- rc = idx->dbp->put(idx->dbp, NULL, &key, &content, 0);
- if (rc && rc != DB_KEYEXIST) {
- dico_log(L_ERR, 0, "%s: failed to insert entry %s/%u: %s",
- idx->name, (char*)key.data, num, db_strerror(rc));
- }
- }
- free(buf);
- return 0;
-}
-
-
-int
-xref_iter(struct dbidx *idx, unsigned num, DictEntry *ep)
-{
- DBT key, content;
- XChar2b *text;
- Ushort hi = highestkanji << 8;
- Ushort lo = lowestkanji >> 8;
- Xref xref;
- int rc;
-
- memset(&content, 0, sizeof content);
- content.data = &num;
- content.size = sizeof(num);
-
- text = (XChar2b*)DICT_KANJI_PTR(ep);
- xref.pos = 0;
- while (text->byte1) {
- while (text->byte1
- && !(text->byte1 >= lo && text->byte1 <= hi)) {
- xref.pos++;
- text++;
- }
-
- xref.kanji = (Ushort)(text->byte1<<8) + text->byte2;
- if (xref.kanji == 0)
- break;
-
- memset(&key, 0, sizeof key);
- key.data = &xref;
- key.size = sizeof xref;
-
- /*printf("%s/%u\n", key.data,num);*/
- rc = idx->dbp->put(idx->dbp, NULL, &key, &content, 0);
- if (rc) {
- dico_log(L_ERR, 0, "%s: failed to insert entry %x-%u/%u: %s",
- idx->name, xref.kanji, xref.pos, num, db_strerror(rc));
- }
- xref.pos++;
- text++;
- }
- return 0;
-}
-
-
-const XChar2b *
-strchr16(const XChar2b *str, unsigned c)
-{
- XChar2b v;
-
- v.byte1 = (c & 0xff00) >> 8;
- v.byte2 = (c & 0xff);
-
- for (; str->byte1; str++)
- if (str->byte1 == v.byte1 && str->byte2 == v.byte2)
- return str;
- return NULL;
-}
-
-const XChar2b *
-strseg16(const XChar2b *str, const XChar2b *delim)
-{
- unsigned c;
-
- for (; str->byte1; str++) {
- c = ((unsigned) str->byte1 << 8) + str->byte2;
- if (strchr16(delim, c))
- return str;
- }
- return NULL;
-}
-
-int
-yomi_generic_iter(struct dbidx *idx, unsigned num, DictEntry *ep,
- void (*dfun)(const XChar2b *, size_t, DBT *),
- void (*dfree)(DBT *))
-{
- const XChar2b *text, *end;
- size_t length;
- static XChar2b delim[] = {
- { 0x21, 0x21 }, /* blank space */
- { 0x21, 0x4a }, /* open paren */
- { 0x21, 0x4b }, /* close paren */
- { 0 }
- };
- DBT key, content;
- int rc;
-
- memset(&content, 0, sizeof content);
- content.data = &num;
- content.size = sizeof(num);
-
- text = (XChar2b*)DICT_YOMI_PTR(ep);
- while (text->byte1) {
- while (text->byte1 &&
- text->byte1 != HIRAGANA_BYTE && text->byte1 != KATAKANA_BYTE)
- text++;
- if (text->byte1 == 0)
- return 0;
- end = strseg16(text, delim);
- if (end)
- length = (end - text) * 2;
- else
- length = strlen((char*)text);
-
- memset(&key, 0, sizeof key);
- dfun(text, length, &key);
- rc = idx->dbp->put(idx->dbp, NULL, &key, &content, 0);
- if (dfree)
- dfree(&key);
-
- if (rc && rc != DB_KEYEXIST) {
- dico_log(L_ERR, 0, "%s: failed to insert entry `%s': %s",
- idx->name, (char*)key.data, db_strerror(rc));
- }
-
- if (end) {
- if (end->byte1 == 0x21 && end->byte2 == 0x4a) {
- /* Okurigana: remove parens surrounding the flection and
- append it to the root. */
- const XChar2b *s;
- char *buf;
- size_t olen = 0;
- for (s = end + 1;
- s->byte1 &&
- !(s->byte1 == 0x21 && s->byte2 == 0x4b);
- s++)
- olen++;
-
- buf = xmalloc(length + 2*olen);
- memcpy(buf, text, length);
- memcpy(buf + length, end + 1, 2*olen);
- end = s + 1;
-
- memset(&key, 0, sizeof key);
- dfun((const XChar2b*)buf, length + 2*olen, &key);
- rc = idx->dbp->put(idx->dbp, NULL, &key, &content, 0);
- if (dfree)
- dfree(&key);
- free(buf);
- if (rc && rc != DB_KEYEXIST) {
- dico_log(L_ERR, 0, "%s: failed to insert entry `%s': %s",
- idx->name, (char*)key.data, db_strerror(rc));
- }
- }
- text = end;
- } else
- break;
- }
- return 0;
-}
-
-static void
-yomi_fill_key(const XChar2b *input, size_t length, DBT *key)
-{
- key->data = (void*) input;
- key->size = length + 2;
-}
-
-int
-yomi_iter(struct dbidx *idx, unsigned num, DictEntry *ep)
-{
- return yomi_generic_iter(idx, num, ep, yomi_fill_key, NULL);
-}
-
-static void
-romaji_fill_key(const XChar2b *input, size_t length, DBT *key)
-{
- key->size = kana_to_romaji_str(input, length, (char**)&key->data);
- if (key->size)
- key->size++;
-}
-
-static void
-romaji_free_key(DBT *key)
-{
- free(key->data);
-}
-
-int
-romaji_iter(struct dbidx *idx, unsigned num, DictEntry *ep)
-{
- return yomi_generic_iter(idx, num, ep, romaji_fill_key, romaji_free_key);
-}
-
-
-
-struct dbidx dbidx[] = {
- /* JIS codes */
- { JIS_INDEX_NAME, get_Jindex, cmp_Ushort },
-
- /* Unicode */
- { UNICODE_INDEX_NAME, get_Uindex, cmp_Ushort },
-
- /* Four-corner index */
- { CORNER_INDEX_NAME, get_Qindex, cmp_Ushort },
-
- /* Frequency */
- { FREQ_INDEX_NAME, get_frequency, cmp_Ushort },
-
- /* Nelson dictionary index */
- { NELSON_INDEX_NAME, get_Nindex, cmp_Ushort },
-
- /* Halpern dictionary index */
- { HALPERN_INDEX_NAME, get_Hindex, cmp_Ushort },
-
- /* Jouyou grade level */
- { GRADE_INDEX_NAME, get_grade_level, cmp_Uchar },
-
- /* Radical */
- { BUSHU_INDEX_NAME, get_bushu, cmp_bushu },
-
- /* SKIP code */
- { SKIP_INDEX_NAME, get_skip, cmp_unsigned },
-
- /* Pinyin */
- { PINYIN_INDEX_NAME, get_pinyin, cmp_ci_string, pinyin_iter },
-
- /* English translation index */
- { ENGLISH_INDEX_NAME, get_english, cmp_ci_string, english_iter },
-
- /* Kanji/kana text index */
- { KANJI_INDEX_NAME, get_kanji, cmp_cw_string },
-
- /* Cross-reference of kanji */
- { XREF_INDEX_NAME, get_kanji, cmp_xref, xref_iter },
-
- /* Cross-reference of the words in translations */
- { WORDS_INDEX_NAME, get_english, cmp_ci_string, words_iter },
-
- /* Readings */
- { YOMI_INDEX_NAME, get_yomi, cmp_cw_string, yomi_iter },
-
- /* Readings in romaji */
- { ROMAJI_INDEX_NAME, get_yomi, cmp_ci_string, romaji_iter },
-
- { NULL },
-};
-
-int dbmode = 0644;
-
-void
-open_secondary(DB *master, struct dbidx *idx)
-{
- DB *sdbp;
- int ret;
-
- if ((ret = db_create(&sdbp, NULL, 0)) != 0)
- dico_die(1, L_CRIT, 0, "cannot create secondary index DB: %s",
- db_strerror(ret));
- if ((ret = sdbp->set_flags(sdbp, DB_DUP|DB_DUPSORT)) != 0)
- dico_die(1, L_CRIT, 0, "cannot set flags on secondary index DB %s: %s",
- idx->name, db_strerror(ret));
-
- if (idx->cmp_key && (ret = sdbp->set_bt_compare(sdbp, idx->cmp_key)))
- dico_die(1, L_CRIT, 0,
- "cannot set comparator on secondary index DB %s: %s",
- idx->name, db_strerror(ret));
-
- if ((ret = sdbp->open(sdbp, NULL, idx->name, NULL,
- DB_BTREE, DB_CREATE|DB_TRUNCATE, dbmode)) != 0)
- dico_die(1, L_CRIT, 0, "cannot open secondary index DB %s: %s",
- idx->name, db_strerror(ret));
-
- /* Associate the secondary with the primary. */
- if (!idx->iter &&
- (ret = master->associate(master, NULL, sdbp, idx->get_key, 0)) != 0)
- dico_die(1, L_CRIT, 0, "cannot associate secondary index DB %s: %s",
- idx->name, db_strerror(ret));
-
- idx->dbp = sdbp;
-}
-
-DB *
-open_db(void)
-{
- DB *dbp;
- int ret;
- int i;
-
- /* Open/create primary */
- if ((ret = db_create(&dbp, NULL, 0)) != 0)
- dico_die(1, L_CRIT, 0, "cannot create DB: %s", db_strerror(ret));
- if ((ret = dbp->open(dbp, NULL,
- dictname, NULL, DB_BTREE, DB_CREATE|DB_TRUNCATE,
- dbmode)) != 0)
- dico_die(1, L_CRIT, 0, "cannot open DB %s: %s",
- dictname, db_strerror(ret));
-
- /* Open/create secondaries */
- for (i = 0; dbidx[i].name; i++)
- open_secondary(dbp, &dbidx[i]);
- return dbp;
-}
-
-void
-close_db(DB *dbp)
-{
- int i;
-
- dbp->close(dbp, 0);
- for (i = 0; dbidx[i].dbp; i++) {
- dbidx[i].dbp->close(dbidx[i].dbp, 0);
- dbidx[i].dbp = NULL;
- }
-}
-
-int
-insert_dict_entry(DB *dbp, unsigned num, DictEntry *entry, size_t size)
-{
- DBT key, content;
-
- memset(&key, 0, sizeof key);
- key.data = &num;
- key.size = sizeof(num);
-
- memset(&content, 0, sizeof content);
- content.data = entry;
- content.size = size;
-
- return dbp->put(dbp, NULL, &key, &content, 0);
-}
-
-void
-iterate_db(DB *dbp)
-{
- int rc;
- DBC *cursor;
- DBT key;
- DBT content;
-
- if (verbose)
- printf("creating additional indexes\n");
- if ((rc = dbp->cursor(dbp, NULL, &cursor, 0)))
- dico_die(1, L_CRIT, 0, "cannot create cursor: %s", db_strerror(rc));
-
- memset(&key, 0, sizeof key);
- memset(&content, 0, sizeof content);
- for (rc = cursor->c_get(cursor, &key, &content, DB_FIRST);
- rc == 0;
- rc = cursor->c_get(cursor, &key, &content, DB_NEXT)) {
- int i;
- unsigned num = *(unsigned*)key.data;
- DictEntry *ep = content.data;
-
- for (i = 0; dbidx[i].dbp; i++) {
- if (dbidx[i].iter)
- dbidx[i].iter(&dbidx[i], num, ep);
- }
-/* printf("%s\n", DICT_ENGLISH_PTR(ep)); */
- }
- if (rc != DB_NOTFOUND)
- dico_die(1, L_CRIT, 0, "cannot iterate over the database: %s",
- db_strerror(rc));
- cursor->c_close(cursor);
-}
-
-static void
-update_kanji_ref_count(DB *dbp, Ushort kanji, unsigned count)
-{
- int rc;
- DictEntry *ep;
- DB *jisdb = dbidx[index_jis].dbp;
- DBT key, pkey;
- DBT content;
-
- memset(&key, 0, sizeof key);
- key.data = &kanji;
- key.size = sizeof kanji;
- memset(&pkey, 0, sizeof pkey);
- memset(&content, 0, sizeof content);
-
- rc = jisdb->pget(jisdb, NULL, &key, &pkey, &content, 0);
- if (rc) {
- dico_die(1, L_CRIT, 0, "cannot get dictionary entry for %x: %s",
- kanji, db_strerror(rc));
- }
-
- ep = content.data;
- ep->refcnt = count;
- rc = dbp->put(dbp, NULL, &pkey, &content, 0);
- if (rc)
- dico_die(1, L_CRIT, 0, "cannot update item: %s", db_strerror(rc));
-}
-
-void
-count_xref(DB *dbp)
-{
- int rc;
- struct dbidx *idx = dbidx + index_xref;
- DB *idbp = idx->dbp;
- DBC *cursor;
- DBT key;
- DBT pkey;
-
- if (verbose)
- printf("Counting cross-references\n");
-
- if ((rc = idbp->cursor(idbp, NULL, &cursor, 0)))
- dico_die(1, L_CRIT, 0, "cannot create cursor: %s", db_strerror(rc));
-
- memset(&key, 0, sizeof key);
- memset(&pkey, 0, sizeof pkey);
-
- rc = cursor->c_get(cursor, &key, &pkey, DB_FIRST);
- if (rc == 0) {
- Ushort last = ((Xref*) key.data)->kanji;
- unsigned count = 0;
-
- for (; rc == 0;
- rc = cursor->c_get(cursor, &key, &pkey, DB_NEXT)) {
- Xref *xref = key.data;
-
- if (xref->kanji == last)
- count++;
- else {
- update_kanji_ref_count(dbp, last, count);
- last = xref->kanji;
- count = 1;
- }
- }
- update_kanji_ref_count(dbp, last, count);
- }
- if (rc != DB_NOTFOUND)
- dico_die(1, L_CRIT, 0, "cannot iterate over the database: %s",
- db_strerror(rc));
- cursor->c_close(cursor);
-}
diff --git a/makedict/main.c b/makedict/main.c
deleted file mode 100644
index 9673a8a..0000000
--- a/makedict/main.c
+++ b/dev/null
@@ -1,69 +0,0 @@
-/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <makedict.h>
-
-char *dictdir = ".";
-char *kanjidict = "kanjidic.gz";
-char *edict = "edict.gz";
-char *outdir = "jdict";
-char *dictname = DICT_DB;
-int verbose;
-
-
-char *
-mkfullname(char *dir, char *name)
-{
- int dirlen = strlen(dir);
- int namelen = strlen(name);
- char *rp;
-
- if (name[0] == '/')
- return name;
- rp = xmalloc(dirlen + namelen + (dir[dirlen-1] != '/') + 1);
- strcpy(rp, dir);
- if (dir[dirlen-1] != '/')
- rp[dirlen++] = '/';
- strcpy(rp + dirlen, name);
- return rp;
-}
-
-void
-make_names(void)
-{
- int i;
- kanjidict = mkfullname(dictdir, kanjidict);
- edict = mkfullname(dictdir, edict);
- dictname = mkfullname(outdir, dictname);
- for (i = 0; dbidx[i].name; i++)
- dbidx[i].name = mkfullname(outdir, dbidx[i].name);
-}
-
-int
-main(int argc, char **argv)
-{
- dico_set_program_name(argv[0]);
-
- if (argc == 1) {
- print_help();
- exit(0);
- }
- get_options(argc, argv);
- make_names();
- return compile();
-}
-
-
diff --git a/makedict/makedict.h b/makedict/makedict.h
deleted file mode 100644
index b1bf5eb..0000000
--- a/makedict/makedict.h
+++ b/dev/null
@@ -1,109 +0,0 @@
-/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include <unistd.h>
-#include <getopt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <limits.h>
-#include <dict.h>
-#include <xdico.h>
-#include <db.h>
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free free
-#include <obstack.h>
-#include <xalloc.h>
-#include <appi18n.h>
-
-#define HIRAGANA_BYTE 0x24
-#define KATAKANA_BYTE 0x25
-
-#define UNCOMPRESS "gzip -d -c"
-#define UNCOMPRESSEXT ".gz"
-
-#define NUMITEMS(a) sizeof(a)/sizeof((a)[0])
-
-/* This comes from <X11/Xutil.h> */
-typedef struct { /* normal 16 bit characters are two bytes */
- unsigned char byte1;
- unsigned char byte2;
-} XChar2b;
-
-struct dbidx;
-
-typedef int (*get_key_fn)(DB *, const DBT *, const DBT *, DBT *);
-typedef int (*cmp_key_fn)(DB *, const DBT *, const DBT *);
-typedef int (*iter_fn)(struct dbidx *, unsigned, DictEntry *);
-
-struct dbidx {
- char *name;
- get_key_fn get_key;
- cmp_key_fn cmp_key;
- iter_fn iter;
- DB *dbp;
- /* FIXME: What's more? */
-};
-
-extern char *dictdir;
-extern char *kanjidict;
-extern char *edict;
-extern char *outdir;
-extern char *dictname;
-extern int verbose;
-extern int maxstr8;
-extern int maxstr16;
-extern int maxbuflen8;
-extern int maxbuflen16;
-extern struct dbidx dbidx[];
-extern unsigned numberofkanji, highestkanji, lowestkanji;
-extern unsigned nedict;
-
-void get_options(int argc, char **argv);
-
-int compile (void);
-
-DB *open_db(void);
-void close_db(DB *);
-void iterate_db(DB *);
-void count_xref(DB *);
-
-void open_secondary(DB *master, struct dbidx *idx);
-int insert_dict_entry(DB *dbp, unsigned num, DictEntry *entry, size_t size);
-
-
-FILE *open_compressed(char *dictname, int *pflag);
-
-void compile_kanjidic(DB *dbp);
-
-/* romaji.c */
-/* FIXME: Move these to the library. */
-typedef int (*romaji_out_fn)(void *, const char *);
-
-int kana_to_romaji(const XChar2b *input, size_t size, romaji_out_fn fun,
- void *closure);
-int kana_to_romaji_str(const XChar2b *input, size_t size, char **sptr);
-
-/* getopt.m4 */
-extern void print_help(void);
-extern void print_usage(void);
-
diff --git a/makedict/makedict.opt b/makedict/makedict.opt
deleted file mode 100644
index 6ce2e6a..0000000
--- a/makedict/makedict.opt
+++ b/dev/null
@@ -1,71 +0,0 @@
-/* This file is part of GNU Dico. -* c -*-
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <makedict.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <getopt.h>
-#include <dico.h>
-#include <stdarg.h>
-#include <limits.h>
-
-OPTIONS_BEGIN(gnu,"makedict",
- [<Create binary dictionary for use with gjdictd.>])
-
-OPTION(compile, c,,
- [<Compile dictionaries using default values.>])
-BEGIN
-END
-
-OPTION(dictionary-directory, d, DIR,
- [<Set input dictionary path.>])
-BEGIN
- dictdir = optarg;
-END
-
-OPTION(kanjidic, k, FILE,
- [<Set name for kanjidic file.>])
-BEGIN
- kanjidict = optarg;
-END
-
-OPTION(edict, e, FILE,
- [<Set name for edict file.>])
-BEGIN
- edict = optarg;
-END
-
-OPTION(output-directory, o, DIR,
- [<Set output directory name.>])
-BEGIN
- outdir = optarg;
-END
-
-OPTION(verbose, v,,
- [<Increase verbosity level.>])
-BEGIN
- verbose++;
-END
-
-OPTIONS_END
-
-void
-get_options (int argc, char *argv[])
-{
- GETOPT(argc, argv)
-}
diff --git a/makedict/romaji.c b/makedict/romaji.c
deleted file mode 100644
index 658f667..0000000
--- a/makedict/romaji.c
+++ b/dev/null
@@ -1,325 +0,0 @@
-/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <makedict.h>
-
-enum kana_state {
- state_initial,
- state_n,
- state_tsu,
-};
-
-static const char *kanamap[128] = {
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
-
-
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
-
- "", "a", "a", "i", "i", "u", "u", "e",
- "e", "o", "o", "ka", "ga", "ki", "gi", "ku",
-
- "gu", "ke", "ge", "ko", "go", "sa", "za", "shi",
- "ji", "su", "zu", "se", "ze", "so", "zo", "ta",
-
- "da", "chi", "ji", "tsu", "tsu", "zu", "te", "de",
- "to", "do", "na", "ni", "nu", "ne", "no", "ha",
-
- "ba", "pa", "hi", "bi", "pi", "fu", "bu", "pu",
- "he", "be", "pe", "ho", "bo", "po", "ma", "mi",
-
- "mu", "me", "mo", "ya", "ya", "yu", "yu", "yo",
- "yo", "ra", "ri", "ru", "re", "ro", "wa", "wa",
-
- "i", "u", "o", "n", "", "", "", "",
- "", "", "", "", "", "", "", "",
-};
-
-#define IS_KATAKANA_BAR(s) ((s).byte1 == 0x21 && (s).byte2 == 0x3c)
-
-int
-kana_to_romaji(const XChar2b *input, size_t size, romaji_out_fn fun,
- void *closure)
-{
- enum kana_state state = state_initial; /* Machine state */
- char buf[2][6]; /* syllable buffers */
- int bn = 0; /* buffer number */
- const char *last = NULL; /* pointer to the last read syllable */
- size_t count = 0; /* Number of bytes output */
- const char *syl;
-
-#define FLUSH() \
- if (last) \
- { \
- int rc = fun(closure, last); \
- if (rc == 0) \
- size = 0; \
- else \
- count += rc; \
- last = NULL; \
- }
-
- while (input->byte1 != HIRAGANA_BYTE && input->byte1 != KATAKANA_BYTE) {
- if (input->byte1 == 0x0)
- return 0;
- input++;
- size--;
- }
-
- while (size) {
- size_t len;
- XChar2b kana;
- char *p;
-
- if (input->byte1 != HIRAGANA_BYTE && input->byte1 != KATAKANA_BYTE
- && !IS_KATAKANA_BAR(input[0])
- && input->byte1 != 0x0)
- break;
-
- kana = *input++;
- size--;
-
- if (kana.byte2 > 128)
- continue;
-
- if (kana.byte2 == 0x43) {
- /* small tsu */
- FLUSH();
- state = state_tsu;
- continue;
- } else if (kana.byte2 == 0x73) {
- /* n */
- FLUSH();
- last = kanamap[kana.byte2];
- state = state_n;
- continue;
- }
-
- syl = kanamap[kana.byte2];
- switch (state) {
- case state_initial:
- switch (kana.byte2) {
- case 0x25: /* u */
- case 0x26: /* U */
- if (last && last[strlen(last)-1] == 'o') {
- strcpy(buf[bn], last);
- strcat(buf[bn], "o");
- last = buf[bn];
- bn = !bn;
- } else {
- FLUSH();
- last = syl;
- }
- break;
-
- case 0x63:
- case 0x65:
- case 0x67:
- /* small ya,yu,yo: */
- len = strlen(last);
- if (last && len > 1 && last[len - 1] == 'i') {
- switch (last[len-2]) {
- case 'j':
- strcpy(buf[bn], last);
- p = buf[bn];
- bn = !bn;
- strcpy(&p[len-1], &syl[1]);
- last = p;
- break;
-
- case 'h':
- if (len > 2) {
- switch (last[len - 3]) {
- case 's':
- case 'c':
- strcpy(buf[bn], last);
- p = buf[bn];
- bn = !bn;
- strcpy(&p[len-1], &syl[1]);
- last = p;
- continue;
- }
- }
- /* FALL THROUGH */
-
- case 'k':
- case 'g':
- case 'n':
- case 'b':
- case 'p':
- case 'm':
- case 'r':
- strcpy(buf[bn], last);
- strcpy(buf[bn] + len - 1, syl);
- last = buf[bn];
- bn = !bn;
- break;
-
- default:
- FLUSH();
- last = syl;
- }
- } else {
- FLUSH();
- last = syl;
- }
- break;
-
- default:
- if (IS_KATAKANA_BAR(kana)) {
- len = strlen(last);
- if (memchr("aiueo", last[len-1], 5)) {
- p = buf[bn];
- bn = !bn;
- strcpy(p, last);
- strcat(p, &last[len-1]);
- last = p;
- } else {
- FLUSH();
- }
- } else {
- FLUSH();
- last = syl;
- }
- break;
- }
- break;
-
- case state_n:
- state = state_initial;
- if (memchr("mbp", syl[0], 3)) {
- buf[bn][0] = 'm';
- strcpy(buf[bn] + 1, syl);
- last = buf[bn];
- bn = !bn;
- } else {
- FLUSH();
- last = syl;
- }
- break;
-
- case state_tsu:
- state = state_initial;
- FLUSH();
- if (memchr("kstpb", syl[0], 5)) {
- buf[bn][0] = syl[0];
- strcpy(buf[bn] + 1, syl);
- last = buf[bn];
- bn = !bn;
- } else {
- last = syl;
- }
- break;
- }
- }
- FLUSH();
-
- return count;
-}
-
-
-struct string_buf {
- char *buf;
- char *cur;
- size_t size;
-};
-
-static int
-romaji_out_to_string(void *closure, const char *str)
-{
- struct string_buf *sb = closure;
- size_t len = strlen(str);
-
- if (len > sb->size)
- return 0;
- memcpy(sb->cur, str, len);
- sb->cur += len;
- sb->size -= len;
- return len;
-}
-
-int
-kana_to_romaji_str(const XChar2b *input, size_t size, char **sptr)
-{
- size_t outsize = 3 * size;
- struct string_buf sb;
- int rc;
-
- sb.buf = xmalloc(outsize + 1);
- sb.cur = sb.buf;
- sb.size = outsize;
- rc = kana_to_romaji(input, size, romaji_out_to_string, &sb);
- *sb.cur = 0;
- *sptr = sb.buf;
- return rc;
-}
-
-#if 0
-int
-main(void)
-{
- char *text[] = {
- "...$8$c$/$7$s...",
- "$B$7$s$V$s(B",
- "$B$j$C$Q$@(B",
- "$B$K$[$s$,$C$+(B",
- "$B$K$C$]$s(B",
- "$B$7$e$C$;$-(B",
- "$B$$$C$7$g(B",
- "$B$m$C$T$c$/(B",
- "$B$7$e$C$]$D(B",
- "$B$-$C$5$F$s(B",
- "$B$1$C$+(B",
- "$B$A$g$C$H(B",
- "$B$?$C$F$/$@$5$$(B",
- "$B$*$s$J(B",
- /* $B$*$+$"$5$s(B */
- "$B$A$$$5$$(B",
- "$B$/$&$3$&(B",
- "$B$K$e$&$,$/(B",
- "$B$*$M$5$s(B",
- "$B$$$b$&$H(B",
- "$B$7$g$/$I$&(B",
- "$B$I$h$&$S(B",
- "$B$-$g$&$@$$(B",
- "$B$j$g$&$7$s(B",
- "$B$-$g$&$7$D(B",
- "$B$3$&$3$&(B",
- "$B$-$g$&(B",
- "$B$*$*$-$$(B",
- "$B%3!<%R!<(B",
- "$B%h!<%m%C%Q(B",
- "$B%S!<%k(B",
- /* "$B%"%s%1!<%H(B", */
- "$B%]!<%i%s%I(B",
- NULL
- };
- char *buf;
- int i;
- int n;
-
- for (i = 0; text[i]; i++) {
- n = kana_to_romaji_str(text[i]+3, (strlen(text[i])-6)/2, &buf);
- printf("%2d: (%2d) %s\n",i, n, buf);
- }
-}
-#endif
-
-/* Local variables: */
-/* buffer-file-coding-system: iso-2022-jp-unix */
-/* End: */
-
diff --git a/makedict/utils.c b/makedict/utils.c
deleted file mode 100644
index 7304828..0000000
--- a/makedict/utils.c
+++ b/dev/null
@@ -1,54 +0,0 @@
-/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
-
- GNU Dico 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 3, or (at your option)
- any later version.
-
- GNU Dico 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 GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <makedict.h>
-
-FILE *
-open_compressed(char *dictname, int *pflag)
-{
- FILE *fp;
- char *command_string;
- int namelen; /* length of filename, and flag */
- int extlen;
-
- if (access(dictname, R_OK) != 0) {
- return NULL;
- }
-#ifdef UNCOMPRESS
- namelen = strlen(dictname);
- extlen = strlen(UNCOMPRESSEXT);
- if (strncmp(&dictname[namelen - extlen], UNCOMPRESSEXT, extlen) != 0) {
- namelen = 0; /* flag for later on */
- fp = fopen(dictname, "r");
- } else {
- size_t command_len = sizeof(UNCOMPRESS) + 1 + namelen;
- command_string = xmalloc(command_len);
- strcpy(command_string, UNCOMPRESS);
- strcat(command_string, " ");
- strcat(command_string, dictname);
- fp = popen(command_string, "r");
- free(command_string);
- }
- *pflag = namelen;
-#else
- *pflag = 0;
- fp = fopen(dictname, "r");
-#endif /* UNCOMPRESS */
-
- return fp;
-
-}
-
diff --git a/modules/dict.org/Makefile.am b/modules/dict.org/Makefile.am
index d077a0c..37858e1 100644
--- a/modules/dict.org/Makefile.am
+++ b/modules/dict.org/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,5 +29,5 @@ noinst_HEADERS = \
dictorg.h
dictorg_la_LIBADD = ../../lib/libdico.la -lz
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
EXTRA_DIST=module.ac
diff --git a/modules/dict.org/dictorg.c b/modules/dict.org/dictorg.c
index 7eacfbc..29e5df2 100644
--- a/modules/dict.org/dictorg.c
+++ b/modules/dict.org/dictorg.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/dictorg.h b/modules/dict.org/dictorg.h
index db17014..e7fd7b2 100644
--- a/modules/dict.org/dictorg.h
+++ b/modules/dict.org/dictorg.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <ctype.h>
#include <sys/stat.h>
diff --git a/modules/dict.org/dictstr.c b/modules/dict.org/dictstr.c
index 5f004c7..7368db0 100644
--- a/modules/dict.org/dictstr.c
+++ b/modules/dict.org/dictstr.c
@@ -1,5 +1,5 @@
/* This file is part of Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/Makefile.am b/modules/dict.org/tests/Makefile.am
index 10a7e6d..a66c99b 100644
--- a/modules/dict.org/tests/Makefile.am
+++ b/modules/dict.org/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/allchars.at b/modules/dict.org/tests/allchars.at
index f7b6219..1060cb3 100644
--- a/modules/dict.org/tests/allchars.at
+++ b/modules/dict.org/tests/allchars.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/alnum.at b/modules/dict.org/tests/alnum.at
index 7c5d45b..2e025e4 100644
--- a/modules/dict.org/tests/alnum.at
+++ b/modules/dict.org/tests/alnum.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/define.at b/modules/dict.org/tests/define.at
index 95f92ef..9c821ce 100644
--- a/modules/dict.org/tests/define.at
+++ b/modules/dict.org/tests/define.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/exact.at b/modules/dict.org/tests/exact.at
index e47416e..1b04e6d 100644
--- a/modules/dict.org/tests/exact.at
+++ b/modules/dict.org/tests/exact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/ovdefmime.at b/modules/dict.org/tests/ovdefmime.at
index eade302..a4d9d11 100644
--- a/modules/dict.org/tests/ovdefmime.at
+++ b/modules/dict.org/tests/ovdefmime.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/ovdefnomime.at b/modules/dict.org/tests/ovdefnomime.at
index 60f4a47..ae19fbb 100644
--- a/modules/dict.org/tests/ovdefnomime.at
+++ b/modules/dict.org/tests/ovdefnomime.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/ovexact.at b/modules/dict.org/tests/ovexact.at
index e205d31..0cc9577 100644
--- a/modules/dict.org/tests/ovexact.at
+++ b/modules/dict.org/tests/ovexact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/ovshowdb.at b/modules/dict.org/tests/ovshowdb.at
index f8d771c..69bce76 100644
--- a/modules/dict.org/tests/ovshowdb.at
+++ b/modules/dict.org/tests/ovshowdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/prefix.at b/modules/dict.org/tests/prefix.at
index e64c342..337df11 100644
--- a/modules/dict.org/tests/prefix.at
+++ b/modules/dict.org/tests/prefix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/showdb.at b/modules/dict.org/tests/showdb.at
index df86e16..f6b9ccf 100644
--- a/modules/dict.org/tests/showdb.at
+++ b/modules/dict.org/tests/showdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/showinfo.at b/modules/dict.org/tests/showinfo.at
index 9ad3306..eade932 100644
--- a/modules/dict.org/tests/showinfo.at
+++ b/modules/dict.org/tests/showinfo.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/suffix.at b/modules/dict.org/tests/suffix.at
index 1b08e12..73af529 100644
--- a/modules/dict.org/tests/suffix.at
+++ b/modules/dict.org/tests/suffix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/testsuite.at b/modules/dict.org/tests/testsuite.at
index 6ae7cf2..7cd3e10 100644
--- a/modules/dict.org/tests/testsuite.at
+++ b/modules/dict.org/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/vdefine.at b/modules/dict.org/tests/vdefine.at
index de3e8af..ea90eb3 100644
--- a/modules/dict.org/tests/vdefine.at
+++ b/modules/dict.org/tests/vdefine.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/vexact.at b/modules/dict.org/tests/vexact.at
index 5b6a3bd..dc84aa8 100644
--- a/modules/dict.org/tests/vexact.at
+++ b/modules/dict.org/tests/vexact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/vshowdb.at b/modules/dict.org/tests/vshowdb.at
index 1d1f816..f8b7dcd 100644
--- a/modules/dict.org/tests/vshowdb.at
+++ b/modules/dict.org/tests/vshowdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/dict.org/tests/word.at b/modules/dict.org/tests/word.at
index 39a6b6c..45f4684 100644
--- a/modules/dict.org/tests/word.at
+++ b/modules/dict.org/tests/word.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/Makefile.am b/modules/gcide/Makefile.am
index ffa1a36..97f61ba 100644
--- a/modules/gcide/Makefile.am
+++ b/modules/gcide/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,27 +25,25 @@ libgcide_la_SOURCES=webchr.c ent.c markup.l grk.c
gcide_la_SOURCES = gcide.c idx.c
gcide_la_LIBADD = libgcide.la ../../lib/libdico.la $(LIBICONV) @LTLIBINTL@
gcide_la_LDFLAGS = -module -avoid-version -no-undefined
+AM_CPPFLAGS =\
+ -DLIBEXECDIR=\"${libexecdir}\"\
+ @DICO_MODULE_INCLUDES@
libexec_PROGRAMS=idxgcide
idxgcide_SOURCES=idxgcide.l idxgcide-cli.h
idxgcide_LDADD = \
- ../../gnu/libgnu.la\
libgcide.la\
- ../../lib/libxdico.a\
+ ../../xdico/libxdico.la\
../../lib/libdico.la\
$(LIBICONV) \
@LIBINTL@
+idxgcide_CPPFLAGS =\
+ -DLIBEXECDIR=\"${libexecdir}\"\
+ @DICO_PROG_INCLUDES@
noinst_HEADERS = gcide.h
AM_LFLAGS=-d
-AM_CPPFLAGS=\
- -DLIBEXECDIR=\"${libexecdir}\"\
- -I$(top_srcdir)/include\
- -I$(top_builddir)/include\
- @GRECS_INCLUDES@\
- -I$(top_srcdir)/gnu\
- -I$(top_builddir)/gnu
SUFFIXES=.opt .h
diff --git a/modules/gcide/ent.c b/modules/gcide/ent.c
index 233fd63..2e263a9 100644
--- a/modules/gcide/ent.c
+++ b/modules/gcide/ent.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include "gcide.h"
diff --git a/modules/gcide/gcide.c b/modules/gcide/gcide.c
index 91a08ea..0bffc4d 100644
--- a/modules/gcide/gcide.c
+++ b/modules/gcide/gcide.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
diff --git a/modules/gcide/gcide.h b/modules/gcide/gcide.h
index 82ace6c..63d0fa9 100644
--- a/modules/gcide/gcide.h
+++ b/modules/gcide/gcide.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/grk.c b/modules/gcide/grk.c
index 7aca11a..9ee5991 100644
--- a/modules/gcide/grk.c
+++ b/modules/gcide/grk.c
@@ -1,5 +1,5 @@
/* Greek transliteration for GCIDE. This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include "gcide.h"
diff --git a/modules/gcide/idx.c b/modules/gcide/idx.c
index 44ef46f..6035d18 100644
--- a/modules/gcide/idx.c
+++ b/modules/gcide/idx.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
diff --git a/modules/gcide/idxgcide-cli.opt b/modules/gcide/idxgcide-cli.opt
index 21b3a66..693aedb 100644
--- a/modules/gcide/idxgcide-cli.opt
+++ b/modules/gcide/idxgcide-cli.opt
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico. -*- c -*-
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/idxgcide.l b/modules/gcide/idxgcide.l
index f026d9d..3eff521 100644
--- a/modules/gcide/idxgcide.l
+++ b/modules/gcide/idxgcide.l
@@ -1,6 +1,6 @@
%top {
/* This file is part of GNU Dico.
- Copyright (C) 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,9 +15,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
#include <getopt.h>
diff --git a/modules/gcide/markup.l b/modules/gcide/markup.l
index bfd8598..8395849 100644
--- a/modules/gcide/markup.l
+++ b/modules/gcide/markup.l
@@ -1,6 +1,6 @@
%top {
/* This file is part of GNU Dico.
- Copyright (C) 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,9 +15,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
#include <getopt.h>
diff --git a/modules/gcide/tests/Makefile.am b/modules/gcide/tests/Makefile.am
index f035aee..5c2fb28 100644
--- a/modules/gcide/tests/Makefile.am
+++ b/modules/gcide/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -53,6 +53,7 @@ noinst_PROGRAMS=degcide greek exgrk
degcide_LDADD = ../libgcide.la ../../../lib/libdico.la $(LIBICONV) @LIBINTL@
greek_LDADD = ../libgcide.la ../../../lib/libdico.la $(LIBICONV) @LIBINTL@
AM_CPPFLAGS = \
+ @DICO_LIB_CONFIG@\
-I$(top_srcdir)/include\
-I$(top_builddir)/include\
-I$(top_srcdir)/modules/gcide\
diff --git a/modules/gcide/tests/all.at b/modules/gcide/tests/all.at
index 2ed1f3b..d976e93 100644
--- a/modules/gcide/tests/all.at
+++ b/modules/gcide/tests/all.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/atlocal.in b/modules/gcide/tests/atlocal.in
index d516b41..4b37a67 100644
--- a/modules/gcide/tests/atlocal.in
+++ b/modules/gcide/tests/atlocal.in
@@ -1,6 +1,6 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:@abs_top_builddir@/modules/gcide:$PATH
DICTDIR=@abs_srcdir@/dict
diff --git a/modules/gcide/tests/autoidx.at b/modules/gcide/tests/autoidx.at
index 611ebf0..32da85b 100644
--- a/modules/gcide/tests/autoidx.at
+++ b/modules/gcide/tests/autoidx.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def00.at b/modules/gcide/tests/def00.at
index 61ae7eb..af0122d 100644
--- a/modules/gcide/tests/def00.at
+++ b/modules/gcide/tests/def00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def01.at b/modules/gcide/tests/def01.at
index d319ce4..c2428fc 100644
--- a/modules/gcide/tests/def01.at
+++ b/modules/gcide/tests/def01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def02.at b/modules/gcide/tests/def02.at
index 245df94..aa196d3 100644
--- a/modules/gcide/tests/def02.at
+++ b/modules/gcide/tests/def02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def03.at b/modules/gcide/tests/def03.at
index 70f4388..b35ccdc 100644
--- a/modules/gcide/tests/def03.at
+++ b/modules/gcide/tests/def03.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def04.at b/modules/gcide/tests/def04.at
index fa9dc19..2dcfc35 100644
--- a/modules/gcide/tests/def04.at
+++ b/modules/gcide/tests/def04.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def05.at b/modules/gcide/tests/def05.at
index 33265c3..ab1a1da 100644
--- a/modules/gcide/tests/def05.at
+++ b/modules/gcide/tests/def05.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/def06.at b/modules/gcide/tests/def06.at
index af7fbea..d446335 100644
--- a/modules/gcide/tests/def06.at
+++ b/modules/gcide/tests/def06.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/degcide.c b/modules/gcide/tests/degcide.c
index f02d3f8..1290e93 100644
--- a/modules/gcide/tests/degcide.c
+++ b/modules/gcide/tests/degcide.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
#include <sys/stat.h>
diff --git a/modules/gcide/tests/descr.at b/modules/gcide/tests/descr.at
index e6ed9d9..64656f8 100644
--- a/modules/gcide/tests/descr.at
+++ b/modules/gcide/tests/descr.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/exact.at b/modules/gcide/tests/exact.at
index cfd53ca..ab0a93a 100644
--- a/modules/gcide/tests/exact.at
+++ b/modules/gcide/tests/exact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/exgrk.c b/modules/gcide/tests/exgrk.c
index 99b0d0e..ff881fb 100644
--- a/modules/gcide/tests/exgrk.c
+++ b/modules/gcide/tests/exgrk.c
@@ -1,5 +1,5 @@
/* Extract greek transliterations from GCIDE. This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/greek.at b/modules/gcide/tests/greek.at
index 5fba841..c899fce 100644
--- a/modules/gcide/tests/greek.at
+++ b/modules/gcide/tests/greek.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/greek.c b/modules/gcide/tests/greek.c
index e7060bd..aca0664 100644
--- a/modules/gcide/tests/greek.c
+++ b/modules/gcide/tests/greek.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
diff --git a/modules/gcide/tests/idx.at b/modules/gcide/tests/idx.at
index dd80aac..1fa5b88 100644
--- a/modules/gcide/tests/idx.at
+++ b/modules/gcide/tests/idx.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/info.at b/modules/gcide/tests/info.at
index 1abd183..3ef44f2 100644
--- a/modules/gcide/tests/info.at
+++ b/modules/gcide/tests/info.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/markup.at b/modules/gcide/tests/markup.at
index 1a630ac..1822429 100644
--- a/modules/gcide/tests/markup.at
+++ b/modules/gcide/tests/markup.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/nopr.at b/modules/gcide/tests/nopr.at
index 5f56fbe..591d3b3 100644
--- a/modules/gcide/tests/nopr.at
+++ b/modules/gcide/tests/nopr.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/prefix.at b/modules/gcide/tests/prefix.at
index 84093a3..43bb6e3 100644
--- a/modules/gcide/tests/prefix.at
+++ b/modules/gcide/tests/prefix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/tests/testsuite.at b/modules/gcide/tests/testsuite.at
index 9194238..9deba3e 100644
--- a/modules/gcide/tests/testsuite.at
+++ b/modules/gcide/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/gcide/webchr.c b/modules/gcide/webchr.c
index 8b60099..4e851b9 100644
--- a/modules/gcide/webchr.c
+++ b/modules/gcide/webchr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include "gcide.h"
diff --git a/modules/guile/Makefile.am b/modules/guile/Makefile.am
index 51b319a..b7ffa0b 100644
--- a/modules/guile/Makefile.am
+++ b/modules/guile/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,10 @@ mod_LTLIBRARIES=guile.la
guile_la_SOURCES = guile.c
guile_la_LIBADD = ../../lib/libdico.la @GUILE_LIBS@
AM_LDFLAGS = -module -avoid-version -no-undefined -rpath $(moddir)
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include @GRECS_INCLUDES@ @GUILE_INCLUDES@
+AM_CPPFLAGS = \
+ -I$(builddir)\
+ @DICO_MODULE_INCLUDES@\
+ @GUILE_INCLUDES@
SUFFIXES =
BUILT_SOURCES =
diff --git a/modules/guile/guile.c b/modules/guile/guile.c
index e250219..f7201bc 100644
--- a/modules/guile/guile.c
+++ b/modules/guile/guile.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <unistd.h>
#include <fcntl.h>
diff --git a/modules/guile/module.ac b/modules/guile/module.ac
index 6756130..994558e 100644
--- a/modules/guile/module.ac
+++ b/modules/guile/module.ac
@@ -1,5 +1,5 @@
## This file is part of GNU Dico
-## Copyright (C) 2014-2018 Sergey Poznyakoff
+## Copyright (C) 2014-2019 Sergey Poznyakoff
##
## GNU Dico is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/Makefile.am b/modules/guile/tests/Makefile.am
index b7a13c2..996fa4e 100644
--- a/modules/guile/tests/Makefile.am
+++ b/modules/guile/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/atlocal.in b/modules/guile/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/guile/tests/atlocal.in
+++ b/modules/guile/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/guile/tests/define.at b/modules/guile/tests/define.at
index e041eae..ef60f6b 100644
--- a/modules/guile/tests/define.at
+++ b/modules/guile/tests/define.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/exact.at b/modules/guile/tests/exact.at
index f2c57a4..2610e8d 100644
--- a/modules/guile/tests/exact.at
+++ b/modules/guile/tests/exact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/lev.at b/modules/guile/tests/lev.at
index 7dbafa6..3ef8cf4 100644
--- a/modules/guile/tests/lev.at
+++ b/modules/guile/tests/lev.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/mime.at b/modules/guile/tests/mime.at
index dda122a..6d5f7bf 100644
--- a/modules/guile/tests/mime.at
+++ b/modules/guile/tests/mime.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/mime2.at b/modules/guile/tests/mime2.at
index 7b9b6a4..3f6b4ec 100644
--- a/modules/guile/tests/mime2.at
+++ b/modules/guile/tests/mime2.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2018 Sergey Poznyakoff
+# Copyright (C) 2018-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/prefix.at b/modules/guile/tests/prefix.at
index e1572aa..eaf8a9f 100644
--- a/modules/guile/tests/prefix.at
+++ b/modules/guile/tests/prefix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/showdb.at b/modules/guile/tests/showdb.at
index c531fc7..6556aa1 100644
--- a/modules/guile/tests/showdb.at
+++ b/modules/guile/tests/showdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/showinfo.at b/modules/guile/tests/showinfo.at
index 4de49f8..3728002 100644
--- a/modules/guile/tests/showinfo.at
+++ b/modules/guile/tests/showinfo.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/showlang.at b/modules/guile/tests/showlang.at
index 7bb6c46..f4cf721 100644
--- a/modules/guile/tests/showlang.at
+++ b/modules/guile/tests/showlang.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/suffix.at b/modules/guile/tests/suffix.at
index 747db48..5b0fa11 100644
--- a/modules/guile/tests/suffix.at
+++ b/modules/guile/tests/suffix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/guile/tests/testsuite.at b/modules/guile/tests/testsuite.at
index fba0e9f..720550f 100644
--- a/modules/guile/tests/testsuite.at
+++ b/modules/guile/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/ldap/Makefile.am b/modules/ldap/Makefile.am
index 4a61cec..821def6 100644
--- a/modules/ldap/Makefile.am
+++ b/modules/ldap/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,5 +21,5 @@ mod_LTLIBRARIES=ldap.la
ldap_la_SOURCES = ldap.c
ldap_la_LIBADD = ../../lib/libdico.la -lldap
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include @GRECS_INCLUDES@
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
EXTRA_DIST=module.ac
diff --git a/modules/ldap/ldap.c b/modules/ldap/ldap.c
index 7f6321b..43b8690 100644
--- a/modules/ldap/ldap.c
+++ b/modules/ldap/ldap.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <appi18n.h>
#include <wordsplit.h>
diff --git a/modules/ldap/module.ac b/modules/ldap/module.ac
index b0eff06..fe29e78 100644
--- a/modules/ldap/module.ac
+++ b/modules/ldap/module.ac
@@ -1,5 +1,5 @@
## This file is part of GNU Dico
-## Copyright (C) 2014-2018 Sergey Poznyakoff
+## Copyright (C) 2014-2019 Sergey Poznyakoff
##
## GNU Dico is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/Makefile.am b/modules/metaphone2/Makefile.am
index af44d5b..bd4d316 100644
--- a/modules/metaphone2/Makefile.am
+++ b/modules/metaphone2/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2014-2018 Sergey Poznyakoff
+# Copyright (C) 2014-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,4 +23,4 @@ mod_LTLIBRARIES=metaphone2.la
metaphone2_la_SOURCES = metaphone2.c
metaphone2_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/metaphone2/metaphone2.c b/modules/metaphone2/metaphone2.c
index ffe0fc9..8039c14 100644
--- a/modules/metaphone2/metaphone2.c
+++ b/modules/metaphone2/metaphone2.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <appi18n.h>
#include <string.h>
diff --git a/modules/metaphone2/tests/Makefile.am b/modules/metaphone2/tests/Makefile.am
index 209eb07..639a0b6 100644
--- a/modules/metaphone2/tests/Makefile.am
+++ b/modules/metaphone2/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/atlocal.in b/modules/metaphone2/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/metaphone2/tests/atlocal.in
+++ b/modules/metaphone2/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/metaphone2/tests/build.at b/modules/metaphone2/tests/build.at
index cb4c66c..013b1e4 100644
--- a/modules/metaphone2/tests/build.at
+++ b/modules/metaphone2/tests/build.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/comp00.at b/modules/metaphone2/tests/comp00.at
index b716d53..c3ff8f5 100644
--- a/modules/metaphone2/tests/comp00.at
+++ b/modules/metaphone2/tests/comp00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/comp01.at b/modules/metaphone2/tests/comp01.at
index 4f00647..76e62d5 100644
--- a/modules/metaphone2/tests/comp01.at
+++ b/modules/metaphone2/tests/comp01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/comp02.at b/modules/metaphone2/tests/comp02.at
index 62b59ee..c389068 100644
--- a/modules/metaphone2/tests/comp02.at
+++ b/modules/metaphone2/tests/comp02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/encode.at b/modules/metaphone2/tests/encode.at
index 28a1403..0765108 100644
--- a/modules/metaphone2/tests/encode.at
+++ b/modules/metaphone2/tests/encode.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/match00.at b/modules/metaphone2/tests/match00.at
index b9714a2..704bfa1 100644
--- a/modules/metaphone2/tests/match00.at
+++ b/modules/metaphone2/tests/match00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/metaphone2/tests/testsuite.at b/modules/metaphone2/tests/testsuite.at
index 207953f..540cbc1 100644
--- a/modules/metaphone2/tests/testsuite.at
+++ b/modules/metaphone2/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/Makefile.am b/modules/nprefix/Makefile.am
index b428aca..f47f271 100644
--- a/modules/nprefix/Makefile.am
+++ b/modules/nprefix/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2010-2018 Sergey Poznyakoff
+# Copyright (C) 2010-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,4 +22,4 @@ mod_LTLIBRARIES=nprefix.la
nprefix_la_SOURCES = nprefix.c
nprefix_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/nprefix/nprefix.c b/modules/nprefix/nprefix.c
index 284a05a..1a049c5 100644
--- a/modules/nprefix/nprefix.c
+++ b/modules/nprefix/nprefix.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdlib.h>
#include <string.h>
diff --git a/modules/nprefix/tests/Makefile.am b/modules/nprefix/tests/Makefile.am
index 2f0c7b1..9cf9d3c 100644
--- a/modules/nprefix/tests/Makefile.am
+++ b/modules/nprefix/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/tests/atlocal.in b/modules/nprefix/tests/atlocal.in
index 9e66f2b..75ca988 100644
--- a/modules/nprefix/tests/atlocal.in
+++ b/modules/nprefix/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_top_builddir@/dicod:$PATH
diff --git a/modules/nprefix/tests/np00.at b/modules/nprefix/tests/np00.at
index fdba1a7..0fa29d2 100644
--- a/modules/nprefix/tests/np00.at
+++ b/modules/nprefix/tests/np00.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/tests/np01.at b/modules/nprefix/tests/np01.at
index 8bf2eb7..0942f10 100644
--- a/modules/nprefix/tests/np01.at
+++ b/modules/nprefix/tests/np01.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/tests/np02.at b/modules/nprefix/tests/np02.at
index 3e8af99..b97cb0f 100644
--- a/modules/nprefix/tests/np02.at
+++ b/modules/nprefix/tests/np02.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/tests/np03.at b/modules/nprefix/tests/np03.at
index 49c4068..09ad2ef 100644
--- a/modules/nprefix/tests/np03.at
+++ b/modules/nprefix/tests/np03.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/tests/np04.at b/modules/nprefix/tests/np04.at
index f37798e..ccb490c 100644
--- a/modules/nprefix/tests/np04.at
+++ b/modules/nprefix/tests/np04.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/nprefix/tests/testsuite.at b/modules/nprefix/tests/testsuite.at
index 195d40b..d15c0be 100644
--- a/modules/nprefix/tests/testsuite.at
+++ b/modules/nprefix/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/Makefile.am b/modules/outline/Makefile.am
index 9b49faf..0f87929 100644
--- a/modules/outline/Makefile.am
+++ b/modules/outline/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,4 +22,4 @@ mod_LTLIBRARIES=outline.la
outline_la_SOURCES = outline.c
outline_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include @GRECS_INCLUDES@
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/outline/outline.c b/modules/outline/outline.c
index e27530a..60f2228 100644
--- a/modules/outline/outline.c
+++ b/modules/outline/outline.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,9 +53,7 @@
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <stdlib.h>
diff --git a/modules/outline/tests/Makefile.am b/modules/outline/tests/Makefile.am
index 32175c7..79fec9e 100644
--- a/modules/outline/tests/Makefile.am
+++ b/modules/outline/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/atlocal.in b/modules/outline/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/outline/tests/atlocal.in
+++ b/modules/outline/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/outline/tests/define.at b/modules/outline/tests/define.at
index ed08ce9..0c201fe 100644
--- a/modules/outline/tests/define.at
+++ b/modules/outline/tests/define.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/dlev.at b/modules/outline/tests/dlev.at
index 8f35b9b..59fb453 100644
--- a/modules/outline/tests/dlev.at
+++ b/modules/outline/tests/dlev.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/dnlev.at b/modules/outline/tests/dnlev.at
index a683801..72f6fc1 100644
--- a/modules/outline/tests/dnlev.at
+++ b/modules/outline/tests/dnlev.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/exact.at b/modules/outline/tests/exact.at
index 46e9464..ceabbbd 100644
--- a/modules/outline/tests/exact.at
+++ b/modules/outline/tests/exact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/lev.at b/modules/outline/tests/lev.at
index d292406..98bcddb 100644
--- a/modules/outline/tests/lev.at
+++ b/modules/outline/tests/lev.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/mime.at b/modules/outline/tests/mime.at
index 2b6bc20..9f38817 100644
--- a/modules/outline/tests/mime.at
+++ b/modules/outline/tests/mime.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/nlev.at b/modules/outline/tests/nlev.at
index 0a8f9b2..11d5960 100644
--- a/modules/outline/tests/nlev.at
+++ b/modules/outline/tests/nlev.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/prefix.at b/modules/outline/tests/prefix.at
index c2a2674..a20bb88 100644
--- a/modules/outline/tests/prefix.at
+++ b/modules/outline/tests/prefix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/re.at b/modules/outline/tests/re.at
index c025d2e..e75e0b5 100644
--- a/modules/outline/tests/re.at
+++ b/modules/outline/tests/re.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/regexp.at b/modules/outline/tests/regexp.at
index 153479c..528762b 100644
--- a/modules/outline/tests/regexp.at
+++ b/modules/outline/tests/regexp.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/showdb.at b/modules/outline/tests/showdb.at
index 8c0cf50..1354db7 100644
--- a/modules/outline/tests/showdb.at
+++ b/modules/outline/tests/showdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/showinfo.at b/modules/outline/tests/showinfo.at
index 2c946c3..344588a 100644
--- a/modules/outline/tests/showinfo.at
+++ b/modules/outline/tests/showinfo.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/showlang.at b/modules/outline/tests/showlang.at
index 318048b..89ee99b 100644
--- a/modules/outline/tests/showlang.at
+++ b/modules/outline/tests/showlang.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/soundex.at b/modules/outline/tests/soundex.at
index 869ebe5..d33c393 100644
--- a/modules/outline/tests/soundex.at
+++ b/modules/outline/tests/soundex.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/suffix.at b/modules/outline/tests/suffix.at
index 170d294..594cb98 100644
--- a/modules/outline/tests/suffix.at
+++ b/modules/outline/tests/suffix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/outline/tests/testsuite.at b/modules/outline/tests/testsuite.at
index 0bdc49e..b2df3a3 100644
--- a/modules/outline/tests/testsuite.at
+++ b/modules/outline/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/pam/Makefile.am b/modules/pam/Makefile.am
index 84eda3c..72c233d 100644
--- a/modules/pam/Makefile.am
+++ b/modules/pam/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,5 +21,5 @@ mod_LTLIBRARIES=pam.la
pam_la_SOURCES = pam.c
pam_la_LIBADD = ../../lib/libdico.la -lpam @PAM_LIBS@
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include @GRECS_INCLUDES@
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
EXTRA_DIST=module.ac
diff --git a/modules/pam/module.ac b/modules/pam/module.ac
index ebc1311..66563fd 100644
--- a/modules/pam/module.ac
+++ b/modules/pam/module.ac
@@ -1,5 +1,5 @@
## This file is part of GNU Dico
-## Copyright (C) 2014-2018 Sergey Poznyakoff
+## Copyright (C) 2014-2019 Sergey Poznyakoff
##
## GNU Dico is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/modules/pam/pam.c b/modules/pam/pam.c
index fc555e0..03505de 100644
--- a/modules/pam/pam.c
+++ b/modules/pam/pam.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <appi18n.h>
#include <wordsplit.h>
diff --git a/modules/pcre/Makefile.am b/modules/pcre/Makefile.am
index 48afd3c..8cccb7f 100644
--- a/modules/pcre/Makefile.am
+++ b/modules/pcre/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2010, 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2010-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,5 +21,5 @@ mod_LTLIBRARIES=pcre.la
pcre_la_SOURCES = pcre.c
pcre_la_LIBADD = ../../lib/libdico.la -lpcre
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
EXTRA_DIST=module.ac
diff --git a/modules/pcre/module.ac b/modules/pcre/module.ac
index f2a8608..e501ee6 100644
--- a/modules/pcre/module.ac
+++ b/modules/pcre/module.ac
@@ -1,5 +1,5 @@
## This file is part of GNU Dico
-## Copyright (C) 2014, 2016-2018 Sergey Poznyakoff
+## Copyright (C) 2014-2019 Sergey Poznyakoff
##
## GNU Dico is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/modules/pcre/pcre.c b/modules/pcre/pcre.c
index 7b90833..14a0c09 100644
--- a/modules/pcre/pcre.c
+++ b/modules/pcre/pcre.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/modules/python/Makefile.am b/modules/python/Makefile.am
index 05666ce..7975752 100644
--- a/modules/python/Makefile.am
+++ b/modules/python/Makefile.am
@@ -28,5 +28,5 @@ endif
python_la_LIBADD = ../../lib/libdico.la @PYTHON_LIBS@
AM_LDFLAGS = -module -avoid-version -no-undefined -rpath $(moddir)
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include @PYTHON_INCLUDES@
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@ @PYTHON_INCLUDES@
EXTRA_DIST=module.ac
diff --git a/modules/python/module.ac b/modules/python/module.ac
index 0e4abee..e33e5b7 100644
--- a/modules/python/module.ac
+++ b/modules/python/module.ac
@@ -1,5 +1,5 @@
## This file is part of GNU Dico
-## Copyright (C) 2014-2018 Sergey Poznyakoff
+## Copyright (C) 2014-2019 Sergey Poznyakoff
##
## GNU Dico is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/modules/python/python.c b/modules/python/python.c
index 898c405..f2b838a 100644
--- a/modules/python/python.c
+++ b/modules/python/python.c
@@ -1,5 +1,6 @@
/* This file is part of GNU Dico.
Copyright (C) 2008, 2012 Wojciech Polak
+ Copyright (C) 2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +15,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <Python.h>
#include <dico.h>
#include <string.h>
diff --git a/modules/python/python2.c b/modules/python/python2.c
index b9acfb2..5df6940 100644
--- a/modules/python/python2.c
+++ b/modules/python/python2.c
@@ -1,5 +1,6 @@
/* This file is part of GNU Dico.
Copyright (C) 2008, 2012 Wojciech Polak
+ Copyright (C) 2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +15,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <Python.h>
#include <dico.h>
#include <string.h>
diff --git a/modules/python/tests/Makefile.am b/modules/python/tests/Makefile.am
index 99ca92c..ec49870 100644
--- a/modules/python/tests/Makefile.am
+++ b/modules/python/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/atlocal.in b/modules/python/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/python/tests/atlocal.in
+++ b/modules/python/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/python/tests/define.at b/modules/python/tests/define.at
index 0308b14..bd96f3e 100644
--- a/modules/python/tests/define.at
+++ b/modules/python/tests/define.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/exact.at b/modules/python/tests/exact.at
index d5527e0..c11010d 100644
--- a/modules/python/tests/exact.at
+++ b/modules/python/tests/exact.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/lev.at b/modules/python/tests/lev.at
index ed0dae2..b1d782b 100644
--- a/modules/python/tests/lev.at
+++ b/modules/python/tests/lev.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/mime.at b/modules/python/tests/mime.at
index 9fb6868..53fff58 100644
--- a/modules/python/tests/mime.at
+++ b/modules/python/tests/mime.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/prefix.at b/modules/python/tests/prefix.at
index 0b57e64..8be0680 100644
--- a/modules/python/tests/prefix.at
+++ b/modules/python/tests/prefix.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/showdb.at b/modules/python/tests/showdb.at
index a38e3c0..4e97b7c 100644
--- a/modules/python/tests/showdb.at
+++ b/modules/python/tests/showdb.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/showinfo.at b/modules/python/tests/showinfo.at
index cacb7d3..98f967b 100644
--- a/modules/python/tests/showinfo.at
+++ b/modules/python/tests/showinfo.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/showlang.at b/modules/python/tests/showlang.at
index bfe9fd5..eb91ebb 100644
--- a/modules/python/tests/showlang.at
+++ b/modules/python/tests/showlang.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/python/tests/testsuite.at b/modules/python/tests/testsuite.at
index a0a7039..46c589b 100644
--- a/modules/python/tests/testsuite.at
+++ b/modules/python/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/stratall/Makefile.am b/modules/stratall/Makefile.am
index 8bea096..5216b9d 100644
--- a/modules/stratall/Makefile.am
+++ b/modules/stratall/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,4 +23,4 @@ mod_LTLIBRARIES=stratall.la
stratall_la_SOURCES = stratall.c
stratall_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/stratall/stratall.c b/modules/stratall/stratall.c
index b07b2ab..876a34f 100644
--- a/modules/stratall/stratall.c
+++ b/modules/stratall/stratall.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <stdlib.h>
diff --git a/modules/stratall/tests/Makefile.am b/modules/stratall/tests/Makefile.am
index 3237eab..2d0e7c1 100644
--- a/modules/stratall/tests/Makefile.am
+++ b/modules/stratall/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/stratall/tests/atlocal.in b/modules/stratall/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/stratall/tests/atlocal.in
+++ b/modules/stratall/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/stratall/tests/testsuite.at b/modules/stratall/tests/testsuite.at
index 864d232..7bc5f7d 100644
--- a/modules/stratall/tests/testsuite.at
+++ b/modules/stratall/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/stub.am b/modules/stub.am
index d16a004..0f1f66a 100644
--- a/modules/stub.am
+++ b/modules/stub.am
@@ -1,6 +1,6 @@
# <HEADING#>
# This file is part of GNU Dico
-# Copyright (C) 1998-2000, 2008, 2010, 2012-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/substr/Makefile.am b/modules/substr/Makefile.am
index a9aa67d..ffa23f8 100644
--- a/modules/substr/Makefile.am
+++ b/modules/substr/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,4 +22,4 @@ mod_LTLIBRARIES=substr.la
substr_la_SOURCES = substr.c
substr_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/substr/substr.c b/modules/substr/substr.c
index 90bb968..67734ee 100644
--- a/modules/substr/substr.c
+++ b/modules/substr/substr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <string.h>
#include <stdlib.h>
diff --git a/modules/substr/tests/Makefile.am b/modules/substr/tests/Makefile.am
index 3237eab..2d0e7c1 100644
--- a/modules/substr/tests/Makefile.am
+++ b/modules/substr/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/substr/tests/atlocal.in b/modules/substr/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/substr/tests/atlocal.in
+++ b/modules/substr/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/substr/tests/testsuite.at b/modules/substr/tests/testsuite.at
index fc92ded..8e65c7d 100644
--- a/modules/substr/tests/testsuite.at
+++ b/modules/substr/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/template.scm b/modules/template.scm
index 91ff993..6004846 100644
--- a/modules/template.scm
+++ b/modules/template.scm
@@ -1,5 +1,5 @@
;;;; This file is part of GNU Dico.
-;;;; Copyright (C) 2008-2018 Sergey Poznyakoff
+;;;; Copyright (C) 2008-2019 Sergey Poznyakoff
;;;;
;;;; GNU Dico is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
diff --git a/modules/template/Makefile.am b/modules/template/Makefile.am
index 8863aa9..2fdd87b 100644
--- a/modules/template/Makefile.am
+++ b/modules/template/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2014-2018 Sergey Poznyakoff
+# Copyright (C) 2014-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,4 +23,4 @@ mod_LTLIBRARIES=<MODNAME>.la
<MODNAME>_la_SOURCES = <MODNAME>.c
<MODNAME>_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/template/module.c b/modules/template/module.c
index adae65f..c25e347 100644
--- a/modules/template/module.c
+++ b/modules/template/module.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
static int
diff --git a/modules/template/tests/Makefile.am b/modules/template/tests/Makefile.am
index 3015583..719f3e4 100644
--- a/modules/template/tests/Makefile.am
+++ b/modules/template/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2000, 2008, 2010, 2012, 2016-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/template/tests/atlocal.in b/modules/template/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/template/tests/atlocal.in
+++ b/modules/template/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/template/tests/testsuite.at b/modules/template/tests/testsuite.at
index 47af006..7cc775a 100644
--- a/modules/template/tests/testsuite.at
+++ b/modules/template/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2016-2018 Sergey Poznyakoff
+# Copyright (C) 2016-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/word/Makefile.am b/modules/word/Makefile.am
index 3dc8fa2..aefe24e 100644
--- a/modules/word/Makefile.am
+++ b/modules/word/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2010-2018 Sergey Poznyakoff
+# Copyright (C) 2010-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,4 +22,4 @@ mod_LTLIBRARIES=word.la
word_la_SOURCES = word.c
word_la_LIBADD = ../../lib/libdico.la
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@
diff --git a/modules/word/tests/Makefile.am b/modules/word/tests/Makefile.am
index 4af002d..54ac14b 100644
--- a/modules/word/tests/Makefile.am
+++ b/modules/word/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/word/tests/atlocal.in b/modules/word/tests/atlocal.in
index 531caa6..41651b4 100644
--- a/modules/word/tests/atlocal.in
+++ b/modules/word/tests/atlocal.in
@@ -1,5 +1,5 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Dico test suite.
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/dicod:$top_srcdir:$srcdir:$PATH
diff --git a/modules/word/tests/first.at b/modules/word/tests/first.at
index 8f24b3e..334e05f 100644
--- a/modules/word/tests/first.at
+++ b/modules/word/tests/first.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/word/tests/last.at b/modules/word/tests/last.at
index fcd6bf1..0ac6adb 100644
--- a/modules/word/tests/last.at
+++ b/modules/word/tests/last.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/word/tests/testsuite.at b/modules/word/tests/testsuite.at
index 6e74273..701e7f4 100644
--- a/modules/word/tests/testsuite.at
+++ b/modules/word/tests/testsuite.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/word/tests/word.at b/modules/word/tests/word.at
index 67b3943..612e72d 100644
--- a/modules/word/tests/word.at
+++ b/modules/word/tests/word.at
@@ -1,5 +1,5 @@
# This file is part of GNU Dico. -*- Autotest -*-
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/modules/word/word.c b/modules/word/word.c
index c5e9383..e3c7130 100644
--- a/modules/word/word.c
+++ b/modules/word/word.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2010-2018 Sergey Poznyakoff
+ Copyright (C) 2010-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/modules/wordnet/Makefile.am b/modules/wordnet/Makefile.am
index 72eb554..ecb3d0a 100644
--- a/modules/wordnet/Makefile.am
+++ b/modules/wordnet/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,9 +21,5 @@ mod_LTLIBRARIES=wordnet.la
wordnet_la_SOURCES = wordnet.c
wordnet_la_LIBADD = ../../lib/libdico.la @WORDNET_LOPT@ -l@WORDNET_LIBWN@
AM_LDFLAGS = -module -avoid-version -no-undefined
-AM_CPPFLAGS = \
- -I$(top_srcdir)/include\
- -I$(top_builddir)/include\
- @WORDNET_IOPT@\
- @GRECS_INCLUDES@
+AM_CPPFLAGS = @DICO_MODULE_INCLUDES@ @WORDNET_IOPT@
EXTRA_DIST=module.ac
diff --git a/modules/wordnet/module.ac b/modules/wordnet/module.ac
index 1705a98..f0ec470 100644
--- a/modules/wordnet/module.ac
+++ b/modules/wordnet/module.ac
@@ -1,5 +1,5 @@
## This file is part of GNU Dico
-## Copyright (C) 2014-2018 Sergey Poznyakoff
+## Copyright (C) 2014-2019 Sergey Poznyakoff
##
## GNU Dico is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -48,7 +48,8 @@ if test $status_wordnet != no; then
req) AC_MSG_ERROR([required module wordnet cannot be built because of missing prerequisites]);;
maybe) status_wordnet=no;;
esac
- AM_CONDITIONAL([WORDNET_COND],[test $status_wordnet = yes])
LIBS=$save_LIBS
CPPFLAGS=$save_CPPFLAGS
fi
+
+AM_CONDITIONAL([WORDNET_COND],[test $status_wordnet = yes])
diff --git a/modules/wordnet/wordnet.c b/modules/wordnet/wordnet.c
index e37f19b..ec0fff0 100644
--- a/modules/wordnet/wordnet.c
+++ b/modules/wordnet/wordnet.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2012-2018 Sergey Poznyakoff
+ Copyright (C) 2012-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9cd0cee..a8e0f95 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
# List of Dico files which contain translatable strings.
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,15 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with Dico. If not, see <http://www.gnu.org/licenses/>.
-gnu/strftime.c
-gnu/quotearg.c
-gnu/obstack.c
-gnu/getopt.c
-gnu/strtol.c
+xdico/userprivs.c
+xdico/xstream.c
+xdico/gnu/quotearg.c
+xdico/gnu/obstack.c
+xdico/gnu/getopt.c
+xdico/gnu/strtol.c
lib/parseopt.c
-lib/userprivs.c
-lib/xstream.c
lib/iostr.c
lib/udb.c
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 85e3572..f34ecb1 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/scripts/gcider b/scripts/gcider
index 35ec84a..649f76b 100755
--- a/scripts/gcider
+++ b/scripts/gcider
@@ -2,7 +2,7 @@
# Apart from these three lines, it is actually a -*- tcl -*- script \
exec wish "$0" -- "$@"
# This file is part of GNU Dico
-# Copyright (C) 2012-2018 Sergey Poznyakoff
+# Copyright (C) 2012-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/utils/Makefile.am b/utils/Makefile.am
deleted file mode 100644
index cc8265e..0000000
--- a/utils/Makefile.am
+++ b/dev/null
@@ -1 +0,0 @@
-EXTRA_DIST=bushu.awk
diff --git a/utils/bushu.awk b/utils/bushu.awk
deleted file mode 100644
index 558a2bc..0000000
--- a/utils/bushu.awk
+++ b/dev/null
@@ -1,178 +0,0 @@
-# $Id$
-
-function add(num, code) {
- bushu[bushu_num] = num
- if (key[num]) {
- if (0+key[num] > 0) {
- vkey[vkey_num++] = 0;
- vkey[vkey_num] = key[num]
- key[num] = -vkey_num;
- vkey_num++;
- }
- vkey[vkey_num++] = numstrokes;
- } else
- key[num] = numstrokes
- charcode[bushu_num] = code
- numkeys[numstrokes]++
- bushu_num++
-}
-
-BEGIN {
- FS="( +)|[ \t-]"
- first = 10000
- last = 0
- bushu_num = 1
-}
-
-/^#.*$/ {next}
-
-/\=[0-9][0-9]*/ {
- numstrokes = substr($1, 2)
- if (0+numstrokes > 0+maxstrokes)
- maxstrokes = numstrokes;
- next
-}
-
-/[0-9][0-9]*[ \t][ \t]*[0-9][0-9]*/ {
- add($1, $2)
- if (first > $1)
- first = $1
- if (last < $1)
- last = $1
- next
-}
-
-/[0-9][0-9]*/ {
- add($1, bushu_num)
- if (first > $1)
- first = $1
- if (last < $1)
- last = $1
- next
-}
-
-/^[ \t]*$/ {next}
-
-{
- printf "%d: ignored\n", NR > "/dev/stderr"
-}
-
-END {
- print "/* This file is automatically generated."
- print " * To change it edit file `bushu.dat' and run"
- print " * awk -f bushu.awk bushu.dat > bushu.c"
- print " */"
- print
- print "#ifdef HAVE_CONFIG_H"
- print "# include <config.h>"
- print "#endif"
- print "#include <stdlib.h>"
- print "#include <stdio.h>"
- print "#include <dict.h>"
- print "#include <dico.h>"
- print "#include <bushu.h>"
- print
- printf "int bushu_last = %d;\n", last
- printf "int max_bushu_strokes = %d;\n", maxstrokes
- printf "int bushu_cnt = %d;\n", bushu_num
- print
-
- print "/* Bushu numbers. Indexed with the internal bushu number */"
- printf "int bushu_num[] = {"
- col = 10
- for (i = 0; i < bushu_num; i++) {
- if (col == 10) {
- printf "\n\t"
- col = 0
- }
- printf "%3d, ", bushu[i]
- col++
- }
- printf "\n};\n"
-
-
- print "/* Number of strokes for each bushu */"
- print "/* NOTE: i. This table is indexed with the real bushu number */"
- print "/* ii.Negative entry means the radical has several */"
- print "/* forms/stroke counts. The absolute value of the entry */"
- print "/* serves as index to bushu_var_strokes table */"
- printf "int bushu_stroke[] = {"
- col = 10
- for (i = 0; i <= last; i++) {
- if (col == 10) {
- printf "\n\t"
- col = 0
- }
- printf "%3d, ", key[i]
- col++
- }
- printf "\n};\n"
-
- print "/* Number of strokes for v bushu */"
- printf "int bushu_var_stroke[] = {"
- col = 10
- for (i = 0; i <= vkey_num; i++) {
- if (col == 10) {
- printf "\n\t"
- col = 0
- }
- printf "%3d, ", vkey[i]
- col++
- }
- printf "\n};\n"
-
-# Compute startpoints
- num = 1
- for (i = 1; i <= 0+maxstrokes; i++) {
- start[i] = num
- num += numkeys[i]
- }
- start[i] = num
-
- print "/* bushu_index[i] contains the internal index of the first bushu"
- print " * that has i strokes. "
- print " */"
- printf "int bushu_index[] = {"
- col = 10
- for (i = 0; i <= maxstrokes+1; i++) {
- if (col == 10) {
- printf "\n\t"
- col = 0
- }
- printf "%3d, ", start[i]
- col++
- }
- print "\n};\n"
-
- print "/* Number of radicals that have given number of strokes"
- print " */"
- printf "int bushu_count[] = {"
- col = 10
- maxcount = 0
- for (i = 0; i <= maxstrokes+0; i++) {
- if (col == 10) {
- printf "\n\t"
- col = 0
- }
- printf "%3d, ", start[i+1] - start[i]
- if (start[i+1] - start[i] > maxcount)
- maxcount = start[i+1] - start[i];
- col++
- }
- print "\n};\n"
- printf "int max_bushu_count = %d;\n\n", maxcount
-
- printf "/* Strings representing each radical (for use with bushu.pcf) */\n"
- printf "char bushu_string[%d][2] = {", bushu_num+1
- col = 5
- for (i = 0; i <= bushu_num; i++) {
- if (col == 5) {
- printf "\n\t"
- col = 0
- }
- printf "{ %4d, 0 },", 0+charcode[i]
- col++
- }
- printf "\n};\n"
-}
-
diff --git a/xdico/.gitignore b/xdico/.gitignore
new file mode 100644
index 0000000..983b627
--- a/dev/null
+++ b/xdico/.gitignore
@@ -0,0 +1,2 @@
+/gnu
+!/gnu/Makefile.am
diff --git a/makedict/Makefile.am b/xdico/Makefile.am
index b6c52f8..ce7c896 100644
--- a/makedict/Makefile.am
+++ b/xdico/Makefile.am
@@ -1,5 +1,5 @@
-# This file is part of GNU Dico.
-# Copyright (C) 1998-2018 Sergey Poznyakoff
+# This file is part of GNU Dico
+# Copyright (C) 1998-2019 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,35 +14,35 @@
# You should have received a copy of the GNU General Public License
# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>.
-JDICT_PROGS=makedict
+SUBDIRS = gnu
+
+AM_CPPFLAGS = \
+ @DICO_PROG_CONFIG@\
+ -I${top_srcdir}/include\
+ -I${srcdir}/gnu\
+ -I${builddir}/gnu\
+ -DLOCALEDIR=\"$(localedir)\"
+
+noinst_LTLIBRARIES=libxdico.la
+if COND_LIBDICOSASL
+ noinst_LIBRARIES=libdicosasl.a
+endif
+
+libxdico_la_SOURCES=\
+ appi18n.c\
+ iputil.c\
+ timer.c\
+ userprivs.c\
+ xalloc-die.c\
+ xhostname.c\
+ xscript.c\
+ xstream.c\
+ xtkn.c\
+ xutil.c
+
+libxdico_la_LIBADD = gnu/libgnu.la
+
+libdicosasl_a_SOURCES=\
+ gsaslstr.c
-bin_PROGRAMS=@BUILD_JDICT_PROGS@
-EXTRA_PROGRAMS=makedict
-
-makedict_SOURCES=\
- compile.c\
- index.c\
- main.c\
- makedict.h\
- makedict.c\
- romaji.c\
- utils.c
-
-
-LDADD=\
- ../lib/libxdico.a\
- ../gnu/libgnu.la\
- ../lib/libextra.a\
- ../lib/libdico.la\
- @DB_LIBS@
-
-AP_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/gnu @DB_INCLUDES@
-
-SUFFIXES=.opt .c
-
-.opt.c:
- m4 -s $(top_srcdir)/utils/getopt.m4 $< | sed '1d' > $@
-
-BUILT_SOURCES=makedict.c
-EXTRA_DIST=makedict.opt
diff --git a/lib/appi18n.c b/xdico/appi18n.c
index e08f2cb..ed4e9ff 100644
--- a/lib/appi18n.c
+++ b/xdico/appi18n.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,11 +14,8 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <gettext.h>
-#include <configmake.h>
#include <locale.h>
void
diff --git a/xdico/gnu/Makefile.am b/xdico/gnu/Makefile.am
new file mode 100644
index 0000000..f2969cb
--- a/dev/null
+++ b/xdico/gnu/Makefile.am
@@ -0,0 +1,19 @@
+AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects
+
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_LTLIBRARIES =
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES =
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS = @DICO_PROG_CONFIG@ -I$(srcdir) -I$(builddir)
+AM_CFLAGS =
+
+include gnulib.am
diff --git a/lib/gsaslstr.c b/xdico/gsaslstr.c
index 1449321..83fdc8e 100644
--- a/lib/gsaslstr.c
+++ b/xdico/gsaslstr.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <dico.h>
#include <libi18n.h>
#include <stdlib.h>
diff --git a/lib/iputil.c b/xdico/iputil.c
index 70f57bf..cf11ab6 100644
--- a/lib/iputil.c
+++ b/xdico/iputil.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,10 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
+#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
diff --git a/lib/timer.c b/xdico/timer.c
index 13bacd7..1239108 100644
--- a/lib/timer.c
+++ b/xdico/timer.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <xdico.h>
#include <sys/time.h>
#include <sys/resource.h>
diff --git a/lib/userprivs.c b/xdico/userprivs.c
index 25737f5..cafa237 100644
--- a/lib/userprivs.c
+++ b/xdico/userprivs.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2007-2018 Sergey Poznyakoff
+ Copyright (C) 2007-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/lib/xalloc-die.c b/xdico/xalloc-die.c
index 9d84944..4f42be6 100644
--- a/lib/xalloc-die.c
+++ b/xdico/xalloc-die.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 1998-2018 Sergey Poznyakoff
+ Copyright (C) 1998-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,10 +13,8 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <xdico.h>
#include <sysexits.h>
diff --git a/lib/xhostname.c b/xdico/xhostname.c
index 35baf20..51b9c6d 100644
--- a/lib/xhostname.c
+++ b/xdico/xhostname.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
diff --git a/lib/xscript.c b/xdico/xscript.c
index 7424162..47f0d5d 100644
--- a/lib/xscript.c
+++ b/xdico/xscript.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,9 +21,7 @@
most RFCs - "S: " for data written ("Server"), and "C: " for data read
("Client"). */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <xdico.h>
#include <string.h>
#include <xalloc.h>
diff --git a/lib/xstream.c b/xdico/xstream.c
index 34ac950..ccb3eee 100644
--- a/lib/xstream.c
+++ b/xdico/xstream.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico.
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <xdico.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/lib/xtkn.c b/xdico/xtkn.c
index d4990f4..bf2e136 100644
--- a/lib/xtkn.c
+++ b/xdico/xtkn.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <xdico.h>
#include "xalloc.h"
diff --git a/lib/xutil.c b/xdico/xutil.c
index 2b37188..df14142 100644
--- a/lib/xutil.c
+++ b/xdico/xutil.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Dico
- Copyright (C) 2008-2018 Sergey Poznyakoff
+ Copyright (C) 2008-2019 Sergey Poznyakoff
GNU Dico is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,9 +14,7 @@
You should have received a copy of the GNU General Public License
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include <xdico.h>
#include <xalloc.h>
#include <string.h>

Return to:

Send suggestions and report system problems to the System administrator.