diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-12-24 07:38:37 +0000 |
---|---|---|
committer | <> | 2015-02-02 12:02:29 +0000 |
commit | 482840e61f86ca321838a91e902c41d40c098bbb (patch) | |
tree | 01ea2e242fd2792d19fe192476601587901db794 /gettext-tools/misc | |
download | gettext-tarball-482840e61f86ca321838a91e902c41d40c098bbb.tar.gz |
Imported from /home/lorry/working-area/delta_gettext-tarball/gettext-0.19.4.tar.xz.gettext-0.19.4
Diffstat (limited to 'gettext-tools/misc')
-rw-r--r-- | gettext-tools/misc/ChangeLog | 2712 | ||||
-rw-r--r-- | gettext-tools/misc/DISCLAIM | 62 | ||||
-rw-r--r-- | gettext-tools/misc/Makefile.am | 120 | ||||
-rw-r--r-- | gettext-tools/misc/Makefile.in | 1944 | ||||
-rwxr-xr-x | gettext-tools/misc/add-to-archive | 101 | ||||
-rw-r--r-- | gettext-tools/misc/archive.dir.tar | bin | 0 -> 25835520 bytes | |||
-rw-r--r-- | gettext-tools/misc/autopoint.in | 780 | ||||
-rw-r--r-- | gettext-tools/misc/convert-archive.in | 360 | ||||
-rw-r--r-- | gettext-tools/misc/cvsuser.c | 40 | ||||
-rw-r--r-- | gettext-tools/misc/gettextize.in | 1343 | ||||
-rw-r--r-- | gettext-tools/misc/po-compat.el | 263 | ||||
-rw-r--r-- | gettext-tools/misc/po-mode.el | 3575 | ||||
-rw-r--r-- | gettext-tools/misc/start-po.el | 54 |
13 files changed, 11354 insertions, 0 deletions
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog new file mode 100644 index 0000000..7ce3579 --- /dev/null +++ b/gettext-tools/misc/ChangeLog @@ -0,0 +1,2712 @@ +2014-12-24 Daiki Ueno <ueno@gnu.org> + + * gettext 0.19.4 released. + +2014-12-24 Daiki Ueno <ueno@gnu.org> + + * po-mode.el (po-mode-version-string): Bump to 0.23. + +2014-10-15 Daiki Ueno <ueno@gnu.org> + + * gettext 0.19.3 released. + +2014-10-15 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Update for 0.19.3. + +2014-10-10 Eric Blake <eblake@redhat.com> + + autopoint: Fix infinite recursion when tracing configure.ac + Reported by Andreas Henriksson at: + <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580> + * autopoint.in (func_trace_autoconf): Temporarily redefine + built-in macros, instead of undefining. + * gettextize.in: Likewise. + +2014-09-01 Daiki Ueno <ueno@gnu.org> + + * convert-archive.in: Don't use non-portable 'if ! COMMAND'. + Reported by Stefano Lattarini in: + <https://lists.gnu.org/archive/html/bug-gettext/2011-07/msg00002.html>. + +2014-07-14 Daiki Ueno <ueno@gnu.org> + + * gettext 0.19.2 released. + +2014-07-14 Daiki Ueno <ueno@gnu.org> + + autopoint: Fix the last change + * autopoint.in: Use func_trace_sed for AM_GNU_GETTEXT and + AM_GNU_GETTEXT_VERSION, as they are not an Autoconf trace. + +2014-07-14 Daiki Ueno <ueno@gnu.org> + + autopoint: Select macro tracing method by Autoconf version + Reported and analyzed by Pádraig Brady in: + <http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00071.html>. + * autopoint.in (func_trace_autoconf): Rename from func_trace. + ($func_trace): Set to func_trace_autoconf if Autoconf >= 2.69 is + available, otherwise to func_trace_sed. + * gettextize.in: Likewise. + +2014-06-10 Daiki Ueno <ueno@gnu.org> + + * gettext 0.19.1 released. + +2014-06-02 Daiki Ueno <ueno@gnu.org> + + * gettext 0.19 released. + +2014-04-23 Daiki Ueno <ueno@gnu.org> + + autopoint: Unset variables known to interfere with common tools + Reported by Jan Cholasta at: + <https://bugzilla.redhat.com/show_bug.cgi?id=801374>. + * autopoint.in: Unset CDPATH, CLICOLOR_FORCE, and GREP_OPTIONS. + * gettextize.in: Unset CLICOLOR_FORCE and GREP_OPTIONS. + +2014-04-21 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Rename gettext_dir to gettext_datadir. + * gettextize.in: Likewise. + +2014-03-27 Daiki Ueno <ueno@gnu.org> + + autopoint: Use SED-based trace for non-standard Autoconf macros + Reported by Sean McGovern in <https://savannah.gnu.org/bugs/?41913>. + * autopoint.in (func_trace_sed): New function; use it to trace + AM_GNU_GETTEXT and AM_GNU_GETTEXT_VERSION. + * gettextize.in (func_trace_sed): New function; use it to trace + AM_GNU_GETTEXT. + +2014-03-26 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Allow user to specify the directory in which + archive belongs, through $gettext_dir envvar. + * gettextize.in: Likewise. + +2013-12-05 Daiki Ueno <ueno@gnu.org> + + * autopoint.in (func_trace): Allow user to specify autom4te + executable name through $AUTOM4TE envvar. + * gettextize.in (func_trace): Likewise. + Suggested by Eric Blake at + <https://lists.gnu.org/archive/html/bug-gettext/2013-12/msg00006.html>. + +2013-11-19 Daiki Ueno <ueno@gnu.org> + + * autopoint.in (func_trace): Disable m4_include and m4_esyscmd. + * gettextize.in (func_trace): Likewise. + Reported by Bernhard Voelker + <https://lists.gnu.org/archive/html/bug-gettext/2013-11/msg00011.html> + and suggested by Eric Blake at <https://savannah.gnu.org/bugs/?40083>. + +2013-10-16 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Use 'm4' as the default macro directory if it is + not specified in configure.ac nor Makefile.am. + Reported by MichaÅ‚ Górny in + <http://savannah.gnu.org/bugs/?40278>. + +2013-09-24 Daiki Ueno <ueno@gnu.org> + + * autopoint.in (func_trace): Discard stderr of autom4te. + * gettextize.in (func_trace): Likewise. + Reported by Gary V. Vaughan in + <http://savannah.gnu.org/bugs/?40083>. + +2013-09-24 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Recognize multiple arguments of AM_GNU_GETTEXT + when tracing. + * gettextize.in: Likewise. + Reported by Gary V. Vaughan in + <http://savannah.gnu.org/bugs/?40082>. + +2013-08-12 Daiki Ueno <ueno@gnu.org> + + autopoint: make macro trace in autom4te robuster + * autopoint.in (func_trace): Ignore M4sugar macros which may abort + autom4te and read gettext.m4 to trace AM_GNU_GETTEXT_* macros. + * gettextize.in (func_trace): New function ported from autopoint.in. + Reported by Sami Kerola in + <https://lists.gnu.org/archive/html/bug-gettext/2013-07/msg00002.html>. + +2013-07-29 Jan Djärv <jan.h.d@swipnet.se> (tiny change) + + * po-mode.el (po-send-mail): Don't include original uncompressed + text in the mail. + +2013-07-21 Daiki Ueno <ueno@gnu.org> + + * autopoint.in (omitintl): Don't set it 'no' when no + AM_GNU_GETTEXT call is found. + Reported by Sebastien Helleu in <http://savannah.gnu.org/bugs/?39536>. + +2013-05-02 Daiki Ueno <ueno@gnu.org> + + * autopoint.in (func_trace): New function; use it all in places + where Autoconf macro trace is needed. + (func_version): Bump copyright year. + * gettextize.in (func_version): Bump copyright year. + +2013-03-05 Daiki Ueno <ueno@gnu.org> + + * po-mode.el (po-font-lock-keywords): Properly highlight C format + strings with parameter positions. + Reported at + <https://savannah.gnu.org/bugs/index.php?33552>. + +2013-03-05 Ævar Arnfjörð Bjarmason <avarab@gmail.com> (tiny change) + + * po-mode.el (po-auto-update-file-header): New user option. + (po-check-file-header): Respect 'po-auto-update-file-header'. + +2013-03-04 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Handle macro directories specified in configure.ac. + Reported by Pavel Raiskup in + <http://lists.gnu.org/archive/html/bug-gettext/2013-02/msg00017.html>. + +2013-03-04 Daiki Ueno <ueno@gnu.org> + + * gettextize.in: Use autoconf trace to detect auxdir and m4dir. + +2013-03-04 Daiki Ueno <ueno@gnu.org> + + * gettextize.in: Don't add redundant "-I m4" if + AC_CONFIG_MACRO_DIR{,S} is not specified. + +2013-03-01 Daiki Ueno <ueno@gnu.org> + + * gettextize.in: Handle macro directories specified in configure.ac. + Reported by Pavel Raiskup in + <http://lists.gnu.org/archive/html/bug-gettext/2013-02/msg00017.html>. + +2013-02-28 Daiki Ueno <ueno@gnu.org> + + * autopoint.in (gettext_dir): Substitute PATH_SEPARATOR at + configure time. + * gettextize.in (gettext_dir): Substitute PATH_SEPARATOR at + configure time. + Suggested by Stefano Lattarini in + <http://lists.gnu.org/archive/html/bug-gettext/2012-12/msg00066.html>. + +2013-01-07 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Extract version number from configure.ac in a more + robust way. + Reported by Tom G. Christensen in + <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00053.html>. + +2012-12-25 Daiki Ueno <ueno@gnu.org> + + * autopoint.in: Update for 0.18.2. + +2012-12-25 Daiki Ueno <ueno@gnu.org> + + * gettext-0.18.2 released. + +2010-08-30 Bruno Haible <bruno@clisp.org> + + Improve interopability with Emacs 23. + * po-compat.el (po-find-file-coding-system-guts): Don't use codepages + API in Emacs >= 23. + * po-mode.el (po-mode-version-string): Bump to 2.21. + (po-ediff-buffers-exit-recursive, po-send-mail): Use + insert-buffer-substring instead of insert-buffer. + +2010-06-06 Bruno Haible <bruno@clisp.org> + + New options --with-xz and --with-bzip2 for compressing the archive. + * autopoint.in: Handle the archive formats dirgz, dirbz2, dirxz instead + of dir. + * convert-archive.in: Handle the archive formats dirgz, dirbz2, dirxz + like dir. Format 'dir' is now without compression. + * Makefile.am (MOSTLYCLEANFILES): New variable. + (CLEANFILES): Add archive.dir.tar.gz, archive.dir.tar.bz2, + archive.dir.tar.xz. + (EXTRA_DIST): Add archive.dir.tar. Remove archive.dir.tar.gz. + (ARCHIVE_dirgz, ARCHIVE_dirbz2, ARCHIVE_dirxz, ARCHIVE_git, + ARCHIVE_cvs): New variables. + (gettextsrc_DATA): Use them. + (archive.dir.tar): Renamed from archive.dir.tar.gz. Look for an + installed .tar.bzip2 or .tar.xz as well. + (archive.dir.tar.gz, archive.dir.tar.bz2, archive.dir.tar.xz): New + rules. + (archive.git.tar.gz, archive.cvs.tar.gz): Update. + * add-to-archive: Read and write an uncompressed archive.dir.tar. + +2010-06-06 Bruno Haible <bruno@clisp.org> + + Make 'convert-archive' less verbose. + * convert-archive.in: Avoid all output from "git commit". + +2010-06-04 Bruno Haible <bruno@clisp.org> + + * gettext-0.18.1 released. + +2010-06-04 Bruno Haible <bruno@clisp.org> + + Don't assume GNU tar. + * convert-archive.in (TAR, TAR_OPTIONS): New variables. + Reported by Ryan Schmidt <ryandesign@macports.org>. + +2010-06-04 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.18.1. + +2010-06-03 Bruno Haible <bruno@clisp.org> + + Deprecate the --with-cvs option. + * autopoint.in: Update comments. + * add-to-archive: Update archive.dir.tar.gz, not archive.cvs.tar.gz. + * Makefile.am (CLEANFILES): Add archive.cvs.tar.gz instead of + archive.dir.tar.gz. + (EXTRA_DIST): Add archive.dir.tar.gz instead of archive.cvs.tar.gz. + (archive.dir.tar.gz): Adapted from archive.cvs.tar.gz rule. + (archive.git.tar.gz, archive.cvs.tar.gz): Generate from + archive.dir.tar.gz. + +2010-05-26 Bruno Haible <bruno@clisp.org> + + Interoperability with newer versions of 'cvs'. + * autopoint.in: Unset some more environment variables. Set + CVS_SIGN_COMMITS to empty. + * convert-archive.in: Likewise. + +2010-05-16 Bruno Haible <bruno@clisp.org> + + convert-archive: Don't publicize the builder's name and email. + * convert-archive.in: Unset GIT_CONFIG and set dummy user.name and + user.email parameters. + Reported by Santiago Vila <sanvila@unex.es>. + +2010-05-16 Bruno Haible <bruno@clisp.org> + + Avoid keyword substitution in cvs archives created by convert-archive. + * convert-archive.in: When creating a cvs archive, use "cvs admin -ko" + on all files. + +2010-05-16 Bruno Haible <bruno@clisp.org> + + Make convert-archive more robust. + * convert-archive.in: Report a fatal error in many error conditions. + Reported by Santiago Vila <sanvila@unex.es>. + +2010-05-16 Bruno Haible <bruno@clisp.org> + + * convert-archive.in: Remove known 'rlog' warning from error output. + (func_version): Update copyright years. + +2010-05-09 Bruno Haible <bruno@clisp.org> + + * gettext-0.18 released. + +2010-05-09 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.18. + +2010-05-09 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_version): Bump copyright year. + +2010-05-08 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-mode-version-string): Bump to 2.2. + +2010-05-08 Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> + + po-mode: Fix bug in po-previous-translated-entry function. + * po-mode.el (po-previous-translated-entry): Use correct regular + expression. + Reported via Santiago Vila in + <http://lists.gnu.org/archive/html/bug-gnu-utils/2008-08/msg00039.html>. + +2010-05-08 Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> + Bruno Haible <bruno@clisp.org> + + po-mode: Optionally delete previous untranslated comment when editing. + * po-mode.el (po-auto-delete-previous-msgid): New customizable + variable. + (po-any-previous-msgctxt-regexp, po-any-previous-msgid-regexp, + po-any-previous-msgid_plural-regexp): New variables. + (po-msgid-to-msgstr, po-kill-msgstr, po-yank-msgstr, po-subedit-exit): + Invoke po-maybe-delete-previous-untranslated after po-set-msgstr-form. + (po-unfuzzy): Invoke po-maybe-delete-previous-untranslated. + (po-previous-untranslated-region-for, po-previous-untranslated-regions, + po-delete-previous-untranslated, po-maybe-delete-previous-untranslated): + New functions. + Reported in + <http://lists.gnu.org/archive/html/bug-gnu-utils/2008-05/msg00032.html>. + +2010-05-08 Bruno Haible <bruno@clisp.org> + + po-mode: Fix po-msgid-to-msgstr on plural entries. + * po-mode.el (po-get-msgid_plural): New function. + (po-msgid-to-msgstr): Use it. + +2010-05-08 Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> + Bruno Haible <bruno@clisp.org> + + po-mode: Fix po-get-msgid function in plural entries. + * po-mode.el (po-get-msgid): Use po-start-of-msgid_plural as end + pointer, if it is set. + Reported in + <http://lists.gnu.org/archive/html/bug-gnu-utils/2008-05/msg00031.html>. + +2010-05-08 Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> + Bruno Haible <bruno@clisp.org> + + po-mode: Determine position of "msgid_plural" line in current entry. + * po-mode.el (po-start-of-msgid_plural): New variable. + (po-any-msgid_plural-regexp): New variable. + (po-mode): Make po-start-of-msgid_plural buffer-local. + (po-find-span-of-entry): Set also po-start-of-msgid_plural. + Based on patch in + <http://lists.gnu.org/archive/html/bug-gnu-utils/2008-05/msg00031.html>. + +2010-05-08 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-get-msgstr-flavor): Preserve the point's position. + +2010-05-08 Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> + + Fix failure of po-msgid-to-msgstr just after opening a buffer. + * po-mode.el (po-msgstr-form-flavor): Remove variable. + (po-get-msgstr-form): Do not call po-get-msgstr-flavor. + (po-set-msgstr-form): Call po-get-msgstr-flavor function here. + Reported in + <http://lists.gnu.org/archive/html/bug-gnu-utils/2008-05/msg00028.html>. + +2010-05-08 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-edit-string): Assign major mode text-mode to the + subedit buffer. + Reported by Kenichi Handa <handa@m17n.org>. + +2010-03-28 Bruno Haible <bruno@clisp.org> + + * gettexize.in: Warn about use of --intl option. + (func_usage): Mark it as deprecated. + (func_version): Bump copyright year. + +2009-12-25 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add fcntl-o.m4 instead of fcntl_h.m4 to + the list. + +2009-12-12 Bruno Haible <bruno@clisp.org> + + * po-compat.el: Untabify. + * gettextize.in: Partially untabify. + +2009-10-18 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add fcntl_h.m4 to the list. + (func_version): Bump copyright year. + +2009-09-27 Bruno Haible <bruno@clisp.org> + + * add-to-archive: Pass option -fPIC to gcc. Clean up cvsuser.so. + +2009-09-27 Bruno Haible <bruno@clisp.org> + + Support alternative to the cvs-compression of the archive. + * convert-archive.in: New file. + * autopoint.in (func_version): Show the archive format. + Support archive formats dir, cvs, git, instead of only cvs. + * Makefile.am (DISTCLEANFILES): Add convert-archive. + (CLEANFILES): Add archive.dir.tar.gz, archive.git.tar.gz. + (gettextsrc_DATA): Depend on @ARCHIVE_FORMAT@. + (archive.dir.tar.gz, archive.git.tar.gz): New rules. + Reported by Arkadiusz Miskiewicz in + <https://savannah.gnu.org/bugs/?27281>. + +2009-09-27 Bruno Haible <bruno@clisp.org> + + * add-to-archive: Use archive.cvs.tar.gz instead of archive.tar.gz. + * autopoint.in: Likewise. + * Makefile.am (archive.cvs.tar.gz): Renamed from archive.tar.gz. + (EXTRA_DIST, gettextsrc_DATA): Update. + +2009-08-14 Bruno Haible <bruno@clisp.org> + + * Makefile.am (archive.tar.gz): Update error message. + +2009-08-09 Bruno Haible <bruno@clisp.org> + + Add support for multiple PO directories to autopoint. + * autopoint.in (sed_extract_config_files, configfiles, + sed_remove_Makefile_in, podirs): New variables. + (func_destfile): Set allpodirs. + When allpodirs is set, loop over $podirs. + Reported by Guillem Jover <guillem@debian.org> + via Santiago Vila <sanvila@unex.es>. + +2008-12-07 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_version): Bump copyright year. + +2008-12-07 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_compare): New function. + Don't overwrite *.m4 files when the existing file has a version number + at least as large as the one from the gettext release. + Reported by Colin Watson <cjwatson@debian.org> + and Sylvain Beucler <beuc@beuc.net>. + +2008-08-17 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add threadlib.m4 to the list. + (func_version): Bump copyright year. + +2008-08-13 Sven Joachim <svenjoac@gmx.de> + + * po-mode.el (po-check-file-header): Use forward-line with + negative argument instead of previous-line. + (po-add-attribute): Use forward-line instead of next-line. + +2008-05-25 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-replace-revision-date): Return nil. + Patch by Kobayashi Noritada <nori1@dolphin.c.u-tokyo.ac.jp>. + +2008-05-07 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-team-name-to-code): Add Beja. Remove Adangme, Banda, + Batak. Update Scottish Gaelic, Central Khmer, Romansh. + +2008-05-07 Bruno Haible <bruno@clisp.org> + + Fix editing of plural forms. + * po-mode.el (po-mode-version-string): Bump to 2.11. + (po-any-msgstr-block-regexp): Must start with msgstr or msgstr[0]; + needed for re-search-backward. + (po-get-msgstr-flavor): Set the point to po-start-of-msgstr-form, not + to the beginning of the line. + Reported by Stéphane Raimbault <stephane.raimbault@gmail.com>. + +2008-04-20 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Check that really all CVS directories are removed. + Reported by Jim Meyering <jim@meyering.net>. + +2008-01-18 Bruno Haible <bruno@clisp.org> + + * autopoint.in (xver): Make its computation more robust. + Reported by Michael Bauschert <Michael.Bauschert@de.ibm.com>. + +2008-01-18 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Fix line breaking in an error message. + +2007-12-02 Bruno Haible <bruno@clisp.org> + + * po-mode.el: Use modern backquote syntax. + Report and patch by Agustin Martin <agmartin@debian.org> via + Santiago Vila <sanvila@unex.es>. + +2007-11-07 Bruno Haible <bruno@clisp.org> + + * gettext-0.17 released. + +2007-11-07 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.17. + +2007-10-31 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Remove ulonglong.m4 from the list. + +2007-10-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-msgstr-form-flavor): Renamed from + po-this-msgstr-flavor. New defvar. + +2007-10-15 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-get-msgstr-form): Remove 'kill' argument. + (po-kill-ring-save-msgstr, po-fade-out-entry): Update. + + * po-mode.el (po-get-msgid): Remove 'kill' argument. + + * po-mode.el (po-get-msgstr-form): Renamed from po-get-msgstr-new. + (po-get-msgstr): Remove function. + + * po-mode.el (po-subedit-exit-old): Remove function. + + * po-mode.el (po-set-msgstr-form): Renamed from po-set-msgstr-new. + (po-set-msgstr): Remove function. + + * po-mode.el (po-edit-msgstr-old): Remove function. + + * po-mode.el (po-edit-string): Renamed from po-edit-string-new. Remove + old po-edit-string function. + +2007-10-14 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-find-span-of-entry): Inline po-find-this-msgstr. + (po-find-this-msgstr): Remove function. + + * po-mode.el (po-start-of-msgstr-form, po-end-of-msgstr-form): New + defvars. + + * po-mode.el (po-start-of-msgstr-form): Renamed from + po-start-of-this-msgstr. + (po-end-of-msgstr-form): Renamed from po-end-of-this-msgstr. + + * po-mode.el (po-start-of-msgstr-block): Renamed from + po-start-of-msgstr. + + * po-mode.el (po-any-msgstr-block-regexp): Renamed from + po-any-msgstr-regexp. + + * po-mode.el (po-any-msgstr-form-regexp): Renamed from + po-any-msgstr-regexp-old. + +2007-10-07 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_version): In the --version output, say GPLv3+. + * gettexize.in (func_version): Likewise. + +2007-09-01 Bruno Haible <bruno@clisp.org> + + * Makefile.am (archive.tar.gz): Provide an explicit error message if + archive.tar.gz cannot be found. + Reported by Spiros at <https://savannah.gnu.org/bugs/?16657>. + +2007-06-30 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_version): Use the standard --version output, see + <http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00302.html>. + * gettexize.in (func_version): Likewise. + +2007-06-30 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-check-file-header): Use save-restriction. + Report and patch by Sven Joachim <sven_joachim@web.de> in + <http://lists.gnu.org/archive/html/bug-gnu-utils/2006-08/msg00110.html>. + +2007-06-30 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-team-name-to-code): Add a few more entries. + +2007-06-29 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-find-this-msgstr): New function. + (po-find-span-of-entry): Use it. + + * po-mode.el (po-get-msgstr-flavor): New function. + (po-any-msgstr-regexp-old): New variable. + (po-subedit-exit-old): New function, renamed from po-subedit-exit. + (po-edit-msgstr-old): New function, renamed from po-edit-msgstr. + (po-get-msgstr-new): New function, based on po-get-msgstr. + (po-set-msgstr-new): New function, based on po-set-msgstr. + (po-edit-string-new): New function, based on po-edit-string. + (po-edit-msgstr): Use po-get-msgstr-new. + (po-subedit-exit): Use po-set-msgstr-new. + +2007-06-30 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-translation-project-address): Update email address + after the Translation Project moved. + (po-translation-project-mail-label): Update comment. + +2007-06-29 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-subedit-mode-menu-layout, po-mode-menu-layout): + Remove trailing string. + * po-mode.el (po-mode-menu-layout): Make "Source marking" a submenu. + Remove subtitles from menus. + Comment unimplemented features. Reorganize entry hierarchy. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + Support for the msgctxt syntax. + * po-mode.el (po-mode-version-string): Bump version number to 2.1. + (po-start-of-msgctxt): New variable. + (po-any-msgctxt-msgid-regexp): New variable. + (po-font-lock-keywords): Add msgctxt. + (po-mode): Make variable po-start-of-msgctxt local. + (po-find-span-of-entry): Set also po-start-of-msgctxt. + (po-add-attribute, po-delete-attribute): Use po-start-of-msgctxt. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-mode-map): Bind po-undo also to Ctrl-x u. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-any-msgstr-regexp): Add support for plural forms. + The patch from 2001-03-10 did not work. + (po-untranslated-regexp): Recognize also empty msgstr[i] values. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-edit-out-full): Don't ask the user for confirmation. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el: Untabify. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-font-lock-keywords): Stop recognizing "msg" as a + keyword. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + Fix '#' command on obsolete entries. + * po-mode.el (po-comment-regexp): Renamed from po-active-comment-regexp. + (po-obsolete-comment-regexp): Remove variable. + (po-get-comment, po-set-comment): Fix syntax assumptions about comments + for obsolete entries. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-msgid-to-msgstr): Fix English message. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-add-attribute, po-delete-attribute, po-fuzzy-regexp): + Don't recognize the syntax "#! fuzzy" any more. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-validate): Protect the buffer-file-name against + shell interpretation. + Reported by Laurynas Biveinis <laurynas.biveinis@gmail.com>. + +2007-06-17 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-msgfmt-version-check): Recognize also 0.16.2-pre1. + +2007-06-08 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update year in --version output. + +2007-06-07 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add intlmacosx.m4 to the list. + (func_version): Update copyright year. + +2007-05-24 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-mode-map): Bind po-undo also to Ctrl-_. + Suggested by Kevin Ryde <user42@zip.com.au>. + +2007-04-06 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Remove longdouble.m4 from the list. + +2006-12-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Protect against spaces in the value of $gettext_dir. + +2006-12-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in (func_usage): Document --po-dir. + Handle the --po-dir option. Loop over each specified --po-dir value + instead of hardcoding po/. + Reported by Daniel Leidert <daniel.leidert.spam@gmx.net>. + +2006-11-27 Bruno Haible <bruno@clisp.org> + + * gettext-0.16.1 released. + +2006-11-27 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.16.1. + +2006-10-26 Bruno Haible <bruno@clisp.org> + + * gettext-0.16 released. + +2006-10-26 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.16. + +2006-10-15 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4dir_is_next): Reset it to empty when the m4dir was + seen. + (m4dir_defaulted): New variable. + In the recommendations how to run aclocal, show all the needed -I + options, not just one. + Reported by Ralf Wildenhues. + +2006-10-08 Bruno Haible <bruno@clisp.org> + + * gettextize.in (usage): Document the --symlink option instead of the + --copy option. + Accept a --symlink option. + (try_ln_s): Change default value to false. + +2006-10-01 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add intldir.m4. + +2006-09-18 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Remove inttypes-h.m4. + +2006-09-11 Bruno Haible <bruno@clisp.org> + + * gettextize.in (have_automake19, min_automake_version): New variables. + (m4filelist): Use the minimum needed file list if --intl was not + specified and automake version is >= 1.9. + +2006-09-11 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add intl.m4. + +2006-08-28 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Remove signed.m4. + +2006-07-25 Bruno Haible <bruno@clisp.org> + + * Makefile.msvc: Remove file. + * Makefile.am (EXTRA_DIST): Remove Makefile.msvc. + +2006-07-25 Bruno Haible <bruno@clisp.org> + + * Makefile.vms: Remove file. + * Makefile.am (EXTRA_DIST): Remove Makefile.vms. + +2006-07-21 Bruno Haible <bruno@clisp.org> + + * gettext-0.15 released. + +2006-07-20 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.15. + +2006-07-20 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-mode-version-string): Bump to 2.02. + +2006-06-27 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Remove isc-posix.m4. + +2006-06-04 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Replace inttypes.m4 with inttypes-h.m4. + +2006-04-17 Bruno Haible <bruno@clisp.org> + + * add-to-archive: Remove special handling of mkinstalldirs file. + * gettextize.in: Likewise. + +2006-04-20 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.15. + +2006-04-12 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_find_curr_installdir): Handle the case of a + symbolic link pointing to an absolute pathname correctly. + * gettextize.in (func_find_curr_installdir): Likewise. + +2006-01-23 Bruno Haible <bruno@clisp.org> + + * gettextize.in (func_tmpdir): Invoke mktemp without option -q, because + in some versions of mktemp this option has the effect that mktemp + outputs nothing at all. + (func_version): Bump copyright year. + * autopoint.in (func_tmpdir): Invoke mktemp without option -q. + (func_version): Bump copyright year. + Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>. + +2005-09-18 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_find_curr_installdir): Really remove the temporary + directory after use. + * gettextize.in (func_find_curr_installdir): Likewise. + +2005-08-26 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-team-name-to-code): Add support for Old English, + Hyam, Jju, Tyap, Kagoma, Maithili, Mayan, Nahuatl, Low Saxon, + Northern Sotho, Páez, Tetum, Zapotec. + +2005-07-24 Bruno Haible <bruno@clisp.org> + + Tidy up exported symbols. + * gettextize.in (m4filelist): Add visibility.m4. + +2005-07-26 Bruno Haible <bruno@clisp.org> + + * autopoint.in (datarootdir): New variable. + * gettextize.in (datarootdir): New variable. + +2005-07-16 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add lock.m4. + +2005-07-09 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-validate): Require the 'compile' module before + accessing it. + Report and patch by Sven Joachim <sven_joachim@web.de>. + +2006-06-21 Bruno Haible <bruno@clisp.org> + + * gettext-0.14.6 released. + +2006-06-21 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.14.6. + +2005-05-23 Bruno Haible <bruno@clisp.org> + + * gettext-0.14.5 released. + +2005-05-23 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.14.5. + +2005-04-11 Bruno Haible <bruno@clisp.org> + + * gettext-0.14.4 released. + +2005-04-11 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.14.4. + +2005-03-14 Bruno Haible <bruno@clisp.org> + + * gettext-0.14.3 released. + +2004-10-23 Bruno Haible <bruno@clisp.org> + + * start-po-el: New file. + * Makefile.am (lisp_LISP): Add it. + +2005-03-08 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.14.3. + +2005-03-08 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Compute comma separated lists for ChangeLog entries + correctly. Also comma-separate the EXTRA_DIST ChangeLog entry. + +2005-03-07 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Create the auxdir if it doesn't exist. + Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-07 Bruno Haible <bruno@clisp.org> + + * gettextize.in (func_m4ChangeLog_init, func_m4ChangeLog_add_entry, + func_m4ChangeLog_finish): Let the behaviour depend on + using_m4ChangeLog. Initialize using_m4ChangeLog depending on whether + an m4/ChangeLog already exists. + Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-06 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Update the instructions for fetching config.guess and + config.sub. + Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-06 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_destfile): Also set a variable 'sharedowner'. + For files with shared ownership, treat local modification as a warning. + Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-05 Bruno Haible <bruno@clisp.org> + + * gettextize.in: When a po/POTFILES.in does not exist, create an + initial empty one. + Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-05 Bruno Haible <bruno@clisp.org> + + * gettextize.in (func_m4ChangeLog_init, func_m4ChangeLog_finish): + Keep track whether a $m4dir/ChangeLog file was created. + Don't create a $m4dir/Makefile.am if aclocal version 1.8 or newer is + present; instead add $m4dir/ChangeLog to EXTRA_DIST if needed. + Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-05 Bruno Haible <bruno@clisp.org> + + * gettextize.in: When adding items to EXTRA_DIST, SUBDIRS, + DIST_SUBDIRS, ACLOCAL_AMFLAGS in Makefile.am, optionally remove one + space after the added items. When adding items to AC_CONFIG_FILES, + AC_OUTPUT in configure.ac, remove don't insert an extra space after + the added items. + Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-05 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Emit brackets around the argument of + AM_GNU_GETTEXT_VERSION. + Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-05 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Don't recommend to add AM_GNU_GETTEXT([external]) + when it is already present. + Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>. + +2005-03-05 Bruno Haible <bruno@clisp.org> + + Remove old sh, tcl, perl interfaces. + * gettext-sh: Remove file. + * tcl_gettext.c, README-Tcl: Remove files. + * gettext.perl: Remove file. + * Makefile.am (EXTRA_DIST): Remove them. + +2005-02-24 Bruno Haible <bruno@clisp.org> + + * gettext-0.14.2 released. + +2005-02-24 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update for 0.14.2. + +2005-02-07 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Use LC_ALL=C to protect range expression against + Estonian locale. + * gettextize.in: Likewise. + +2005-02-05 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Check the version number, instead of relying on cvs + for doing so. + Reported by Paul Eggert. + +2005-01-10 Bruno Haible <bruno@clisp.org> + + Security fixes. + * autopoint.in: Exit if the creation of one of the temporary + directories fails. Also restrict the access to the temporary cvs_dir. + Reported by Javier Fernández-Sanguino Peña <jfs@computer.org>. + +2005-01-09 Bruno Haible <bruno@clisp.org> + + * autopoint.in (func_tmpdir): New function. + (func_find_curr_installdir): Use it. + (mismatchfile): Create inside a temporary directory. Remove afterwards. + * gettextize.in (func_tmpdir): New function. + (func_find_curr_installdir): Use it. + Reported by Joey Hess <joeyh@debian.org>. + +2005-01-05 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Update year in --version output. + * gettextize.in: Likewise. + +2005-01-05 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Unset CDPATH in a more robust way. + +2004-12-14 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Unset CDPATH. + +2004-02-07 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Modify only the first occurrence of AC_CONFIG_FILES, + not all of them. + Reported by Dalibor Topic <robilad@kaffe.org>. + +2004-02-04 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Add po to SUBDIRS if it was created in this run. + Tell the user to create po/POTFILES.in if it is not yet there. + Reported by Prof. Roberto Bagnara <bagnara@cs.unipr.it>. + +2004-02-02 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add glibc2.m4. + +2004-01-29 Bruno Haible <bruno@clisp.org> + + * gettext-0.14.1 released. + +2004-01-28 Bruno Haible <bruno@clisp.org> + + * gettext-0.14 released. + +2004-01-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Modify DIST_SUBDIRS like SUBDIRS, when it was found in + Makefile.am. + Reported by Dalibor Topic <robilad@kaffe.org>. + +2003-12-17 Bruno Haible <bruno@clisp.org> + + * gettext-0.13.1 released. + +2003-11-30 Bruno Haible <bruno@clisp.org> + + * gettext-0.13 released. + +2003-11-23 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Remove ssize_t.m4. + +2003-11-16 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add size_max.m4, ssize_t.m4, xsize.m4. + +2003-11-08 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Allow configure.in.in to be used instead of + configure.in. + +2003-08-11 Bruno Haible <bruno@clisp.org> + + * autopoint.in: When local files have been modified, create a .diff + file for the user's convenience. + Suggested by Denis Barbier <barbier@debian.org>. + +2003-08-07 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Fix the regular expression used to parse intl/VERSION. + Patch by Denis Barbier <barbier@debian.org>. + +2003-06-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in (m4filelist): Add intmax.m4, longdouble.m4, + longlong.m4, printf-posix.m4, signed.m4, wchar_t.m4, wint_t.m4. + +2003-05-22 Bruno Haible <bruno@clisp.org> + + * gettext-0.12.1 released. + +2003-05-17 Bruno Haible <bruno@clisp.org> + + * gettext-0.12 released. + +2003-05-08 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Ignore ACLOCAL_AMFLAGS options of the form -Idir when + dir is an absolute pathname. + Reported by Jürgen A. Erhard <jae+debian@jerhard.org>. + +2003-04-29 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Recommend running automake only after aclocal, + because automake 1.7 assumes that aclocal.m4 has already been built. + +2003-04-12 Bruno Haible <bruno@clisp.org> + + * Makefile.vms: Avoid rules with no lines. Don't use the force target. + Correct wildcard syntax. + Suggested by Jouk Jansen <joukj@hrem.stm.tudelft.nl>. + +2003-04-11 Bruno Haible <bruno@clisp.org> + + * Makefile.am (archive.tar.gz): Avoid creating an empty tar.gz file. + Reported by Martin MokrejÅ¡ <mmokrejs@natur.cuni.cz>. + +2003-03-30 Bruno Haible <bruno@clisp.org> + + * Makefile.vms: New file. + * Makefile.am (EXTRA_DIST): Add Makefile.vms. + +2003-03-17 Bruno Haible <bruno@clisp.org> + + Native Woe32/MSVC support. + * Makefile.msvc: New file. + * Makefile.am (EXTRA_DIST): Add it. + +2003-02-28 Bruno Haible <bruno@clisp.org> + + Support for relocatable installation. + * autopoint.in: Relocate $gettext_dir. + * gettextize.in: Relocate $gettext_dir. + +2003-02-16 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Create po/Makevars.template from installed + po/Makevars.template, not from po/Makevars. + (func_version): Update copyright year. + +2003-02-16 Bruno Haible <bruno@clisp.org> + + * po-compat.el: Add testing instructions. + (po-find-file-coding-system-guts) [XEMACS]: Make it work again, + after (car (nth i po-content-type-charset-alist)) changed from symbol + to string. + +2003-02-12 Bruno Haible <bruno@clisp.org> + + * elisp-comp: Move to ../../config/elisp-comp. + * Makefile.am (EXTRA_DIST): Remove elisp-comp. + +2003-01-12 Bruno Haible <bruno@clisp.org> + + * Makefile.am: Make use of += for variables. + +2003-01-08 Bruno Haible <bruno@clisp.org> + + * Makefile.am (EXTRA_DIST): Add elisp-comp. + +2002-12-07 Bruno Haible <bruno@clisp.org> + + Switch to autoconf-2.57 and automake-1.7.2. + * elisp-comp: Upgrade to automake-1.7.2. + +2002-11-13 Bruno Haible <bruno@clisp.org> + + Assume ANSI C. + * tcl_gettext.c (tcl_gettext, tcl_textdomain, tcl_bindtextdomain): + Use ANSI C function declarations. + +2002-10-25 Karl Eichwalder <ke@suse.de> + + * po-compat.el (po-find-file-coding-system-guts): Provide the old + version (pre 2002-09-27) for XEmacs. + +2002-10-16 Bruno Haible <bruno@clisp.org> + + * po-compat.el: Remove call of codepage-setup of all support codepages. + (po-find-file-coding-system-guts): Avoid code duplication. + +2002-09-27 Karl Eichwalder <ke@suse.de> + + * po-compat.el (po-content-type-charset-alist): Convert the + car of each association to a string. From emacs CVS + (lisp/textmodes/po.el); provided by Eli Zaretskii. + (po-find-file-coding-system-guts): If the charset matches a name + of a codepage, set up that codepage and return it as a coding + system to decode the file. Likewise from emacs CVS. + + * po-compat.el: Line up comment etc. with lisp/textmodes/po.el. + (po-find-charset): Search for the Charset= header even if we've read + less than 4KB. From emacs CVS (lisp/textmodes/po.el); provided by + Eli Zaretskii. + +2002-08-27 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Call func_fatal_error, not fatal_error. + Patch by Sam Hocevar <sam@zoy.org>. + +2002-08-26 Bruno Haible <bruno@clisp.org> + + * archive.tar.gz: Avoid keyword substitution for archive/mkinstalldirs. + Reported by Colin Watson <cjwatson@debian.org>. + +2002-08-12 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Fix typo in the handling of AM_GNU_GETTEXT_VERSION. + Reported by Adam Heath <doogie@debian.org>. + +2002-08-06 Bruno Haible <bruno@clisp.org> + + * gettext-0.11.5 released. + +2002-08-03 Paul Eggert <eggert@twinsun.com> + + * gettextize.in: Use "read dummy" to avoid an error with Solaris + /bin/sh. + +2002-08-02 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Add ulonglong.m4 to m4filelist. + +2002-07-25 Bruno Haible <bruno@clisp.org> + + * gettext-0.11.4 released. + +2002-07-25 Bruno Haible <bruno@clisp.org> + + * add-to-archive: New file. + * add-to-autopoint-files: Remove file. + * cvsuser.c: New file. + * Makefile.am (EXTRA_DIST): Remove add-to-autopoint-files. Add + add-to-archive, cvsuser.c. + +2002-07-25 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Unset also CVS_IGNORE_REMOTE_ROOT and CVSIGNORE. + +2002-07-23 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Add inttypes-pri.m4 to m4filelist. + +2002-07-21 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Add inttypes.m4, inttypes_h.m4, stdint_h.m4, + uintmax_t.m4 to m4filelist. + +2002-07-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Copy also intdiv0.m4. + +2002-07-17 Bruno Haible <bruno@clisp.org> + + * gettext-0.11.3 released. + +2002-07-16 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-mode-version-string): Bump to 2.01. + +2002-06-13 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-mode-line-entry...): Try harder to find a good place + for adding po-mode-line-entry into mode-line-format. + Reported by Sam Steingold <sds@gnu.org>. + +2002-05-12 Bruno Haible <bruno@clisp.org> + + * po-compat.el: Add ISO-8859-14, KOI8-T, GEORGIAN-PS to the list of + allowed encodings. + +2002-05-11 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Recognize AM_GNU_GETTEXT_VERSION(..) syntax. + * gettextize.in: Likewise. + +2002-05-03 Bruno Haible <bruno@clisp.org> + + * autopoint.in: Unset all other environment variables which influence + cvs. Pass -d $CVSROOT explicitly. + (func_mkdir_for): New function. + (func_copy): Call it. + +2002-05-01 Bruno Haible <bruno@clisp.org> + + * autopoint-files: New directory. + * add-to-autopoint-files: New file. + * autopoint.in: New file. + * Makefile.am (EXTRA_DIST): Add add-to-autopoint-files, archive.tar.gz. + (DISTCLEANFILES): Add autopoint. + (gettextsrcdir): New variable. + (gettextsrc_DATA): New variable. + (archive.tar.gz): New rule. + * gettextize.in: Bump GETTEXT_VERSION value in configure.in. + Ask maintainer to acknowledge the remaining changes. + +2002-04-28 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Avoid the remarks about po/Makevars and config.guess + if they are not necessary. + + * gettextize.in: New option -n/--dry-run. + + * gettextize.in: Use functions for maintainability. + Remove undocumented option --run. + + * gettextize.in: Use 'echo' instead of '$echo'. + +2002-04-29 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode-menu-layout): Don't try to display tooltips + for XEmacs. + (po-subedit-mode-menu-layout): Likewise. + +2002-04-28 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Treat mkinstalldirs like config.rpath. + +2002-04-27 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode-menu-layout): Add tooltips. + (po-subedit-mode-menu-layout): Likewise. + + * po-mode.el (po-mode-menu-layout): Adopt terminology for editing + from Emacs (cut/copy/paste). + +2002-04-24 Bruno Haible <bruno@clisp.org> + + * gettext-0.11.2 released. + +2002-04-22 Bruno Haible <bruno@clisp.org> + + * Makefile.am (lisp_LISP): Add po-compat.el. + (EXTRA_DIST): Use it. + +2002-03-17 Karl Eichwalder <ke@suse.de> + + * po-compat.el: New file, extracted from po-mode.el. + * po-mode.el (po-content-type-charset-alist, po-find-charset, + po-find-file-coding-system-guts, po-find-file-coding-system): Move to + po-compat.el. + +2002-04-19 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-team-name-to-code): Add Ido and Walloon. Change + Javanese from jw to jv. + +2002-03-15 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Use "sed -e 1q" instead of "head -1", for compliance + to pure naked POSIX 1003.1-2001 environments. + From Paul Eggert. + +2002-03-14 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-team-name-to-code): Add es_AR, zh_CN, and zh_TW. + +2002-03-12 Bruno Haible <bruno@clisp.org> + + * gettext-0.11.1 released. + +2002-03-11 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-find-file-coding-system-guts): Checking + 'insert-file-contents' must come first to avoid messing up with + arguments. + Reported by Neil Darlow; fixed by Andreas Schwab. + +2002-03-09 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-find-file-coding-system-guts): Don't try to + detect the coding system when filename does not exist. + (po-compute-counters): Search for "^msgid" not 'po-next-entry' if + we don't know for sure any entry will follow at all. + +2002-02-18 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode): Provide it. + +2002-02-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Mark all error messages which lead to failure with + asterisks and "*** Stop.". + +2002-02-11 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-subedit-ediff): When variants are equal don't call + 'po-ediff-buffers-exit-recursive'. + +2002-02-09 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-send-mail): Set coding-system-for-read and + coding-system-for-write to the coding system of the po buffer; + otherwise Emacs will fall back to mule-utf-8 when the default coding + system is different from the po buffer and thus the following + 'shell-command-on-region' will prepare an wrongly encoded file (e.g., + mule-utf-8 instead of UTF-8). + +2002-02-09 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-translation-project-address): Convert it to a + customizable variable. + (po-translation-project-mail-label): New variable. + (po-send-mail): Use it. + +2002-02-01 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode-version-string): New variable. + (po-mode-version): Use it instead of RCS/CVS Revision tag. + +2002-01-31 Bruno Haible <bruno@clisp.org> + + * gettext-0.11 released. + +2002-01-26 Bruno Haible <bruno@clisp.org> + + * gettextize.in: If directory intl was removed, remove it from SUBDIRS + in Makefile.am. + If intl/Makefile.in was removed, remove intl/Makefile from + AC_OUTPUT/AC_CONFIG_FILES statement in configure.in. + Remove intl/intlh.inst from AC_OUTPUT/AC_CONFIG_FILES statement in + configure.in. + Remove old-style "sed ... > po/Makefile" statement from configure.in. + Remove old-style AC_LINK_FILES statement from configure.in. + Recommend replacement for Makefile variables DATADIRNAME, INSTOBJEXT, + GENCAT, POSUB. + Recommend replacement for shell variables nls_cv_header_intl, + nls_cv_header_libgt. + +2002-01-25 Bruno Haible <bruno@clisp.org> + + * gettextize.in: New option --no-changelog. + Don't create ChangeLog entries for files that don't change. + Verify the existence of a configure.in line starting with "AC_OUTPUT(" + before attempting to modify it. + Treat "AC_CONFIGURE_FILES(" like "AC_OUTPUT(". + Recommend replacement for INTLLIBS Makefile variable. + +2002-01-19 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Always recommend the full set of m4 files. Many + improvements for packages that use automake. Modify configure.in. + +2002-01-15 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Handle po/Makevars specially, don't overwrite the + previous customizations. + +2002-01-12 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Update year in --version output. + +2002-01-10 Bruno Haible <bruno@clisp.org> + + * po-mode.el (po-content-type-charset-alist): Add Emacs20/21 codepages. + +2001-11-20 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-ediff-buffers-exit-recursive): Kill ediff buffers + after quitting the ediff session. + +2002-01-03 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Recommend installation of gettext.h. + +2001-12-15 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-eval-requoted): Add \r to avoid additional quoting + during edit. Reported by Santiago Vila. + +2001-12-06 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Install config.rpath in the directory specified + through AC_CONFIG_AUX_DIR, not necessarily in the toplevel dir. + +2001-12-02 Bruno Haible <bruno@clisp.org> + + * gettextize.in: Also copy config.rpath, and recommend to copy + lib-ld.m4, lib-link.m4, lib-prefix.m4. + +2001-11-25 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-guess-archive-name): Verify that versions provided by + file name and by Project-Id-Version field match. + +2001-11-18 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: New option --intl. + (intldir): New variable. + Don't populate intl subdirectory if --intl is omitted. + +2001-11-19 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-ediff-quit): New function. + (ediff-keymap-setup-hook): Assign key binding for 'po-ediff-quit'. + (po-ediff-buffers-exit-recursive): New function, in part derived + from 'po-subedit-ediff'. + (po-subedit-ediff): Use it. + + * po-mode.el (po-subedit-ediff): Use meaningful buffer names, + derived from 'marker-regex'. + Cleanup: Follow docstring conventions. + +2001-11-19 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode-map): Enable key binding for + 'po-edit-comment-and-ediff' ('C-c C-c' and 'C-c C-#'). + +2001-11-18 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-help-display-string): Adjust it. + +2001-11-18 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-team-name-to-code): Fix syntax for the last entry + (Zulu). + +2001-11-11 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-subedit-ediff): New function. + (po-edit-comment-and-ediff): New function. + (po-edit-msgstr-and-ediff): New function. + (po-subedit-mode-menu-layout): Add 'po-subedit-ediff'. + (po-subedit-mode-map): Add key binding for 'po-subedit-ediff'. + (po-mode-menu-layout): Add 'po-edit-comment-and-ediff' and + 'po-edit-msgstr-and-ediff'. + (po-mode-map): Add key binding for 'po-edit-msgstr-and-ediff'. + +2001-11-12 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-subedit-mode-syntax-table): New variable. + (po-subedit-mode-map): Re-write according to po-mode-map and move + it to a better location. + +2001-11-10 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-find-file-coding-system-guts): Use + 'po-with-temp-buffer' instead of 'with-temp-buffer'. + (po-msgfmt-version-check): Likewise. + +2001-11-09 Dave Love <fx@gnu.org> + Bruno Haible <haible@clisp.cons.org> + + * po-mode.el: Doc fixes. + (po-mode-map): Put all in defvar. + +2001-08-23 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode-map): Assign new Key bindings to avoid + clashes with moving actions: + 'po-previous-fuzzy-entry' = 'F', + 'po-previous-obsolete-entry' = 'O', + 'po-previous-translated-entry' = 'T', + 'po-previous-untranslated' = 'U', + 'po-undo' = '_', + 'po-other-window' = '0', + 'po-select-auxiliary' = '\C-c\C-a'. + (po-help-display-string): Likewise. + +2001-08-23 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-next-translated-entry): Actually search for + 'translated', not 'untranslated'. + +2001-11-01 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-msgfmt-version-check): Also accept pre-release + versions. + +2001-10-31 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Renamed COPYING.LIB-2 to COPYING.LIB-2.0. + +2001-10-30 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el (po-team-name-to-code): Extend the list using items from + src/msginit.c. + +2001-10-26 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Use a different wording about aclocal.m4 if the + package uses automake. + +2001-10-21 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Copy only ABOUT-NLS, intl/, po/. + +2001-09-25 Bruno Haible <haible@clisp.cons.org> + + Upgrade to automake-1.5. + * automake.diff: Remove file. + +2001-09-08 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Don't copy installed jar files. + +2001-08-23 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-compute-counters): First save `current' + po-start-of-msgstr; use it to set `position' while looping over all + entries. + +2001-08-20 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode): Add newlines to fix layout problem calling + 'C-h m'. + +2001-08-18 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-ensure-source-references): Use 'string-to-number' + instead of 'string-to-int'. + (po-msgfmt-version-check): Likewise. + +2001-08-11 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-edit-string): Set indent-line-function to + indent-relative; useful for editing --help messages. + +2001-08-02 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-find-charset): Drop 'interactive'. Use + 'insert-file-contents-literally' to avoid side effects. Correct off + by 1 error. + +2001-08-07 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-subedit-mode-menu-layout): New definition. + (po-edit-string): Use it to provide a menu for po-subedit-mode. + +2001-08-01 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-find-awk-string, po-mark-awk-string, + po-find-bash-string, po-mark-bash-string): New functions. + (po-preset-string-functions): Add awk and bash support. + +2001-08-02 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-find-file-coding-system-guts): Use ascii instead of + none. + (po-compute-counters): Don't start counting if there is not even a + header entry. + +2001-07-26 Bruno Haible <haible@clisp.cons.org> + + * automake.diff: Update for automake-1.4-p5. + +2001-08-01 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Optimize testing for XEmacs. + (po-auto-replace-revision-date): Do not quote t, as it evals to + itself. + (po-validate): Use the mode name instead of the constant PO to build + the validation buffer name. + (po-font-lock-keywords, po-find-charset, + po-find-file-coding-system-guts, po-find-file-coding-system): Adjust + some lines so they fit in 79 columns (pre-VT100). + (po-compute-counters): Use string-equal instead of string=, to be + consistent with the remainder of that code. + (po-find-charset): Avoid infinite loop on empty file. + +2000-05-31 Hrvoje Niksic <hniksic@iskon.hr> + + * po-mode.el (po-create-overlay, po-highlight, po-rehighlight, + po-dehighlight): Use XEmacs extent primitives. + +2001-07-22 Bruno Haible <haible@clisp.cons.org> + + * automake.diff: New file. + +2001-08-02 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Change bug report address to + <bug-gnu-gettext@gnu.org>. + +2001-07-14 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode-abbrev-table): New variable. + (po-edit-string): Use it. + +2001-07-13 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-fade-out-entry): Replace yes-or-no-p by y-or-n-p; + obsoleting an entry isn't fatal. + +2000-01-18 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-ensure-source-references): Correctly imply the file + name from the last which has been explicitly given. + +2000-01-17 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-subedit-abort): Change variable names. + (po-seek-equivalent-translation): Call set-buffer instead of + select-buffer. + (po-subedit-cycle-auxiliary): Adapt to multiple edits. + +2001-08-12 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-find-charset, po-compute-counters, + po-check-file-header, po-set-msgstr): Emacs 19 portability matters. + +2000-01-03 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-check-file-header): Add a new line after default + header only for non-empty PO files. + +1999-12-10 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-send-mail): Clarify some prompts. + Reported by Laurent Bourbeau. + +1999-07-25 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-team-name-to-code): New variable. + (po-guess-archive-name): Use it. + +1999-06-01 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-guess-archive-name, po-guess-team-address): Accept + more addresses, do not restrict to necessarily @li.org. + +1998-12-06 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-guess-archive-name): Allow Free as well as GNU + for domain name prefix. + +1998-05-15 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-any-msgid-regexp, po-any-msgstr-regexp, + po-msgstr-idx-keyword-regexp, po-obsolete-msgstr-regexp, + po-set-msgstr, po-obsolete-comment-regexp, po-get-comment): Enforce + #~ for obsolete entries. The tilde is not optional anymore. + +1998-05-09 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-after-entry-regexp): Check if at end of line, rather + than for any character not being quoted. Else, M-u skips over + immediately previous untranslated entry, because backward pattern + extends beyond point. Reported by Kalle Niemitalo. + +2001-07-13 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-validate): Check for 'null-device; if not available + use "NUL" for windows-nt and windows-95 and /dev/null as fallback. + From Eli Zaretskii and François Pinard. + +2000-01-03 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-preset-string-functions): New function. + (po-find-unknown-string, po-mark-unknown-string): New functions. + (po-find-c-string): Return a 3-element list. + (po-find-emacs-lisp-string): Likewise. + (po-mark-found-string): Simplify consequently. + (po-tags-loop-scan): Use po-preset-string-functions. + + * po-mode.el (po-mark-c-string, po-mark-emacs-lisp-string): Have + marking functions to leave cursor after marked string. Do not return + updated end anymore. + + * po-mode.el (po-mark-found-string, po-mark-translatable, + po-select-mark-and-mark): Other changes. + +2000-01-02 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-tags-search): Better use the Emacs tags interface, + and simplified. Nested tags tables should be handled now. + (po-tags-loop-scan, po-tags-loop-operate): New functions. + (po-string-contents, po-string-buffer): New buffer local variables. + (po-next-file-list): Deleted. All usages adjusted. + +2001-01-04 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-extract-part-unquoted): New function. + (po-extract-unquoted, po-skip-over-python-string): Use it. + + * po-mode.el (po-skip-over-python-string): Missing parentheses. + Reported by Andreas Schwab. + + * po-mode.el (po-find-python-string, po-mark-python-string, + po-skip-over-python-string): New functions. + (po-tags-search, po-mark-found-string): Use them in Python mode. + +2001-08-13 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-mode): Issue message after running hooks rather than + before, augmenting the chances that the message does not get erased. + +1999-07-25 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-match-string): New function. + (po-set-msgid): Use it. + (po-set-msgstr): Likewise. + (po-set-comment): Likewise. + (po-ensure-source-references): Likewise. + (po-guess-archive-name): Likewise. + (po-guess-team-address): Likewise. + +2000-08-11 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Move blocks of code around in view of later patches. + Do minor cosmetic changes. Correct name-buffer into buffer-name + whenever needed. Remove one case of spurious testing code. + Borrow the marking overlay if possible, do not creating a new one. + +2000-01-24 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Split portability matters in two. A minimum for + customisation to work, and the rest after the customisation page. + Reported by Martin v. Löwis. + +2000-01-17 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: To avoid compilation diagnostics, move customisation + before portability matters and add some variable declarations. + +1998-09-07 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Merge make-local-variable within set whenever possible. + +2001-07-06 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-msgfmt-version-check): Check for version strings with + a single dot (e.g. 0.11) correctly. + +2001-07-08 Karl Eichwalder <ke@suse.de> + + * po-mode.el: Don't recommend to use po-mode for POT files. + (po-find-charset): New function. + (po-find-file-coding-system-guts): Use it to get rid of the 4096 limit. + If no charset found, use "none". + +2001-07-07 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-compute-counters): Don't count the header entry. + Reported by Bernd Schandl. + +2001-07-02 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-validate): Use private 'compile-command' and buffer + name for validation output. + +2001-07-01 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-mode): Use add-hook to call po-replace-revision-date + saving the buffer. + (po-quit): Don't call po-replace-revision-date. + (po-validate): Likewise. + Proposed by Bernd Schandl. + + (po-auto-replace-revision-date): Change default to 't'; otherwise the + user will be asked too often. + +2001-06-04 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-edit-string): Set 'buffer-file-coding-system' + (for hints thanks to Eli Zaretskii). + +2001-06-04 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-msgfmt-version-check): New. Check for GNU gettext + 0.10.36 or newer. Re-written by Stefan Monnier. + (po-validate): Use 'po-msgfmt-version-check'. + (po-validate): Use 'null-device' instead of literal "/dev/null". + Reported by Eli Zaretskii. + +2001-09-13 Bruno Haible <haible@clisp.cons.org> + + * gettext-0.10.40 released. + +2001-09-13 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Don't copy intl/COPYING*; these files may confuse + the user of the enclosing package. + +2001-07-24 Bruno Haible <haible@clisp.cons.org> + + * gettext-0.10.39 released. + +2001-07-11 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el (po-default-file-header): Replace 8-bit with 8bit. + +2001-07-01 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el (po-content-type-charset-alist): Add entries for + ISO-8859-15, GB2312, EUC-JP, EUC-KR, BIG5, SHIFT_JIS, TIS-620, VISCII. + +2001-06-25 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el (po-find-file-coding-system): Make it work in XEmacs 20 + as well. Based on a patch by Enrico Scholz + <enrico.scholz@informatik.tu-chemnitz.de>. + +2001-05-23 Bruno Haible <haible@clisp.cons.org> + + * gettext-0.10.38 released. + +2001-05-22 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Copy plural.c and touch it afterwards. + +2001-05-21 Alexandre Duret-Lutz <duret_g@epita.fr> + + * gettextize.in: Check for configure.ac in addition to configure.in. + +2001-05-12 Paul Eggert <eggert@twinsun.com> + + * gettextize.in: Replace "test -e" with "test -f", since the 'test' + builtin of Solaris 8 /bin/sh doesn't grok "test -e". + +2001-05-11 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Tell the user about glibc21.m4. + +2001-05-09 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el (po-replace-revision-date): For the timezone, use RFC 822 + format [+/-]HHMM, not [+/-]HH:MM. Reported by Jan D. + +2001-04-19 Bruno Haible <haible@clisp.cons.org> + + * gettext-0.10.37 released. + +2001-03-29 Bruno Haible <haible@clisp.cons.org> + + * gettext-0.10.36 released. + +2001-03-25 Bruno Haible <haible@clisp.cons.org> + + * combine-sh: Remove file. + * Makefile.am (EXTRA_DIST): Remove it. + +2001-03-22 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el (po-default-file-header): Replace ENCODING with 8-bit. + +2001-03-21 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Mention where to get config.guess and config.sub. + +2001-03-20 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Verbosity: describe each action being done. Make the + po/ChangeLog entry more intelligent. + +2001-03-10 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-font-lock-keywords): Respect entry types + 'msgid_plural' and 'msgstr[]'. + '%*s' is a valid sformat, too. + (po-font-lock-keywords): Fix regexp; '[]' part is optional. + (po-any-msgstr-regexp): Also match msgstr[] fields. + (po-msgstr-idx-keyword-regexp): New variable. + (po-set-msgstr): Respect indexed msgstr entries; use + `po-msgstr-idx-keyword-regexp'. + +2001-03-09 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Update copyright year. Add code to update + po/ChangeLog and tell the user about the m4 macros. Don't attempt to + run config.status, because aclocal.m4 is not ready. + +2001-03-03 Karl Eichwalder <ke@suse.de> + + * po-mode.el (po-subedit-exit): Run po-subedit-exit-hook before + leaving the edit buffer. + +2001-02-10 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Bail out if $gettext_dir doesn't exist. + +2001-02-07 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Fix bug in 2000-12-08 patch. + +2001-01-28 Bruno Haible <haible@clisp.cons.org> + + * po-mode.el: Call autoload with 4 arguments. + (po-content-type-charset-alist): Change cars to uppercase. + (po-find-file-coding-system): Uppercase charset for lookup in + po-content-type-charset-alist. + +2001-01-06 Bruno Haible <haible@clisp.cons.org> + + * magic.add: Remove file. Has been integrated into the 'file' package. + * Makefile.am (EXTRA_DIST): Remove it. + +2000-12-30 Bruno Haible <haible@clisp.cons.org> + + * locale.alias: Move to ../intl. + * Makefile.am (EXTRA_DIST): Remove locale.alias. + (localedir, locale_DATA): Remove variables. + +2000-12-08 Bruno Haible <haible@clisp.cons.org> + + * gettextize.in: Preserve RCS and CVS subdirs in intl/. + Reported by Santiago Vila <sanvila@unex.es>. + + * gettextize.in: Test for ABOUT-NLS, not NLS. + +2000-10-26 GOTO Masanori <gotom@debian.or.jp> + + * locale.alias: Add ja_JP.ujis alias. + +2000-08-31 Ulrich Drepper <drepper@redhat.com> + + * locale.alias: Add aliases for bokmal and nynorsk. + +2000-08-21 Ulrich Drepper <drepper@redhat.com> + + * locale.alias: Add aliases for Korean. + +2000-08-01 Ulrich Drepper <drepper@redhat.com> + + * locale.alias: Update japanese aliases. + +2000-05-06 Ulrich Drepper <drepper@redhat.com> + + * gettextize.in: Remove code to test for version of the m4 files. + + * po-mode.el: A few more changes by François Pinard. + +1998-05-03 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-create-overlay) [po-XEMACS]: No argument. + Reported by Ulrich Drepper. + +1997-10-18 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-tags-search, po-mark-found-string): C++ as C. + (po-find-c-string): Skip C++ comments as well. + +1998-05-10 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-mode) [po-XEMACS]: Explicitely add menus. + Reported by Hrvoje Niksic. + + * po-mode.el (po-mode-menu-layout): Give real access to auxiliary + files through the menu, instead of leaving menu entries inactive. + +1998-05-15 Ulrich Drepper <drepper@cygnus.com> + + * tcl_gettext.c (tcl_gettext): Replace illegal with invalid. + +1998-05-01 08:47 Ulrich Drepper <drepper@cygnus.com> + + * gettext-0.10.35 released. + +1998-03-30 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-tags-search, po-mark-translatable, + po-select-mark-and-mark): Call interactive after the doc string, + instead of before. + Reported by Tom Tromey. + +1998-04-27 21:17 Ulrich Drepper <drepper@cygnus.com> + + * po-mode.el: Update from most recent version. + + * gettextize.in: Use aclocaldir from configuration. + +1997-09-04 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Rename po-middle-of-entry to po-start-of-msgstr, add + variable po-start-of-msgid. Use it whenever appropriate. + + * po-mode.el (po-find-file-coding-system): New function. + Reported by Ken'ichi Handa. + + * po-mode.el: Normalise string= to string-equal. + + * po-mode.el (po-send-mail): Allow for mailing to the team. + (po-guess-team-address): New function. + +1997-09-02 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-set-comment): Unused variable buffer. + (po-edit-string): Unused variables start, middle, end and obsolete. + (po-tags-search): Unused variable find-string. + + * po-mode.el (po-check-lock): Create the work buffer as required, to + avoid diagnostics about selecting a deleted buffer, after a user + explicitly killed the work buffer instead of exiting it normally. + Reported by Hrvoje Niksic. + + * po-mode.el: New variable po-mode-menu-layout. + (po-mode): Establish a bar mode menu if possible. + Reported by Nils Naumann. + + * po-mode.el: Decide set-translation-domain before using it. + This avoids a byte-compilation warning. + + * po-mode.el (po-set-comment): Rearrange wrong conditional flow. + Translator comments were duplicated, when contents were unchanged. + Reported by Enrique Melero. + +1997-09-01 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-highlight, po-dehighlight): New functions. + New globals: po-highlight-p, po-highlight-face and po-overlay. + (po-edit-msgstr): Highlight the msgid string while editing. + (po-tags-search): Highlight found string. + (po-mark-found-string): Unhilight string before replacing it. + Reported by Jim Meyering, Michel Robitaille and Ulrich Drepper. + + * po-mode.el (po-set-field): Tells if buffer was modified. + (po-edit-msgstr): Never make fuzzy an entry which is unmodified. + + * po-mode.el: Add M command, and variables po-compose-mail-function, + po-translation-project-address and po-gzip-uuencode-command. + (po-guess-archive-name, po-send-mail): New functions. + Reported by Karl Eichwalder. + +1997-08-31 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el (po-replace-revision-date): Enforce ISO 8601 zones. + Reported by Enrique Melero Gómez, Karl Eichwalder, Max de + Mendizabal and Santiago Vila Doncel. + + * po-mode.el (po-edit-string): Expand tabs while editing + translations. Reported by Göran Uddeborg. + + * po-mode.el: Accept C-c C-k to abort recursive edits. + Reported by Göran Uddeborg and Hrvoje Niksic. + +1997-06-02 Ben Pfaff <pfaffben@pilot.msu.edu> + + * po-mode.el (po-find-c-string, po-extract-unquoted): Process ANSI + string concatenation and K&R escaped newlines. + +1997-03-02 Hrvoje Niksic <hniksic@srce.hr> + + * po-mode.el (po-help): To continue, also accept things like a + mouse press or an arrow key. + +1996-11-12 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Alter po-font-lock-keywords to properly highlight C + formats, when using an upper case letter as formatting functor. + + * po-mode.el: If available, prefer force-mode-line-update builtin. + + * po-mode.el: Use our own buffer-substring, defining it as + buffer-substring-no-properties if available. Because of text + properties, buffer-substring does not always return a string. + + * po-mode.el (po-consider-source-path): Ensure a trailing slash. + +1996-05-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * po-mode.el (po-eval-requoted, po-extract-unquoted): Correct + missing or spurious backslashes in some regexps. + +1997-08-01 15:49 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require version 1.2. + +1997-04-12 Hrvoje Niksic <hniksic@srce.hr> + + * po-mode.el: Customize. + +1997-03-10 06:56 Ulrich Drepper <drepper@cygnus.com> + + * elisp-comp: Use EMACS environment variable is available instead + of always executing emacs. + +1996-12-03 23:24 Ulrich Drepper <drepper@cygnus.com> + + * gettextize.in: Update --help and --version texts. + +1996-11-22 04:45 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.am (EXTRA_DIST): Add locale.alias. + +1996-11-21 23:11 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.am: Remove rules for ELisp handling. Automake now + knows what to do. + +1996-10-28 23:09 Ulrich Drepper <drepper@cygnus.com> + + * gettextize.in: Remove -v from help message. Change format of + --version text according to last GNU coding standard. Don't print + help message for unknown option. Instead print "Try `..." + message. + +1996-10-19 17:41 1996 Ulrich Drepper <drepper@cygnus.com> + + * locale.alias: Language for czech entry must be cs. + +1996-09-18 00:29 François Pinard <pinard@progiciels-bpi.ca> + + * po-mode.el (po-font-lock-keywords): Correct highlighting of + formats like %3d. + +1996-08-19 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Restructured to avoid all byte-compilation warnings. + Highlighting using `hilit19' is being deprecated, font lock code + should now automatically be activated whenever available. + +1996-07-15 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: po-mode.el (po-kill-msgstr): Ensure po-entry-type is + always defined before decreasing counter. + +1996-07-15 01:08 Ulrich Drepper <drepper@cygnus.com> + + * gettextize.in (gettext_dir): Remove warning that files will be + removed. It's not really necessary since the -f option is + necessary. Suggested by François Pinard. + +1996-06-26 18:40 Ulrich Drepper <drepper@cygnus.com> + + * po-mode.el: Added ELisp support. Patch by François Pinard. + +1996-06-18 15:12 Ulrich Drepper <drepper@cygnus.com> + + * gettextize.in (aclocal_version): new variable. Value determined + by configure. This finally makes the check of the aclocal.m4 + version number correct because this number need not be the same as + the version number of the package. + +1996-06-06 02:02 Ulrich Drepper <drepper@cygnus.com> + + * gettextize.in: Rewrite copying now that files are kept in + different directories and don't use funny prefixes anymore. + +1996-06-05 16:36 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.am (DISTCLEANFILES): Renamed from CLEANFILES and + changed $(lisp_DATA) to $(ELCFILES). + +1996-06-03 00:46 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.am (elc_DATA): Rename to elc_SCRIPTS so that + distribution wents smooth. + +1996-06-02 21:16 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.am (SUFFIXES): New variable. Automake wants it this + way to introduce new suffixes. + + * Makefile.am: Initial revision. + +1996-06-01 18:20 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (default): Add default rule because AIX' make does + not understand multiple goals in default rule. + + * Makefile.in (DISTFILES): Rename README-TCL to README-Tcl. + + * gettextize.in: Implement test for correct aclocal.m4 version. + +1996-04-06 02:40 Ulrich Drepper <drepper@myware> + + * po-mode.el: Apply François' patch for new default values of + configuration variables and new header entry format. + +1996-04-02 18:56 Ulrich Drepper <drepper@myware> + + * Makefile.in (all-gettext): New goal. Same as all. + +1996-04-02 03:18 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: * Let po-show-source-context update + po-reference-cursor itself, and display to the minibuffer the + relative and maximum position of the shown reference in the list + of collected references. Callers adjusted accordingly. + . Do not generate tildes while reconstructing non-obsolete + comments. + . Do merge attributes on a single `#,' line. Using the non-regexp + version of the search was causing the generation of another one. + . Remove a spurious trailing comma while removing the last + attribute. + . Limit the search for source references to the msgstr line. This + does not correct any bug, but is more consistent. + +1996-03-31 23:32 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: * Small corrections to the help page. Reported by + Karl Eichwalder. + + * Change po-edit-mode-map to po-subedit-mode-map and + po-mode-edit-hook to po-subedit-mode-hook. The previous names + were not consistent. Reported by Karl Eichwalder. + + * Repair RET, completely broken for multi-lines, maybe showing a + regexp bug in Emacs(?). See the FIXME in po-extract-unquoted. + Reported by Karl Eichwalder. + +1996-03-31 22:36 Ulrich Drepper <drepper@myware> + + * gettextize.in (prefix): Define from @prefix@. Is used in + gettext_dir definition. Reported by Jim Meyering. + +1996-03-28 19:11 Karl Eichwalder <ke@ke.Central.DE> + + * gettextize.in (gettext_dir): Set to @datadir@/gettext. + +1996-03-26 21:27 Ulrich Drepper <drepper@myware> + + * Makefile.in (datadir): Initialize from @datadir@. Reported by + Karl Eichwalder. + +1996-03-25 09:52 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: * Correct documentation mistakes in short help. + + * Accept both # and #~ for obsolete comments, but use #~ when + generating them. + + * Recognize \NNN octal notation for characters in PO file strings, + however, never produce such horror. + +1996-03-25 03:51 Ulrich Drepper <drepper@myware> + + * po-mode.el: Some last minute changes by François Pinard. + +1996-03-24 18:51 Ulrich Drepper <drepper@myware> + + * po-mode.el (po-confirm-and-quit): Recognize both #, and #! but + prefer producing #,. + + * Rephrase messages about location stack contents + * Clear out message when user refuses quitting. + +1996-03-23 14:34 François Pinard <pinard@iro.umontreal.ca> + + * Implement po-default-file-header. + Reported by Karl Eichwalder. + + * Rename po-auto-select to po-auto-select-entry. + + * Revise text of all disruptive questions, try to alleviate + them, avoid them if possible. Clear the message area sometimes. + + * Correct a bug by which `#! fuzzy' was inserted before the + white line, instead of after, for PO files having no `#' line + of any kind. + + * Correct the message count updating in po-kill-msgstr and + po-yank-msgstr. + + * Allow for po-auto-edit-with-msgid to work, when + po-edit-msgstr was called on an untranslated immediately after + loading a PO file. + + * po-quit may select all kind of not fully processed entries, + rather than just untranslate ones. + + Rebound commands: + * TAB moves to LFD for po-msgid-to-msgstr. + * z moves to DEL for po-fade-out-entry. + + New commands: + * TAB is po-unfuzzy. + * SPC is po-auto-select. + * t is po-next-translated entry. + * M-t is po-previous-translated-entry. + * E is po-edit-out-full. + + Improved commands: + * DEL (po-fade-out-entry) makes the entry fuzzy as first step, + and request confirmation for some transitions. + * LFD (po-msgid-to-msgstr) requests confirmation if entry was + already translated. + * v (po-validate): Pass the -v flag to msgfmt. + * q (po-confirm-and-quit): Use milder confirmation. + * Implemented variables po-auto-edit-with-msgid, + po-auto-fuzzy-on-edit, po-auto-select-on-unfuzzy, and + po-auto-replace-revision-date. + + PO header management: + * PO-Revision-Date might be automatically updated. + Reported by Karl Eichwalder. + * A normalized PO file header is automatically created if it + not exists. Any previous PO file header is kept, obsoleted. + + Various internal cleanups: + * Revised the PO mode summary display. + * ...-hooks renamed ...-hook, per word of Richard Stallman. + * po-obsolete-flag replaced by more general po-entry-type. + * po-appropriate-counter, po-increase-appropriate-counter and + po-decrease-appropriate-counter are replaced by po-type-counter, + po-decrease-type-counter and po-increase-type-counter. + Overall counting logic revised and cleaned up. + * The concept of being after last entry disappears. Being + after last entry is equivalent to being on last entry. And + since there is at least the PO header entry, and an empty PO + file is not possible anymore: simplified code accordingly. + * po-add-attribute, po-delete-attribute: New functions. + * po-offer-validation disappears, as (buffer-modified-p) may + be used instead. + +1996-03-14 16:55 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Inexact entries are now called fuzzy. Change + regular expression and function names. + +1996-03-14 11:38 François Pinard <pinard@iro.umontreal.ca> + + * po-mode.el: Rename po-mode-hooks to po-mode-edit-hooks. + + * po-mode.el: Suggest accepting .pot and embedded .po. as triggers + for PO editing mode, besides .po and .pox. + * PO mode help display has been revised to fit in 23 lines, + and present some more yet unimplemented commands. PO mode + initially suggests using `h' or `?' for documentation. + * Many variables and functions have been renamed for more + clarity and consistency, too numerous to be detailed here. + * Reorganization of key-bindings. This restores to M-w and M-y + their usual meaning, and free some keys for to-be-implemented + commands: the a/M-a/A/M-A series for auxiliary files, c/M-c + for compendium files, and l/M-l/L/M-L series for lexicon files. + . Commands u, v, o and q have been renamed U, V, O and Q + (po-undo, po-validate, po-other-window and po-quit). + . Command v replaces old command V (po-mode-version). + . u and SPC replace e (po-next-untranslated-entry). + M-u replaces M-e (po-previous-untranslated-entry). + . o replaces M-n and M-SPC (po-next-obsolete-entry). + M-o replaces M-p and M-DEL (po-previous-obsolete-entry). + . SPC, DEL, and M-RET are no more po-next-entry, + po-previous-entry and po-edit-comment. + . r replaces l (po-pop-location). + . s (po-cycle-source-reference) replaces c (po-cycle-reference). + M-s (po-select-source-reference) replaces M-c (po-select-reference). + S (po-consider-source-path) replaces d (po-add-path). + M-S (po-ignore-source-path) replaces M-d (po-delete-path). + . K, W and Y replace M-k, M-w and M-y (po-kill-comment, + po-kill-ring-save-comment and po-yank-comment). + * New command q (po-confirm-and-quit). + +1996-03-13 13:16 Karl Eichwalder <ke@ke.Central.DE> + + * po-mode.el (po-edit-string): run hook `po-edit-hooks'. + +1996-03-09 12:39 Ulrich Drepper <drepper@myware> + + * po-mode.el (po-keywords): Add N_. + +1996-01-15 02:58 François Pinard <pinard@iro.umontreal.ca> + + * gettextize.in: Better message about aclocal.m4 change. + +1995-12-19 22:41 Ulrich Drepper <drepper@myware> + + * README-TCL, tcl_gettext.c: Initial revision. + + * Makefile.in (DISTFILES): Add tcl_gettext and README-TCL. + +1995-12-19 22:12 Ulrich Drepper <drepper@myware> + + * Makefile.in (Makefile, gettextize): Explicitly use $(SHELL) for + running shell scripts. + +1995-12-16 15:31 Ulrich Drepper <drepper@myware> + + * gettextize.in: Implement -c option: always copy files. + Requested by Roland McGrath. + +1995-12-05 11:41 Larry Schwimmer <rosebud@cyclone.stanford.edu> + + * Makefile.in (install-data): Make sure $(localedir) exists. + +1995-11-27 02:50 Sakai Kiyotaka <ksakai@netwk.ntt-at.co.jp> + + * locale.alias: New entry for Japanese. + +1995-11-24 23:53 Ulrich Drepper <drepper@myware> + + * po-mode.el (po-quit): Always clear the message area after y-or-n-p. + +1995-11-11 16:30 Ulrich Drepper <drepper@myware> + + * po-mode.el: Implement searching of inexact entries. + + * po-mode.el: Implement po-version. + +1995-11-08 01:46 Ulrich Drepper <drepper@myware> + + * po-mode.el: + Hilit file names and line numbers in #: with function-name face. + + * po-mode.el: Add support for XEmacs' font-lock.el. + + * po-mode.el: + Patches by François: enable hilit, handle multi-line #: lines, and + don't pass -v argument to msgfmt. + +1995-11-06 15:52 Ulrich Drepper <drepper@myware> + + * po-mode.el: msgfmt behaves now well again. Return to use + /dev/null as output file for verification. + +1995-11-05 19:39 Ulrich Drepper <drepper@myware> + + * Makefile.in (dist-gettext): Make synonym for dist. + +1995-11-05 15:40 Ulrich Drepper <drepper@myware> + + * Makefile.in (dist): Suppress error message when ln failed. + Get files from $(srcdir) explicitly. + +1995-11-01 10:39 Ulrich Drepper <drepper@myware> + + * gettextize.in: + Don't use "!" as negation; not all versions of sh support it. Patch + by Tom Tromey. + +1995-10-31 20:46 Ulrich Drepper <drepper@myware> + + * po-mode.el (po-msgfmt-program): + Variable which contains name of the msgfmt program. + (po-validate): Use above variable. + +1995-10-31 19:12 Tom Tromey <tromey@cambric.colorado.edu> + + * gettextize.in: Don't use "!" as negation; not all versions of sh + support it. + +1995-10-30 22:22 Ulrich Drepper <drepper@myware> + + * po-mode.el (po-validate): + Protect the previous value of compile-command. + Change by François Pinard. + +1995-10-29 12:11 Ulrich Drepper <drepper@myware> + + * gettextize.in: + Change text of trailing message about aclocal.m4 changing. Suggested + by François Pinard. + + * Makefile.in (INSTALL_PROGRAM): Not used anymore. + (INSTALL_SCRIPT): New variable, + (install-exec): Install gettextize using INSTALL_SCRIPT. + + * po-mode.el (po-eval-requoted): Add space in description. + + * Makefile.in: Remove Emacs local variable setting. + +1995-10-28 22:09 Ulrich Drepper <drepper@myware> + + * Makefile.in (install-src): Move some rules from install-data. + (install-data): Add installation of locale.alias. + + * locale.alias: Initial revision + +1995-10-28 18:08 Ulrich Drepper <drepper@myware> + + * po-mode.el: Apply latest patch by François. + +1995-09-23 14:34 Ulrich Drepper <drepper@myware> + + * gettextize.in: + Run config.status shell script if this is exists and is selected. This + is always necessary if one updates the intl/ dir. + +1995-09-20 22:26 Ulrich Drepper <drepper@myware> + + * gettextize.in: + Try to remove files in root and po/ dir before linking. If this is + not done re-linking to the same file will cause an error. + +1995-09-07 00:21 Ulrich Drepper <drepper@myware> + + * gettext-sh: Protect IFS assignments. + +1995-08-22 22:12 Ulrich Drepper <drepper@myware> + + * gettextize.in (usage): + Rearrange help message. Now describe -f option. + Reported by François Pinard. + +1995-08-19 23:32 Ulrich Drepper <drepper@myware> + + * gettextize.in: Add missing terminating quotes. + + * Makefile.in (INSTALL_PROGRAM): + *Do* use -m 755. Autoconf does not set any mode. + + * Makefile.in (install-src): + Make behave like install. I.e. really install + gettextize and the .elc files. + +1995-08-19 15:08 Ulrich Drepper <drepper@myware> + + * gettextize.in: + Some nicety changes of shell programming by François Pinard. + + * po-mode.el (po-search-path): Extend by "../". + + * gettextize.in: Protect against relative source paths. + Avoid exit an second level shell. + + * gettext-sh: Better comments: By François Pinard. + + * Makefile.in (INSTALL_PRG): Don't define mode ourself. + (uninstall) Remove gettextize. + + * gettextize.in: + intl/VERSION is now a real file and must not be generated here. + +1995-08-18 12:05 Ulrich Drepper <drepper@myware> + + * gettext-sh: Use -s option for gettext instead of --shell-script. + +1995-08-15 10:49 Ulrich Drepper <drepper@myware> + + * Makefile.in (all, check): + Add gettextize to dependencies, so that install need not + build anything. + +1995-08-15 07:13 Ulrich Drepper <drepper@myware> + + * gettextize.in: Add intl/VERSION file. + + * gettextize.in: Remove target file for root- and po- file first. + + * gettextize.in: + Files installed in top directory of package are now preceded by root-. + All other are ignore (esp aclocal.m4). + +1995-08-14 23:50 Ulrich Drepper <drepper@myware> + + * Makefile.in (exec_prefix, bindir): + Directories needed for installing gettextize. + (transform): Standard GNU program name transformation. + (INSTALL_PROGRAM): Program to install gettextize as executable. + (DISTFILES): Remove makelinks.in. Distribute gettextize.in instead. + (install-src): Install gettextize in selected binary directory. + + * gettextize.in: Initial revision + +1995-08-10 22:18 Ulrich Drepper <drepper@myware> + + * gettext-sh: Fix typos. Reported by François Pinard. + (TEXTDOMAIN): Set value from ${PACKAGE-NAME} variable and document it. + +1995-08-08 21:45 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): Add locale.alias. + +1995-08-07 23:48 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): gettext.perl moved from intl/. + gettext-sh: New file. + + * gettext-sh: Initial revision. + + * elisp-comp: + Use `rm -fr $tempdir' instead of `rm -f $tempdir/*; rmdir $tempdir' + because some NFS implementation create .nfsxxx files which are + not caught be the *. Reported by Paul Nevai. + +1995-08-04 22:38 Ulrich Drepper <drepper@myware> + + * Makefile.in (.el.elc): + Include François' wonderful pun to highlight warning text. + + * Makefile.in (distclean): Remove makelinks. + + * Makefile.in (dist): Remove `copying instead' message. + +1995-08-02 19:44 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): makelinks.in instead of makelinks-sh. + + * makelinks.in: First try making symbolic links. + Rename to makelinks.in because it will be configure by + config.status. + +1995-08-01 15:54 Ulrich Drepper <drepper@myware> + + * po-mode.el: Fixes to run on DEMACS. + Provided by François Pinard. + + * Makefile.in (check): Make same as all. + +1995-08-01 10:32 Ulrich Drepper <drepper@myware> + + * makelinks-sh: Implement option handling. + When intl/ subdir exist give warning and exit unless option -f + is given. + Use ${echo} in place where translations will be necessary. + +1995-07-26 01:24 Ulrich Drepper <drepper@myware> + + * makelinks-sh: Update for correct intl_files list. + Handle existing directories. + Handle non-existing ln and/or ln -s. + Mostly by François Pinard. + +1995-07-22 01:14 Ulrich Drepper <drepper@myware> + + * Makefile.in (prefix,datadir,lispdir): New definitions. + (SITELISPDIR): Remove variable. + (all): Now build *.elc files. + (install,uninstall): Specify complete path of files to delete. + +1995-07-20 00:03 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): elisp-comp was missing. + +1995-07-18 23:53 Ulrich Drepper <drepper@myware> + + * po-mode.el: Latest version by François. This version allows + scanning C source code for translatable strings and interactive + construction of the .po file. The string matching heuristic is + due to Richard Stallman. + +1995-07-18 01:32 Ulrich Drepper <drepper@myware> + + * Makefile.in (DISTFILES): Add magic.add. Comes from ../. + + * po-mode.el, makelinks, combine-sh: Moved to here from ../intl/. + magic.add: Moved to here from ../. + + * Makefile.in: Initial revision diff --git a/gettext-tools/misc/DISCLAIM b/gettext-tools/misc/DISCLAIM new file mode 100644 index 0000000..a04a763 --- /dev/null +++ b/gettext-tools/misc/DISCLAIM @@ -0,0 +1,62 @@ +Please print this out, sign it, write the date, and snail it to +this address: + +Attn: Disclaimer Clerk +Free Software Foundation +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301 +USA + +Please print your email and snail addresses on the printed disclaimer. +*Don't forget to include the date.* + +In the unlikely event that you are employed on a continuing basis to do +translation, we may need a disclaimer from your employer as well, to assure +your employer does not claim to own this work. Please contact the FSF to +ask for advice if you think this may apply to you. + +Note: if you want the wording modified to cover only a specific category +of programs, or a specific program, we can easily do that. + + + DISCLAIMER OF COPYRIGHT IN TRANSLATIONS OF PARTS OF PROGRAMS + +I, _____________________________________, a citizen of _____________ +(country), do hereby acknowledge to the Free Software Foundation, a +not-for-profit corporation of Massachusetts, USA, that I disclaim all +copyright interest in my works, which consist of translation of +portions of free software programs from one human language to another +human language, that I have provided to the Foundation or that I will +provide in the future. The programs to which this applies include all +programs for which the Foundation is the copyright holder, and all +other freely redistributable software programs. + +The translations covered by this disclaimer include, without +limitation, translations of textual messages, glossaries, command or +option names, help files, user interface text, and the like, contained +within or made for use via these programs. + + Given as a sealed instrument this ___ day of ______ (month), ______ +(year), at _____________________ (city and country). + + + signed: ___________________________ + + email address: ___________________________ + + postal address: ___________________________ + + ___________________________ + + ___________________________ + + + +I currently expect to work on the following translation teams (though +this disclaimer applies to all such translations that I may +subsequently provide to the FSF, whatever the language): + + __________________________________________________ + + __________________________________________________ + diff --git a/gettext-tools/misc/Makefile.am b/gettext-tools/misc/Makefile.am new file mode 100644 index 0000000..1c30157 --- /dev/null +++ b/gettext-tools/misc/Makefile.am @@ -0,0 +1,120 @@ +## Makefile for the gettext-tools/misc subdirectory of GNU gettext +## Copyright (C) 1995-1997, 2000-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc. +## +## This program 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 of the License, or +## (at your option) any later version. +## +## This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = 1.2 gnits +EXTRA_DIST = +MOSTLYCLEANFILES = +CLEANFILES = +DISTCLEANFILES = + + +# Scripts for maintainers. + +bin_SCRIPTS = gettextize autopoint + +DISTCLEANFILES += gettextize autopoint convert-archive + +CLEANFILES += \ + archive.dir.tar.gz \ + archive.dir.tar.bz2 \ + archive.dir.tar.xz \ + archive.cvs.tar.gz \ + archive.git.tar.gz + +EXTRA_DIST += add-to-archive cvsuser.c archive.dir.tar + +gettextsrcdir = $(datadir)/gettext +gettextsrc_DATA = $(ARCHIVE_@ARCHIVE_FORMAT@) +ARCHIVE_dirgz = archive.dir.tar.gz +ARCHIVE_dirbz2 = archive.dir.tar.bz2 +ARCHIVE_dirxz = archive.dir.tar.xz +ARCHIVE_git = archive.git.tar.gz +ARCHIVE_cvs = archive.cvs.tar.gz + +# The archive.dir.tar is not in the CVS. Alpha-testers must use the one from +# an already installed release. +archive.dir.tar: + if test -f $(gettextsrcdir)/archive.dir.tar.gz; then \ + gzip -d -c < $(gettextsrcdir)/archive.dir.tar.gz > $@-t && mv $@-t $@; \ + else \ + if test -f $(gettextsrcdir)/archive.dir.tar.bz2; then \ + bzip2 -d -c < $(gettextsrcdir)/archive.dir.tar.bz2 > $@-t && mv $@-t $@; \ + else \ + if test -f $(gettextsrcdir)/archive.dir.tar.xz; then \ + xz -d -c < $(gettextsrcdir)/archive.dir.tar.xz > $@-t && mv $@-t $@; \ + else \ + echo "archive.dir.tar is not under version control. Please copy the archive.dir.tar.{gz,bz2,xz} from an already installed release to gettext-tools/misc/ and decompress it there." 1>&2; \ + exit 1; \ + fi; \ + fi; \ + fi +MOSTLYCLEANFILES += archive.dir.tar-t + +# The archive.dir.tar.gz is generated from archive.dir.tar. +archive.dir.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + gzip -c -9 < "$$inputfile" > $@-t && mv $@-t $@ +MOSTLYCLEANFILES += archive.dir.tar.gz-t + +# The archive.dir.tar.bz2 is generated from archive.dir.tar. +archive.dir.tar.bz2: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + bzip2 -c -9 < "$$inputfile" > $@-t && mv $@-t $@ +MOSTLYCLEANFILES += archive.dir.tar.bz2-t + +# The archive.dir.tar.xz is generated from archive.dir.tar. +archive.dir.tar.xz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + xz -c -5 < "$$inputfile" > $@-t && mv $@-t $@ +MOSTLYCLEANFILES += archive.dir.tar.xz-t + +# The archive.git.tar.gz is generated from archive.dir.tar. +archive.git.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + ./convert-archive dir git "$$inputfile" $@ + +# The archive.cvs.tar.gz is generated from archive.dir.tar. +archive.cvs.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + ./convert-archive dir cvs "$$inputfile" $@ + +# Emacs Lisp code. + +lisp_LISP = start-po.el po-mode.el po-compat.el + +EXTRA_DIST += $(lisp_LISP) diff --git a/gettext-tools/misc/Makefile.in b/gettext-tools/misc/Makefile.in new file mode 100644 index 0000000..1235d2b --- /dev/null +++ b/gettext-tools/misc/Makefile.in @@ -0,0 +1,1944 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = misc +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/../build-aux/mkinstalldirs \ + $(srcdir)/gettextize.in $(srcdir)/autopoint.in \ + $(srcdir)/convert-archive.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/libgettextpo/gnulib-m4/gnulib-comp.m4 \ + $(top_srcdir)/libgrep/gnulib-m4/gnulib-comp.m4 \ + $(top_srcdir)/libgrep/gnulib-m4/langinfo_h.m4 \ + $(top_srcdir)/libgrep/gnulib-m4/localeconv.m4 \ + $(top_srcdir)/libgrep/gnulib-m4/mbrlen.m4 \ + $(top_srcdir)/libgrep/gnulib-m4/nl_langinfo.m4 \ + $(top_srcdir)/libgrep/gnulib-m4/regex.m4 \ + $(top_srcdir)/gnulib-m4/00gnulib.m4 \ + $(top_srcdir)/gnulib-m4/absolute-header.m4 \ + $(top_srcdir)/gnulib-m4/acl.m4 \ + $(top_srcdir)/gnulib-m4/alloca.m4 \ + $(top_srcdir)/gnulib-m4/ansi-c++.m4 \ + $(top_srcdir)/gnulib-m4/asm-underscore.m4 \ + $(top_srcdir)/gnulib-m4/atexit.m4 \ + $(top_srcdir)/gnulib-m4/backupfile.m4 \ + $(top_srcdir)/gnulib-m4/bison-i18n.m4 \ + $(top_srcdir)/gnulib-m4/btowc.m4 \ + $(top_srcdir)/gnulib-m4/byteswap.m4 \ + $(top_srcdir)/gnulib-m4/canonicalize.m4 \ + $(top_srcdir)/gnulib-m4/close.m4 \ + $(top_srcdir)/gnulib-m4/closedir.m4 \ + $(top_srcdir)/gnulib-m4/configmake.m4 \ + $(top_srcdir)/gnulib-m4/copy-file.m4 \ + $(top_srcdir)/gnulib-m4/csharp.m4 \ + $(top_srcdir)/gnulib-m4/csharpcomp.m4 \ + $(top_srcdir)/gnulib-m4/csharpexec.m4 \ + $(top_srcdir)/gnulib-m4/curses.m4 \ + $(top_srcdir)/gnulib-m4/dirent_h.m4 \ + $(top_srcdir)/gnulib-m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib-m4/dup.m4 $(top_srcdir)/gnulib-m4/dup2.m4 \ + $(top_srcdir)/gnulib-m4/eaccess.m4 \ + $(top_srcdir)/gnulib-m4/eealloc.m4 \ + $(top_srcdir)/gnulib-m4/environ.m4 \ + $(top_srcdir)/gnulib-m4/errno_h.m4 \ + $(top_srcdir)/gnulib-m4/error.m4 \ + $(top_srcdir)/gnulib-m4/execute.m4 \ + $(top_srcdir)/gnulib-m4/exponentd.m4 \ + $(top_srcdir)/gnulib-m4/extensions.m4 \ + $(top_srcdir)/gnulib-m4/fatal-signal.m4 \ + $(top_srcdir)/gnulib-m4/fcntl.m4 \ + $(top_srcdir)/gnulib-m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib-m4/fdopen.m4 \ + $(top_srcdir)/gnulib-m4/findprog.m4 \ + $(top_srcdir)/gnulib-m4/float_h.m4 \ + $(top_srcdir)/gnulib-m4/fnmatch.m4 \ + $(top_srcdir)/gnulib-m4/fopen.m4 \ + $(top_srcdir)/gnulib-m4/fpieee.m4 \ + $(top_srcdir)/gnulib-m4/fseeko.m4 \ + $(top_srcdir)/gnulib-m4/fstat.m4 \ + $(top_srcdir)/gnulib-m4/ftell.m4 \ + $(top_srcdir)/gnulib-m4/ftello.m4 \ + $(top_srcdir)/gnulib-m4/gcj.m4 \ + $(top_srcdir)/gnulib-m4/getcwd.m4 \ + $(top_srcdir)/gnulib-m4/getdelim.m4 \ + $(top_srcdir)/gnulib-m4/getdtablesize.m4 \ + $(top_srcdir)/gnulib-m4/getline.m4 \ + $(top_srcdir)/gnulib-m4/getopt.m4 \ + $(top_srcdir)/gnulib-m4/getpagesize.m4 \ + $(top_srcdir)/gnulib-m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib-m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib-m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib-m4/iconv_h.m4 \ + $(top_srcdir)/gnulib-m4/iconv_open.m4 \ + $(top_srcdir)/gnulib-m4/include_next.m4 \ + $(top_srcdir)/gnulib-m4/inline.m4 \ + $(top_srcdir)/gnulib-m4/intmax_t.m4 \ + $(top_srcdir)/gnulib-m4/inttypes.m4 \ + $(top_srcdir)/gnulib-m4/iswblank.m4 \ + $(top_srcdir)/gnulib-m4/java.m4 \ + $(top_srcdir)/gnulib-m4/javacomp.m4 \ + $(top_srcdir)/gnulib-m4/javaexec.m4 \ + $(top_srcdir)/gnulib-m4/largefile.m4 \ + $(top_srcdir)/gnulib-m4/lib-ld.m4 \ + $(top_srcdir)/gnulib-m4/lib-link.m4 \ + $(top_srcdir)/gnulib-m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib-m4/libcroco.m4 \ + $(top_srcdir)/gnulib-m4/libglib.m4 \ + $(top_srcdir)/gnulib-m4/libunistring-base.m4 \ + $(top_srcdir)/gnulib-m4/libunistring-optional.m4 \ + $(top_srcdir)/gnulib-m4/libunistring.m4 \ + $(top_srcdir)/gnulib-m4/libxml.m4 \ + $(top_srcdir)/gnulib-m4/localcharset.m4 \ + $(top_srcdir)/gnulib-m4/locale-fr.m4 \ + $(top_srcdir)/gnulib-m4/locale-ja.m4 \ + $(top_srcdir)/gnulib-m4/locale-tr.m4 \ + $(top_srcdir)/gnulib-m4/locale-zh.m4 \ + $(top_srcdir)/gnulib-m4/locale_h.m4 \ + $(top_srcdir)/gnulib-m4/localename.m4 \ + $(top_srcdir)/gnulib-m4/lseek.m4 \ + $(top_srcdir)/gnulib-m4/lstat.m4 \ + $(top_srcdir)/gnulib-m4/malloc.m4 \ + $(top_srcdir)/gnulib-m4/malloca.m4 \ + $(top_srcdir)/gnulib-m4/mbchar.m4 \ + $(top_srcdir)/gnulib-m4/mbiter.m4 \ + $(top_srcdir)/gnulib-m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib-m4/mbsinit.m4 \ + $(top_srcdir)/gnulib-m4/mbslen.m4 \ + $(top_srcdir)/gnulib-m4/mbsrtowcs.m4 \ + $(top_srcdir)/gnulib-m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib-m4/mbswidth.m4 \ + $(top_srcdir)/gnulib-m4/mbtowc.m4 \ + $(top_srcdir)/gnulib-m4/memchr.m4 \ + $(top_srcdir)/gnulib-m4/memmove.m4 \ + $(top_srcdir)/gnulib-m4/memset.m4 \ + $(top_srcdir)/gnulib-m4/minmax.m4 \ + $(top_srcdir)/gnulib-m4/mkdtemp.m4 \ + $(top_srcdir)/gnulib-m4/mmap-anon.m4 \ + $(top_srcdir)/gnulib-m4/mode_t.m4 \ + $(top_srcdir)/gnulib-m4/moo.m4 \ + $(top_srcdir)/gnulib-m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib-m4/msvc-nothrow.m4 \ + $(top_srcdir)/gnulib-m4/multiarch.m4 \ + $(top_srcdir)/gnulib-m4/no-c++.m4 \ + $(top_srcdir)/gnulib-m4/nocrash.m4 \ + $(top_srcdir)/gnulib-m4/obstack.m4 \ + $(top_srcdir)/gnulib-m4/off_t.m4 \ + $(top_srcdir)/gnulib-m4/open.m4 \ + $(top_srcdir)/gnulib-m4/opendir.m4 \ + $(top_srcdir)/gnulib-m4/pathmax.m4 \ + $(top_srcdir)/gnulib-m4/pipe2.m4 \ + $(top_srcdir)/gnulib-m4/posix_spawn.m4 \ + $(top_srcdir)/gnulib-m4/printf.m4 \ + $(top_srcdir)/gnulib-m4/putenv.m4 \ + $(top_srcdir)/gnulib-m4/quote.m4 \ + $(top_srcdir)/gnulib-m4/quotearg.m4 \ + $(top_srcdir)/gnulib-m4/raise.m4 \ + $(top_srcdir)/gnulib-m4/rawmemchr.m4 \ + $(top_srcdir)/gnulib-m4/read-file.m4 \ + $(top_srcdir)/gnulib-m4/read.m4 \ + $(top_srcdir)/gnulib-m4/readdir.m4 \ + $(top_srcdir)/gnulib-m4/readlink.m4 \ + $(top_srcdir)/gnulib-m4/realloc.m4 \ + $(top_srcdir)/gnulib-m4/relocatable-lib.m4 \ + $(top_srcdir)/gnulib-m4/relocatable.m4 \ + $(top_srcdir)/gnulib-m4/rmdir.m4 \ + $(top_srcdir)/gnulib-m4/safe-read.m4 \ + $(top_srcdir)/gnulib-m4/safe-write.m4 \ + $(top_srcdir)/gnulib-m4/sched_h.m4 \ + $(top_srcdir)/gnulib-m4/secure_getenv.m4 \ + $(top_srcdir)/gnulib-m4/setenv.m4 \ + $(top_srcdir)/gnulib-m4/setlocale.m4 \ + $(top_srcdir)/gnulib-m4/sig_atomic_t.m4 \ + $(top_srcdir)/gnulib-m4/sigaction.m4 \ + $(top_srcdir)/gnulib-m4/signal_h.m4 \ + $(top_srcdir)/gnulib-m4/signalblocking.m4 \ + $(top_srcdir)/gnulib-m4/sigpipe.m4 \ + $(top_srcdir)/gnulib-m4/sleep.m4 \ + $(top_srcdir)/gnulib-m4/snprintf.m4 \ + $(top_srcdir)/gnulib-m4/spawn-pipe.m4 \ + $(top_srcdir)/gnulib-m4/spawn_h.m4 \ + $(top_srcdir)/gnulib-m4/ssize_t.m4 \ + $(top_srcdir)/gnulib-m4/stat.m4 \ + $(top_srcdir)/gnulib-m4/stdarg.m4 \ + $(top_srcdir)/gnulib-m4/stdbool.m4 \ + $(top_srcdir)/gnulib-m4/stddef_h.m4 \ + $(top_srcdir)/gnulib-m4/stdint.m4 \ + $(top_srcdir)/gnulib-m4/stdio_h.m4 \ + $(top_srcdir)/gnulib-m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib-m4/stpcpy.m4 \ + $(top_srcdir)/gnulib-m4/stpncpy.m4 \ + $(top_srcdir)/gnulib-m4/strchrnul.m4 \ + $(top_srcdir)/gnulib-m4/strcspn.m4 \ + $(top_srcdir)/gnulib-m4/strerror.m4 \ + $(top_srcdir)/gnulib-m4/string_h.m4 \ + $(top_srcdir)/gnulib-m4/strnlen.m4 \ + $(top_srcdir)/gnulib-m4/strpbrk.m4 \ + $(top_srcdir)/gnulib-m4/strstr.m4 \ + $(top_srcdir)/gnulib-m4/strtol.m4 \ + $(top_srcdir)/gnulib-m4/strtoul.m4 \ + $(top_srcdir)/gnulib-m4/symlink.m4 \ + $(top_srcdir)/gnulib-m4/sys_select_h.m4 \ + $(top_srcdir)/gnulib-m4/sys_socket_h.m4 \ + $(top_srcdir)/gnulib-m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib-m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib-m4/sys_types_h.m4 \ + $(top_srcdir)/gnulib-m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib-m4/tempname.m4 \ + $(top_srcdir)/gnulib-m4/term-ostream.m4 \ + $(top_srcdir)/gnulib-m4/terminfo.m4 \ + $(top_srcdir)/gnulib-m4/thread.m4 \ + $(top_srcdir)/gnulib-m4/time_h.m4 \ + $(top_srcdir)/gnulib-m4/tls.m4 \ + $(top_srcdir)/gnulib-m4/tmpdir.m4 \ + $(top_srcdir)/gnulib-m4/ungetc.m4 \ + $(top_srcdir)/gnulib-m4/unionwait.m4 \ + $(top_srcdir)/gnulib-m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib-m4/unistd_h.m4 \ + $(top_srcdir)/gnulib-m4/unlocked-io.m4 \ + $(top_srcdir)/gnulib-m4/vasnprintf.m4 \ + $(top_srcdir)/gnulib-m4/vasprintf.m4 \ + $(top_srcdir)/gnulib-m4/vsnprintf.m4 \ + $(top_srcdir)/gnulib-m4/wait-process.m4 \ + $(top_srcdir)/gnulib-m4/waitpid.m4 \ + $(top_srcdir)/gnulib-m4/warn-on-use.m4 \ + $(top_srcdir)/gnulib-m4/wchar_h.m4 \ + $(top_srcdir)/gnulib-m4/wcrtomb.m4 \ + $(top_srcdir)/gnulib-m4/wctob.m4 \ + $(top_srcdir)/gnulib-m4/wctomb.m4 \ + $(top_srcdir)/gnulib-m4/wctype_h.m4 \ + $(top_srcdir)/gnulib-m4/wcwidth.m4 \ + $(top_srcdir)/gnulib-m4/write.m4 \ + $(top_srcdir)/gnulib-m4/xvasprintf.m4 \ + $(top_srcdir)/gnulib-m4/yield.m4 \ + $(top_srcdir)/../m4/fixautomake.m4 \ + $(top_srcdir)/../m4/libtool.m4 \ + $(top_srcdir)/../m4/ltoptions.m4 \ + $(top_srcdir)/../m4/ltsugar.m4 \ + $(top_srcdir)/../m4/ltversion.m4 \ + $(top_srcdir)/../m4/lt~obsolete.m4 \ + $(top_srcdir)/../m4/woe32-dll.m4 \ + $(top_srcdir)/../gettext-runtime/m4/codeset.m4 \ + $(top_srcdir)/../gettext-runtime/m4/extern-inline.m4 \ + $(top_srcdir)/../gettext-runtime/m4/fcntl-o.m4 \ + $(top_srcdir)/../gettext-runtime/m4/gettext.m4 \ + $(top_srcdir)/../gettext-runtime/m4/glibc2.m4 \ + $(top_srcdir)/../gettext-runtime/m4/glibc21.m4 \ + $(top_srcdir)/../gettext-runtime/m4/iconv.m4 \ + $(top_srcdir)/../gettext-runtime/m4/intdiv0.m4 \ + $(top_srcdir)/../gettext-runtime/m4/intl.m4 \ + $(top_srcdir)/../gettext-runtime/m4/intlmacosx.m4 \ + $(top_srcdir)/../gettext-runtime/m4/intmax.m4 \ + $(top_srcdir)/../gettext-runtime/m4/inttypes-pri.m4 \ + $(top_srcdir)/../gettext-runtime/m4/inttypes_h.m4 \ + $(top_srcdir)/../gettext-runtime/m4/lcmessage.m4 \ + $(top_srcdir)/../gettext-runtime/m4/lock.m4 \ + $(top_srcdir)/../gettext-runtime/m4/longlong.m4 \ + $(top_srcdir)/../gettext-runtime/m4/nls.m4 \ + $(top_srcdir)/../gettext-runtime/m4/po.m4 \ + $(top_srcdir)/../gettext-runtime/m4/printf-posix.m4 \ + $(top_srcdir)/../gettext-runtime/m4/progtest.m4 \ + $(top_srcdir)/../gettext-runtime/m4/size_max.m4 \ + $(top_srcdir)/../gettext-runtime/m4/stdint_h.m4 \ + $(top_srcdir)/../gettext-runtime/m4/threadlib.m4 \ + $(top_srcdir)/../gettext-runtime/m4/uintmax_t.m4 \ + $(top_srcdir)/../gettext-runtime/m4/visibility.m4 \ + $(top_srcdir)/../gettext-runtime/m4/wchar_t.m4 \ + $(top_srcdir)/../gettext-runtime/m4/wint_t.m4 \ + $(top_srcdir)/../gettext-runtime/m4/xsize.m4 \ + $(top_srcdir)/m4/exported.m4 $(top_srcdir)/m4/hostname.m4 \ + $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/siginfo.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/../build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gettextize autopoint convert-archive +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(lispdir)" \ + "$(DESTDIR)$(gettextsrcdir)" +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +lispLISP_INSTALL = $(INSTALL_DATA) +LISP = $(lisp_LISP) +am__ELFILES = po-compat.el po-mode.el start-po.el +am__ELCFILES = $(am__ELFILES:.el=.elc) +ELCFILES = $(LISP:.el=.elc) +DATA = $(gettextsrc_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkglibexecdir = @pkglibexecdir@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARCHIVE_FORMAT = @ARCHIVE_FORMAT@ +ARFLAGS = @ARFLAGS@ +AS = @AS@ +ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BISON_LOCALEDIR = @BISON_LOCALEDIR@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BUILDCSHARP = @BUILDCSHARP@ +BUILDJAVA = @BUILDJAVA@ +BUILDJAVAEXE = @BUILDJAVAEXE@ +BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ +BYTESWAP_H = @BYTESWAP_H@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ +CLASSPATH = @CLASSPATH@ +CLASSPATH_SEPARATOR = @CLASSPATH_SEPARATOR@ +CLIX_PATH = @CLIX_PATH@ +CLIX_PATH_VAR = @CLIX_PATH_VAR@ +CONF_JAVA = @CONF_JAVA@ +CONF_JAVAC = @CONF_JAVAC@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CROSS_COMPILING = @CROSS_COMPILING@ +CSHARPCOMPFLAGS = @CSHARPCOMPFLAGS@ +CSHARP_CHOICE = @CSHARP_CHOICE@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_CHOICE = @CXX_CHOICE@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DVIPS = @DVIPS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EMACS = @EMACS@ +EMACSLOADPATH = @EMACSLOADPATH@ +EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ +EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ +ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ +ENOLINK_VALUE = @ENOLINK_VALUE@ +EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ +EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ +ERRNO_H = @ERRNO_H@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FLOAT_H = @FLOAT_H@ +FNMATCH_H = @FNMATCH_H@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ +GENCAT = @GENCAT@ +GETOPT_H = @GETOPT_H@ +GETTEXTLIB_EXPORTS_FLAGS = @GETTEXTLIB_EXPORTS_FLAGS@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIBC2 = @GLIBC2@ +GLIBC21 = @GLIBC21@ +GLOBAL_SYMBOL_PIPE = @GLOBAL_SYMBOL_PIPE@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BTOWC = @GNULIB_BTOWC@ +GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ +GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_DIRFD = @GNULIB_DIRFD@ +GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_DUP3 = @GNULIB_DUP3@ +GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ +GNULIB_ENVIRON = @GNULIB_ENVIRON@ +GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ +GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ +GNULIB_FCLOSE = @GNULIB_FCLOSE@ +GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ +GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ +GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FOPEN = @GNULIB_FOPEN@ +GNULIB_FPRINTF = @GNULIB_FPRINTF@ +GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ +GNULIB_FPUTC = @GNULIB_FPUTC@ +GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ +GNULIB_FREOPEN = @GNULIB_FREOPEN@ +GNULIB_FSCANF = @GNULIB_FSCANF@ +GNULIB_FSEEK = @GNULIB_FSEEK@ +GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ +GNULIB_FSTATAT = @GNULIB_FSTATAT@ +GNULIB_FSYNC = @GNULIB_FSYNC@ +GNULIB_FTELL = @GNULIB_FTELL@ +GNULIB_FTELLO = @GNULIB_FTELLO@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ +GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETDELIM = @GNULIB_GETDELIM@ +GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ +GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ +GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ +GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ +GNULIB_GETLINE = @GNULIB_GETLINE@ +GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ +GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ +GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ +GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_ICONV = @GNULIB_ICONV@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ +GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ +GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ +GNULIB_LCHMOD = @GNULIB_LCHMOD@ +GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LINK = @GNULIB_LINK@ +GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_LSTAT = @GNULIB_LSTAT@ +GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ +GNULIB_MBRLEN = @GNULIB_MBRLEN@ +GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSINIT = @GNULIB_MBSINIT@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ +GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ +GNULIB_MBSSEP = @GNULIB_MBSSEP@ +GNULIB_MBSSPN = @GNULIB_MBSSPN@ +GNULIB_MBSSTR = @GNULIB_MBSSTR@ +GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MBTOWC = @GNULIB_MBTOWC@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ +GNULIB_MEMMEM = @GNULIB_MEMMEM@ +GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ +GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ +GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ +GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ +GNULIB_MKFIFO = @GNULIB_MKFIFO@ +GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ +GNULIB_MKNOD = @GNULIB_MKNOD@ +GNULIB_MKNODAT = @GNULIB_MKNODAT@ +GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ +GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ +GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ +GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ +GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ +GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ +GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ +GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ +GNULIB_OPEN = @GNULIB_OPEN@ +GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ +GNULIB_PERROR = @GNULIB_PERROR@ +GNULIB_PIPE = @GNULIB_PIPE@ +GNULIB_PIPE2 = @GNULIB_PIPE2@ +GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@ +GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@ +GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@ +GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@ +GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@ +GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@ +GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@ +GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@ +GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@ +GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@ +GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@ +GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@ +GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@ +GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@ +GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@ +GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@ +GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ +GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ +GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ +GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@ +GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@ +GNULIB_PREAD = @GNULIB_PREAD@ +GNULIB_PRINTF = @GNULIB_PRINTF@ +GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ +GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ +GNULIB_PUTC = @GNULIB_PUTC@ +GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ +GNULIB_PUTENV = @GNULIB_PUTENV@ +GNULIB_PUTS = @GNULIB_PUTS@ +GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ +GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ +GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ +GNULIB_READLINK = @GNULIB_READLINK@ +GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ +GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_REMOVE = @GNULIB_REMOVE@ +GNULIB_RENAME = @GNULIB_RENAME@ +GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RMDIR = @GNULIB_RMDIR@ +GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ +GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ +GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRERROR = @GNULIB_STRERROR@ +GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ +GNULIB_STRNCAT = @GNULIB_STRNCAT@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRPTIME = @GNULIB_STRPTIME@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ +GNULIB_STRSTR = @GNULIB_STRSTR@ +GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOLL = @GNULIB_STRTOLL@ +GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ +GNULIB_SYMLINK = @GNULIB_SYMLINK@ +GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ +GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TIMEGM = @GNULIB_TIMEGM@ +GNULIB_TIME_R = @GNULIB_TIME_R@ +GNULIB_TMPFILE = @GNULIB_TMPFILE@ +GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ +GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ +GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ +GNULIB_UNLINK = @GNULIB_UNLINK@ +GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ +GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ +GNULIB_UNSETENV = @GNULIB_UNSETENV@ +GNULIB_USLEEP = @GNULIB_USLEEP@ +GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ +GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ +GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ +GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ +GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ +GNULIB_VPRINTF = @GNULIB_VPRINTF@ +GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ +GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ +GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WAITPID = @GNULIB_WAITPID@ +GNULIB_WCPCPY = @GNULIB_WCPCPY@ +GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ +GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ +GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ +GNULIB_WCSCAT = @GNULIB_WCSCAT@ +GNULIB_WCSCHR = @GNULIB_WCSCHR@ +GNULIB_WCSCMP = @GNULIB_WCSCMP@ +GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ +GNULIB_WCSCPY = @GNULIB_WCSCPY@ +GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ +GNULIB_WCSDUP = @GNULIB_WCSDUP@ +GNULIB_WCSLEN = @GNULIB_WCSLEN@ +GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ +GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ +GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ +GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ +GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ +GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ +GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ +GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ +GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ +GNULIB_WCSSPN = @GNULIB_WCSSPN@ +GNULIB_WCSSTR = @GNULIB_WCSSTR@ +GNULIB_WCSTOK = @GNULIB_WCSTOK@ +GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ +GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ +GNULIB_WCTOB = @GNULIB_WCTOB@ +GNULIB_WCTOMB = @GNULIB_WCTOMB@ +GNULIB_WCTRANS = @GNULIB_WCTRANS@ +GNULIB_WCTYPE = @GNULIB_WCTYPE@ +GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ +GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ +GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ +GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ +GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ +GNULIB_WMEMSET = @GNULIB_WMEMSET@ +GNULIB_WRITE = @GNULIB_WRITE@ +GNULIB__EXIT = @GNULIB__EXIT@ +GREP = @GREP@ +HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_ATOLL = @HAVE_ATOLL@ +HAVE_BTOWC = @HAVE_BTOWC@ +HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLIX = @HAVE_CLIX@ +HAVE_CLIX_IN_PATH = @HAVE_CLIX_IN_PATH@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_CSC = @HAVE_CSC@ +HAVE_CSCC = @HAVE_CSCC@ +HAVE_CSCC_IN_PATH = @HAVE_CSCC_IN_PATH@ +HAVE_CSC_IN_PATH = @HAVE_CSC_IN_PATH@ +HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ +HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ +HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ +HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ +HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ +HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ +HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ +HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ +HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ +HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ +HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ +HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ +HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ +HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ +HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ +HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ +HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ +HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ +HAVE_DPRINTF = @HAVE_DPRINTF@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_DUP3 = @HAVE_DUP3@ +HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ +HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_FACCESSAT = @HAVE_FACCESSAT@ +HAVE_FCHDIR = @HAVE_FCHDIR@ +HAVE_FCHMODAT = @HAVE_FCHMODAT@ +HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ +HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ +HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ +HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FSEEKO = @HAVE_FSEEKO@ +HAVE_FSTATAT = @HAVE_FSTATAT@ +HAVE_FSYNC = @HAVE_FSYNC@ +HAVE_FTELLO = @HAVE_FTELLO@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_FUTIMENS = @HAVE_FUTIMENS@ +HAVE_GCJ = @HAVE_GCJ@ +HAVE_GCJ_C = @HAVE_GCJ_C@ +HAVE_GCJ_IN_PATH = @HAVE_GCJ_IN_PATH@ +HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ +HAVE_GETGROUPS = @HAVE_GETGROUPS@ +HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ +HAVE_GETLOGIN = @HAVE_GETLOGIN@ +HAVE_GETOPT_H = @HAVE_GETOPT_H@ +HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ +HAVE_GIJ = @HAVE_GIJ@ +HAVE_GIJ_IN_PATH = @HAVE_GIJ_IN_PATH@ +HAVE_GLOBAL_SYMBOL_PIPE = @HAVE_GLOBAL_SYMBOL_PIPE@ +HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_ILRUN = @HAVE_ILRUN@ +HAVE_ILRUN_IN_PATH = @HAVE_ILRUN_IN_PATH@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_ISWBLANK = @HAVE_ISWBLANK@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_JAVA = @HAVE_JAVA@ +HAVE_JAVAC = @HAVE_JAVAC@ +HAVE_JAVAC_ENVVAR = @HAVE_JAVAC_ENVVAR@ +HAVE_JAVAC_IN_PATH = @HAVE_JAVAC_IN_PATH@ +HAVE_JAVA_ENVVAR = @HAVE_JAVA_ENVVAR@ +HAVE_JAVA_IN_PATH = @HAVE_JAVA_IN_PATH@ +HAVE_JIKES = @HAVE_JIKES@ +HAVE_JIKES_IN_PATH = @HAVE_JIKES_IN_PATH@ +HAVE_JRE = @HAVE_JRE@ +HAVE_JRE_IN_PATH = @HAVE_JRE_IN_PATH@ +HAVE_JVIEW = @HAVE_JVIEW@ +HAVE_JVIEW_IN_PATH = @HAVE_JVIEW_IN_PATH@ +HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ +HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ +HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ +HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ +HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ +HAVE_LCHMOD = @HAVE_LCHMOD@ +HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LIBEXPAT = @HAVE_LIBEXPAT@ +HAVE_LIBUNISTRING = @HAVE_LIBUNISTRING@ +HAVE_LINK = @HAVE_LINK@ +HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MBRLEN = @HAVE_MBRLEN@ +HAVE_MBRTOWC = @HAVE_MBRTOWC@ +HAVE_MBSINIT = @HAVE_MBSINIT@ +HAVE_MBSLEN = @HAVE_MBSLEN@ +HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ +HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ +HAVE_MCS = @HAVE_MCS@ +HAVE_MCS_IN_PATH = @HAVE_MCS_IN_PATH@ +HAVE_MEMCHR = @HAVE_MEMCHR@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDIRAT = @HAVE_MKDIRAT@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_MKFIFO = @HAVE_MKFIFO@ +HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ +HAVE_MKNOD = @HAVE_MKNOD@ +HAVE_MKNODAT = @HAVE_MKNODAT@ +HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ +HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ +HAVE_MKSTEMP = @HAVE_MKSTEMP@ +HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MONO = @HAVE_MONO@ +HAVE_MONO_IN_PATH = @HAVE_MONO_IN_PATH@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ +HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NEWLOCALE = @HAVE_NEWLOCALE@ +HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ +HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ +HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ +HAVE_PIPE = @HAVE_PIPE@ +HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@ +HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@ +HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ +HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ +HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ +HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ +HAVE_RANDOM_H = @HAVE_RANDOM_H@ +HAVE_RANDOM_R = @HAVE_RANDOM_R@ +HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ +HAVE_READLINK = @HAVE_READLINK@ +HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SCHED_H = @HAVE_SCHED_H@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ +HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ +HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ +HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ +HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_SPAWN_H = @HAVE_SPAWN_H@ +HAVE_STDINT_H = @HAVE_STDINT_H@ +HAVE_STPCPY = @HAVE_STPCPY@ +HAVE_STPNCPY = @HAVE_STPNCPY@ +HAVE_STRCASESTR = @HAVE_STRCASESTR@ +HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRPBRK = @HAVE_STRPBRK@ +HAVE_STRPTIME = @HAVE_STRPTIME@ +HAVE_STRSEP = @HAVE_STRSEP@ +HAVE_STRTOD = @HAVE_STRTOD@ +HAVE_STRTOLL = @HAVE_STRTOLL@ +HAVE_STRTOULL = @HAVE_STRTOULL@ +HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ +HAVE_SYMLINK = @HAVE_SYMLINK@ +HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ +HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNLINKAT = @HAVE_UNLINKAT@ +HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_USLEEP = @HAVE_USLEEP@ +HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ +HAVE_VASPRINTF = @HAVE_VASPRINTF@ +HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ +HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ +HAVE_WCPCPY = @HAVE_WCPCPY@ +HAVE_WCPNCPY = @HAVE_WCPNCPY@ +HAVE_WCRTOMB = @HAVE_WCRTOMB@ +HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ +HAVE_WCSCAT = @HAVE_WCSCAT@ +HAVE_WCSCHR = @HAVE_WCSCHR@ +HAVE_WCSCMP = @HAVE_WCSCMP@ +HAVE_WCSCOLL = @HAVE_WCSCOLL@ +HAVE_WCSCPY = @HAVE_WCSCPY@ +HAVE_WCSCSPN = @HAVE_WCSCSPN@ +HAVE_WCSDUP = @HAVE_WCSDUP@ +HAVE_WCSLEN = @HAVE_WCSLEN@ +HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ +HAVE_WCSNCAT = @HAVE_WCSNCAT@ +HAVE_WCSNCMP = @HAVE_WCSNCMP@ +HAVE_WCSNCPY = @HAVE_WCSNCPY@ +HAVE_WCSNLEN = @HAVE_WCSNLEN@ +HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ +HAVE_WCSPBRK = @HAVE_WCSPBRK@ +HAVE_WCSRCHR = @HAVE_WCSRCHR@ +HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ +HAVE_WCSSPN = @HAVE_WCSSPN@ +HAVE_WCSSTR = @HAVE_WCSSTR@ +HAVE_WCSTOK = @HAVE_WCSTOK@ +HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ +HAVE_WCSXFRM = @HAVE_WCSXFRM@ +HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE_WMEMCHR = @HAVE_WMEMCHR@ +HAVE_WMEMCMP = @HAVE_WMEMCMP@ +HAVE_WMEMCPY = @HAVE_WMEMCPY@ +HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ +HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WPRINTF = @HAVE_WPRINTF@ +HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ +HAVE__BOOL = @HAVE__BOOL@ +HAVE__EXIT = @HAVE__EXIT@ +ICONV_CONST = @ICONV_CONST@ +ICONV_H = @ICONV_H@ +INCCROCO = @INCCROCO@ +INCGLIB = @INCGLIB@ +INCLUDE_NEXT = @INCLUDE_NEXT@ +INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INCTERMINFO = @INCTERMINFO@ +INCXML = @INCXML@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_PROGRAM_ENV = @INSTALL_PROGRAM_ENV@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ +INTLBISON = @INTLBISON@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +INTL_DEFAULT_VERBOSITY = @INTL_DEFAULT_VERBOSITY@ +INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +JAR = @JAR@ +JAVA_CHOICE = @JAVA_CHOICE@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCROCO = @LIBCROCO@ +LIBEXPAT = @LIBEXPAT@ +LIBEXPAT_PREFIX = @LIBEXPAT_PREFIX@ +LIBGLIB = @LIBGLIB@ +LIBGLIB_H = @LIBGLIB_H@ +LIBGREP_LIBDEPS = @LIBGREP_LIBDEPS@ +LIBGREP_LTLIBDEPS = @LIBGREP_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMULTITHREAD = @LIBMULTITHREAD@ +LIBOBJS = @LIBOBJS@ +LIBPTH = @LIBPTH@ +LIBPTH_PREFIX = @LIBPTH_PREFIX@ +LIBS = @LIBS@ +LIBTERMINFO = @LIBTERMINFO@ +LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ +LIBTHREAD = @LIBTHREAD@ +LIBTOOL = @LIBTOOL@ +LIBUNISTRING = @LIBUNISTRING@ +LIBUNISTRING_PREFIX = @LIBUNISTRING_PREFIX@ +LIBUNISTRING_UNICONV_H = @LIBUNISTRING_UNICONV_H@ +LIBUNISTRING_UNILBRK_H = @LIBUNISTRING_UNILBRK_H@ +LIBUNISTRING_UNINAME_H = @LIBUNISTRING_UNINAME_H@ +LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ +LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIBXML = @LIBXML@ +LIBXML_H = @LIBXML_H@ +LIB_ACL = @LIB_ACL@ +LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ +LOCALE_FR = @LOCALE_FR@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_JA = @LOCALE_JA@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBC = @LTLIBC@ +LTLIBCROCO = @LTLIBCROCO@ +LTLIBEXPAT = @LTLIBEXPAT@ +LTLIBGLIB = @LTLIBGLIB@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ +LTLIBOBJS = @LTLIBOBJS@ +LTLIBPTH = @LTLIBPTH@ +LTLIBTERMINFO = @LTLIBTERMINFO@ +LTLIBTHREAD = @LTLIBTHREAD@ +LTLIBUNISTRING = @LTLIBUNISTRING@ +LTLIBXML = @LTLIBXML@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MONO_PATH = @MONO_PATH@ +MONO_PATH_SEPARATOR = @MONO_PATH_SEPARATOR@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_LIBM = @MSGMERGE_LIBM@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ +NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ +NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ +NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ +NEXT_DIRENT_H = @NEXT_DIRENT_H@ +NEXT_ERRNO_H = @NEXT_ERRNO_H@ +NEXT_FCNTL_H = @NEXT_FCNTL_H@ +NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_GETOPT_H = @NEXT_GETOPT_H@ +NEXT_ICONV_H = @NEXT_ICONV_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ +NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ +NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_SCHED_H = @NEXT_SCHED_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ +NEXT_SPAWN_H = @NEXT_SPAWN_H@ +NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ +NEXT_STDINT_H = @NEXT_STDINT_H@ +NEXT_STDIO_H = @NEXT_STDIO_H@ +NEXT_STDLIB_H = @NEXT_STDLIB_H@ +NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ +NEXT_TIME_H = @NEXT_TIME_H@ +NEXT_UNISTD_H = @NEXT_UNISTD_H@ +NEXT_WCHAR_H = @NEXT_WCHAR_H@ +NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NO_CXX = @NO_CXX@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +POSUB = @POSUB@ +PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ +PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +RC = @RC@ +RELOCATABLE = @RELOCATABLE@ +RELOCATABLE_BUILD_DIR = @RELOCATABLE_BUILD_DIR@ +RELOCATABLE_CONFIG_H_DIR = @RELOCATABLE_CONFIG_H_DIR@ +RELOCATABLE_LDFLAGS = @RELOCATABLE_LDFLAGS@ +RELOCATABLE_LIBRARY_PATH = @RELOCATABLE_LIBRARY_PATH@ +RELOCATABLE_SRC_DIR = @RELOCATABLE_SRC_DIR@ +RELOCATABLE_STRIP = @RELOCATABLE_STRIP@ +REPLACE_BTOWC = @REPLACE_BTOWC@ +REPLACE_CALLOC = @REPLACE_CALLOC@ +REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_CLOSE = @REPLACE_CLOSE@ +REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ +REPLACE_DIRFD = @REPLACE_DIRFD@ +REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP = @REPLACE_DUP@ +REPLACE_DUP2 = @REPLACE_DUP2@ +REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ +REPLACE_FCLOSE = @REPLACE_FCLOSE@ +REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ +REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ +REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FOPEN = @REPLACE_FOPEN@ +REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREOPEN = @REPLACE_FREOPEN@ +REPLACE_FSEEK = @REPLACE_FSEEK@ +REPLACE_FSEEKO = @REPLACE_FSEEKO@ +REPLACE_FSTAT = @REPLACE_FSTAT@ +REPLACE_FSTATAT = @REPLACE_FSTATAT@ +REPLACE_FTELL = @REPLACE_FTELL@ +REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ +REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETDELIM = @REPLACE_GETDELIM@ +REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ +REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ +REPLACE_GETLINE = @REPLACE_GETLINE@ +REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ +REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ +REPLACE_ICONV = @REPLACE_ICONV@ +REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@ +REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@ +REPLACE_ISATTY = @REPLACE_ISATTY@ +REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ +REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ +REPLACE_LCHOWN = @REPLACE_LCHOWN@ +REPLACE_LINK = @REPLACE_LINK@ +REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_LSTAT = @REPLACE_LSTAT@ +REPLACE_MALLOC = @REPLACE_MALLOC@ +REPLACE_MBRLEN = @REPLACE_MBRLEN@ +REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ +REPLACE_MBSINIT = @REPLACE_MBSINIT@ +REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ +REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ +REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MBTOWC = @REPLACE_MBTOWC@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ +REPLACE_MEMMEM = @REPLACE_MEMMEM@ +REPLACE_MKDIR = @REPLACE_MKDIR@ +REPLACE_MKFIFO = @REPLACE_MKFIFO@ +REPLACE_MKNOD = @REPLACE_MKNOD@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ +REPLACE_NULL = @REPLACE_NULL@ +REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ +REPLACE_OPEN = @REPLACE_OPEN@ +REPLACE_OPENAT = @REPLACE_OPENAT@ +REPLACE_OPENDIR = @REPLACE_OPENDIR@ +REPLACE_PERROR = @REPLACE_PERROR@ +REPLACE_POPEN = @REPLACE_POPEN@ +REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@ +REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ +REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ +REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ +REPLACE_PREAD = @REPLACE_PREAD@ +REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ +REPLACE_PUTENV = @REPLACE_PUTENV@ +REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ +REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ +REPLACE_REALLOC = @REPLACE_REALLOC@ +REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMOVE = @REPLACE_REMOVE@ +REPLACE_RENAME = @REPLACE_RENAME@ +REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ +REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_SELECT = @REPLACE_SELECT@ +REPLACE_SETENV = @REPLACE_SETENV@ +REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ +REPLACE_SLEEP = @REPLACE_SLEEP@ +REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ +REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ +REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ +REPLACE_STPNCPY = @REPLACE_STPNCPY@ +REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ +REPLACE_STRDUP = @REPLACE_STRDUP@ +REPLACE_STRERROR = @REPLACE_STRERROR@ +REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ +REPLACE_STRNCAT = @REPLACE_STRNCAT@ +REPLACE_STRNDUP = @REPLACE_STRNDUP@ +REPLACE_STRNLEN = @REPLACE_STRNLEN@ +REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ +REPLACE_STRSTR = @REPLACE_STRSTR@ +REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ +REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ +REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ +REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ +REPLACE_UNLINK = @REPLACE_UNLINK@ +REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ +REPLACE_UNSETENV = @REPLACE_UNSETENV@ +REPLACE_USLEEP = @REPLACE_USLEEP@ +REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ +REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ +REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ +REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ +REPLACE_VPRINTF = @REPLACE_VPRINTF@ +REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ +REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ +REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ +REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ +REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ +REPLACE_WCTOB = @REPLACE_WCTOB@ +REPLACE_WCTOMB = @REPLACE_WCTOMB@ +REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ +REPLACE_WRITE = @REPLACE_WRITE@ +SCHED_H = @SCHED_H@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +STDARG_H = @STDARG_H@ +STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TESTCSHARP = @TESTCSHARP@ +TESTJAVA = @TESTJAVA@ +TESTLIBASPRINTF = @TESTLIBASPRINTF@ +TEXI2PDF = @TEXI2PDF@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ +UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ +UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +USE_ACL = @USE_ACL@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ +WINDRES = @WINDRES@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +WOE32 = @WOE32@ +WOE32DLL = @WOE32DLL@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YIELD_LIB = @YIELD_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +aclocaldir = @aclocaldir@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ +gltests_LIBOBJS = @gltests_LIBOBJS@ +gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ +gltests_WITNESS = @gltests_WITNESS@ +grgl_LIBOBJS = @grgl_LIBOBJS@ +grgl_LTLIBOBJS = @grgl_LTLIBOBJS@ +grgltests_LIBOBJS = @grgltests_LIBOBJS@ +grgltests_LTLIBOBJS = @grgltests_LTLIBOBJS@ +grgltests_WITNESS = @grgltests_WITNESS@ +gtpo_LIBOBJS = @gtpo_LIBOBJS@ +gtpo_LTLIBOBJS = @gtpo_LTLIBOBJS@ +gtpotests_LIBOBJS = @gtpotests_LIBOBJS@ +gtpotests_LTLIBOBJS = @gtpotests_LTLIBOBJS@ +gtpotests_WITNESS = @gtpotests_WITNESS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = 1.2 gnits +EXTRA_DIST = add-to-archive cvsuser.c archive.dir.tar $(lisp_LISP) +MOSTLYCLEANFILES = archive.dir.tar-t archive.dir.tar.gz-t \ + archive.dir.tar.bz2-t archive.dir.tar.xz-t +CLEANFILES = archive.dir.tar.gz archive.dir.tar.bz2 archive.dir.tar.xz \ + archive.cvs.tar.gz archive.git.tar.gz +DISTCLEANFILES = gettextize autopoint convert-archive + +# Scripts for maintainers. +bin_SCRIPTS = gettextize autopoint +gettextsrcdir = $(datadir)/gettext +gettextsrc_DATA = $(ARCHIVE_@ARCHIVE_FORMAT@) +ARCHIVE_dirgz = archive.dir.tar.gz +ARCHIVE_dirbz2 = archive.dir.tar.bz2 +ARCHIVE_dirxz = archive.dir.tar.xz +ARCHIVE_git = archive.git.tar.gz +ARCHIVE_cvs = archive.cvs.tar.gz + +# Emacs Lisp code. +lisp_LISP = start-po.el po-mode.el po-compat.el +all: all-am + +.SUFFIXES: +.SUFFIXES: .el .elc +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits misc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnits misc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gettextize: $(top_builddir)/config.status $(srcdir)/gettextize.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +autopoint: $(top_builddir)/config.status $(srcdir)/autopoint.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +convert-archive: $(top_builddir)/config.status $(srcdir)/convert-archive.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +installcheck-binSCRIPTS: $(bin_SCRIPTS) + bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err </dev/null \ + && test -n "`cat c$${pid}_.out`" \ + && test -z "`cat c$${pid}_.err`"; then :; \ + else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +.el.elc: + if test "$(EMACS)" != "no"; then \ + am__dir=. am__subdir_includes=''; \ + case $@ in */*) \ + am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \ + am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \ + esac; \ + test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \ + $(EMACS) --batch \ + $(AM_ELCFLAGS) $(ELCFLAGS) \ + $$am__subdir_includes -L $(builddir) -L $(srcdir) \ + --eval "(defun byte-compile-dest-file (f) \"$@\")" \ + --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \ + else :; fi + +install-lispLISP: $(lisp_LISP) $(ELCFILES) + @$(NORMAL_INSTALL) + @if test "$(EMACS)" != no && test -n "$(lispdir)"; then \ + list='$(lisp_LISP)'; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(lispdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(lispdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + echo " $(lispLISP_INSTALL) '$$d$$p' '$(DESTDIR)$(lispdir)/$$f'"; \ + $(lispLISP_INSTALL) "$$d$$p" "$(DESTDIR)$(lispdir)/$$f" || exit $$?; \ + if test -f $${p}c; then \ + echo " $(lispLISP_INSTALL) '$${p}c' '$(DESTDIR)$(lispdir)/$${f}c'"; \ + $(lispLISP_INSTALL) "$${p}c" "$(DESTDIR)$(lispdir)/$${f}c" || exit $$?; \ + else : ; fi; \ + done; \ + else : ; fi + +uninstall-lispLISP: + @$(NORMAL_UNINSTALL) + @test "$(EMACS)" != no && test -n "$(lispdir)" || exit 0; \ + list='$(lisp_LISP)'; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + files="$$files "`echo "$$files" | sed 's|$$|c|'`; \ + dir='$(DESTDIR)$(lispdir)'; $(am__uninstall_files_from_dir) + +clean-lisp: + -rm -f $(ELCFILES) +install-gettextsrcDATA: $(gettextsrc_DATA) + @$(NORMAL_INSTALL) + @list='$(gettextsrc_DATA)'; test -n "$(gettextsrcdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(gettextsrcdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(gettextsrcdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gettextsrcdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(gettextsrcdir)" || exit $$?; \ + done + +uninstall-gettextsrcDATA: + @$(NORMAL_UNINSTALL) + @list='$(gettextsrc_DATA)'; test -n "$(gettextsrcdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(gettextsrcdir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) $(LISP) $(ELCFILES) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(lispdir)" "$(DESTDIR)$(gettextsrcdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-lisp mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-gettextsrcDATA install-lispLISP + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: installcheck-binSCRIPTS + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-gettextsrcDATA \ + uninstall-lispLISP + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-lisp cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binSCRIPTS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-gettextsrcDATA install-html install-html-am \ + install-info install-info-am install-lispLISP install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am \ + installcheck-binSCRIPTS installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-gettextsrcDATA \ + uninstall-lispLISP + + +# The archive.dir.tar is not in the CVS. Alpha-testers must use the one from +# an already installed release. +archive.dir.tar: + if test -f $(gettextsrcdir)/archive.dir.tar.gz; then \ + gzip -d -c < $(gettextsrcdir)/archive.dir.tar.gz > $@-t && mv $@-t $@; \ + else \ + if test -f $(gettextsrcdir)/archive.dir.tar.bz2; then \ + bzip2 -d -c < $(gettextsrcdir)/archive.dir.tar.bz2 > $@-t && mv $@-t $@; \ + else \ + if test -f $(gettextsrcdir)/archive.dir.tar.xz; then \ + xz -d -c < $(gettextsrcdir)/archive.dir.tar.xz > $@-t && mv $@-t $@; \ + else \ + echo "archive.dir.tar is not under version control. Please copy the archive.dir.tar.{gz,bz2,xz} from an already installed release to gettext-tools/misc/ and decompress it there." 1>&2; \ + exit 1; \ + fi; \ + fi; \ + fi + +# The archive.dir.tar.gz is generated from archive.dir.tar. +archive.dir.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + gzip -c -9 < "$$inputfile" > $@-t && mv $@-t $@ + +# The archive.dir.tar.bz2 is generated from archive.dir.tar. +archive.dir.tar.bz2: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + bzip2 -c -9 < "$$inputfile" > $@-t && mv $@-t $@ + +# The archive.dir.tar.xz is generated from archive.dir.tar. +archive.dir.tar.xz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + xz -c -5 < "$$inputfile" > $@-t && mv $@-t $@ + +# The archive.git.tar.gz is generated from archive.dir.tar. +archive.git.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + ./convert-archive dir git "$$inputfile" $@ + +# The archive.cvs.tar.gz is generated from archive.dir.tar. +archive.cvs.tar.gz: archive.dir.tar + if test -f archive.dir.tar; then \ + inputfile=archive.dir.tar; \ + else \ + inputfile='$(srcdir)'/archive.dir.tar; \ + fi; \ + ./convert-archive dir cvs "$$inputfile" $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gettext-tools/misc/add-to-archive b/gettext-tools/misc/add-to-archive new file mode 100755 index 0000000..ccc7f46 --- /dev/null +++ b/gettext-tools/misc/add-to-archive @@ -0,0 +1,101 @@ +#! /bin/sh +# +# Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc. +# +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +# + +# Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz +# Adds the infrastructure files for gettext version 0.xx.yy to the reposutory +# in the archive.dir.tar file. + +if test $# != 1; then + echo "Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz" + exit 1 +fi + +sourcetgz="$1" +case "$sourcetgz" in + *.tar.gz) ;; + *) echo "$0: first argument should be a gettext release tar.gz file"; exit 1;; +esac + +pack_ver=`basename "$sourcetgz" | sed -e 's/\.tar\.gz$//'` +if test -d "$pack_ver"; then + echo "$0: directory $pack_ver already exists"; exit 1 +fi +pack=`echo "$pack_ver" | sed -e 's/^\([^-]*\)-.*/\1/'` +ver=`echo "$pack_ver" | sed -e 's/^[^-]*-\(.*\)/\1/'` + +# Unpack, build and install the source distribution. +myprefix=`pwd`/${pack_ver}-inst +gunzip -c < "$sourcetgz" | tar xvf - +cd $pack_ver +./configure --prefix="$myprefix" +make +make install +cd .. +rm -rf $pack_ver + +# Copy the relevant files into an empty directory. +work_dir=tmpwrk$$ +mkdir "$work_dir" +mkdir "$work_dir/archive" +work_archive=`pwd`/"$work_dir/archive" +(cd "$myprefix"/share/gettext + for file in *; do + case $file in + ABOUT-NLS) + cp -p $file "$work_archive/$file" ;; + config.rpath) + cp -p $file "$work_archive/$file" ;; + esac + done + mkdir "$work_archive/intl" + cd intl + for file in *; do + if test $file != COPYING.LIB-2 && test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then + cp -p $file "$work_archive/intl/$file" + fi + done + cd .. + mkdir "$work_archive/po" + cd po + for file in *; do + if test $file != Makevars; then + cp -p $file "$work_archive/po/$file" + fi + done + cd .. + mkdir "$work_archive/m4" + cd "$myprefix"/share/aclocal + for file in *; do + cp -p $file "$work_archive/m4/$file" + done +) + +# Add the contents of this directory to the repository. +mkdir autopoint-files +(cd autopoint-files && tar xf ../archive.dir.tar) +mkdir autopoint-files/$pack_ver +(cd "$work_archive" && tar cf - .) | (cd autopoint-files/$pack_ver && tar xf -) +(cd autopoint-files && tar cf ../archive.dir.tar --owner=root --group=root *) + +# Clean up. +rm -rf autopoint-files +rm -rf "$work_dir" +rm -f cvsuser.so +rm -rf "$myprefix" + +exit 0 diff --git a/gettext-tools/misc/archive.dir.tar b/gettext-tools/misc/archive.dir.tar Binary files differnew file mode 100644 index 0000000..407923d --- /dev/null +++ b/gettext-tools/misc/archive.dir.tar diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in new file mode 100644 index 0000000..ff97874 --- /dev/null +++ b/gettext-tools/misc/autopoint.in @@ -0,0 +1,780 @@ +#! /bin/sh +# +# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +# + +# This file is meant for authors, maintainers, co-maintainers or installers +# of packages which are internationalized with the help of GNU gettext. For +# further information how to use it consult the GNU gettext manual. + +progname=$0 +package=@PACKAGE@ +version=@VERSION@ + +# Set variables +# - gettext_datadir directory where the data files are stored. +prefix="@prefix@" +datarootdir="@datarootdir@" +: ${gettext_datadir="@datadir@/gettext"} +: ${AUTOM4TE=autom4te} + +# func_tmpdir +# creates a temporary directory. +# Sets variable +# - tmp pathname of freshly created temporary directory +func_tmpdir () +{ + # Use the environment variable TMPDIR, falling back to /tmp. This allows + # users to specify a different temporary directory, for example, if their + # /tmp is filled up or too small. + : ${TMPDIR=/tmp} + { + # Use the mktemp program if available. If not available, hide the error + # message. + tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + # Use a simple mkdir command. It is guaranteed to fail if the directory + # already exists. $RANDOM is bash specific and expands to empty in shells + # other than bash, ksh and zsh. Its use does not increase security; + # rather, it minimizes the probability of failure in a very cluttered /tmp + # directory. + tmp=$TMPDIR/gt$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || + { + echo "$0: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } + } +} + +# Support for relocatability. +func_find_curr_installdir () +{ + # Determine curr_installdir, even taking into account symlinks. + curr_executable="$0" + case "$curr_executable" in + */* | *\\*) ;; + *) # Need to look in the PATH. + save_IFS="$IFS"; IFS="${PATH_SEPARATOR='@PATH_SEPARATOR@'}" + for dir in $PATH; do + IFS="$save_IFS" + test -z "$dir" && dir=. + for exec_ext in ''; do + if test -f "$dir/$curr_executable$exec_ext"; then + curr_executable="$dir/$curr_executable$exec_ext" + break 2 + fi + done + done + IFS="$save_IFS" + ;; + esac + # Make absolute. + case "$curr_executable" in + /* | ?:/* | ?:\\*) ;; + *) curr_executable=`pwd`/"$curr_executable" ;; + esac + # Resolve symlinks. + sed_dirname='s,/[^/]*$,,' + sed_linkdest='s,^.* -> \(.*\),\1,p' + while : ; do + lsline=`LC_ALL=C ls -l "$curr_executable"` + case "$lsline" in + *" -> "*) + linkdest=`echo "$lsline" | sed -n -e "$sed_linkdest"` + case "$linkdest" in + /* | ?:/* | ?:\\*) curr_executable="$linkdest" ;; + *) curr_executable=`echo "$curr_executable" | sed -e "$sed_dirname"`/"$linkdest" ;; + esac ;; + *) break ;; + esac + done + curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'` + # Canonicalize. + curr_installdir=`cd "$curr_installdir" && pwd` +} +func_find_prefixes () +{ + # Compute the original/current installation prefixes by stripping the + # trailing directories off the original/current installation directories. + orig_installprefix="$orig_installdir" + curr_installprefix="$curr_installdir" + while true; do + orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'` + curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'` + if test -z "$orig_last" || test -z "$curr_last"; then + break + fi + if test "$orig_last" != "$curr_last"; then + break + fi + orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'` + curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'` + done +} +if test "@RELOCATABLE@" = yes; then + exec_prefix="@exec_prefix@" + bindir="@bindir@" + orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables + func_find_curr_installdir # determine curr_installdir + func_find_prefixes + # Relocate the directory variables that we use. + gettext_datadir=`echo "$gettext_datadir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'` +fi + +# func_trace_autoconf macro configure.ac +# traces an Autoconf macro call and outputs the arguments to stdout, +# using autom4te. +func_trace_autoconf () +{ + echo '\ +dnl replace macros which may abort autom4te with a no-op variant +m4_pushdef([m4_assert]) +m4_pushdef([m4_fatal]) +m4_pushdef([m4_warn]) +m4_pushdef([m4_errprintn]) +m4_pushdef([m4_exit]) +m4_pushdef([m4_include]) +m4_pushdef([m4_esyscmd]) +' \ + | "$AUTOM4TE" --no-cache --language=Autoconf-without-aclocal-m4 \ + --trace="$1":\$% - "$2" 2>/dev/null +} + +# func_trace_sed macro configure.ac +# traces an Autoconf macro call and outputs the arguments to stdout, +# using sed. +func_trace_sed () +{ + sed_extract_arguments=' +s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,; +/'"$1"'(/ { + ta + :a + s/)/)/ + tb + s/\\$// + N + ba + :b + s,^.*'"$1"'([[ ]*\([^]"$`\\)]*\).*$,\1,p +} +d' + sed -e "$sed_extract_arguments" "$2" +} + +# func_usage +# outputs to stdout the --help usage message. +func_usage () +{ + echo "\ +Usage: autopoint [OPTION]... + +Copies standard gettext infrastructure files into a source package. + +Options: + --help print this help and exit + --version print version information and exit + -f, --force force overwriting of files that already exist + -n, --dry-run print modifications but don't perform them" +# echo "\ +# -V version copy the infrastructure of the specified gettext version +# (dangerous)" + echo " +Report bugs to <bug-gnu-gettext@gnu.org>." +} + +# func_version +# outputs to stdout the --version message. +func_version () +{ + echo "$progname (GNU $package) $version" + echo "Uses a versions archive in @ARCHIVE_FORMAT@ format." + echo "Copyright (C) 2002-2013 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + echo "Written by" "Bruno Haible" +} + +# func_fatal_error message +# outputs to stderr a fatal error message, and terminates the program. +func_fatal_error () +{ + echo "autopoint: *** $1" 1>&2 + echo "autopoint: *** Stop." 1>&2 + exit 1 +} + +# Nuisances. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +# Command-line option processing. +# Removes the OPTIONS from the arguments. Sets the variables: +# - force yes if --force was given, empty otherwise +# - ver gettext version if -V was given, empty otherwise +# - doit false if --dry-run was given, : otherwise +{ + force= + ver= + doit=: + + while test $# -gt 0; do + case "$1" in + -n | --dry-run | --dry-ru | --dry-r | --dry- | --dry | --dr | --d ) + shift + doit=false ;; + -f | --force | --forc | --for | --fo | --f ) + shift + force=yes ;; + --help | --hel | --he | --h ) + func_usage; exit 0 ;; +# -V ) # Some people put a space between -V and the version number. +# shift +# if test $# = 0; then +# func_usage 1>&2 +# exit 1 +# fi +# ver=$1; +# shift ;; +# -V*) # Some people omit the space between -V and the version number. +# ver=`echo "X$1" | sed -e 's/^X-V//'` +# shift ;; + --version | --versio | --versi | --vers | --ver | --ve | --v ) + func_version + exit 0 ;; + -- ) # Stop option prcessing + shift; break ;; + -* ) + echo "autopoint: unknown option $1" 1>&2 + echo "Try 'autopoint --help' for more information." 1>&2 + exit 1 ;; + * ) + break ;; + esac + done +} + +# Command-line argument processing. +# Analyzes the remaining arguments. +{ + if test $# -gt 0; then + func_usage 1>&2 + exit 1 + fi +} + +srcdir=`pwd` +# The current directory is now $srcdir. + +# Check integrity of package: A configure.in/ac must be present. Sets variable +# - configure_in name of configure.in/ac file. +if test -f configure.in; then + configure_in=configure.in +else + if test -f configure.ac; then + configure_in=configure.ac + else + # KDE specific convention: configure.in.in + if test -f configure.in.in; then + configure_in=configure.in.in + else + func_fatal_error "Missing configure.in or configure.ac, please cd to your package first." + fi + fi +fi + +# Select the method for Autoconf macro tracing. func_trace_autoconf +# is more accurate than func_trace_sed, but it only works with +# autoconf >= 2.69. +if echo "AC_PREREQ([2.69])" \ + | "$AUTOM4TE" --no-cache --language=Autoconf-without-aclocal-m4 - 2>&1; then + func_trace=func_trace_autoconf +else + func_trace=func_trace_sed +fi + +# Check whether the -V option and the version number in configure.in match. +# At least one of the two must be given. If both are given, they must agree. + +# Need to use func_trace_sed instead of $func_trace, since +# AM_GNU_GETTEXT_VERSION is not a standard Autoconf trace. +xver=`func_trace_sed AM_GNU_GETTEXT_VERSION "$configure_in"` +if test -z "$xver" && test -f intl/VERSION; then + xver=`cat intl/VERSION | LC_ALL=C sed -n -e 's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'` +fi +if test -n "$xver"; then + if test -n "$ver"; then + if test "X$ver" != "X$xver"; then + func_fatal_error "Version mismatch: specified -V $ver but the package uses gettext version $xver" + fi + else + ver="$xver" + fi +else + if test -z "$ver"; then + func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using" + fi +fi + +# Check whether the version number is supported. +case "$ver" in + 0.10.35 | 0.10.36 | 0.10.37 | 0.10.38 | 0.10.39 | 0.10.40 | \ + 0.11 | 0.11.1 | 0.11.2 | 0.11.3 | 0.11.4 | 0.11.5 | \ + 0.12 | 0.12.1 | \ + 0.13 | 0.13.1 | \ + 0.14 | 0.14.1 | 0.14.2 | 0.14.3 | 0.14.4 | 0.14.5 | 0.14.6 | \ + 0.15 | \ + 0.16 | 0.16.1 | \ + 0.17 | \ + 0.18 | 0.18.1 | 0.18.2 | 0.18.3 | \ + 0.19 | 0.19.1 | 0.19.2 | 0.19.3 | 0.19.4 ) + ;; + *) + func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your $configure_in + file requires the infrastructure from gettext-$ver but this version + is older. Please upgrade to gettext-$ver or newer." + ;; +esac + +# Check in which directory config.rpath, mkinstalldirs etc. belong. +auxdir=`"$func_trace" AC_CONFIG_AUX_DIR "$configure_in"` +if test -n "$auxdir"; then + auxdir="$auxdir/" +fi + +# Check in which directory the *.m4 macros belong. +macrodirs=`"$func_trace" AC_CONFIG_MACRO_DIR_TRACE "$configure_in"` +if test -z "$macrodirs"; then + macrodirs=`"$func_trace" AC_CONFIG_MACRO_DIR "$configure_in"` +fi +for arg in $macrodirs; do + m4dir="$arg" + break +done + +if test -z "$m4dir" && test -f Makefile.am; then + # A package using automake. + # Extract the macro directory name from Makefile.am. + aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'` + m4dir_is_next= + for arg in $aclocal_amflags; do + if test -n "$m4dir_is_next"; then + m4dir="$arg" + break + else + if test "X$arg" = "X-I"; then + m4dir_is_next=yes + else + m4dir_is_next= + fi + fi + done +fi + +if test -z "$m4dir"; then + m4dir=m4 +fi + +# Check whether to omit the intl/ directory. +omitintl= +# Need to use func_trace_sed instead of $func_trace, since +# AM_GNU_GETTEXT is not a standard Autoconf trace. +xargs=`func_trace_sed AM_GNU_GETTEXT "$configure_in"` +save_IFS="$IFS"; IFS=: +for arg in $xargs; do + if test 'external' = "$arg"; then + omitintl=yes + break + fi +done +IFS="$save_IFS" + +# Check in which directory or directories the po/* infrastructure belongs. +configfiles=`"$func_trace" AC_CONFIG_FILES "$configure_in"` +# PO directories have a Makefile.in generated from Makefile.in.in. +# Treat a directory as a PO directory if and only if it has a +# POTFILES.in file. This allows packages to have multiple PO +# directories under different names or in different locations. +sed_remove_Makefile_in='s,/Makefile\.in$,,' +podirs=`for f in $configfiles; do case "$f" in */Makefile.in) echo $f;; esac; done | sed -e "$sed_remove_Makefile_in"` +if test -z "$podirs"; then + # If we cannot get the list of PO directories from configure.ac, assume the + # common default. + podirs="po" +fi + +# Set up a temporary checkout directory. +# Set variables +# - work_dir directory containing the temporary checkout +work_dir=tmpwrk$$ +mkdir "$work_dir" || { + if test -d "$work_dir"; then + func_fatal_error "directory $work_dir already exists" + else + func_fatal_error "cannot create directory $work_dir" + fi +} + +# We support three archive formats. +# +# Format | Size (KiB) for gettext-0.17 | Extra tools needed | +# -------+-----------------------------+--------------------+ +# dir | 3000 | -- | +# cvs | 356 | cvs | +# git | 484 | git | +# -------+-----------------------------+--------------------+ + +case "@ARCHIVE_FORMAT@" in + dir*) + # The archive of different versions is very large (unless xz compression is + # used), but using it does not require special tools. + case "@ARCHIVE_FORMAT@" in + dirgz) gzip -d -c < "$gettext_datadir/archive.dir.tar.gz" ;; + dirbz2) bzip2 -d -c < "$gettext_datadir/archive.dir.tar.bz2" ;; + dirxz) xz -d -c < "$gettext_datadir/archive.dir.tar.xz" ;; + esac \ + | (cd "$work_dir" && tar xf - "gettext-$ver") + if test `find "$work_dir" -type f -print | wc -l` = 0; then + rm -rf "$work_dir" + func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version" + fi + mv "$work_dir/gettext-$ver" "$work_dir/archive" + ;; + + cvs) + # We distributed the many different versions of the files in a CVS + # repository. This guaranteed a good compression rate: + # + # Including version size in KB of + # "du autopoint-files/archive" + # 0.10.35 240 + # 0.10.36 428 + # 0.10.37 436 + # 0.10.38 488 + # 0.10.39 500 + # 0.10.40 528 + # 0.11 720 + # 0.11.1 740 + # 0.11.2 748 + # 0.11.3 804 + # 0.11.4 864 + # 0.11.5 880 + # 0.12 1032 + # 0.12.1 1032 + # 0.13 1220 + # 0.13.1 1236 + # 0.14 1296 + # 0.14.1 1300 + # 0.14.2 1420 + # 0.14.3 1428 + # 0.14.4 1464 + # 0.14.5 1508 + # 0.14.6 1580 + # 0.15 1760 + # 0.16 1808 + # 0.16.1 1812 + # 0.17 2128 + # 0.18 2656 + # + # The requirement that the user must have the CVS program available is not + # a severe restrictions, because most of the people who use autopoint are + # users of CVS. + # + # But the CVS format is now deprecated, because "cvs init" does not work in + # all circumstances + # (see <http://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>) + # and we are not allowed to distribute the cvs infrastructure files + # ourselves + # (see <http://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>). + # + # Check availability of the CVS program. + (cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found" + + # Set up a temporary CVS repository. + # We need the temporary CVS repository because any checkout needs write + # access to the CVSROOT/history file, so it cannot be under $gettext_datadir. + # We need the temporary checkout directory because when --force was not + # given, we need to compare the existing files with the checked out ones. + # Set variables + # - cvs_dir directory containing the temporary repository + cvs_dir=tmpcvs$$ + # Use an umask of 077, to avoid attacks that work by overwriting files in + # the "$CVSROOT"/CVSROOT directory. + (umask 077 && mkdir "$cvs_dir") || { + if test -d "$cvs_dir"; then + func_fatal_error "directory $cvs_dir already exists" + else + func_fatal_error "cannot create directory $cvs_dir" + fi + } + CVSROOT="$srcdir/$cvs_dir" + unset CVS_CLIENT_LOG + unset CVS_CLIENT_PORT + unset CVS_IGNORE_REMOTE_ROOT + unset CVS_LOCAL_BRANCH_NUM + unset CVS_NOBASES + unset CVS_PASSFILE + unset CVS_PASSWORD + unset CVS_PROXY_PORT + unset CVS_RCMD_PORT + unset CVS_RSH + unset CVS_SERVER + unset CVS_SERVER_SLEEP + CVS_SIGN_COMMITS= + export CVS_SIGN_COMMITS + unset CVS_SSH + unset CVS_VERIFY_CHECKOUTS + unset CVS_VERIFY_TEMPLATE + unset CVSIGNORE + unset CVSREAD + unset CVSREADONLYFS + unset CVSUMASK + unset CVSWRAPPERS + + # Need to pass -d "$CVSROOT", because there may be a CVS directory in the + # current directory. + cvs -d "$CVSROOT" init + gzip -d -c < "$gettext_datadir/archive.cvs.tar.gz" | (cd "$cvs_dir" && tar xf -) + + cd "$work_dir" + cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'` + (cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating' + find archive -name CVS -type d -print | xargs rm -rf + cd .. + rm -rf "$cvs_dir" + # Check that really all CVS directories are gone, otherwise we would overwrite + # the contents of the user's CVS directories. + if test `find $work_dir/archive -name CVS -type d -print | wc -l` != 0; then + rm -rf "$work_dir" + func_fatal_error "failed to remove all CVS subdirectories" + fi + if test `find $work_dir/archive -type f -print | wc -l` = 0; then + rm -rf "$work_dir" + func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version" + fi + ;; + + git) + # Check availability of the git program. + (git --version) >/dev/null 2>/dev/null || func_fatal_error "git program not found" + mkdir "$work_dir/archive" + gzip -d -c < "$gettext_datadir/archive.git.tar.gz" | (cd "$work_dir/archive" && tar xf -) + (cd "$work_dir/archive" && git checkout -q "gettext-$ver") || { + rm -rf "$work_dir" + func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version" + } + (cd "$work_dir/archive" && rm -rf .git .gitignore) + ;; +esac + +# func_destfile file +# determines the destination file, relative to the package's top level +# directory, for a given file name, relative to archive. +# Sets variables +# - destfile relative destination file name, or +# empty if the file shall be omitted +# - sharedowner yes if the file is not only owned by GNU gettext but may +# be installed by automake or other tools, otherwise empty +# - allpodirs yes if the file is to be installed in every dir in $podirs +func_destfile () +{ + # There are five categories of files: + # ABOUT_NLS -> top level directory + # config.rpath mkinstalldirs -> $auxdir + # m4/* -> $m4dir/ + # intl/* -> intl/ + # po/* -> + sharedowner= + allpodirs= + case `echo "$1" | sed -e 's,[^/]*$,,'` in + "" ) + case "$1" in + config.rpath ) destfile="$auxdir$1" ;; + mkinstalldirs ) destfile="$auxdir$1" sharedowner=yes ;; + * ) destfile="$1" ;; + esac + ;; + m4/ ) destfile=`echo "$1" | sed -e "s,^m4/,$m4dir/,"` ;; + intl/ ) if test -n "$omitintl"; then destfile=""; else destfile="$1"; fi ;; + po/ ) destfile=`echo "$1" | sed -e "s,^po/,,"` allpodirs=yes ;; + * ) destfile="$1" ;; + esac +} + +# func_compare existingfile gettextfile +# compares the existing file and the file from gettext, and decides whether the +# existing file should be overwritten with the file from gettext. Returns 0 if +# it should be overwritten, or 1 if it should be skipped. +sed_extract_serial='s/^#.* serial \([^ ]*\).*/\1/p +1q' +func_compare () +{ + if cmp -s "$1" "$2"; then + false + else + case "$2" in + *.m4) + # For interoperability with gnulib. gnulib often has newer versions of + # the *.m4 files than the latest gettext release. Don't overwrite a + # newer version from gnulib with an older version from the gettext + # release. The version can be retrieved from the first line, which + # looks like this: # file.m4 serial NN ... + existing_serial=`sed -n -e "$sed_extract_serial" < "$1"` + gettext_serial=`sed -n -e "$sed_extract_serial" < "$2"` + if test -n "$existing_serial" && test -n "$gettext_serial" \ + && test "$existing_serial" -ge "$gettext_serial" 2> /dev/null; then + false + else + true + fi + ;; + *) + true + ;; + esac + fi +} + +# If some files have been locally modified and we have not been requested +# to overwrite them, then bail out. This is better than leaving a source +# package around where half of the files are locally modified and half are +# original - too great risk of version mismatch. +if test -z "$force"; then + mismatch= + func_tmpdir + mismatchfile="$tmp"/autopoint.diff + for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do + func_destfile "$file" + if test -n "$destfile"; then + func_compare_to_destfile () + { + finaldestfile="$1" + if test -f "$finaldestfile"; then + if func_compare "$finaldestfile" "$work_dir/archive/$file"; then + if test -n "$sharedowner"; then + echo "autopoint: warning: File $finaldestfile has been locally modified." 1>&2 + else + echo "autopoint: File $finaldestfile has been locally modified." 1>&2 + mismatch=yes + diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile" + fi + fi + fi + } + if test -n "$allpodirs"; then + for dir in $podirs; do + func_compare_to_destfile "$dir/$destfile" + done + else + func_compare_to_destfile "$destfile" + fi + fi + done + if test -n "$mismatch"; then + rm -rf "$work_dir" + func_fatal_error "Some files have been locally modified. Not overwriting them because --force has not been specified. For your convenience, you find the local modifications in the file '$mismatchfile'." + fi + rm -rf "$tmp" +fi + +# func_mkdir_for to +# ensures the directory that would the given file exists. +# 'to' is a relative pathname, relative to the current directory. +func_mkdir_for () +{ + base=`echo "$1" | sed -e 's,/[^/]*$,,'` + if test "X$base" != "X$1" && test -n "$base"; then + func_mkdir_for "$base" + # Recompute base. It was clobbered by the recursive call. + base=`echo "$1" | sed -e 's,/[^/]*$,,'` + test -d "$base" || { echo "Creating directory $base"; mkdir "$base"; } + fi +} + +# func_copy from to +# copies a file. +# 'from' is a relative pathname, relative to the current directory. +# 'to' is a relative pathname, relative to the current directory. +func_copy () +{ + if $doit; then + func_mkdir_for "$2" + rm -f "$2" + echo "Copying file $2" + cp "$1" "$2" + else + echo "Copy file $2" + fi +} + +# func_backup to +# makes a backup of a file that is about to be overwritten or replaced. +# 'to' is a relative pathname, relative to the current directory. +func_backup () +{ + if $doit; then + if test -f "$1"; then + rm -f "$1~" + cp -p "$1" "$1~" + fi + fi +} + +# Now copy the files. +for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do + func_destfile "$file" + if test -n "$destfile"; then + func_copy_to_destfile () + { + finaldestfile="$1" + mustcopy= + if test -f "$finaldestfile"; then + if func_compare "$finaldestfile" "$work_dir/archive/$file"; then + if test -n "$force"; then + # Overwrite locally modified file. + mustcopy=yes + fi + # If --force is not specified, don't overwrite locally modified files + # for which GNU gettext is a shared owner. + fi + else + mustcopy=yes + fi + if test -n "$mustcopy"; then + func_backup "$finaldestfile" + func_copy "$work_dir/archive/$file" "$finaldestfile" + fi + } + if test -n "$allpodirs"; then + for dir in $podirs; do + func_copy_to_destfile "$dir/$destfile" + done + else + func_copy_to_destfile "$destfile" + fi + fi +done + +# That's it. +rm -rf "$work_dir" +exit 0 diff --git a/gettext-tools/misc/convert-archive.in b/gettext-tools/misc/convert-archive.in new file mode 100644 index 0000000..e48f20b --- /dev/null +++ b/gettext-tools/misc/convert-archive.in @@ -0,0 +1,360 @@ +#! /bin/sh +# +# Copyright (C) 2009-2010 Free Software Foundation, Inc. +# +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +# + +# Usage: convert-archive FROM TO [FROMFILE [TOFILE]] +# where FROM is dir or dirgz or dirbz2 or dirxz or cvs or git +# and TO is dir or dirgz or dirbz2 or dirxz or cvs or git +# This will read FROMFILE (default: archive.$FROM.tar.gz) +# and produce TOFILE (default: archive.$TO.tar.gz). + +progname=$0 +package=@PACKAGE@ +version=@VERSION@ + +# func_usage +# outputs to stdout the --help usage message. +func_usage () +{ + echo "\ +Usage: convert-archive FROM TO [FROMFILE [TOFILE]] + +Converts the archive of gettext infrastructure from the FROM format +to the TO format. +FROMFILE is the original file, defaulting to archive.\$FROM.tar.gz. +TOFILE is the destination file, defaulting to archive.\$TO.tar.gz. + +Report bugs to <bug-gnu-gettext@gnu.org>." +} + +# func_version +# outputs to stdout the --version message. +func_version () +{ + echo "$progname (GNU $package) $version" + echo "Copyright (C) 2009-2010 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + echo "Written by" "Bruno Haible" +} + +# func_fatal_error message +# outputs to stderr a fatal error message, and terminates the program. +func_fatal_error () +{ + echo "convert-archive: *** $1" 1>&2 + echo "convert-archive: *** Stop." 1>&2 + exit 1 +} + +# Command-line option processing. + +if { { test $# = 2 || test $# = 3 || test $# = 4; } \ + && case "$1" in dir | cvs | git ) true;; *) false;; esac \ + && case "$2" in dir | cvs | git ) true;; *) false;; esac; }; then + : +else + echo "Usage: convert-archive {dir|cvs|git} {dir|cvs|git} [fromfile [tofile]]" + exit 1 +fi + +from="$1" +to="$2" +fromfile="$3" +test -n "$fromfile" || fromfile=`pwd`/archive.$from.tar.gz +tofile="$4" +test -n "$tofile" || tofile=`pwd`/archive.$to.tar.gz + +unpacked=`pwd`/unpacked-files +mkdir "$unpacked" || { + if test -d "$unpacked"; then + func_fatal_error "directory $unpacked already exists" + else + func_fatal_error "cannot create directory $unpacked" + fi +} + +# Unpack the original archive. +case "$from" in + dir*) + { case "$from" in + dir) cat < "$fromfile" ;; + dirgz) gzip -d -c < "$fromfile" ;; + dirbz2) bzip2 -d -c < "$fromfile" ;; + dirxz) xz -d -c < "$fromfile" ;; + esac + } \ + | (cd "$unpacked" && tar xf -) \ + || func_fatal_error "file copy failed" + ;; + + cvs) + # Set variables + # - work_dir directory containing the temporary checkout + work_dir=tmpwrk$$ + mkdir "$work_dir" || { + if test -d "$work_dir"; then + func_fatal_error "directory $work_dir already exists" + else + func_fatal_error "cannot create directory $work_dir" + fi + } + + # Set variables + # - cvs_dir directory containing the temporary repository + cvs_dir=tmpcvs$$ + # Use an umask of 077, to avoid attacks that work by overwriting files in + # the "$CVSROOT"/CVSROOT directory. + (umask 077 && mkdir "$cvs_dir") || { + if test -d "$cvs_dir"; then + func_fatal_error "directory $cvs_dir already exists" + else + func_fatal_error "cannot create directory $cvs_dir" + fi + } + CVSROOT=`pwd`/"$cvs_dir" + unset CVS_CLIENT_LOG + unset CVS_CLIENT_PORT + unset CVS_IGNORE_REMOTE_ROOT + unset CVS_LOCAL_BRANCH_NUM + unset CVS_NOBASES + unset CVS_PASSFILE + unset CVS_PASSWORD + unset CVS_PROXY_PORT + unset CVS_RCMD_PORT + unset CVS_RSH + unset CVS_SERVER + unset CVS_SERVER_SLEEP + CVS_SIGN_COMMITS= + export CVS_SIGN_COMMITS + unset CVS_SSH + unset CVS_VERIFY_CHECKOUTS + unset CVS_VERIFY_TEMPLATE + unset CVSIGNORE + unset CVSREAD + unset CVSREADONLYFS + unset CVSUMASK + unset CVSWRAPPERS + + # Need to pass -d "$CVSROOT", because there may be a CVS directory in the + # current directory. + cvs -d "$CVSROOT" init || func_fatal_error "cvs init failed" + gzip -d -c < "$fromfile" | (cd "$cvs_dir" && tar xf -) + + # A witness that contains all versions. + # Can be e.g. ABOUT-NLS, intl/ChangeLog, m4/gettext.m4. + witness='ABOUT-NLS' + + # Get list of tags or versions. + sed_extract_tags_from_log1='/^symbolic names:/{ +:a +/^ /p +n +ba +} +/^keyword substitution:/q' + sed_extract_tags_from_log2='s/^ \([^:]*\):.*/\1/' + rlog_harmless_warning_regex="warning: Unknown phrases like \`commitid \.\.\.;' are present\." + tags=` + ( LC_ALL=C rlog "$cvs_dir"/archive/$witness,v 2>&1 1>&3 \ + | grep -v "$rlog_harmless_warning_regex" 1>&2 ) 3>&1 \ + | sed -n -e "$sed_extract_tags_from_log1" \ + | sed -e "$sed_extract_tags_from_log2"` + test -n "$tags" || func_fatal_error "no release tags found" + sed_tag_to_version='s/_/./g' + for tag in $tags; do + if test $tag != release; then + version=`echo "$tag" | sed -e "$sed_tag_to_version"` + (cd "$work_dir" + cvs -d "$CVSROOT" checkout -r"$tag" archive > /dev/null 2> cvs.err \ + || { cat cvs.err 1>&2; exit 1; } + cat cvs.err | grep -v '^cvs checkout: Updating' + find archive -name CVS -type d -print | xargs rm -rf + rm -rf CVS + ) || func_fatal_error "cvs checkout failed" + mv "$work_dir"/archive "$unpacked/$version" + fi + done + rm -rf "$cvs_dir" + rm -rf "$work_dir" + ;; + + git) + # Set variables + # - work_dir directory containing the temporary checkout + work_dir=tmpwrk$$ + mkdir "$work_dir" || { + if test -d "$work_dir"; then + func_fatal_error "directory $work_dir already exists" + else + func_fatal_error "cannot create directory $work_dir" + fi + } + + mkdir "$work_dir/master" || func_fatal_error "mkdir failed" + gzip -d -c < "$fromfile" | (cd "$work_dir/master" && tar xf -) + cd "$work_dir" + tags=`cd master && git tag` + test -n "$tags" || func_fatal_error "no release tags found" + for tag in $tags; do + if test $tag != empty; then + version=$tag + (cd master && git checkout -q $tag) \ + || func_fatal_error "git checkout failed" + rm -f master/.gitignore + mv master/.git .git + mkdir "$unpacked/$version" || func_fatal_error "mkdir failed" + (cd master && tar cf - .) | (cd "$unpacked/$version" && tar xf -) \ + || func_fatal_error "file copy failed" + mv .git master/.git + fi + done + cd .. + rm -rf "$work_dir" + ;; +esac + +# Find a good 'tar' program. +existing_file=gettext-0.10.35/ABOUT-NLS +TAR=tar +TAR_OPTIONS= +for prog in tar gnutar gtar; do + if (cd "$unpacked" && $prog cf - --owner=root --group=root "$existing_file") >/dev/null 2>&1; then + TAR=$prog + TAR_OPTIONS='--owner=root --group=root' + break + fi +done + +# Create the target archive. +case "$to" in + dir*) + (cd "$unpacked" && $TAR cf - $TAR_OPTIONS *) \ + | { case "$to" in + dir) cat > "$tofile" ;; + dirgz) gzip -c -9 > "$tofile" ;; + dirbz2) bzip2 -c -9 > "$tofile" ;; + dirxz) xz -c -5 > "$tofile" ;; + esac + } \ + || func_fatal_error "archive creation failed" + ;; + + cvs) + # Set variables + # - cvs_dir directory containing the temporary repository + cvs_dir=autopoint-files + # Use an umask of 077, to avoid attacks that work by overwriting files in + # the "$CVSROOT"/CVSROOT directory. + (umask 077 && mkdir "$cvs_dir") || { + if test -d "$cvs_dir"; then + func_fatal_error "directory $cvs_dir already exists" + else + func_fatal_error "cannot create directory $cvs_dir" + fi + } + CVSROOT=`pwd`/"$cvs_dir" + unset CVS_CLIENT_LOG + unset CVS_CLIENT_PORT + unset CVS_IGNORE_REMOTE_ROOT + unset CVS_PASSFILE + unset CVS_PASSWORD + unset CVS_RCMD_PORT + unset CVS_RSH + unset CVS_SERVER + unset CVS_SERVER_SLEEP + unset CVSIGNORE + unset CVSREAD + unset CVSUMASK + unset CVSWRAPPERS + + # Set a nonstandard variable, for a good-looking cvs history. + cvsuser=bruno + gcc -shared -fPIC -O cvsuser.c -o cvsuser.so + cvsuser_hack=`pwd`/cvsuser.so + + # Need to pass -d "$CVSROOT", because there may be a CVS directory in the + # current directory. + cvs -d "$CVSROOT" init || func_fatal_error "cvs init failed" + + # Add the contents of the unpacked directory to the repository. + (cd "$unpacked" + for version in *; do + cvsver=`echo "$version" | sed -e 's/\./_/g'` + (cd $version + CVSUSER=$cvsuser LD_PRELOAD=$cvsuser_hack \ + cvs -d "$CVSROOT" import -m "Import $version" archive release "$cvsver" > /dev/null + ) || func_fatal_error "cvs import failed" + # In order to avoid keyword substitution, we have to use "cvs admin" + # in a temporary checkout. + mkdir tmpcheckout || func_fatal_error "mkdir failed" + (cd tmpcheckout \ + && cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null \ + && cvs -d "$CVSROOT" admin -ko `find . -type f -print | sed -e 's,^\./,,' | grep -v '^CVS/' | grep -v '/CVS/'` > /dev/null + ) 2> cvs.err || { cat cvs.err 1>&2; func_fatal_error "cvs checkout or admin failed"; } + rm -rf tmpcheckout + done + ) + (cd "$cvs_dir" && $TAR cf - $TAR_OPTIONS archive) \ + | gzip -c -9 > "$tofile" \ + || func_fatal_error "archive creation failed" + rm -rf "$cvs_dir" cvsuser.so + ;; + + git) + git_dir=`pwd`/tmpgit$$ + mkdir "$git_dir" || func_fatal_error "mkdir failed" + unset GIT_CONFIG + (cd "$git_dir" && { + git init -q + git config user.name 'GNU Gettext Build' + git config user.email 'bug-gnu-gettext@gnu.org' + touch .gitignore + git add . + git commit --author="Bruno Haible <bruno@clisp.org>" \ + --message="Empty directory" 2>&1 >/dev/null + git tag empty + }) || func_fatal_error "git init failed" + sed_remove_leading_dot='s,^\./,,' + sed_remove_git_infrastructure='/^\.git/d' + (cd "$unpacked" + for version in *; do + (cd $version && tar cf - .) | \ + (cd "$git_dir" && { + prev_files=`find . -type f | sed -e "$sed_remove_leading_dot" -e "$sed_remove_git_infrastructure"` + if test -n "$prev_files"; then + git rm -q $prev_files + fi + tar xf - + git add . + git commit --author="Bruno Haible <bruno@clisp.org>" \ + --message="Import $version" 2>&1 >/dev/null + git tag "$version" + }) || func_fatal_error "file copy into git repository failed" + done + ) + (cd "$git_dir" && git reset -q --hard empty && git repack -a -d -q) \ + || func_fatal_error "git reset or repack failed" + (cd "$git_dir" && $TAR cf - $TAR_OPTIONS .git) \ + | gzip -c -9 > "$tofile" \ + || func_fatal_error "archive creation failed" + rm -rf "$git_dir" + ;; +esac + +rm -rf "$unpacked" diff --git a/gettext-tools/misc/cvsuser.c b/gettext-tools/misc/cvsuser.c new file mode 100644 index 0000000..67e6ae3 --- /dev/null +++ b/gettext-tools/misc/cvsuser.c @@ -0,0 +1,40 @@ +/* Enable a variable CVSUSER for cvs. */ +/* See cvs/subr.c: getcaller(). */ + +#include <stdlib.h> +#include <string.h> +#include <pwd.h> + +int getuid (void) +{ + return 0; +} + +char * getlogin (void) +{ + char *s; + + s = getenv ("CVSUSER"); + if (s && *s) + return s; + s = getenv ("USER"); + if (s && *s) + return s; + return NULL; +} + +struct passwd * getpwnam (const char *name) +{ + static struct passwd pw; + static char namebuf[100]; + + pw.pw_name = strcpy (namebuf, name); + pw.pw_passwd = "*"; + pw.pw_uid = 100; + pw.pw_gid = 100; + pw.pw_gecos = ""; + pw.pw_dir = "/"; + pw.pw_shell = "/bin/sh"; + + return &pw; +} diff --git a/gettext-tools/misc/gettextize.in b/gettext-tools/misc/gettextize.in new file mode 100644 index 0000000..33299b9 --- /dev/null +++ b/gettext-tools/misc/gettextize.in @@ -0,0 +1,1343 @@ +#! /bin/sh +# +# Copyright (C) 1995-1998, 2000-2014 Free Software Foundation, Inc. +# +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. +# + +# This file is meant for authors or maintainers which want to +# internationalize their package with the help of GNU gettext. For +# further information how to use it consult the GNU gettext manual. + +progname=$0 +package=@PACKAGE@ +version=@VERSION@ + +# Set variables +# - gettext_datadir directory where the data files are stored. +prefix="@prefix@" +datarootdir="@datarootdir@" +: ${gettext_datadir="@datadir@/gettext"} +: ${AUTOM4TE=autom4te} + +# func_tmpdir +# creates a temporary directory. +# Sets variable +# - tmp pathname of freshly created temporary directory +func_tmpdir () +{ + # Use the environment variable TMPDIR, falling back to /tmp. This allows + # users to specify a different temporary directory, for example, if their + # /tmp is filled up or too small. + : ${TMPDIR=/tmp} + { + # Use the mktemp program if available. If not available, hide the error + # message. + tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + # Use a simple mkdir command. It is guaranteed to fail if the directory + # already exists. $RANDOM is bash specific and expands to empty in shells + # other than bash, ksh and zsh. Its use does not increase security; + # rather, it minimizes the probability of failure in a very cluttered /tmp + # directory. + tmp=$TMPDIR/gt$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || + { + echo "$0: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } + } +} + +# Support for relocatability. +func_find_curr_installdir () +{ + # Determine curr_installdir, even taking into account symlinks. + curr_executable="$0" + case "$curr_executable" in + */* | *\\*) ;; + *) # Need to look in the PATH. + save_IFS="$IFS"; IFS="${PATH_SEPARATOR='@PATH_SEPARATOR@'}" + for dir in $PATH; do + IFS="$save_IFS" + test -z "$dir" && dir=. + for exec_ext in ''; do + if test -f "$dir/$curr_executable$exec_ext"; then + curr_executable="$dir/$curr_executable$exec_ext" + break 2 + fi + done + done + IFS="$save_IFS" + ;; + esac + # Make absolute. + case "$curr_executable" in + /* | ?:/* | ?:\\*) ;; + *) curr_executable=`pwd`/"$curr_executable" ;; + esac + # Resolve symlinks. + sed_dirname='s,/[^/]*$,,' + sed_linkdest='s,^.* -> \(.*\),\1,p' + while : ; do + lsline=`LC_ALL=C ls -l "$curr_executable"` + case "$lsline" in + *" -> "*) + linkdest=`echo "$lsline" | sed -n -e "$sed_linkdest"` + case "$linkdest" in + /* | ?:/* | ?:\\*) curr_executable="$linkdest" ;; + *) curr_executable=`echo "$curr_executable" | sed -e "$sed_dirname"`/"$linkdest" ;; + esac ;; + *) break ;; + esac + done + curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'` + # Canonicalize. + curr_installdir=`cd "$curr_installdir" && pwd` +} +func_find_prefixes () +{ + # Compute the original/current installation prefixes by stripping the + # trailing directories off the original/current installation directories. + orig_installprefix="$orig_installdir" + curr_installprefix="$curr_installdir" + while true; do + orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'` + curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'` + if test -z "$orig_last" || test -z "$curr_last"; then + break + fi + if test "$orig_last" != "$curr_last"; then + break + fi + orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'` + curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'` + done +} +if test "@RELOCATABLE@" = yes; then + exec_prefix="@exec_prefix@" + bindir="@bindir@" + orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables + func_find_curr_installdir # determine curr_installdir + func_find_prefixes + # Relocate the directory variables that we use. + gettext_datadir=`echo "$gettext_datadir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'` +fi + +# func_trace_autoconf macro configure.ac +# traces an Autoconf macro call and outputs the arguments to stdout, +# using autom4te. +func_trace_autoconf () +{ + echo '\ +dnl replace macros which may abort autom4te with a no-op variant +m4_pushdef([m4_assert]) +m4_pushdef([m4_fatal]) +m4_pushdef([m4_warn]) +m4_pushdef([m4_errprintn]) +m4_pushdef([m4_exit]) +m4_pushdef([m4_include]) +m4_pushdef([m4_esyscmd]) +' \ + | "$AUTOM4TE" --no-cache --language=Autoconf-without-aclocal-m4 \ + --trace="$1":\$% - "$2" 2>/dev/null +} + +# func_trace_sed macro configure.ac +# traces an Autoconf macro call and outputs the arguments to stdout, +# using sed. +func_trace_sed () +{ + sed_extract_arguments=' +s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,; +/'"$1"'(/ { + ta + :a + s/)/)/ + tb + s/\\$// + N + ba + :b + s,^.*'"$1"'([[ ]*\([^]"$`\\)]*\).*$,\1,p +} +d' + sed -e "$sed_extract_arguments" "$2" +} + +# func_usage +# outputs to stdout the --help usage message. +func_usage () +{ + echo "\ +Usage: gettextize [OPTION]... [package-dir] + +Prepares a source package to use gettext. + +Options: + --help print this help and exit + --version print version information and exit + -f, --force force writing of new files even if old exist + --intl install libintl in a subdirectory (deprecated) + --po-dir=DIR specify directory with PO files + --no-changelog don't update or create ChangeLog files + --symlink make symbolic links instead of copying files + -n, --dry-run print modifications but don't perform them + +Report bugs to <bug-gnu-gettext@gnu.org>." +} + +# func_version +# outputs to stdout the --version message. +func_version () +{ + echo "$progname (GNU $package) $version" + echo "Copyright (C) 1995-1998, 2000-2013 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law." + echo "Written by" "Ulrich Drepper" +} + +# func_fatal_error message +# outputs to stderr a fatal error message, and terminates the program. +func_fatal_error () +{ + echo "gettextize: *** $1" 1>&2 + echo "gettextize: *** Stop." 1>&2 + exit 1 +} + +# Nuisances. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +# Command-line option processing. +# Removes the OPTIONS from the arguments. Sets the variables: +# - force 1 if --force was given, 0 otherwise +# - intldir yes if --intl was given, empty otherwise +# - podirs list of directories specified with --po-dir +# - try_ln_s : if --symlink was given, false otherwise +# - do_changelog false if --no-changelog was given, : otherwise +# - doit false if --dry-run was given, : otherwise +{ + force=0 + intldir= + podirs= + try_ln_s=false + do_changelog=: + doit=: + + while test $# -gt 0; do + case "$1" in + -c | --copy | --cop | --co | --c ) # accepted for backward compatibility + shift ;; + -n | --dry-run | --dry-ru | --dry-r | --dry- | --dry | --dr | --d ) + shift + doit=false ;; + -f | --force | --forc | --for | --fo | --f ) + shift + force=1 ;; + --help | --hel | --he | --h ) + func_usage; exit 0 ;; + --intl | --int | --in | --i ) + shift + intldir=yes ;; + --po-dir | --po-di | --po-d | --po- | --po | --p ) + shift + if test $# = 0; then + func_fatal_error "missing argument for --po-dir" + fi + case "$1" in + -*) func_fatal_error "missing argument for --po-dir" ;; + esac + podirs="$podirs $1" + shift ;; + --po-dir=* ) + arg=`echo "X$1" | sed -e 's/^X--po-dir=//'` + podirs="$podirs $arg" + shift ;; + --no-changelog | --no-changelo | --no-changel | --no-change | --no-chang | --no-chan | --no-cha | --no-ch | --no-c ) + shift + do_changelog=false ;; + --symlink | --symlin | --symli | --syml | --sym | --sy | --s ) + shift + try_ln_s=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v ) + func_version + exit 0 ;; + -- ) # Stop option prcessing + shift; break ;; + -* ) + echo "gettextize: unknown option $1" 1>&2 + echo "Try 'gettextize --help' for more information." 1>&2 + exit 1 ;; + * ) + break ;; + esac + done + # podirs defaults to "po". + test -n "$podirs" || podirs="po" +} + +# Warn about deprecated options. +if test -n "$intldir"; then + echo "gettextize: warning: the option '--intl' is deprecated and will be removed" 1>&2 +fi + +# Command-line argument processing. +# Analyzes the remaining arguments. +# Sets the variables +# - origdir to the original directory, +# - srcdir to the package directory, and cd-s into it. +{ + if test $# -gt 1; then + func_usage 1>&2 + exit 1 + fi + origdir=`pwd` + if test $# -eq 1; then + srcdir=$1 + if cd "$srcdir"; then + srcdir=`pwd` + else + func_fatal_error "Cannot change directory to '$srcdir'." + fi + else + srcdir=$origdir + fi +} + +# The current directory is now $srcdir. + +# Check integrity of package: A configure.in/ac must be present. Sets variable +# - configure_in name of configure.in/ac file. +test -f configure.in || test -f configure.ac || + func_fatal_error "Missing configure.in or configure.ac, please cd to your package first." +configure_in=NONE +if test -f configure.in; then + configure_in=configure.in +else + if test -f configure.ac; then + configure_in=configure.ac + fi +fi + +# Check whether the --force option is needed but has not been specified. +if test $force -eq 0; then + if test -d intl; then + func_fatal_error "intl/ subdirectory exists: use option -f if you really want to delete it." + fi + for podir in $podirs; do + if test -f "$podir/Makefile.in.in"; then + func_fatal_error "$podir/Makefile.in.in exists: use option -f if you really want to delete it." + fi + done + if test -f ABOUT-NLS; then + func_fatal_error "ABOUT-NLS exists: use option -f if you really want to delete it." + fi +fi + +# Select the method for Autoconf macro tracing. func_trace_autoconf +# is more accurate than func_trace_sed, but it only works with +# autoconf >= 2.69. +if echo "AC_PREREQ([2.69])" \ + | "$AUTOM4TE" --no-cache --language=Autoconf-without-aclocal-m4 - 2>&1; then + func_trace=func_trace_autoconf +else + func_trace=func_trace_sed +fi + +# Check in which directory config.rpath etc. belong. +auxdir=`"$func_trace" AC_CONFIG_AUX_DIR "$configure_in"` +if test -n "$auxdir"; then + auxdir="$auxdir/" +fi + +# Check in which directory gettext.m4 etc. belong. +macrodirs=`"$func_trace" AC_CONFIG_MACRO_DIR_TRACE "$configure_in"` +if test -z "$macrodirs"; then + macrodirs=`"$func_trace" AC_CONFIG_MACRO_DIR "$configure_in"` +fi +for arg in $macrodirs; do + m4dir="$arg" + break +done + +# For simplicity we change to the gettext source directory. +cd "$gettext_datadir" || + func_fatal_error "gettext source directory '${gettext_datadir}' doesn't exist" + +# Variables which keep track what has been modified. +added_directories= +removed_directory= +added_extradist= +added_acoutput= +removed_acoutput=" intl/intlh.inst" + +# Variable: +# - please accumulates instructions for the user. +please= + +# Variable: +# - date current date, for use in ChangeLog entries. +date=`date +%Y-%m-%d` + +# func_copy from to +# copies a file. +# 'from' is a relative pathname, relative to the current directory. +# 'to' is a relative pathname, relative to $srcdir. +func_copy () +{ + if $doit; then + rm -f "$srcdir/$2" + echo "Copying file $2" + cp "$1" "$srcdir/$2" + else + echo "Copy file $2" + fi +} + +# func_linkorcopy from absfrom to +# links or copies a file. +# 'from' is a relative pathname, relative to the current directory. +# 'absfrom' is the corresponding absolute pathname. +# 'to' is a relative pathname, relative to $srcdir. +func_linkorcopy () +{ + if $doit; then + rm -f "$srcdir/$3" + ($try_ln_s && ln -s "$2" "$srcdir/$3" && echo "Symlinking file $3") 2>/dev/null || + { echo "Copying file $3"; cp "$1" "$srcdir/$3"; } + else + if $try_ln_s; then + echo "Symlink file $3" + else + echo "Copy file $3" + fi + fi +} + +# func_backup to +# makes a backup of a file that is about to be overwritten or replaced. +# 'to' is a relative pathname, relative to $srcdir. +func_backup () +{ + if $doit; then + if test -f "$srcdir/$1"; then + rm -f "$srcdir/$1~" + cp -p "$srcdir/$1" "$srcdir/$1~" + fi + fi +} + +# func_remove to +# removes a file. +# 'to' is a relative pathname, relative to $srcdir. +func_remove () +{ + if $doit; then + echo "Removing $1" + rm -f "$srcdir/$1" + else + echo "Remove $1" + fi +} + +# func_ChangeLog_init +# func_ChangeLog_add_entry line +# func_ChangeLog_finish +# manage the ChangeLog file, relative to $srcdir. +func_ChangeLog_init () +{ + modified_ChangeLog= +} +func_ChangeLog_add_entry () +{ + if $doit; then + if test -z "$modified_ChangeLog"; then + echo "$date gettextize <bug-gnu-gettext@gnu.org>" > "$srcdir/ChangeLog.tmp" + echo >> "$srcdir/ChangeLog.tmp" + modified_ChangeLog=yes + fi + echo "$1" >> "$srcdir/ChangeLog.tmp" + else + modified_ChangeLog=yes + fi +} +func_ChangeLog_finish () +{ + if test -n "$modified_ChangeLog"; then + if $doit; then + echo >> "$srcdir/ChangeLog.tmp" + if test -f "$srcdir/ChangeLog"; then + echo "Adding an entry to ChangeLog (backup is in ChangeLog~)" + cat "$srcdir/ChangeLog" >> "$srcdir/ChangeLog.tmp" + rm -f "$srcdir/ChangeLog~" + cp -p "$srcdir/ChangeLog" "$srcdir/ChangeLog~" + else + echo "Creating ChangeLog" + fi + cp "$srcdir/ChangeLog.tmp" "$srcdir/ChangeLog" + rm -f "$srcdir/ChangeLog.tmp" + else + if test -f "$srcdir/ChangeLog"; then + echo "Add an entry to ChangeLog" + else + echo "Create ChangeLog" + fi + fi + fi +} + +# func_poChangeLog_init +# func_poChangeLog_add_entry line +# func_poChangeLog_finish +# manage the $podir/ChangeLog file, relative to $srcdir. +func_poChangeLog_init () +{ + modified_poChangeLog= +} +func_poChangeLog_add_entry () +{ + if $doit; then + if test -z "$modified_poChangeLog"; then + echo "$date gettextize <bug-gnu-gettext@gnu.org>" > "$srcdir/$podir/ChangeLog.tmp" + echo >> "$srcdir/$podir/ChangeLog.tmp" + modified_poChangeLog=yes + fi + echo "$1" >> "$srcdir/$podir/ChangeLog.tmp" + else + modified_poChangeLog=yes + fi +} +func_poChangeLog_finish () +{ + if test -n "$modified_poChangeLog"; then + if $doit; then + echo >> "$srcdir/$podir/ChangeLog.tmp" + if test -f "$srcdir/$podir/ChangeLog"; then + echo "Adding an entry to $podir/ChangeLog (backup is in $podir/ChangeLog~)" + cat "$srcdir/$podir/ChangeLog" >> "$srcdir/$podir/ChangeLog.tmp" + rm -f "$srcdir/$podir/ChangeLog~" + cp -p "$srcdir/$podir/ChangeLog" "$srcdir/$podir/ChangeLog~" + else + echo "Creating $podir/ChangeLog" + fi + cp "$srcdir/$podir/ChangeLog.tmp" "$srcdir/$podir/ChangeLog" + rm -f "$srcdir/$podir/ChangeLog.tmp" + else + if test -f "$srcdir/$podir/ChangeLog"; then + echo "Add an entry to $podir/ChangeLog" + else + echo "Create $podir/ChangeLog" + fi + fi + fi +} + +# func_m4ChangeLog_init +# func_m4ChangeLog_add_entry line +# func_m4ChangeLog_finish +# manage the $m4dir/ChangeLog file, relative to $srcdir. +func_m4ChangeLog_init () +{ + if test -n "$using_m4ChangeLog"; then + modified_m4ChangeLog= + created_m4ChangeLog= + fi +} +func_m4ChangeLog_add_entry () +{ + if test -n "$using_m4ChangeLog"; then + if $doit; then + if test -z "$modified_m4ChangeLog"; then + echo "$date gettextize <bug-gnu-gettext@gnu.org>" > "$srcdir/$m4dir/ChangeLog.tmp" + echo >> "$srcdir/$m4dir/ChangeLog.tmp" + modified_m4ChangeLog=yes + fi + echo "$1" >> "$srcdir/$m4dir/ChangeLog.tmp" + else + modified_m4ChangeLog=yes + fi + else + line="$1" + line=`echo "$line" | sed -e "s%^ \\* % * $m4dir/%"` + func_ChangeLog_add_entry "$line" + fi +} +func_m4ChangeLog_finish () +{ + if test -n "$using_m4ChangeLog"; then + if test -n "$modified_m4ChangeLog"; then + if $doit; then + echo >> "$srcdir/$m4dir/ChangeLog.tmp" + if test -f "$srcdir/$m4dir/ChangeLog"; then + echo "Adding an entry to $m4dir/ChangeLog (backup is in $m4dir/ChangeLog~)" + cat "$srcdir/$m4dir/ChangeLog" >> "$srcdir/$m4dir/ChangeLog.tmp" + rm -f "$srcdir/$m4dir/ChangeLog~" + cp -p "$srcdir/$m4dir/ChangeLog" "$srcdir/$m4dir/ChangeLog~" + else + echo "Creating $m4dir/ChangeLog" + created_m4ChangeLog=yes + fi + cp "$srcdir/$m4dir/ChangeLog.tmp" "$srcdir/$m4dir/ChangeLog" + rm -f "$srcdir/$m4dir/ChangeLog.tmp" + else + if test -f "$srcdir/$m4dir/ChangeLog"; then + echo "Add an entry to $m4dir/ChangeLog" + else + echo "Create $m4dir/ChangeLog" + created_m4ChangeLog=yes + fi + fi + fi + fi +} +using_m4ChangeLog=yes + +if test ! -f "$srcdir/intl/Makefile.in" && test -n "$intldir"; then + added_acoutput="$added_acoutput intl/Makefile" +fi +if test -f "$srcdir/intl/Makefile.in" && test -z "$intldir"; then + removed_acoutput="$removed_acoutput intl/Makefile" +fi +if test -d "$srcdir/intl"; then + # Remove everything inside intl except for RCS and CVS subdirs and invisible + # files. + if $doit; then + echo "Wiping out intl/ subdirectory" + (cd "$srcdir/intl" && + for f in *; do + if test CVS != "$f" && test RCS != "$f"; then + rm -rf "$f" + fi + done) + else + echo "Wipe out intl/ subdirectory" + fi + if test -z "$intldir"; then + removed_directory=intl + fi +else + if test -n "$intldir"; then + if $doit; then + echo "Creating intl/ subdirectory" + mkdir "$srcdir/intl" || func_fatal_error "failed to create intl/ subdirectory" + else + echo "Create intl/ subdirectory" + fi + added_directories="$added_directories intl" + fi +fi + +$do_changelog && func_ChangeLog_init + +for podir in $podirs; do + test -d "$srcdir/$podir" || { + if $doit; then + echo "Creating $podir/ subdirectory" + mkdir "$srcdir/$podir" || func_fatal_error "failed to create $podir/ subdirectory" + else + echo "Create $podir/ subdirectory" + fi + added_directories="$added_directories $podir" + } +done + +# Create the directory for config.rpath, if needed. +# This is for consistency with autoreconf and automake. +# Note that $auxdir is either empty or ends in a slash. +test -d "$srcdir/$auxdir" || { + if $doit; then + echo "Creating $auxdir subdirectory" + mkdir "$srcdir/$auxdir" || func_fatal_error "failed to create $auxdir subdirectory" + else + echo "Create $auxdir subdirectory" + fi +} + +# Now copy all files. Take care for the destination directories. +for file in *; do + case $file in + ABOUT-NLS) + func_linkorcopy $file "$gettext_datadir/$file" $file + ;; + config.rpath) + if test -f "$srcdir/$auxdir$file"; then + : + else + added_extradist="$added_extradist $auxdir$file" + fi + func_linkorcopy $file "$gettext_datadir/$file" "$auxdir$file" + ;; + esac +done + +# Copy files to intl/ subdirectory. +if test -n "$intldir"; then + cd intl + for file in *; do + if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then + if test $file != plural.c; then + func_linkorcopy $file "$gettext_datadir/intl/$file" intl/$file + else + # plural.c is a generated file; it must be copied and touched. + func_copy $file intl/$file + if $doit; then + (sleep 2; touch "$srcdir/intl/$file") & + fi + fi + fi + done + cd .. +else + echo "Not copying intl/ directory." + # Tell the user what to put into configure.ac, if it is not already there. + external= + # Need to use func_trace_sed instead of $func_trace, since + # AM_GNU_GETTEXT is not a standard Autoconf trace. + xargs=`func_trace_sed AM_GNU_GETTEXT "$srcdir/$configure_in"` + save_IFS="$IFS"; IFS=: + for arg in $xargs; do + if test 'external' = "$arg"; then + external=yes + break + fi + done + IFS="$save_IFS" + if test -z "$external"; then + please="$please +Please use AM_GNU_GETTEXT([external]) in order to cause autoconfiguration +to look for an external libintl. +" + fi +fi + +# Copy files to po/ subdirectory. +cd po +for podir in $podirs; do + $do_changelog && func_poChangeLog_init + for file in Makefile.in.in; do + same=no + if test -f "$srcdir/$podir/$file"; then + if cmp -s $file "$srcdir/$podir/$file"; then + same=yes + fi + else + added_acoutput="$added_acoutput $podir/Makefile.in" + fi + if $do_changelog && test $same = no; then + if test -f "$srcdir/$podir/$file"; then + func_poChangeLog_add_entry " * $file: Upgrade to gettext-${version}." + else + func_poChangeLog_add_entry " * $file: New file, from gettext-${version}." + fi + fi + func_backup "$podir/$file" + func_linkorcopy $file "$gettext_datadir/po/$file" "$podir/$file" + done + for file in *; do + case $file in + Makefile.in.in) + # Already handled above. + ;; + Makevars.template) + func_linkorcopy Makevars.template "$gettext_datadir/po/Makevars.template" "$podir/Makevars.template" + if test -f "$srcdir/po/Makevars"; then + LC_ALL=C sed -n -e 's/[ ]*\([A-Za-z0-9_]*\)[ ]*=.*/\1/p' < "$srcdir/$podir/Makevars" | LC_ALL=C sort > "$srcdir/$podir/Makevars.tmp1" + LC_ALL=C sed -n -e 's/[ ]*\([A-Za-z0-9_]*\)[ ]*=.*/\1/p' < "$srcdir/$podir/Makevars.template" | LC_ALL=C sort > "$srcdir/$podir/Makevars.tmp2" + missingvars=`LC_ALL=C comm -13 "$srcdir/$podir/Makevars.tmp1" "$srcdir/$podir/Makevars.tmp2"` + rm -f "$srcdir/$podir/Makevars.tmp1" "$srcdir/$podir/Makevars.tmp2" + if test -n "$missingvars"; then + please="$please +Please update $podir/Makevars so that it defines all the variables mentioned +in $podir/Makevars.template. +You can then remove $podir/Makevars.template. +" + fi + else + please="$please +Please create $podir/Makevars from the template in $podir/Makevars.template. +You can then remove $podir/Makevars.template. +" + fi + ;; + *) + same=no + if test -f "$srcdir/$podir/$file"; then + if cmp -s $file "$srcdir/$podir/$file"; then + same=yes + fi + fi + if $do_changelog && test $same = no; then + if test -f "$srcdir/$podir/$file"; then + func_poChangeLog_add_entry " * $file: Upgrade to gettext-${version}." + else + func_poChangeLog_add_entry " * $file: New file, from gettext-${version}." + fi + fi + func_backup "$podir/$file" + func_linkorcopy $file "$gettext_datadir/po/$file" "$podir/$file" + ;; + esac + done + if test -f "$srcdir/$podir/cat-id-tbl.c"; then + func_remove "$podir/cat-id-tbl.c" + $do_changelog && func_poChangeLog_add_entry " * cat-id-tbl.c: Remove file." + fi + if test -f "$srcdir/$podir/stamp-cat-id"; then + func_remove "$podir/stamp-cat-id" + $do_changelog && func_poChangeLog_add_entry " * stamp-cat-id: Remove file." + fi + if test ! -f "$srcdir/$podir/POTFILES.in"; then + if $doit; then + echo "Creating initial $podir/POTFILES.in" + echo '# List of source files which contain translatable strings.' > "$srcdir/$podir/POTFILES.in" + else + echo "Create initial $podir/POTFILES.in" + fi + $do_changelog && func_poChangeLog_add_entry " * POTFILES.in: New file." + please="$please +Please fill $podir/POTFILES.in as described in the documentation. +" + fi + $do_changelog && func_poChangeLog_finish +done + +# Determine whether we can assume automake 1.9 or newer. +have_automake19= +if (aclocal --version) >/dev/null 2>/dev/null; then + aclocal_version=`aclocal --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'` + case $aclocal_version in + 1.9* | 1.[1-9][0-9]* | [2-9]*) have_automake19=yes ;; + esac +fi + +m4filelist='gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 + po.m4 progtest.m4' +# With aclocal versions < 1.9 we need all m4 files, otherwise "aclocal -I m4" +# might give an error. (aclocal < 1.9 didn't know which macros are really +# needed, it looked which macros are potentially needed.) +min_automake_version=1.9 +if test -n "$intldir" || test -z "$have_automake19"; then + # Add intldir.m4, intl.m4 and its dependencies. + m4filelist=$m4filelist' codeset.m4 fcntl-o.m4 glibc2.m4 glibc21.m4 intdiv0.m4 + intl.m4 intldir.m4 intlmacosx.m4 intmax.m4 inttypes_h.m4 inttypes-pri.m4 + lcmessage.m4 lock.m4 longlong.m4 printf-posix.m4 size_max.m4 stdint_h.m4 + threadlib.m4 uintmax_t.m4 visibility.m4 wchar_t.m4 wint_t.m4 xsize.m4' + min_automake_version=1.8 +fi + +# All sorts of bugs could occur if the configure file was remade with the wrong +# version of gettext.m4 et al. (because then the configure and the po/Makefile.in.in +# don't fit together). It is therefore important that the package carries the +# right versions of gettext.m4 et al. with it. +if test -f "$srcdir/Makefile.am"; then + # A package using automake. + + # Determine whether it's using automake 1.8 or newer. + have_automake18= + if (aclocal --version) >/dev/null 2>/dev/null; then + aclocal_version=`aclocal --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'` + case $aclocal_version in + 1.[8-9]* | 1.[1-9][0-9]* | [2-9]*) have_automake18=yes ;; + esac + fi + + if test -z "$m4dir"; then + # Extract the macro directory name from Makefile.am. + aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' "$srcdir/Makefile.am" | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'` + m4dir_is_next= + for arg in $aclocal_amflags; do + if test -n "$m4dir_is_next"; then + # Ignore absolute directory pathnames, like /usr/local/share/aclocal. + case "$arg" in + /*) ;; + *) + test -z "$m4dir" || m4dir="$arg" + macrodirs="$macrodirs $arg" + ;; + esac + m4dir_is_next= + else + if test "X$arg" = "X-I"; then + m4dir_is_next=yes + else + m4dir_is_next= + fi + fi + done + for arg in $macrodirs; do + m4dir="$arg" + break + done + fi + + if test -z "$m4dir"; then + m4dir=m4 + m4dir_defaulted=yes + fi + + # Decide whether to use $m4dir/ChangeLog, or to use ChangeLog instead. + if test -d "$srcdir/$m4dir" && test -f "$srcdir/ChangeLog" && test ! -f "$srcdir/$m4dir/ChangeLog"; then + # The programmer has no $m4dir/ChangeLog so far. Don't introduce one. + using_m4ChangeLog= + fi + + # Update the *.m4 files and the corresponding Makefile.am. + $do_changelog && func_m4ChangeLog_init + added_m4dir= + added_m4files= + if test -d "$srcdir/$m4dir"; then + : + else + if $doit; then + echo "Creating directory $m4dir" + mkdir "$srcdir/$m4dir" + else + echo "Create directory $m4dir" + fi + added_m4dir=yes + fi + for file in $m4filelist; do + same=no + if test -f "$srcdir/$m4dir/$file"; then + if cmp -s "@datadir@/aclocal/$file" "$srcdir/$m4dir/$file"; then + same=yes + fi + else + added_m4files="$added_m4files $file" + fi + if $do_changelog && test $same = no; then + if test -f "$srcdir/$m4dir/$file"; then + func_m4ChangeLog_add_entry " * $file: Upgrade to gettext-${version}." + else + func_m4ChangeLog_add_entry " * $file: New file, from gettext-${version}." + fi + fi + func_backup "$m4dir/$file" + func_linkorcopy "@datadir@/aclocal/$file" "@datadir@/aclocal/$file" "$m4dir/$file" + done + missing_m4Makefileam= + if test -n "$added_m4files"; then + if test -f "$srcdir/$m4dir/Makefile.am"; then + if $doit; then + echo "Updating EXTRA_DIST in $m4dir/Makefile.am (backup is in $m4dir/Makefile.am~)" + func_backup "$m4dir/Makefile.am" + rm -f "$srcdir/$m4dir/Makefile.am" + if grep '^EXTRA_DIST[ ]*=' "$srcdir/$m4dir/Makefile.am~" > /dev/null; then + sed -e "s%^\(EXTRA_DIST[ ]*=\) \\?%\\1$added_m4files %" < "$srcdir/$m4dir/Makefile.am~" > "$srcdir/$m4dir/Makefile.am" + $do_changelog && func_m4ChangeLog_add_entry " * Makefile.am (EXTRA_DIST): Add the new files." + else + (cat "$srcdir/$m4dir/Makefile.am~"; echo; echo "EXTRA_DIST =$added_m4files") > "$srcdir/$m4dir/Makefile.am" + $do_changelog && func_m4ChangeLog_add_entry " * Makefile.am (EXTRA_DIST): New variable." + fi + else + echo "Update EXTRA_DIST in $m4dir/Makefile.am" + $do_changelog && func_m4ChangeLog_add_entry " * Makefile.am (EXTRA_DIST)." + fi + else + # $m4dir/Makefile.am is not needed any more when aclocal 1.8 or newer + # is used. + if test -z "$have_automake18"; then + if $doit; then + echo "Creating $m4dir/Makefile.am" + echo "EXTRA_DIST =$added_m4files" > "$srcdir/$m4dir/Makefile.am" + else + echo "Create $m4dir/Makefile.am" + fi + $do_changelog && func_m4ChangeLog_add_entry " * Makefile.am: New file." + added_acoutput="$added_acoutput $m4dir/Makefile" + else + missing_m4Makefileam=yes + fi + fi + fi + if test -n "$added_m4dir" && test -z "$missing_m4Makefileam"; then + added_directories="$added_directories $m4dir" + fi + $do_changelog && func_m4ChangeLog_finish + # automake will arrange for $m4dir/ChangeLog to be distributed if a + # $m4dir/Makefile.am exists. If not, we need to add it to Makefile.am's + # EXTRA_DIST explicitly. + if test -n "$created_m4ChangeLog" && test -n "$missing_m4Makefileam"; then + added_extradist="$added_extradist $m4dir/ChangeLog" + fi + + # Update the top-level Makefile.am. + modified_Makefile_am= + # func_modify_Makefile_am changelog_comment + # assumes a modified copy of $srcdir/Makefile.am in $srcdir/Makefile.am.tmp + # and replaces the original Makefile.am file with the modified one if + # the two files differ. Then it removes the modified copy. + func_modify_Makefile_am () + { + if cmp -s "$srcdir/Makefile.am" "$srcdir/Makefile.am.tmp"; then + : + else + if test -z "$modified_Makefile_am"; then + if $doit; then + echo "Updating Makefile.am (backup is in Makefile.am~)" + func_backup Makefile.am + else + echo "Update Makefile.am" + fi + fi + if $doit; then + rm -f "$srcdir/Makefile.am" + cp "$srcdir/Makefile.am.tmp" "$srcdir/Makefile.am" + fi + if $do_changelog; then + if test -z "$modified_Makefile_am"; then + func_ChangeLog_add_entry " * Makefile.am $1" + else + func_ChangeLog_add_entry " $1" + fi + fi + modified_Makefile_am=yes + fi + rm -f "$srcdir/Makefile.am.tmp" + } + + if test -n "$added_directories"; then + if grep '^SUBDIRS[ ]*=' "$srcdir/Makefile.am" > /dev/null; then + sed -e "s%^\(SUBDIRS[ ]*=\) \\?%\\1$added_directories %" < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + added_directories_pretty=`echo $added_directories | sed -e 's/ /, /g'` + func_modify_Makefile_am "(SUBDIRS): Add $added_directories_pretty." + else + (cat "$srcdir/Makefile.am"; echo; echo "SUBDIRS =$added_directories") > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(SUBDIRS): New variable." + fi + fi + if test -n "$removed_directory"; then + sed -e '/^SUBDIRS[ ]*=/ { + :a + s%\([ ]\)'"$removed_directory"'[ ]%\1% + s%[ ]'"$removed_directory"'$%% + tb + :b + s%\\$%\\% + tc + bd + :c + n + ba + :d + }' < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(SUBDIRS): Remove $removed_directory." + fi + if test -n "$added_directories"; then + if grep '^DIST_SUBDIRS[ ]*=' "$srcdir/Makefile.am" > /dev/null; then + sed -e "s%^\(DIST_SUBDIRS[ ]*=\) \\?%\\1$added_directories %" < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + added_directories_pretty=`echo $added_directories | sed -e 's/ /, /g'` + func_modify_Makefile_am "(DIST_SUBDIRS): Add $added_directories_pretty." + fi + fi + if test -n "$removed_directory"; then + sed -e '/^DIST_SUBDIRS[ ]*=/ { + :a + s%\([ ]\)'"$removed_directory"'[ ]%\1% + s%[ ]'"$removed_directory"'$%% + tb + :b + s%\\$%\\% + tc + bd + :c + n + ba + :d + }' < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(DIST_SUBDIRS): Remove $removed_directory." + fi + if test -n "$m4dir_defaulted"; then + if grep '^ACLOCAL_AMFLAGS[ ]*=' "$srcdir/Makefile.am" > /dev/null; then + sed -e "s%^\(ACLOCAL_AMFLAGS[ ]*=\) \\?%\\1 -I $m4dir %" < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(ACLOCAL_AMFLAGS): Add -I $m4dir." + else + (cat "$srcdir/Makefile.am"; echo; echo "ACLOCAL_AMFLAGS = -I $m4dir") > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(ACLOCAL_AMFLAGS): New variable." + fi + # Also update Makefile.in and, if existent, Makefile. Otherwise they + # would take into account the new flags only after a few rounds of + # "./configure", "make", "touch configure.in", "make distclean". + if $doit; then + for file in Makefile.in Makefile; do + if test -f "$srcdir/$file"; then + func_backup $file + rm -f "$srcdir/$file" + sed -e "s%(ACLOCAL)%(ACLOCAL) -I $m4dir%" < "$srcdir/$file~" > "$srcdir/$file" + fi + done + fi + fi + if test -n "$added_extradist"; then + if grep '^EXTRA_DIST[ ]*=' "$srcdir/Makefile.am" > /dev/null; then + sed -e "s%^\(EXTRA_DIST[ ]*=\)%\\1$added_extradist %" < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp" + added_extradist_pretty=`echo $added_extradist | sed -e 's/ /, /g'` + func_modify_Makefile_am "(EXTRA_DIST): Add $added_extradist_pretty." + else + (cat "$srcdir/Makefile.am"; echo; echo "EXTRA_DIST =$added_extradist") > "$srcdir/Makefile.am.tmp" + func_modify_Makefile_am "(EXTRA_DIST): New variable." + fi + fi + # Extract the aclocal options name from Makefile.am. + aclocal_options= + for arg in $macrodirs; do + aclocal_options="$aclocal_options -I $arg" + done + please="$please +Please run 'aclocal$aclocal_options' to regenerate the aclocal.m4 file. +You need aclocal from GNU automake $min_automake_version (or newer) to do this. +Then run 'autoconf' to regenerate the configure file. +" + + # Also create $m4dir/Makefile.in from $m4dir/Makefile.am, because automake + # doesn't do it by itself. + if $doit; then + case "$added_acoutput" in + *" $m4dir/Makefile") + (cd "$srcdir" && automake "$m4dir/Makefile") 2>/dev/null || + please="$please +Please run 'automake $m4dir/Makefile' to create $m4dir/Makefile.in +" + ;; + esac + fi +else + please="$please +Please add the files +$m4filelist +from the @datadir@/aclocal directory to your aclocal.m4 file. +" +fi + +modified_configure_in= +# func_modify_configure_in changelog_comment +# assumes a modified copy of $srcdir/$configure_in in $srcdir/$configure_in.tmp +# and replaces the original configure.in/ac file with the modified one if +# the two files differ. Then it removes the modified copy. +func_modify_configure_in () +{ + if cmp -s "$srcdir/$configure_in" "$srcdir/$configure_in.tmp"; then + : + else + if test -z "$modified_configure_in"; then + if $doit; then + echo "Updating $configure_in (backup is in $configure_in~)" + func_backup $configure_in + else + echo "Update $configure_in" + fi + fi + if $doit; then + rm -f "$srcdir/$configure_in" + cp "$srcdir/$configure_in.tmp" "$srcdir/$configure_in" + fi + if $do_changelog; then + if test -z "$modified_configure_in"; then + func_ChangeLog_add_entry " * $configure_in $1" + else + func_ChangeLog_add_entry " $1" + fi + fi + modified_configure_in=yes + fi + rm -f "$srcdir/$configure_in.tmp" +} + +if test -n "$added_acoutput"; then + if grep '^AC_CONFIG_FILES(' "$srcdir/$configure_in" > /dev/null; then + sedprog=' +ta +b +:a +n +ba' + sed -e "s%^\\(AC_CONFIG_FILES([^])\\,]*\\)%\\1$added_acoutput%$sedprog" < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" + added_acoutput_pretty=`echo $added_acoutput | sed -e 's/ /, /g'` + func_modify_configure_in "(AC_CONFIG_FILES): Add $added_acoutput_pretty." + else + if grep '^AC_OUTPUT(' "$srcdir/$configure_in" > /dev/null; then + sed -e "s%^\\(AC_OUTPUT([^])\\,]*\\)%\\1$added_acoutput%" < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" + added_acoutput_pretty=`echo $added_acoutput | sed -e 's/ /, /g'` + func_modify_configure_in "(AC_OUTPUT): Add $added_acoutput_pretty." + else + please="$please +Please add$added_acoutput to the AC_OUTPUT or AC_CONFIG_FILES invocation in the $configure_in file. +" + fi + fi +fi +if test -n "$removed_acoutput"; then + for file in $removed_acoutput; do + tag= + sedprog='{ + s%\([[ ]\)'"$file"'[ ]%\1% + s%\([[ ]\)'"$file"'\([]),]\)%\1\2% + s%[[ ]'"$file"'$%% + :a + tb + :b + s%\\$%\\% + tc + bd + :c + n + s%\([ ]\)'"$file"'[ ]%\1% + s%\([ ]\)'"$file"'\([]),]\)%\1\2% + s%[ ]'"$file"'$%% + ba + :d + }' + sed -e '/^AC_CONFIG_FILES(/'"$sedprog" < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" + if cmp -s "$srcdir/$configure_in" "$srcdir/$configure_in.tmp"; then + sed -e '/^AC_OUTPUT(/'"$sedprog" < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" + if cmp -s "$srcdir/$configure_in" "$srcdir/$configure_in.tmp"; then + : + else + tag=AC_OUTPUT + fi + else + tag=AC_CONFIG_FILES + fi + if test -n "$tag"; then + func_modify_configure_in "($tag): Remove $file." + else + rm -f "$srcdir/$configure_in.tmp" + if test "$file" != intl/intlh.inst; then + please="$please +Please remove $file from the AC_OUTPUT or AC_CONFIG_FILES invocation +in the $configure_in file. +" + fi + fi + done +fi +sed -e 's%sed -e "/POTFILES =/r po/POTFILES" po/Makefile\.in > po/Makefile *;* *%%' < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" +func_modify_configure_in "(AC_OUTPUT): Remove command that created po/Makefile." +sed -e '/^\(dnl \|\)AC_LINK_FILES(\$nls_cv_header_libgt, \$nls_cv_header_intl)$/d' < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" +func_modify_configure_in "(AC_LINK_FILES): Remove invocation." +sed -e 's/^AM_GNU_GETTEXT_VERSION([^()]*)/AM_GNU_GETTEXT_VERSION(['"$version"'])/' < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" +func_modify_configure_in "(AM_GNU_GETTEXT_VERSION): Bump to $version." +$do_changelog && func_ChangeLog_finish + +# Recommend replacement for deprecated Makefile variables. +use_libtool=`cat "$srcdir/$configure_in" | grep '^A[CM]_PROG_LIBTOOL'` +for file in `(cd "$srcdir"; find . -name Makefile.am -print; find . -name Makefile.in -print) | sed -e 's,^\./,,'`; do + if test -f "$srcdir/$file"; then + if test `echo "$file" | sed -e 's,^.*/,,'` = Makefile.in && grep automake "$srcdir/$file" >/dev/null 2>&1; then + continue; + fi + # INTLLIBS is deprecated because it doesn't distinguish the two + # cases: with libtool, without libtool. + if grep '@''INTLLIBS''@' "$srcdir/$file" >/dev/null 2>&1; then + if test -n "$use_libtool"; then + please="$please +Please change $file to use @""LTLIBINTL""@ or @""LIBINTL""@ instead of +@""INTLLIBS""@. Which one, depends whether it is used with libtool or not. +@""INTLLIBS""@ will go away. +" + else + please="$please +Please change $file to use @""LIBINTL""@ instead of @""INTLLIBS""@. +@""INTLLIBS""@ will go away. +" + fi + fi + # DATADIRNAME is deprecated because we install only .gmo files nowadays, + # which can be stored in the platform independent $prefix/share hierarchy. + if grep '@''DATADIRNAME''@' "$srcdir/$file" >/dev/null 2>&1; then + please="$please +Please change $file to use the constant string \"share\" instead of +@""DATADIRNAME""@. @""DATADIRNAME""@ will go away. +" + fi + # INSTOBJEXT is deprecated because we install only .gmo files nowadays, + # no catgets .cat catalogs. + if grep '@''INSTOBJEXT''@' "$srcdir/$file" >/dev/null 2>&1; then + please="$please +Please change $file to use the constant string \".mo\" instead of +@""INSTOBJEXT""@. @""INSTOBJEXT""@ will go away. +" + fi + # GENCAT is deprecated because we install no catgets catalogs anymore. + if grep '@''GENCAT''@' "$srcdir/$file" >/dev/null 2>&1; then + please="$please +Please change $file to use the constant string \"gencat\" instead of +@""GENCAT""@. @""GENCAT""@ will go away. Maybe you don't even need it any more? +" + fi + # POSUB is deprecated because it causes "./configure --disable-nls", "make", + # "make dist" to create a buggy tarfile. + if grep '@''POSUB''@' "$srcdir/$file" >/dev/null 2>&1; then + please="$please +Please change $file to use the constant string \"po\" instead of +@""POSUB""@. @""POSUB""@ will go away. +" + fi + fi +done + +# Recommend replacement for deprecated configure variables. +if grep '\$nls_cv_header_' "$srcdir/$configure_in" >/dev/null 2>&1; then + please="$please +Please stop using \$nls_cv_header_intl or \$nls_cv_header_libgt in the +$configure_in file. Both will go away. Use <libintl.h> or \"gettext.h\" instead. +" +fi + +# Recommend fetching config.guess and config.sub. +if test -f "$srcdir/$auxdir"config.guess && test -f "$srcdir/$auxdir"config.sub; then + : +else + please="$please +You will also need config.guess and config.sub, which you can get from the CVS +of the 'config' project at http://savannah.gnu.org/. The commands to fetch them +are +\$ wget 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess' +\$ wget 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub' +" +fi + +if $doit; then + echo "$please" + echo "You might also want to copy the convenience header file gettext.h" + echo "from the $gettext_datadir directory into your package." + echo "It is a wrapper around <libintl.h> that implements the configure --disable-nls" + echo "option." + echo + count=`echo "$please" | grep '^$' | wc -l` + count=`echo "$count" | sed -e 's/[ ]//g'` + case "$count" in + 1) count="paragraph";; + 2) count="two paragraphs";; + 3) count="three paragraphs";; + 4) count="four paragraphs";; + 5) count="five paragraphs";; + *) count="$count paragraphs";; + esac + echo "Press Return to acknowledge the previous $count." + # Read from /dev/tty, not stdin, so that gettextize cannot be abused by + # non-interactive tools. + read dummy < /dev/tty +fi + +exit 0 diff --git a/gettext-tools/misc/po-compat.el b/gettext-tools/misc/po-compat.el new file mode 100644 index 0000000..f55fda2 --- /dev/null +++ b/gettext-tools/misc/po-compat.el @@ -0,0 +1,263 @@ +;;; po-compat.el --- basic support of PO translation files -*- coding: latin-1; -*- + +;; Copyright (C) 1995-1999, 2000-2002, 2010 Free Software Foundation, Inc. + +;; Authors: François Pinard <pinard@iro.umontreal.ca>, +;; Greg McGary <gkm@magilla.cichlid.com>, +;; Bruno Haible <bruno@clisp.org>. +;; Keywords: i18n, files + +;; This file is part of GNU gettext. + +;; GNU gettext is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU gettext 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 Emacs; see the file COPYING. If not, see +;; <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Emacs 21.2 and newer already contain this file, under the name po.el, +;; and without portability hassles. + +;; This package makes sure visiting PO files decodes them correctly, +;; according to the Charset= header in the PO file. For more support +;; for editing PO files, see po-mode.el. + +;;; Code: + +;;; Emacs portability matters. + +;; Identify which Emacs variety is being used. +;; This file supports: +;; - XEmacs (version 19 and above) -> po-XEMACS = t, +;; - GNU Emacs (version 20 and above) -> po-EMACS20 = t, +;; - GNU Emacs (version 19) -> no flag. +(eval-and-compile + (cond ((string-match "XEmacs\\|Lucid" emacs-version) + (setq po-EMACS20 nil po-XEMACS t)) + ((and (string-lessp "19" emacs-version) (featurep 'faces)) + (setq po-EMACS20 t po-XEMACS nil)) + (t (setq po-EMACS20 nil po-XEMACS nil)))) + +;; Handle missing 'with-temp-buffer' function. +(eval-and-compile + (if (fboundp 'with-temp-buffer) + (fset 'po-with-temp-buffer (symbol-function 'with-temp-buffer)) + + (defmacro po-with-temp-buffer (&rest forms) + "Create a temporary buffer, and evaluate FORMS there like 'progn'." + (let ((curr-buffer (make-symbol "curr-buffer")) + (temp-buffer (make-symbol "temp-buffer"))) + `(let ((,curr-buffer (current-buffer)) + (,temp-buffer (get-buffer-create + (generate-new-buffer-name " *po-temp*")))) + (unwind-protect + (progn + (set-buffer ,temp-buffer) + ,@forms) + (set-buffer ,curr-buffer) + (and (buffer-name ,temp-buffer) + (kill-buffer ,temp-buffer)))))))) + +(defconst po-content-type-charset-alist + '(; Note: Emacs 21 doesn't support all encodings, thus the missing entries. + ("ASCII" . undecided) + ("ANSI_X3.4-1968" . undecided) + ("US-ASCII" . undecided) + ("ISO-8859-1" . iso-8859-1) + ("ISO_8859-1" . iso-8859-1) + ("ISO-8859-2" . iso-8859-2) + ("ISO_8859-2" . iso-8859-2) + ("ISO-8859-3" . iso-8859-3) + ("ISO_8859-3" . iso-8859-3) + ("ISO-8859-4" . iso-8859-4) + ("ISO_8859-4" . iso-8859-4) + ("ISO-8859-5" . iso-8859-5) + ("ISO_8859-5" . iso-8859-5) + ;("ISO-8859-6" . ??) + ;("ISO_8859-6" . ??) + ("ISO-8859-7" . iso-8859-7) + ("ISO_8859-7" . iso-8859-7) + ("ISO-8859-8" . iso-8859-8) + ("ISO_8859-8" . iso-8859-8) + ("ISO-8859-9" . iso-8859-9) + ("ISO_8859-9" . iso-8859-9) + ;("ISO-8859-13" . ??) + ;("ISO_8859-13" . ??) + ;("ISO-8859-14" . ??) + ;("ISO_8859-14" . ??) + ("ISO-8859-15" . iso-8859-15) ; requires Emacs 21 + ("ISO_8859-15" . iso-8859-15) ; requires Emacs 21 + ("KOI8-R" . koi8-r) + ;("KOI8-U" . ??) + ;("KOI8-T" . ??) + ("CP437" . cp437) ; requires Emacs 20 + ("CP775" . cp775) ; requires Emacs 20 + ("CP850" . cp850) ; requires Emacs 20 + ("CP852" . cp852) ; requires Emacs 20 + ("CP855" . cp855) ; requires Emacs 20 + ;("CP856" . ??) + ("CP857" . cp857) ; requires Emacs 20 + ("CP861" . cp861) ; requires Emacs 20 + ("CP862" . cp862) ; requires Emacs 20 + ("CP864" . cp864) ; requires Emacs 20 + ("CP865" . cp865) ; requires Emacs 20 + ("CP866" . cp866) ; requires Emacs 21 + ("CP869" . cp869) ; requires Emacs 20 + ;("CP874" . ??) + ;("CP922" . ??) + ;("CP932" . ??) + ;("CP943" . ??) + ;("CP949" . ??) + ;("CP950" . ??) + ;("CP1046" . ??) + ;("CP1124" . ??) + ;("CP1129" . ??) + ("CP1250" . cp1250) ; requires Emacs 20 + ("CP1251" . cp1251) ; requires Emacs 20 + ("CP1252" . iso-8859-1) ; approximation + ("CP1253" . cp1253) ; requires Emacs 20 + ("CP1254" . iso-8859-9) ; approximation + ("CP1255" . iso-8859-8) ; approximation + ;("CP1256" . ??) + ("CP1257" . cp1257) ; requires Emacs 20 + ("GB2312" . cn-gb-2312) ; also named 'gb2312' in XEmacs 21 or Emacs 21 + ; also named 'euc-cn' in Emacs 20 or Emacs 21 + ("EUC-JP" . euc-jp) + ("EUC-KR" . euc-kr) + ;("EUC-TW" . ??) + ("BIG5" . big5) + ;("BIG5-HKSCS" . ??) + ;("GBK" . ??) + ;("GB18030" . ??) + ("SHIFT_JIS" . shift_jis) + ;("JOHAB" . ??) + ("TIS-620" . tis-620) ; requires Emacs 20 or Emacs 21 + ("VISCII" . viscii) ; requires Emacs 20 or Emacs 21 + ;("GEORGIAN-PS" . ??) + ("UTF-8" . utf-8) ; requires Mule-UCS in Emacs 20, or Emacs 21 + ) + "How to convert a GNU libc/libiconv canonical charset name as seen in +Content-Type into a Mule coding system.") + +(defun po-find-charset (filename) + "Return PO file charset value." + (interactive) + (let ((charset-regexp + "^\"Content-Type: text/plain;[ \t]*charset=\\(.*\\)\\\\n\"") + (short-read nil)) + ;; Try the first 4096 bytes. In case we cannot find the charset value + ;; within the first 4096 bytes (the PO file might start with a long + ;; comment) try the next 4096 bytes repeatedly until we'll know for sure + ;; we've checked the empty header entry entirely. + (while (not (or short-read (re-search-forward "^msgid" nil t))) + (save-excursion + (goto-char (point-max)) + (let ((pair (insert-file-contents-literally filename nil + (1- (point)) + (1- (+ (point) 4096))))) + (setq short-read (< (nth 1 pair) 4096))))) + (cond ((re-search-forward charset-regexp nil t) (match-string 1)) + (short-read nil) + ;; We've found the first msgid; maybe, only a part of the msgstr + ;; value was loaded. Load the next 1024 bytes; if charset still + ;; isn't available, give up. + (t (save-excursion + (goto-char (point-max)) + (insert-file-contents-literally filename nil + (1- (point)) + (1- (+ (point) 1024)))) + (if (re-search-forward charset-regexp nil t) + (match-string 1)))))) + +(eval-and-compile + (if po-EMACS20 + (defun po-find-file-coding-system-guts (operation filename) + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real." + (and (eq operation 'insert-file-contents) + (file-exists-p filename) + (po-with-temp-buffer + (let* ((coding-system-for-read 'no-conversion) + (charset (or (po-find-charset filename) "ascii")) + (charset-upper (upcase charset)) + (charset-lower (downcase charset)) + (candidate + (cdr (assoc charset-upper po-content-type-charset-alist))) + (try-symbol (or candidate (intern-soft charset-lower))) + (try-string + (if try-symbol (symbol-name try-symbol) charset-lower))) + (list (cond ((and try-symbol (coding-system-p try-symbol)) + try-symbol) + ((and po-EMACS20 + (not (string-lessp "23" emacs-version)) + (string-match "\\`cp[1-9][0-9][0-9]?\\'" + try-string) + (assoc (substring try-string 2) + (cp-supported-codepages))) + (codepage-setup (substring try-string 2)) + (intern try-string)) + (t + 'no-conversion)))))))) + + (if po-XEMACS + (defun po-find-file-coding-system-guts (operation filename) + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real." + (and (eq operation 'insert-file-contents) + (file-exists-p filename) + (po-with-temp-buffer + (let ((coding-system-for-read 'no-conversion)) + (let* ((charset (or (po-find-charset filename) + "ascii")) + (charset-upper (upcase charset)) + (charset-lower (intern (downcase charset)))) + (list (or (cdr (assoc charset-upper + po-content-type-charset-alist)) + (if (memq charset-lower (coding-system-list)) + charset-lower + 'no-conversion))))))))) + + (if po-EMACS20 + (defun po-find-file-coding-system (arg-list) + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real." + (po-find-file-coding-system-guts (car arg-list) (car (cdr arg-list))))) + + (if po-XEMACS + (defun po-find-file-coding-system (operation filename) + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real." + (po-find-file-coding-system-guts operation filename))) + + ) + +(provide 'po-compat) + +;;; Testing this file: + +;; For each emacsimpl in { emacs, xemacs } do +;; For each pofile in { +;; cs.po ; gettext/po/cs.el, charset=ISO-8859-2 +;; cs-modified.po ; gettext/po/cs.el, charset=ISO_8859-2 +;; de.po ; gettext/po/de.el, charset=UTF-8, if $emacsimpl = emacs +;; } do +;; Start $emacsimpl +;; M-x load-file po-compat.el RET +;; C-x C-f $pofile RET +;; Verify charset marker in status line ('2' = ISO-8859-2, 'u' = UTF-8). + +;;; po-compat.el ends here diff --git a/gettext-tools/misc/po-mode.el b/gettext-tools/misc/po-mode.el new file mode 100644 index 0000000..11ce7b1 --- /dev/null +++ b/gettext-tools/misc/po-mode.el @@ -0,0 +1,3575 @@ +;;; po-mode.el -- major mode for GNU gettext PO files + +;; Copyright (C) 1995-1999, 2000-2002, 2005-2008, 2010 Free Software Foundation, Inc. + +;; Authors: François Pinard <pinard@iro.umontreal.ca> +;; Greg McGary <gkm@magilla.cichlid.com> +;; Keywords: i18n gettext +;; Created: 1995 + +;; This file is part of GNU gettext. + +;; This program 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 of the License, or +;; (at your option) any later version. + +;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This package provides the tools meant to help editing PO files, +;; as documented in the GNU gettext user's manual. See this manual +;; for user documentation, which is not repeated here. + +;; To install, merely put this file somewhere GNU Emacs will find it, +;; then add the following lines to your .emacs file: +;; +;; (autoload 'po-mode "po-mode" +;; "Major mode for translators to edit PO files" t) +;; (setq auto-mode-alist (cons '("\\.po\\'\\|\\.po\\." . po-mode) +;; auto-mode-alist)) +;; +;; To use the right coding system automatically under Emacs 20 or newer, +;; also add: +;; +;; (autoload 'po-find-file-coding-system "po-compat") +;; (modify-coding-system-alist 'file "\\.po\\'\\|\\.po\\." +;; 'po-find-file-coding-system) +;; +;; You may also adjust some variables, below, by defining them in your +;; '.emacs' file, either directly or through command 'M-x customize'. + +;; TODO: +;; Plural form editing: +;; - When in edit mode, currently it highlights (in green) the msgid; +;; it should also highlight the msgid_plural string, I would say, since +;; the translator has to look at both. +;; - After the translator finished the translation of msgstr[0], it would +;; be nice if the cursor would automatically move to the beginning of the +;; msgstr[1] line, so that the translator just needs to press RET to edit +;; that. +;; - If msgstr[1] is empty but msgstr[0] is not, it would be ergonomic if the +;; contents of msgstr[0] would be copied. (Not sure if this should happen +;; at the end of the editing msgstr[0] or at the beginning of the editing +;; of msgstr[1].) Reason: These two strings are usually very similar. + +;;; Code: + +(defconst po-mode-version-string "2.23" "\ +Version number of this version of po-mode.el.") + +;;; Emacs portability matters - part I. +;;; Here is the minimum for customization to work. See part II. + +;; Identify which Emacs variety is being used. +;; This file supports: +;; - XEmacs (version 19 and above) -> po-XEMACS = t, +;; - GNU Emacs (version 20 and above) -> po-EMACS20 = t, +;; - GNU Emacs (version 19) -> no flag. +(eval-and-compile + (cond ((string-match "XEmacs\\|Lucid" emacs-version) + (setq po-EMACS20 nil po-XEMACS t)) + ((and (string-lessp "19" emacs-version) (featurep 'faces)) + (setq po-EMACS20 t po-XEMACS nil)) + (t (setq po-EMACS20 nil po-XEMACS nil)))) + +;; Experiment with Emacs LISP message internationalisation. +(eval-and-compile + (or (fboundp 'set-translation-domain) + (defsubst set-translation-domain (string) nil)) + (or (fboundp 'translate-string) + (defsubst translate-string (string) string))) +(defsubst _ (string) (translate-string string)) +(defsubst N_ (string) string) + +;; Handle missing 'customs' package. +(eval-and-compile + (condition-case () + (require 'custom) + (error nil)) + (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) + nil + (defmacro defgroup (&rest args) + nil) + (defmacro defcustom (var value doc &rest args) + `(defvar ,var ,value ,doc)))) + +;;; Customisation. + +(defgroup po nil + "Major mode for editing PO files" + :group 'i18n) + +(defcustom po-auto-edit-with-msgid nil + "*Automatically use msgid when editing untranslated entries." + :type 'boolean + :group 'po) + +(defcustom po-auto-fuzzy-on-edit nil + "*Automatically mark entries fuzzy when being edited." + :type 'boolean + :group 'po) + +(defcustom po-auto-delete-previous-msgid t + "*Automatically delete previous msgid (marked #|) when editing entry. +Value is nil, t, or ask." + :type '(choice (const nil) + (const t) + (const ask)) + :group 'po) + +(defcustom po-auto-select-on-unfuzzy nil + "*Automatically select some new entry while making an entry not fuzzy." + :type 'boolean + :group 'po) + +(defcustom po-auto-update-file-header t + "*Automatically revise headers. Value is nil, t, or ask." + :type '(choice (const nil) + (const t) + (const ask)) + :group 'po) + +(defcustom po-auto-replace-revision-date t + "*Automatically revise date in headers. Value is nil, t, or ask." + :type '(choice (const nil) + (const t) + (const ask)) + :group 'po) + +(defcustom po-default-file-header "\ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid \"\" +msgstr \"\" +\"Project-Id-Version: PACKAGE VERSION\\n\" +\"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n\" +\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\" +\"Language-Team: LANGUAGE <LL@li.org>\\n\" +\"MIME-Version: 1.0\\n\" +\"Content-Type: text/plain; charset=CHARSET\\n\" +\"Content-Transfer-Encoding: 8bit\\n\" +" + "*Default PO file header." + :type 'string + :group 'po) + +(defcustom po-translation-project-address + "robot@translationproject.org" + "*Electronic mail address of the Translation Project. +Typing \\[po-send-mail] (normally bound to `M') the user will send the PO file +to this email address." + :type 'string + :group 'po) + +(defcustom po-translation-project-mail-label "TP-Robot" + "*Subject label when sending the PO file to `po-translation-project-address'." + :type 'string + :group 'po) + +(defcustom po-highlighting (or po-EMACS20 po-XEMACS) + "*Highlight text whenever appropriate, when non-nil. +However, on older Emacses, a yet unexplained highlighting bug causes files +to get mangled." + :type 'boolean + :group 'po) + +(defcustom po-highlight-face 'highlight + "*The face used for PO mode highlighting. For Emacses with overlays. +Possible values are 'highlight', 'modeline', 'secondary-selection', +'region', and 'underline'. +This variable can be set by the user to whatever face they desire. +It's most convenient if the cursor color and highlight color are +slightly different." + :type 'face + :group 'po) + +(defcustom po-team-name-to-code + ;; All possible languages, a complete ISO 639 list, the inverse of + ;; gettext-tools/src/lang-table.c, and a little more. + '(("LANGUAGE" . "LL") + ("(Afan) Oromo" . "om") + ("Abkhazian" . "ab") + ("Achinese" . "ace") + ("Afar" . "aa") + ("Afrikaans" . "af") + ("Akan" . "ak") + ("Albanian" . "sq") + ("Amharic" . "am") + ("Arabic" . "ar") + ("Aragonese" . "an") + ("Argentinian" . "es_AR") + ("Armenian" . "hy") + ("Assamese" . "as") + ("Austrian" . "de_AT") + ("Avaric" . "av") + ("Avestan" . "ae") + ("Awadhi" . "awa") + ("Aymara" . "ay") + ("Azerbaijani" . "az") + ("Balinese" . "ban") + ("Baluchi" . "bal") + ("Bambara" . "bm") + ("Bashkir" . "ba") + ("Basque" . "eu") + ("Beja" . "bej") + ("Belarusian" . "be") + ("Bemba" . "bem") + ("Bengali" . "bn") + ("Bhojpuri" . "bho") + ("Bihari" . "bh") + ("Bikol" . "bik") + ("Bini" . "bin") + ("Bislama" . "bi") + ("Bosnian" . "bs") + ("Brazilian Portuguese" . "pt_BR") + ("Breton" . "br") + ("Buginese" . "bug") + ("Bulgarian" . "bg") + ("Burmese" . "my") + ("Catalan" . "ca") + ("Cebuano" . "ceb") + ("Central Khmer" . "km") + ("Chamorro" . "ch") + ("Chechen" . "ce") + ("Chinese" . "zh") + ("Chinese (Hong Kong)" . "zh_HK") + ("Chinese (simplified)" . "zh_CN") + ("Chinese (traditional)" . "zh_TW") + ("Church Slavic" . "cu") + ("Chuvash" . "cv") + ("Cornish" . "kw") + ("Corsican" . "co") + ("Cree" . "cr") + ("Croatian" . "hr") + ("Czech" . "cs") + ("Danish" . "da") + ("Dinka" . "din") + ("Divehi" . "dv") + ("Dogri" . "doi") + ("Dutch" . "nl") + ("Dzongkha" . "dz") + ("English" . "en") + ("English (British)" . "en_GB") + ("Esperanto" . "eo") + ("Estonian" . "et") + ("Ewe" . "ee") + ("Faroese" . "fo") + ("Fijian" . "fj") + ("Filipino" . "fil") + ("Finnish" . "fi") + ("Fon" . "fon") + ("French" . "fr") + ("Frisian" . "fy") + ("Fulah" . "ff") + ("Galician" . "gl") + ("Ganda" . "lg") + ("Georgian" . "ka") + ("German" . "de") + ("Gondi" . "gon") + ("Greek" . "el") + ("Guarani" . "gn") + ("Gujarati" . "gu") + ("Haitian" . "ht") + ("Hausa" . "ha") + ("Hebrew" . "he") + ("Herero" . "hz") + ("Hiligaynon" . "hil") + ("Hindi" . "hi") + ("Hiri Motu" . "ho") + ("Hmong" . "hmn") + ("Hungarian" . "hu") + ("Hyam" . "jab") + ("Icelandic" . "is") + ("Ido" . "io") + ("Igbo" . "ig") + ("Iloko" . "ilo") + ("Indonesian" . "id") + ("Interlingua" . "ia") + ("Interlingue" . "ie") + ("Inuktitut" . "iu") + ("Inupiak" . "ik") + ("Irish" . "ga") + ("Italian" . "it") + ("Japanese" . "ja") + ("Javanese" . "jv") + ("Jju" . "kaj") + ("Kabardian" . "kbd") + ("Kabyle" . "kab") + ("Kagoma" . "kdm") + ("Kalaallisut" . "kl") + ("Kamba" . "kam") + ("Kannada" . "kn") + ("Kanuri" . "kr") + ("Kashmiri" . "ks") + ("Kashubian" . "csb") + ("Kazakh" . "kk") + ("Khmer" . "km") ; old name + ("Kikuyu" . "ki") + ("Kimbundu" . "kmb") + ("Kinyarwanda" . "rw") + ("Kirghiz" . "ky") + ("Kirundi" . "rn") + ("Komi" . "kv") + ("Kongo" . "kg") + ("Konkani" . "kok") + ("Korean" . "ko") + ("Kuanyama" . "kj") + ("Kurdish" . "ku") + ("Kurukh" . "kru") + ("Laotian" . "lo") + ("Latin" . "la") + ("Latvian" . "lv") + ("Letzeburgesch" . "lb") + ("Limburgish" . "li") + ("Lingala" . "ln") + ("Lithuanian" . "lt") + ("Low Saxon" . "nds") + ("Luba-Katanga" . "lu") + ("Luba-Lulua" . "lua") + ("Luo" . "luo") + ("Macedonian" . "mk") + ("Madurese" . "mad") + ("Magahi" . "mag") + ("Maithili" . "mai") + ("Makasar" . "mak") + ("Malagasy" . "mg") + ("Malay" . "ms") + ("Malayalam" . "ml") + ("Maltese" . "mt") + ("Mandingo" . "man") + ("Manipuri" . "mni") + ("Manx" . "gv") + ("Maori" . "mi") + ("Marathi" . "mr") + ("Marshall" . "mh") + ("Marshallese" . "mh") + ("Marwari" . "mwr") + ("Mayan" . "myn") + ("Mende" . "men") + ("Minangkabau" . "min") + ("Moldavian" . "mo") + ("Mongolian" . "mn") + ("Mossi" . "mos") + ("Nahuatl" . "nah") + ("Nauru" . "na") + ("Navajo" . "nv") + ("Ndonga" . "ng") + ("Neapolitan" . "nap") + ("Nepali" . "ne") + ("North Ndebele" . "nd") + ("Northern Sami" . "se") + ("Northern Sotho" . "nso") + ("Norwegian Bokmal" . "nb") + ("Norwegian Nynorsk" . "nn") + ("Norwegian" . "no") + ("Nyamwezi" . "nym") + ("Nyanja" . "ny") + ("Nyankole" . "nyn") + ("Occitan" . "oc") + ("Ojibwa" . "oj") + ("Old English" . "ang") + ("Oriya" . "or") + ("Ossetian" . "os") + ("Páez" . "pbb") + ("Pali" . "pi") + ("Pampanga" . "pam") + ("Pangasinan" . "pag") + ("Pashto" . "ps") + ("Persian" . "fa") + ("Polish" . "pl") + ("Portuguese" . "pt") + ("Punjabi" . "pa") + ("Quechua" . "qu") + ("Rajasthani" . "raj") + ("Rhaeto-Roman" . "rm") ; old name + ("Romanian" . "ro") + ("Romansh" . "rm") + ("Russian" . "ru") + ("Samoan" . "sm") + ("Sango" . "sg") + ("Sanskrit" . "sa") + ("Santali" . "sat") + ("Sardinian" . "sc") + ("Sasak" . "sas") + ("Scots" . "gd") ; old name + ("Scottish Gaelic" . "gd") + ("Serbian" . "sr") + ("Serer" . "srr") + ("Sesotho" . "st") + ("Setswana" . "tn") + ("Shan" . "shn") + ("Shona" . "sn") + ("Sichuan Yi" . "ii") + ("Sicilian" . "scn") + ("Sidamo" . "sid") + ("Sindhi" . "sd") + ("Sinhala" . "si") + ("Sinhalese" . "si") + ("Siswati" . "ss") + ("Slovak" . "sk") + ("Slovenian" . "sl") + ("Somali" . "so") + ("Sorbian" . "wen") + ("South Ndebele" . "nr") + ("Spanish" . "es") + ("Spanish (Canary Islands)" . "es_IC") + ("Sukuma" . "suk") + ("Sundanese" . "su") + ("Susu" . "sus") + ("Swahili" . "sw") + ("Swedish" . "sv") + ("Swiss German" . "gsw") + ("Tagalog" . "tl") + ("Tahitian" . "ty") + ("Tajik" . "tg") + ("Tamil" . "ta") + ("Tatar" . "tt") + ("Telugu" . "te") + ("Tetum" . "tet") + ("Thai" . "th") + ("Tibetan" . "bo") + ("Tigrinya" . "ti") + ("Timne" . "tem") + ("Tiv" . "tiv") + ("Tonga" . "to") + ("Tsonga" . "ts") + ("Tumbuka" . "tum") + ("Turkish" . "tr") + ("Turkmen" . "tk") + ("Twi" . "tw") + ("Tyap" . "kcg") + ("Uighur" . "ug") + ("Ukrainian" . "uk") + ("Umbundu" . "umb") + ("Urdu" . "ur") + ("Uzbek" . "uz") + ("Venda" . "ve") + ("Vietnamese" . "vi") + ("Volapuk" . "vo") + ("Walloon" . "wa") + ("Walamo" . "wal") + ("Waray" . "war") + ("Welsh" . "cy") + ("Western Frisian" . "fy") + ("Wolof" . "wo") + ("Xhosa" . "xh") + ("Yao" . "yao") + ("Yiddish" . "yi") + ("Yoruba" . "yo") + ("Zapotec" . "zap") + ("Zhuang" . "za") + ("Zulu" . "zu") + ) + "*Association list giving team codes from team names. +This is used for generating a submission file name for the 'M' command. +If a string instead of an alist, it is a team code to use unconditionnally." + :type 'sexp + :group 'po) + +(defcustom po-gzip-uuencode-command "gzip -9 | uuencode -m" + "*The filter to use for preparing a mail invoice of the PO file. +Normally \"gzip -9 | uuencode -m\", remove the -9 for lesser compression, +or remove the -m if you are not using the GNU version of 'uuencode'." + :type 'string + :group 'po) + +(defvar po-subedit-mode-syntax-table + (copy-syntax-table text-mode-syntax-table) + "Syntax table used while in PO mode.") + +;;; Emacs portability matters - part II. + +;;; Many portability matters are addressed in this page. The few remaining +;;; cases, elsewhere, all involve 'eval-and-compile', 'boundp' or 'fboundp'. + +;; Protect string comparisons from text properties if possible. +(eval-and-compile + (fset 'po-buffer-substring + (symbol-function (if (fboundp 'buffer-substring-no-properties) + 'buffer-substring-no-properties + 'buffer-substring))) + + (if (fboundp 'match-string-no-properties) + (fset 'po-match-string (symbol-function 'match-string-no-properties)) + (defun po-match-string (number) + "Return string of text matched by last search." + (po-buffer-substring (match-beginning number) (match-end number))))) + +;; Handle missing 'with-temp-buffer' function. +(eval-and-compile + (if (fboundp 'with-temp-buffer) + (fset 'po-with-temp-buffer (symbol-function 'with-temp-buffer)) + + (defmacro po-with-temp-buffer (&rest forms) + "Create a temporary buffer, and evaluate FORMS there like 'progn'." + (let ((curr-buffer (make-symbol "curr-buffer")) + (temp-buffer (make-symbol "temp-buffer"))) + `(let ((,curr-buffer (current-buffer)) + (,temp-buffer (get-buffer-create + (generate-new-buffer-name " *po-temp*")))) + (unwind-protect + (progn + (set-buffer ,temp-buffer) + ,@forms) + (set-buffer ,curr-buffer) + (and (buffer-name ,temp-buffer) + (kill-buffer ,temp-buffer)))))))) + +;; Handle missing 'kill-new' function. +(eval-and-compile + (if (fboundp 'kill-new) + (fset 'po-kill-new (symbol-function 'kill-new)) + + (defun po-kill-new (string) + "Push STRING onto the kill ring, for Emacs 18 where kill-new is missing." + (po-with-temp-buffer + (insert string) + (kill-region (point-min) (point-max)))))) + +;; Handle missing 'read-event' function. +(eval-and-compile + (fset 'po-read-event + (cond ((fboundp 'read-event) + ;; GNU Emacs. + 'read-event) + ((fboundp 'next-command-event) + ;; XEmacs. + 'next-command-event) + (t + ;; Older Emacses. + 'read-char)))) + +;; Handle missing 'force-mode-line-update' function. +(eval-and-compile + (if (fboundp 'force-mode-line-update) + (fset 'po-force-mode-line-update + (symbol-function 'force-mode-line-update)) + + (defun po-force-mode-line-update () + "Force the mode-line of the current buffer to be redisplayed." + (set-buffer-modified-p (buffer-modified-p))))) + +;; Handle portable highlighting. Code has been adapted (OK... stolen! :-) +;; from 'ispell.el'. +(eval-and-compile + (cond + (po-EMACS20 + + (defun po-create-overlay () + "Create and return a deleted overlay structure. +The variable 'po-highlight-face' selects the face to use for highlighting." + (let ((overlay (make-overlay (point) (point)))) + (overlay-put overlay 'face po-highlight-face) + ;; The fun thing is that a deleted overlay retains its face, and is + ;; movable. + (delete-overlay overlay) + overlay)) + + (defun po-highlight (overlay start end &optional buffer) + "Use OVERLAY to highlight the string from START to END. +If limits are not relative to the current buffer, use optional BUFFER." + (move-overlay overlay start end (or buffer (current-buffer)))) + + (defun po-rehighlight (overlay) + "Ensure OVERLAY is highlighted." + ;; There is nothing to do, as GNU Emacs allows multiple highlights. + nil) + + (defun po-dehighlight (overlay) + "Display normally the last string which OVERLAY highlighted. +The current buffer should be in PO mode, when this function is called." + (delete-overlay overlay))) + + (po-XEMACS + + (defun po-create-overlay () + "Create and return a deleted overlay structure." + ;; The same as for GNU Emacs above, except the created extent is + ;; already detached, so there's no need to "delete" it + ;; explicitly. + (let ((extent (make-extent nil nil))) + (set-extent-face extent po-highlight-face) + extent)) + + (defun po-highlight (extent start end &optional buffer) + "Use EXTENT to highlight the string from START to END. +If limits are not relative to the current buffer, use optional BUFFER." + (set-extent-endpoints extent start end (or buffer (current-buffer)))) + + (defun po-rehighlight (extent) + "Ensure EXTENT is highlighted." + ;; Nothing to do here. + nil) + + (defun po-dehighlight (extent) + "Display normally the last string which EXTENT highlighted." + (detach-extent extent))) + + (t + + (defun po-create-overlay () + "Create and return a deleted overlay structure." + (cons (make-marker) (make-marker))) + + (defun po-highlight (overlay start end &optional buffer) + "Use OVERLAY to highlight the string from START to END. +If limits are not relative to the current buffer, use optional BUFFER. +No doubt that highlighting, when Emacs does not allow it, is a kludge." + (save-excursion + (and buffer (set-buffer buffer)) + (let ((modified (buffer-modified-p)) + (buffer-read-only nil) + (inhibit-quit t) + (buffer-undo-list t) + (text (buffer-substring start end))) + (goto-char start) + (delete-region start end) + (insert-char ? (- end start)) + (sit-for 0) + (setq inverse-video (not inverse-video)) + (delete-region start end) + (insert text) + (sit-for 0) + (setq inverse-video (not inverse-video)) + (set-buffer-modified-p modified))) + (set-marker (car overlay) start (or buffer (current-buffer))) + (set-marker (cdr overlay) end (or buffer (current-buffer)))) + + (defun po-rehighlight (overlay) + "Ensure OVERLAY is highlighted." + (let ((buffer (marker-buffer (car overlay))) + (start (marker-position (car overlay))) + (end (marker-position (cdr overlay)))) + (and buffer + (buffer-name buffer) + (po-highlight overlay start end buffer)))) + + (defun po-dehighlight (overlay) + "Display normally the last string which OVERLAY highlighted." + (let ((buffer (marker-buffer (car overlay))) + (start (marker-position (car overlay))) + (end (marker-position (cdr overlay)))) + (if buffer + (save-excursion + (set-buffer buffer) + (let ((modified (buffer-modified-p)) + (buffer-read-only nil) + (inhibit-quit t) + (buffer-undo-list t)) + (let ((text (buffer-substring start end))) + (goto-char start) + (delete-region start end) + (insert-char ? (- end start)) + (sit-for 0) + (delete-region start end) + (insert text) + (sit-for 0) + (set-buffer-modified-p modified))))) + (setcar overlay (make-marker)) + (setcdr overlay (make-marker)))) + + ))) + +;;; Buffer local variables. + +;; The following block of declarations has the main purpose of avoiding +;; byte compiler warnings. It also introduces some documentation for +;; each of these variables, all meant to be local to PO mode buffers. + +;; Flag telling that MODE-LINE-STRING should be displayed. See 'Window' +;; page below. Exceptionally, this variable is local to *all* buffers. +(defvar po-mode-flag) + +;; PO buffers are kept read-only to prevent random modifications. READ-ONLY +;; holds the value of the read-only flag before PO mode was entered. +(defvar po-read-only) + +;; The current entry extends from START-OF-ENTRY to END-OF-ENTRY, it +;; includes preceding whitespace and excludes following whitespace. The +;; start of keyword lines are START-OF-MSGID and START-OF-MSGSTR. +;; ENTRY-TYPE classifies the entry. +(defvar po-start-of-entry) +(defvar po-start-of-msgctxt) ; = po-start-of-msgid if there is no msgctxt +(defvar po-start-of-msgid) +(defvar po-start-of-msgid_plural) ; = nil if there is no msgid_plural +(defvar po-start-of-msgstr-block) +(defvar po-start-of-msgstr-form) +(defvar po-end-of-msgstr-form) +(defvar po-end-of-entry) +(defvar po-entry-type) + +;; A few counters are usefully shown in the Emacs mode line. +(defvar po-translated-counter) +(defvar po-fuzzy-counter) +(defvar po-untranslated-counter) +(defvar po-obsolete-counter) +(defvar po-mode-line-string) + +;; PO mode keeps track of fields being edited, for one given field should +;; have one editing buffer at most, and for exiting a PO buffer properly +;; should offer to close all pending edits. Variable EDITED-FIELDS holds an +;; an list of "slots" of the form: (ENTRY-MARKER EDIT-BUFFER OVERLAY-INFO). +;; To allow simultaneous edition of the comment and the msgstr of an entry, +;; ENTRY-MARKER points to the msgid line if a comment is being edited, or to +;; the msgstr line if the msgstr is being edited. EDIT-BUFFER is the +;; temporary Emacs buffer used to edit the string. OVERLAY-INFO, when not +;; nil, holds an overlay (or if overlays are not supported, a cons of two +;; markers) for this msgid string which became highlighted for the edit. +(defvar po-edited-fields) + +;; We maintain a set of movable pointers for returning to entries. +(defvar po-marker-stack) + +;; SEARCH path contains a list of directories where files may be found, +;; in a format suitable for read completion. Each directory includes +;; its trailing slash. PO mode starts with "./" and "../". +(defvar po-search-path) + +;; The following variables are meaningful only when REFERENCE-CHECK +;; is identical to START-OF-ENTRY, else they should be recomputed. +;; REFERENCE-ALIST contains all known references for the current +;; entry, each list element is (PROMPT FILE LINE), where PROMPT may +;; be used for completing read, FILE is a string and LINE is a number. +;; REFERENCE-CURSOR is a cycling cursor into REFERENCE-ALIST. +(defvar po-reference-alist) +(defvar po-reference-cursor) +(defvar po-reference-check) + +;; The following variables are for marking translatable strings in program +;; sources. KEYWORDS is the list of keywords for marking translatable +;; strings, kept in a format suitable for reading with completion. +;; STRING-CONTENTS holds the value of the most recent string found in sources, +;; and when it is not nil, then STRING-BUFFER, STRING-START and STRING-END +;; describe where it is. MARKING-OVERLAY, if not 'nil', holds the overlay +;; which highlight the last found string; for older Emacses, it holds the cons +;; of two markers around the highlighted region. +(defvar po-keywords) +(defvar po-string-contents) +(defvar po-string-buffer) +(defvar po-string-start) +(defvar po-string-end) +(defvar po-marking-overlay) + +;;; PO mode variables and constants (usually not to customize). + +;; The textdomain should really be "gettext", only trying it for now. +;; All this requires more thinking, we cannot just do this like that. +(set-translation-domain "po-mode") + +(defun po-mode-version () + "Show Emacs PO mode version." + (interactive) + (message (_"Emacs PO mode, version %s") po-mode-version-string)) + +(defconst po-help-display-string + (_"\ +PO Mode Summary Next Previous Miscellaneous +*: Later, /: Docum n p Any type . Redisplay + t T Translated /v Version info +Moving around f F Fuzzy ?, h This help +< First if any o O Obsolete = Current index +> Last if any u U Untranslated 0 Other window +/SPC Auto select V Validate + Msgstr Comments M Mail officially +Modifying entries RET # Call editor _ Undo +TAB Remove fuzzy mark k K Kill to E Edit out full +DEL Fuzzy or fade out w W Copy to Q Forceful quit +LFD Init with msgid y Y Yank from q Confirm and quit + +gettext Keyword Marking Position Stack +, Find next string Compendiums m Mark and push current +M-, Mark translatable *c To compendium r Pop and return +M-. Change mark, mark *M-C Select, save x Exchange current/top + +Program Sources Auxiliary Files Lexicography +s Cycle reference a Cycle file *l Lookup translation +M-s Select reference C-c C-a Select file *M-l Add/edit translation +S Consider path A Consider PO file *L Consider lexicon +M-S Ignore path M-A Ignore PO file *M-L Ignore lexicon +") + "Help page for PO mode.") + +(defconst po-mode-menu-layout + `("PO" + ("Moving around" + ["Auto select" po-auto-select-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to next interesting entry"))] + "---" + ;; Forward + ["Any next" po-next-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to next entry"))] + ["Next translated" po-next-translated-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to next translated entry"))] + ["Next fuzzy" po-next-fuzzy-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to next fuzzy entry"))] + ["Next obsolete" po-next-obsolete-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to next obsolete entry"))] + ["Next untranslated" po-next-untranslated-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to next untranslated entry"))] + ["Last file entry" po-last-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to last entry"))] + "---" + ;; Backward + ["Any previous" po-previous-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to previous entry"))] + ["Previous translated" po-previous-translated-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to previous translated entry"))] + ["Previous fuzzy" po-previous-fuzzy-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to previous fuzzy entry"))] + ["Previous obsolete" po-previous-obsolete-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to previous obsolete entry"))] + ["Previous untranslated" po-previous-untranslated-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to previous untranslated entry"))] + ["First file entry" po-first-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to first entry"))] + "---" + ;; "Position stack" + ["Mark and push current" po-push-location + ,@(if (featurep 'xemacs) '(t) + '(:help "Remember current location"))] + ["Pop and return" po-pop-location + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to last remembered location and forget about it"))] + ["Exchange current/top" po-exchange-location + ,@(if (featurep 'xemacs) '(t) + '(:help "Jump to last remembered location and remember current location"))] + "---" + ["Redisplay" po-current-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Make current entry properly visible"))] + ["Current index" po-statistics + ,@(if (featurep 'xemacs) '(t) + '(:help "Statistical info on current translation file"))]) + ("Modifying entries" + ["Undo" po-undo + ,@(if (featurep 'xemacs) '(t) + '(:help "Revoke last changed entry"))] + "---" + ;; "Msgstr" + ["Edit msgstr" po-edit-msgstr + ,@(if (featurep 'xemacs) '(t) + '(:help "Edit current translation"))] + ["Ediff and merge msgstr" po-edit-msgstr-and-ediff + ,@(if (featurep 'xemacs) '(t) + '(:help "Call `ediff' on current translation for merging"))] + ["Cut msgstr" po-kill-msgstr + ,@(if (featurep 'xemacs) '(t) + '(:help "Cut (kill) current translation"))] + ["Copy msgstr" po-kill-ring-save-msgstr + ,@(if (featurep 'xemacs) '(t) + '(:help "Copy current translation"))] + ["Paste msgstr" po-yank-msgstr + ,@(if (featurep 'xemacs) '(t) + '(:help "Paste (yank) text most recently cut/copied translation"))] + "---" + ;; "Comments" + ["Edit comment" po-edit-comment + ,@(if (featurep 'xemacs) '(t) + '(:help "Edit current comment"))] + ["Ediff and merge comment" po-edit-comment-and-ediff + ,@(if (featurep 'xemacs) '(t) + '(:help "Call `ediff' on current comment for merging"))] + ["Cut comment" po-kill-comment + ,@(if (featurep 'xemacs) '(t) + '(:help "Cut (kill) current comment"))] + ["Copy comment" po-kill-ring-save-comment + ,@(if (featurep 'xemacs) '(t) + '(:help "Copy current translation"))] + ["Paste comment" po-yank-comment + ,@(if (featurep 'xemacs) '(t) + '(:help "Paste (yank) text most recently cut/copied"))] + "---" + ["Remove fuzzy mark" po-unfuzzy + ,@(if (featurep 'xemacs) '(t) + '(:help "Remove \"#, fuzzy\""))] + ["Fuzzy or fade out" po-fade-out-entry + ,@(if (featurep 'xemacs) '(t) + '(:help "Set current entry fuzzy, or if already fuzzy delete it"))] + ["Init with msgid" po-msgid-to-msgstr + ,@(if (featurep 'xemacs) '(t) + '(:help "\ +Initialize or replace current translation with the original message"))]) + ("Other files" + ["Other window" po-other-window + ,@(if (featurep 'xemacs) '(t) + '(:help "Select other window; if necessay split current frame"))] + "---" + ;; "Program sources" + ["Cycle reference in source file" po-cycle-source-reference t] + ["Select reference" po-select-source-reference t] + ["Consider path" po-consider-source-path t] + ["Ignore path" po-ignore-source-path t] + ;; "---" + ;; ;; "Compendiums" + ;; ["To add entry to compendium" po-save-entry nil] + ;; ["Select from compendium, save" po-select-and-save-entry nil] + "---" + ;; "Auxiliary files" + ["Cycle through auxilicary file" po-cycle-auxiliary t] + ["Select auxilicary file" po-select-auxiliary t] + ["Consider as auxilicary file" po-consider-as-auxiliary t] + ["Ignore as auxilicary file" po-ignore-as-auxiliary t] + ;; "---" + ;; ;; "Lexicography" + ;; ["Lookup translation" po-lookup-lexicons nil] + ;; ["Add/edit translation" po-edit-lexicon-entry nil] + ;; ["Consider lexicon" po-consider-lexicon-file nil] + ;; ["Ignore lexicon" po-ignore-lexicon-file nil]) + "---" + "Source marking" + ["Find first string" (po-tags-search '(nil)) t] + ["Prefer keyword" (po-select-mark-and-mark '(nil)) t] + ["Find next string" po-tags-search t] + ["Mark preferred" po-mark-translatable t] + ["Mark with keyword" po-select-mark-and-mark t]) + "---" + ["Version info" po-mode-version + ,@(if (featurep 'xemacs) '(t) + '(:help "Display version number of PO mode"))] + ["Help page" po-help + ,@(if (featurep 'xemacs) '(t) + '(:help "Show the PO mode help screen"))] + ["Validate" po-validate + ,@(if (featurep 'xemacs) '(t) + '(:help "Check validity of current translation file using `msgfmt'"))] + ["Mail officially" po-send-mail + ,@(if (featurep 'xemacs) '(t) + '(:help "Send current translation file to the Translation Robot by mail"))] + ["Edit out full" po-edit-out-full + ,@(if (featurep 'xemacs) '(t) + '(:help "Leave PO mode to edit translation file using fundamental mode"))] + "---" + ["Forceful quit" po-quit + ,@(if (featurep 'xemacs) '(t) + '(:help "Close (kill) current translation file without saving"))] + ["Soft quit" po-confirm-and-quit + ,@(if (featurep 'xemacs) '(t) + '(:help "Save current translation file, than close (kill) it"))])) + + +(defconst po-subedit-mode-menu-layout + `("PO-Edit" + ["Ediff and merge translation variants" po-subedit-ediff + ,@(if (featurep 'xemacs) '(t) + '(:help "Call `ediff' for merging variants"))] + ["Cycle through auxiliary files" po-subedit-cycle-auxiliary t] + "---" + ["Abort edit" po-subedit-abort + ,@(if (featurep 'xemacs) '(t) + '(:help "Don't change the translation"))] + ["Exit edit" po-subedit-exit + ,@(if (featurep 'xemacs) '(t) + '(:help "Use this text as the translation and close current edit buffer"))])) + +(defconst po-subedit-message + (_"Type 'C-c C-c' once done, or 'C-c C-k' to abort edit") + "Message to post in the minibuffer when an edit buffer is displayed.") + +(defvar po-auxiliary-list nil + "List of auxiliary PO files, in completing read format.") + +(defvar po-auxiliary-cursor nil + "Cursor into the 'po-auxiliary-list'.") + +(defvar po-compose-mail-function + (let ((functions '(compose-mail-other-window + message-mail-other-window + compose-mail + message-mail)) + result) + (while (and (not result) functions) + (if (fboundp (car functions)) + (setq result (car functions)) + (setq functions (cdr functions)))) + (cond (result) + ((fboundp 'mail-other-window) + (function (lambda (to subject) + (mail-other-window nil to subject)))) + ((fboundp 'mail) + (function (lambda (to subject) + (mail nil to subject)))) + (t (function (lambda (to subject) + (error (_"I do not know how to mail to '%s'") to)))))) + "Function to start composing an electronic message.") + +(defvar po-any-previous-msgctxt-regexp + "^#\\(~\\)?|[ \t]*msgctxt.*\n\\(#\\(~\\)?|[ \t]*\".*\n\\)*" + "Regexp matching a whole #| msgctxt field, whether obsolete or not.") + +(defvar po-any-previous-msgid-regexp + "^#\\(~\\)?|[ \t]*msgid.*\n\\(#\\(~\\)?|[ \t]*\".*\n\\)*" + "Regexp matching a whole #| msgid field, whether obsolete or not.") + +(defvar po-any-previous-msgid_plural-regexp + "^#\\(~\\)?|[ \t]*msgid_plural.*\n\\(#\\(~\\)?|[ \t]*\".*\n\\)*" + "Regexp matching a whole #| msgid_plural field, whether obsolete or not.") + +(defvar po-any-msgctxt-msgid-regexp + "^\\(#~[ \t]*\\)?msg\\(ctxt\\|id\\).*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" + "Regexp matching a whole msgctxt or msgid field, whether obsolete or not.") + +(defvar po-any-msgid-regexp + "^\\(#~[ \t]*\\)?msgid.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" + "Regexp matching a whole msgid field, whether obsolete or not.") + +(defvar po-any-msgid_plural-regexp + "^\\(#~[ \t]*\\)?msgid_plural.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" + "Regexp matching a whole msgid_plural field, whether obsolete or not.") + +(defvar po-any-msgstr-block-regexp + "^\\(#~[ \t]*\\)?msgstr\\([ \t]\\|\\[0\\]\\).*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\(\\(#~[ \t]*\\)?msgstr\\[[0-9]\\].*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\)*" + "Regexp matching a whole msgstr or msgstr[] field, whether obsolete or not.") + +(defvar po-any-msgstr-form-regexp + ;; "^\\(#~[ \t]*\\)?msgstr.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" + "^\\(#~[ \t]*\\)?msgstr\\(\\[[0-9]\\]\\)?.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*" + "Regexp matching just one msgstr or msgstr[] field, whether obsolete or not.") + +(defvar po-msgstr-idx-keyword-regexp + "^\\(#~[ \t]*\\)?msgstr\\[[0-9]\\]" + "Regexp matching an indexed msgstr keyword, whether obsolete or not.") + +(defvar po-msgfmt-program "msgfmt" + "Path to msgfmt program from GNU gettext package.") + +;; Font lock based highlighting code. +(defconst po-font-lock-keywords + '( + ;; ("^\\(msgctxt \\|msgid \\|msgstr \\)?\"\\|\"$" . font-lock-keyword-face) + ;; (regexp-opt + ;; '("msgctxt " "msgid " "msgid_plural " "msgstr " "msgstr[0] " "msgstr[1] ")) + ("^\\(\\(msg\\(ctxt\\|id\\(_plural\\)?\\|str\\(\\[[0-9]\\]\\)?\\)\\) \\)?\"\\|\"$" + . font-lock-keyword-face) + ("\\\\.\\|%[*$-.0-9ul]*[a-zA-Z]" . font-lock-variable-name-face) + ("^# .*\\|^#[:,]?" . font-lock-comment-face) + ("^#:\\(.*\\)" 1 font-lock-reference-face) + ;; The following line does not work, and I wonder why. + ;;("^#,\\(.*\\)" 1 font-function-name-reference-face) + ) + "Additional expressions to highlight in PO mode.") + +;; Old activator for 'font lock'. Is it still useful? I don't think so. +;;(if (boundp 'font-lock-keywords) +;; (put 'po-mode 'font-lock-keywords 'po-font-lock-keywords)) + +;; 'hilit19' based highlighting code has been disabled, as most probably +;; nobody really needs it (it also generates ugly byte-compiler warnings). +;; +;;(if (fboundp 'hilit-set-mode-patterns) +;; (hilit-set-mode-patterns 'po-mode +;; '(("^# .*\\|^#$" nil comment) +;; ("^#[.,:].*" nil include) +;; ("^\\(msgid\\|msgstr\\) *\"" nil keyword) +;; ("^\"\\|\"$" nil keyword)))) + +;;; Mode activation. + +;; Emacs 21.2 comes with po-find-file-coding-system. We give preference +;; to the version shipped with Emacs. +(if (not (fboundp 'po-find-file-coding-system)) + (require 'po-compat)) + +(defvar po-mode-abbrev-table nil + "Abbrev table used while in PO mode.") +(define-abbrev-table 'po-mode-abbrev-table ()) + +(defvar po-mode-map + ;; Use (make-keymap) because (make-sparse-keymap) does not work on Demacs. + (let ((po-mode-map (make-keymap))) + (suppress-keymap po-mode-map) + (define-key po-mode-map "\C-i" 'po-unfuzzy) + (define-key po-mode-map "\C-j" 'po-msgid-to-msgstr) + (define-key po-mode-map "\C-m" 'po-edit-msgstr) + (define-key po-mode-map " " 'po-auto-select-entry) + (define-key po-mode-map "?" 'po-help) + (define-key po-mode-map "#" 'po-edit-comment) + (define-key po-mode-map "," 'po-tags-search) + (define-key po-mode-map "." 'po-current-entry) + (define-key po-mode-map "<" 'po-first-entry) + (define-key po-mode-map "=" 'po-statistics) + (define-key po-mode-map ">" 'po-last-entry) + (define-key po-mode-map "a" 'po-cycle-auxiliary) +;;;; (define-key po-mode-map "c" 'po-save-entry) + (define-key po-mode-map "f" 'po-next-fuzzy-entry) + (define-key po-mode-map "h" 'po-help) + (define-key po-mode-map "k" 'po-kill-msgstr) +;;;; (define-key po-mode-map "l" 'po-lookup-lexicons) + (define-key po-mode-map "m" 'po-push-location) + (define-key po-mode-map "n" 'po-next-entry) + (define-key po-mode-map "o" 'po-next-obsolete-entry) + (define-key po-mode-map "p" 'po-previous-entry) + (define-key po-mode-map "q" 'po-confirm-and-quit) + (define-key po-mode-map "r" 'po-pop-location) + (define-key po-mode-map "s" 'po-cycle-source-reference) + (define-key po-mode-map "t" 'po-next-translated-entry) + (define-key po-mode-map "u" 'po-next-untranslated-entry) + (define-key po-mode-map "v" 'po-mode-version) + (define-key po-mode-map "w" 'po-kill-ring-save-msgstr) + (define-key po-mode-map "x" 'po-exchange-location) + (define-key po-mode-map "y" 'po-yank-msgstr) + (define-key po-mode-map "A" 'po-consider-as-auxiliary) + (define-key po-mode-map "E" 'po-edit-out-full) + (define-key po-mode-map "F" 'po-previous-fuzzy-entry) + (define-key po-mode-map "K" 'po-kill-comment) +;;;; (define-key po-mode-map "L" 'po-consider-lexicon-file) + (define-key po-mode-map "M" 'po-send-mail) + (define-key po-mode-map "O" 'po-previous-obsolete-entry) + (define-key po-mode-map "T" 'po-previous-translated-entry) + (define-key po-mode-map "U" 'po-previous-untranslated-entry) + (define-key po-mode-map "Q" 'po-quit) + (define-key po-mode-map "S" 'po-consider-source-path) + (define-key po-mode-map "V" 'po-validate) + (define-key po-mode-map "W" 'po-kill-ring-save-comment) + (define-key po-mode-map "Y" 'po-yank-comment) + (define-key po-mode-map "_" 'po-undo) + (define-key po-mode-map "\C-_" 'po-undo) + (define-key po-mode-map "\C-xu" 'po-undo) + (define-key po-mode-map "0" 'po-other-window) + (define-key po-mode-map "\177" 'po-fade-out-entry) + (define-key po-mode-map "\C-c\C-a" 'po-select-auxiliary) + (define-key po-mode-map "\C-c\C-e" 'po-edit-msgstr-and-ediff) + (define-key po-mode-map [?\C-c?\C-#] 'po-edit-comment-and-ediff) + (define-key po-mode-map "\C-c\C-C" 'po-edit-comment-and-ediff) + (define-key po-mode-map "\M-," 'po-mark-translatable) + (define-key po-mode-map "\M-." 'po-select-mark-and-mark) +;;;; (define-key po-mode-map "\M-c" 'po-select-and-save-entry) +;;;; (define-key po-mode-map "\M-l" 'po-edit-lexicon-entry) + (define-key po-mode-map "\M-s" 'po-select-source-reference) + (define-key po-mode-map "\M-A" 'po-ignore-as-auxiliary) +;;;; (define-key po-mode-map "\M-L" 'po-ignore-lexicon-file) + (define-key po-mode-map "\M-S" 'po-ignore-source-path) + po-mode-map) + "Keymap for PO mode.") + +(defun po-mode () + "Major mode for translators when they edit PO files. + +Special commands: +\\{po-mode-map} +Turning on PO mode calls the value of the variable 'po-mode-hook', +if that value is non-nil. Behaviour may be adjusted through some variables, +all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'." + (interactive) + (kill-all-local-variables) + (setq major-mode 'po-mode + mode-name "PO") + (use-local-map po-mode-map) + (if (fboundp 'easy-menu-define) + (progn + (easy-menu-define po-mode-menu po-mode-map "" po-mode-menu-layout) + (and po-XEMACS (easy-menu-add po-mode-menu)))) + (set (make-local-variable 'font-lock-defaults) '(po-font-lock-keywords t)) + + (set (make-local-variable 'po-read-only) buffer-read-only) + (setq buffer-read-only t) + + (make-local-variable 'po-start-of-entry) + (make-local-variable 'po-start-of-msgctxt) + (make-local-variable 'po-start-of-msgid) + (make-local-variable 'po-start-of-msgid_plural) + (make-local-variable 'po-start-of-msgstr-block) + (make-local-variable 'po-end-of-entry) + (make-local-variable 'po-entry-type) + + (make-local-variable 'po-translated-counter) + (make-local-variable 'po-fuzzy-counter) + (make-local-variable 'po-untranslated-counter) + (make-local-variable 'po-obsolete-counter) + (make-local-variable 'po-mode-line-string) + + (setq po-mode-flag t) + + (po-check-file-header) + (po-compute-counters nil) + + (set (make-local-variable 'po-edited-fields) nil) + (set (make-local-variable 'po-marker-stack) nil) + (set (make-local-variable 'po-search-path) '(("./") ("../"))) + + (set (make-local-variable 'po-reference-alist) nil) + (set (make-local-variable 'po-reference-cursor) nil) + (set (make-local-variable 'po-reference-check) 0) + + (set (make-local-variable 'po-keywords) + '(("gettext") ("gettext_noop") ("_") ("N_"))) + (set (make-local-variable 'po-string-contents) nil) + (set (make-local-variable 'po-string-buffer) nil) + (set (make-local-variable 'po-string-start) nil) + (set (make-local-variable 'po-string-end) nil) + (set (make-local-variable 'po-marking-overlay) (po-create-overlay)) + + (add-hook 'write-contents-hooks 'po-replace-revision-date) + + (run-hooks 'po-mode-hook) + (message (_"You may type 'h' or '?' for a short PO mode reminder."))) + +(defvar po-subedit-mode-map + ;; Use (make-keymap) because (make-sparse-keymap) does not work on Demacs. + (let ((po-subedit-mode-map (make-keymap))) + (define-key po-subedit-mode-map "\C-c\C-a" 'po-subedit-cycle-auxiliary) + (define-key po-subedit-mode-map "\C-c\C-c" 'po-subedit-exit) + (define-key po-subedit-mode-map "\C-c\C-e" 'po-subedit-ediff) + (define-key po-subedit-mode-map "\C-c\C-k" 'po-subedit-abort) + po-subedit-mode-map) + "Keymap while editing a PO mode entry (or the full PO file).") + +;;; Window management. + +(make-variable-buffer-local 'po-mode-flag) + +(defvar po-mode-line-entry '(po-mode-flag (" " po-mode-line-string)) + "Mode line format entry displaying MODE-LINE-STRING.") + +;; Insert MODE-LINE-ENTRY in mode line, but on first load only. +(or (member po-mode-line-entry mode-line-format) + ;; mode-line-format usually contains global-mode-string, but some + ;; people customize this variable. As a last resort, append at the end. + (let ((prev-entry (or (member 'global-mode-string mode-line-format) + (member " " mode-line-format) + (last mode-line-format)))) + (setcdr prev-entry (cons po-mode-line-entry (cdr prev-entry))))) + +(defun po-update-mode-line-string () + "Compute a new statistics string to display in mode line." + (setq po-mode-line-string + (concat (format "%dt" po-translated-counter) + (if (> po-fuzzy-counter 0) + (format "+%df" po-fuzzy-counter)) + (if (> po-untranslated-counter 0) + (format "+%du" po-untranslated-counter)) + (if (> po-obsolete-counter 0) + (format "+%do" po-obsolete-counter)))) + (po-force-mode-line-update)) + +(defun po-type-counter () + "Return the symbol name of the counter appropriate for the current entry." + (cond ((eq po-entry-type 'obsolete) 'po-obsolete-counter) + ((eq po-entry-type 'fuzzy) 'po-fuzzy-counter) + ((eq po-entry-type 'translated) 'po-translated-counter) + ((eq po-entry-type 'untranslated) 'po-untranslated-counter) + (t (error (_"Unknown entry type"))))) + +(defun po-decrease-type-counter () + "Decrease the counter corresponding to the nature of the current entry." + (let ((counter (po-type-counter))) + (set counter (1- (eval counter))))) + +(defun po-increase-type-counter () + "Increase the counter corresponding to the nature of the current entry. +Then, update the mode line counters." + (let ((counter (po-type-counter))) + (set counter (1+ (eval counter)))) + (po-update-mode-line-string)) + +;; Avoid byte compiler warnings. +(defvar po-fuzzy-regexp) +(defvar po-untranslated-regexp) + +(defun po-compute-counters (flag) + "Prepare counters for mode line display. If FLAG, also echo entry position." + (and flag (po-find-span-of-entry)) + (setq po-translated-counter 0 + po-fuzzy-counter 0 + po-untranslated-counter 0 + po-obsolete-counter 0) + (let ((position 0) (total 0) current here) + ;; FIXME 'here' looks obsolete / 2001-08-23 03:54:26 CEST -ke- + (save-excursion + (po-find-span-of-entry) + (setq current po-start-of-msgstr-block) + (goto-char (point-min)) + ;; While counting, skip the header entry, for consistency with msgfmt. + (po-find-span-of-entry) + (if (string-equal (po-get-msgid) "") + (goto-char po-end-of-entry)) + (if (re-search-forward "^msgid" (point-max) t) + (progn + ;; Start counting + (while (re-search-forward po-any-msgstr-block-regexp nil t) + (and (= (% total 20) 0) + (if flag + (message (_"Position %d/%d") position total) + (message (_"Position %d") total))) + (setq here (point)) + (goto-char (match-beginning 0)) + (setq total (1+ total)) + (and flag (eq (point) current) (setq position total)) + (cond ((eq (following-char) ?#) + (setq po-obsolete-counter (1+ po-obsolete-counter))) + ((looking-at po-untranslated-regexp) + (setq po-untranslated-counter (1+ po-untranslated-counter))) + (t (setq po-translated-counter (1+ po-translated-counter)))) + (goto-char here)) + + ;; Make another pass just for the fuzzy entries, kind of kludgey. + ;; FIXME: Counts will be wrong if untranslated entries are fuzzy, yet + ;; this should not normally happen. + (goto-char (point-min)) + (while (re-search-forward po-fuzzy-regexp nil t) + (setq po-fuzzy-counter (1+ po-fuzzy-counter))) + (setq po-translated-counter (- po-translated-counter po-fuzzy-counter))) + '())) + + ;; Push the results out. + (if flag + (message (_"\ +Position %d/%d; %d translated, %d fuzzy, %d untranslated, %d obsolete") + position total po-translated-counter po-fuzzy-counter + po-untranslated-counter po-obsolete-counter) + (message ""))) + (po-update-mode-line-string)) + +(defun po-redisplay () + "Redisplay the current entry." + ;; FIXME: Should try to fit the whole entry on the window. If this is not + ;; possible, should try to fit the comment and the msgid. Otherwise, + ;; should try to fit the msgid. Else, the first line of the msgid should + ;; be at the top of the window. + (goto-char po-start-of-msgid)) + +(defun po-other-window () + "Get the cursor into another window, out of PO mode." + (interactive) + (if (one-window-p t) + (progn + (split-window) + (switch-to-buffer (other-buffer))) + (other-window 1))) + +;;; Processing the PO file header entry. + +(defun po-check-file-header () + "Create a missing PO mode file header, or replace an oldish one. +Can be customized with the `po-auto-update-file-header' variable." + (if (or (eq po-auto-update-file-header t) + (and (eq po-auto-update-file-header 'ask) + (y-or-n-p (_"May I update the PO Header Entry? ")))) + (save-excursion + (save-restriction + (widen) ; in case of a narrowed view to the buffer + (let ((buffer-read-only po-read-only) + insert-flag end-of-header) + (goto-char (point-min)) + (if (re-search-forward po-any-msgstr-block-regexp nil t) + (progn + ;; There is at least one entry. + (goto-char (match-beginning 0)) + (forward-line -1) + (setq end-of-header (match-end 0)) + (if (looking-at "msgid \"\"\n") + ;; There is indeed a PO file header. + (if (re-search-forward "\n\"PO-Revision-Date: " + end-of-header t) + nil + ;; This is an oldish header. Replace it all. + (goto-char end-of-header) + (while (> (point) (point-min)) + (forward-line -1) + (insert "#~ ") + (beginning-of-line)) + (beginning-of-line) + (setq insert-flag t)) + ;; The first entry is not a PO file header, insert one. + (setq insert-flag t))) + ;; Not a single entry found. + (setq insert-flag t)) + (goto-char (point-min)) + (if insert-flag + (progn + (insert po-default-file-header) + (if (not (eobp)) + (insert "\n"))))))) + (message (_"PO Header Entry was not updated...")))) + +(defun po-replace-revision-date () + "Replace the revision date by current time in the PO file header." + (if (fboundp 'format-time-string) + (if (or (eq po-auto-replace-revision-date t) + (and (eq po-auto-replace-revision-date 'ask) + (y-or-n-p (_"May I set PO-Revision-Date? ")))) + (save-excursion + (goto-char (point-min)) + (if (re-search-forward "^\"PO-Revision-Date:.*" nil t) + (let* ((buffer-read-only po-read-only) + (time (current-time)) + (seconds (or (car (current-time-zone time)) 0)) + (minutes (/ (abs seconds) 60)) + (zone (format "%c%02d%02d" + (if (< seconds 0) ?- ?+) + (/ minutes 60) + (% minutes 60)))) + (replace-match + (concat "\"PO-Revision-Date: " + (format-time-string "%Y-%m-%d %H:%M" time) + zone "\\n\"") + t t)))) + (message "")) + (message (_"PO-Revision-Date should be adjusted..."))) + ;; Return nil to indicate that the buffer has not yet been saved. + nil) + +;;; Handling span of entry, entry type and entry attributes. + +(defun po-find-span-of-entry () + "Find the extent of the PO file entry where the cursor is. +Set variables po-start-of-entry, po-start-of-msgctxt, po-start-of-msgid, +po-start-of-msgid_plural, po-start-of-msgstr-block, po-end-of-entry, and +po-entry-type to meaningful values. po-entry-type may be set to: obsolete, +fuzzy, untranslated, or translated." + (let ((here (point))) + (if (re-search-backward po-any-msgstr-block-regexp nil t) + (progn + ;; After a backward match, (match-end 0) will not extend + ;; beyond point, in case point was *inside* the regexp. We + ;; need a dependable (match-end 0), so we redo the match in + ;; the forward direction. + (re-search-forward po-any-msgstr-block-regexp) + (if (<= (match-end 0) here) + (progn + ;; We most probably found the msgstr of the previous + ;; entry. The current entry then starts just after + ;; its end, save this information just in case. + (setq po-start-of-entry (match-end 0)) + ;; However, it is also possible that we are located in + ;; the crumb after the last entry in the file. If + ;; yes, we know the middle and end of last PO entry. + (setq po-start-of-msgstr-block (match-beginning 0) + po-end-of-entry (match-end 0)) + (if (re-search-forward po-any-msgstr-block-regexp nil t) + (progn + ;; We definitely were not in the crumb. + (setq po-start-of-msgstr-block (match-beginning 0) + po-end-of-entry (match-end 0))) + ;; We were in the crumb. The start of the last PO + ;; file entry is the end of the previous msgstr if + ;; any, or else, the beginning of the file. + (goto-char po-start-of-msgstr-block) + (setq po-start-of-entry + (if (re-search-backward po-any-msgstr-block-regexp nil t) + (match-end 0) + (point-min))))) + ;; The cursor was inside msgstr of the current entry. + (setq po-start-of-msgstr-block (match-beginning 0) + po-end-of-entry (match-end 0)) + ;; The start of this entry is the end of the previous + ;; msgstr if any, or else, the beginning of the file. + (goto-char po-start-of-msgstr-block) + (setq po-start-of-entry + (if (re-search-backward po-any-msgstr-block-regexp nil t) + (match-end 0) + (point-min))))) + ;; The cursor was before msgstr in the first entry in the file. + (setq po-start-of-entry (point-min)) + (goto-char po-start-of-entry) + ;; There is at least the PO file header, so this should match. + (re-search-forward po-any-msgstr-block-regexp) + (setq po-start-of-msgstr-block (match-beginning 0) + po-end-of-entry (match-end 0))) + ;; Find start of msgid. + (goto-char po-start-of-entry) + (re-search-forward po-any-msgctxt-msgid-regexp) + (setq po-start-of-msgctxt (match-beginning 0)) + (goto-char po-start-of-entry) + (re-search-forward po-any-msgid-regexp) + (setq po-start-of-msgid (match-beginning 0)) + (save-excursion + (goto-char po-start-of-msgid) + (setq po-start-of-msgid_plural + (if (re-search-forward po-any-msgid_plural-regexp + po-start-of-msgstr-block t) + (match-beginning 0) + nil))) + (save-excursion + (when (>= here po-start-of-msgstr-block) + ;; point was somewhere inside of msgstr* + (goto-char here) + (end-of-line) + (re-search-backward "^\\(#~[ \t]*\\)?msgstr")) + ;; Detect the boundaries of the msgstr we are interested in. + (re-search-forward po-any-msgstr-form-regexp) + (setq po-start-of-msgstr-form (match-beginning 0) + po-end-of-msgstr-form (match-end 0))) + ;; Classify the entry. + (setq po-entry-type + (if (eq (following-char) ?#) + 'obsolete + (goto-char po-start-of-entry) + (if (re-search-forward po-fuzzy-regexp po-start-of-msgctxt t) + 'fuzzy + (goto-char po-start-of-msgstr-block) + (if (looking-at po-untranslated-regexp) + 'untranslated + 'translated)))) + ;; Put the cursor back where it was. + (goto-char here))) + +(defun po-add-attribute (name) + "Add attribute NAME to the current entry, unless it is already there." + (save-excursion + (let ((buffer-read-only po-read-only)) + (goto-char po-start-of-entry) + (if (re-search-forward "\n#, .*" po-start-of-msgctxt t) + (save-restriction + (narrow-to-region (match-beginning 0) (match-end 0)) + (goto-char (point-min)) + (if (re-search-forward (concat "\\b" name "\\b") nil t) + nil + (goto-char (point-max)) + (insert ", " name))) + (skip-chars-forward "\n") + (while (eq (following-char) ?#) + (forward-line 1)) + (insert "#, " name "\n"))))) + +(defun po-delete-attribute (name) + "Delete attribute NAME from the current entry, if any." + (save-excursion + (let ((buffer-read-only po-read-only)) + (goto-char po-start-of-entry) + (if (re-search-forward "\n#, .*" po-start-of-msgctxt t) + (save-restriction + (narrow-to-region (match-beginning 0) (match-end 0)) + (goto-char (point-min)) + (if (re-search-forward + (concat "\\(\n#, " name "$\\|, " name "$\\| " name ",\\)") + nil t) + (replace-match "" t t))))))) + +;;; Entry positionning. + +(defun po-say-location-depth () + "Tell how many entries in the entry location stack." + (let ((depth (length po-marker-stack))) + (cond ((= depth 0) (message (_"Empty location stack"))) + ((= depth 1) (message (_"One entry in location stack"))) + (t (message (_"%d entries in location stack") depth))))) + +(defun po-push-location () + "Stack the location of the current entry, for later return." + (interactive) + (po-find-span-of-entry) + (save-excursion + (goto-char po-start-of-msgid) + (setq po-marker-stack (cons (point-marker) po-marker-stack))) + (po-say-location-depth)) + +(defun po-pop-location () + "Unstack a saved location, and return to the corresponding entry." + (interactive) + (if po-marker-stack + (progn + (goto-char (car po-marker-stack)) + (setq po-marker-stack (cdr po-marker-stack)) + (po-current-entry) + (po-say-location-depth)) + (error (_"The entry location stack is empty")))) + +(defun po-exchange-location () + "Exchange the location of the current entry with the top of stack." + (interactive) + (if po-marker-stack + (progn + (po-find-span-of-entry) + (goto-char po-start-of-msgid) + (let ((location (point-marker))) + (goto-char (car po-marker-stack)) + (setq po-marker-stack (cons location (cdr po-marker-stack)))) + (po-current-entry) + (po-say-location-depth)) + (error (_"The entry location stack is empty")))) + +(defun po-current-entry () + "Display the current entry." + (interactive) + (po-find-span-of-entry) + (po-redisplay)) + +(defun po-first-entry-with-regexp (regexp) + "Display the first entry in the file which msgstr matches REGEXP." + (let ((here (point))) + (goto-char (point-min)) + (if (re-search-forward regexp nil t) + (progn + (goto-char (match-beginning 0)) + (po-current-entry)) + (goto-char here) + (error (_"There is no such entry"))))) + +(defun po-last-entry-with-regexp (regexp) + "Display the last entry in the file which msgstr matches REGEXP." + (let ((here (point))) + (goto-char (point-max)) + (if (re-search-backward regexp nil t) + (po-current-entry) + (goto-char here) + (error (_"There is no such entry"))))) + +(defun po-next-entry-with-regexp (regexp wrap) + "Display the entry following the current entry which msgstr matches REGEXP. +If WRAP is not nil, the search may wrap around the buffer." + (po-find-span-of-entry) + (let ((here (point))) + (goto-char po-end-of-entry) + (if (re-search-forward regexp nil t) + (progn + (goto-char (match-beginning 0)) + (po-current-entry)) + (if (and wrap + (progn + (goto-char (point-min)) + (re-search-forward regexp po-start-of-entry t))) + (progn + (goto-char (match-beginning 0)) + (po-current-entry) + (message (_"Wrapping around the buffer"))) + (goto-char here) + (error (_"There is no such entry")))))) + +(defun po-previous-entry-with-regexp (regexp wrap) + "Redisplay the entry preceding the current entry which msgstr matches REGEXP. +If WRAP is not nil, the search may wrap around the buffer." + (po-find-span-of-entry) + (let ((here (point))) + (goto-char po-start-of-entry) + (if (re-search-backward regexp nil t) + (po-current-entry) + (if (and wrap + (progn + (goto-char (point-max)) + (re-search-backward regexp po-end-of-entry t))) + (progn + (po-current-entry) + (message (_"Wrapping around the buffer"))) + (goto-char here) + (error (_"There is no such entry")))))) + +;; Any entries. + +(defun po-first-entry () + "Display the first entry." + (interactive) + (po-first-entry-with-regexp po-any-msgstr-block-regexp)) + +(defun po-last-entry () + "Display the last entry." + (interactive) + (po-last-entry-with-regexp po-any-msgstr-block-regexp)) + +(defun po-next-entry () + "Display the entry following the current entry." + (interactive) + (po-next-entry-with-regexp po-any-msgstr-block-regexp nil)) + +(defun po-previous-entry () + "Display the entry preceding the current entry." + (interactive) + (po-previous-entry-with-regexp po-any-msgstr-block-regexp nil)) + +;; Untranslated entries. + +(defvar po-after-entry-regexp + "\\(\\'\\|\\(#[ \t]*\\)?$\\)" + "Regexp which should be true after a full msgstr string matched.") + +(defvar po-untranslated-regexp + (concat "^msgstr\\(\\[[0-9]\\]\\)?[ \t]*\"\"\n" po-after-entry-regexp) + "Regexp matching a whole msgstr field, but only if active and empty.") + +(defun po-next-untranslated-entry () + "Find the next untranslated entry, wrapping around if necessary." + (interactive) + (po-next-entry-with-regexp po-untranslated-regexp t)) + +(defun po-previous-untranslated-entry () + "Find the previous untranslated entry, wrapping around if necessary." + (interactive) + (po-previous-entry-with-regexp po-untranslated-regexp t)) + +(defun po-msgid-to-msgstr () + "Use another window to edit msgstr reinitialized with msgid." + (interactive) + (po-find-span-of-entry) + (if (or (eq po-entry-type 'untranslated) + (eq po-entry-type 'obsolete) + (prog1 (y-or-n-p (_"Really lose previous translation? ")) + (message ""))) + ;; In an entry with plural forms, use the msgid_plural string, + ;; as it is more general than the msgid string. + (if (po-set-msgstr-form (or (po-get-msgid_plural) (po-get-msgid))) + (po-maybe-delete-previous-untranslated)))) + +;; Obsolete entries. + +(defvar po-obsolete-msgstr-regexp + "^#~[ \t]*msgstr.*\n\\(#~[ \t]*\".*\n\\)*" + "Regexp matching a whole msgstr field of an obsolete entry.") + +(defun po-next-obsolete-entry () + "Find the next obsolete entry, wrapping around if necessary." + (interactive) + (po-next-entry-with-regexp po-obsolete-msgstr-regexp t)) + +(defun po-previous-obsolete-entry () + "Find the previous obsolete entry, wrapping around if necessary." + (interactive) + (po-previous-entry-with-regexp po-obsolete-msgstr-regexp t)) + +;; Fuzzy entries. + +(defvar po-fuzzy-regexp "^#, .*fuzzy" + "Regexp matching the string inserted by msgmerge for translations +which does not match exactly.") + +(defun po-next-fuzzy-entry () + "Find the next fuzzy entry, wrapping around if necessary." + (interactive) + (po-next-entry-with-regexp po-fuzzy-regexp t)) + +(defun po-previous-fuzzy-entry () + "Find the next fuzzy entry, wrapping around if necessary." + (interactive) + (po-previous-entry-with-regexp po-fuzzy-regexp t)) + +(defun po-unfuzzy () + "Remove the fuzzy attribute for the current entry." + (interactive) + (po-find-span-of-entry) + (cond ((eq po-entry-type 'fuzzy) + (po-decrease-type-counter) + (po-delete-attribute "fuzzy") + (po-maybe-delete-previous-untranslated) + (po-current-entry) + (po-increase-type-counter))) + (if po-auto-select-on-unfuzzy + (po-auto-select-entry)) + (po-update-mode-line-string)) + +;; Translated entries. + +(defun po-next-translated-entry () + "Find the next translated entry, wrapping around if necessary." + (interactive) + (if (= po-translated-counter 0) + (error (_"There is no such entry")) + (po-next-entry-with-regexp po-any-msgstr-block-regexp t) + (po-find-span-of-entry) + (while (not (eq po-entry-type 'translated)) + (po-next-entry-with-regexp po-any-msgstr-block-regexp t) + (po-find-span-of-entry)))) + +(defun po-previous-translated-entry () + "Find the previous translated entry, wrapping around if necessary." + (interactive) + (if (= po-translated-counter 0) + (error (_"There is no such entry")) + (po-previous-entry-with-regexp po-any-msgstr-block-regexp t) + (po-find-span-of-entry) + (while (not (eq po-entry-type 'translated)) + (po-previous-entry-with-regexp po-any-msgstr-block-regexp t) + (po-find-span-of-entry)))) + +;; Auto-selection feature. + +(defun po-auto-select-entry () + "Select the next entry having the same type as the current one. +If none, wrap from the beginning of the buffer with another type, +going from untranslated to fuzzy, and from fuzzy to obsolete. +Plain translated entries are always disregarded unless there are +no entries of the other types." + (interactive) + (po-find-span-of-entry) + (goto-char po-end-of-entry) + (if (and (= po-untranslated-counter 0) + (= po-fuzzy-counter 0) + (= po-obsolete-counter 0)) + ;; All entries are plain translated. Next entry will do, or + ;; wrap around if there is none. + (if (re-search-forward po-any-msgstr-block-regexp nil t) + (goto-char (match-beginning 0)) + (goto-char (point-min))) + ;; If over a translated entry, look for an untranslated one first. + ;; Else, look for an entry of the same type first. + (let ((goal (if (eq po-entry-type 'translated) + 'untranslated + po-entry-type))) + (while goal + ;; Find an untranslated entry, or wrap up for a fuzzy entry. + (if (eq goal 'untranslated) + (if (and (> po-untranslated-counter 0) + (re-search-forward po-untranslated-regexp nil t)) + (progn + (goto-char (match-beginning 0)) + (setq goal nil)) + (goto-char (point-min)) + (setq goal 'fuzzy))) + ;; Find a fuzzy entry, or wrap up for an obsolete entry. + (if (eq goal 'fuzzy) + (if (and (> po-fuzzy-counter 0) + (re-search-forward po-fuzzy-regexp nil t)) + (progn + (goto-char (match-beginning 0)) + (setq goal nil)) + (goto-char (point-min)) + (setq goal 'obsolete))) + ;; Find an obsolete entry, or wrap up for an untranslated entry. + (if (eq goal 'obsolete) + (if (and (> po-obsolete-counter 0) + (re-search-forward po-obsolete-msgstr-regexp nil t)) + (progn + (goto-char (match-beginning 0)) + (setq goal nil)) + (goto-char (point-min)) + (setq goal 'untranslated)))))) + ;; Display this entry nicely. + (po-current-entry)) + +;;; Killing and yanking fields. + +(defun po-extract-unquoted (buffer start end) + "Extract and return the unquoted string in BUFFER going from START to END. +Crumb preceding or following the quoted string is ignored." + (save-excursion + (goto-char start) + (search-forward "\"") + (setq start (point)) + (goto-char end) + (search-backward "\"") + (setq end (point))) + (po-extract-part-unquoted buffer start end)) + +(defun po-extract-part-unquoted (buffer start end) + "Extract and return the unquoted string in BUFFER going from START to END. +Surrounding quotes are already excluded by the position of START and END." + (po-with-temp-buffer + (insert-buffer-substring buffer start end) + ;; Glue concatenated strings. + (goto-char (point-min)) + (while (re-search-forward "\"[ \t]*\\\\?\n\\(#~\\)?[ \t]*\"" nil t) + (replace-match "" t t)) + ;; Remove escaped newlines. + (goto-char (point-min)) + (while (re-search-forward "\\\\[ \t]*\n" nil t) + (replace-match "" t t)) + ;; Unquote individual characters. + (goto-char (point-min)) + (while (re-search-forward "\\\\[\"abfnt\\0-7]" nil t) + (cond ((eq (preceding-char) ?\") (replace-match "\"" t t)) + ((eq (preceding-char) ?a) (replace-match "\a" t t)) + ((eq (preceding-char) ?b) (replace-match "\b" t t)) + ((eq (preceding-char) ?f) (replace-match "\f" t t)) + ((eq (preceding-char) ?n) (replace-match "\n" t t)) + ((eq (preceding-char) ?t) (replace-match "\t" t t)) + ((eq (preceding-char) ?\\) (replace-match "\\" t t)) + (t (let ((value (- (preceding-char) ?0))) + (replace-match "" t t) + (while (looking-at "[0-7]") + (setq value (+ (* 8 value) (- (following-char) ?0))) + (replace-match "" t t)) + (insert value))))) + (buffer-string))) + +(defun po-eval-requoted (form prefix obsolete) + "Eval FORM, which inserts a string, and return the string fully requoted. +If PREFIX, precede the result with its contents. If OBSOLETE, comment all +generated lines in the returned string. Evaluating FORM should insert the +wanted string in the buffer which is current at the time of evaluation. +If FORM is itself a string, then this string is used for insertion." + (po-with-temp-buffer + (if (stringp form) + (insert form) + (push-mark) + (eval form)) + (goto-char (point-min)) + (let ((multi-line (re-search-forward "[^\n]\n+[^\n]" nil t))) + (goto-char (point-min)) + (while (re-search-forward "[\"\a\b\f\n\r\t\\]" nil t) + (cond ((eq (preceding-char) ?\") (replace-match "\\\"" t t)) + ((eq (preceding-char) ?\a) (replace-match "\\a" t t)) + ((eq (preceding-char) ?\b) (replace-match "\\b" t t)) + ((eq (preceding-char) ?\f) (replace-match "\\f" t t)) + ((eq (preceding-char) ?\n) + (replace-match (if (or (not multi-line) (eobp)) + "\\n" + "\\n\"\n\"") + t t)) + ((eq (preceding-char) ?\r) (replace-match "\\r" t t)) + ((eq (preceding-char) ?\t) (replace-match "\\t" t t)) + ((eq (preceding-char) ?\\) (replace-match "\\\\" t t)))) + (goto-char (point-min)) + (if prefix (insert prefix " ")) + (insert (if multi-line "\"\"\n\"" "\"")) + (goto-char (point-max)) + (insert "\"") + (if prefix (insert "\n")) + (if obsolete + (progn + (goto-char (point-min)) + (while (not (eobp)) + (or (eq (following-char) ?\n) (insert "#~ ")) + (search-forward "\n")))) + (buffer-string)))) + +(defun po-get-msgid () + "Extract and return the unquoted msgid string." + (let ((string (po-extract-unquoted (current-buffer) + po-start-of-msgid + (or po-start-of-msgid_plural + po-start-of-msgstr-block)))) + string)) + +(defun po-get-msgid_plural () + "Extract and return the unquoted msgid_plural string. +Return nil if it is not present." + (if po-start-of-msgid_plural + (let ((string (po-extract-unquoted (current-buffer) + po-start-of-msgid_plural + po-start-of-msgstr-block))) + string) + nil)) + +(defun po-get-msgstr-flavor () + "Helper function to detect msgstr and msgstr[] variants. +Returns one of \"msgstr\" or \"msgstr[i]\" for some i." + (save-excursion + (goto-char po-start-of-msgstr-form) + (re-search-forward "^\\(#~[ \t]*\\)?\\(msgstr\\(\\[[0-9]\\]\\)?\\)") + (match-string 2))) + +(defun po-get-msgstr-form () + "Extract and return the unquoted msgstr string." + (let ((string (po-extract-unquoted (current-buffer) + po-start-of-msgstr-form + po-end-of-msgstr-form))) + string)) + +(defun po-set-msgid (form) + "Replace the current msgid, using FORM to get a string. +Evaluating FORM should insert the wanted string in the current buffer. If +FORM is itself a string, then this string is used for insertion. The string +is properly requoted before the replacement occurs. + +Returns 'nil' if the buffer has not been modified, for if the new msgid +described by FORM is merely identical to the msgid already in place." + (let ((string (po-eval-requoted form "msgid" (eq po-entry-type 'obsolete)))) + (save-excursion + (goto-char po-start-of-entry) + (re-search-forward po-any-msgid-regexp po-start-of-msgstr-block) + (and (not (string-equal (po-match-string 0) string)) + (let ((buffer-read-only po-read-only)) + (replace-match string t t) + (goto-char po-start-of-msgid) + (po-find-span-of-entry) + t))))) + +(defun po-set-msgstr-form (form) + "Replace the current msgstr or msgstr[], using FORM to get a string. +Evaluating FORM should insert the wanted string in the current buffer. If +FORM is itself a string, then this string is used for insertion. The string +is properly requoted before the replacement occurs. + +Returns 'nil' if the buffer has not been modified, for if the new msgstr +described by FORM is merely identical to the msgstr already in place." + (let ((string (po-eval-requoted form + (po-get-msgstr-flavor) + (eq po-entry-type 'obsolete)))) + (save-excursion + (goto-char po-start-of-msgstr-form) + (re-search-forward po-any-msgstr-form-regexp po-end-of-msgstr-form) + (and (not (string-equal (po-match-string 0) string)) + (let ((buffer-read-only po-read-only)) + (po-decrease-type-counter) + (replace-match string t t) + (goto-char po-start-of-msgid) + (po-find-span-of-entry) + (po-increase-type-counter) + t))))) + +(defun po-kill-ring-save-msgstr () + "Push the msgstr string from current entry on the kill ring." + (interactive) + (po-find-span-of-entry) + (let ((string (po-get-msgstr-form))) + (po-kill-new string) + string)) + +(defun po-kill-msgstr () + "Empty the msgstr string from current entry, pushing it on the kill ring." + (interactive) + (po-kill-ring-save-msgstr) + (if (po-set-msgstr-form "") + (po-maybe-delete-previous-untranslated))) + +(defun po-yank-msgstr () + "Replace the current msgstr string by the top of the kill ring." + (interactive) + (po-find-span-of-entry) + (if (po-set-msgstr-form (if (eq last-command 'yank) '(yank-pop 1) '(yank))) + (po-maybe-delete-previous-untranslated)) + (setq this-command 'yank)) + +(defun po-fade-out-entry () + "Mark an active entry as fuzzy; obsolete a fuzzy or untranslated entry; +or completely delete an obsolete entry, saving its msgstr on the kill ring." + (interactive) + (po-find-span-of-entry) + + (cond ((eq po-entry-type 'translated) + (po-decrease-type-counter) + (po-add-attribute "fuzzy") + (po-current-entry) + (po-increase-type-counter)) + + ((or (eq po-entry-type 'fuzzy) + (eq po-entry-type 'untranslated)) + (if (y-or-n-p (_"Should I really obsolete this entry? ")) + (progn + (po-decrease-type-counter) + (save-excursion + (save-restriction + (narrow-to-region po-start-of-entry po-end-of-entry) + (let ((buffer-read-only po-read-only)) + (goto-char (point-min)) + (skip-chars-forward "\n") + (while (not (eobp)) + (insert "#~ ") + (search-forward "\n"))))) + (po-current-entry) + (po-increase-type-counter))) + (message "")) + + ((and (eq po-entry-type 'obsolete) + (po-check-for-pending-edit po-start-of-msgid) + (po-check-for-pending-edit po-start-of-msgstr-block)) + (po-decrease-type-counter) + (po-update-mode-line-string) + ;; TODO: Should save all msgstr forms here, not just one. + (po-kill-new (po-get-msgstr-form)) + (let ((buffer-read-only po-read-only)) + (delete-region po-start-of-entry po-end-of-entry)) + (goto-char po-start-of-entry) + (if (re-search-forward po-any-msgstr-block-regexp nil t) + (goto-char (match-beginning 0)) + (re-search-backward po-any-msgstr-block-regexp nil t)) + (po-current-entry) + (message "")))) + +;;; Killing and yanking comments. + +(defvar po-comment-regexp + "^\\(#\n\\|# .*\n\\)+" + "Regexp matching the whole editable comment part of an entry.") + +(defun po-get-comment (kill-flag) + "Extract and return the editable comment string, uncommented. +If KILL-FLAG, then add the unquoted comment to the kill ring." + (let ((buffer (current-buffer)) + (obsolete (eq po-entry-type 'obsolete))) + (save-excursion + (goto-char po-start-of-entry) + (if (re-search-forward po-comment-regexp po-end-of-entry t) + (po-with-temp-buffer + (insert-buffer-substring buffer (match-beginning 0) (match-end 0)) + (goto-char (point-min)) + (while (not (eobp)) + (if (looking-at (if obsolete "#\\(\n\\| \\)" "# ?")) + (replace-match "" t t)) + (forward-line 1)) + (and kill-flag (copy-region-as-kill (point-min) (point-max))) + (buffer-string)) + "")))) + +(defun po-set-comment (form) + "Using FORM to get a string, replace the current editable comment. +Evaluating FORM should insert the wanted string in the current buffer. +If FORM is itself a string, then this string is used for insertion. +The string is properly recommented before the replacement occurs." + (let ((obsolete (eq po-entry-type 'obsolete)) + string) + (po-with-temp-buffer + (if (stringp form) + (insert form) + (push-mark) + (eval form)) + (if (not (or (bobp) (= (preceding-char) ?\n))) + (insert "\n")) + (goto-char (point-min)) + (while (not (eobp)) + (insert (if (= (following-char) ?\n) "#" "# ")) + (search-forward "\n")) + (setq string (buffer-string))) + (goto-char po-start-of-entry) + (if (re-search-forward po-comment-regexp po-end-of-entry t) + (if (not (string-equal (po-match-string 0) string)) + (let ((buffer-read-only po-read-only)) + (replace-match string t t))) + (skip-chars-forward " \t\n") + (let ((buffer-read-only po-read-only)) + (insert string)))) + (po-current-entry)) + +(defun po-kill-ring-save-comment () + "Push the msgstr string from current entry on the kill ring." + (interactive) + (po-find-span-of-entry) + (po-get-comment t)) + +(defun po-kill-comment () + "Empty the msgstr string from current entry, pushing it on the kill ring." + (interactive) + (po-kill-ring-save-comment) + (po-set-comment "") + (po-redisplay)) + +(defun po-yank-comment () + "Replace the current comment string by the top of the kill ring." + (interactive) + (po-find-span-of-entry) + (po-set-comment (if (eq last-command 'yank) '(yank-pop 1) '(yank))) + (setq this-command 'yank) + (po-redisplay)) + +;;; Deleting the "previous untranslated" comment. + +(defun po-previous-untranslated-region-for (rx) + "Return the list of previous untranslated regions (at most one) for the +given regular expression RX." + (save-excursion + (goto-char po-start-of-entry) + (if (re-search-forward rx po-start-of-msgctxt t) + (list (cons (copy-marker (match-beginning 0)) + (copy-marker (match-end 0)))) + nil))) + +(defun po-previous-untranslated-regions () + "Return the list of previous untranslated regions in the current entry." + (append (po-previous-untranslated-region-for po-any-previous-msgctxt-regexp) + (po-previous-untranslated-region-for po-any-previous-msgid-regexp) + (po-previous-untranslated-region-for po-any-previous-msgid_plural-regexp))) + +(defun po-delete-previous-untranslated () + "Delete the previous msgctxt, msgid, msgid_plural fields (marked as #| +comments) from the current entry." + (interactive) + (po-find-span-of-entry) + (let ((buffer-read-only po-read-only)) + (dolist (region (po-previous-untranslated-regions)) + (delete-region (car region) (cdr region)))) + (po-redisplay)) + +(defun po-maybe-delete-previous-untranslated () + "Delete the previous msgctxt, msgid, msgid_plural fields (marked as #| +comments) from the current entry, if the user gives the permission." + (po-find-span-of-entry) + (let ((previous-regions (po-previous-untranslated-regions))) + (if previous-regions + (if (or (eq po-auto-delete-previous-msgid t) + (and (eq po-auto-delete-previous-msgid 'ask) + (let ((overlays nil)) + (unwind-protect + (progn + (setq overlays + (mapcar (function + (lambda (region) + (let ((overlay (po-create-overlay))) + (po-highlight overlay (car region) (cdr region)) + overlay))) + previous-regions)) + ;; Scroll, to show the previous-regions. + (goto-char (car (car previous-regions))) + (prog1 (y-or-n-p (_"Delete previous msgid comments? ")) + (message ""))) + (mapc 'po-dehighlight overlays))))) + (let ((buffer-read-only po-read-only)) + (dolist (region previous-regions) + (delete-region (car region) (cdr region)))))))) + +;;; Editing management and submode. + +;; In a string edit buffer, BACK-POINTER points to one of the slots of the +;; list EDITED-FIELDS kept in the PO buffer. See its description elsewhere. +;; Reminder: slots have the form (ENTRY-MARKER EDIT-BUFFER OVERLAY-INFO). + +(defvar po-subedit-back-pointer) + +(defun po-clean-out-killed-edits () + "From EDITED-FIELDS, clean out any edit having a killed edit buffer." + (let ((cursor po-edited-fields)) + (while cursor + (let ((slot (car cursor))) + (setq cursor (cdr cursor)) + (if (buffer-name (nth 1 slot)) + nil + (let ((overlay (nth 2 slot))) + (and overlay (po-dehighlight overlay))) + (setq po-edited-fields (delete slot po-edited-fields))))))) + +(defun po-check-all-pending-edits () + "Resume any pending edit. Return nil if some remains." + (po-clean-out-killed-edits) + (or (null po-edited-fields) + (let ((slot (car po-edited-fields))) + (goto-char (nth 0 slot)) + (pop-to-buffer (nth 1 slot)) + (let ((overlay (nth 2 slot))) + (and overlay (po-rehighlight overlay))) + (message po-subedit-message) + nil))) + +(defun po-check-for-pending-edit (position) + "Resume any pending edit at POSITION. Return nil if such edit exists." + (po-clean-out-killed-edits) + (let ((marker (make-marker))) + (set-marker marker position) + (let ((slot (assoc marker po-edited-fields))) + (if slot + (progn + (goto-char marker) + (pop-to-buffer (nth 1 slot)) + (let ((overlay (nth 2 slot))) + (and overlay (po-rehighlight overlay))) + (message po-subedit-message))) + (not slot)))) + +(defun po-edit-out-full () + "Get out of PO mode, leaving PO file buffer in fundamental mode." + (interactive) + (if (po-check-all-pending-edits) + ;; Don't ask the user for confirmation, since he has explicitly asked + ;; for it. + (progn + (setq buffer-read-only po-read-only) + (fundamental-mode) + (message (_"Type 'M-x po-mode RET' once done"))))) + +(defun po-ediff-quit () + "Quit ediff and exit `recursive-edit'." + (interactive) + (ediff-quit t) + (exit-recursive-edit)) + +(add-hook 'ediff-keymap-setup-hook + '(lambda () + (define-key ediff-mode-map "Q" 'po-ediff-quit))) + +(defun po-ediff-buffers-exit-recursive (b1 b2 oldbuf end) + "Ediff buffer B1 and B2, pop back to OLDBUF and replace the old variants. +This function will delete the first two variants in OLDBUF, call +`ediff-buffers' to compare both strings and replace the two variants in +OLDBUF with the contents of B2. +Once done kill B1 and B2. + +For more info cf. `po-subedit-ediff'." + (ediff-buffers b1 b2) + (recursive-edit) + (pop-to-buffer oldbuf) + (delete-region (point-min) end) + (insert-buffer-substring b2) + (mapc 'kill-buffer `(,b1 ,b2)) + (display-buffer entry-buffer t)) + +(defun po-subedit-ediff () + "Edit the subedit buffer using `ediff'. +`po-subedit-ediff' calls `po-ediff-buffers-exit-recursive' to edit translation +variants side by side if they are actually different; if variants are equal just +delete the first one. + +`msgcat' is able to produce those variants; every variant is marked with: + +#-#-#-#-# file name reference #-#-#-#-# + +Put changes in second buffer. + +When done with the `ediff' session press \\[exit-recursive-edit] exit to +`recursive-edit', or call \\[po-ediff-quit] (`Q') in the ediff control panel." + (interactive) + (let* ((marker-regex "^#-#-#-#-# \\(.*\\) #-#-#-#-#\n") + (buf1 " *po-msgstr-1") ; default if first marker is missing + buf2 start-1 end-1 start-2 end-2 + (back-pointer po-subedit-back-pointer) + (entry-marker (nth 0 back-pointer)) + (entry-buffer (marker-buffer entry-marker))) + (goto-char (point-min)) + (if (looking-at marker-regex) + (and (setq buf1 (match-string-no-properties 1)) + (forward-line 1))) + (setq start-1 (point)) + (if (not (re-search-forward marker-regex (point-max) t)) + (error "Only 1 msgstr found") + (setq buf2 (match-string-no-properties 1) + end-1 (match-beginning 0)) + (let ((oldbuf (current-buffer))) + (save-current-buffer + (set-buffer (get-buffer-create + (generate-new-buffer-name buf1))) + (setq buffer-read-only nil) + (erase-buffer) + (insert-buffer-substring oldbuf start-1 end-1) + (setq buffer-read-only t)) + + (setq start-2 (point)) + (save-excursion + ;; check for a third variant; if found ignore it + (if (re-search-forward marker-regex (point-max) t) + (setq end-2 (match-beginning 0)) + (setq end-2 (goto-char (1- (point-max)))))) + (save-current-buffer + (set-buffer (get-buffer-create + (generate-new-buffer-name buf2))) + (erase-buffer) + (insert-buffer-substring oldbuf start-2 end-2)) + + (if (not (string-equal (buffer-substring-no-properties start-1 end-1) + (buffer-substring-no-properties start-2 end-2))) + (po-ediff-buffers-exit-recursive buf1 buf2 oldbuf end-2) + (message "Variants are equal; delete %s" buf1) + (forward-line -1) + (delete-region (point-min) (point))))))) + +(defun po-subedit-abort () + "Exit the subedit buffer, merely discarding its contents." + (interactive) + (let* ((edit-buffer (current-buffer)) + (back-pointer po-subedit-back-pointer) + (entry-marker (nth 0 back-pointer)) + (overlay-info (nth 2 back-pointer)) + (entry-buffer (marker-buffer entry-marker))) + (if (null entry-buffer) + (error (_"Corresponding PO buffer does not exist anymore")) + (or (one-window-p) (delete-window)) + (switch-to-buffer entry-buffer) + (goto-char entry-marker) + (and overlay-info (po-dehighlight overlay-info)) + (kill-buffer edit-buffer) + (setq po-edited-fields (delete back-pointer po-edited-fields))))) + +(defun po-subedit-exit () + "Exit the subedit buffer, replacing the string in the PO buffer." + (interactive) + (goto-char (point-max)) + (skip-chars-backward " \t\n") + (if (eq (preceding-char) ?<) + (delete-region (1- (point)) (point-max))) + (run-hooks 'po-subedit-exit-hook) + (let ((string (buffer-string))) + (po-subedit-abort) + (po-find-span-of-entry) + (cond ((= (point) po-start-of-msgid) + (po-set-comment string) + (po-redisplay)) + ((= (point) po-start-of-msgstr-form) + (if (po-set-msgstr-form string) + (progn + (po-maybe-delete-previous-untranslated) + (if (and po-auto-fuzzy-on-edit + (eq po-entry-type 'translated)) + (progn + (po-decrease-type-counter) + (po-add-attribute "fuzzy") + (po-current-entry) + (po-increase-type-counter)))))) + (t (debug))))) + +(defun po-edit-string (string type expand-tabs) + "Prepare a pop up buffer for editing STRING, which is of a given TYPE. +TYPE may be 'comment or 'msgstr. If EXPAND-TABS, expand tabs to spaces. +Run functions on po-subedit-mode-hook." + (let ((marker (make-marker))) + (set-marker marker (cond ((eq type 'comment) po-start-of-msgid) + ((eq type 'msgstr) po-start-of-msgstr-form))) + (if (po-check-for-pending-edit marker) + (let ((edit-buffer (generate-new-buffer + (concat "*" (buffer-name) "*"))) + (edit-coding buffer-file-coding-system) + (buffer (current-buffer)) + overlay slot) + (if (and (eq type 'msgstr) po-highlighting) + ;; ;; Try showing all of msgid in the upper window while editing. + ;; (goto-char (1- po-start-of-msgstr-block)) + ;; (recenter -1) + (save-excursion + (goto-char po-start-of-entry) + (re-search-forward po-any-msgid-regexp nil t) + (let ((end (1- (match-end 0)))) + (goto-char (match-beginning 0)) + (re-search-forward "msgid +" nil t) + (setq overlay (po-create-overlay)) + (po-highlight overlay (point) end buffer)))) + (setq slot (list marker edit-buffer overlay) + po-edited-fields (cons slot po-edited-fields)) + (pop-to-buffer edit-buffer) + (text-mode) + (set (make-local-variable 'po-subedit-back-pointer) slot) + (set (make-local-variable 'indent-line-function) + 'indent-relative) + (setq buffer-file-coding-system edit-coding) + (setq local-abbrev-table po-mode-abbrev-table) + (erase-buffer) + (insert string "<") + (goto-char (point-min)) + (and expand-tabs (setq indent-tabs-mode nil)) + (use-local-map po-subedit-mode-map) + (if (fboundp 'easy-menu-define) + (progn + (easy-menu-define po-subedit-mode-menu po-subedit-mode-map "" + po-subedit-mode-menu-layout) + (and po-XEMACS (easy-menu-add po-subedit-mode-menu)))) + (set-syntax-table po-subedit-mode-syntax-table) + (run-hooks 'po-subedit-mode-hook) + (message po-subedit-message))))) + +(defun po-edit-comment () + "Use another window to edit the current translator comment." + (interactive) + (po-find-span-of-entry) + (po-edit-string (po-get-comment nil) 'comment nil)) + +(defun po-edit-comment-and-ediff () + "Use `ediff' to edit the current translator comment. +This function calls `po-edit-msgstr' and `po-subedit-ediff'; for more info +read `po-subedit-ediff' documentation." + (interactive) + (po-edit-comment) + (po-subedit-ediff)) + +(defun po-edit-msgstr () + "Use another window to edit the current msgstr." + (interactive) + (po-find-span-of-entry) + (po-edit-string (if (and po-auto-edit-with-msgid + (eq po-entry-type 'untranslated)) + (po-get-msgid) + (po-get-msgstr-form)) + 'msgstr + t)) + +(defun po-edit-msgstr-and-ediff () + "Use `ediff' to edit the current msgstr. +This function calls `po-edit-msgstr' and `po-subedit-ediff'; for more info +read `po-subedit-ediff' documentation." + (interactive) + (po-edit-msgstr) + (po-subedit-ediff)) + +;;; String normalization and searching. + +(defun po-normalize-old-style (explain) + "Normalize old gettext style fields using K&R C multiline string syntax. +To minibuffer messages sent while normalizing, add the EXPLAIN string." + (let ((here (point-marker)) + (counter 0) + (buffer-read-only po-read-only)) + (goto-char (point-min)) + (message (_"Normalizing %d, %s") counter explain) + (while (re-search-forward + "\\(^#?[ \t]*msg\\(id\\|str\\)[ \t]*\"\\|[^\" \t][ \t]*\\)\\\\\n" + nil t) + (if (= (% counter 10) 0) + (message (_"Normalizing %d, %s") counter explain)) + (replace-match "\\1\"\n\"" t nil) + (setq counter (1+ counter))) + (goto-char here) + (message (_"Normalizing %d...done") counter))) + +(defun po-normalize-field (field explain) + "Normalize FIELD of all entries. FIELD is either the symbol msgid or msgstr. +To minibuffer messages sent while normalizing, add the EXPLAIN string." + (let ((here (point-marker)) + (counter 0)) + (goto-char (point-min)) + (while (re-search-forward po-any-msgstr-block-regexp nil t) + (if (= (% counter 10) 0) + (message (_"Normalizing %d, %s") counter explain)) + (goto-char (match-beginning 0)) + (po-find-span-of-entry) + (cond ((eq field 'msgid) (po-set-msgid (po-get-msgid))) + ((eq field 'msgstr) (po-set-msgstr-form (po-get-msgstr-form)))) + (goto-char po-end-of-entry) + (setq counter (1+ counter))) + (goto-char here) + (message (_"Normalizing %d...done") counter))) + +;; Normalize, but the British way! :-) +(defsubst po-normalise () (po-normalize)) + +(defun po-normalize () + "Normalize all entries in the PO file." + (interactive) + (po-normalize-old-style (_"pass 1/3")) + ;; FIXME: This cannot work: t and nil are not msgid and msgstr. + (po-normalize-field t (_"pass 2/3")) + (po-normalize-field nil (_"pass 3/3")) + ;; The last PO file entry has just been processed. + (if (not (= po-end-of-entry (point-max))) + (let ((buffer-read-only po-read-only)) + (kill-region po-end-of-entry (point-max)))) + ;; A bizarre format might have fooled the counters, so recompute + ;; them to make sure their value is dependable. + (po-compute-counters nil)) + +;;; Multiple PO files. + +(defun po-show-auxiliary-list () + "Echo the current auxiliary list in the message area." + (if po-auxiliary-list + (let ((cursor po-auxiliary-cursor) + string) + (while cursor + (setq string (concat string (if string " ") (car (car cursor))) + cursor (cdr cursor))) + (setq cursor po-auxiliary-list) + (while (not (eq cursor po-auxiliary-cursor)) + (setq string (concat string (if string " ") (car (car cursor))) + cursor (cdr cursor))) + (message string)) + (message (_"No auxiliary files.")))) + +(defun po-consider-as-auxiliary () + "Add the current PO file to the list of auxiliary files." + (interactive) + (if (member (list buffer-file-name) po-auxiliary-list) + nil + (setq po-auxiliary-list + (nconc po-auxiliary-list (list (list buffer-file-name)))) + (or po-auxiliary-cursor + (setq po-auxiliary-cursor po-auxiliary-list))) + (po-show-auxiliary-list)) + +(defun po-ignore-as-auxiliary () + "Delete the current PO file from the list of auxiliary files." + (interactive) + (setq po-auxiliary-list (delete (list buffer-file-name) po-auxiliary-list) + po-auxiliary-cursor po-auxiliary-list) + (po-show-auxiliary-list)) + +(defun po-seek-equivalent-translation (name string) + "Search a PO file NAME for a 'msgid' STRING having a non-empty 'msgstr'. +STRING is the full quoted msgid field, including the 'msgid' keyword. When +found, display the file over the current window, with the 'msgstr' field +possibly highlighted, the cursor at start of msgid, then return 't'. +Otherwise, move nothing, and just return 'nil'." + (let ((current (current-buffer)) + (buffer (find-file-noselect name))) + (set-buffer buffer) + (let ((start (point)) + found) + (goto-char (point-min)) + (while (and (not found) (search-forward string nil t)) + ;; Screen out longer 'msgid's. + (if (looking-at "^msgstr ") + (progn + (po-find-span-of-entry) + ;; Ignore an untranslated entry. + (or (string-equal + (buffer-substring po-start-of-msgstr-block po-end-of-entry) + "msgstr \"\"\n") + (setq found t))))) + (if found + (progn + (switch-to-buffer buffer) + (po-find-span-of-entry) + (if po-highlighting + (progn + (goto-char po-start-of-entry) + (re-search-forward po-any-msgstr-block-regexp nil t) + (let ((end (1- (match-end 0)))) + (goto-char (match-beginning 0)) + (re-search-forward "msgstr +" nil t) + ;; Just "borrow" the marking overlay. + (po-highlight po-marking-overlay (point) end)))) + (goto-char po-start-of-msgid)) + (goto-char start) + (po-find-span-of-entry) + (set-buffer current)) + found))) + +(defun po-cycle-auxiliary () + "Select the next auxiliary file having an entry with same 'msgid'." + (interactive) + (po-find-span-of-entry) + (if po-auxiliary-list + (let ((string (buffer-substring po-start-of-msgid + po-start-of-msgstr-block)) + (cursor po-auxiliary-cursor) + found name) + (while (and (not found) cursor) + (setq name (car (car cursor))) + (if (and (not (string-equal buffer-file-name name)) + (po-seek-equivalent-translation name string)) + (setq found t + po-auxiliary-cursor cursor)) + (setq cursor (cdr cursor))) + (setq cursor po-auxiliary-list) + (while (and (not found) cursor) + (setq name (car (car cursor))) + (if (and (not (string-equal buffer-file-name name)) + (po-seek-equivalent-translation name string)) + (setq found t + po-auxiliary-cursor cursor)) + (setq cursor (cdr cursor))) + (or found (message (_"No other translation found"))) + found))) + +(defun po-subedit-cycle-auxiliary () + "Cycle auxiliary file, but from the translation edit buffer." + (interactive) + (let* ((entry-marker (nth 0 po-subedit-back-pointer)) + (entry-buffer (marker-buffer entry-marker)) + (buffer (current-buffer))) + (pop-to-buffer entry-buffer) + (po-cycle-auxiliary) + (pop-to-buffer buffer))) + +(defun po-select-auxiliary () + "Select one of the available auxiliary files and locate an equivalent entry. +If an entry having the same 'msgid' cannot be found, merely select the file +without moving its cursor." + (interactive) + (po-find-span-of-entry) + (if po-auxiliary-list + (let ((string + (buffer-substring po-start-of-msgid po-start-of-msgstr-block)) + (name (car (assoc (completing-read (_"Which auxiliary file? ") + po-auxiliary-list nil t) + po-auxiliary-list)))) + (po-consider-as-auxiliary) + (or (po-seek-equivalent-translation name string) + (find-file name))))) + +;;; Original program sources as context. + +(defun po-show-source-path () + "Echo the current source search path in the message area." + (if po-search-path + (let ((cursor po-search-path) + string) + (while cursor + (setq string (concat string (if string " ") (car (car cursor))) + cursor (cdr cursor))) + (message string)) + (message (_"Empty source path.")))) + +(defun po-consider-source-path (directory) + "Add a given DIRECTORY, requested interactively, to the source search path." + (interactive "DDirectory for search path: ") + (setq po-search-path (cons (list (if (string-match "/$" directory) + directory + (concat directory "/"))) + po-search-path)) + (setq po-reference-check 0) + (po-show-source-path)) + +(defun po-ignore-source-path () + "Delete a directory, selected with completion, from the source search path." + (interactive) + (setq po-search-path + (delete (list (completing-read (_"Directory to remove? ") + po-search-path nil t)) + po-search-path)) + (setq po-reference-check 0) + (po-show-source-path)) + +(defun po-ensure-source-references () + "Extract all references into a list, with paths resolved, if necessary." + (po-find-span-of-entry) + (if (= po-start-of-entry po-reference-check) + nil + (setq po-reference-alist nil) + (save-excursion + (goto-char po-start-of-entry) + (if (re-search-forward "^#:" po-start-of-msgid t) + (let (current name line path file) + (while (looking-at "\\(\n#:\\)? *\\([^: ]*\\):\\([0-9]+\\)") + (goto-char (match-end 0)) + (setq name (po-match-string 2) + line (po-match-string 3) + path po-search-path) + (if (string-equal name "") + nil + (while (and (not (file-exists-p + (setq file (concat (car (car path)) name)))) + path) + (setq path (cdr path))) + (setq current (and path file))) + (if current + (setq po-reference-alist + (cons (list (concat current ":" line) + current + (string-to-number line)) + po-reference-alist))))))) + (setq po-reference-alist (nreverse po-reference-alist) + po-reference-cursor po-reference-alist + po-reference-check po-start-of-entry))) + +(defun po-show-source-context (triplet) + "Show the source context given a TRIPLET which is (PROMPT FILE LINE)." + (find-file-other-window (car (cdr triplet))) + (goto-line (car (cdr (cdr triplet)))) + (other-window 1) + (let ((maximum 0) + position + (cursor po-reference-alist)) + (while (not (eq triplet (car cursor))) + (setq maximum (1+ maximum) + cursor (cdr cursor))) + (setq position (1+ maximum) + po-reference-cursor cursor) + (while cursor + (setq maximum (1+ maximum) + cursor (cdr cursor))) + (message (_"Displaying %d/%d: \"%s\"") position maximum (car triplet)))) + +(defun po-cycle-source-reference () + "Display some source context for the current entry. +If the command is repeated many times in a row, cycle through contexts." + (interactive) + (po-ensure-source-references) + (if po-reference-cursor + (po-show-source-context + (car (if (eq last-command 'po-cycle-source-reference) + (or (cdr po-reference-cursor) po-reference-alist) + po-reference-cursor))) + (error (_"No resolved source references")))) + +(defun po-select-source-reference () + "Select one of the available source contexts for the current entry." + (interactive) + (po-ensure-source-references) + (if po-reference-alist + (po-show-source-context + (assoc + (completing-read (_"Which source context? ") po-reference-alist nil t) + po-reference-alist)) + (error (_"No resolved source references")))) + +;;; String marking in program sources, through TAGS table. + +;; Globally defined within tags.el. +(defvar tags-loop-operate) +(defvar tags-loop-scan) + +;; Locally set in each program source buffer. +(defvar po-find-string-function) +(defvar po-mark-string-function) + +;; Dynamically set within po-tags-search for po-tags-loop-operate. +(defvar po-current-po-buffer) +(defvar po-current-po-keywords) + +(defun po-tags-search (restart) + "Find an unmarked translatable string through all files in tags table. +Disregard some simple strings which are most probably non-translatable. +With prefix argument, restart search at first file." + (interactive "P") + (require 'etags) + ;; Ensure there is no highlighting, in case the search fails. + (if po-highlighting + (po-dehighlight po-marking-overlay)) + (setq po-string-contents nil) + ;; Search for a string which might later be marked for translation. + (let ((po-current-po-buffer (current-buffer)) + (po-current-po-keywords po-keywords)) + (pop-to-buffer po-string-buffer) + (if (and (not restart) + (eq (car tags-loop-operate) 'po-tags-loop-operate)) + ;; Continue last po-tags-search. + (tags-loop-continue nil) + ;; Start or restart po-tags-search all over. + (setq tags-loop-scan '(po-tags-loop-scan) + tags-loop-operate '(po-tags-loop-operate)) + (tags-loop-continue t)) + (select-window (get-buffer-window po-current-po-buffer))) + (if po-string-contents + (let ((window (selected-window)) + (buffer po-string-buffer) + (start po-string-start) + (end po-string-end)) + ;; Try to fit the string in the displayed part of its window. + (select-window (get-buffer-window buffer)) + (goto-char start) + (or (pos-visible-in-window-p start) + (recenter '(nil))) + (if (pos-visible-in-window-p end) + (goto-char end) + (goto-char end) + (recenter -1)) + (select-window window) + ;; Highlight the string as found. + (and po-highlighting + (po-highlight po-marking-overlay start end buffer))))) + +(defun po-tags-loop-scan () + "Decide if the current buffer is still interesting for PO mode strings." + ;; We have little choice, here. The major mode is needed to dispatch to the + ;; proper scanner, so we declare all files as interesting, to force Emacs + ;; tags module to revisit files fully. po-tags-loop-operate sets point at + ;; end of buffer when it is done with a file. + (not (eobp))) + +(defun po-tags-loop-operate () + "Find an acceptable tag in the current buffer, according to mode. +Disregard some simple strings which are most probably non-translatable." + (po-preset-string-functions) + (let ((continue t) + data) + (while continue + (setq data (apply po-find-string-function po-current-po-keywords nil)) + (if data + ;; Push the string just found into a work buffer for study. + (po-with-temp-buffer + (insert (nth 0 data)) + (goto-char (point-min)) + ;; Accept if at least three letters in a row. + (if (re-search-forward "[A-Za-z][A-Za-z][A-Za-z]" nil t) + (setq continue nil) + ;; Disregard if single letters or no letters at all. + (if (re-search-forward "[A-Za-z][A-Za-z]" nil t) + ;; Here, we have two letters in a row, but never more. + ;; Accept only if more letters than punctuations. + (let ((total (buffer-size))) + (goto-char (point-min)) + (while (re-search-forward "[A-Za-z]+" nil t) + (replace-match "" t t)) + (if (< (* 2 (buffer-size)) total) + (setq continue nil)))))) + ;; No string left in this buffer. + (setq continue nil))) + (if data + ;; Save information for marking functions. + (let ((buffer (current-buffer))) + (save-excursion + (set-buffer po-current-po-buffer) + (setq po-string-contents (nth 0 data) + po-string-buffer buffer + po-string-start (nth 1 data) + po-string-end (nth 2 data)))) + (goto-char (point-max))) + ;; If nothing was found, trigger scanning of next file. + (not data))) + +(defun po-mark-found-string (keyword) + "Mark last found string in program sources as translatable, using KEYWORD." + (if (not po-string-contents) + (error (_"No such string"))) + (and po-highlighting (po-dehighlight po-marking-overlay)) + (let ((contents po-string-contents) + (buffer po-string-buffer) + (start po-string-start) + (end po-string-end) + line string) + ;; Mark string in program sources. + (save-excursion + (set-buffer buffer) + (setq line (count-lines (point-min) start)) + (apply po-mark-string-function start end keyword nil)) + ;; Add PO file entry. + (let ((buffer-read-only po-read-only)) + (goto-char (point-max)) + (insert "\n" (format "#: %s:%d\n" + (buffer-file-name po-string-buffer) + line)) + (save-excursion + (insert (po-eval-requoted contents "msgid" nil) "msgstr \"\"\n")) + (setq po-untranslated-counter (1+ po-untranslated-counter)) + (po-update-mode-line-string)) + (setq po-string-contents nil))) + +(defun po-mark-translatable () + "Mark last found string in program sources as translatable, using '_'." + (interactive) + (po-mark-found-string "_")) + +(defun po-select-mark-and-mark (arg) + "Mark last found string in program sources as translatable, ask for keywoard, +using completion. With prefix argument, just ask the name of a preferred +keyword for subsequent commands, also added to possible completions." + (interactive "P") + (if arg + (let ((keyword (list (read-from-minibuffer (_"Keyword: "))))) + (setq po-keywords (cons keyword (delete keyword po-keywords)))) + (or po-string-contents (error (_"No such string"))) + (let* ((default (car (car po-keywords))) + (keyword (completing-read (format (_"Mark with keywoard? [%s] ") + default) + po-keywords nil t ))) + (if (string-equal keyword "") (setq keyword default)) + (po-mark-found-string keyword)))) + +;;; Unknown mode specifics. + +(defun po-preset-string-functions () + "Preset FIND-STRING-FUNCTION and MARK-STRING-FUNCTION according to mode. +These variables are locally set in source buffer only when not already bound." + (let ((pair (cond ((string-equal mode-name "AWK") + '(po-find-awk-string . po-mark-awk-string)) + ((member mode-name '("C" "C++")) + '(po-find-c-string . po-mark-c-string)) + ((string-equal mode-name "Emacs-Lisp") + '(po-find-emacs-lisp-string . po-mark-emacs-lisp-string)) + ((string-equal mode-name "Python") + '(po-find-python-string . po-mark-python-string)) + ((and (string-equal mode-name "Shell-script") + (string-equal mode-line-process "[bash]")) + '(po-find-bash-string . po-mark-bash-string)) + (t '(po-find-unknown-string . po-mark-unknown-string))))) + (or (boundp 'po-find-string-function) + (set (make-local-variable 'po-find-string-function) (car pair))) + (or (boundp 'po-mark-string-function) + (set (make-local-variable 'po-mark-string-function) (cdr pair))))) + +(defun po-find-unknown-string (keywords) + "Dummy function to skip over a file, finding no string in it." + nil) + +(defun po-mark-unknown-string (start end keyword) + "Dummy function to mark a given string. May not be called." + (error (_"Dummy function called"))) + +;;; Awk mode specifics. + +(defun po-find-awk-string (keywords) + "Find the next Awk string, excluding those marked by any of KEYWORDS. +Return (CONTENTS START END) for the found string, or nil if none found." + (let (start end) + (while (and (not start) + (re-search-forward "[#/\"]" nil t)) + (cond ((= (preceding-char) ?#) + ;; Disregard comments. + (or (search-forward "\n" nil t) + (goto-char (point-max)))) + ((= (preceding-char) ?/) + ;; Skip regular expressions. + (while (not (= (following-char) ?/)) + (skip-chars-forward "^/\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (forward-char 1)) + ;; Else find the end of the string. + (t (setq start (1- (point))) + (while (not (= (following-char) ?\")) + (skip-chars-forward "^\"\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (forward-char 1) + (setq end (point)) + ;; Check before string either for underline, or for keyword + ;; and opening parenthesis. + (save-excursion + (goto-char start) + (cond ((= (preceding-char) ?_) + ;; Disregard already marked strings. + (setq start nil + end nil)) + ((= (preceding-char) ?\() + (backward-char 1) + (let ((end-keyword (point))) + (skip-chars-backward "_A-Za-z0-9") + (if (member (list (po-buffer-substring + (point) end-keyword)) + keywords) + ;; Disregard already marked strings. + (setq start nil + end nil))))))))) + (and start end + (list (po-extract-unquoted (current-buffer) start end) start end)))) + +(defun po-mark-awk-string (start end keyword) + "Mark the Awk string, from START to END, with KEYWORD. +Leave point after marked string." + (if (string-equal keyword "_") + (progn + (goto-char start) + (insert "_") + (goto-char (1+ end))) + (goto-char end) + (insert ")") + (save-excursion + (goto-char start) + (insert keyword "(")))) + +;;; Bash mode specifics. + +(defun po-find-bash-string (keywords) + "Find the next unmarked Bash string. KEYWORDS are merely ignored. +Return (CONTENTS START END) for the found string, or nil if none found." + (let (start end) + (while (and (not start) + (re-search-forward "[#'\"]" nil t)) + (cond ((= (preceding-char) ?#) + ;; Disregard comments. + (or (search-forward "\n" nil t) + (goto-char (point-max)))) + ((= (preceding-char) ?') + ;; Skip single quoted strings. + (while (not (= (following-char) ?')) + (skip-chars-forward "^'\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (forward-char 1)) + ;; Else find the end of the double quoted string. + (t (setq start (1- (point))) + (while (not (= (following-char) ?\")) + (skip-chars-forward "^\"\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (forward-char 1) + (setq end (point)) + ;; Check before string for dollar sign. + (save-excursion + (goto-char start) + (if (= (preceding-char) ?$) + ;; Disregard already marked strings. + (setq start nil + end nil)))))) + (and start end + (list (po-extract-unquoted (current-buffer) start end) start end)))) + +(defun po-mark-bash-string (start end keyword) + "Mark the Bash string, from START to END, with '$'. KEYWORD is ignored. +Leave point after marked string." + (goto-char start) + (insert "$") + (goto-char (1+ end))) + +;;; C or C++ mode specifics. + +;;; A few long string cases (submitted by Ben Pfaff). + +;; #define string "This is a long string " \ +;; "that is continued across several lines " \ +;; "in a macro in order to test \\ quoting\\" \ +;; "\\ with goofy strings.\\" + +;; char *x = "This is just an ordinary string " +;; "continued across several lines without needing " +;; "to use \\ characters at end-of-line."; + +;; char *y = "Here is a string continued across \ +;; several lines in the manner that was sanctioned \ +;; in K&R C compilers and still works today, \ +;; even though the method used above is more esthetic."; + +;;; End of long string cases. + +(defun po-find-c-string (keywords) + "Find the next C string, excluding those marked by any of KEYWORDS. +Returns (CONTENTS START END) for the found string, or nil if none found." + (let (start end) + (while (and (not start) + (re-search-forward "\\([\"']\\|/\\*\\|//\\)" nil t)) + (cond ((= (preceding-char) ?*) + ;; Disregard comments. + (search-forward "*/")) + ((= (preceding-char) ?/) + ;; Disregard C++ comments. + (end-of-line) + (forward-char 1)) + ((= (preceding-char) ?\') + ;; Disregard character constants. + (forward-char (if (= (following-char) ?\\) 3 2))) + ((save-excursion + (beginning-of-line) + (looking-at "^# *\\(include\\|line\\)")) + ;; Disregard lines being #include or #line directives. + (end-of-line)) + ;; Else, find the end of the (possibly concatenated) string. + (t (setq start (1- (point)) + end nil) + (while (not end) + (cond ((= (following-char) ?\") + (if (looking-at "\"[ \t\n\\\\]*\"") + (goto-char (match-end 0)) + (forward-char 1) + (setq end (point)))) + ((= (following-char) ?\\) (forward-char 2)) + (t (skip-chars-forward "^\"\\\\")))) + ;; Check before string for keyword and opening parenthesis. + (goto-char start) + (skip-chars-backward " \n\t") + (if (= (preceding-char) ?\() + (progn + (backward-char 1) + (skip-chars-backward " \n\t") + (let ((end-keyword (point))) + (skip-chars-backward "_A-Za-z0-9") + (if (member (list (po-buffer-substring (point) + end-keyword)) + keywords) + ;; Disregard already marked strings. + (progn + (goto-char end) + (setq start nil + end nil)) + ;; String found. Prepare to resume search. + (goto-char end)))) + ;; String found. Prepare to resume search. + (goto-char end))))) + ;; Return the found string, if any. + (and start end + (list (po-extract-unquoted (current-buffer) start end) start end)))) + +(defun po-mark-c-string (start end keyword) + "Mark the C string, from START to END, with KEYWORD. +Leave point after marked string." + (goto-char end) + (insert ")") + (save-excursion + (goto-char start) + (insert keyword) + (or (string-equal keyword "_") (insert " ")) + (insert "("))) + +;;; Emacs LISP mode specifics. + +(defun po-find-emacs-lisp-string (keywords) + "Find the next Emacs LISP string, excluding those marked by any of KEYWORDS. +Returns (CONTENTS START END) for the found string, or nil if none found." + (let (start end) + (while (and (not start) + (re-search-forward "[;\"?]" nil t)) + (cond ((= (preceding-char) ?\;) + ;; Disregard comments. + (search-forward "\n")) + ((= (preceding-char) ?\?) + ;; Disregard character constants. + (forward-char (if (= (following-char) ?\\) 2 1))) + ;; Else, find the end of the string. + (t (setq start (1- (point))) + (while (not (= (following-char) ?\")) + (skip-chars-forward "^\"\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (forward-char 1) + (setq end (point)) + ;; Check before string for keyword and opening parenthesis. + (goto-char start) + (skip-chars-backward " \n\t") + (let ((end-keyword (point))) + (skip-chars-backward "-_A-Za-z0-9") + (if (and (= (preceding-char) ?\() + (member (list (po-buffer-substring (point) + end-keyword)) + keywords)) + ;; Disregard already marked strings. + (progn + (goto-char end) + (setq start nil + end nil))))))) + ;; Return the found string, if any. + (and start end + (list (po-extract-unquoted (current-buffer) start end) start end)))) + +(defun po-mark-emacs-lisp-string (start end keyword) + "Mark the Emacs LISP string, from START to END, with KEYWORD. +Leave point after marked string." + (goto-char end) + (insert ")") + (save-excursion + (goto-char start) + (insert "(" keyword) + (or (string-equal keyword "_") (insert " ")))) + +;;; Python mode specifics. + +(defun po-find-python-string (keywords) + "Find the next Python string, excluding those marked by any of KEYWORDS. +Also disregard strings when preceded by an empty string of the other type. +Returns (CONTENTS START END) for the found string, or nil if none found." + (let (contents start end) + (while (and (not contents) + (re-search-forward "[#\"']" nil t)) + (forward-char -1) + (cond ((= (following-char) ?\#) + ;; Disregard comments. + (search-forward "\n")) + ((looking-at "\"\"'") + ;; Quintuple-quoted string + (po-skip-over-python-string)) + ((looking-at "''\"") + ;; Quadruple-quoted string + (po-skip-over-python-string)) + (t + ;; Simple-, double-, triple- or sextuple-quoted string. + (if (memq (preceding-char) '(?r ?R)) + (forward-char -1)) + (setq start (point) + contents (po-skip-over-python-string) + end (point)) + (goto-char start) + (skip-chars-backward " \n\t") + (cond ((= (preceding-char) ?\[) + ;; Disregard a string used as a dictionary index. + (setq contents nil)) + ((= (preceding-char) ?\() + ;; Isolate the keyword which precedes string. + (backward-char 1) + (skip-chars-backward " \n\t") + (let ((end-keyword (point))) + (skip-chars-backward "_A-Za-z0-9") + (if (member (list (po-buffer-substring (point) + end-keyword)) + keywords) + ;; Disregard already marked strings. + (setq contents nil))))) + (goto-char end)))) + ;; Return the found string, if any. + (and contents (list contents start end)))) + +(defun po-skip-over-python-string () + "Skip over a Python string, possibly made up of many concatenated parts. +Leave point after string. Return unquoted overall string contents." + (let ((continue t) + (contents "") + raw start end resume) + (while continue + (skip-chars-forward " \t\n") ; whitespace + (cond ((= (following-char) ?#) ; comment + (setq start nil) + (search-forward "\n")) + ((looking-at "\\\n") ; escaped newline + (setq start nil) + (forward-char 2)) + ((looking-at "[rR]?\"\"\"") ; sextuple-quoted string + (setq raw (memq (following-char) '(?r ?R)) + start (match-end 0)) + (goto-char start) + (search-forward "\"\"\"") + (setq resume (point) + end (- resume 3))) + ((looking-at "[rr]?'''") ; triple-quoted string + (setq raw (memq (following-char) '(?r ?R)) + start (match-end 0)) + (goto-char start) + (search-forward "'''") + (setq resume (point) + end (- resume 3))) + ((looking-at "[rR]?\"") ; double-quoted string + (setq raw (memq (following-char) '(?r ?R)) + start (match-end 0)) + (goto-char start) + (while (not (memq (following-char) '(0 ?\"))) + (skip-chars-forward "^\"\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (if (eobp) + (setq contents nil + start nil) + (setq end (point)) + (forward-char 1)) + (setq resume (point))) + ((looking-at "[rR]?'") ; single-quoted string + (setq raw (memq (following-char) '(?r ?R)) + start (match-end 0)) + (goto-char start) + (while (not (memq (following-char) '(0 ?\'))) + (skip-chars-forward "^'\\\\") + (if (= (following-char) ?\\) (forward-char 2))) + (if (eobp) + (setq contents nil + start nil) + (setq end (point)) + (forward-char 1)) + (setq resume (point))) + (t ; no string anymore + (setq start nil + continue nil))) + (if start + (setq contents (concat contents + (if raw + (buffer-substring start end) + (po-extract-part-unquoted (current-buffer) + start end)))))) + (goto-char resume) + contents)) + +(defun po-mark-python-string (start end keyword) + "Mark the Python string, from START to END, with KEYWORD. +If KEYWORD is '.', prefix the string with an empty string of the other type. +Leave point after marked string." + (cond ((string-equal keyword ".") + (goto-char end) + (save-excursion + (goto-char start) + (insert (cond ((= (following-char) ?\') "\"\"") + ((= (following-char) ?\") "''") + (t "??"))))) + (t (goto-char end) + (insert ")") + (save-excursion + (goto-char start) + (insert keyword "("))))) + +;;; Miscellaneous features. + +(defun po-help () + "Provide an help window for PO mode." + (interactive) + (po-with-temp-buffer + (insert po-help-display-string) + (goto-char (point-min)) + (save-window-excursion + (switch-to-buffer (current-buffer)) + (delete-other-windows) + (message (_"Type any character to continue")) + (po-read-event)))) + +(defun po-undo () + "Undo the last change to the PO file." + (interactive) + (let ((buffer-read-only po-read-only)) + (undo)) + (po-compute-counters nil)) + +(defun po-statistics () + "Say how many entries in each category, and the current position." + (interactive) + (po-compute-counters t)) + +(defun po-validate () + "Use 'msgfmt' for validating the current PO file contents." + (interactive) + ; The 'compile' subsystem is autoloaded through a call to (compile ...). + ; We need to initialize it outside of any binding. Without this statement, + ; all defcustoms and defvars of compile.el would be undone when the let* + ; terminates. + (require 'compile) + (let* ((dev-null + (cond ((boundp 'null-device) null-device) ; since Emacs 20.3 + ((memq system-type '(windows-nt windows-95)) "NUL") + (t "/dev/null"))) + (compilation-buffer-name-function + (function (lambda (mode-name) + (concat "*" mode-name " validation*")))) + (compile-command (concat po-msgfmt-program + " --statistics -c -v -o " dev-null " " + (shell-quote-argument buffer-file-name)))) + (po-msgfmt-version-check) + (compile compile-command))) + +(defvar po-msgfmt-version-checked nil) +(defun po-msgfmt-version-check () + "'msgfmt' from GNU gettext 0.10.36 or greater is required." + (po-with-temp-buffer + (or + ;; Don't bother checking again. + po-msgfmt-version-checked + + (and + ;; Make sure 'msgfmt' is available. + (condition-case nil + (call-process po-msgfmt-program + nil t nil "--verbose" "--version") + (file-error nil)) + + ;; Make sure there's a version number in the output: + ;; 0.11 or 0.10.36 or 0.11-pre1 or 0.16.2-pre1 + (progn (goto-char (point-min)) + (or (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)$") + (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$") + (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)[-_A-Za-z0-9]+$") + (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)[-_A-Za-z0-9]+$"))) + + ;; Make sure the version is recent enough. + (>= (string-to-number + (format "%d%03d%03d" + (string-to-number (match-string 1)) + (string-to-number (match-string 2)) + (string-to-number (or (match-string 3) "0")))) + 010036) + + ;; Remember the outcome. + (setq po-msgfmt-version-checked t)) + + (error (_"'msgfmt' from GNU gettext 0.10.36 or greater is required"))))) + +(defun po-guess-archive-name () + "Return the ideal file name for this PO file in the central archives." + (let ((filename (file-name-nondirectory buffer-file-name)) + start-of-header end-of-header package version team) + (save-excursion + ;; Find the PO file header entry. + (goto-char (point-min)) + (re-search-forward po-any-msgstr-block-regexp) + (setq start-of-header (match-beginning 0) + end-of-header (match-end 0)) + ;; Get the package and version. + (goto-char start-of-header) + (if (re-search-forward "\n\ +\"Project-Id-Version: \\(GNU \\|Free \\)?\\([^\n ]+\\) \\([^\n ]+\\)\\\\n\"$" + end-of-header t) + (setq package (po-match-string 2) + version (po-match-string 3))) + (if (or (not package) (string-equal package "PACKAGE") + (not version) (string-equal version "VERSION")) + (error (_"Project-Id-Version field does not have a proper value"))) + ;; File name version and Project-Id-Version must match + (cond (;; A `filename' w/o package and version info at all + (string-match "^[^\\.]*\\.po\\'" filename)) + (;; TP Robot compatible `filename': PACKAGE-VERSION.LL.po + (string-match (concat (regexp-quote package) + "-\\(.*\\)\\.[^\\.]*\\.po\\'") filename) + (if (not (equal version (po-match-string 1 filename))) + (error (_"\ +Version mismatch: file name: %s; header: %s.\n\ +Adjust Project-Id-Version field to match file name and try again") + (po-match-string 1 filename) version)))) + ;; Get the team. + (if (stringp po-team-name-to-code) + (setq team po-team-name-to-code) + (goto-char start-of-header) + (if (re-search-forward "\n\ +\"Language-Team: \\([^ ].*[^ ]\\) <.+@.+>\\\\n\"$" + end-of-header t) + (let ((name (po-match-string 1))) + (if name + (let ((pair (assoc name po-team-name-to-code))) + (if pair + (setq team (cdr pair)) + (setq team (read-string (format "\ +Team name '%s' unknown. What is the team code? " + name))))))))) + (if (or (not team) (string-equal team "LL")) + (error (_"Language-Team field does not have a proper value"))) + ;; Compose the name. + (concat package "-" version "." team ".po")))) + +(defun po-guess-team-address () + "Return the team address related to this PO file." + (let (team) + (save-excursion + (goto-char (point-min)) + (re-search-forward po-any-msgstr-block-regexp) + (goto-char (match-beginning 0)) + (if (re-search-forward + "\n\"Language-Team: +\\(.*<\\(.*\\)@.*>\\)\\\\n\"$" + (match-end 0) t) + (setq team (po-match-string 2))) + (if (or (not team) (string-equal team "LL")) + (error (_"Language-Team field does not have a proper value"))) + (po-match-string 1)))) + +(defun po-send-mail () + "Start composing a letter, possibly including the current PO file." + (interactive) + (let* ((team-flag (y-or-n-p + (_"\ +Write to your team? ('n' if writing to the Translation Project robot) "))) + (address (if team-flag + (po-guess-team-address) + po-translation-project-address))) + (if (not (y-or-n-p (_"Include current PO file in mail? "))) + (apply po-compose-mail-function address + (read-string (_"Subject? ")) nil) + (if (buffer-modified-p) + (error (_"The file is not even saved, you did not validate it."))) + (if (and (y-or-n-p (_"You validated ('V') this file, didn't you? ")) + (or (zerop po-untranslated-counter) + (y-or-n-p + (format (_"%d entries are untranslated, include anyway? ") + po-untranslated-counter))) + (or (zerop po-fuzzy-counter) + (y-or-n-p + (format (_"%d entries are still fuzzy, include anyway? ") + po-fuzzy-counter))) + (or (zerop po-obsolete-counter) + (y-or-n-p + (format (_"%d entries are obsolete, include anyway? ") + po-obsolete-counter)))) + (let ((buffer (current-buffer)) + (name (po-guess-archive-name)) + (transient-mark-mode nil) + (coding-system-for-read buffer-file-coding-system) + (coding-system-for-write buffer-file-coding-system)) + (apply po-compose-mail-function address + (if team-flag + (read-string (_"Subject? ")) + (format "%s %s" po-translation-project-mail-label name)) + nil) + (goto-char (point-min)) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n")) + (save-excursion + (insert-buffer-substring buffer) + (shell-command-on-region + (region-beginning) (region-end) + (concat po-gzip-uuencode-command " " name ".gz") t t)))))) + (message "")) + +(defun po-confirm-and-quit () + "Confirm if quit should be attempted and then, do it. +This is a failsafe. Confirmation is asked if only the real quit would not." + (interactive) + (if (po-check-all-pending-edits) + (progn + (if (or (buffer-modified-p) + (> po-untranslated-counter 0) + (> po-fuzzy-counter 0) + (> po-obsolete-counter 0) + (y-or-n-p (_"Really quit editing this PO file? "))) + (po-quit)) + (message "")))) + +(defun po-quit () + "Save the PO file and kill buffer. +However, offer validation if appropriate and ask confirmation if untranslated +strings remain." + (interactive) + (if (po-check-all-pending-edits) + (let ((quit t)) + ;; Offer validation of newly modified entries. + (if (and (buffer-modified-p) + (not (y-or-n-p + (_"File was modified; skip validation step? ")))) + (progn + (message "") + (po-validate) + ;; If we knew that the validation was all successful, we should + ;; just quit. But since we do not know yet, as the validation + ;; might be asynchronous with PO mode commands, the safest is to + ;; stay within PO mode, even if this implies that another + ;; 'po-quit' command will be later required to exit for true. + (setq quit nil))) + ;; Offer to work on untranslated entries. + (if (and quit + (or (> po-untranslated-counter 0) + (> po-fuzzy-counter 0) + (> po-obsolete-counter 0)) + (not (y-or-n-p + (_"Unprocessed entries remain; quit anyway? ")))) + (progn + (setq quit nil) + (po-auto-select-entry))) + ;; Clear message area. + (message "") + ;; Or else, kill buffers and quit for true. + (if quit + (progn + (save-buffer) + (kill-buffer (current-buffer))))))) + +(provide 'po-mode) + +;; Hey Emacs! +;; Local Variables: +;; indent-tabs-mode: nil +;; coding: utf-8 +;; End: + +;;; po-mode.el ends here diff --git a/gettext-tools/misc/start-po.el b/gettext-tools/misc/start-po.el new file mode 100644 index 0000000..2e691d2 --- /dev/null +++ b/gettext-tools/misc/start-po.el @@ -0,0 +1,54 @@ +;;; start-po.el -- autoload definitions for viewing and editing PO files + +;; Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc. +;; +;; This file is part of GNU gettext. +;; +;; GNU gettext is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. +;; +;; GNU gettext 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 Emacs; see the file COPYING. If not, see +;; <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This file provides a minimal amount of definitions that will autoload +;; the complete support for viewing and editing PO files when necessary. +;; It is meant to be installed in such a way that it will be part of the +;; dumped Emacs image, or loaded automatically when Emacs is started, +;; regardless how the user's .emacs looks like. + +;;; Code: + +;; For editing PO files. + +(autoload 'po-mode "po-mode" + "Major mode for translators when they edit PO files. + +Special commands: +\\{po-mode-map} +Turning on PO mode calls the value of the variable 'po-mode-hook', +if that value is non-nil. Behaviour may be adjusted through some variables, +all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'." + t) +(setq auto-mode-alist + (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist)) + +;; For viewing PO and POT files. + +;; To use the right coding system automatically under Emacs 20 or newer. +(unless (fboundp 'po-find-file-coding-system) + (autoload 'po-find-file-coding-system "po-compat" + "\ +Return a Mule (DECODING . ENCODING) pair, according to PO file charset. +Called through file-coding-system-alist, before the file is visited for real.")) +(modify-coding-system-alist 'file "\\.po[t]?\\'\\|\\.po\\." + 'po-find-file-coding-system) |