From: Thomas Roessler Date: Thu, 1 Oct 1998 09:27:57 +0000 (+0000) Subject: Adding gettext support, based on the patch by Marco d'Itri. X-Git-Tag: mutt-0-94-9i-rel~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=691bd529e512097f427d230c947ff4cf0adb8a38;p=mutt Adding gettext support, based on the patch by Marco d'Itri. --- diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 00000000..28d38c76 --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,226 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do *not* +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +One advise in advance +===================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias or message inheritance) as the +implementation here. It is also not possible to offer this additional +functionality on top of a `catgets' implementation. Future versions of +GNU `gettext' will very likely convey even more functionality. So it +might be a good idea to change to GNU `gettext' as soon as possible. + + So you need not provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system provides +usable `catgets' (if using this is selected by the installer) or +`gettext' functions. If neither is available, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is *not* required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --with-catgets + ./configure --disable-nls + +will respectively bypass any pre-existing `catgets' or `gettext' to use +the internationalizing routines provided within this package, enable +the use of the `catgets' functions (if found on the locale system), or +else, *totally* disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + By default the configuration process will not test for the `catgets' +function and therefore they will not be used. The reasons are already +given above: the emulation on top of `catgets' cannot provide all the +extensions provided by the GNU `gettext' library. If you nevertheless +want to use the `catgets' functions use + + ./configure --with-catgets + +to enable the test for `catgets' (this causes no harm if `catgets' is +not available on your system). If you really select this option we +would like to hear about the reasons because we cannot think of any +good one ourself. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +ISO 639 `LL' two-letter code prior to using the programs in the +package. For example, let's suppose that you speak German. At the +shell prompt, merely execute `setenv LANG de' (in `csh'), +`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This +can be done from your `.login' or `.profile' file, once and for all. + + An operating system might already offer message localization for +many of its programs, while other programs have been installed locally +with the full capabilities of GNU `gettext'. Just using `gettext' +extended syntax for `LANG' would break proper localization of already +available operating system programs. In this case, users should set +both `LANGUAGE' and `LANG' variables in their environment, as programs +using GNU `gettext' give preference to `LANGUAGE'. For example, some +Swedish users would rather read translations in German than English for +when Swedish is not available. This is easily accomplished by setting +`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list, courtesy of Linux +International. You may reach your translation team at the address +`LL@li.org', replacing LL by the two-letter ISO 639 code for your +language. Language codes are *not* the same as the country codes given +in ISO 3166. The following translation teams exist, as of December +1997: + + Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en', + Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian + `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja', + Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish + `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es', + Swedish `sv', and Turkish `tr'. + +For example, you may reach the Chinese translation team by writing to +`zh@li.org'. + + If you'd like to volunteer to *work* at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is *not* the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +*actively* in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of December +1997. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination. + + Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv + .----------------------------------------------------. + bash | [] [] [] | 3 + bison | [] [] [] | 3 + clisp | [] [] [] [] | 4 + cpio | [] [] [] [] [] [] | 6 + diffutils | [] [] [] [] [] | 5 + enscript | [] [] [] [] [] [] | 6 + fileutils | [] [] [] [] [] [] [] [] [] [] | 10 + findutils | [] [] [] [] [] [] [] [] [] | 9 + flex | [] [] [] [] | 4 + gcal | [] [] [] [] [] | 5 + gettext | [] [] [] [] [] [] [] [] [] [] [] | 12 + grep | [] [] [] [] [] [] [] [] [] [] | 10 + hello | [] [] [] [] [] [] [] [] [] [] [] | 11 + id-utils | [] [] [] | 3 + indent | [] [] [] [] [] | 5 + libc | [] [] [] [] [] [] [] | 7 + m4 | [] [] [] [] [] [] | 6 + make | [] [] [] [] [] [] | 6 + music | [] [] | 2 + ptx | [] [] [] [] [] [] [] [] | 8 + recode | [] [] [] [] [] [] [] [] [] | 9 + sh-utils | [] [] [] [] [] [] [] [] | 8 + sharutils | [] [] [] [] [] [] | 6 + tar | [] [] [] [] [] [] [] [] [] [] [] | 11 + texinfo | [] [] [] | 3 + textutils | [] [] [] [] [] [] [] [] [] | 9 + wdiff | [] [] [] [] [] [] [] [] | 8 + `----------------------------------------------------' + 17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv + 27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If December 1997 seems to be old, you may fetch a more recent copy +of this `ABOUT-NLS' file on most GNU archive sites. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..4e36fee7 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,37 @@ +## Process this file with automake to produce Makefile.in +## Use aclocal; automake --foreign + +EXTRA_PROGRAMS = mutt_dotlock + +bin_PROGRAMS = mutt @DOTLOCK_TARGET@ +mutt_SOURCES = addrbook.c alias.c attach.c browser.c buffy.c color.c \ + commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \ + edit.c enter.c flags.c init.c filter.c from.c getdomain.c \ + handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \ + main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \ + postpone.c query.c recvattach.c rfc822.c \ + rfc1524.c rfc2047.c score.c send.c sendlib.c signal.c sort.c \ + status.c system.c thread.c charset.c history.c lib.c + +mutt_LDADD = @MUTT_LIB_OBJECTS@ +mutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ + +EXTRA_mutt_SOURCES = pgp.c pgpinvoke.c pgpkey.c pgppubring.c sha1dgst.c \ + gnupgparse.c resize.c snprintf.c dotlock.c pop.c imap.c socket.c + +BUILT_SOURCES = mutt_dotlock.c + +mutt_dotlock.c: dotlock.c + cp dotlock.c mutt_dotlock.c + +LDADD = @LIBOBJS@ @INTLLIBS@ + +SUBDIRS = doc intl po + +OPS=$(srcdir)/OPS $(srcdir)/OPS.PGP + +keymap_defs.h: $(OPS) + $(srcdir)/gen_defs $(OPS) > keymap_defs.h + +reldate: + echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > $(srcdir)/reldate.h diff --git a/Makefile.in b/Makefile.in index ddad5346..76177b17 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,168 +1,523 @@ -# -# Copyright (C) 1996,1997 Michael R. Elkins -# -# 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 2 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, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -SHELL=/bin/sh -VERSION=@VERSION@ - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -bindir=@bindir@ -libdir=@libdir@ -mandir=@mandir@ -sharedir=@sharedir@ -srcdir=@srcdir@ -docdir=@docdir@ -VPATH=@srcdir@ -@SET_MAKE@ +# Makefile.in generated automatically by automake 1.3 from Makefile.am -INSTALL=@INSTALL@ -CC=@CC@ -XCPPFLAGS=-I. @CPPFLAGS@ -DSHAREDIR=\"$(sharedir)\" -DDOTLOCK=\"$(bindir)/mutt.dotlock\" -CFLAGS=@CFLAGS@ $(XCPPFLAGS) -LDFLAGS=@LDFLAGS@ -LIBS=@LIBS@ -OPS=@OPS@ -OBJS= addrbook.o alias.o attach.o browser.o buffy.o color.o \ - commands.o complete.o compose.o copy.o curs_lib.o curs_main.o date.o \ - edit.o enter.o flags.o init.o filter.o from.o getdomain.o \ - handler.o hash.o hdrline.o headers.o help.o \ - history.o hook.o keymap.o lib.o \ - main.o mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o \ - postpone.o query.o recvattach.o rfc822.o \ - rfc1524.o rfc2047.o score.o send.o sendlib.o signal.o sort.o \ - status.o system.o thread.o charset.o @LIBOBJS@ - -CLEANFILES=dotlock mutt *.o core -VERYCLEANFILES=$(CLEANFILES) Makefile config.cache config.log \ - config.status config.h Muttrc -DISTCLEANFILES=$(VERYCLEANFILES) tags keymap_defs.h *.rej *.orig *~ Makefile.bak - -# kill these files when making new export distributions -NONEXPORT=pgp.c pgp.h pgpinvoke.c pgpkey.c pgppubring.c sha.h sha1dgst.c \ - gnupgparse.c sha_locl.h OPS.PGP doc/pgp-Notes.txt doc/language.txt \ - doc/language50.txt - -all: mutt @DOTLOCK_TARGET@ charsets/charsets.list - -mutt: keymap_defs.h $(OBJS) $(REGEX) - $(CC) -o mutt $(OBJS) $(REGEX) $(LDFLAGS) $(LIBS) - -dotlock: dotlock.o @SNPRINTFOBJS@ - $(CC) -o dotlock dotlock.o @SNPRINTFOBJS@ - -charsets/charsets.list: - ( cd $(srcdir)/charsets && $(MAKE) charsets.list) - -keymap_defs.h: Makefile $(OPS) - rm -f keymap_defs.h - $(srcdir)/gen_defs $(OPS) > keymap_defs.h +# Copyright (C) 1994, 1995, 1996, 1997, 1998 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. -install: mutt install.doc @DOTLOCK_INSTALL_TARGET@ - $(srcdir)/mkinstalldirs $(bindir) - -mv -f $(bindir)/mutt $(bindir)/mutt.old - $(INSTALL) -m 755 mutt $(bindir) - -if [ ! -f $(sharedir)/Muttrc ]; then \ - $(srcdir)/mkinstalldirs $(sharedir); \ - $(INSTALL) -m 644 $(srcdir)/Muttrc $(sharedir); \ - fi - -if [ ! -f $(sharedir)/mime.types ]; then \ - $(INSTALL) -m 644 $(srcdir)/mime.types $(sharedir); \ - fi - ( cd $(srcdir)/charsets && make install ) +# 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. -install.dotlock: dotlock - $(srcdir)/mkinstalldirs $(bindir) - -mv -f $(bindir)/mutt.dotlock $(bindir)/mutt.dotlock.old - $(INSTALL) @DOTLOCK_GROUP@ -m @DOTLOCK_PERMISSION@ dotlock $(bindir)/mutt.dotlock -install.doc: - ( cd $(srcdir)/doc && $(MAKE) install ) +SHELL = /bin/sh -uninstall: uninstall.doc - rm -f $(bindir)/mutt $(sharedir)/Muttrc $(bindir)/mutt.dotlock +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ -uninstall.doc: - ( cd $(srcdir)/doc/ && $(MAKE) uninstall ) +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include -$(srcdir)/configure: $(srcdir)/configure.in - autoconf +DISTDIR = -Makefile: $(srcdir)/Makefile.in - ./config.status +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ -config.h.in: $(srcdir)/acconfig.h - autoheader +top_builddir = . -config.h: $(srcdir)/config.h.in - ./config.status +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ -tags: - (cd $(srcdir) && ctags *.[ch]) +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ -dep: Makefile - mv Makefile Makefile.bak - awk -f $(srcdir)/depend.awk < Makefile.bak > Makefile - echo '# DO NOT REMOVE THIS LINE' >> Makefile - $(CC) -MM $(XCPPFLAGS) $(srcdir)/*.c >> Makefile +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +DATADIRNAME = @DATADIRNAME@ +DOTLOCK_GROUP = @DOTLOCK_GROUP@ +DOTLOCK_PERMISSION = @DOTLOCK_PERMISSION@ +DOTLOCK_TARGET = @DOTLOCK_TARGET@ +GENCAT = @GENCAT@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GPG = @GPG@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ +INSTOBJEXT = @INSTOBJEXT@ +INTLDEPS = @INTLDEPS@ +INTLLIBS = @INTLLIBS@ +INTLOBJS = @INTLOBJS@ +ISPELL = @ISPELL@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MUTTLOCALEDIR = @MUTTLOCALEDIR@ +MUTT_LIB_OBJECTS = @MUTT_LIB_OBJECTS@ +PACKAGE = @PACKAGE@ +PGP = @PGP@ +PGPK = @PGPK@ +POFILES = @POFILES@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SENDMAIL = @SENDMAIL@ +SNPRINTFOBJS = @SNPRINTFOBJS@ +SUBVERSION = @SUBVERSION@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +docdir = @docdir@ +l = @l@ +libdir = @libdir@ +sharedir = @sharedir@ -clean-real: - (cd $(srcdir) && rm -f $(CLEANFILES)) - (cd $(srcdir)/doc && $(MAKE) $@) +EXTRA_PROGRAMS = mutt_dotlock -clean: - rm -f $(CLEANFILES) - (cd $(srcdir)/charsets && $(MAKE) $@) +bin_PROGRAMS = mutt @DOTLOCK_TARGET@ +mutt_SOURCES = addrbook.c alias.c attach.c browser.c buffy.c color.c \ + commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \ + edit.c enter.c flags.c init.c filter.c from.c getdomain.c \ + handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \ + main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \ + postpone.c query.c recvattach.c rfc822.c \ + rfc1524.c rfc2047.c score.c send.c sendlib.c signal.c sort.c \ + status.c system.c thread.c charset.c history.c lib.c -veryclean: - rm -f $(VERYCLEANFILES) - (cd $(srcdir)/charsets && $(MAKE) $@) +mutt_LDADD = @MUTT_LIB_OBJECTS@ +mutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ -distclean: - (cd $(srcdir) && rm -f $(DISTCLEANFILES)) - (cd $(srcdir)/doc && $(MAKE) $@) - (cd $(srcdir)/charsets && $(MAKE) $@) +EXTRA_mutt_SOURCES = pgp.c pgpinvoke.c pgpkey.c pgppubring.c sha1dgst.c \ + gnupgparse.c resize.c snprintf.c dotlock.c pop.c imap.c socket.c -reldate: - rm -f $(srcdir)/reldate.h - echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > $(srcdir)/reldate.h +BUILT_SOURCES = mutt_dotlock.c + +LDADD = @LIBOBJS@ @INTLLIBS@ + +SUBDIRS = doc intl po + +OPS=$(srcdir)/OPS $(srcdir)/OPS.PGP +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = Muttrc +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +mutt_dotlock_SOURCES = mutt_dotlock.c +mutt_dotlock_OBJECTS = mutt_dotlock.o +mutt_dotlock_LDADD = $(LDADD) +mutt_dotlock_DEPENDENCIES = @LIBOBJS@ +mutt_dotlock_LDFLAGS = +mutt_OBJECTS = addrbook.o alias.o attach.o browser.o buffy.o color.o \ +commands.o complete.o compose.o copy.o curs_lib.o curs_main.o date.o \ +edit.o enter.o flags.o init.o filter.o from.o getdomain.o handler.o \ +hash.o hdrline.o headers.o help.o hook.o keymap.o main.o mbox.o menu.o \ +mh.o mx.o pager.o parse.o pattern.o postpone.o query.o recvattach.o \ +rfc822.o rfc1524.o rfc2047.o score.o send.o sendlib.o signal.o sort.o \ +status.o system.o thread.o charset.o history.o lib.o +mutt_LDFLAGS = +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = README ABOUT-NLS ChangeLog INSTALL Makefile.am \ +Makefile.in Muttrc.in NEWS TODO acconfig.h aclocal.m4 config.guess \ +config.h.in config.sub configure configure.in install-sh missing \ +mkinstalldirs stamp-h.in strcasecmp.c + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP = --best +DEP_FILES = .deps/addrbook.P .deps/alias.P .deps/attach.P \ +.deps/browser.P .deps/buffy.P .deps/charset.P .deps/color.P \ +.deps/commands.P .deps/complete.P .deps/compose.P .deps/copy.P \ +.deps/curs_lib.P .deps/curs_main.P .deps/date.P .deps/dotlock.P \ +.deps/edit.P .deps/enter.P .deps/filter.P .deps/flags.P .deps/from.P \ +.deps/getdomain.P .deps/gnupgparse.P .deps/handler.P .deps/hash.P \ +.deps/hdrline.P .deps/headers.P .deps/help.P .deps/history.P \ +.deps/hook.P .deps/imap.P .deps/init.P .deps/keymap.P .deps/lib.P \ +.deps/main.P .deps/mbox.P .deps/menu.P .deps/mh.P .deps/mutt_dotlock \ +.deps/mutt_dotlock.P .deps/mx.P .deps/pager.P .deps/parse.P \ +.deps/pattern.P .deps/pgp.P .deps/pgpinvoke.P .deps/pgpkey.P \ +.deps/pgppubring.P .deps/pop.P .deps/postpone.P .deps/query.P \ +.deps/recvattach.P .deps/resize.P .deps/rfc1524.P .deps/rfc2047.P \ +.deps/rfc822.P .deps/score.P .deps/send.P .deps/sendlib.P \ +.deps/sha1dgst.P .deps/signal.P .deps/snprintf.P .deps/socket.P \ +.deps/sort.P .deps/status.P .deps/strcasecmp.P .deps/system.P \ +.deps/thread.P +SOURCES = mutt_dotlock.c $(mutt_SOURCES) $(EXTRA_mutt_SOURCES) +OBJECTS = mutt_dotlock.o $(mutt_OBJECTS) + +all: all-recursive-am all-am + +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h + @: +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h +$(srcdir)/config.h.in: $(srcdir)/stamp-h.in +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: +Muttrc: $(top_builddir)/config.status Muttrc.in + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +mutt_dotlock: $(mutt_dotlock_OBJECTS) $(mutt_dotlock_DEPENDENCIES) + @rm -f mutt_dotlock + $(LINK) $(mutt_dotlock_LDFLAGS) $(mutt_dotlock_OBJECTS) $(mutt_dotlock_LDADD) $(LIBS) + +mutt: $(mutt_OBJECTS) $(mutt_DEPENDENCIES) + @rm -f mutt + $(LINK) $(mutt_LDFLAGS) $(mutt_OBJECTS) $(mutt_LDADD) $(LIBS) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + target=`echo $@ | sed s/-recursive//`; \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + done; \ + for subdir in $$rev; do \ + target=`echo $@ | sed s/-recursive//`; \ + echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + (cd $$subdir && $(MAKE) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: -changelog: - ( rcs2log | cat - ChangeLog >> ChangeLog.$$$$ ;\ - mv ChangeLog.$$$$ ChangeLog ) - -# make export version -usdist: distclean reldate - rm -rf /tmp/mutt-$(VERSION) - (cd .. && cp -r mutt-$(VERSION) /tmp) - for i in `grep _PGPPATH $(srcdir)/*.[ch] | sed 's/^\([^:]*\).*/\1/' | grep -v '/main\.c' | grep -v '/pgp'` ; do \ - target=`basename $$i` ; \ - $(srcdir)/reap.pl _PGPPATH < $(srcdir)/$$target > /tmp/mutt-$(VERSION)/$$target; \ +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --with-included-gettext --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) \ + && $(MAKE) dvi \ + && $(MAKE) check \ + && $(MAKE) install \ + && $(MAKE) installcheck \ + && $(MAKE) dist + -rm -rf $(distdir) + @echo "========================"; \ + echo "$(distdir).tar.gz is ready for distribution"; \ + echo "========================" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file; \ done - for i in $(NONEXPORT); do \ - rm -f /tmp/mutt-$(VERSION)/$$i; \ + for subdir in $(SUBDIRS); do \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ done - (cd /tmp && tar cvf mutt-$(VERSION).tar mutt-$(VERSION) && gzip mutt-$(VERSION).tar) - rm -rf /tmp/mutt-$(VERSION) -# make international distribution -dist: distclean reldate - (cd $(srcdir)/.. && tar cfz mutt-$(VERSION)i.tar.gz mutt-$(VERSION)i) +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + +maintainer-clean-depend: + -rm -rf .deps + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).P -c $< + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $< + @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \ + < .deps/$(*F).p > .deps/$(*F).P + @-rm -f .deps/$(*F).p +info: info-recursive +dvi: dvi-recursive +check: all-am + $(MAKE) check-recursive +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) all-recursive + +all-am: Makefile $(PROGRAMS) config.h + +install-exec-am: install-binPROGRAMS + +uninstall-am: uninstall-binPROGRAMS + +install-exec: install-exec-recursive install-exec-am + @$(NORMAL_INSTALL) + +install-data: install-data-recursive + @$(NORMAL_INSTALL) + +install: install-recursive install-exec-am + @: -rx/librx.a: - (cd rx && $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)") +uninstall: uninstall-recursive uninstall-am + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install +installdirs: installdirs-recursive + $(mkinstalldirs) $(DATADIR)$(bindir) + + +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(DISTCLEANFILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ + mostlyclean-compile mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic + +clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ + clean-depend clean-generic mostlyclean-am + +distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ + distclean-tags distclean-depend distclean-generic \ + clean-am + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + +mostlyclean: mostlyclean-recursive mostlyclean-am + +clean: clean-recursive clean-am + +distclean: distclean-recursive distclean-am + -rm -f config.status + +maintainer-clean: maintainer-clean-recursive maintainer-clean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile install-data-recursive \ +uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir \ +mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info dvi installcheck all-recursive-am all-am \ +install-exec-am uninstall-am install-exec install-data install \ +uninstall all installdirs mostlyclean-generic distclean-generic \ +clean-generic maintainer-clean-generic clean mostlyclean distclean \ +maintainer-clean + + +mutt_dotlock.c: dotlock.c + cp dotlock.c mutt_dotlock.c + +keymap_defs.h: $(OPS) + $(srcdir)/gen_defs $(OPS) > keymap_defs.h + +reldate: + echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > $(srcdir)/reldate.h +# 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/acconfig.h b/acconfig.h index ab805047..5ee194e3 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,3 +1,17 @@ +/* Is this the international version? */ +#undef SUBVERSION + +/* The "real" version string */ +#undef VERSION + +/* The package name */ +#undef PACKAGE + +/* Where to put l10n data */ +#undef MUTTLOCALEDIR + +/* Where to put other shared data */ +#undef SHAREDIR /* Enable debugging info */ #define DEBUG @@ -111,3 +125,17 @@ /* Does your system have the fchdir() call? */ #undef HAVE_FCHDIR + +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if NLS is requested. */ +#undef ENABLE_NLS + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +#undef HAVE_CATGETS + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT + +#undef HAVE_STPCPY diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 00000000..ce0848aa --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,520 @@ +dnl aclocal.m4 generated automatically by aclocal 1.3 + +dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +dnl This Makefile.in is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + +# Do all the work for Automake. This macro actually does too much -- +# some checks are only needed if your package does certain things. +# But this isn't really a big deal. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AM_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") +AC_DEFINE_UNQUOTED(VERSION, "$VERSION")) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + + +# serial 1 + +AC_DEFUN(AM_PROG_INSTALL, +[AC_REQUIRE([AC_PROG_INSTALL]) +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +AC_SUBST(INSTALL_SCRIPT)dnl +]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + +# Macro to add for using GNU gettext. +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 5 + +AC_DEFUN(AM_WITH_NLS, + [AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + USE_INCLUDED_LIBINTL=no + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS) + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include ], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_CHECK_LIB(intl, gettext, + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)], + gt_cv_func_gettext_libintl=no)]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + AC_MSG_CHECKING([whether catgets can be used]) + AC_ARG_WITH(catgets, + [ --with-catgets use catgets functions if available], + nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) + AC_MSG_RESULT($nls_cv_use_catgets) + + if test "$nls_cv_use_catgets" = "yes"; then + dnl No gettext in C library. Try catgets next. + AC_CHECK_LIB(i, main) + AC_CHECK_FUNC(catgets, + [AC_DEFINE(HAVE_CATGETS) + INTLOBJS="\$(CATOBJS)" + AC_PATH_PROG(GENCAT, gencat, no)dnl + if test "$GENCAT" != "no"; then + AC_PATH_PROG(GMSGFMT, gmsgfmt, no) + if test "$GMSGFMT" = "no"; then + AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) + fi + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi]) + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_SUBST(MSGFMT) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN(AM_GNU_GETTEXT, + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next]) + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + AC_CHECK_FUNCS(stpcpy) + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + AC_DEFINE(HAVE_STPCPY) + fi + + AM_LC_MESSAGES + AM_WITH_NLS + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl The reference to in the installed file + dnl must be resolved because we cannot expect the users of this + dnl to define HAVE_LOCALE_H. + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include " + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header . Take care yourself. */" + fi + AC_SUBST(INCLUDE_LOCALE_H) + + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + dnl po2tbl.sed is always needed. + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + dnl In the intl/Makefile.in we have a special dependency which makes + dnl only sense for gettext. We comment this out for non-gettext + dnl packages. + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + AC_SUBST(GT_NO) + AC_SUBST(GT_YES) + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl *** For now the libtool support in intl/Makefile is not for real. + l= + AC_SUBST(l) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + +# Search path for a program which passes the given test. +# Ulrich Drepper , 1996. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN(AM_PATH_PROG_WITH_TEST, +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# Check whether LC_MESSAGES is available in . +# Ulrich Drepper , 1995. +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +AC_DEFUN(AM_LC_MESSAGES, + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES) + fi + fi]) + diff --git a/addrbook.c b/addrbook.c index f589079a..604787cc 100644 --- a/addrbook.c +++ b/addrbook.c @@ -128,7 +128,7 @@ void mutt_alias_menu (char *buf, size_t buflen, ALIAS *aliases) if (!aliases) { - mutt_error ("You have no aliases!"); + mutt_error _("You have no aliases!"); return; } @@ -140,7 +140,7 @@ void mutt_alias_menu (char *buf, size_t buflen, ALIAS *aliases) menu->search = alias_search; menu->tag = alias_tag; menu->menu = MENU_ALIAS; - menu->title = "Aliases"; + menu->title = _("Aliases"); menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_ALIAS, AliasHelp); /* count the number of aliases */ diff --git a/alias.c b/alias.c index 84dcc04c..842b91da 100644 --- a/alias.c +++ b/alias.c @@ -188,13 +188,14 @@ void mutt_create_alias (ENVELOPE *cur, ADDRESS *iadr) else buf[0] = '\0'; - if (mutt_get_field ("Alias as: ", buf, sizeof (buf), 0) != 0 || !buf[0]) + /* add a new alias */ + if (mutt_get_field (_("Alias as: "), buf, sizeof (buf), 0) != 0 || !buf[0]) return; /* check to see if the user already has an alias defined */ if (mutt_lookup_alias (buf)) { - mutt_error ("You already have an alias defined with that name!"); + mutt_error _("You already have an alias defined with that name!"); return; } @@ -208,7 +209,7 @@ void mutt_create_alias (ENVELOPE *cur, ADDRESS *iadr) do { - if (mutt_get_field ("Address: ", buf, sizeof (buf), 0) != 0 || !buf[0]) + if (mutt_get_field (_("Address: "), buf, sizeof (buf), 0) != 0 || !buf[0]) { mutt_free_alias (&new); return; @@ -224,7 +225,7 @@ void mutt_create_alias (ENVELOPE *cur, ADDRESS *iadr) else buf[0] = 0; - if (mutt_get_field ("Personal name: ", buf, sizeof (buf), 0) != 0) + if (mutt_get_field (_("Personal name: "), buf, sizeof (buf), 0) != 0) { mutt_free_alias (&new); return; @@ -233,7 +234,7 @@ void mutt_create_alias (ENVELOPE *cur, ADDRESS *iadr) buf[0] = 0; rfc822_write_address (buf, sizeof (buf), new->addr); - snprintf (prompt, sizeof (prompt), "[%s = %s] Accept?", new->name, buf); + snprintf (prompt, sizeof (prompt), _("[%s = %s] Accept?"), new->name, buf); if (mutt_yesorno (prompt, 1) != 1) { mutt_free_alias (&new); @@ -250,7 +251,7 @@ void mutt_create_alias (ENVELOPE *cur, ADDRESS *iadr) Aliases = new; strfcpy (buf, NONULL (AliasFile), sizeof (buf)); - if (mutt_get_field ("Save to file: ", buf, sizeof (buf), M_FILE) != 0) + if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), M_FILE) != 0) return; mutt_expand_path (buf, sizeof (buf)); if ((rc = fopen (buf, "a"))) @@ -261,7 +262,7 @@ void mutt_create_alias (ENVELOPE *cur, ADDRESS *iadr) write_safe_address (rc, buf); fputc ('\n', rc); fclose (rc); - mutt_message ("Alias added."); + mutt_message _("Alias added."); } else mutt_perror (buf); diff --git a/attach.c b/attach.c index e9ee861f..55b7b149 100644 --- a/attach.c +++ b/attach.c @@ -108,7 +108,7 @@ int mutt_compose_attachment (BODY *a) a->filename, newfile)); if (safe_symlink (a->filename, newfile) == -1) { - if (!mutt_yesorno ("Can't match nametemplate, continue?", 1)) + if (!mutt_yesorno (_("Can't match nametemplate, continue?"), 1)) goto bailout; } unlink_newfile = 1; @@ -120,7 +120,7 @@ int mutt_compose_attachment (BODY *a) command, sizeof (command))) { /* For now, editing requires a file, no piping */ - mutt_error ("Mailcap compose entry requires %%s"); + mutt_error _("Mailcap compose entry requires %%s"); } else { @@ -134,7 +134,7 @@ int mutt_compose_attachment (BODY *a) if ((fp = safe_fopen (a->filename, "r")) == NULL) { - mutt_perror ("Failure to open file to parse headers."); + mutt_perror _("Failure to open file to parse headers."); goto bailout; } @@ -165,7 +165,7 @@ int mutt_compose_attachment (BODY *a) mutt_mktemp (tempfile); if ((tfp = safe_fopen (tempfile, "w")) == NULL) { - mutt_perror ("Failure to open file to strip headers."); + mutt_perror _("Failure to open file to strip headers."); goto bailout; } mutt_copy_stream (fp, tfp); @@ -183,7 +183,8 @@ int mutt_compose_attachment (BODY *a) else { rfc1524_free_entry (&entry); - mutt_message ("No mailcap compose entry for %s, creating empty file.",type); + mutt_message (_("No mailcap compose entry for %s, creating empty file."), + type); return 1; } @@ -230,7 +231,7 @@ int mutt_edit_attachment (BODY *a) a->filename, newfile)); if (safe_symlink (a->filename, newfile) == -1) { - if (!mutt_yesorno ("Can't match nametemplate, continue?", 1)) + if (!mutt_yesorno (_("Can't match nametemplate, continue?"), 1)) goto bailout; } unlink_newfile = 1; @@ -242,7 +243,7 @@ int mutt_edit_attachment (BODY *a) command, sizeof (command))) { /* For now, editing requires a file, no piping */ - mutt_error ("Mailcap Edit entry requires %%s"); + mutt_error _("Mailcap Edit entry requires %%s"); } else { @@ -260,7 +261,7 @@ int mutt_edit_attachment (BODY *a) else { rfc1524_free_entry (&entry); - mutt_error ("No mailcap edit entry for %s",type); + mutt_error (_("No mailcap edit entry for %s"),type); return 0; } @@ -328,7 +329,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag) { /* fallback to view as text */ rfc1524_free_entry (&entry); - mutt_error ("No matching mailcap entry found. Viewing as text."); + mutt_error _("No matching mailcap entry found. Viewing as text."); flag = M_AS_TEXT; use_mailcap = 0; } @@ -341,7 +342,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag) { if (!entry->command) { - mutt_error ("MIME type not defined. Cannot view attachment."); + mutt_error _("MIME type not defined. Cannot view attachment."); goto return_error; } strfcpy (command, entry->command, sizeof (command)); @@ -362,7 +363,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag) /* send case: the file is already there */ if (safe_symlink (a->filename, tempfile) == -1) { - if (mutt_yesorno ("Can't match nametemplate, continue?", 1) == M_YES) + if (mutt_yesorno (_("Can't match nametemplate, continue?"), 1) == M_YES) strfcpy (tempfile, a->filename, sizeof (tempfile)); else goto return_error; @@ -432,7 +433,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag) fclose (pagerfp); if (tempfp) fclose (tempfp); - mutt_error ("Cannot create filter"); + mutt_error _("Cannot create filter"); goto return_error; } @@ -638,7 +639,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) chflags = CH_FROM; chflags |= (ctx.magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE); if ((r = _mutt_copy_message (msg->fp, fp, hn, hn->content, 0, chflags)) == 0) - mutt_message("Attachment saved."); + mutt_message _("Attachment saved."); mx_close_message (&msg); mx_close_mailbox(&ctx); @@ -691,7 +692,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) if (mutt_copy_stream (ofp, nfp) == -1) { - mutt_error ("Write fault!"); + mutt_error _("Write fault!"); fclose (ofp); fclose (nfp); return (-1); @@ -809,7 +810,7 @@ int mutt_print_attachment (FILE *fp, BODY *a) { if (safe_symlink(a->filename, newfile) == -1) { - if (mutt_yesorno ("Can't match nametemplate, continue?", 1) != M_YES) + if (mutt_yesorno (_("Can't match nametemplate, continue?"), 1) != M_YES) { rfc1524_free_entry (&entry); return 0; @@ -893,7 +894,7 @@ int mutt_print_attachment (FILE *fp, BODY *a) } else { - mutt_error ("I don't know how to print that!"); + mutt_error _("I don't know how to print that!"); return 0; } } diff --git a/browser.c b/browser.c index 88f38941..d04ffed1 100644 --- a/browser.c +++ b/browser.c @@ -341,7 +341,7 @@ static int examine_directory (MUTTMENU *menu, struct browser_state *state, if (!S_ISDIR (s.st_mode)) { - mutt_error ("%s is not a directory", d); + mutt_error (_("%s is not a directory."), d); return (-1); } @@ -444,12 +444,12 @@ static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title, menu->current = 0; if (buffy) - snprintf (title, titlelen, "Mailboxes [%d]", mutt_buffy_check (0)); + snprintf (title, titlelen, _("Mailboxes [%d]"), mutt_buffy_check (0)); else { strfcpy (path, LastDir, sizeof (path)); mutt_pretty_mailbox (path); - snprintf (title, titlelen, "Directory [%s], File mask: %s", + snprintf (title, titlelen, _("Directory [%s], File mask: %s"), path, Mask.pattern); } menu->redraw = REDRAW_FULL; @@ -533,7 +533,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) if (!state.entrylen) { - mutt_error ("No files match the file mask"); + mutt_error _("No files match the file mask"); break; } @@ -640,7 +640,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) buf[len]='/'; } - if (mutt_get_field ("Chdir to: ", buf, sizeof (buf), M_FILE) == 0 && + if (mutt_get_field (_("Chdir to: "), buf, sizeof (buf), M_FILE) == 0 && buf[0]) { buffy = 0; @@ -659,14 +659,14 @@ void mutt_select_file (char *f, size_t flen, int buffy) } else { - mutt_error ("Error scanning directory."); + mutt_error _("Error scanning directory."); destroy_state (&state); mutt_menuDestroy (&menu); return; } } else - mutt_error ("%s is not a directory.", buf); + mutt_error (_("%s is not a directory."), buf); } else mutt_perror (buf); @@ -677,7 +677,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) case OP_ENTER_MASK: strfcpy (buf, Mask.pattern, sizeof (buf)); - if (mutt_get_field ("File Mask: ", buf, sizeof (buf), 0) == 0) + if (mutt_get_field (_("File Mask: "), buf, sizeof (buf), 0) == 0) { regex_t *rx = (regex_t *) safe_malloc (sizeof (regex_t)); char *s = buf; @@ -716,14 +716,14 @@ void mutt_select_file (char *f, size_t flen, int buffy) init_menu (&state, menu, title, sizeof (title), buffy); else { - mutt_error ("Error scanning directory."); + mutt_error _("Error scanning directory."); mutt_menuDestroy (&menu); return; } killPrefix = 0; if (!state.entrylen) { - mutt_error ("No files match the file mask"); + mutt_error _("No files match the file mask"); break; } } @@ -741,9 +741,10 @@ void mutt_select_file (char *f, size_t flen, int buffy) if (i == OP_SORT_REVERSE) { reverse = SORT_REVERSE; - addstr ("Reverse "); + addstr _("Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? "); + } else { + addstr _("Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? "); } - addstr ("Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? "); clrtoeol (); while ((i = mutt_getch ()) != EOF && i != 'a' && i != 'd' && i != 'z' @@ -799,7 +800,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) case OP_BROWSER_NEW_FILE: snprintf (buf, sizeof (buf), "%s/", LastDir); - if (mutt_get_field ("New file name: ", buf, sizeof (buf), M_FILE) == 0) + if (mutt_get_field (_("New file name: "), buf, sizeof (buf), M_FILE) == 0) { strfcpy (f, buf, flen); destroy_state (&state); @@ -812,7 +813,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) case OP_BROWSER_VIEW_FILE: if (!state.entrylen) { - mutt_error ("No files match the file mask"); + mutt_error _("No files match the file mask"); break; } @@ -820,7 +821,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) (S_ISLNK (state.entry[menu->current].mode) && link_is_dir (state.entry[menu->current].name))) { - mutt_error ("Can't view a directory"); + mutt_error _("Can't view a directory"); break; } else @@ -838,7 +839,7 @@ void mutt_select_file (char *f, size_t flen, int buffy) menu->redraw = REDRAW_FULL; } else - mutt_error ("Error trying to view file"); + mutt_error _("Error trying to view file"); } } } diff --git a/buffy.c b/buffy.c index d74e6cb1..9250e8d0 100644 --- a/buffy.c +++ b/buffy.c @@ -354,7 +354,7 @@ int mutt_buffy_notify (void) { strfcpy (path, tmp->path, sizeof (path)); mutt_pretty_mailbox (path); - mutt_message ("New mail in %s.", path); + mutt_message (_("New mail in %s."), path); tmp->notified = 1; BuffyNotify--; return (1); diff --git a/color.c b/color.c index 11872f0a..9e68018d 100644 --- a/color.c +++ b/color.c @@ -303,13 +303,13 @@ parse_color_name (const char *s, int *col, int *attr, int brite, BUFFER *err) if (!*s || *eptr || *col < 0 || (*col >= COLORS && !option(OPTNOCURSES) && has_colors())) { - snprintf (err->data, err->dsize, "%s: color not supported by term", s); + snprintf (err->data, err->dsize, _("%s: color not supported by term"), s); return (-1); } } else if ((*col = mutt_getvaluebyname (s, Colors)) == -1) { - snprintf (err->data, err->dsize, "%s: no such color", s); + snprintf (err->data, err->dsize, _("%s: no such color"), s); return (-1); } @@ -355,14 +355,14 @@ _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, if ((object = mutt_getvaluebyname (buf->data, Fields)) == -1) { - snprintf (err->data, err->dsize, "%s: no such object", buf->data); + snprintf (err->data, err->dsize, _("%s: no such object"), buf->data); return (-1); } if (strncmp (buf->data, "index", 5) != 0) { snprintf (err->data, err->dsize, - "%s: command valid only for index object", + _("%s: command valid only for index object"), parse_uncolor ? "uncolor" : "unmono"); return (-1); } @@ -370,7 +370,7 @@ _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, if (!MoreArgs (s)) { snprintf (err->data, err->dsize, - "%s: too few arguments", parse_uncolor ? "uncolor" : "unmono"); + _("%s: too few arguments"), parse_uncolor ? "uncolor" : "unmono"); return (-1); } @@ -526,7 +526,7 @@ parse_object(BUFFER *buf, BUFFER *s, int *o, int *ql, BUFFER *err) if(!MoreArgs(s)) { - strfcpy(err->data, "Missing arguments.", err->dsize); + strfcpy(err->data, _("Missing arguments."), err->dsize); return -1; } @@ -538,7 +538,7 @@ parse_object(BUFFER *buf, BUFFER *s, int *o, int *ql, BUFFER *err) *ql = strtol(buf->data + 6, &eptr, 10); if(*eptr || q_level < 0) { - snprintf(err->data, err->dsize, "%s: no such object", buf->data); + snprintf(err->data, err->dsize, _("%s: no such object"), buf->data); return -1; } } @@ -549,7 +549,7 @@ parse_object(BUFFER *buf, BUFFER *s, int *o, int *ql, BUFFER *err) } else if ((*o = mutt_getvaluebyname (buf->data, Fields)) == -1) { - snprintf (err->data, err->dsize, "%s: no such object", buf->data); + snprintf (err->data, err->dsize, _("%s: no such object"), buf->data); return (-1); } @@ -565,7 +565,7 @@ parse_color_pair(BUFFER *buf, BUFFER *s, int *fg, int *bg, int *attr, BUFFER *er { if (! MoreArgs (s)) { - strfcpy (err->data, "color: too few arguments", err->dsize); + strfcpy (err->data, _("color: too few arguments"), err->dsize); return (-1); } @@ -576,7 +576,7 @@ parse_color_pair(BUFFER *buf, BUFFER *s, int *fg, int *bg, int *attr, BUFFER *er if (! MoreArgs (s)) { - strfcpy (err->data, "color: too few arguments", err->dsize); + strfcpy (err->data, _("color: too few arguments"), err->dsize); return (-1); } @@ -599,7 +599,7 @@ parse_attr_spec(BUFFER *buf, BUFFER *s, int *fg, int *bg, int *attr, BUFFER *err if (! MoreArgs (s)) { - strfcpy (err->data, "mono: too few arguments", err->dsize); + strfcpy (err->data, _("mono: too few arguments"), err->dsize); return (-1); } @@ -619,7 +619,7 @@ parse_attr_spec(BUFFER *buf, BUFFER *s, int *fg, int *bg, int *attr, BUFFER *err *attr = A_NORMAL; /* needs use = instead of |= to clear other bits */ else { - snprintf (err->data, err->dsize, "%s: no such attribute", buf->data); + snprintf (err->data, err->dsize, _("%s: no such attribute"), buf->data); return (-1); } @@ -659,7 +659,7 @@ _mutt_parse_color (BUFFER *buf, BUFFER *s, BUFFER *err, { if (!MoreArgs (s)) { - strfcpy (err->data, "too few arguments", err->dsize); + strfcpy (err->data, _("too few arguments"), err->dsize); return (-1); } @@ -668,7 +668,7 @@ _mutt_parse_color (BUFFER *buf, BUFFER *s, BUFFER *err, if (MoreArgs (s)) { - strfcpy (err->data, "too many arguments", err->dsize); + strfcpy (err->data, _("too many arguments"), err->dsize); return (-1); } @@ -682,7 +682,7 @@ _mutt_parse_color (BUFFER *buf, BUFFER *s, BUFFER *err, if (has_colors() && use_default_colors () != OK && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)) { - strfcpy (err->data, "default colors not supported", err->dsize); + strfcpy (err->data, _("default colors not supported"), err->dsize); return (-1); } # endif /* HAVE_USE_DEFAULT_COLORS */ diff --git a/commands.c b/commands.c index 5293c2d7..bfaecf8f 100644 --- a/commands.c +++ b/commands.c @@ -118,7 +118,8 @@ int mutt_display_message (HEADER *cur) if (is_mmnoask (buf)) rc = M_YES; else - rc = query_quadoption (OPT_USEMAILCAP, "Display message using mailcap?"); + rc = query_quadoption (OPT_USEMAILCAP, + _("Display message using mailcap?")); if (rc < 0) return 0; else if (rc == M_YES) @@ -149,15 +150,15 @@ int mutt_display_message (HEADER *cur) return 0; cmflags |= M_CM_VERIFY; - mutt_message ("Invoking PGP..."); + mutt_message _("Invoking PGP..."); } else if (cur->pgp & PGPSIGN) { /* find out whether or not the verify signature */ - if (query_quadoption (OPT_VERIFYSIG, "Verify PGP signature?") == M_YES) + if (query_quadoption (OPT_VERIFYSIG, _("Verify PGP signature?")) == M_YES) { cmflags |= M_CM_VERIFY; - mutt_message ("Invoking PGP..."); + mutt_message _("Invoking PGP..."); } } } @@ -172,7 +173,7 @@ int mutt_display_message (HEADER *cur) mutt_mktemp (tempfile); if ((fpout = safe_fopen (tempfile, "w")) == NULL) { - mutt_error ("Could not create temporary file!"); + mutt_error _("Could not create temporary file!"); return (0); } @@ -220,7 +221,7 @@ int mutt_display_message (HEADER *cur) mutt_set_flag (Context, cur, M_READ, 1); if (option (OPTPROMPTAFTER)) { - mutt_ungetch (mutt_any_key_to_continue ("Command: ")); + mutt_ungetch (mutt_any_key_to_continue _("Command: ")); rc = km_dokey (MENU_PAGER); } else @@ -237,6 +238,7 @@ void ci_bounce_message (HEADER *h, int *redraw) ADDRESS *adr = NULL; int rc; + /* FIXME i18n */ snprintf (prompt, sizeof(prompt), "Bounce %smessage%s to: ", h ? "" : "tagged ", h ? "" : "s"); rc = mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS); @@ -252,7 +254,7 @@ void ci_bounce_message (HEADER *h, int *redraw) if (!(adr = rfc822_parse_adrlist (adr, buf))) { - mutt_error ("Error parsing address!"); + mutt_error _("Error parsing address!"); return; } @@ -262,7 +264,7 @@ void ci_bounce_message (HEADER *h, int *redraw) rfc822_write_address (buf, sizeof (buf), adr); snprintf (prompt, (COLS > sizeof(prompt) ? sizeof(prompt) : COLS) - 13, - "Bounce message%s to %s", (h ? "" : "s"), buf); + (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); strcat(prompt, "...?"); if (mutt_yesorno (prompt, 1) != 1) { @@ -273,7 +275,7 @@ void ci_bounce_message (HEADER *h, int *redraw) mutt_bounce_message (h, adr); rfc822_free_address (&adr); - mutt_message ("Message%s bounced.", h ? "" : "s"); + mutt_message (h ? _("Message bounced.") : _("Messages bounced.")); } void mutt_pipe_message_to_state (HEADER *h, STATE *s) @@ -293,8 +295,8 @@ int mutt_pipe_message (HEADER *h) pid_t thepid; buffer[0] = 0; - if (mutt_get_field ("Pipe to command: ", buffer, sizeof (buffer), M_CMD) != 0 || - !buffer[0]) + if (mutt_get_field (_("Pipe to command: "), buffer, sizeof (buffer), M_CMD) + != 0 || !buffer[0]) return 0; mutt_expand_path (buffer, sizeof (buffer)); @@ -397,8 +399,9 @@ int mutt_select_sort (int reverse) while (!Sort) { mvprintw (LINES - 1, 0, -"%sSort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ", - reverse ? "Rev-" : ""); + reverse ? +_("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") : +_("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ")); ch = mutt_getch (); if (ch == ERR || CI_is_return (ch)) { @@ -453,7 +456,7 @@ void mutt_shell_escape (void) char buf[LONG_STRING]; buf[0] = 0; - if (mutt_get_field ("Shell command: ", buf, sizeof (buf), M_CMD) == 0) + if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0) { if (!buf[0] && Shell) strfcpy (buf, Shell, sizeof (buf)); @@ -569,10 +572,10 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redr *redraw = 0; - snprintf (prompt, sizeof (prompt), "%s%s to mailbox", - decode ? (delete ? "Decode-save" : "Decode-copy") : - (decrypt ? (delete ? "Decrypt-save" : "Decrypt-copy"): - (delete ? "Save" : "Copy")), h ? "" : " tagged"); + snprintf (prompt, sizeof (prompt), _("%s%s to mailbox"), + decode ? (delete ? _("Decode-save") : _("Decode-copy")) : + (decrypt ? (delete ? _("Decrypt-save") : _("Decrypt-copy")): + (delete ? _("Save") : _("Copy"))), h ? "" : _(" tagged")); if (h) { @@ -641,7 +644,7 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redr return -1; #endif - mutt_message ("Copying to %s...", buf); + mutt_message (_("Copying to %s..."), buf); if (mx_open_mailbox (buf, M_APPEND, &ctx) != NULL) { @@ -713,7 +716,8 @@ void mutt_print_message (HEADER *h) FILE *fp; if (query_quadoption (OPT_PRINT, - h ? "Print message?" : "Print tagged messages?") != M_YES) + h ? _("Print message?") : _("Print tagged messages?")) + != M_YES) return; endwin (); if ((thepid = mutt_create_filter (NONULL(PrintCmd), &fp, NULL, NULL)) == -1) @@ -739,10 +743,10 @@ void mutt_print_message (HEADER *h) fclose (fp); if (mutt_wait_filter (thepid) || option (OPTWAITKEY)) mutt_any_key_to_continue (NULL); - mutt_message ("Message%s printed", (count > 1) ? "s" : ""); + mutt_message ((count > 1) ? _("Message printed") : _("Messages printed")); } void mutt_version (void) { - mutt_message ("Mutt %s (%s)", VERSION, ReleaseDate); + mutt_message ("Mutt %s (%s)", MUTT_VERSION, ReleaseDate); } diff --git a/compose.c b/compose.c index b73b4ee5..76dce835 100644 --- a/compose.c +++ b/compose.c @@ -32,7 +32,7 @@ #include #include -#define CHECK_COUNT if (idxlen == 0) { mutt_error ("There are no attachments."); break; } +#define CHECK_COUNT if (idxlen == 0) { mutt_error _("There are no attachments."); break; } @@ -94,7 +94,7 @@ static int pgp_send_menu (int bits) struct pgp_vinfo *pgp = pgp_get_vinfo(PGP_SIGN); - mvaddstr (LINES-1, 0, "(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget it? "); + mvaddstr (LINES-1, 0, _("(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget it? ")); clrtoeol (); do { @@ -109,12 +109,12 @@ static int pgp_send_menu (int bits) { if(!(secring = pgp->read_secring(pgp))) { - mutt_error("Can't open your secret key ring!"); + mutt_error _("Can't open your secret key ring!"); bits &= ~PGPSIGN; } else { - if ((p = pgp_ask_for_key (pgp, secring, "Sign as: ", + if ((p = pgp_ask_for_key (pgp, secring, _("Sign as: "), NULL, KEYFLAG_CANSIGN, &micalg))) { snprintf (input_signas, sizeof (input_signas), "0x%s", p); @@ -133,24 +133,24 @@ static int pgp_send_menu (int bits) else { bits &= ~PGPSIGN; - mutt_error("An unkown PGP version was defined for signing."); + mutt_error _("An unkown PGP version was defined for signing."); } } else if (c == 'm') { if(!(bits & PGPSIGN)) - mutt_error("This doesn't make sense if you don't want to sign the message."); + mutt_error _("This doesn't make sense if you don't want to sign the message."); else { /* Copy the existing MIC algorithm into place */ strfcpy(input_micalg, NONULL(PgpSignMicalg), sizeof(input_micalg)); - if(mutt_get_field("MIC algorithm: ", input_micalg, sizeof(input_micalg), 0) == 0) + if(mutt_get_field (_("MIC algorithm: "), input_micalg, sizeof(input_micalg), 0) == 0) { if(strcasecmp(input_micalg, "pgp-md5") && strcasecmp(input_micalg, "pgp-sha1") && strcasecmp(input_micalg, "pgp-rmd160")) { - mutt_error("Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160"); + mutt_error _("Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160"); } else { @@ -194,7 +194,7 @@ check_attachments(ATTACHPTR **idx, short idxlen) if(stat(idx[i]->content->filename, &st) != 0) { mutt_pretty_mailbox(pretty); - mutt_error("%s [#%d] no longer exists!", + mutt_error(_("%s [#%d] no longer exists!"), pretty, i+1); return -1; } @@ -202,7 +202,7 @@ check_attachments(ATTACHPTR **idx, short idxlen) if(idx[i]->content->stamp < st.st_mtime) { mutt_pretty_mailbox(pretty); - snprintf(msg, sizeof(msg), "%s [#%d] modified. Update encoding?", + snprintf(msg, sizeof(msg), _("%s [#%d] modified. Update encoding?"), pretty, i+1); if((r = mutt_yesorno(msg, M_YES)) == M_YES) @@ -264,24 +264,24 @@ static void draw_envelope (HEADER *msg, char *fcc) #ifdef _PGPPATH mvaddstr (HDR_PGP, 0, " PGP: "); if ((msg->pgp & (PGPENCRYPT | PGPSIGN)) == (PGPENCRYPT | PGPSIGN)) - addstr ("Sign, Encrypt"); + addstr _("Sign, Encrypt"); else if (msg->pgp & PGPENCRYPT) - addstr ("Encrypt"); + addstr _("Encrypt"); else if (msg->pgp & PGPSIGN) - addstr ("Sign"); + addstr _("Sign"); else - addstr ("Clear"); + addstr _("Clear"); clrtoeol (); if (msg->pgp & PGPSIGN) { - mvaddstr (HDR_PGPSIGINFO, 0, " sign as: "); + mvaddstr (HDR_PGPSIGINFO, 0, _(" sign as: ")); if (PgpSignAs) printw ("%s", PgpSignAs); else - printw ("%s", ""); + printw ("%s", _("")); clrtoeol (); - mvaddstr (HDR_PGPSIGINFO, 40, "MIC algorithm: "); + mvaddstr (HDR_PGPSIGINFO, 40, _("MIC algorithm: ")); printw ("%s", NONULL(PgpSignMicalg)); clrtoeol (); } @@ -370,7 +370,7 @@ static int delete_attachment (MUTTMENU *menu, short *idxlen, int x) if (x == 0 && menu->max == 1) { - mutt_error ("You may not delete the only attachment."); + mutt_error _("You may not delete the only attachment."); idx[x]->content->tagged = 0; return (-1); } @@ -444,7 +444,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ menu->max = idxlen; menu->make_entry = snd_entry; menu->tag = mutt_tag_attach; - menu->title = "Compose"; + menu->title = _("Compose"); menu->data = idx; menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_COMPOSE, ComposeHelp); @@ -600,12 +600,12 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ if (op == OP_COMPOSE_ATTACH_FILE) { - prompt = "Attach file"; + prompt = _("Attach file"); flag = 0; } else { - prompt = "Open mailbox to attach message from"; + prompt = _("Open mailbox to attach message from"); if (Context) { strfcpy (fname, NONULL (Context->path), sizeof (fname)); @@ -644,14 +644,14 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ { mx_close_mailbox (ctx); safe_free ((void **) &ctx); - mutt_error ("No messages in that folder."); + mutt_error _("No messages in that folder."); break; } this = Context; /* remember current folder */ Context = ctx; set_option(OPTATTACHMSG); - mutt_message ("Tag the messages you want to attach!"); + mutt_message _("Tag the messages you want to attach!"); close = mutt_index_menu (); unset_option(OPTATTACHMSG); @@ -686,7 +686,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ update_idx (menu, idx, idxlen++); else { - mutt_error ("Unable to attach!"); + mutt_error _("Unable to attach!"); safe_free ((void **) &idx[idxlen]); } menu->redraw |= REDRAW_INDEX | REDRAW_STATUS; @@ -706,7 +706,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ update_idx (menu, idx, idxlen++); else { - mutt_error ("Unable to attach!"); + mutt_error _("Unable to attach!"); safe_free ((void **) &idx[idxlen]); } } @@ -750,6 +750,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ idx[menu->current]->content->description ? idx[menu->current]->content->description : "", sizeof (buf)); + /* header names should not be translated */ if (mutt_get_field ("Description: ", buf, sizeof (buf), 0) == 0) { safe_free ((void **) &idx[menu->current]->content->description); @@ -813,7 +814,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ menu->redraw = REDRAW_CURRENT; } else - mutt_error ("Invalid encoding."); + mutt_error _("Invalid encoding."); } break; @@ -827,8 +828,8 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ if (!fccSet && *fcc) { - if ((i = query_quadoption (OPT_COPY, "Save a copy of this message?")) - == -1) + if ((i = query_quadoption (OPT_COPY, + _("Save a copy of this message?"))) == -1) break; else if (i == M_NO) *fcc = 0; @@ -873,12 +874,12 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ CHECK_COUNT; strfcpy (fname, idx[menu->current]->content->filename, sizeof (fname)); mutt_pretty_mailbox (fname); - if (mutt_get_field ("Rename to: ", fname, sizeof (fname), M_FILE) == 0 - && fname[0]) + if (mutt_get_field (_("Rename to: "), fname, sizeof (fname), M_FILE) + == 0 && fname[0]) { if(stat(idx[menu->current]->content->filename, &st) == -1) { - mutt_error("Can't stat: %s", fname); + mutt_error (_("Can't stat: %s"), fname); break; } @@ -905,8 +906,8 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ CLEARLINE (LINES-1); fname[0] = 0; - if (mutt_get_field ("New file: ", fname, sizeof (fname), M_FILE) != 0 - || !fname[0]) + if (mutt_get_field (_("New file: "), fname, sizeof (fname), M_FILE) + != 0 || !fname[0]) continue; mutt_expand_path (fname, sizeof (fname)); @@ -918,13 +919,13 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ if (!(p = strchr (type, '/'))) { - mutt_error ("Content-Type is of the form base/sub"); + mutt_error _("Content-Type is of the form base/sub"); continue; } *p++ = 0; if ((itype = mutt_check_mime_type (type)) == TYPEOTHER) { - mutt_error ("Unknown Content-Type %s", type); + mutt_error (_("Unknown Content-Type %s"), type); continue; } if (idxlen == idxmax) @@ -937,7 +938,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ /* Touch the file */ if (!(fp = safe_fopen (fname, "w"))) { - mutt_error ("Can't create file %s", fname); + mutt_error (_("Can't create file %s"), fname); safe_free ((void **) &idx[idxlen]); continue; } @@ -945,7 +946,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ if ((idx[idxlen]->content = mutt_make_file_attach (fname)) == NULL) { - mutt_error ("What we have here is a failure to make an attachment"); + mutt_error _("What we have here is a failure to make an attachment"); continue; } @@ -1017,7 +1018,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ case OP_EXIT: - if ((i = query_quadoption (OPT_POSTPONE, "Postpone this message?")) == M_NO) + if ((i = query_quadoption (OPT_POSTPONE, _("Postpone this message?"))) == M_NO) { while (idxlen-- > 0) { @@ -1064,11 +1065,11 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ fname[0] = '\0'; if (idxlen) msg->content = idx[0]->content; - if (mutt_enter_fname ("Write message to mailbox", fname, sizeof (fname), + if (mutt_enter_fname (_("Write message to mailbox"), fname, sizeof (fname), &menu->redraw, 1) != -1 && fname[0]) { int oldhdrdate; - mutt_message ("Writing message to %s ...", fname); + mutt_message (_("Writing message to %s ..."), fname); mutt_expand_path (fname, sizeof (fname)); if (msg->content->next) @@ -1079,7 +1080,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ if (mutt_write_fcc (NONULL (fname), msg, NULL, 1) < 0) msg->content = mutt_remove_multipart (msg->content); else - mutt_message ("Message written."); + mutt_message _("Message written."); if(!oldhdrdate) unset_option(OPTUSEHEADERDATE); } break; diff --git a/config.h.in b/config.h.in index c273e202..0763880d 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,18 @@ /* config.h.in. Generated automatically from configure.in by autoheader. */ +/* Is this the international version? */ +#undef SUBVERSION + +/* The "real" version string */ +#undef VERSION + +/* The package name */ +#undef PACKAGE + +/* Where to put l10n data */ +#undef MUTTLOCALEDIR + +/* Where to put other shared data */ +#undef SHAREDIR /* Enable debugging info */ #define DEBUG @@ -12,12 +26,52 @@ /* What is your domain name? */ #undef DOMAIN +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `long' if doesn't define. */ +#undef off_t + /* Define to `int' if doesn't define. */ #undef pid_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -121,24 +175,62 @@ /* Does your system have the fchdir() call? */ #undef HAVE_FCHDIR +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if NLS is requested. */ +#undef ENABLE_NLS + +/* Define as 1 if you have catgets and don't want to use GNU gettext. */ +#undef HAVE_CATGETS + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT + +#undef HAVE_STPCPY + /* The number of bytes in a long. */ #undef SIZEOF_LONG +/* Define if you have the __argz_count function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the __argz_next function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the __argz_stringify function. */ +#undef HAVE___ARGZ_STRINGIFY + /* Define if you have the bkgdset function. */ #undef HAVE_BKGDSET /* Define if you have the curs_set function. */ #undef HAVE_CURS_SET +/* Define if you have the dcgettext function. */ +#undef HAVE_DCGETTEXT + /* Define if you have the fchdir function. */ #undef HAVE_FCHDIR /* Define if you have the ftruncate function. */ #undef HAVE_FTRUNCATE +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + /* Define if you have the meta function. */ #undef HAVE_META +/* Define if you have the munmap function. */ +#undef HAVE_MUNMAP + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + /* Define if you have the regcomp function. */ #undef HAVE_REGCOMP @@ -148,12 +240,27 @@ /* Define if you have the setegid function. */ #undef HAVE_SETEGID +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + /* Define if you have the srand48 function. */ #undef HAVE_SRAND48 +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + /* Define if you have the strerror function. */ #undef HAVE_STRERROR @@ -166,18 +273,45 @@ /* Define if you have the use_default_colors function. */ #undef HAVE_USE_DEFAULT_COLORS +/* Define if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + /* Define if you have the header file. */ #undef HAVE_NCURSES_H +/* Define if you have the header file. */ +#undef HAVE_NL_TYPES_H + /* Define if you have the header file. */ #undef HAVE_STDARG_H +/* Define if you have the header file. */ +#undef HAVE_STRING_H + /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + /* Define if you have the header file. */ #undef HAVE_SYSEXITS_H +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the i library (-li). */ +#undef HAVE_LIBI + /* Define if you have the intl library (-lintl). */ #undef HAVE_LIBINTL diff --git a/configure b/configure index b653de0e..66c1790b 100755 --- a/configure +++ b/configure @@ -49,6 +49,12 @@ ac_help="$ac_help --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken)" ac_help="$ac_help --enable-exact-address enable regeneration of email addresses" +ac_help="$ac_help + --disable-nls do not use Native Language Support" +ac_help="$ac_help + --with-included-gettext use the GNU gettext library included here" +ac_help="$ac_help + --with-catgets use catgets functions if available" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -557,8 +563,7 @@ fi -VERSION=0.94.8 -SUBVERSION='' + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -579,6 +584,241 @@ ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:599: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:652: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:709: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=mutt + +VERSION=0.94.8 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <> confdefs.h <&6 +echo "configure:755: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:768: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:781: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:794: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:807: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + +ALL_LINGUAS="de" + # Make sure we can run config.sub. if $ac_config_sub sun4 >/dev/null 2>&1; then : @@ -586,7 +826,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:590: checking host system type" >&5 +echo "configure:830: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -608,7 +848,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking for prefix""... $ac_c" 1>&6 -echo "configure:612: checking for prefix" >&5 +echo "configure:852: checking for prefix" >&5 if test x$prefix = xNONE; then mutt_cv_prefix=$ac_default_prefix else @@ -619,7 +859,7 @@ echo "$ac_t""$mutt_cv_prefix" 1>&6 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:623: checking for $ac_word" >&5 +echo "configure:863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -648,7 +888,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:652: checking for $ac_word" >&5 +echo "configure:892: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -696,7 +936,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -706,11 +946,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -730,12 +970,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:734: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:739: checking whether we are using GNU C" >&5 +echo "configure:979: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -744,7 +984,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -759,7 +999,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:763: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1003: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -787,7 +1027,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:791: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1031: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -824,7 +1064,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:828: checking for a BSD compatible install" >&5 +echo "configure:1068: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -873,6 +1113,27 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1118: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + case "$host" in *-*-hpux*) @@ -885,7 +1146,7 @@ esac # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:889: checking for $ac_word" >&5 +echo "configure:1150: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -927,7 +1188,7 @@ if test -f $srcdir/pgp.c; then # Extract the first word of "gpg", so it can be a program name with args. set dummy gpg; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:931: checking for $ac_word" >&5 +echo "configure:1192: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GPG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -971,7 +1232,7 @@ EOF # Extract the first word of "pgpk", so it can be a program name with args. set dummy pgpk; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:975: checking for $ac_word" >&5 +echo "configure:1236: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PGPK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1016,7 +1277,7 @@ EOF # Extract the first word of "pgp", so it can be a program name with args. set dummy pgp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1020: checking for $ac_word" >&5 +echo "configure:1281: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PGP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1065,14 +1326,14 @@ EOF fi if test $PGP != no || test $PGPK != no ; then - LIBOBJS="$LIBOBJS pgp.o pgpinvoke.o pgpkey.o pgppubring.o sha1dgst.o gnupgparse.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgppubring.o sha1dgst.o gnupgparse.o" OPS="$OPS \$(srcdir)/OPS.PGP" fi fi cat >> confdefs.h <&6 -echo "configure:1084: checking for $ac_word" >&5 +echo "configure:1345: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ISPELL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1117,7 +1378,7 @@ EOF fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1121: checking how to run the C preprocessor" >&5 +echo "configure:1382: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1132,13 +1393,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1149,13 +1410,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1181,7 +1442,7 @@ echo "$ac_t""$CPP" 1>&6 if test "${with_slang+set}" = set; then withval="$with_slang" echo $ac_n "checking if -ltermlib is required""... $ac_c" 1>&6 -echo "configure:1185: checking if -ltermlib is required" >&5 +echo "configure:1446: checking if -ltermlib is required" >&5 if eval "test \"`echo '$''{'mutt_cv_bsdish'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1189,7 +1450,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -1202,7 +1463,7 @@ main () #endif } EOF -if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then mutt_cv_bsdish=yes else @@ -1219,7 +1480,7 @@ fi echo "$ac_t""$mutt_cv_bsdish" 1>&6 echo $ac_n "checking for S-Lang""... $ac_c" 1>&6 -echo "configure:1223: checking for S-Lang" >&5 +echo "configure:1484: checking for S-Lang" >&5 if test $withval = yes; then if test -d $srcdir/../slang; then mutt_cv_slang=$srcdir/../slang/src @@ -1261,20 +1522,20 @@ EOF #define HAVE_COLOR 1 EOF - LIBOBJS="$LIBOBJS resize.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o" echo $ac_n "checking if I can compile a test SLang program""... $ac_c" 1>&6 -echo "configure:1269: checking if I can compile a test SLang program" >&5 +echo "configure:1530: checking if I can compile a test SLang program" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1302,7 +1563,7 @@ fi echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:1306: checking for initscr in -lncurses" >&5 +echo "configure:1567: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1310,7 +1571,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1344,17 +1605,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1348: checking for $ac_hdr" >&5 +echo "configure:1609: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1395,12 +1656,12 @@ fi echo $ac_n "checking for start_color""... $ac_c" 1>&6 -echo "configure:1399: checking for start_color" >&5 +echo "configure:1660: checking for start_color" >&5 if eval "test \"`echo '$''{'ac_cv_func_start_color'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_start_color=yes" else @@ -1448,12 +1709,12 @@ fi for ac_func in typeahead bkgdset curs_set meta use_default_colors do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1452: checking for $ac_func" >&5 +echo "configure:1713: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1503,12 +1764,12 @@ done for ac_func in resizeterm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1507: checking for $ac_func" >&5 +echo "configure:1768: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1549,7 +1810,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then cat >> confdefs.h <&6 fi @@ -1560,12 +1821,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1564: checking for ANSI C header files" >&5 +echo "configure:1825: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1573,7 +1834,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1590,7 +1851,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1608,7 +1869,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1629,7 +1890,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1640,7 +1901,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1668,17 +1929,17 @@ for ac_hdr in stdarg.h sys/ioctl.h sysexits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1672: checking for $ac_hdr" >&5 +echo "configure:1933: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1706,12 +1967,12 @@ done echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1710: checking return type of signal handlers" >&5 +echo "configure:1971: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1728,7 +1989,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1748,12 +2009,12 @@ EOF echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:1752: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:2013: checking for sys_siglist declaration in signal.h or unistd.h" >&5 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1765,7 +2026,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:1769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -1787,7 +2048,7 @@ fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1791: checking size of long" >&5 +echo "configure:2052: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1795,7 +2056,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1806,7 +2067,7 @@ main() exit(0); } EOF -if { (eval echo configure:1810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1827,12 +2088,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1831: checking for pid_t" >&5 +echo "configure:2092: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1863,12 +2124,12 @@ fi for ac_func in setegid srand48 strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1867: checking for $ac_func" >&5 +echo "configure:2128: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1919,12 +2180,12 @@ done for ac_func in strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1923: checking for $ac_func" >&5 +echo "configure:2184: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1977,12 +2238,12 @@ done mutt_cv_snprintf=no SNPRINTFOBJS="" echo $ac_n "checking for snprintf""... $ac_c" 1>&6 -echo "configure:1981: checking for snprintf" >&5 +echo "configure:2242: checking for snprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_snprintf=yes" else @@ -2029,12 +2290,12 @@ mutt_cv_snprintf=yes fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:2033: checking for vsnprintf" >&5 +echo "configure:2294: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else @@ -2081,7 +2342,7 @@ mutt_cv_snprintf=yes fi if test $mutt_cv_snprintf = yes; then - LIBOBJS="$LIBOBJS snprintf.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS snprintf.o" SNPRINTFOBJS="snprintf.o" fi @@ -2089,12 +2350,12 @@ fi for ac_func in ftruncate do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2093: checking for $ac_func" >&5 +echo "configure:2354: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2139,7 +2400,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for chsize in -lx""... $ac_c" 1>&6 -echo "configure:2143: checking for chsize in -lx" >&5 +echo "configure:2404: checking for chsize in -lx" >&5 ac_lib_var=`echo x'_'chsize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2147,7 +2408,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2192,12 +2453,12 @@ done for ac_func in strftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2196: checking for $ac_func" >&5 +echo "configure:2457: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2242,7 +2503,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:2246: checking for strftime in -lintl" >&5 +echo "configure:2507: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2250,7 +2511,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2295,12 +2556,12 @@ done for ac_func in fchdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2299: checking for $ac_func" >&5 +echo "configure:2560: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2375,12 +2636,12 @@ else for ac_func in regcomp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2379: checking for $ac_func" >&5 +echo "configure:2640: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2435,7 +2696,7 @@ if test $mutt_cv_regex = yes; then LIBS="$LIBS ../rx-1.5/rx/librx.a" CPPFLAGS="-I../rx-1.5/rx $CPPFLAGS" else - LIBOBJS="$LIBOBJS rx/librx.a" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS rx/librx.a" CPPFLAGS="-I\$(srcdir)/rx $CPPFLAGS" fi cat >> confdefs.h <<\EOF @@ -2474,7 +2735,7 @@ if test "${with_mailpath+set}" = set; then mutt_cv_mailpath=$withval else echo $ac_n "checking where new mail is stored""... $ac_c" 1>&6 -echo "configure:2478: checking where new mail is stored" >&5 +echo "configure:2739: checking where new mail is stored" >&5 if eval "test \"`echo '$''{'mutt_cv_mailpath'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2503,7 +2764,7 @@ EOF echo $ac_n "checking if $mutt_cv_mailpath is world writable""... $ac_c" 1>&6 -echo "configure:2507: checking if $mutt_cv_mailpath is world writable" >&5 +echo "configure:2768: checking if $mutt_cv_mailpath is world writable" >&5 if eval "test \"`echo '$''{'mutt_cv_worldwrite'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2511,7 +2772,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -2525,7 +2786,7 @@ int main (int argc, char **argv) exit (1); } EOF -if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then mutt_cv_worldwrite=yes else @@ -2550,7 +2811,7 @@ EOF else echo $ac_n "checking if $mutt_cv_mailpath is group writable""... $ac_c" 1>&6 -echo "configure:2554: checking if $mutt_cv_mailpath is group writable" >&5 +echo "configure:2815: checking if $mutt_cv_mailpath is group writable" >&5 if eval "test \"`echo '$''{'mutt_cv_groupwrite'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2558,7 +2819,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -2572,7 +2833,7 @@ int main (int argc, char **argv) exit (1); } EOF -if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then mutt_cv_groupwrite=yes else @@ -2604,25 +2865,22 @@ fi if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" then - CPPFLAGS="$CPPFLAGS -DDL_STANDALONE" - DOTLOCK_TARGET="dotlock" - DOTLOCK_INSTALL_TARGET="install.dotlock" + CPPFLAGS="$CPPFLAGS -DDL_STANDALONE -DDOTLOCK=\"\\\"\$(bindir)/mutt_dotlock\\\"\"" + DOTLOCK_TARGET="mutt_dotlock" else - LIBOBJS="$LIBOBJS dotlock.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o" fi - - # Check whether --with-libdir or --without-libdir was given. if test "${with_libdir+set}" = set; then withval="$with_libdir" mutt_cv_libdir=$withval else echo $ac_n "checking where to put architecture-dependent files""... $ac_c" 1>&6 -echo "configure:2626: checking where to put architecture-dependent files" >&5 +echo "configure:2884: checking where to put architecture-dependent files" >&5 if eval "test \"`echo '$''{'mutt_cv_libdir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2643,7 +2901,7 @@ if test "${with_sharedir+set}" = set; then mutt_cv_sharedir=$withval else echo $ac_n "checking where to put architecture-independent data files""... $ac_c" 1>&6 -echo "configure:2647: checking where to put architecture-independent data files" >&5 +echo "configure:2905: checking where to put architecture-independent data files" >&5 if eval "test \"`echo '$''{'mutt_cv_sharedir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2661,6 +2919,9 @@ fi sharedir=$mutt_cv_sharedir +cat >> confdefs.h <&6 -echo "configure:2673: checking where to put the documentation" >&5 +echo "configure:2934: checking where to put the documentation" >&5 if eval "test \"`echo '$''{'mutt_cv_docdir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2720,7 +2981,7 @@ if test "${enable_pop+set}" = set; then EOF echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2724: checking for socket in -lsocket" >&5 +echo "configure:2985: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2728,7 +2989,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2767,7 +3028,7 @@ else fi echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2771: checking for gethostbyname in -lnsl" >&5 +echo "configure:3032: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2775,7 +3036,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2813,7 +3074,7 @@ else echo "$ac_t""no" 1>&6 fi - LIBOBJS="$LIBOBJS pop.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o" fi @@ -2826,7 +3087,7 @@ if test "${enable_imap+set}" = set; then EOF echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2830: checking for socket in -lsocket" >&5 +echo "configure:3091: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2834,7 +3095,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2873,7 +3134,7 @@ else fi echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2877: checking for gethostbyname in -lnsl" >&5 +echo "configure:3138: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2881,7 +3142,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2919,7 +3180,7 @@ else echo "$ac_t""no" 1>&6 fi - LIBOBJS="$LIBOBJS imap.o socket.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS imap.o socket.o" fi @@ -3025,84 +3286,1897 @@ EOF fi -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : + + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3295: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:3322: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:3376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF -DEFS=-DHAVE_CONFIG_H +fi -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:3397: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext < $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args +int main() { +} $ac_kw foo() { +; return 0; } +EOF +if { (eval echo configure:3411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + ;; + *) cat >> confdefs.h <&6 +echo "configure:3437: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:3470: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:3505: checking for working alloca.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:3538: checking for alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + +int main() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_func_alloca_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_alloca_works=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 +if test $ac_cv_func_alloca_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.o + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:3598: checking whether alloca needs Cray hooks" >&5 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3628: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:3683: checking stack direction for C alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat > conftest.$ac_ext < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_c_stack_direction=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_stack_direction=-1 +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <&6 +echo "configure:3735: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpagesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3774: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:3827: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat > conftest.$ac_ext < +#include +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + + + for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4003: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4043: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + for ac_func in stpcpy +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4100: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_STPCPY 1 +EOF + + fi + + if test $ac_cv_header_locale_h = yes; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:4162: checking for LC_MESSAGES" >&5 +if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +return LC_MESSAGES +; return 0; } +EOF +if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_val_LC_MESSAGES=no +fi +rm -f conftest* +fi + +echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 + if test $am_cv_val_LC_MESSAGES = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LC_MESSAGES 1 +EOF + + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +echo "configure:4195: checking whether NLS is requested" >&5 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi + + echo "$ac_t""$USE_NLS" 1>&6 + + + USE_INCLUDED_LIBINTL=no + + if test "$USE_NLS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ENABLE_NLS 1 +EOF + + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +echo "configure:4215: checking whether included gettext is requested" >&5 + # Check whether --with-included-gettext or --without-included-gettext was given. +if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +echo "configure:4234: checking for libintl.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +echo "configure:4261: checking for gettext in libc" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +return (int) gettext ("") +; return 0; } +EOF +if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + gt_cv_func_gettext_libc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gt_cv_func_gettext_libc=no +fi +rm -f conftest* +fi + +echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 + + if test "$gt_cv_func_gettext_libc" != "yes"; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +echo "configure:4289: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +echo "configure:4324: checking for gettext in libintl" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 +echo "configure:4329: checking for gettext in -lintl" >&5 +ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + gt_cv_func_gettext_libintl=yes +else + echo "$ac_t""no" 1>&6 +gt_cv_func_gettext_libintl=no +fi + +fi + +echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT 1 +EOF + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4387: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$MSGFMT" != "no"; then + for ac_func in dcgettext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4421: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4476: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4508: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CATOBJEXT=.mo + DATADIRNAME=lib +fi +rm -f conftest* + INSTOBJEXT=.mo + fi + fi + +else + echo "$ac_t""no" 1>&6 +fi + + + if test "$CATOBJEXT" = "NONE"; then + echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 +echo "configure:4571: checking whether catgets can be used" >&5 + # Check whether --with-catgets or --without-catgets was given. +if test "${with_catgets+set}" = set; then + withval="$with_catgets" + nls_cv_use_catgets=$withval +else + nls_cv_use_catgets=no +fi + + echo "$ac_t""$nls_cv_use_catgets" 1>&6 + + if test "$nls_cv_use_catgets" = "yes"; then + echo $ac_n "checking for main in -li""... $ac_c" 1>&6 +echo "configure:4584: checking for main in -li" >&5 +ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-li $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for catgets""... $ac_c" 1>&6 +echo "configure:4627: checking for catgets" >&5 +if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char catgets(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_catgets) || defined (__stub___catgets) +choke me +#else +catgets(); +#endif + +; return 0; } +EOF +if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_catgets=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_catgets=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_CATGETS 1 +EOF + + INTLOBJS="\$(CATOBJS)" + # Extract the first word of "gencat", so it can be a program name with args. +set dummy gencat; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4677: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GENCAT" in + /*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GENCAT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" + ;; +esac +fi +GENCAT="$ac_cv_path_GENCAT" +if test -n "$GENCAT"; then + echo "$ac_t""$GENCAT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$GENCAT" != "no"; then + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4709: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$GMSGFMT" = "no"; then + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4742: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4777: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4835: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4869: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4901: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + + + + + + + + + + + + + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +echo "configure:4994: checking for catalogs to be installed" >&5 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + echo "$ac_t""$LINGUAS" 1>&6 + fi + + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include " + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header . Take care yourself. */" + fi + + + test -d intl || mkdir intl + if test "$CATOBJEXT" = ".cat"; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +echo "configure:5022: checking for linux/version.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:5032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + msgformat=linux +else + echo "$ac_t""no" 1>&6 +msgformat=xopen +fi + + + sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed + fi + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed + + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + l= + + + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + +MUTTLOCALEDIR=$sharedir/locale + +cat >> confdefs.h < confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. @@ -3126,7 +5200,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile rx/Makefile Muttrc doc/Makefile doc/dotlock.man doc/mutt.man charsets/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile intl/Makefile po/Makefile.in rx/Makefile Muttrc doc/Makefile doc/dotlock.man doc/mutt.man charsets/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -3388,11 +5494,62 @@ cat >> $CONFIG_STATUS <<\EOF fi fi; done +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=$1; shift; ac_dests=$* + set $ac_sources; ac_source=$1; shift; ac_sources=$* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } + fi +done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h +case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac exit 0 EOF diff --git a/configure.in b/configure.in index 4e275a39..648d49ca 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,9 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(mutt.h) -AC_CONFIG_HEADER(config.h) -VERSION=0.94.8 -SUBVERSION='' +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(mutt, 0.94.8) + +ALL_LINGUAS="de" AC_CANONICAL_HOST @@ -17,6 +18,7 @@ AC_MSG_RESULT($mutt_cv_prefix) AC_PROG_CC AC_PROG_MAKE_SET AC_PROG_INSTALL +AC_ISC_POSIX case "$host" in *-*-hpux*) @@ -61,14 +63,14 @@ if test -f $srcdir/pgp.c; then fi if test $PGP != no || test $PGPK != no ; then - LIBOBJS="$LIBOBJS pgp.o pgpinvoke.o pgpkey.o pgppubring.o sha1dgst.o gnupgparse.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgppubring.o sha1dgst.o gnupgparse.o" OPS="$OPS \$(srcdir)/OPS.PGP" fi fi AC_SUBST(OPS) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION$SUBVERSION") -AC_SUBST(VERSION) +AC_DEFINE_UNQUOTED(SUBVERSION, "$SUBVERSION") +AC_SUBST(SUBVERSION) AC_PATH_PROG(ISPELL, ispell, no) if test $ISPELL != no; then @@ -128,7 +130,7 @@ main () fi AC_DEFINE(USE_SLANG_CURSES) AC_DEFINE(HAVE_COLOR) - LIBOBJS="$LIBOBJS resize.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o" dnl --- try to link a sample program to check if we're ok @@ -169,7 +171,7 @@ main () AC_CHECK_FUNC(start_color, [AC_DEFINE(HAVE_COLOR)]) AC_CHECK_FUNCS(typeahead bkgdset curs_set meta use_default_colors) - AC_CHECK_FUNCS(resizeterm, [LIBOBJS="$LIBOBJS resize.o"]) + AC_CHECK_FUNCS(resizeterm, [MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o"]) ]) AC_HEADER_STDC @@ -194,7 +196,7 @@ SNPRINTFOBJS="" AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)], [mutt_cv_snprintf=yes]) AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF)], [mutt_cv_snprintf=yes]) if test $mutt_cv_snprintf = yes; then - LIBOBJS="$LIBOBJS snprintf.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS snprintf.o" SNPRINTFOBJS="snprintf.o" fi AC_SUBST(SNPRINTFOBJS) @@ -209,6 +211,7 @@ dnl AIX may not have fchdir() AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)], [mutt_cv_fchdir=no]) +dnl what about this macro? AM_WITH_REGEX mutt_cv_regex=yes AC_ARG_WITH(rx, [ --with-rx[=DIR] Use GNU rx ], [if test $withval != yes; then @@ -229,7 +232,7 @@ if test $mutt_cv_regex = yes; then LIBS="$LIBS ../rx-1.5/rx/librx.a" CPPFLAGS="-I../rx-1.5/rx $CPPFLAGS" else - LIBOBJS="$LIBOBJS rx/librx.a" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS rx/librx.a" CPPFLAGS="-I\$(srcdir)/rx $CPPFLAGS" fi AC_DEFINE(USE_GNU_RX) @@ -303,16 +306,13 @@ fi if test "x$mutt_cv_setgid" = "xyes" || test "x$mutt_cv_fchdir" = "xno" then - CPPFLAGS="$CPPFLAGS -DDL_STANDALONE" - DOTLOCK_TARGET="dotlock" - DOTLOCK_INSTALL_TARGET="install.dotlock" + CPPFLAGS="$CPPFLAGS -DDL_STANDALONE -DDOTLOCK=\"\\\"\$(bindir)/mutt_dotlock\\\"\"" + DOTLOCK_TARGET="mutt_dotlock" else - LIBOBJS="$LIBOBJS dotlock.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o" fi AC_SUBST(DOTLOCK_TARGET) -AC_SUBST(DOTLOCK_INSTALL_TARGET) - AC_ARG_WITH(libdir, [ --with-libdir=PATH specify where to put arch dependent files], @@ -338,7 +338,7 @@ AC_ARG_WITH(sharedir, [ --with-sharedir=PATH specify where to put arch in sharedir=$mutt_cv_sharedir AC_SUBST(sharedir) - +AC_DEFINE_UNQUOTED(SHAREDIR, "$mutt_cv_sharedir") AC_ARG_WITH(docdir, [ --with-docdir=PATH specify where to put the documentation], [mutt_cv_docdir=$withval], @@ -375,14 +375,14 @@ AC_ARG_ENABLE(pop, [ --enable-pop Enable POP3 support], [ AC_DEFINE(USE_POP) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) - LIBOBJS="$LIBOBJS pop.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o" ]) AC_ARG_ENABLE(imap, [ --enable-imap Enable IMAP support], [ AC_DEFINE(USE_IMAP) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) - LIBOBJS="$LIBOBJS imap.o socket.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS imap.o socket.o" ]) AC_ARG_ENABLE(flock, [ --enable-flock Use flock() to lock files], @@ -433,4 +433,11 @@ AC_ARG_ENABLE(exact-address, [ --enable-exact-address enable regeneration o AC_DEFINE(EXACT_ADDRESS) fi]) -AC_OUTPUT(Makefile rx/Makefile Muttrc doc/Makefile doc/dotlock.man doc/mutt.man charsets/Makefile) +AC_SUBST(MUTT_LIB_OBJECTS) + +AM_GNU_GETTEXT +MUTTLOCALEDIR=$sharedir/locale +AC_SUBST(MUTTLOCALEDIR) +AC_DEFINE_UNQUOTED(MUTTLOCALEDIR, "$MUTTLOCALEDIR") + +AC_OUTPUT(Makefile intl/Makefile po/Makefile.in rx/Makefile Muttrc doc/Makefile doc/dotlock.man doc/mutt.man charsets/Makefile) diff --git a/copy.c b/copy.c index 27732c5d..7c583710 100644 --- a/copy.c +++ b/copy.c @@ -566,7 +566,7 @@ static int copy_delete_attach(HEADER *h, HEADER *p, BODY *m, FILE *fpin, { if (m == NULL) { - mutt_error ("Confused when attempting to delete attachment, h & m can't be NULL"); + mutt_error _("Confused when attempting to delete attachment, h & m can't be NULL"); return -1; } b = m; @@ -581,7 +581,7 @@ static int copy_delete_attach(HEADER *h, HEADER *p, BODY *m, FILE *fpin, /* Find first deleted attachment */ if (b->parts == NULL) { - mutt_error ("Deleting non-multipart messages not yet supported"); + mutt_error _("Deleting non-multipart messages not yet supported"); return -1; } b = b->parts; diff --git a/curs_lib.c b/curs_lib.c index 700fd73f..26ad60fc 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -164,7 +164,7 @@ void mutt_query_exit (void) curs_set (1); if (Timeout) timeout (-1); /* restore blocking operation */ - if (mutt_yesorno ("Exit Mutt?", 1) == 1) + if (mutt_yesorno (_("Exit Mutt?"), 1) == 1) { endwin (); exit (0); @@ -239,7 +239,7 @@ void mutt_perror (const char *s) dprint (1, (debugfile, "%s: %s (errno = %d)\n", s, p ? p : "unknown error", errno)); - mutt_error ("%s: %s (errno = %d)", s, p ? p : "unknown error", errno); + mutt_error ("%s: %s (errno = %d)", s, p ? p : _("unknown error"), errno); } int mutt_any_key_to_continue (const char *s) @@ -259,7 +259,7 @@ int mutt_any_key_to_continue (const char *s) if (s) fputs (s, stdout); else - fputs ("Press any key to continue...", stdout); + fputs (_("Press any key to continue..."), stdout); fflush (stdout); ch = fgetc (stdin); fflush (stdin); @@ -297,7 +297,7 @@ int mutt_enter_fname (const char *prompt, char *buf, size_t blen, int *redraw, i int i; mvaddstr (LINES-1, 0, (char *) prompt); - addstr (" ('?' for list): "); + addstr _(" ('?' for list): "); if (buf[0]) addstr (buf); clrtoeol (); diff --git a/curs_main.c b/curs_main.c index 8b580485..bdbe4d5a 100644 --- a/curs_main.c +++ b/curs_main.c @@ -50,20 +50,20 @@ #define CHECK_MSGCOUNT if (!Context) \ { \ mutt_flushinp (); \ - mutt_error ("No mailbox is open."); \ + mutt_error _("No mailbox is open."); \ break; \ } \ else if (!Context->msgcount) \ { \ mutt_flushinp (); \ - mutt_error ("There are no messages."); \ + mutt_error _("There are no messages."); \ break; \ } #define CHECK_READONLY if (Context->readonly) \ { \ mutt_flushinp (); \ - mutt_error ("Mailbox is read-only."); \ + mutt_error _("Mailbox is read-only."); \ break; \ } @@ -205,19 +205,19 @@ static int mx_toggle_write (CONTEXT *ctx) if (ctx->readonly) { - mutt_error ("Cannot toggle write on a readonly mailbox!"); + mutt_error _("Cannot toggle write on a readonly mailbox!"); return -1; } if (ctx->dontwrite) { ctx->dontwrite = 0; - mutt_message ("Changes to folder will be written on folder exit."); + mutt_message _("Changes to folder will be written on folder exit."); } else { ctx->dontwrite = 1; - mutt_message ("Changes to folder will not be written."); + mutt_message _("Changes to folder will not be written."); } return 0; @@ -395,10 +395,10 @@ int mutt_index_menu (void) /* notify the user of new mail */ if (check == M_REOPENED) - mutt_error ("Mailbox was externally modified. Flags may be wrong."); + mutt_error _("Mailbox was externally modified. Flags may be wrong."); else { - mutt_message ("New mail in this mailbox."); + mutt_message _("New mail in this mailbox."); if (option (OPTBEEPNEW)) beep (); } @@ -507,13 +507,13 @@ int mutt_index_menu (void) { if (!Context) { - mutt_error ("No mailbox is open."); + mutt_error _("No mailbox is open."); continue; } if (!Context->tagged) { - mutt_error ("No tagged messages."); + mutt_error _("No tagged messages."); continue; } tag = 1; @@ -593,13 +593,13 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; mutt_ungetch (LastKey); buf[0] = 0; - if (mutt_get_field ("Jump to message: ", buf, sizeof (buf), 0) != 0 || - !buf[0]) + if (mutt_get_field (_("Jump to message: "), buf, sizeof (buf), 0) != 0 + || !buf[0]) break; if (! isdigit ((unsigned char) buf[0])) { - mutt_error ("Argument must be a message number."); + mutt_error _("Argument must be a message number."); break; } @@ -632,10 +632,10 @@ int mutt_index_menu (void) menu->redraw = REDRAW_MOTION; } else - mutt_error ("That message is not visible."); + mutt_error _("That message is not visible."); } else - mutt_error ("Invalid message number."); + mutt_error _("Invalid message number."); break; @@ -648,7 +648,7 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_READONLY; CHECK_ATTACH; - mutt_pattern_func (M_DELETE, "Delete messages matching: "); + mutt_pattern_func (M_DELETE, _("Delete messages matching: ")); menu->redraw = REDRAW_INDEX | REDRAW_STATUS; break; @@ -670,11 +670,12 @@ int mutt_index_menu (void) case OP_MAIN_SHOW_LIMIT: CHECK_MSGCOUNT; if (!Context->pattern) - mutt_message ("No limit pattern is in effect."); + mutt_message _("No limit pattern is in effect."); else { char buf[STRING]; - snprintf (buf, sizeof(buf), "Limit: %s",Context->pattern); + /* i18n: ask for a limit to apply */ + snprintf (buf, sizeof(buf), _("Limit: %s"),Context->pattern); mutt_message ("%s", buf); } break; @@ -683,7 +684,7 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; menu->oldcurrent = Context->vcount ? CURHDR->index : -1; - if (mutt_pattern_func (M_LIMIT, "Limit to messages matching: ") == 0) + if (mutt_pattern_func (M_LIMIT, _("Limit to messages matching: ")) == 0) { if (menu->oldcurrent >= 0) { @@ -713,7 +714,7 @@ int mutt_index_menu (void) break; } - if (query_quadoption (OPT_QUIT, "Quit Mutt?") == M_YES) + if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == M_YES) { if (!Context || mx_close_mailbox (Context) == 0) done = 1; @@ -824,7 +825,7 @@ int mutt_index_menu (void) case OP_MAIN_TAG_PATTERN: CHECK_MSGCOUNT; - mutt_pattern_func (M_TAG, "Tag messages matching: "); + mutt_pattern_func (M_TAG, _("Tag messages matching: ")); menu->redraw = REDRAW_INDEX | REDRAW_STATUS; break; @@ -832,14 +833,14 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; CHECK_READONLY; - if (mutt_pattern_func (M_UNDELETE, "Undelete messages matching: ") == 0) + if (mutt_pattern_func (M_UNDELETE, _("Undelete messages matching: ")) == 0) menu->redraw = REDRAW_INDEX | REDRAW_STATUS; break; case OP_MAIN_UNTAG_PATTERN: CHECK_MSGCOUNT; - if (mutt_pattern_func (M_UNTAG, "Untag messages matching: ") == 0) + if (mutt_pattern_func (M_UNTAG, _("Untag messages matching: ")) == 0) menu->redraw = REDRAW_INDEX | REDRAW_STATUS; break; @@ -857,9 +858,9 @@ int mutt_index_menu (void) case OP_MAIN_CHANGE_FOLDER_READONLY: if (op == OP_MAIN_CHANGE_FOLDER) - cp = "Open mailbox"; + cp = _("Open mailbox"); else - cp = "Open mailbox in read-only mode"; + cp = _("Open mailbox in read-only mode"); buf[0] = '\0'; mutt_buffy (buf); @@ -875,7 +876,7 @@ int mutt_index_menu (void) mutt_expand_path (buf, sizeof (buf)); if (mx_get_magic (buf) <= 0) { - mutt_error ("%s is not a mailbox.", buf); + mutt_error (_("%s is not a mailbox."), buf); break; } @@ -971,7 +972,7 @@ int mutt_index_menu (void) if ((menu->menu == MENU_MAIN) && (query_quadoption (OPT_QUIT, - "Exit Mutt without saving?") == M_YES)) + _("Exit Mutt without saving?")) == M_YES)) done = 1; break; @@ -981,14 +982,14 @@ int mutt_index_menu (void) if (menu->current >= Context->vcount - 1) { if (menu->menu == MENU_MAIN) - mutt_error ("You are on the last message."); + mutt_error _("You are on the last message."); break; } if ((menu->current = ci_next_undeleted (menu->current)) == -1) { menu->current = menu->oldcurrent; if (menu->menu == MENU_MAIN) - mutt_error ("No undeleted messages."); + mutt_error _("No undeleted messages."); } else if (menu->menu == MENU_PAGER) { @@ -1005,7 +1006,7 @@ int mutt_index_menu (void) if (menu->current >= Context->vcount - 1) { if (menu->menu == MENU_MAIN) - mutt_error ("You are on the last message."); + mutt_error _("You are on the last message."); break; } menu->current++; @@ -1023,14 +1024,14 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; if (menu->current < 1) { - mutt_error ("You are on the first message."); + mutt_error _("You are on the first message."); break; } if ((menu->current = ci_previous_undeleted (menu->current)) == -1) { menu->current = menu->oldcurrent; if (menu->menu == MENU_MAIN) - mutt_error ("No undeleted messages."); + mutt_error _("No undeleted messages."); } else if (menu->menu == MENU_PAGER) { @@ -1046,7 +1047,7 @@ int mutt_index_menu (void) CHECK_MSGCOUNT; if (menu->current < 1) { - if (menu->menu == MENU_MAIN) mutt_error ("You are on the first message."); + if (menu->menu == MENU_MAIN) mutt_error _("You are on the first message."); break; } menu->current--; @@ -1119,7 +1120,7 @@ int mutt_index_menu (void) i++; if (i > Context->vcount - 1) { - mutt_message ("Search wrapped to top."); + mutt_message _("Search wrapped to top."); i = 0; } } @@ -1128,7 +1129,7 @@ int mutt_index_menu (void) i--; if (i < 0) { - mutt_message ("Search wrapped to bottom."); + mutt_message _("Search wrapped to bottom."); i = Context->vcount - 1; } } @@ -1154,8 +1155,8 @@ int mutt_index_menu (void) if (menu->current == -1) { menu->current = menu->oldcurrent; - mutt_error ("%s%s.", (op == OP_MAIN_NEXT_NEW || op == OP_MAIN_PREV_NEW) ? "No new messages" : "No unread messages", - Context->pattern ? " in this limited view" : ""); + mutt_error ("%s%s.", (op == OP_MAIN_NEXT_NEW || op == OP_MAIN_PREV_NEW) ? _("No new messages") : _("No unread messages"), + Context->pattern ? _(" in this limited view") : ""); } else if (menu->menu == MENU_PAGER) { @@ -1265,9 +1266,9 @@ int mutt_index_menu (void) { menu->current = menu->oldcurrent; if (op == OP_MAIN_NEXT_THREAD || op == OP_MAIN_NEXT_SUBTHREAD) - mutt_error ("No more threads."); + mutt_error _("No more threads."); else - mutt_error ("You are on the first thread."); + mutt_error _("You are on the first thread."); } else if (menu->menu == MENU_PAGER) { @@ -1320,7 +1321,7 @@ int mutt_index_menu (void) } else { - mutt_error ("Thread contains unread messages."); + mutt_error _("Thread contains unread messages."); break; } @@ -1333,7 +1334,7 @@ int mutt_index_menu (void) if ((Sort & SORT_MASK) != SORT_THREADS) { - mutt_error ("Threading is not enabled."); + mutt_error _("Threading is not enabled."); break; } diff --git a/date.c b/date.c index 35f4ebfd..678a5b0d 100644 --- a/date.c +++ b/date.c @@ -45,7 +45,7 @@ static time_t mutt_compute_tz (time_t g, struct tm *utc) break; default: - mutt_error ("Please report this program error in the function mutt_mktime."); + mutt_error _("Please report this program error in the function mutt_mktime."); } return t; diff --git a/doc/Makefile.in b/doc/Makefile.in index c6712ceb..669a1d03 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -18,8 +18,11 @@ XCPPFLAGS=-I. @CPPFLAGS@ CFLAGS=@CFLAGS@ -DSHAREDIR=\"$(sharedir)\" $(XCPPFLAGS) LDFLAGS=@LDFLAGS@ +complete: all html -all: mutt.man dotlock.man manual.txt manual.html +all: mutt.man dotlock.man manual.txt + +html: manual.html install: dotlock.man mutt.man manual.txt ../mkinstalldirs $(mandir)/man1 diff --git a/edit.c b/edit.c index 77afba40..d4cda85d 100644 --- a/edit.c +++ b/edit.c @@ -33,7 +33,7 @@ * SLcurses_waddnstr() can't take a "const char *", so this is only * declared "static" (sigh) */ -static char EditorHelp[] = "\ +static char EditorHelp[] = N_("\ ~~ insert a line begining with a single ~\n\ ~b users add users to the Bcc: field\n\ ~c users add users to the Cc: field\n\ @@ -51,7 +51,7 @@ static char EditorHelp[] = "\ ~w file write message to file\n\ ~x abort changes and quit editor\n\ ~? this message\n\ -. on a line by itself ends input\n"; +. on a line by itself ends input\n"); static char ** be_snarf_data (FILE *f, char **buf, int *bufmax, int *buflen, int offset, @@ -175,7 +175,7 @@ be_include_messages (char *msg, char **buf, int *bufmax, int *buflen, buf[(*buflen)++] = safe_strdup ("\n"); } else - printw ("%d: invalid message number.\n", n); + printw (_("%d: invalid message number.\n"), n); msg = NULL; } return (buf); @@ -309,7 +309,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) be_edit_header (msg->env, 0); - addstr ("(End message with a . on a line by itself)\n"); + addstr _("(End message with a . on a line by itself)\n"); buf = be_snarf_file (path, buf, &bufmax, &buflen, 0); @@ -336,7 +336,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) switch (tmp[1]) { case '?': - addstr (EditorHelp); + addstr _(EditorHelp); break; case 'b': msg->env->bcc = mutt_parse_adrlist (msg->env->bcc, p); @@ -367,15 +367,15 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) (isupper ((unsigned char) tmp[1]))); } else - addstr ("No mailbox.\n"); + addstr _("No mailbox.\n"); break; case 'p': addstr ("-----\n"); - addstr ("Message contains:\n"); + addstr _("Message contains:\n"); be_print_header (msg->env); for (i = 0; i < buflen; i++) addstr (buf[i]); - addstr ("(continue)\n"); + addstr _("(continue)\n"); break; case 'q': done = 1; @@ -388,7 +388,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) buf = be_snarf_file (tmp, buf, &bufmax, &buflen, 1); } else - addstr ("missing filename.\n"); + addstr _("missing filename.\n"); break; case 's': safe_free ((void **) &msg->env->subject); @@ -409,7 +409,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) continue; } else - addstr ("No lines in message.\n"); + addstr _("No lines in message.\n"); break; case 'e': @@ -427,7 +427,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) buf = be_snarf_file (path, buf, &bufmax, &buflen, 0); - addstr ("(continue)\n"); + addstr _("(continue)\n"); } break; case 'w': @@ -438,7 +438,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur) done = 1; break; default: - printw ("%s: unknown editor command (~? for help)\n", tmp); + printw (_("%s: unknown editor command (~? for help)\n"), tmp); break; } } diff --git a/flags.c b/flags.c index 846dbd6a..02496ce4 100644 --- a/flags.c +++ b/flags.c @@ -214,7 +214,7 @@ int mutt_thread_set_flag (HEADER *cur, int flag, int bf, int subthread) if ((Sort & SORT_MASK) != SORT_THREADS) { - mutt_error ("Threading is not enabled."); + mutt_error _("Threading is not enabled."); return (-1); } @@ -251,7 +251,8 @@ int mutt_change_flag (HEADER *h, int bf) { int i, flag; - mvprintw (LINES - 1, 0, "%s flag? (D/N/O/r/*/!): ", bf ? "Set" : "Clear"); + mvprintw (LINES - 1, 0, "? (D/N/O/r/*/!): ", bf ? _("Set %s flag") : + _("Clear %s flag")); clrtoeol (); if ((i = mutt_getch ()) == ERR) diff --git a/gen_defs b/gen_defs index 926c3dad..06ba6e17 100755 --- a/gen_defs +++ b/gen_defs @@ -8,7 +8,7 @@ for mode in help defs; do help) echo "#ifdef HELP_C" echo "const char *HelpStrings[] = {" - expr='s;^[^ ]* *\(.*\); \1,;' + expr='s;^[^ ]* *\(.*\); N_(\1),;' ;; *) echo "enum {" diff --git a/handler.c b/handler.c index e448e152..0875b6a2 100644 --- a/handler.c +++ b/handler.c @@ -123,7 +123,7 @@ static int handler_state_fgetc(STATE *s) if((ch = fgetc(s->fpin)) == EOF) { dprint(1, (debugfile, "handler_state_fgetc: unexpected EOF.\n")); - state_puts ("[-- Error: unexpected end of file! --]\n", s); + state_puts (_("[-- Error: unexpected end of file! --]\n"), s); } return ch; } @@ -875,7 +875,7 @@ void alternative_handler (BODY *a, STATE *s) else if (s->flags & M_DISPLAY) { /* didn't find anything that we could display! */ - state_puts("[-- Error: Could not display any parts of Multipart/Alternative! --]\n", s); + state_puts(_("[-- Error: Could not display any parts of Multipart/Alternative! --]\n"), s); } } @@ -990,7 +990,7 @@ void multipart_handler (BODY *a, STATE *s) { if (s->flags & M_DISPLAY) { - snprintf (buffer, sizeof (buffer), "[-- Attachment #%d", count); + snprintf (buffer, sizeof (buffer), _("[-- Attachment #%d"), count); state_puts (buffer, s); if (p->description || p->filename || p->form_name) { @@ -1003,7 +1003,7 @@ void multipart_handler (BODY *a, STATE *s) mutt_pretty_size (length, sizeof (length), p->length); snprintf (buffer, sizeof (buffer), - "[-- Type: %s/%s, Encoding: %s, Size: %s --]\n", + _("[-- Type: %s/%s, Encoding: %s, Size: %s --]\n"), TYPE (p), p->subtype, ENCODING (p->encoding), length); state_puts (buffer, s); if (!option (OPTWEED)) @@ -1069,9 +1069,9 @@ void autoview_handler (BODY *a, STATE *s) { char mesg[STRING]; - snprintf (mesg, sizeof (buffer), "[-- Autoview using %s --]\n", command); + snprintf (mesg, sizeof (buffer), _("[-- Autoview using %s --]\n"), command); state_puts (mesg, s); - mutt_message("Invoking autoview command: %s",command); + mutt_message(_("Invoking autoview command: %s"),command); } if (piped) @@ -1108,7 +1108,7 @@ void autoview_handler (BODY *a, STATE *s) { char mesg[STRING]; - snprintf (mesg, sizeof (buffer), "[-- Autoview stderr of %s --]\n", + snprintf (mesg, sizeof (buffer), _("[-- Autoview stderr of %s --]\n"), command); state_puts (mesg, s); } @@ -1131,7 +1131,7 @@ void autoview_handler (BODY *a, STATE *s) { char mesg[STRING]; - snprintf (mesg, sizeof (buffer), "[-- Autoview stderr of %s --]\n", + snprintf (mesg, sizeof (buffer), _("[-- Autoview stderr of %s --]\n"), command); state_puts (mesg, s); } @@ -1232,7 +1232,7 @@ void mutt_body_handler (BODY *b, STATE *s) p = mutt_get_parameter ("protocol", b->parameter); if (!p) - mutt_error ("Error: Multipart/Signed has no protocol."); + mutt_error _("Error: multipart/signed has no protocol."); else if (strcasecmp ("application/pgp-signature", p) == 0) { if (s->flags & M_VERIFY) @@ -1244,7 +1244,7 @@ void mutt_body_handler (BODY *b, STATE *s) p = mutt_get_parameter ("protocol", b->parameter); if (!p) - mutt_error ("Error: Multipart/Encrypted has no protocol parameter!"); + mutt_error _("Error: multipart/encrypted has no protocol parameter!"); else if (strcasecmp ("application/pgp-encrypted", p) == 0) handler = pgp_encrypted_handler; } @@ -1286,7 +1286,7 @@ void mutt_body_handler (BODY *b, STATE *s) mutt_mktemp (tempfile); if ((s->fpout = safe_fopen (tempfile, "w")) == NULL) { - mutt_error ("Unable to open temporary file!"); + mutt_error _("Unable to open temporary file!"); return; } /* decoding the attachment changes the size and offset, so save a copy @@ -1345,14 +1345,14 @@ void mutt_body_handler (BODY *b, STATE *s) } else if (s->flags & M_DISPLAY) { - fprintf (s->fpout, "[-- %s/%s is unsupported ", TYPE (b), b->subtype); + fprintf (s->fpout, _("[-- %s/%s is unsupported "), TYPE (b), b->subtype); if (!option (OPTVIEWATTACH)) { if (km_expand_key (type, sizeof(type), km_find_func (MENU_PAGER, OP_VIEW_ATTACHMENTS))) - fprintf (s->fpout, "(use '%s' to view this part)", type); + fprintf (s->fpout, _("(use '%s' to view this part)"), type); else - fputs ("(need 'view-attachments' bound to key!)", s->fpout); + fputs (_("(need 'view-attachments' bound to key!)"), s->fpout); } fputs (" --]\n", s->fpout); } diff --git a/headers.c b/headers.c index 69c65e90..02ed3efe 100644 --- a/headers.c +++ b/headers.c @@ -198,7 +198,7 @@ void mutt_edit_headers (const char *editor, else { mutt_pretty_mailbox (path); - mutt_error ("%s: unable to attach file", path); + mutt_error (_("%s: unable to attach file"), path); } } keep = 0; diff --git a/help.c b/help.c index d1a29a91..22dbabf6 100644 --- a/help.c +++ b/help.c @@ -182,7 +182,7 @@ static void dump_menu (FILE *f, int menu) { b = help_lookupFunction (map->op, menu); fprintf (f, "%-22s %s\n", b ? b->name : "UNKNOWN", - b ? HelpStrings[b->op] : "ERROR: please report this bug"); + b ? _(HelpStrings[b->op]) : _("ERROR: please report this bug")); } } } @@ -207,7 +207,7 @@ static void dump_unbound (FILE *f, { if (! is_bound (map, funcs[i].op) && (!aux || ! is_bound (aux, funcs[i].op))) - fprintf (f, "%-35s%s\n", funcs[i].name, HelpStrings[funcs[i].op]); + fprintf (f, "%-35s%s\n", funcs[i].name, _(HelpStrings[funcs[i].op])); } } @@ -229,16 +229,16 @@ void mutt_help (int menu) funcs = km_get_table (menu); desc = mutt_getnamebyvalue (menu, Menus); if (!desc) - desc = ""; + desc = _(""); dump_menu (f, menu); if (menu != MENU_EDITOR && menu != MENU_PAGER) { - fputs ("\nGeneric bindings:\n\n", f); + fputs (_("\nGeneric bindings:\n\n"), f); dump_menu (f, MENU_GENERIC); } - fputs ("\nUnbound functions:\n\n", f); + fputs (_("\nUnbound functions:\n\n"), f); if (funcs) dump_unbound (f, funcs, Keymaps[menu], NULL); if (menu != MENU_PAGER) @@ -246,6 +246,6 @@ void mutt_help (int menu) fclose (f); - snprintf (buf, sizeof (buf), "Help for %s", desc); + snprintf (buf, sizeof (buf), _("Help for %s"), desc); mutt_do_pager (buf, t, 0, NULL); } diff --git a/hook.c b/hook.c index 259c2352..e0ca8f5d 100644 --- a/hook.c +++ b/hook.c @@ -58,7 +58,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) if (!MoreArgs (s)) { - strfcpy (err->data, "too few arguments", err->dsize); + strfcpy (err->data, _("too few arguments"), err->dsize); goto error; } @@ -66,13 +66,13 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) if (!command.data) { - strfcpy (err->data, "too few arguments", err->dsize); + strfcpy (err->data, _("too few arguments"), err->dsize); goto error; } if (MoreArgs (s)) { - strfcpy (err->data, "too many arguments", err->dsize); + strfcpy (err->data, _("too many arguments"), err->dsize); goto error; } diff --git a/imap.c b/imap.c index ef2433bc..530c761d 100644 --- a/imap.c +++ b/imap.c @@ -97,7 +97,7 @@ static void imap_make_sequence (char *buf, size_t buflen) static void imap_error (const char *where, const char *msg) { - mutt_error ("imap_error(): unexpected response in %s: %s\n", where, msg); + mutt_error (_("imap_error(): unexpected response in %s: %s\n"), where, msg); } /* date is of the form: DD-MMM-YYYY HH:MM:SS +ZZzz */ @@ -350,7 +350,7 @@ static int imap_handle_untagged (CONTEXT *ctx, char *s) /* something is wrong because the server reported fewer messages * than we previously saw */ - mutt_error ("Fatal error. Message count is out of sync!"); + mutt_error _("Fatal error. Message count is out of sync!"); CTX_DATA->status = IMAP_FATAL; mx_fastclose_mailbox (ctx); return (-1); @@ -425,7 +425,7 @@ static int imap_read_headers (CONTEXT *ctx, int msgbegin, int msgend) h=h0; for (msgno=msgbegin; msgno <= msgend ; msgno++) { - snprintf (buf, sizeof (buf), "Fetching message headers... [%d/%d]", + snprintf (buf, sizeof (buf), _("Fetching message headers... [%d/%d]"), msgno + 1, msgend + 1); mutt_message (buf); @@ -659,7 +659,7 @@ static int imap_open_connection (CONTEXT *ctx, CONNECTION *conn) return (-1); } - mutt_message ("Connecting to %s...", conn->server); + mutt_message (_("Connecting to %s..."), conn->server); if (connect (conn->fd, (struct sockaddr *) &sin, sizeof (sin)) < 0) { @@ -678,7 +678,7 @@ static int imap_open_connection (CONTEXT *ctx, CONNECTION *conn) if (!ImapUser) { strfcpy (user, NONULL(Username), sizeof (user)); - if (mutt_get_field ("IMAP Username: ", user, sizeof (user), 0) != 0 || + if (mutt_get_field (_("IMAP Username: "), user, sizeof (user), 0) != 0 || !user[0]) { user[0] = 0; @@ -691,7 +691,7 @@ static int imap_open_connection (CONTEXT *ctx, CONNECTION *conn) if (!ImapPass) { pass[0]=0; - snprintf (buf, sizeof (buf), "Password for %s@%s: ", user, conn->server); + snprintf (buf, sizeof (buf), _("Password for %s@%s: "), user, conn->server); if (mutt_get_field (buf, pass, sizeof (pass), M_PASS) != 0 || !pass[0]) { @@ -704,7 +704,7 @@ static int imap_open_connection (CONTEXT *ctx, CONNECTION *conn) imap_quote_string (q_user, sizeof (q_user), user); imap_quote_string (q_pass, sizeof (q_pass), pass); - mutt_message ("Logging in..."); + mutt_message _("Logging in..."); imap_make_sequence (seq, sizeof (seq)); snprintf (buf, sizeof (buf), "%s LOGIN %s %s\r\n", seq, q_user, q_pass); if (imap_exec (buf, sizeof (buf), ctx, seq, buf, 0) != 0) @@ -756,7 +756,7 @@ int imap_open_mailbox (CONTEXT *ctx) return (-1); conn->uses++; - mutt_message ("Selecting %s...", CTX_DATA->mailbox); + mutt_message (_("Selecting %s..."), CTX_DATA->mailbox); imap_quote_string(buf, sizeof(buf), CTX_DATA->mailbox); imap_make_sequence (seq, sizeof (seq)); snprintf (bufout, sizeof (bufout), "%s SELECT %s\r\n", seq, buf); @@ -851,7 +851,7 @@ int imap_open_mailbox_append (CONTEXT *ctx) { if (option (OPTCONFIRMCREATE)) { - snprintf (buf, sizeof (buf), "Create %s?", CTX_DATA->mailbox); + snprintf (buf, sizeof (buf), _("Create %s?"), CTX_DATA->mailbox); if (mutt_yesorno (buf, 1) < 1) return (-1); if (imap_create_mailbox (ctx) < 0) @@ -895,7 +895,7 @@ int imap_fetch_message (MESSAGE *msg, CONTEXT *ctx, int msgno) } } - mutt_message ("Fetching message..."); + mutt_message _("Fetching message..."); cache->index = ctx->hdrs[msgno]->index; mutt_mktemp (path); @@ -1003,7 +1003,7 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) } rewind(fp); - mutt_message ("Sending APPEND command ..."); + mutt_message _("Sending APPEND command ..."); imap_make_sequence (seq, sizeof (seq)); snprintf (buf, sizeof (buf), "%s APPEND %s {%d}\r\n", seq, CTX_DATA->mailbox, len); @@ -1041,7 +1041,7 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg) return (-1); } - mutt_message ("Uploading message ..."); + mutt_message _("Uploading message ..."); for(last = EOF, len = 0; (c = fgetc(fp)) != EOF; last = c) { @@ -1096,7 +1096,7 @@ int imap_close_connection (CONTEXT *ctx) /* if the server didn't shut down on us, close the connection gracefully */ if (CTX_DATA->status != IMAP_BYE) { - mutt_message ("Closing connection to IMAP server..."); + mutt_message _("Closing connection to IMAP server..."); imap_make_sequence (seq, sizeof (seq)); snprintf (buf, sizeof (buf), "%s LOGOUT\r\n", seq); mutt_socket_write (CTX_DATA->conn, buf); @@ -1125,8 +1125,8 @@ int imap_sync_mailbox (CONTEXT *ctx) { if (ctx->hdrs[n]->deleted || ctx->hdrs[n]->changed) { - snprintf (tmp, sizeof (tmp), "Saving message status flags... [%d/%d]", n+1, - ctx->msgcount); + snprintf (tmp, sizeof (tmp), _("Saving message status flags... [%d/%d]"), + n+1, ctx->msgcount); mutt_message (tmp); *tmp = 0; if (ctx->hdrs[n]->read) @@ -1151,7 +1151,7 @@ int imap_sync_mailbox (CONTEXT *ctx) } } - mutt_message ("Expunging messages from server..."); + mutt_message _("Expunging messages from server..."); CTX_DATA->status = IMAP_EXPUNGE; imap_make_sequence (seq, sizeof (seq)); snprintf (buf, sizeof (buf), "%s EXPUNGE\r\n", seq); @@ -1202,7 +1202,7 @@ int imap_close_mailbox (CONTEXT *ctx) char buf[LONG_STRING]; /* tell the server to commit changes */ - mutt_message ("Closing mailbox..."); + mutt_message _("Closing mailbox..."); imap_make_sequence (seq, sizeof (seq)); snprintf (buf, sizeof (buf), "%s CLOSE\r\n", seq); if (imap_exec (buf, sizeof (buf), ctx, seq, buf, 0) != 0) @@ -1303,7 +1303,7 @@ int imap_buffy_check (char *path) } else { - mutt_error ("BUG! Untagged IMAP Response during BUFFY Check"); + mutt_error _("BUG! Untagged IMAP Response during BUFFY Check"); } } } diff --git a/init.c b/init.c index 6f9f401d..07e6eab7 100644 --- a/init.c +++ b/init.c @@ -428,7 +428,7 @@ static int parse_alias (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) if ((p = strpbrk (s->dptr, " \t")) == NULL) { - strfcpy (err->data, "alias: no address", err->dsize); + strfcpy (err->data, _("alias: no address"), err->dsize); return (-1); } @@ -522,7 +522,7 @@ static int parse_my_hdr (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err mutt_extract_token (buf, s, M_TOKEN_SPACE | M_TOKEN_QUOTE); if ((p = strpbrk (buf->data, ": \t")) == NULL || *p != ':') { - strfcpy (err->data, "invalid header field", err->dsize); + strfcpy (err->data, _("invalid header field"), err->dsize); return (-1); } keylen = p - buf->data + 1; @@ -530,7 +530,7 @@ static int parse_my_hdr (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err SKIPWS (p); if (!*p) { - snprintf (err->data, err->dsize, "ignoring empty header field: %s", buf->data); + snprintf (err->data, err->dsize, _("ignoring empty header field: %s"), buf->data); return (-1); } @@ -582,7 +582,7 @@ parse_sort (short *val, const char *s, const struct mapping_t *map, BUFFER *err) if ((i = mutt_getvaluebyname (s, map)) == -1) { - snprintf (err->data, err->dsize, "%s: unknown sorting method", s); + snprintf (err->data, err->dsize, _("%s: unknown sorting method"), s); return (-1); } @@ -655,7 +655,7 @@ static void mutt_restore_default (struct option_t *p) } if (REGCOMP (pp->rx, s, flags) != 0) { - fprintf (stderr, "mutt_restore_default: error in regexp: %s\n", + fprintf (stderr, _("mutt_restore_default: error in regexp: %s\n"), pp->pattern); FREE (&pp->pattern); regfree (pp->rx); @@ -715,7 +715,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) if ((idx = mutt_option_index (tmp->data)) == -1 && !(reset && !strcmp ("all", tmp->data))) { - snprintf (err->data, err->dsize, "%s: unknown variable", tmp->data); + snprintf (err->data, err->dsize, _("%s: unknown variable"), tmp->data); return (-1); } SKIPWS (s->dptr); @@ -724,13 +724,13 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) { if (query || unset || inv) { - snprintf (err->data, err->dsize, "prefix is illegal with reset"); + snprintf (err->data, err->dsize, _("prefix is illegal with reset")); return (-1); } if (s && *s->dptr == '=') { - snprintf (err->data, err->dsize, "value is illegal with reset"); + snprintf (err->data, err->dsize, _("value is illegal with reset")); return (-1); } @@ -747,14 +747,14 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) { if (s && *s->dptr == '=') { - snprintf (err->data, err->dsize, "%s is a boolean var!", tmp->data); + snprintf (err->data, err->dsize, _("%s is a boolean var!"), tmp->data); return (-1); } if (query) { - snprintf (err->data, err->dsize, "%s is %sset", tmp->data, - option (MuttVars[idx].data) ? "" : "un"); + snprintf (err->data, err->dsize, option (MuttVars[idx].data) + ? _("%s is set") : _("%s is unset"), tmp->data); return 0; } @@ -925,7 +925,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) mutt_extract_token (tmp, s, 0); if (mx_set_magic (tmp->data)) { - snprintf (err->data, err->dsize, "%s: invalid mailbox type", tmp->data); + snprintf (err->data, err->dsize, _("%s: invalid mailbox type"), tmp->data); r = -1; break; } @@ -984,7 +984,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) set_quadoption (MuttVars[idx].data, M_ASKNO); else { - snprintf (err->data, err->dsize, "%s: invalid value.", tmp->data); + snprintf (err->data, err->dsize, _("%s: invalid value"), tmp->data); r = -1; break; } @@ -1034,7 +1034,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) } else { - snprintf (err->data, err->dsize, "%s: unknown type", MuttVars[idx].option); + snprintf (err->data, err->dsize, _("%s: unknown type"), MuttVars[idx].option); r = -1; break; } @@ -1083,7 +1083,7 @@ static int source_rc (const char *rcfile, BUFFER *err) { if (mutt_parse_rc_line (linebuf, &token, err) == -1) { - mutt_error ("Error in %s, line %d: %s", rcfile, line, err->data); + mutt_error (_("Error in %s, line %d: %s"), rcfile, line, err->data); rc = -1; } } @@ -1093,7 +1093,8 @@ static int source_rc (const char *rcfile, BUFFER *err) if (pid != -1) mutt_wait_filter (pid); if (rc) - snprintf (err->data, err->dsize, "source: errors in %s", rcfile); + /* the muttrc source keyword */ + snprintf (err->data, err->dsize, _("source: errors in %s"), rcfile); return (rc); } @@ -1103,12 +1104,12 @@ static int parse_source (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err if (mutt_extract_token (tmp, s, 0) != 0) { - snprintf (err->data, err->dsize, "source: error at %s", s->dptr); + snprintf (err->data, err->dsize, _("source: error at %s"), s->dptr); return (-1); } if (MoreArgs (s)) { - strfcpy (err->data, "source: too many arguments", err->dsize); + strfcpy (err->data, _("source: too many arguments"), err->dsize); return (-1); } strfcpy (path, tmp->data, sizeof (path)); @@ -1159,7 +1160,7 @@ int mutt_parse_rc_line (/* const */ char *line, BUFFER *token, BUFFER *err) } if (!Commands[i].name) { - snprintf (err->data, err->dsize, "%s: unknown command", NONULL (token->data)); + snprintf (err->data, err->dsize, _("%s: unknown command"), NONULL (token->data)); goto finish; } } @@ -1400,7 +1401,7 @@ static void start_debug (void) { t = time (0); fprintf (debugfile, "Mutt %s started at %s.\nDebugging at level %d.\n\n", - VERSION, asctime (localtime (&t)), debuglevel); + MUTT_VERSION, asctime (localtime (&t)), debuglevel); } } #endif @@ -1418,7 +1419,7 @@ static int mutt_execute_commands (LIST *p) { if (mutt_parse_rc_line (p->data, &token, &err) != 0) { - fprintf (stderr, "Error in command line: %s\n", err.data); + fprintf (stderr, _("Error in command line: %s\n"), err.data); FREE (&token.data); return (-1); } @@ -1461,7 +1462,7 @@ void mutt_init (int skip_sys_rc, LIST *commands) if (!Homedir) { mutt_endwin (NULL); - fputs ("unable to determine home directory", stderr); + fputs (_("unable to determine home directory"), stderr); exit (1); } if ((p = getenv ("USER"))) @@ -1469,7 +1470,7 @@ void mutt_init (int skip_sys_rc, LIST *commands) else { mutt_endwin (NULL); - fputs ("unable to determine user", stderr); + fputs (_("unable to determine username"), stderr); exit (1); } Shell = safe_strdup ((p = getenv ("SHELL")) ? p : "/bin/sh"); @@ -1611,10 +1612,10 @@ void mutt_init (int skip_sys_rc, LIST *commands) if (!Muttrc) { - snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), VERSION); + snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), MUTT_VERSION); if (access(buffer, F_OK) == -1) { - snprintf (buffer, sizeof (buffer), "%s/.muttrc-%s", NONULL(Homedir), VERSION); + snprintf (buffer, sizeof (buffer), "%s/.muttrc-%s", NONULL(Homedir), MUTT_VERSION); if (access (buffer, F_OK) == -1) { snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir)); @@ -1639,7 +1640,7 @@ void mutt_init (int skip_sys_rc, LIST *commands) requested not to via "-n". */ if (!skip_sys_rc) { - snprintf (buffer, sizeof (buffer), "%s/Muttrc-%s", SHAREDIR, VERSION); + snprintf (buffer, sizeof (buffer), "%s/Muttrc-%s", SHAREDIR, MUTT_VERSION); if (access (buffer, F_OK) == -1) snprintf (buffer, sizeof (buffer), "%s/Muttrc", SHAREDIR); if (access (buffer, F_OK) != -1) diff --git a/intl/ChangeLog b/intl/ChangeLog new file mode 100644 index 00000000..19895015 --- /dev/null +++ b/intl/ChangeLog @@ -0,0 +1,1086 @@ +1998-04-29 Ulrich Drepper + + * intl/localealias.c (read_alias_file): Use unsigned char for + local variables. Remove unused variable tp. + * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char * + for type of codeset. For loosing Solaris systems. + * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset. + * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable + len if not needed. + Patches by Jim Meyering. + +1998-04-28 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if + mmap is not supported. + + * hash-string.h: Don't include . + +1998-04-27 Ulrich Drepper + + * textdomain.c: Use strdup is available. + + * localealias.c: Define HAVE_MEMPCPY so that we can use this + function. Define and use semapahores to protect modfication of + global objects when compiling for glibc. Add code to allow + freeing alias table. + + * l10nflist.c: Don't assume stpcpy not being a macro. + + * gettextP.h: Define internal_function macri if not already done. + Use glibc byte-swap macros instead of defining SWAP when compiled + for glibc. + (struct loaded_domain): Add elements to allow unloading. + + * Makefile.in (distclean): Don't remove libintl.h here. + + * bindtextdomain.c: Carry over changes from glibc. Use strdup if + available. + + * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal + functions. Add memory freeing code for glibc. + + * dgettext.c: Update copyright. + + * explodename.c: Include stdlib.h and string.h only if they exist. + Use strings.h eventually. + + * finddomain.c: Mark internal functions. Use strdup if available. + Add memory freeing code for glibc. + +1997-10-10 20:00 Ulrich Drepper + + * libgettext.h: Fix dummy textdomain and bindtextdomain macros. + They should return reasonable values. + Reported by Tom Tromey . + +1997-09-16 03:33 Ulrich Drepper + + * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. + * intlh.inst.in: Likewise. + Reported by Jean-Marc Lasgouttes . + + * libintl.glibc: Update from current glibc version. + +1997-09-06 02:10 Ulrich Drepper + + * intlh.inst.in: Reformat copyright. + +1997-08-19 15:22 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Remove wrong comment. + +1997-08-16 00:13 Ulrich Drepper + + * Makefile.in (install-data): Don't change directory to install. + +1997-08-01 14:30 Ulrich Drepper + + * cat-compat.c: Fix copyright. + + * localealias.c: Don't define strchr unless !HAVE_STRCHR. + + * loadmsgcat.c: Update copyright. Fix typos. + + * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. + (_nl_make_l10nflist): Handle sponsor and revision correctly. + + * gettext.c: Update copyright. + * gettext.h: Likewise. + * hash-string.h: Likewise. + + * finddomain.c: Remoave dead code. Define strchr only if + !HAVE_STRCHR. + + * explodename.c: Include . + + * explodename.c: Reformat copyright text. + (_nl_explode_name): Fix typo. + + * dcgettext.c: Define and use __set_errno. + (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is + not defined. + + * bindtextdom.c: Pretty printing. + +1997-05-01 02:25 Ulrich Drepper + + * dcgettext.c (guess_category_value): Don't depend on + HAVE_LC_MESSAGES. We don't need the macro here. + Patch by Bruno Haible . + + * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL + macro. Instead use HAVE_LOCALE_NULL and define it when using + glibc, as in dcgettext.c. + Patch by Bruno Haible . + + * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois + Pinard. + +Mon Mar 10 06:51:17 1997 Ulrich Drepper + + * Makefile.in: Implement handling of libtool. + + * gettextP.h: Change data structures for use of generic lowlevel + i18n file handling. + +Wed Dec 4 20:21:18 1996 Ulrich Drepper + + * textdomain.c: Put parentheses around arguments of memcpy macro + definition. + * localealias.c: Likewise. + * l10nflist.c: Likewise. + * finddomain.c: Likewise. + * bindtextdom.c: Likewise. + Reported by Thomas Esken. + +Mon Nov 25 22:57:51 1996 Ulrich Drepper + + * textdomain.c: Move definition of `memcpy` macro to right + position. + +Fri Nov 22 04:01:58 1996 Ulrich Drepper + + * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using + bcopy if not already defined. Reported by Thomas Esken. + * bindtextdom.c: Likewise. + * l10nflist.c: Likewise. + * localealias.c: Likewise. + * textdomain.c: Likewise. + +Tue Oct 29 11:10:27 1996 Ulrich Drepper + + * Makefile.in (libdir): Change to use exec_prefix instead of + prefix. Reported by Knut-HÃ¥vardAksnes . + +Sat Aug 31 03:07:09 1996 Ulrich Drepper + + * l10nflist.c (_nl_normalize_codeset): We convert to lower case, + so don't prepend uppercase `ISO' for only numeric arg. + +Fri Jul 19 00:15:46 1996 Ulrich Drepper + + * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after + definition of _GNU_SOURCE. Patch by Roland McGrath. + + * Makefile.in (uninstall): Fix another bug with `for' loop and + empty arguments. Patch by Jim Meyering. Correct name os + uninstalled files: no intl- prefix anymore. + + * Makefile.in (install-data): Again work around shells which + cannot handle mpty for list. Reported by Jim Meyering. + +Sat Jul 13 18:11:35 1996 Ulrich Drepper + + * Makefile.in (install): Split goal. Now depend on install-exec + and install-data. + (install-exec, install-data): New goals. Created from former + install goal. + Reported by Karl Berry. + +Sat Jun 22 04:58:14 1996 Ulrich Drepper + + * Makefile.in (MKINSTALLDIRS): New variable. Path to + mkinstalldirs script. + (install): use MKINSTALLDIRS variable or if the script is not present + try to find it in the $top_scrdir). + +Wed Jun 19 02:56:56 1996 Ulrich Drepper + + * l10nflist.c: Linux libc *partly* includes the argz_* functions. + Grr. Work around by renaming the static version and use macros + for renaming. + +Tue Jun 18 20:11:17 1996 Ulrich Drepper + + * l10nflist.c: Correct presence test macros of __argz_* functions. + + * l10nflist.c: Include based on test of it instead when + __argz_* functions are available. + Reported by Andreas Schwab. + +Thu Jun 13 15:17:44 1996 Ulrich Drepper + + * explodename.c, l10nflist.c: Define NULL for dumb systems. + +Tue Jun 11 17:05:13 1996 Ulrich Drepper + + * intlh.inst.in, libgettext.h (dcgettext): Rename local variable + result to __result to prevent name clash. + + * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to + get prototype for stpcpy and strcasecmp. + + * intlh.inst.in, libgettext.h: Move declaration of + `_nl_msg_cat_cntr' outside __extension__ block to prevent warning + from gcc's -Wnested-extern option. + +Fri Jun 7 01:58:00 1996 Ulrich Drepper + + * Makefile.in (install): Remove comment. + +Thu Jun 6 17:28:17 1996 Ulrich Drepper + + * Makefile.in (install): Work around for another Buglix stupidity. + Always use an `else' close for `if's. Reported by Nelson Beebe. + + * Makefile.in (intlh.inst): Correct typo in phony rule. + Reported by Nelson Beebe. + +Thu Jun 6 01:49:52 1996 Ulrich Drepper + + * dcgettext.c (read_alias_file): Rename variable alloca_list to + block_list as the macro calls assume. + Patch by Eric Backus. + + * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using + malloc. + (read_alias_file): Rename varriabe alloca_list to block_list as the + macro calls assume. + Patch by Eric Backus. + + * l10nflist.c: Correct conditional for inclusion. + Reported by Roland McGrath. + + * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not + all-@USE_NLS@. + + * Makefile.in (install): intlh.inst comes from local dir, not + $(srcdir). + + * Makefile.in (intlh.inst): Special handling of this goal. If + used in gettext, this is really a rul to construct this file. If + used in any other package it is defined as a .PHONY rule with + empty body. + + * finddomain.c: Extract locale file information handling into + l10nfile.c. Rename local stpcpy__ function to stpcpy. + + * dcgettext.c (stpcpy): Add local definition. + + * l10nflist.c: Solve some portability problems. Patches partly by + Thomas Esken. Add local definition of stpcpy. + +Tue Jun 4 02:47:49 1996 Ulrich Drepper + + * intlh.inst.in: Don't depend including on + HAVE_LOCALE_H. Instead configure must rewrite this fiile + depending on the result of the configure run. + + * Makefile.in (install): libintl.inst is now called intlh.inst. + Add rules for updating intlh.inst from intlh.inst.in. + + * libintl.inst: Renamed to intlh.inst.in. + + * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 + because gcc has __buitlin_alloca. + Reported by Roland McGrath. + +Mon Jun 3 00:32:16 1996 Ulrich Drepper + + * Makefile.in (installcheck): New goal to fulfill needs of + automake's distcheck. + + * Makefile.in (install): Reorder commands so that VERSION is + found. + + * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in + @datadir@/gettext. + (COMSRCS): Add l10nfile.c. + (OBJECTS): Add l10nfile.o. + (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). + (DISTFILE.gettext): Remove $(DISTFILES.common). + (all-gettext): Remove goal. + (install): If $(PACKAGE) = gettext install, otherwose do nothing. No + package but gettext itself should install libintl.h + headers. + (dist): Extend goal to work for gettext, too. + (dist-gettext): Remove goal. + + * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. + +Sun Jun 2 17:33:06 1996 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Parameter is now comes from + find_l10nfile. + +Sat Jun 1 02:23:03 1996 Ulrich Drepper + + * l10nflist.c (__argz_next): Add definition. + + * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca + code. Use new l10nfile handling. + + * localealias.c [!HAVE_ALLOCA]: Add code for handling missing + alloca code. + + * l10nflist.c: Initial revision. + +Tue Apr 2 18:51:18 1996 Ulrich Drepper + + * Makefile.in (all-gettext): New goal. Same as all-yes. + +Thu Mar 28 23:01:22 1996 Karl Eichwalder + + * Makefile.in (gettextsrcdir): Define using @datadir@. + +Tue Mar 26 12:39:14 1996 Ulrich Drepper + + * finddomain.c: Include . Reported by Roland McGrath. + +Sat Mar 23 02:00:35 1996 Ulrich Drepper + + * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing + with external declaration. + +Sat Mar 2 00:47:09 1996 Ulrich Drepper + + * Makefile.in (all-no): Rename from all_no. + +Sat Feb 17 00:25:59 1996 Ulrich Drepper + + * gettextP.h [loaded_domain]: Array `successor' must now contain up + to 63 elements (because of codeset name normalization). + + * finddomain.c: Implement codeset name normalization. + +Thu Feb 15 04:39:09 1996 Ulrich Drepper + + * Makefile.in (all): Define to `all-@USE_NLS@'. + (all-yes, all_no): New goals. `all-no' is noop, `all-yes' + is former all. + +Mon Jan 15 21:46:01 1996 Howard Gayle + + * localealias.c (alias_compare): Increment string pointers in loop + of strcasecmp replacement. + +Fri Dec 29 21:16:34 1995 Ulrich Drepper + + * Makefile.in (install-src): Who commented this goal out ? :-) + +Fri Dec 29 15:08:16 1995 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls + should not effect it because a missing catalog is no error. + Reported by Harald Knig . + +Tue Dec 19 22:09:13 1995 Ulrich Drepper + + * Makefile.in (Makefile): Explicitly use $(SHELL) for running + shell scripts. + +Fri Dec 15 17:34:59 1995 Andreas Schwab + + * Makefile.in (install-src): Only install library and header when + we use the own implementation. Don't do it when using the + system's gettext or catgets functions. + + * dcgettext.c (find_msg): Must not swap domain->hash_size here. + +Sat Dec 9 16:24:37 1995 Ulrich Drepper + + * localealias.c, libintl.inst, libgettext.h, hash-string.h, + gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: + Use PARAMS instead of __P. Suggested by Roland McGrath. + +Tue Dec 5 11:39:14 1995 Larry Schwimmer + + * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if + !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. + +Mon Dec 4 15:42:07 1995 Ulrich Drepper + + * Makefile.in (install-src): + Install libintl.inst instead of libintl.h.install. + +Sat Dec 2 22:51:38 1995 Marcus Daniels + + * cat-compat.c (textdomain): + Reverse order in which files are tried you load. First + try local file, when this failed absolute path. + +Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe + + * cat-compat.c (bindtextdomain): Add missing { }. + +Sun Nov 26 18:21:41 1995 Ulrich Drepper + + * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. + + * Makefile.in: + Add dummy `all' and `dvi' goals. Reported by Tom Tromey. + +Sat Nov 25 16:12:01 1995 Franc,ois Pinard + + * hash-string.h: Capitalize arguments of macros. + +Sat Nov 25 12:01:36 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Prevent files names longer than 13 + characters. libintl.h.glibc->libintl.glibc, + libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. + +Sat Nov 25 11:31:12 1995 Eric Backus + + * dcgettext.c: Fix bug in preprocessor conditionals. + +Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe + + * libgettext.h: Solaris cc does not understand + #if !SYMBOL1 && !SYMBOL2. Sad but true. + +Thu Nov 23 16:22:14 1995 Ulrich Drepper + + * hash-string.h (hash_string): + Fix for machine with >32 bit `unsigned long's. + + * dcgettext.c (DCGETTEXT): + Fix horrible bug in loop for alternative translation. + +Thu Nov 23 01:45:29 1995 Ulrich Drepper + + * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: + Some further simplifications in message number generation. + +Mon Nov 20 21:08:43 1995 Ulrich Drepper + + * libintl.h.glibc: Use __const instead of const in prototypes. + + * Makefile.in (install-src): + Install libintl.h.install instead of libintl.h. This + is a stripped-down version. Suggested by Peter Miller. + + * libintl.h.install, libintl.h.glibc: Initial revision. + + * localealias.c (_nl_expand_alias, read_alias_file): + Protect prototypes in type casts by __P. + +Tue Nov 14 16:43:58 1995 Ulrich Drepper + + * hash-string.h: Correct prototype for hash_string. + +Sun Nov 12 12:42:30 1995 Ulrich Drepper + + * hash-string.h (hash_string): Add prototype. + + * gettextP.h: Fix copyright. + (SWAP): Add prototype. + +Wed Nov 8 22:56:33 1995 Ulrich Drepper + + * localealias.c (read_alias_file): Forgot sizeof. + Avoid calling *printf function. This introduces a big overhead. + Patch by Roland McGrath. + +Tue Nov 7 14:21:08 1995 Ulrich Drepper + + * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. + + * finddomain.c (stpcpy): + Define substitution function local. The macro was to flaky. + + * cat-compat.c: Fix typo. + + * xopen-msg.sed, linux-msg.sed: + While bringing message number to right place only accept digits. + + * linux-msg.sed, xopen-msg.sed: Now that the counter does not have + leading 0s we don't need to remove them. Reported by Marcus + Daniels. + + * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in + dependency. Reported by Marcus Daniels. + + * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. + Generally cleanup using #if instead of #ifndef. + + * Makefile.in: Correct typos in comment. By Franc,ois Pinard. + +Mon Nov 6 00:27:02 1995 Ulrich Drepper + + * Makefile.in (install-src): Don't install libintl.h and libintl.a + if we use an available gettext implementation. + +Sun Nov 5 22:02:08 1995 Ulrich Drepper + + * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported + by Franc,ois Pinard. + + * libgettext.h: Use #if instead of #ifdef/#ifndef. + + * finddomain.c: + Comments describing what has to be done should start with FIXME. + +Sun Nov 5 19:38:01 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. + DISTFILES.common names the files common to both dist goals. + DISTFILES.gettext are the files only distributed in GNU gettext. + +Sun Nov 5 17:32:54 1995 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Correct searching in derived locales. + This was necessary since a change in _nl_find_msg several weeks + ago. I really don't know this is still not fixed. + +Sun Nov 5 12:43:12 1995 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This + might mark a special condition. + + * finddomain.c (make_entry_rec): Don't make illegal entry as decided. + + * Makefile.in (dist): Suppress error message when ln failed. + Get files from $(srcdir) explicitly. + + * libgettext.h (gettext_const): Rename to gettext_noop. + +Fri Nov 3 07:36:50 1995 Ulrich Drepper + + * finddomain.c (make_entry_rec): + Protect against wrong locale names by testing mask. + + * libgettext.h (gettext_const): Add macro definition. + Capitalize macro arguments. + +Thu Nov 2 23:15:51 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Test for pointer != NULL before accessing value. + Reported by Tom Tromey. + + * gettext.c (NULL): + Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. + +Mon Oct 30 21:28:52 1995 Ulrich Drepper + + * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. + +Sat Oct 28 23:20:47 1995 Ulrich Drepper + + * libgettext.h: Disable dcgettext optimization for Solaris 2.3. + + * localealias.c (alias_compare): + Peter Miller reported that tolower in some systems is + even dumber than I thought. Protect call by `isupper'. + +Fri Oct 27 22:22:51 1995 Ulrich Drepper + + * Makefile.in (libdir, includedir): New variables. + (install-src): Install libintl.a and libintl.h in correct dirs. + +Fri Oct 27 22:07:29 1995 Ulrich Drepper + + * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. + + * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. + + * localealias.c: + Fix typo and superflous test. Reported by Christian von Roques. + +Fri Oct 6 11:52:05 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Correct some remainder from the pre-CEN syntax. Now + we don't have a constant number of successors anymore. + +Wed Sep 27 21:41:13 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Add libintl.h.glibc. + + * Makefile.in (dist-libc): Add goal for packing sources for glibc. + (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. + + * loadmsgcat.c: Forget to continue #if line. + + * localealias.c: + [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name + space clean. + + * dcgettext.c, finddomain.c: Better comment to last change. + + * loadmsgcat.c: + [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to + __fstat, __open, __close, __read, __mmap, and __munmap resp + to keep ANSI C name space clean. + + * finddomain.c: + [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. + + * dcgettext.c: + [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to + keep ANSI C name space clean. + + * libgettext.h: + Include sys/types.h for those old SysV systems out there. + Reported by Francesco Potorti`. + + * loadmsgcat.c (use_mmap): Define if compiled for glibc. + + * bindtextdom.c: Include all those standard headers + unconditionally if _LIBC is defined. + + * finddomain.c: Fix 2 times defiend -> defined. + + * textdomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. + + * gettext.c: + Include libintl.h instead of libgettext.h when compiling for glibc. + Get NULL from stddef.h if we compile for glibc. + + * finddomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * dcgettext.c: Include all those standard headers unconditionally + if _LIBC is defined. + + * dgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. + + * dcgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. + + * bindtextdom.c: + If compiled in glibc include libintl.h instead of libgettext.h. + +Mon Sep 25 22:23:06 1995 Ulrich Drepper + + * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. + Reported by Marcus Daniels. + + * cat-compat.c (bindtextdomain): + String used in putenv must not be recycled. + Reported by Marcus Daniels. + + * libgettext.h (__USE_GNU_GETTEXT): + Additional symbol to signal that we use GNU gettext + library. + + * cat-compat.c (bindtextdomain): + Fix bug with the strange stpcpy replacement. + Reported by Nelson Beebe. + +Sat Sep 23 08:23:51 1995 Ulrich Drepper + + * cat-compat.c: Include for stpcpy prototype. + + * localealias.c (read_alias_file): + While expand strdup code temporary variable `cp' hided + higher level variable with same name. Rename to `tp'. + + * textdomain.c (textdomain): + Avoid warning by using temporary variable in strdup code. + + * finddomain.c (_nl_find_domain): Remove unused variable `application'. + +Thu Sep 21 15:51:44 1995 Ulrich Drepper + + * localealias.c (alias_compare): + Use strcasecmp() only if available. Else use + implementation in place. + + * intl-compat.c: + Wrapper functions now call *__ functions instead of __*. + + * libgettext.h: Declare prototypes for *__ functions instead for __*. + + * cat-compat.c, loadmsgcat.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + + * bindtextdom.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Rename to bindtextdomain__ if not used in GNU C Library. + + * dgettext.c: + Rename function to dgettext__ if not used in GNU C Library. + + * gettext.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Functions now called gettext__ if not used in GNU C Library. + + * dcgettext.c, localealias.c, textdomain.c, finddomain.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + +Sun Sep 17 23:14:49 1995 Ulrich Drepper + + * finddomain.c: Correct some bugs in handling of CEN standard + locale definitions. + +Thu Sep 7 01:49:28 1995 Ulrich Drepper + + * finddomain.c: Implement CEN syntax. + + * gettextP.h (loaded_domain): Extend number of successors to 31. + +Sat Aug 19 19:25:29 1995 Ulrich Drepper + + * Makefile.in (aliaspath): Remove path to X11 locale dir. + + * Makefile.in: Make install-src depend on install. This helps + gettext to install the sources and other packages can use the + install goal. + +Sat Aug 19 15:19:33 1995 Ulrich Drepper + + * Makefile.in (uninstall): Remove stuff installed by install-src. + +Tue Aug 15 13:13:53 1995 Ulrich Drepper + + * VERSION.in: Initial revision. + + * Makefile.in (DISTFILES): + Add VERSION file. This is not necessary for gettext, but + for other packages using this library. + +Tue Aug 15 06:16:44 1995 Ulrich Drepper + + * gettextP.h (_nl_find_domain): + New prototype after changing search strategy. + + * finddomain.c (_nl_find_domain): + We now try only to find a specified catalog. Fall back to other + catalogs listed in the locale list is now done in __dcgettext. + + * dcgettext.c (__dcgettext): + Now we provide message fall back even to different languages. + I.e. if a message is not available in one language all the other + in the locale list a tried. Formerly fall back was only possible + within one language. Implemented by moving one loop from + _nl_find_domain to here. + +Mon Aug 14 23:45:50 1995 Ulrich Drepper + + * Makefile.in (gettextsrcdir): + Directory where source of GNU gettext library are made + available. + (INSTALL, INSTALL_DATA): Programs used for installing sources. + (gettext-src): New. Rule to install GNU gettext sources for use in + gettextize shell script. + +Sun Aug 13 14:40:48 1995 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): + Use mmap for loading only when munmap function is + also available. + + * Makefile.in (install): Depend on `all' goal. + +Wed Aug 9 11:04:33 1995 Ulrich Drepper + + * localealias.c (read_alias_file): + Do not overwrite '\n' when terminating alias value string. + + * localealias.c (read_alias_file): + Handle long lines. Ignore the rest not fitting in + the buffer after the initial `fgets' call. + +Wed Aug 9 00:54:29 1995 Ulrich Drepper + + * gettextP.h (_nl_load_domain): + Add prototype, replacing prototype for _nl_load_msg_cat. + + * finddomain.c (_nl_find_domain): + Remove unneeded variable filename and filename_len. + (expand_alias): Remove prototype because functions does not + exist anymore. + + * localealias.c (read_alias_file): + Change type of fname_len parameter to int. + (xmalloc): Add prototype. + + * loadmsgcat.c: Better prototypes for xmalloc. + +Tue Aug 8 22:30:39 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Allow alias name to be constructed from the four components. + + * Makefile.in (aliaspath): New variable. Set to preliminary value. + (SOURCES): Add localealias.c. + (OBJECTS): Add localealias.o. + + * gettextP.h: Add prototype for _nl_expand_alias. + + * finddomain.c: Aliasing handled in intl/localealias.c. + + * localealias.c: Aliasing for locale names. + + * bindtextdom.c: Better prototypes for xmalloc and xstrdup. + +Mon Aug 7 23:47:42 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): gettext.perl is now found in misc/. + + * cat-compat.c (bindtextdomain): + Correct implementation. dirname parameter was not used. + Reported by Marcus Daniels. + + * gettextP.h (loaded_domain): + New fields `successor' and `decided' for oo, lazy + message handling implementation. + + * dcgettext.c: + Adopt for oo, lazy message handliing. + Now we can inherit translations from less specific locales. + (find_msg): New function. + + * loadmsgcat.c, finddomain.c: + Complete rewrite. Implement oo, lazy message handling :-). + We now have an additional environment variable `LANGUAGE' with + a higher priority than LC_ALL for the LC_MESSAGE locale. + Here we can set a colon separated list of specifications each + of the form `language[_territory[.codeset]][@modifier]'. + +Sat Aug 5 09:55:42 1995 Ulrich Drepper + + * finddomain.c (unistd.h): + Include to get _PC_PATH_MAX defined on system having it. + +Fri Aug 4 22:42:00 1995 Ulrich Drepper + + * finddomain.c (stpcpy): Include prototype. + + * Makefile.in (dist): Remove `copying instead' message. + +Wed Aug 2 18:52:03 1995 Ulrich Drepper + + * Makefile.in (ID, TAGS): Do not use $^. + +Tue Aug 1 20:07:11 1995 Ulrich Drepper + + * Makefile.in (TAGS, ID): Use $^ as command argument. + (TAGS): Give etags -o option t write to current directory, + not $(srcdir). + (ID): Use $(srcdir) instead os $(top_srcdir)/src. + (distclean): Remove ID. + +Sun Jul 30 11:51:46 1995 Ulrich Drepper + + * Makefile.in (gnulocaledir): + New variable, always using share/ for data directory. + (DEFS): Add GNULOCALEDIR, used in finddomain.c. + + * finddomain.c (_nl_default_dirname): + Set to GNULOCALEDIR, because it always has to point + to the directory where GNU gettext Library writes it to. + + * intl-compat.c (textdomain, bindtextdomain): + Undefine macros before function definition. + +Sat Jul 22 01:10:02 1995 Ulrich Drepper + + * libgettext.h (_LIBINTL_H): + Protect definition in case where this file is included as + libgettext.h on Solaris machines. Add comment about this. + +Wed Jul 19 02:36:42 1995 Ulrich Drepper + + * intl-compat.c (textdomain): Correct typo. + +Wed Jul 19 01:51:35 1995 Ulrich Drepper + + * dcgettext.c (dcgettext): Function now called __dcgettext. + + * dgettext.c (dgettext): Now called __dgettext and calls + __dcgettext. + + * gettext.c (gettext): + Function now called __gettext and calls __dgettext. + + * textdomain.c (textdomain): Function now called __textdomain. + + * bindtextdom.c (bindtextdomain): Function now called + __bindtextdomain. + + * intl-compat.c: Initial revision. + + * Makefile.in (SOURCES): Add intl-compat.c. + (OBJECTS): We always compile the GNU gettext library functions. + OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, + and intl-compat.o. + (GETTOBJS): Contains now only intl-compat.o. + + * libgettext.h: + Re-include protection matches dualistic character of libgettext.h. + For all functions in GNU gettext library define __ counter part. + + * finddomain.c (strchr): Define as index if not found in C library. + (_nl_find_domain): For relative paths paste / in between. + +Tue Jul 18 16:37:45 1995 Ulrich Drepper + + * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. + + * xopen-msg.sed: Fix bug with `msgstr ""' lines. + A little bit better comments. + +Tue Jul 18 01:18:27 1995 Ulrich Drepper + + * Makefile.in: + po-mode.el, makelinks, combine-sh are now found in ../misc. + + * po-mode.el, makelinks, combine-sh, elisp-comp: + Moved to ../misc/. + + * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. + +Sun Jul 16 22:33:02 1995 Ulrich Drepper + + * Makefile.in (INSTALL, INSTALL_DATA): New variables. + (install-data, uninstall): Install/uninstall .elc file. + + * po-mode.el (Installation comment): + Add .pox as possible extension of .po files. + +Sun Jul 16 13:23:27 1995 Ulrich Drepper + + * elisp-comp: Complete new version by Franc,ois: This does not + fail when not compiling in the source directory. + +Sun Jul 16 00:12:17 1995 Ulrich Drepper + + * Makefile.in (../po/cat-id-tbl.o): + Use $(MAKE) instead of make for recursive make. + + * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. + (install-exec): Add missing dummy goal. + (install-data, uninstall): @ in multi-line shell command at + beginning, not in front of echo. Reported by Eric Backus. + +Sat Jul 15 00:21:28 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): + Rename libgettext.perl to gettext.perl to fit in 14 chars + file systems. + + * gettext.perl: + Rename to gettext.perl to fit in 14 chars file systems. + +Thu Jul 13 23:17:20 1995 Ulrich Drepper + + * cat-compat.c: If !STDC_HEADERS try to include malloc.h. + +Thu Jul 13 20:55:02 1995 Ulrich Drepper + + * po2tbl.sed.in: Pretty printing. + + * linux-msg.sed, xopen-msg.sed: + Correct bugs with handling substitute flags in branches. + + * hash-string.h (hash_string): + Old K&R compilers don't under stand `unsigned char'. + + * gettext.h (nls_uint32): + Some old K&R compilers (eg HP) don't understand `unsigned int'. + + * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. + +Thu Jul 13 01:34:33 1995 Ulrich Drepper + + * Makefile.in (ELCFILES): New variable. + (DISTFILES): Add elisp-comp. + Add implicit rule for .el -> .elc compilation. + (install-data): install $ELCFILES + (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. + + * elisp-comp: Initial revision + +Wed Jul 12 16:14:52 1995 Ulrich Drepper + + * Makefile.in: + cat-id-tbl.c is now found in po/. This enables us to use an identical + intl/ directory in all packages. + + * dcgettext.c (dcgettext): hashing does not work for table size <= 2. + + * textdomain.c: fix typo (#if def -> #if defined) + +Tue Jul 11 18:44:43 1995 Ulrich Drepper + + * Makefile.in (stamp-cat-id): use top_srcdir to address source files + (DISTFILES,distclean): move tupdate.perl to src/ + + * po-to-tbl.sed.in: + add additional jump to clear change flag to recognize multiline strings + +Tue Jul 11 01:32:50 1995 Ulrich Drepper + + * textdomain.c: Protect inclusion of stdlib.h and string.h. + + * loadmsgcat.c: Protect inclusion of stdlib.h. + + * libgettext.h: Protect inclusion of locale.h. + Allow use in C++ programs. + Define NULL is not happened already. + + * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of + po-to-tbl.sed. + (distclean): remove po-to-tbl.sed and tupdate.perl. + + * tupdate.perl.in: Substitute Perl path even in exec line. + Don't include entries without translation from old .po file. + +Tue Jul 4 00:41:51 1995 Ulrich Drepper + + * tupdate.perl.in: use "Updated: " in msgid "". + + * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). + Define getenv if !__STDC__. + + * bindtextdom.c: Protect stdlib.h and string.h inclusion. + Define free if !__STDC__. + + * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + Define free if !__STDC__. + + * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + +Mon Jul 3 23:56:30 1995 Ulrich Drepper + + * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. + Remove unneeded $(srcdir) from Makefile.in dependency. + + * makelinks: Add copyright and short description. + + * po-mode.el: Last version for 0.7. + + * tupdate.perl.in: Fix die message. + + * dcgettext.c: Protect include of string.h. + + * gettext.c: Protect include of stdlib.h and further tries to get NULL. + + * finddomain.c: Some corrections in includes. + + * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. + + * po-to-tbl.sed: Adopt for new .po file format. + + * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. + +Sun Jul 2 23:55:03 1995 Ulrich Drepper + + * tupdate.perl.in: Complete rewrite for new .po file format. + +Sun Jul 2 02:06:50 1995 Ulrich Drepper + + * First official release. This directory contains all the code + needed to internationalize own packages. It provides functions + which allow to use the X/Open catgets function with an interface + like the Uniforum gettext function. For system which does not + have neither of those a complete implementation is provided. diff --git a/intl/Makefile.in b/intl/Makefile.in new file mode 100644 index 00000000..4bdb186d --- /dev/null +++ b/intl/Makefile.in @@ -0,0 +1,214 @@ +# Makefile for directory with message catalog handling in GNU NLS Utilities. +# Copyright (C) 1995, 1996, 1997 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = .. +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +transform = @program_transform_name@ +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = @datadir@/gettext/intl +aliaspath = $(localedir):. +subdir = intl + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ + +l = @l@ + +AR = ar +CC = @CC@ +LIBTOOL = @LIBTOOL@ +RANLIB = @RANLIB@ + +DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ +-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +HEADERS = $(COMHDRS) libgettext.h loadinfo.h +COMHDRS = gettext.h gettextP.h hash-string.h +SOURCES = $(COMSRCS) intl-compat.c cat-compat.c +COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ +finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ +explodename.c +OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ +finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ +explodename.$lo +CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo +GETTOBJS = intl-compat.$lo +DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ +xopen-msg.sed $(HEADERS) $(SOURCES) +DISTFILES.normal = VERSION +DISTFILES.gettext = libintl.glibc intlh.inst.in + +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(COMPILE) $< +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) $< + +INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib + +all: all-@USE_INCLUDED_LIBINTL@ + +all-yes: libintl.$la intlh.inst +all-no: + +libintl.a: $(OBJECTS) + rm -f $@ + $(AR) cru $@ $(OBJECTS) + $(RANLIB) $@ + +libintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ + -version-info 1:0 -rpath $(libdir) + +../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot + cd ../po && $(MAKE) cat-id-tbl.$lo + +check: all + +# This installation goal is only used in GNU gettext. Packages which +# only use the library should use install instead. + +# We must not install the libintl.h/libintl.a files if we are on a +# system which has the gettext() function in its C library or in a +# separate library or use the catgets interface. A special case is +# where configure found a previously installed GNU gettext library. +# If you want to use the one which comes with this version of the +# package, you have to use `configure --with-included-gettext'. +install: install-exec install-data +install-exec: all + if test "$(PACKAGE)" = "gettext" \ + && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(libdir) $(includedir); \ + else \ + $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ + fi; \ + $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ + $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ + else \ + : ; \ + fi +install-data: all + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + rm -f $(gettextsrcdir)/$$file; \ + done + +info dvi: + +$(OBJECTS): ../config.h libgettext.h +bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h +dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h + +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) + +id: ID + +ID: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) + + +mostlyclean: + rm -f *.a *.o *.lo core core.* + +clean: mostlyclean + +distclean: clean + rm -f Makefile ID TAGS po2msg.sed po2tbl.sed + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + +# GNU gettext needs not contain the file `VERSION' but contains some +# other files which should not be distributed in other packages. +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: Makefile $(DISTFILES) + if test "$(PACKAGE)" = gettext; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + for file in $(DISTFILES.common) $$additional; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +dist-libc: + tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc + +Makefile: Makefile.in ../config.status + cd .. \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# The dependency for intlh.inst is different in gettext and all other +# packages. Because we cannot you GNU make features we have to solve +# the problem while rewriting Makefile.in. +@GT_YES@intlh.inst: intlh.inst.in ../config.status +@GT_YES@ cd .. \ +@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ +@GT_YES@ $(SHELL) ./config.status +@GT_NO@.PHONY: intlh.inst +@GT_NO@intlh.inst: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c new file mode 100644 index 00000000..d9c3f349 --- /dev/null +++ b/intl/bindtextdom.c @@ -0,0 +1,203 @@ +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997, 1998 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define BINDTEXTDOMAIN __bindtextdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define BINDTEXTDOMAIN bindtextdomain__ +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +BINDTEXTDOMAIN (domainname, dirname) + const char *domainname; + const char *dirname; +{ + struct binding *binding; + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0') + return NULL; + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (dirname == NULL) + /* The current binding has be to returned. */ + return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; + + if (binding != NULL) + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + if (strcmp (dirname, binding->dirname) != 0) + { + char *new_dirname; + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_dirname = strdup (dirname); + if (new_dirname == NULL) + return NULL; +#else + size_t len = strlen (dirname) + 1; + new_dirname = (char *) malloc (len); + if (new_dirname == NULL) + return NULL; + + memcpy (new_dirname, dirname, len); +#endif + } + + if (binding->dirname != _nl_default_dirname) + free (binding->dirname); + + binding->dirname = new_dirname; + } + } + else + { + /* We have to create a new binding. */ +#if !defined _LIBC && !defined HAVE_STRDUP + size_t len; +#endif + struct binding *new_binding = + (struct binding *) malloc (sizeof (*new_binding)); + + if (new_binding == NULL) + return NULL; + +#if defined _LIBC || defined HAVE_STRDUP + new_binding->domainname = strdup (domainname); + if (new_binding->domainname == NULL) + return NULL; +#else + len = strlen (domainname) + 1; + new_binding->domainname = (char *) malloc (len); + if (new_binding->domainname == NULL) + return NULL; + memcpy (new_binding->domainname, domainname, len); +#endif + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_binding->dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_binding->dirname = strdup (dirname); + if (new_binding->dirname == NULL) + return NULL; +#else + len = strlen (dirname) + 1; + new_binding->dirname = (char *) malloc (len); + if (new_binding->dirname == NULL) + return NULL; + memcpy (new_binding->dirname, dirname, len); +#endif + } + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + binding = new_binding; + } + + return binding->dirname; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +#endif diff --git a/intl/cat-compat.c b/intl/cat-compat.c new file mode 100644 index 00000000..867d901b --- /dev/null +++ b/intl/cat-compat.c @@ -0,0 +1,262 @@ +/* Compatibility code for gettext-using-catgets interface. + Copyright (C) 1995, 1997 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef STDC_HEADERS +# include +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# endif +#endif + +#ifdef HAVE_NL_TYPES_H +# include +#endif + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* The catalog descriptor. */ +static nl_catd catalog = (nl_catd) -1; + +/* Name of the default catalog. */ +static const char default_catalog_name[] = "messages"; + +/* Name of currently used catalog. */ +static const char *catalog_name = default_catalog_name; + +/* Get ID for given string. If not found return -1. */ +static int msg_to_cat_id PARAMS ((const char *msg)); + +/* Substitution for systems lacking this function in their C library. */ +#if !_LIBC && !HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +#endif + + +/* Set currently used domain/catalog. */ +char * +textdomain (domainname) + const char *domainname; +{ + nl_catd new_catalog; + char *new_name; + size_t new_name_len; + char *lang; + +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ + && defined HAVE_LOCALE_NULL + lang = setlocale (LC_MESSAGES, NULL); +#else + lang = getenv ("LC_ALL"); + if (lang == NULL || lang[0] == '\0') + { + lang = getenv ("LC_MESSAGES"); + if (lang == NULL || lang[0] == '\0') + lang = getenv ("LANG"); + } +#endif + if (lang == NULL || lang[0] == '\0') + lang = "C"; + + /* See whether name of currently used domain is asked. */ + if (domainname == NULL) + return (char *) catalog_name; + + if (domainname[0] == '\0') + domainname = default_catalog_name; + + /* Compute length of added path element. */ + new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) + + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 + + sizeof (".cat"); + + new_name = (char *) malloc (new_name_len); + if (new_name == NULL) + return NULL; + + strcpy (new_name, PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + /* NLSPATH search didn't work, try absolute path */ + sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, + PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + free (new_name); + return (char *) catalog_name; + } + } + + /* Close old catalog. */ + if (catalog != (nl_catd) -1) + catclose (catalog); + if (catalog_name != default_catalog_name) + free ((char *) catalog_name); + + catalog = new_catalog; + catalog_name = new_name; + + return (char *) catalog_name; +} + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ +#if HAVE_SETENV || HAVE_PUTENV + char *old_val, *new_val, *cp; + size_t new_val_len; + + /* This does not make much sense here but to be compatible do it. */ + if (domainname == NULL) + return NULL; + + /* Compute length of added path element. If we use setenv we don't need + the first byts for NLSPATH=, but why complicate the code for this + peanuts. */ + new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + + old_val = getenv ("NLSPATH"); + if (old_val == NULL || old_val[0] == '\0') + { + old_val = NULL; + new_val_len += 1 + sizeof (LOCALEDIR) - 1 + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + } + else + new_val_len += strlen (old_val); + + new_val = (char *) malloc (new_val_len); + if (new_val == NULL) + return NULL; + +# if HAVE_SETENV + cp = new_val; +# else + cp = stpcpy (new_val, "NLSPATH="); +# endif + + cp = stpcpy (cp, dirname); + cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); + + if (old_val == NULL) + { +# if __STDC__ + stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); +# else + + cp = stpcpy (cp, LOCALEDIR); + stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); +# endif + } + else + stpcpy (cp, old_val); + +# if HAVE_SETENV + setenv ("NLSPATH", new_val, 1); + free (new_val); +# else + putenv (new_val); + /* Do *not* free the environment entry we just entered. It is used + from now on. */ +# endif + +#endif + + return (char *) domainname; +} + +#undef gettext +char * +gettext (msg) + const char *msg; +{ + int msgid; + + if (msg == NULL || catalog == (nl_catd) -1) + return (char *) msg; + + /* Get the message from the catalog. We always use set number 1. + The message ID is computed by the function `msg_to_cat_id' + which works on the table generated by `po-to-tbl'. */ + msgid = msg_to_cat_id (msg); + if (msgid == -1) + return (char *) msg; + + return catgets (catalog, 1, msgid, (char *) msg); +} + +/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries + for the one equal to msg. If it is found return the ID. In case when + the string is not found return -1. */ +static int +msg_to_cat_id (msg) + const char *msg; +{ + int cnt; + + for (cnt = 0; cnt < _msg_tbl_length; ++cnt) + if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) + return _msg_tbl[cnt]._msg_number; + + return -1; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/intl/dcgettext.c b/intl/dcgettext.c new file mode 100644 index 00000000..c4c7a2c7 --- /dev/null +++ b/intl/dcgettext.c @@ -0,0 +1,624 @@ +/* Implementation of the dcgettext(3) function. + Copyright (C) 1995, 1996, 1997, 1998 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif +#include "hash-string.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define getcwd __getcwd +# ifndef stpcpy +# define stpcpy __stpcpy +# endif +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) +# include +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +# include +#endif + +#if !defined(PATH_MAX) && defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +const char _nl_default_dirname[] = GNULOCALEDIR; + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, + const char *msgid)) internal_function; +static const char *category_to_name PARAMS ((int category)) internal_function; +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)) + internal_function; + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCGETTEXT __dcgettext +#else +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + int saved_errno = errno; + + /* If no real MSGID is given return NULL. */ + if (msgid == NULL) + return NULL; + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + defintion left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) _nl_default_dirname; + else if (binding->dirname[0] == '/') + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) + { + path_max += PATH_INCR; + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + __set_errno (0); + } + + if (ret == NULL) + { + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + xdomainname = (char *) alloca (strlen (categoryname) + + strlen (domainname) + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for th translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e. no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') + *cp++ = *categoryvalue++; + *cp = '\0'; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname); + + if (domain != NULL) + { + retval = find_msg (domain, msgid); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = find_msg (domain->successor[cnt], msgid); + + if (retval != NULL) + break; + } + } + + if (retval != NULL) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return retval; + } + } + } + /* NOTREACHED */ +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcgettext, dcgettext); +#endif + + +static char * +internal_function +find_msg (domain_file, msgid) + struct loaded_l10nfile *domain_file; + const char *msgid; +{ + size_t top, act, bottom; + struct loaded_domain *domain; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) == 0) + return (char *) domain->data + W (domain->must_swap, + domain->trans_tab[nstr - 1].offset); + + while (1) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = W (domain->must_swap, domain->hash_tab[idx]); + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) + == 0) + return (char *) domain->data + + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted + array of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + break; + } + + /* If an translation is found return this. */ + return bottom >= top ? NULL : (char *) domain->data + + W (domain->must_swap, + domain->trans_tab[act].offset); +} + + +/* Return string representation of locale CATEGORY. */ +static const char * +internal_function +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} + +/* Guess value of current locale from value of the environment variables. */ +static const char * +internal_function +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. This is a GNU extension. */ + retval = getenv ("LANGUAGE"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* `LANGUAGE' is not set. So we have to proceed with the POSIX + methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some + systems this can be done by the `setlocale' function itself. */ +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + return setlocale (category, NULL); +#else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* We use C as the default domain. POSIX says this is implementation + defined. */ + return "C"; +#endif +} + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif + + +#ifdef _LIBC +/* If we want to free all resources we have to do some work at + program's end. */ +static void __attribute__ ((unused)) +free_mem (void) +{ + struct binding *runp; + + for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) + { + free (runp->domainname); + if (runp->dirname != _nl_default_dirname) + /* Yes, this is a pointer comparison. */ + free (runp->dirname); + } + + if (_nl_current_default_domain != _nl_default_default_domain) + /* Yes, again a pointer comparison. */ + free ((char *) _nl_current_default_domain); +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/intl/dgettext.c b/intl/dgettext.c new file mode 100644 index 00000000..0510c2b0 --- /dev/null +++ b/intl/dgettext.c @@ -0,0 +1,59 @@ +/* Implementation of the dgettext(3) function + Copyright (C) 1995, 1996, 1997 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined HAVE_LOCALE_H || defined _LIBC +# include +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DGETTEXT __dgettext +# define DCGETTEXT __dcgettext +#else +# define DGETTEXT dgettext__ +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ +char * +DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return DCGETTEXT (domainname, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dgettext, dgettext); +#endif diff --git a/intl/explodename.c b/intl/explodename.c new file mode 100644 index 00000000..8066dc29 --- /dev/null +++ b/intl/explodename.c @@ -0,0 +1,188 @@ +/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +#endif +#include + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +int +_nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; +{ + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',') + ++cp; + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; +} diff --git a/intl/finddomain.c b/intl/finddomain.c new file mode 100644 index 00000000..81ea29bf --- /dev/null +++ b/intl/finddomain.c @@ -0,0 +1,216 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ +/* List of already loaded domains. */ +static struct loaded_l10nfile *_nl_loaded_domains; + + +/* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ +struct loaded_l10nfile * +internal_function +_nl_find_domain (dirname, locale, domainname) + const char *dirname; + char *locale; + const char *domainname; +{ + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first part all of them are allowed to be missing. If + the full specified locale is not found, the less specific one are + looked for. The various parts will be stripped off according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { +#if defined _LIBC || defined HAVE_STRDUP + locale = strdup (alias_value); + if (locale == NULL) + return NULL; +#else + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); +#endif + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + return retval; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + struct loaded_l10nfile *runp = _nl_loaded_domains; + + while (runp != NULL) + { + struct loaded_l10nfile *here = runp; + if (runp->data != NULL) + _nl_unload_domain ((struct loaded_domain *) runp->data); + runp = runp->next; + free (here); + } +} + +text_set_element (__libc_subfreeres, free_mem); +#endif diff --git a/intl/gettext.c b/intl/gettext.c new file mode 100644 index 00000000..d929f98d --- /dev/null +++ b/intl/gettext.c @@ -0,0 +1,70 @@ +/* Implementation of gettext(3) function. + Copyright (C) 1995, 1997 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef _LIBC +# define __need_NULL +# include +#else +# ifdef STDC_HEADERS +# include /* Just for NULL. */ +# else +# ifdef HAVE_STRING_H +# include +# else +# define NULL ((void *) 0) +# endif +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define GETTEXT __gettext +# define DGETTEXT __dgettext +#else +# define GETTEXT gettext__ +# define DGETTEXT dgettext__ +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +GETTEXT (msgid) + const char *msgid; +{ + return DGETTEXT (NULL, msgid); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff --git a/intl/gettext.h b/intl/gettext.h new file mode 100644 index 00000000..3cd23d7d --- /dev/null +++ b/intl/gettext.h @@ -0,0 +1,105 @@ +/* Internal header for GNU gettext internationalization functions. + Copyright (C) 1995, 1997 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 2, 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 Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include + +#if HAVE_LIMITS_H || _LIBC +# include +#endif + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + nls_uint32 trans_tab_offset; + /* Size of hashing table. */ + nls_uint32 hash_tab_size; + /* Offset of first hashing entry. */ + nls_uint32 hash_tab_offset; +}; + +struct string_desc +{ + /* Length of addressed string. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff --git a/intl/gettextP.h b/intl/gettextP.h new file mode 100644 index 00000000..00c52031 --- /dev/null +++ b/intl/gettextP.h @@ -0,0 +1,89 @@ +/* Header describing internals of gettext library + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include "loadinfo.h" + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef internal_function +# define internal_function +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +#ifdef _LIBC +# include +# define SWAP(i) bswap_32 (i) +#else +static nls_uint32 SWAP PARAMS ((nls_uint32 i)); + +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} +#endif + + +struct loaded_domain +{ + const char *data; + int use_mmap; + size_t mmap_size; + int must_swap; + nls_uint32 nstrings; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + nls_uint32 hash_size; + nls_uint32 *hash_tab; +}; + +struct binding +{ + struct binding *next; + char *domainname; + char *dirname; +}; + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname)) + internal_function; +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) + internal_function; +void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) + internal_function; + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/intl/hash-string.h b/intl/hash-string.h new file mode 100644 index 00000000..cacb38e4 --- /dev/null +++ b/intl/hash-string.h @@ -0,0 +1,59 @@ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 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 2, 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 Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static unsigned long hash_string PARAMS ((const char *__str_param)); + +static inline unsigned long +hash_string (str_param) + const char *str_param; +{ + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long) *str++; + g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} diff --git a/intl/intl-compat.c b/intl/intl-compat.c new file mode 100644 index 00000000..503efa0f --- /dev/null +++ b/intl/intl-compat.c @@ -0,0 +1,76 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995 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 2, 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, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libgettext.h" + +/* @@ end of prolog @@ */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef textdomain +#undef bindtextdomain + + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return bindtextdomain__ (domainname, dirname); +} + + +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return dcgettext__ (domainname, msgid, category); +} + + +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return dgettext__ (domainname, msgid); +} + + +char * +gettext (msgid) + const char *msgid; +{ + return gettext__ (msgid); +} + + +char * +textdomain (domainname) + const char *domainname; +{ + return textdomain__ (domainname); +} diff --git a/intl/intlh.inst.in b/intl/intlh.inst.in new file mode 100644 index 00000000..27cf6c74 --- /dev/null +++ b/intl/intlh.inst.in @@ -0,0 +1,111 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997 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 2, 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, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +@INCLUDE_LOCALE_H@ + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); + + +/* Optimized version of the functions above. */ +#if defined __OPTIMIZED +/* These must be a macro. Inlined functions are useless because the + `__builtin_constant_p' predicate in dcgettext would always return + false. */ + +# define gettext(msgid) dgettext ((char *) 0, msgid) + +# define dgettext(domainname, msgid) \ + dcgettext (domainname, msgid, LC_MESSAGES) + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(domainname, msgid, category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + (dcgettext) ((domainname), (msgid), (category)); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = (dcgettext) ((domainname), (msgid), (category)); \ + __result; \ + })) +# endif +#endif /* Optimizing. */ + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ diff --git a/intl/l10nflist.c b/intl/l10nflist.c new file mode 100644 index 00000000..9c7dc183 --- /dev/null +++ b/intl/l10nflist.c @@ -0,0 +1,411 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined _LIBC || defined HAVE_ARGZ_H +# include +#endif +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#include "loadinfo.h" + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# ifndef stpcpy +# define stpcpy(dest, src) __stpcpy(dest, src) +# endif +#else +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Define function which are usually not available. */ + +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +/* Returns the number of strings in ARGZ. */ +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + +static size_t +argz_count__ (argz, len) + const char *argz; + size_t len; +{ + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; +} +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + +static void +argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; +{ + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } +} +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; +} +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + +/* Return number of bits set in X. */ +static int pop PARAMS ((int x)); + +static inline int +pop (x) + int x; +{ + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; +} + + +struct loaded_l10nfile * +_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, do_allocate) + struct loaded_l10nfile **l10nfile_list; + const char *dirlist; + size_t dirlist_len; + int mask; + const char *language; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *modifier; + const char *special; + const char *sponsor; + const char *revision; + const char *filename; + int do_allocate; +{ + char *abs_filename; + struct loaded_l10nfile *last = NULL; + struct loaded_l10nfile *retval; + char *cp; + size_t entries; + int cnt; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) + 1 : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + retval = NULL; + last = NULL; + + /* Construct file name. */ + memcpy (abs_filename, dirlist, dirlist_len); + __argz_stringify (abs_filename, dirlist_len, ':'); + cp = abs_filename + (dirlist_len - 1); + *cp++ = '/'; + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaces but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + last = NULL; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + last = retval; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + retval = (struct loaded_l10nfile *) + malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) + * (1 << pop (mask)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + return NULL; + + retval->filename = abs_filename; + retval->decided = (__argz_count (dirlist, dirlist_len) != 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + if (last == NULL) + { + retval->next = *l10nfile_list; + *l10nfile_list = retval; + } + else + { + retval->next = last->next; + last->next = retval; + } + + entries = 0; + /* If the DIRLIST is a real list the RETVAL entry corresponds not to + a real file. So we have to use the DIRLIST separation mechanism + of the inner loop. */ + cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; + for (; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, + language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; +} + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. */ +const char * +_nl_normalize_codeset (codeset, name_len) + const unsigned char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum (codeset[cnt])) + { + ++len; + + if (isalpha (codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha (codeset[cnt])) + *wp++ = tolower (codeset[cnt]); + else if (isdigit (codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/intl/libgettext.h b/intl/libgettext.h new file mode 100644 index 00000000..3a92960a --- /dev/null +++ b/intl/libgettext.h @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997, 1998 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Because on some systems (e.g. Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H +#ifndef _LIBINTL_H +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include + +#if HAVE_LOCALE_H +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); +extern char *gettext__ PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); +extern char *dgettext__ PARAMS ((const char *__domainname, + const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); +extern char *textdomain__ PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/intl/libintl.glibc b/intl/libintl.glibc new file mode 100644 index 00000000..2c8e8a49 --- /dev/null +++ b/intl/libintl.glibc @@ -0,0 +1,120 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + This file is derived from the file libgettext.h in the GNU gettext package. + + This file is part of the GNU C Library. Its master source is NOT part of + the C library, however. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#include + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +__BEGIN_DECLS + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext __P ((__const char *__msgid)); +extern char *__gettext __P ((__const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext __P ((__const char *__domainname, + __const char *__msgid)); +extern char *__dgettext __P ((__const char *__domainname, + __const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext __P ((__const char *__domainname, + __const char *__msgid, int __category)); +extern char *__dcgettext __P ((__const char *__domainname, + __const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain __P ((__const char *__domainname)); +extern char *__textdomain __P ((__const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain __P ((__const char *__domainname, + __const char *__dirname)); +extern char *__bindtextdomain __P ((__const char *__domainname, + __const char *__dirname)); + + +/* Optimized version of the function above. */ +#if defined __OPTIMIZE__ + +/* We need NULL for `gettext'. */ +# define __need_NULL +# include + +/* We need LC_MESSAGES for `dgettext'. */ +# include + +/* These must be macros. Inlined functions are useless because the + `__builtin_constant_p' predicate in dcgettext would always return + false. */ + +# define gettext(msgid) dgettext (NULL, msgid) + +# define dgettext(domainname, msgid) \ + dcgettext (domainname, msgid, LC_MESSAGES) + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +/* Variable defined in loadmsgcat.c which gets incremented every time a + new catalog is loaded. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(domainname, msgid, category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + __dcgettext ((domainname), (msgid), (category)); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = __dcgettext ((domainname), (msgid), (category)); \ + __result; \ + })) +# endif +#endif /* Optimizing. */ + + +__END_DECLS + +#endif /* libintl.h */ diff --git a/intl/libintl.h b/intl/libintl.h new file mode 100644 index 00000000..3a92960a --- /dev/null +++ b/intl/libintl.h @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997, 1998 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Because on some systems (e.g. Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H +#ifndef _LIBINTL_H +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include + +#if HAVE_LOCALE_H +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ || defined __cplusplus +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); +extern char *gettext__ PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); +extern char *dgettext__ PARAMS ((const char *__domainname, + const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); +extern char *textdomain__ PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) ((char *) Domainname) +# define bindtextdomain(Domainname, Dirname) ((char *) Dirname) + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/intl/linux-msg.sed b/intl/linux-msg.sed new file mode 100644 index 00000000..5918e720 --- /dev/null +++ b/intl/linux-msg.sed @@ -0,0 +1,100 @@ +# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# Mitch's old catalog format does not allow comments. +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { + s/msgid[ ]*"// +# +# This does not work now with the new format. +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/# \1/ +# Clear substitution flag. + tb +# Append the next line. + :b + N +# Look whether second part is continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that D includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/intl/loadinfo.h b/intl/loadinfo.h new file mode 100644 index 00000000..f4ebf6d8 --- /dev/null +++ b/intl/loadinfo.h @@ -0,0 +1,76 @@ +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +/* Encoding of locale name parts. */ +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, + size_t name_len)); + +extern struct loaded_l10nfile * +_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, + const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate)); + + +extern const char *_nl_expand_alias PARAMS ((const char *name)); + +extern int _nl_explode_name PARAMS ((char *name, const char **language, + const char **modifier, + const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, + const char **sponsor, + const char **revision)); diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c new file mode 100644 index 00000000..515892df --- /dev/null +++ b/intl/loadmsgcat.c @@ -0,0 +1,222 @@ +/* Load needed message catalogs. + Copyright (C) 1995, 1996, 1997, 1998 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC +# include +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ +# define open __open +# define close __close +# define read __read +# define mmap __mmap +# define munmap __munmap +#endif + +/* We need a sign, whether a new catalog was loaded, which can be associated + with all translations. This is important if the translations are + cached by one of GCC's features. */ +int _nl_msg_cat_cntr = 0; + + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +internal_function +_nl_load_domain (domain_file) + struct loaded_l10nfile *domain_file; +{ + int fd; + size_t size; + struct stat st; + struct mo_file_header *data = (struct mo_file_header *) -1; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + int use_mmap = 0; +#endif + struct loaded_domain *domain; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY); + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if (fstat (fd, &st) != 0 + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + /* Something went wrong. */ + close (fd); + return; + } + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (data != (struct mo_file_header *) -1) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } +#endif + + /* If the data is not yet available (i.e. mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + size_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (size); + if (data == NULL) + return; + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb == -1) + { + close (fd); + return; + } + + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + return; + } + + domain_file->data + = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain_file->data == NULL) + return; + + domain = (struct loaded_domain *) domain_file->data; + domain->data = (char *) data; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + domain->use_mmap = use_mmap; +#endif + domain->mmap_size = size; + domain->must_swap = data->magic != _MAGIC; + + /* Fill in the information about the available tables. */ + switch (W (domain->must_swap, data->revision)) + { + case 0: + domain->nstrings = W (domain->must_swap, data->nstrings); + domain->orig_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)); + break; + default: + /* This is an illegal revision. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, size); + else +#endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Show that one domain is changed. This might make some cached + translations invalid. */ + ++_nl_msg_cat_cntr; +} + + +#ifdef _LIBC +void +internal_function +_nl_unload_domain (domain) + struct loaded_domain *domain; +{ + if (domain->use_mmap) + munmap ((caddr_t) domain->data, domain->mmap_size); + else + free ((void *) domain->data); + + free (domain); +} +#endif diff --git a/intl/localealias.c b/intl/localealias.c new file mode 100644 index 00000000..bca555a6 --- /dev/null +++ b/intl/localealias.c @@ -0,0 +1,424 @@ +/* Handle aliases for locale names. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#include "gettext.h" +#include "gettextP.h" + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define strcasecmp __strcasecmp + +# define mempcpy __mempcpy +# define HAVE_MEMPCPY 1 + +/* We need locking here since we can be called from different places. */ +# include + +__libc_lock_define_initialized (static, lock); +#endif + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +struct alias_map +{ + const char *alias; + const char *value; +}; + + +static char *string_space = NULL; +static size_t string_space_act = 0; +static size_t string_space_max = 0; +static struct alias_map *map; +static size_t nmap = 0; +static size_t maxmap = 0; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) + internal_function; +static void extend_alias_table PARAMS ((void)); +static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + +const char * +_nl_expand_alias (name) + const char *name; +{ + static const char *locale_alias_path = LOCALE_ALIAS_PATH; + struct alias_map *retval; + const char *result = NULL; + size_t added; + +#ifdef _LIBC + __libc_lock_lock (lock); +#endif + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + { + result = retval->value; + break; + } + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == ':') + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + +#ifdef _LIBC + __libc_lock_unlock (lock); +#endif + + return result; +} + + +static size_t +internal_function +read_alias_file (fname, fname_len) + const char *fname; + int fname_len; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + ADD_BLOCK (block_list, full_fname); +#ifdef HAVE_MEMPCPY + mempcpy (mempcpy (full_fname, fname, fname_len), + aliasfile, sizeof aliasfile); +#else + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); +#endif + + fp = fopen (full_fname, "r"); + if (fp == NULL) + { + FREE_BLOCKS (block_list); + return 0; + } + + added = 0; + while (!feof (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + */ + unsigned char buf[BUFSIZ]; + unsigned char *alias; + unsigned char *value; + unsigned char *cp; + + if (fgets (buf, sizeof buf, fp) == NULL) + /* EOF reached. */ + break; + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + if (strchr (buf, '\n') == NULL) + { + char altbuf[BUFSIZ]; + do + if (fgets (altbuf, sizeof altbuf, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + break; + while (strchr (altbuf, '\n') == NULL); + } + + cp = buf; + /* Ignore leading white space. */ + while (isspace (cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace (cp[0])) + ++cp; + + if (cp[0] != '\0') + { + size_t alias_len; + size_t value_len; + + value = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + extend_alias_table (); + + alias_len = strlen (alias) + 1; + value_len = strlen (value) + 1; + + if (string_space_act + alias_len + value_len > string_space_max) + { + /* Increase size of memory pool. */ + size_t new_size = (string_space_max + + (alias_len + value_len > 1024 + ? alias_len + value_len : 1024)); + char *new_pool = (char *) realloc (string_space, new_size); + if (new_pool == NULL) + { + FREE_BLOCKS (block_list); + return added; + } + string_space = new_pool; + string_space_max = new_size; + } + + map[nmap].alias = memcpy (&string_space[string_space_act], + alias, alias_len); + string_space_act += alias_len; + + map[nmap].value = memcpy (&string_space[string_space_act], + value, value_len); + string_space_act += value_len; + + ++nmap; + ++added; + } + } + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + FREE_BLOCKS (block_list); + return added; +} + + +static void +extend_alias_table () +{ + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) realloc (map, (new_size + * sizeof (struct alias_map))); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return; + + map = new_map; + maxmap = new_size; +} + + +#ifdef _LIBC +static void __attribute__ ((unused)) +free_mem (void) +{ + if (string_space != NULL) + free (string_space); + if (map != NULL) + free (map); +} +text_set_element (__libc_subfreeres, free_mem); +#endif + + +static int +alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; +{ +#if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); +#else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; +#endif +} diff --git a/intl/po2tbl.sed.in b/intl/po2tbl.sed.in new file mode 100644 index 00000000..b3bcca4d --- /dev/null +++ b/intl/po2tbl.sed.in @@ -0,0 +1,102 @@ +# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +1 { + i\ +/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ +\ +#if HAVE_CONFIG_H\ +# include \ +#endif\ +\ +#include "libgettext.h"\ +\ +const struct _msg_ent _msg_tbl[] = { + h + s/.*/0/ + x +} +# +# Write msgid entries in C array form. +# +/^msgid/ { + s/msgid[ ]*\(".*"\)/ {\1/ + tb +# Append the next line + :b + N +# Look whether second part is continuation line. + s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ +# Yes, then branch. + ta +# Because we assume that the input file correctly formed the line +# just read cannot be again be a msgid line. So it's safe to ignore +# it. + s/\(.*\)\n.*/\1/ + bc +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ +# Some buggy seds do not clear the `successful substitution since last ``t''' +# flag on `N', so we do a `t' here to clear it. + tb +# Not reached + :c + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)\n\([0-9]*\)/\1, \2},/ + s/\(.*\)"$/\1/ + p +} +# +# Last line. +# +$ { + i\ +};\ + + g + s/0*\(.*\)/int _msg_tbl_length = \1;/p +} +d diff --git a/intl/textdomain.c b/intl/textdomain.c new file mode 100644 index 00000000..88557460 --- /dev/null +++ b/intl/textdomain.c @@ -0,0 +1,108 @@ +/* Implementation of the textdomain(3) function. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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 2, 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include "libgettext.h" +#endif + +/* @@ end of prolog @@ */ + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[]; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define TEXTDOMAIN __textdomain +# ifndef strdup +# define strdup(str) __strdup (str) +# endif +#else +# define TEXTDOMAIN textdomain__ +#endif + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +char * +TEXTDOMAIN (domainname) + const char *domainname; +{ + char *old; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + old = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + _nl_current_default_domain = _nl_default_default_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + _nl_current_default_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + char *cp = (char *) malloc (len); + if (cp != NULL) + memcpy (cp, domainname, len); + _nl_current_default_domain = cp; +#endif + } + + if (old != _nl_default_default_domain) + free (old); + + return (char *) _nl_current_default_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff --git a/intl/xopen-msg.sed b/intl/xopen-msg.sed new file mode 100644 index 00000000..b19c0bbd --- /dev/null +++ b/intl/xopen-msg.sed @@ -0,0 +1,104 @@ +# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# We copy all comments into the .msg file. Perhaps they can help. +# +/^#/ s/^#[ ]*/$ /p +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { +# Does not work now +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ + p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/\1/ + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x +# Bring the line in the format ` ' + G + s/^[^\n]*$/& / + s/\(.*\)\n\([0-9]*\)/\2 \1/ +# Clear flag from last substitution. + tb +# Append the next line. + :b + N +# Look whether second part is a continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that `D' includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use the sed command `D' here + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/keymap.c b/keymap.c index b1b9f18b..7fd1223d 100644 --- a/keymap.c +++ b/keymap.c @@ -309,7 +309,7 @@ int km_dokey (int menu) if (n++ == 10) { mutt_flushinp (); - mutt_error ("Macro loop detected."); + mutt_error _("Macro loop detected."); return (-1); } @@ -504,9 +504,9 @@ void km_error_key (int menu) char buf[SHORT_STRING]; if (km_expand_key (buf, sizeof (buf), km_find_func (menu, OP_HELP))) - mutt_error ("Key is not bound. Press '%s' for help.", buf); + mutt_error (_("Key is not bound. Press '%s' for help."), buf); else - mutt_error ("Key is not bound. See the manual."); + mutt_error _("Key is not bound. See the manual."); } int mutt_parse_push (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) @@ -516,7 +516,7 @@ int mutt_parse_push (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) mutt_extract_token (buf, s, M_TOKEN_CONDENSE); if (MoreArgs (s)) { - strfcpy (err->data, "push: too many arguments", err->dsize); + strfcpy (err->data, _("push: too many arguments"), err->dsize); r = -1; } else @@ -537,7 +537,7 @@ char *parse_keymap (int *menu, BUFFER *s, BUFFER *err) { if ((*menu = mutt_check_menu (buf.data)) == -1) { - snprintf (err->data, err->dsize, "%s: no such menu", buf.data); + snprintf (err->data, err->dsize, _("%s: no such menu"), buf.data); } else { @@ -546,7 +546,7 @@ char *parse_keymap (int *menu, BUFFER *s, BUFFER *err) if (!*buf.data) { - strfcpy (err->data, "null key sequence", err->dsize); + strfcpy (err->data, _("null key sequence"), err->dsize); } else if (MoreArgs (s)) return (buf.data); @@ -554,7 +554,7 @@ char *parse_keymap (int *menu, BUFFER *s, BUFFER *err) } else { - strfcpy (err->data, "too few arguments", err->dsize); + strfcpy (err->data, _("too few arguments"), err->dsize); } FREE (&buf.data); return (NULL); @@ -624,7 +624,7 @@ int mutt_parse_bind (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) mutt_extract_token (buf, s, 0); if (MoreArgs (s)) { - strfcpy (err->data, "bind: too many arguments", err->dsize); + strfcpy (err->data, _("bind: too many arguments"), err->dsize); r = -1; } else if (strcasecmp ("noop", buf->data) == 0) @@ -639,7 +639,7 @@ int mutt_parse_bind (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) bindings = km_get_table (menu); if (bindings && try_bind (key, menu, buf->data, bindings) != 0) { - snprintf (err->data, err->dsize, "%s: no such function in map", buf->data); + snprintf (err->data, err->dsize, _("%s: no such function in map"), buf->data); r = -1; } } @@ -662,7 +662,7 @@ int mutt_parse_macro (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) /* make sure the macro sequence is not an empty string */ if (!*buf->data) { - strfcpy (err->data, "macro: empty key sequence", err->dsize); + strfcpy (err->data, _("macro: empty key sequence"), err->dsize); } else { @@ -673,7 +673,7 @@ int mutt_parse_macro (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) if (MoreArgs (s)) { - strfcpy (err->data, "macro: too many arguments", err->dsize); + strfcpy (err->data, _("macro: too many arguments"), err->dsize); } else { diff --git a/lib.c b/lib.c index 726acc75..caa01fb7 100644 --- a/lib.c +++ b/lib.c @@ -272,7 +272,7 @@ void *safe_calloc (size_t nmemb, size_t size) return NULL; if (!(p = calloc (nmemb, size))) { - mutt_error ("Out of memory"); + mutt_error _("Out of memory!"); sleep (1); mutt_exit (1); } @@ -287,7 +287,7 @@ void *safe_malloc (unsigned int siz) return 0; if ((p = (void *) malloc (siz)) == 0) { - mutt_error ("Out of memory!"); + mutt_error _("Out of memory!"); sleep (1); mutt_exit (1); } @@ -318,7 +318,7 @@ void safe_realloc (void **p, size_t siz) if (!r) { - mutt_error ("Out of memory!"); + mutt_error _("Out of memory!"); sleep (1); mutt_exit (1); } @@ -750,12 +750,12 @@ int mutt_check_overwrite (const char *attname, const char *path, return -1; if (S_ISDIR (st.st_mode)) { - if (mutt_yesorno ("File is a directory, save under it?", 1) != M_YES) + if (mutt_yesorno (_("File is a directory, save under it?"), 1) != M_YES) return (-1); if (!attname || !attname[0]) { tmp[0] = 0; - if (mutt_get_field ("File under directory: ", tmp, sizeof (tmp), + if (mutt_get_field (_("File under directory: "), tmp, sizeof (tmp), M_FILE | M_CLEAR) != 0 || !tmp[0]) return (-1); snprintf (fname, flen, "%s/%s", path, tmp); @@ -766,7 +766,7 @@ int mutt_check_overwrite (const char *attname, const char *path, if (flags != M_SAVE_APPEND && access (fname, F_OK) == 0 && - mutt_yesorno ("File exists, overwrite?", 0) != 1) + mutt_yesorno (_("File exists, overwrite?"), 0) != 1) return (-1); return 0; @@ -1139,13 +1139,13 @@ int mutt_save_confirm (const char *s, struct stat *st) { if (magic == -1) { - mutt_error ("%s is not a mailbox!", s); + mutt_error (_("%s is not a mailbox!"), s); return 0; } if (option (OPTCONFIRMAPPEND)) { - snprintf (tmp, sizeof (tmp), "Append messages to %s?", s); + snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s); if (mutt_yesorno (tmp, 1) < 1) ret = 0; } @@ -1161,7 +1161,7 @@ int mutt_save_confirm (const char *s, struct stat *st) { if (option (OPTCONFIRMCREATE)) { - snprintf (tmp, sizeof (tmp), "Create %s?", s); + snprintf (tmp, sizeof (tmp), _("Create %s?"), s); if (mutt_yesorno (tmp, 1) < 1) ret = 0; } diff --git a/main.c b/main.c index 63b61af1..e2b71eeb 100644 --- a/main.c +++ b/main.c @@ -86,8 +86,8 @@ void mutt_exit (int code) static void mutt_usage (void) { - printf ("Mutt %s (%s)\n", VERSION, ReleaseDate); - puts ( + printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate); + puts _( "usage: mutt [ -nRzZ ] [ -e ] [ -F ] [ -m ] [ -f ]\n\ mutt [ -nx ] [ -e ] [ -a ] [ -F ] [ -H ] [ -i ] [ -s ] [ -b ] [ -c ] [ ... ]\n\ mutt [ -n ] [ -e ] [ -F ] -p\n\ @@ -121,7 +121,7 @@ static void show_version (void) { struct utsname uts; - printf ("Mutt %s (%s)\n", VERSION, ReleaseDate); + printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate); puts (Notice); uname (&uts); @@ -221,7 +221,7 @@ static void show_version (void) "+HAVE_PGP2 " #endif #ifdef HAVE_GPG - "+HAVE_GPG " + "+HAVE_GPG " #endif #endif @@ -239,7 +239,13 @@ static void show_version (void) #else "-" #endif - "EXACT_ADDRESS" + "EXACT_ADDRESS " +#ifdef ENABLE_NLS + "+" +#else + "-" +#endif + "ENABLE_NLS" ); printf ("SENDMAIL=\"%s\"\n", SENDMAIL); @@ -287,7 +293,7 @@ static void start_curses (void) #endif if (initscr () == NULL) { - puts ("Error initializing terminal."); + puts _("Error initializing terminal."); exit (1); } #ifdef USE_SLANG_CURSES @@ -338,6 +344,12 @@ int main (int argc, char **argv) exit(1); } +#ifdef ENABLE_NLS + /* FIXME what about init.c:1439 ? */ + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, MUTTLOCALEDIR); + textdomain (PACKAGE); +#endif mutt_error = mutt_nocurses_error; SRAND (time (NULL)); @@ -377,9 +389,9 @@ int main (int argc, char **argv) case 'd': #ifdef DEBUG debuglevel = atoi (optarg); - printf ("Debugging at level %d.\n", debuglevel); + printf (_("Debugging at level %d.\n"), debuglevel); #else - printf ("DEBUG was not defined during compilation. Ignored.\n"); + printf _("DEBUG was not defined during compilation. Ignored.\n"); #endif break; @@ -448,7 +460,7 @@ int main (int argc, char **argv) show_version (); break; default: - printf ("Mutt %s (%s)\n", VERSION, ReleaseDate); + printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate); puts (Copyright); puts (ReachingUs); exit (0); @@ -514,7 +526,7 @@ int main (int argc, char **argv) { if (!option (OPTNOCURSES)) mutt_endwin (NULL); - fputs ("No recipients specified.\n", stderr); + fputs (_("No recipients specified.\n"), stderr); exit (1); } @@ -587,7 +599,7 @@ int main (int argc, char **argv) { if (!option (OPTNOCURSES)) mutt_endwin (NULL); - fprintf (stderr, "%s: unable to attach file.\n", t->data); + fprintf (stderr, _("%s: unable to attach file.\n"), t->data); mutt_free_list (&attach); exit (1); } @@ -607,7 +619,7 @@ int main (int argc, char **argv) { if (!mutt_buffy_check (0)) { - mutt_endwin ("No mailbox with new mail."); + mutt_endwin _("No mailbox with new mail."); exit (1); } folder[0] = 0; @@ -641,7 +653,7 @@ int main (int argc, char **argv) if (st.st_size == 0) { - mutt_endwin ("Mailbox is empty."); + mutt_endwin _("Mailbox is empty."); exit (1); } } diff --git a/mbox.c b/mbox.c index 5bab6973..df77c1df 100644 --- a/mbox.c +++ b/mbox.c @@ -183,7 +183,7 @@ int mmdf_parse_mailbox (CONTEXT *ctx) else { dprint (1, (debugfile, "mmdf_parse_mailbox: corrupt mailbox!\n")); - mutt_error ("Mailbox is corrupt!"); + mutt_error _("Mailbox is corrupt!"); return (-1); } } @@ -258,7 +258,7 @@ int mbox_parse_mailbox (CONTEXT *ctx) count++; if (!ctx->quiet && ReadInc && ((count % ReadInc == 0) || count == 1)) - mutt_message ("Reading %s... %d (%d%%)", ctx->path, count, + mutt_message (_("Reading %s... %d (%d%%)"), ctx->path, count, ftell (ctx->fp) / (ctx->size / 100 + 1)); if (ctx->msgcount == ctx->hdrmax) @@ -623,7 +623,7 @@ int mbox_check_mailbox (CONTEXT *ctx, int *index_hint) mbox_unlock_mailbox (ctx); mx_fastclose_mailbox (ctx); mutt_unblock_signals (); - mutt_error ("Mailbox was corrupted!"); + mutt_error _("Mailbox was corrupted!"); return (-1); } @@ -660,7 +660,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) if ((ctx->fp = freopen (ctx->path, "r+", ctx->fp)) == NULL) { mx_fastclose_mailbox (ctx); - mutt_error ("Fatal error! Could not reopen mailbox."); + mutt_error _("Fatal error! Could not reopen mailbox!"); return (-1); } @@ -669,7 +669,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) if (mbox_lock_mailbox (ctx, 1, 1) == -1) { mutt_unblock_signals (); - mutt_error ("Unable to lock mailbox!"); + mutt_error _("Unable to lock mailbox!"); goto bail; } @@ -692,7 +692,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) if ((i = open (tempfile, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1 || (fp = fdopen (i, "w")) == NULL) { - mutt_error ("Could not create temporary file!"); + mutt_error _("Could not create temporary file!"); goto bail; } @@ -708,7 +708,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) * messages were found to be changed or deleted. This should * never happen, is we presume it is a bug in mutt. */ - mutt_error ("sync: mbox modified, but no modified messages! (report this bug)"); + mutt_error _("sync: mbox modified, but no modified messages! (report this bug)"); sleep(5); /* the mutt_error /will/ get cleared! */ dprint(1, (debugfile, "mbox_sync_mailbox(): no modified messages.\n")); goto bail; @@ -732,7 +732,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) { j++; if (!ctx->quiet && WriteInc && ((i % WriteInc) == 0 || j == 1)) - mutt_message ("Writing messages... %d (%d%%)", i, + mutt_message (_("Writing messages... %d (%d%%)"), i, ftell (ctx->fp) / (ctx->size / 100 + 1)); if (ctx->magic == M_MMDF) @@ -834,7 +834,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) mutt_unblock_signals (); mx_fastclose_mailbox (ctx); mutt_pretty_mailbox (savefile); - mutt_error ("Write failed! Saved partial mailbox to %s", savefile); + mutt_error (_("Write failed! Saved partial mailbox to %s"), savefile); return (-1); } @@ -849,7 +849,7 @@ int mbox_sync_mailbox (CONTEXT *ctx) unlink (tempfile); mutt_unblock_signals (); mx_fastclose_mailbox (ctx); - mutt_error ("Fatal error! Could not reopen mailbox!"); + mutt_error _("Fatal error! Could not reopen mailbox!"); Sort = save_sort; return (-1); } @@ -882,7 +882,7 @@ bail: /* Come here in case of disaster */ if ((ctx->fp = freopen (ctx->path, "r", ctx->fp)) == NULL) { - mutt_error ("Could not reopen mailbox!"); + mutt_error _("Could not reopen mailbox!"); mx_fastclose_mailbox (ctx); return (-1); } @@ -922,7 +922,7 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint) /* silent operations */ ctx->quiet = 1; - mutt_message ("Reopening mailbox..."); + mutt_message _("Reopening mailbox..."); /* our heuristics require the old mailbox to be unsorted */ if (Sort != SORT_ORDER) diff --git a/menu.c b/menu.c index 734a0312..8a16b704 100644 --- a/menu.c +++ b/menu.c @@ -294,7 +294,7 @@ void menu_jump (MUTTMENU *menu) { mutt_ungetch (LastKey); buf[0] = 0; - if (mutt_get_field ("Jump to: ", buf, sizeof (buf), 0) == 0 && buf[0]) + if (mutt_get_field (_("Jump to: "), buf, sizeof (buf), 0) == 0 && buf[0]) { n = atoi (buf) - 1; if (n >= 0 && n < menu->max) @@ -303,11 +303,11 @@ void menu_jump (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("Invalid index number."); + mutt_error _("Invalid index number."); } } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_next_line (MUTTMENU *menu) @@ -322,10 +322,10 @@ void menu_next_line (MUTTMENU *menu) menu->redraw = REDRAW_INDEX; } else - mutt_error ("You cannot scroll down farther."); + mutt_error _("You cannot scroll down farther."); } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_prev_line (MUTTMENU *menu) @@ -338,7 +338,7 @@ void menu_prev_line (MUTTMENU *menu) menu->redraw = REDRAW_INDEX; } else - mutt_error ("You cannot scroll up farther."); + mutt_error _("You cannot scroll up farther."); } void menu_next_page (MUTTMENU *menu) @@ -358,10 +358,10 @@ void menu_next_page (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("You are on the last page."); + mutt_error _("You are on the last page."); } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_prev_page (MUTTMENU *menu) @@ -380,7 +380,7 @@ void menu_prev_page (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("You are on the first page."); + mutt_error _("You are on the first page."); } void menu_top_page (MUTTMENU *menu) @@ -402,7 +402,7 @@ void menu_bottom_page (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_middle_page (MUTTMENU *menu) @@ -418,7 +418,7 @@ void menu_middle_page (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_first_entry (MUTTMENU *menu) @@ -429,7 +429,7 @@ void menu_first_entry (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_last_entry (MUTTMENU *menu) @@ -440,7 +440,7 @@ void menu_last_entry (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_half_up (MUTTMENU *menu) @@ -459,7 +459,7 @@ void menu_half_up (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("First entry is shown."); + mutt_error _("First entry is shown."); } void menu_half_down (MUTTMENU *menu) @@ -479,10 +479,10 @@ void menu_half_down (MUTTMENU *menu) menu->redraw = REDRAW_INDEX; } else - mutt_error ("Last entry is shown."); + mutt_error _("Last entry is shown."); } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_current_top (MUTTMENU *menu) @@ -493,7 +493,7 @@ void menu_current_top (MUTTMENU *menu) menu->redraw = REDRAW_INDEX; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_current_middle (MUTTMENU *menu) @@ -506,7 +506,7 @@ void menu_current_middle (MUTTMENU *menu) menu->redraw = REDRAW_INDEX; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_current_bottom (MUTTMENU *menu) @@ -519,7 +519,7 @@ void menu_current_bottom (MUTTMENU *menu) menu->redraw = REDRAW_INDEX; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } void menu_next_entry (MUTTMENU *menu) @@ -530,7 +530,7 @@ void menu_next_entry (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("You are on the last entry."); + mutt_error _("You are on the last entry."); } void menu_prev_entry (MUTTMENU *menu) @@ -541,7 +541,7 @@ void menu_prev_entry (MUTTMENU *menu) menu->redraw = REDRAW_MOTION; } else - mutt_error ("You are on the first entry."); + mutt_error _("You are on the first entry."); } static int default_color (int i) @@ -581,8 +581,8 @@ static int menu_search (MUTTMENU *menu, int op) if (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE) { strfcpy (buf, menu->searchBuf ? menu->searchBuf : "", sizeof (buf)); - if (mutt_get_field ((op == OP_SEARCH) ? "Search for: " : - "Reverse search for: ", + if (mutt_get_field ((op == OP_SEARCH) ? _("Search for: ") : + _("Reverse search for: "), buf, sizeof (buf), M_CLEAR) != 0 || !buf[0]) return (-1); safe_free ((void **) &menu->searchBuf); @@ -593,7 +593,7 @@ static int menu_search (MUTTMENU *menu, int op) { if (!menu->searchBuf) { - mutt_error ("No search pattern."); + mutt_error _("No search pattern."); return (-1); } } @@ -623,7 +623,7 @@ static int menu_search (MUTTMENU *menu, int op) } regfree (&re); - mutt_error ("Not found."); + mutt_error _("Not found."); return (-1); } @@ -761,7 +761,7 @@ int mutt_menuLoop (MUTTMENU *menu) menu->current = menu->oldcurrent; } else - mutt_error ("Search is not implemented for this menu."); + mutt_error _("Search is not implemented for this menu."); break; case OP_JUMP: @@ -796,10 +796,10 @@ int mutt_menuLoop (MUTTMENU *menu) menu->redraw = REDRAW_CURRENT; } else - mutt_error ("No entries."); + mutt_error _("No entries."); } else - mutt_error ("Tagging is not supported."); + mutt_error _("Tagging is not supported."); break; case OP_SHELL_ESCAPE: diff --git a/mh.c b/mh.c index 4e1f707f..73b382b7 100644 --- a/mh.c +++ b/mh.c @@ -178,7 +178,7 @@ static int maildir_parse_entry(CONTEXT *ctx, struct maildir ***last, { (*count)++; if (!ctx->quiet && ReadInc && ((*count % ReadInc) == 0 || *count == 1)) - mutt_message ("Reading %s... %d", ctx->path, *count); + mutt_message (_("Reading %s... %d"), ctx->path, *count); } if (subdir) diff --git a/missing b/missing new file mode 100755 index 00000000..cbe2b0ef --- /dev/null +++ b/missing @@ -0,0 +1,188 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Franc,ois Pinard , 1996. + +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing - GNU libit 0.0" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acinclude.m4' or \`configure.in'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`configure.in'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`acconfig.h' or \`configure.in'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` + if test -z "$files"; then + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` + test -z "$files" || files="$files.in" + else + files=`echo "$files" | sed -e 's/:/ /g'` + fi + test -z "$files" && files="config.h.in" + touch $files + ;; + + automake) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print \ + | sed 's/^\(.*\).am$/touch \1.in/' \ + | sh + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/mutt.h b/mutt.h index a8cf27dc..505cf379 100644 --- a/mutt.h +++ b/mutt.h @@ -32,6 +32,25 @@ #include "rfc822.h" #include "hash.h" +#ifdef ENABLE_NLS +# include +# define _(a) gettext (a) +# ifdef gettext_noop +# define N_(a) gettext_noop (a) +# else +# define N_(a) (a) +# endif +#else +# define _(a) (a) +# define N_(a) (a) +#endif + +#ifdef SUBVERSION +# define MUTT_VERSION (VERSION SUBVERSION) +#else +# define MUTT_VERSION (VERSION) +#endif + /* nifty trick I stole from ELM 2.5alpha. */ #ifdef MAIN_C #define WHERE diff --git a/mx.c b/mx.c index d2c7f104..0d15cb2e 100644 --- a/mx.c +++ b/mx.c @@ -110,7 +110,7 @@ retry_lock: { char msg[LONG_STRING]; - snprintf(msg, sizeof(msg), "Lock count exceeded, remove lock for %s?", + snprintf(msg, sizeof(msg), _("Lock count exceeded, remove lock for %s?"), path); if(retry && mutt_yesorno(msg, 1) == 1) { @@ -174,13 +174,13 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int timeout) if (prev_sb.st_size == sb.st_size && ++count >= (timeout?MAXLOCKATTEMPT:0)) { if (timeout) - mutt_error ("Timeout exceeded while attempting fcntl lock!"); + mutt_error _("Timeout exceeded while attempting fcntl lock!"); return (-1); } prev_sb = sb; - mutt_message ("Waiting for fcntl lock... %d", ++attempt); + mutt_message (_("Waiting for fcntl lock... %d"), ++attempt); sleep (1); } #endif /* USE_FCNTL */ @@ -208,14 +208,14 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int timeout) if (prev_sb.st_size == sb.st_size && ++count >= (timeout?MAXLOCKATTEMPT:0)) { if (timeout) - mutt_error ("Timeout exceeded while attempting flock lock!"); + mutt_error _("Timeout exceeded while attempting flock lock!"); r = -1; break; } prev_sb = sb; - mutt_message ("Waiting for flock attempt... %d", ++attempt); + mutt_message (_("Waiting for flock attempt... %d"), ++attempt); sleep (1); } #endif /* USE_FLOCK */ @@ -417,7 +417,7 @@ static int mx_open_mailbox_append (CONTEXT *ctx) switch (ctx->magic) { case 0: - mutt_error ("%s is not a mailbox.", ctx->path); + mutt_error (_("%s is not a mailbox."), ctx->path); /* fall through */ case -1: return (-1); @@ -558,7 +558,7 @@ CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) ctx->magic = mx_get_magic (path); if(ctx->magic == 0) - mutt_error ("%s is not a mailbox.", path); + mutt_error (_("%s is not a mailbox."), path); if(ctx->magic == -1) mutt_perror(path); @@ -583,7 +583,7 @@ CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) ctx->subj_hash = hash_create (257); if (!ctx->quiet) - mutt_message ("Reading %s...", ctx->path); + mutt_message (_("Reading %s..."), ctx->path); switch (ctx->magic) { @@ -670,7 +670,7 @@ static int sync_mailbox (CONTEXT *ctx) int rc = -1; if (!ctx->quiet) - mutt_message ("Writing %s...", ctx->path); + mutt_message (_("Writing %s..."), ctx->path); switch (ctx->magic) { case M_MBOX: @@ -750,7 +750,7 @@ int mx_close_mailbox (CONTEXT *ctx) if (isSpool) { - snprintf (buf, sizeof (buf), "Move read messages to %s?", mbox); + snprintf (buf, sizeof (buf), _("Move read messages to %s?"), mbox); if ((move_messages = query_quadoption (OPT_MOVE, buf)) == -1) return (-1); } @@ -758,8 +758,9 @@ int mx_close_mailbox (CONTEXT *ctx) if (ctx->deleted) { - snprintf (buf, sizeof (buf), "Purge %d deleted message%s?", - ctx->deleted, ctx->deleted == 1 ? "" : "s"); + snprintf (buf, sizeof (buf), ctx->deleted == 1 + ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"), + ctx->deleted); if ((purge = query_quadoption (OPT_DELETE, buf)) < 0) return (-1); } @@ -778,7 +779,7 @@ int mx_close_mailbox (CONTEXT *ctx) if (mx_open_mailbox (mbox, M_APPEND, &f) == NULL) return (-1); - mutt_message ("Moving read messages to %s...", mbox); + mutt_message (_("Moving read messages to %s..."), mbox); for (i = 0; i < ctx->msgcount; i++) { @@ -794,7 +795,7 @@ int mx_close_mailbox (CONTEXT *ctx) } else if (!ctx->changed && ctx->deleted == 0) { - mutt_message ("Mailbox is unchanged."); + mutt_message _("Mailbox is unchanged."); mx_fastclose_mailbox (ctx); return 0; } @@ -813,10 +814,10 @@ int mx_close_mailbox (CONTEXT *ctx) } if (move_messages) - mutt_message ("%d kept, %d moved, %d deleted.", + mutt_message (_("%d kept, %d moved, %d deleted."), ctx->msgcount - ctx->deleted, read_msgs, ctx->deleted); else - mutt_message ("%d kept, %d deleted.", + mutt_message (_("%d kept, %d deleted."), ctx->msgcount - ctx->deleted, ctx->deleted); if (ctx->msgcount == ctx->deleted && @@ -911,22 +912,22 @@ int mx_sync_mailbox (CONTEXT *ctx) char buf[STRING], tmp[STRING]; if (km_expand_key (buf, sizeof(buf), km_find_func (MENU_MAIN, OP_TOGGLE_WRITE))) - snprintf (tmp, sizeof(tmp), " Press '%s' to toggle write", buf); + snprintf (tmp, sizeof(tmp), _(" Press '%s' to toggle write"), buf); else - strfcpy (tmp, "Use 'toggle-write' to re-enable write!", sizeof(tmp)); + strfcpy (tmp, _("Use 'toggle-write' to re-enable write!"), sizeof(tmp)); - mutt_error ("Mailbox is marked unwritable. %s", tmp); + mutt_error (_("Mailbox is marked unwritable. %s"), tmp); return -1; } else if (ctx->readonly) { - mutt_error ("Mailbox is read-only."); + mutt_error _("Mailbox is read-only."); return -1; } if (!ctx->changed && !ctx->deleted) { - mutt_message ("Mailbox is unchanged."); + mutt_message _("Mailbox is unchanged."); return (0); } @@ -934,8 +935,9 @@ int mx_sync_mailbox (CONTEXT *ctx) { char buf[SHORT_STRING]; - snprintf (buf, sizeof (buf), "Purge %d deleted message%s?", - ctx->deleted, ctx->deleted == 1 ? "" : "s"); + snprintf (buf, sizeof (buf), ctx->deleted == 1 + ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"), + ctx->deleted); if ((rc = query_quadoption (OPT_DELETE, buf)) < 0) return (-1); else if (rc == M_NO) @@ -950,7 +952,7 @@ int mx_sync_mailbox (CONTEXT *ctx) if ((rc = sync_mailbox (ctx)) == 0) { - mutt_message ("%d kept, %d deleted.", ctx->msgcount - ctx->deleted, + mutt_message (_("%d kept, %d deleted."), ctx->msgcount - ctx->deleted, ctx->deleted); sleep (1); /* allow the user time to read the message */ diff --git a/pager.c b/pager.c index 0cdf4068..b8b7780e 100644 --- a/pager.c +++ b/pager.c @@ -69,7 +69,7 @@ #define CHECK_READONLY if (Context->readonly) \ { \ mutt_flushinp (); \ - mutt_error ("Mailbox is read-only."); \ + mutt_error _("Mailbox is read-only."); \ break; \ } @@ -1448,7 +1448,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) } if (!InHelp) { - mutt_make_help (buffer, sizeof (buffer), "Help", MENU_PAGER, OP_HELP); + mutt_make_help (buffer, sizeof (buffer), _("Help"), MENU_PAGER, OP_HELP); strcat (helpstr, buffer); } @@ -1674,7 +1674,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) else if (option (OPTPAGERSTOP)) { /* emulate "less -q" and don't go on to the next message. */ - mutt_error ("Bottom of message is shown."); + mutt_error _("Bottom of message is shown."); } else { @@ -1690,7 +1690,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) topline = upNLines (bodylen-PagerContext, lineInfo, topline, hideQuoted); } else - mutt_error ("Top of message is shown."); + mutt_error _("Top of message is shown."); break; case OP_NEXT_LINE: @@ -1705,14 +1705,14 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) } } else - mutt_error ("Bottom of message is shown."); + mutt_error _("Bottom of message is shown."); break; case OP_PREV_LINE: if (topline) topline = upNLines (1, lineInfo, topline, hideQuoted); else - mutt_error ("Top of message is shown."); + mutt_error _("Top of message is shown."); break; case OP_PAGER_TOP: @@ -1723,7 +1723,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) if (topline) topline = upNLines (bodylen/2, lineInfo, topline, hideQuoted); else - mutt_error ("Top of message is shown."); + mutt_error _("Top of message is shown."); break; case OP_HALF_DOWN: @@ -1734,7 +1734,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) else if (option (OPTPAGERSTOP)) { /* emulate "less -q" and don't go on to the next message. */ - mutt_error ("Bottom of message is shown."); + mutt_error _("Bottom of message is shown."); } else { @@ -1762,7 +1762,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) if (i < lastLine) topline = i; else - mutt_error ("Not found."); + mutt_error _("Not found."); } else { @@ -1778,7 +1778,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) if (i >= 0) topline = i; else - mutt_error ("Not found."); + mutt_error _("Not found."); } if (lineInfo[topline].search_cnt > 0) @@ -1796,9 +1796,9 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) else if (ch == OP_SEARCH_REVERSE) SearchBack = 1; - if (mutt_get_field ((SearchBack ? "Reverse search: " : "Search: "), - searchbuf, sizeof (searchbuf), M_CLEAR) != 0 || - !searchbuf[0]) + if (mutt_get_field ((SearchBack ? _("Reverse search: ") : + _("Search: ")), searchbuf, sizeof (searchbuf), + M_CLEAR) != 0 || !searchbuf[0]) break; if (SearchCompiled) @@ -1865,7 +1865,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) if (lineInfo[topline].search_cnt == 0) { SearchFlag = 0; - mutt_error ("Not found."); + mutt_error _("Not found."); } else SearchFlag = M_SEARCH; @@ -1891,7 +1891,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) InHelp = 0; } else - mutt_error ("Help is currently being shown."); + mutt_error _("Help is currently being shown."); break; case OP_PAGER_HIDE_QUOTED: @@ -1920,7 +1920,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) if (dretval < 0) { - mutt_error ("No more quoted text."); + mutt_error _("No more quoted text."); break; } @@ -1933,7 +1933,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) if (dretval < 0) { - mutt_error ("No more unquoted text after quoted text."); + mutt_error _("No more unquoted text after quoted text."); break; } topline = new_topline; @@ -1953,7 +1953,7 @@ mutt_pager (const char *banner, const char *fname, int do_color, pager_t *extra) topline = upNLines (bodylen, lineInfo, lastLine, hideQuoted); } else - mutt_error ("Bottom of message is shown."); + mutt_error _("Bottom of message is shown."); break; case OP_REDRAW: diff --git a/parse.c b/parse.c index 7b3497c0..7d7cb443 100644 --- a/parse.c +++ b/parse.c @@ -473,7 +473,7 @@ BODY *mutt_parse_multipart (FILE *fp, const char *boundary, long end_off, int di if (!boundary) { - mutt_error ("multipart message has no boundary parameter!"); + mutt_error _("multipart message has no boundary parameter!"); return (NULL); } diff --git a/pattern.c b/pattern.c index 09f6cd9a..6b9fe894 100644 --- a/pattern.c +++ b/pattern.c @@ -227,7 +227,7 @@ int eat_regexp (pattern_t *pat, BUFFER *s, BUFFER *err) if (mutt_extract_token (&buf, s, M_TOKEN_PATTERN | M_TOKEN_COMMENT) != 0 || !buf.data) { - snprintf (err->data, err->dsize, "Error in expression: %s", s->dptr); + snprintf (err->data, err->dsize, _("Error in expression: %s"), s->dptr); return (-1); } pat->rx = safe_malloc (sizeof (regex_t)); @@ -323,7 +323,7 @@ static const char *getDate (const char *s, struct tm *t, BUFFER *err) t->tm_mday = strtol (s, &p, 0); if (t->tm_mday < 1 || t->tm_mday > 31) { - snprintf (err->data, err->dsize, "Invalid day of month: %s", s); + snprintf (err->data, err->dsize, _("Invalid day of month: %s"), s); return NULL; } if (*p != '/') @@ -337,7 +337,7 @@ static const char *getDate (const char *s, struct tm *t, BUFFER *err) t->tm_mon = strtol (p, &p, 0) - 1; if (t->tm_mon < 0 || t->tm_mon > 11) { - snprintf (err->data, err->dsize, "Invalid month: %s", p); + snprintf (err->data, err->dsize, _("Invalid month: %s"), p); return NULL; } if (*p != '/') @@ -391,7 +391,7 @@ static int eat_date (pattern_t *pat, BUFFER *s, BUFFER *err) if (mutt_extract_token (&buffer, s, M_TOKEN_COMMENT | M_TOKEN_PATTERN) != 0 || !buffer.data) { - strfcpy (err->data, "error in expression", err->dsize); + strfcpy (err->data, _("error in expression"), err->dsize); return (-1); } @@ -571,7 +571,7 @@ pattern_t *mutt_pattern_comp (/* const */ char *s, int flags, BUFFER *err) { if (!curlist) { - snprintf (err->data, err->dsize, "error in pattern at: %s", ps.dptr); + snprintf (err->data, err->dsize, _("error in pattern at: %s"), ps.dptr); return NULL; } if (curlist->next) @@ -616,13 +616,13 @@ pattern_t *mutt_pattern_comp (/* const */ char *s, int flags, BUFFER *err) ps.dptr++; /* move past the ~ */ if ((entry = lookup_tag (*ps.dptr)) == NULL) { - snprintf (err->data, err->dsize, "%c: invalid command", *ps.dptr); + snprintf (err->data, err->dsize, _("%c: invalid command"), *ps.dptr); mutt_pattern_free (&curlist); return NULL; } if (entry->class && (flags & entry->class) == 0) { - snprintf (err->data, err->dsize, "%c: not supported in this mode", *ps.dptr); + snprintf (err->data, err->dsize, _("%c: not supported in this mode"), *ps.dptr); mutt_pattern_free (&curlist); return NULL; } @@ -635,7 +635,7 @@ pattern_t *mutt_pattern_comp (/* const */ char *s, int flags, BUFFER *err) { if (!*ps.dptr) { - snprintf (err->data, err->dsize, "missing parameter"); + snprintf (err->data, err->dsize, _("missing parameter")); mutt_pattern_free (&curlist); return NULL; } @@ -651,7 +651,7 @@ pattern_t *mutt_pattern_comp (/* const */ char *s, int flags, BUFFER *err) p = find_matching_paren (ps.dptr + 1); if (*p != ')') { - snprintf (err->data, err->dsize, "mismatched parenthesis: %s", ps.dptr); + snprintf (err->data, err->dsize, _("mismatched parenthesis: %s"), ps.dptr); mutt_pattern_free (&curlist); return NULL; } @@ -674,14 +674,14 @@ pattern_t *mutt_pattern_comp (/* const */ char *s, int flags, BUFFER *err) ps.dptr = p + 1; /* restore location */ break; default: - snprintf (err->data, err->dsize, "error in pattern at: %s", ps.dptr); + snprintf (err->data, err->dsize, _("error in pattern at: %s"), ps.dptr); mutt_pattern_free (&curlist); return NULL; } } if (!curlist) { - strfcpy (err->data, "empty pattern", err->dsize); + strfcpy (err->data, _("empty pattern"), err->dsize); return NULL; } if (curlist->next) @@ -832,7 +832,7 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, break; #endif } - mutt_error ("error: unknown op %d (report this error).", pat->op); + mutt_error (_("error: unknown op %d (report this error)."), pat->op); return (-1); } @@ -896,7 +896,7 @@ int mutt_pattern_func (int op, char *prompt) if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN) != 0 || !buf[0]) return (-1); - mutt_message ("Compiling search pattern..."); + mutt_message _("Compiling search pattern..."); simple = safe_strdup (buf); mutt_check_simple (buf, sizeof (buf), NONULL (SimpleSearch)); @@ -910,7 +910,7 @@ int mutt_pattern_func (int op, char *prompt) return (-1); } - mutt_message ("Executing command on matching messages..."); + mutt_message _("Executing command on matching messages..."); if (op == M_LIMIT) { @@ -967,7 +967,7 @@ int mutt_pattern_func (int op, char *prompt) mutt_pattern_free (&Context->limit_pattern); if (!Context->vcount) { - mutt_error ("No messages matched criteria."); + mutt_error _("No messages matched criteria."); /* restore full display */ for (i = 0; i < Context->msgcount; i++) { @@ -1005,8 +1005,9 @@ int mutt_search_command (int cur, int op) if (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE) { strfcpy (buf, LastSearch, sizeof (buf)); - if (mutt_get_field ((op == OP_SEARCH) ? "Search for: " : "Reverse search for: ", - buf, sizeof (buf), M_CLEAR | M_PATTERN) != 0 || !buf[0]) + if (mutt_get_field ((op == OP_SEARCH) ? _("Search for: ") : + "Reverse search for: ", buf, sizeof (buf), + M_CLEAR | M_PATTERN) != 0 || !buf[0]) return (-1); if (op == OP_SEARCH) @@ -1023,7 +1024,7 @@ int mutt_search_command (int cur, int op) { set_option (OPTSEARCHINVALID); strfcpy (LastSearch, buf, sizeof (LastSearch)); - mutt_message ("Compiling search pattern..."); + mutt_message _("Compiling search pattern..."); mutt_pattern_free (&SearchPattern); err.data = error; err.dsize = sizeof (error); @@ -1037,7 +1038,7 @@ int mutt_search_command (int cur, int op) } else if (!SearchPattern) { - mutt_error ("No search pattern."); + mutt_error _("No search pattern."); return (-1); } @@ -1058,10 +1059,10 @@ int mutt_search_command (int cur, int op) { i = 0; if (option (OPTWRAPSEARCH)) - mutt_message ("Search wrapped to top."); + mutt_message _("Search wrapped to top."); else { - mutt_message ("Search hit bottom without finding match"); + mutt_message _("Search hit bottom without finding match"); return (-1); } } @@ -1069,10 +1070,10 @@ int mutt_search_command (int cur, int op) { i = Context->vcount - 1; if (option (OPTWRAPSEARCH)) - mutt_message ("Search wrapped to bottom."); + mutt_message _("Search wrapped to bottom."); else { - mutt_message ("Search hit top without finding match"); + mutt_message _("Search hit top without finding match"); return (-1); } } @@ -1094,7 +1095,7 @@ int mutt_search_command (int cur, int op) if (Signals & S_INTERRUPT) { - mutt_error ("Search interrupted."); + mutt_error _("Search interrupted."); Signals &= ~S_INTERRUPT; return (-1); } @@ -1102,6 +1103,6 @@ int mutt_search_command (int cur, int op) i += incr; } - mutt_error ("Not found."); + mutt_error _("Not found."); return (-1); } diff --git a/pgp.c b/pgp.c index e9df7fd5..f53ddd7c 100644 --- a/pgp.c +++ b/pgp.c @@ -127,7 +127,7 @@ int pgp_valid_passphrase (void) if (now < PgpExptime) return 1; /* just use the cached copy. */ pgp_void_passphrase (); - if (mutt_get_password ("Enter PGP passphrase:", PgpPass, sizeof (PgpPass)) == 0) + if (mutt_get_password (_("Enter PGP passphrase:"), PgpPass, sizeof (PgpPass)) == 0) { PgpExptime = time (NULL) + PgpTimeout; return (1); @@ -143,7 +143,7 @@ int pgp_valid_passphrase (void) void mutt_forget_passphrase (void) { pgp_void_passphrase (); - mutt_message ("PGP passphrase forgotten."); + mutt_message _("PGP passphrase forgotten."); } @@ -171,7 +171,7 @@ struct pgp_vinfo *pgp_get_vinfo(enum pgp_ops op) return &pgp_vinfo[i]; } - snprintf(msg, sizeof(msg), "Unknown PGP version \"%s\".", + snprintf(msg, sizeof(msg), _("Unknown PGP version \"%s\"."), version); mutt_error(msg); @@ -204,7 +204,7 @@ static void pgp_current_time (STATE *s) time_t t; char p[STRING]; - state_puts ("[-- PGP output follows (current time: ", s); + state_puts (_("[-- PGP output follows (current time: "), s); t = time (NULL); strfcpy (p, asctime (localtime (&t)), sizeof (p)); @@ -317,7 +317,7 @@ void application_pgp_handler (BODY *m, STATE *s) { fclose (pgpout); pgpout = NULL; mutt_unlink(tmpfname); - state_puts ("[-- Error: unable to create PGP subprocess --]\n", s); + state_puts (_("[-- Error: unable to create PGP subprocess! --]\n"), s); state_puts (buf, s); continue; } @@ -344,7 +344,7 @@ void application_pgp_handler (BODY *m, STATE *s) fclose (pgperr); if (s->flags & M_DISPLAY) - state_puts ("\n[-- End of PGP output --]\n\n", s); + state_puts (_("\n[-- End of PGP output --]\n\n"), s); } if(s->flags & M_DISPLAY) @@ -473,7 +473,7 @@ void application_pgp_handler (BODY *m, STATE *s) if (needpass == -1) { - state_puts ("[-- Error! Could not find beginning of PGP message! --]\n\n", s); + state_puts (_("[-- Error: could not find beginning of PGP message! --]\n\n"), s); return; } @@ -666,25 +666,25 @@ void pgp_signed_handler (BODY *a, STATE *s) mutt_wait_filter (thepid); } - state_puts ("[-- End of PGP output --]\n\n", s); + state_puts (_("[-- End of PGP output --]\n\n"), s); mutt_unlink (tempfile); mutt_unlink (sigfile); mutt_unlink (pgperrfile); /* Now display the signed body */ - state_puts ("[-- The following data is PGP/MIME signed --]\n\n", s); + state_puts (_("[-- The following data is PGP/MIME signed --]\n\n"), s); } mutt_body_handler (a, s); if (s->flags & M_DISPLAY) - state_puts ("\n[-- End of PGP/MIME signed data --]\n", s); + state_puts (_("\n[-- End of PGP/MIME signed data --]\n"), s); } else { dprint (1,(debugfile, "pgp_signed_handler: invalid format!\n")); - state_puts ("[-- Error! This message does not comply with the PGP/MIME specification! --]\n\n", s); + state_puts (_("[-- Error: this message does not comply with the PGP/MIME specification! --]\n\n"), s); mutt_decode_attachment (a, s); /* just treat the data as text/plain... */ } } @@ -798,7 +798,7 @@ void pgp_extract_keys_from_attachment_list (FILE *fp, int tag, BODY *top) if(!fp) { - mutt_error("Internal error. Inform ."); + mutt_error _("Internal error. Inform ."); return; } @@ -862,7 +862,7 @@ BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout) fclose (pgperr); unlink (pgptmpfile); if (s->flags & M_DISPLAY) - state_puts ("[-- Error: could not create a PGP subprocess! --]\n\n", s); + state_puts (_("[-- Error: could not create a PGP subprocess! --]\n\n"), s); return (NULL); } @@ -891,7 +891,7 @@ BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout) fflush (pgperr); rewind (pgperr); mutt_copy_stream (pgperr, s->fpout); - state_puts ("[-- End of PGP output --]\n\n", s); + state_puts (_("[-- End of PGP output --]\n\n"), s); } fclose (pgperr); @@ -964,7 +964,7 @@ void pgp_encrypted_handler (BODY *a, STATE *s) strcasecmp ("octet-stream", a->next->subtype) != 0) { if (s->flags & M_DISPLAY) - state_puts ("[-- Error: malformed PGP/MIME message --]\n\n", s); + state_puts (_("[-- Error: malformed PGP/MIME message! --]\n\n"), s); return; } @@ -977,7 +977,7 @@ void pgp_encrypted_handler (BODY *a, STATE *s) if ((fpout = safe_fopen (tempfile, "w+")) == NULL) { if (s->flags & M_DISPLAY) - state_puts ("[-- Error: could not create temporary file --]\n", s); + state_puts (_("[-- Error: could not create temporary file! --]\n"), s); return; } @@ -986,7 +986,7 @@ void pgp_encrypted_handler (BODY *a, STATE *s) if ((tattach = pgp_decrypt_part (a, s, fpout)) != NULL) { if (s->flags & M_DISPLAY) - state_puts ("[-- The following data is PGP/MIME encrypted --]\n\n", s); + state_puts (_("[-- The following data is PGP/MIME encrypted --]\n\n"), s); fpin = s->fpin; s->fpin = fpout; @@ -994,7 +994,7 @@ void pgp_encrypted_handler (BODY *a, STATE *s) s->fpin = fpin; if (s->flags & M_DISPLAY) - state_puts ("\n[-- End of PGP/MIME encrypted data --]\n", s); + state_puts (_("\n[-- End of PGP/MIME encrypted data --]\n"), s); mutt_free_body (&tattach); } @@ -1077,7 +1077,7 @@ static BODY *pgp_sign_message (BODY *a) if((thepid = pgp->invoke_sign(pgp, &pgpin, &pgpout, &pgperr, -1, -1, -1, signedfile)) == -1) { - mutt_perror("Can't open PGP subprocess!"); + mutt_perror _("Can't open PGP subprocess!"); fclose(fp); unlink(sigfile); unlink(signedfile); @@ -1211,13 +1211,13 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc) k_info = NULL; if ((keyID = mutt_pgp_hook (p)) != NULL) { - snprintf (buf, sizeof (buf), "Use keyID = \"%s\" for %s?", keyID, p->mailbox); + snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox); if (mutt_yesorno (buf, M_YES) == M_YES) k_info = ki_getkeybystr (pgp, keyID, db, KEYFLAG_CANENCRYPT); } if (k_info == NULL && (k_info = ki_getkeybyaddr (pgp, p, db, KEYFLAG_CANENCRYPT)) == NULL) { - snprintf (buf, sizeof (buf), "Enter keyID for %s: ", p->mailbox); + snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), p->mailbox); if ((key = pgp_ask_for_key (pgp, db, buf, p->mailbox, KEYFLAG_CANENCRYPT, NULL)) == NULL) diff --git a/pgpkey.c b/pgpkey.c index 475a118b..42e19e67 100644 --- a/pgpkey.c +++ b/pgpkey.c @@ -170,14 +170,14 @@ static KEYINFO *pgp_select_key (struct pgp_vinfo *pgp, qsort (KeyTable, i, sizeof (pgp_key_t), pgp_compare); helpstr[0] = 0; - mutt_make_help (buf, sizeof (buf), "Exit ", MENU_PGP, OP_EXIT); + mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_PGP, OP_EXIT); strcat (helpstr, buf); - mutt_make_help (buf, sizeof (buf), "Select ", MENU_PGP, + mutt_make_help (buf, sizeof (buf), _("Select "), MENU_PGP, OP_GENERIC_SELECT_ENTRY); strcat (helpstr, buf); - mutt_make_help (buf, sizeof (buf), "Check key ", MENU_PGP, OP_VERIFY_KEY); + mutt_make_help (buf, sizeof (buf), _("Check key "), MENU_PGP, OP_VERIFY_KEY); strcat (helpstr, buf); - mutt_make_help (buf, sizeof (buf), "Help", MENU_PGP, OP_HELP); + mutt_make_help (buf, sizeof (buf), _("Help"), MENU_PGP, OP_HELP); strcat (helpstr, buf); menu = mutt_new_menu (); @@ -188,7 +188,7 @@ static KEYINFO *pgp_select_key (struct pgp_vinfo *pgp, menu->help = helpstr; menu->data = KeyTable; - strfcpy (buf, "PGP keys matching ", sizeof (buf)); + strfcpy (buf, _("PGP keys matching "), sizeof (buf)); if (p) strfcpy (buf, p->mailbox, sizeof (buf) - strlen (buf)); else @@ -207,23 +207,23 @@ static KEYINFO *pgp_select_key (struct pgp_vinfo *pgp, mutt_mktemp (tempfile); if ((devnull = fopen ("/dev/null", "w")) == NULL) { - mutt_perror ("Can't open /dev/null"); + mutt_perror _("Can't open /dev/null"); break; } if ((fp = safe_fopen (tempfile, "w")) == NULL) { fclose (devnull); - mutt_perror ("Can't create temporary file"); + mutt_perror _("Can't create temporary file"); break; } - mutt_message ("Invoking PGP..."); + mutt_message _("Invoking PGP..."); if((thepid = pgp->invoke_verify_key(pgp, NULL, NULL, NULL, -1, fileno(fp), fileno(devnull), pgp_keyid(KeyTable[menu->current].k))) == -1) { - mutt_perror ("Can't create filter"); + mutt_perror _("Can't create filter"); unlink (tempfile); fclose (fp); fclose (devnull); @@ -233,7 +233,7 @@ static KEYINFO *pgp_select_key (struct pgp_vinfo *pgp, fclose (fp); fclose (devnull); mutt_clear_error (); - snprintf(cmd, sizeof(cmd), "Key ID: 0x%s", pgp_keyid(KeyTable[menu->current].k)); + snprintf(cmd, sizeof(cmd), _("Key ID: 0x%s"), pgp_keyid(KeyTable[menu->current].k)); mutt_do_pager (cmd, tempfile, 0, NULL); menu->redraw = REDRAW_FULL; @@ -254,12 +254,13 @@ static KEYINFO *pgp_select_key (struct pgp_vinfo *pgp, switch (KeyTable[menu->current].a->trust & 0x03) { - case 0: s = "This ID's trust level is undefined."; break; - case 1: s = "This ID is not trusted."; break; - case 2: s = "This ID is only marginally trusted."; break; + case 0: s = N_("This ID's trust level is undefined."); break; + case 1: s = N_("This ID is not trusted."); break; + case 2: s = N_("This ID is only marginally trusted."); break; } - snprintf (buff, sizeof(buff), "%s Do you really want to use it?", s); + snprintf (buff, sizeof(buff), _("%s Do you really want to use it?"), + _(s)); if (mutt_yesorno (buff, 0) != 1) { @@ -365,7 +366,7 @@ BODY *pgp_make_key_attachment (char * tempf) unset_option (OPTPGPCHECKTRUST); db = pgp->read_pubring(pgp); - id = pgp_ask_for_key (pgp, db, "Please enter the key ID: ", NULL, 0, NULL); + id = pgp_ask_for_key (pgp, db, _("Please enter the key ID: "), NULL, 0, NULL); pgp_close_keydb(&db); if(!id) @@ -377,13 +378,13 @@ BODY *pgp_make_key_attachment (char * tempf) } if ((tempfp = safe_fopen (tempf, tempf == tempfb ? "w" : "a")) == NULL) { - mutt_perror ("Can't create temporary file"); + mutt_perror _("Can't create temporary file"); safe_free ((void **)&id); return NULL; } if ((devnull = fopen ("/dev/null", "w")) == NULL) { - mutt_perror ("Can't open /dev/null"); + mutt_perror _("Can't open /dev/null"); safe_free ((void **)&id); fclose (tempfp); if (tempf == tempfb) unlink (tempf); @@ -394,7 +395,7 @@ BODY *pgp_make_key_attachment (char * tempf) NULL, NULL, NULL, -1, fileno(tempfp), fileno(devnull), id)) == -1) { - mutt_perror ("Can't create filter"); + mutt_perror _("Can't create filter"); unlink (tempf); fclose (tempfp); fclose (devnull); @@ -412,7 +413,7 @@ BODY *pgp_make_key_attachment (char * tempf) att->unlink = 1; att->type = TYPEAPPLICATION; att->subtype = safe_strdup ("pgp-keys"); - snprintf (buff, sizeof (buff), "PGP Key 0x%s.", id); + snprintf (buff, sizeof (buff), _("PGP Key 0x%s."), id); att->description = safe_strdup (buff); mutt_update_encoding (att); diff --git a/pgppubring.c b/pgppubring.c index 087d6d61..97d6383e 100644 --- a/pgppubring.c +++ b/pgppubring.c @@ -53,24 +53,25 @@ enum packet_tags { PT_COMMENT /* Comment Packet */ }; +/* FIXME I can't find where those strings are displayed! */ const char *pgp_packet_name[] = { - "reserved", - "Encrypted Session Key", - "Signature Packet", - "Conventionally Encrypted Session Key Packet", - "One-Pass Signature Packet", - "Secret Key Packet", - "Public Key Packet", - "Secret Subkey Packet", - "Compressed Data Packet", - "Symmetrically Encrypted Data Packet", - "Marker Packet", - "Literal Data Packet", - "Trust Packet", - "Name Packet", - "Subkey Packet", - "Reserved", - "Comment Packet" + N_("reserved"), + N_("Encrypted Session Key"), + N_("Signature Packet"), + N_("Conventionally Encrypted Session Key Packet"), + N_("One-Pass Signature Packet"), + N_("Secret Key Packet"), + N_("Public Key Packet"), + N_("Secret Subkey Packet"), + N_("Compressed Data Packet"), + N_("Symmetrically Encrypted Data Packet"), + N_("Marker Packet"), + N_("Literal Data Packet"), + N_("Trust Packet"), + N_("Name Packet"), + N_("Subkey Packet"), + N_("Reserved"), + N_("Comment Packet") }; const char *pgp_pkalgbytype(unsigned char type) diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 00000000..d9934c5d --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,251 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: cat-id-tbl.c $(CATALOGS) +all-no: + +$(top_srcdir)/keymap_defs.h: + $(MAKE) -C $(top_srcdir) keymap_defs.h + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in \ + && test ! -f $(PACKAGE).po \ + || ( rm -f $(srcdir)/$(PACKAGE).pot \ + && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +Makefile: Makefile.in.in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 00000000..6d60c736 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,69 @@ +# List of source files containing translatable strings. + +addrbook.c +alias.c +attach.c +browser.c +buffy.c +color.c +#charset.c +commands.c +#complete.c +compose.c +copy.c +curs_lib.c +curs_main.c +date.c +#i18n will not work on a sgid program dotlock.c +edit.c +#enter.c +#filter.c +flags.c +#from.c +#getdomain.c +#gnupgparse.c +#handler.c +#hash.c +#hdrline.c +headers.c +help.c +#history.c +hook.c +imap.c +init.c +keymap.c +keymap_defs.h +lib.c +main.c +mbox.c +menu.c +mh.c +mx.c +pager.c +parse.c +pattern.c +pgp.c +#pgpinvoke.c +pgpkey.c +pgppubring.c +pop.c +postpone.c +query.c +recvattach.c +#resize.c +rfc1524.c +#rfc2047.c +#rfc822.c +score.c +send.c +sendlib.c +#sha1dgst.c +signal.c +#snprintf.c +#socket.c +sort.c +status.c +#strcasecmp.c +#system.c +thread.c + diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c new file mode 100644 index 00000000..9e262016 --- /dev/null +++ b/po/cat-id-tbl.c @@ -0,0 +1,681 @@ +/* Automatically generated by po2tbl.sed from mutt.pot. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include "libgettext.h" + +const struct _msg_ent _msg_tbl[] = { + {"", 1}, + {"You have no aliases!", 2}, + {"Aliases", 3}, + {"Alias as: ", 4}, + {"You already have an alias defined with that name!", 5}, + {"Address: ", 6}, + {"Personal name: ", 7}, + {"[%s = %s] Accept?", 8}, + {"Save to file: ", 9}, + {"Alias added.", 10}, + {"Can't match nametemplate, continue?", 11}, + {"Mailcap compose entry requires %%s", 12}, + {"Failure to open file to parse headers.", 13}, + {"Failure to open file to strip headers.", 14}, + {"No mailcap compose entry for %s, creating empty file.", 15}, + {"Mailcap Edit entry requires %%s", 16}, + {"No mailcap edit entry for %s", 17}, + {"No matching mailcap entry found. Viewing as text.", 18}, + {"MIME type not defined. Cannot view attachment.", 19}, + {"Cannot create filter", 20}, + {"Attachment saved.", 21}, + {"Write fault!", 22}, + {"I don't know how to print that!", 23}, + {"%s is not a directory.", 24}, + {"Mailboxes [%d]", 25}, + {"Directory [%s], File mask: %s", 26}, + {"No files match the file mask", 27}, + {"Chdir to: ", 28}, + {"Error scanning directory.", 29}, + {"File Mask: ", 30}, + {"Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ", 31}, + {"Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? ", 32}, + {"New file name: ", 33}, + {"Can't view a directory", 34}, + {"Error trying to view file", 35}, + {"New mail in %s.", 36}, + {"%s: color not supported by term", 37}, + {"%s: no such color", 38}, + {"%s: no such object", 39}, + {"%s: command valid only for index object", 40}, + {"%s: too few arguments", 41}, + {"Missing arguments.", 42}, + {"color: too few arguments", 43}, + {"mono: too few arguments", 44}, + {"%s: no such attribute", 45}, + {"too few arguments", 46}, + {"too many arguments", 47}, + {"default colors not supported", 48}, + {"Display message using mailcap?", 49}, + {"Invoking PGP...", 50}, + {"Verify PGP signature?", 51}, + {"Could not create temporary file!", 52}, + {"Command: ", 53}, + {"Error parsing address!", 54}, + {"Bounce message to %s", 55}, + {"Bounce messages to %s", 56}, + {"Message bounced.", 57}, + {"Messages bounced.", 58}, + {"Pipe to command: ", 59}, + {"\ +Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ", 60}, + {"\ +Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ", 61}, + {"Shell command: ", 62}, + {"%s%s to mailbox", 63}, + {"Decode-save", 64}, + {"Decode-copy", 65}, + {"Decrypt-save", 66}, + {"Decrypt-copy", 67}, + {"Save", 68}, + {"Copy", 69}, + {" tagged", 70}, + {"Copying to %s...", 71}, + {"Print message?", 72}, + {"Print tagged messages?", 73}, + {"Message printed", 74}, + {"Messages printed", 75}, + {"\ +(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget \ +it? ", 76}, + {"Can't open your secret key ring!", 77}, + {"Sign as: ", 78}, + {"An unkown PGP version was defined for signing.", 79}, + {"This doesn't make sense if you don't want to sign the message.", 80}, + {"MIC algorithm: ", 81}, + {"Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160", 82}, + {"%s [#%d] no longer exists!", 83}, + {"%s [#%d] modified. Update encoding?", 84}, + {"Sign, Encrypt", 85}, + {"Encrypt", 86}, + {"Sign", 87}, + {"Clear", 88}, + {" sign as: ", 89}, + {"", 90}, + {"You may not delete the only attachment.", 91}, + {"Compose", 92}, + {"Attach file", 93}, + {"Open mailbox to attach message from", 94}, + {"No messages in that folder.", 95}, + {"Unable to attach!", 96}, + {"Invalid encoding.", 97}, + {"Save a copy of this message?", 98}, + {"Rename to: ", 99}, + {"Can't stat: %s", 100}, + {"New file: ", 101}, + {"Content-Type is of the form base/sub", 102}, + {"Unknown Content-Type %s", 103}, + {"Can't create file %s", 104}, + {"What we have here is a failure to make an attachment", 105}, + {"Postpone this message?", 106}, + {"Write message to mailbox", 107}, + {"Writing message to %s ...", 108}, + {"Message written.", 109}, + {"Confused when attempting to delete attachment, h & m can't be NULL", 110}, + {"Deleting non-multipart messages not yet supported", 111}, + {"Exit Mutt?", 112}, + {"unknown error", 113}, + {"Press any key to continue...", 114}, + {" ('?' for list): ", 115}, + {"Cannot toggle write on a readonly mailbox!", 116}, + {"Changes to folder will be written on folder exit.", 117}, + {"Changes to folder will not be written.", 118}, + {"Mailbox was externally modified. Flags may be wrong.", 119}, + {"New mail in this mailbox.", 120}, + {"Folder: %s Tagged messages will be attached upon exiting", 121}, + {"No mailbox is open.", 122}, + {"No tagged messages.", 123}, + {"Jump to message: ", 124}, + {"Argument must be a message number.", 125}, + {"That message is not visible.", 126}, + {"Invalid message number.", 127}, + {"Delete messages matching: ", 128}, + {"No limit pattern is in effect.", 129}, + {"Limit: %s", 130}, + {"Limit to messages matching: ", 131}, + {"Quit Mutt?", 132}, + {"Tag messages matching: ", 133}, + {"Undelete messages matching: ", 134}, + {"Untag messages matching: ", 135}, + {"Open mailbox", 136}, + {"Open mailbox in read-only mode", 137}, + {"%s is not a mailbox.", 138}, + {"Exit Mutt without saving?", 139}, + {"You are on the last message.", 140}, + {"No undeleted messages.", 141}, + {"You are on the first message.", 142}, + {"Search wrapped to top.", 143}, + {"Search wrapped to bottom.", 144}, + {"No new messages", 145}, + {"No unread messages", 146}, + {" in this limited view", 147}, + {"No more threads.", 148}, + {"You are on the first thread.", 149}, + {"Thread contains unread messages.", 150}, + {"Threading is not enabled.", 151}, + {"Please report this program error in the function mutt_mktime.", 152}, + {"\ +~~\t\tinsert a line begining with a single ~\n\ +~b users\tadd users to the Bcc: field\n\ +~c users\tadd users to the Cc: field\n\ +~f messages\tinclude messages\n\ +~F messages\tsame as ~f, except also include headers\n\ +~h\t\tedit the message header\n\ +~m messages\tinclude and quote messages\n\ +~M messages\tsame as ~m, except include headers\n\ +~p\t\tprint the message\n\ +~q\t\twrite file and quit editor\n\ +~r file\t\tread a file into the editor\n\ +~t users\tadd users to the To: field\n\ +~u\t\trecall the previous line\n\ +~v\t\tedit message with the $visual editor\n\ +~w file\t\twrite message to file\n\ +~x\t\tabort changes and quit editor\n\ +~?\t\tthis message\n\ +.\t\ton a line by itself ends input\n", 153}, + {"%d: invalid message number.\n", 154}, + {"(End message with a . on a line by itself)\n", 155}, + {"No mailbox.\n", 156}, + {"Message contains:\n", 157}, + {"(continue)\n", 158}, + {"missing filename.\n", 159}, + {"No lines in message.\n", 160}, + {"%s: unknown editor command (~? for help)\n", 161}, + {"Set %s flag", 162}, + {"Clear %s flag", 163}, + {"%s: unable to attach file", 164}, + {"ERROR: please report this bug", 165}, + {"", 166}, + {"\ +\n\ +Generic bindings:\n\ +\n", 167}, + {"\ +\n\ +Unbound functions:\n\ +\n", 168}, + {"Help for %s", 169}, + {"imap_error(): unexpected response in %s: %s\n", 170}, + {"Fatal error. Message count is out of sync!", 171}, + {"Fetching message headers... [%d/%d]", 172}, + {"Connecting to %s...", 173}, + {"IMAP Username: ", 174}, + {"Password for %s@%s: ", 175}, + {"Logging in...", 176}, + {"Selecting %s...", 177}, + {"Create %s?", 178}, + {"Fetching message...", 179}, + {"Sending APPEND command ...", 180}, + {"Uploading message ...", 181}, + {"Closing connection to IMAP server...", 182}, + {"Saving message status flags... [%d/%d]", 183}, + {"Expunging messages from server...", 184}, + {"Closing mailbox...", 185}, + {"BUG! Untagged IMAP Response during BUFFY Check", 186}, + {"alias: no address", 187}, + {"invalid header field", 188}, + {"ignoring empty header field: %s", 189}, + {"%s: unknown sorting method", 190}, + {"mutt_restore_default: error in regexp: %s\n", 191}, + {"%s: unknown variable", 192}, + {"prefix is illegal with reset", 193}, + {"value is illegal with reset", 194}, + {"%s is a boolean var!", 195}, + {"%s is set", 196}, + {"%s is unset", 197}, + {"%s: invalid mailbox type", 198}, + {"%s: invalid value", 199}, + {"%s: unknown type", 200}, + {"Error in %s, line %d: %s", 201}, + {"source: errors in %s", 202}, + {"source: error at %s", 203}, + {"source: too many arguments", 204}, + {"%s: unknown command", 205}, + {"Error in command line: %s\n", 206}, + {"unable to determine home directory", 207}, + {"unable to determine username", 208}, + {"Macro loop detected.", 209}, + {"Key is not bound. Press '%s' for help.", 210}, + {"Key is not bound. See the manual.", 211}, + {"push: too many arguments", 212}, + {"%s: no such menu", 213}, + {"null key sequence", 214}, + {"bind: too many arguments", 215}, + {"%s: no such function in map", 216}, + {"macro: empty key sequence", 217}, + {"macro: too many arguments", 218}, + {"null operation", 219}, + {"force viewing of attachment using mailcap", 220}, + {"view attachment as text", 221}, + {"move to the bottom of the page", 222}, + {"remail a message to another user", 223}, + {"select a new file in this directory", 224}, + {"view file", 225}, + {"display the currently selected file's name", 226}, + {"change directories", 227}, + {"check mailboxes for new mail", 228}, + {"attach a file(s) to this message", 229}, + {"attach message(s) to this message", 230}, + {"edit the BCC list", 231}, + {"edit the CC list", 232}, + {"edit attachment description", 233}, + {"edit attachment transfer-encoding", 234}, + {"enter a file to save a copy of this message in", 235}, + {"edit the file to be attached", 236}, + {"edit the from field", 237}, + {"edit the message with headers", 238}, + {"edit the message", 239}, + {"edit attachment using mailcap entry", 240}, + {"edit the Reply-To field", 241}, + {"edit the subject of this message", 242}, + {"edit the TO list", 243}, + {"edit attachment type", 244}, + {"get a temporary copy of an attachment", 245}, + {"run ispell on the message", 246}, + {"compose new attachment using mailcap entry", 247}, + {"save this message to send later", 248}, + {"rename/move an attached file", 249}, + {"send the message", 250}, + {"toggle whether to delete file after sending it", 251}, + {"update an attachment's encoding info", 252}, + {"write the message to a folder", 253}, + {"copy a message to a file/mailbox", 254}, + {"create an alias from a message sender", 255}, + {"move entry to bottom of screen", 256}, + {"move entry to middle of screen", 257}, + {"move entry to top of screen", 258}, + {"make decoded (text/plain) copy", 259}, + {"make decoded copy (text/plain) and delete", 260}, + {"delete the current entry", 261}, + {"delete all messages in subthread", 262}, + {"delete all messages in thread", 263}, + {"display full address of sender", 264}, + {"display message with full headers", 265}, + {"display a message", 266}, + {"edit the current message for resending", 267}, + {"delete the char in front of the cursor", 268}, + {"move the cursor one character to the left", 269}, + {"jump to the beginning of the line", 270}, + {"cycle among incoming mailboxes", 271}, + {"complete filename or alias", 272}, + {"complete address with query", 273}, + {"delete the char under the cursor", 274}, + {"jump to the end of the line", 275}, + {"move the cursor one character to the right", 276}, + {"scroll up through the history list", 277}, + {"delete chars from cursor to end of line", 278}, + {"delete all chars on the line", 279}, + {"delete the word in front of the cursor", 280}, + {"quote the next typed key", 281}, + {"enter a muttrc command", 282}, + {"enter a file mask", 283}, + {"exit this menu", 284}, + {"filter attachment through a shell command", 285}, + {"move to the first entry", 286}, + {"toggle a message's 'important' flag", 287}, + {"forward a message with comments", 288}, + {"select the current entry", 289}, + {"reply to all recipients", 290}, + {"scroll down 1/2 page", 291}, + {"scroll up 1/2 page", 292}, + {"this screen", 293}, + {"jump to an index number", 294}, + {"move to the last entry", 295}, + {"reply to specified mailing list", 296}, + {"execute a macro", 297}, + {"compose a new mail message", 298}, + {"open a different folder", 299}, + {"open a different folder in read only mode", 300}, + {"clear a status flag from a message", 301}, + {"delete messages matching a pattern", 302}, + {"retrieve mail from POP server", 303}, + {"move to the first message", 304}, + {"move to the last message", 305}, + {"show only messages matching a pattern", 306}, + {"jump to the next new message", 307}, + {"jump to the next subthread", 308}, + {"jump to the next thread", 309}, + {"move to the next undeleted message", 310}, + {"jump to the next unread message", 311}, + {"jump to previous thread", 312}, + {"jump to previous subthread", 313}, + {"move to the last undelete message", 314}, + {"jump to the previous new message", 315}, + {"jump to the previous unread message", 316}, + {"mark the current thread as read", 317}, + {"mark the current subthread as read", 318}, + {"set a status flag on a message", 319}, + {"save changes to mailbox", 320}, + {"tag messages matching a pattern", 321}, + {"undelete messages matching a pattern", 322}, + {"untag messages matching a pattern", 323}, + {"move to the middle of the page", 324}, + {"move to the next entry", 325}, + {"scroll down one line", 326}, + {"move to the next page", 327}, + {"jump to the bottom of the message", 328}, + {"return to the main-menu", 329}, + {"toggle display of quoted text", 330}, + {"skip beyond quoted text", 331}, + {"jump to the top of the message", 332}, + {"pipe message/attachment to a shell command", 333}, + {"move to the previous entry", 334}, + {"scroll up one line", 335}, + {"move to the previous page", 336}, + {"print the current entry", 337}, + {"query external program for addresses", 338}, + {"append new query results to current results", 339}, + {"save changes to mailbox and quit", 340}, + {"recall a postponed message", 341}, + {"clear and redraw the screen", 342}, + {"reply to a message", 343}, + {"save message/attachment to a file", 344}, + {"search for a regular expression", 345}, + {"search backwards for a regular expression", 346}, + {"search for next match", 347}, + {"search for next match in opposite direction", 348}, + {"toggle search pattern coloring", 349}, + {"invoke a command in a subshell", 350}, + {"sort messages", 351}, + {"sort messages in reverse order", 352}, + {"tag the current entry", 353}, + {"apply next function to tagged messages", 354}, + {"tag the current subthread", 355}, + {"tag the current thread", 356}, + {"toggle a message's 'new' flag", 357}, + {"toggle whether the mailbox will be rewritten", 358}, + {"toggle wether to browse mailboxes or all files", 359}, + {"move to the top of the page", 360}, + {"undelete the current entry", 361}, + {"undelete all messages in thread", 362}, + {"undelete all messages in subthread", 363}, + {"show the Mutt version number and date", 364}, + {"view attachment using mailcap entry if necessary", 365}, + {"show MIME attachments", 366}, + {"show currently active limit pattern", 367}, + {"collapse/uncollapse current thread", 368}, + {"collapse/uncollapse all threads", 369}, + {"attach a PGP public key", 370}, + {"show PGP options", 371}, + {"extract PGP public keys", 372}, + {"wipe PGP passphrase from memory", 373}, + {"mail a PGP public key", 374}, + {"verify a PGP public key", 375}, + {"view the key's user id", 376}, + {"make decrypted copy and delete", 377}, + {"make decrypted copy", 378}, + {"Out of memory!", 379}, + {"File is a directory, save under it?", 380}, + {"File under directory: ", 381}, + {"File exists, overwrite?", 382}, + {"%s is not a mailbox!", 383}, + {"Append messages to %s?", 384}, + {"\ +usage: mutt [ -nRzZ ] [ -e ] [ -F ] [ -m ] [ -f \ +]\n\ + mutt [ -nx ] [ -e ] [ -a ] [ -F ] [ -H ] [ \ +-i ] [ -s ] [ -b ] [ -c ] [ ... ]\n\ + mutt [ -n ] [ -e ] [ -F ] -p\n\ + mutt -v[v]\n\ +\n\ +options:\n\ + -a \tattach a file to the message\n\ + -b
\tspecify a blind carbon-copy (BCC) address\n\ + -c
\tspecify a carbon-copy (CC) address\n\ + -e \tspecify a command to be executed after initialization\n\ + -f \tspecify which mailbox to read\n\ + -F \tspecify an alternate muttrc file\n\ + -H \tspecify a draft file to read header from\n\ + -i \tspecify a file which Mutt should include in the reply\n\ + -m \tspecify a default mailbox type\n\ + -n\t\tcauses Mutt not to read the system Muttrc\n\ + -p\t\trecall a postponed message\n\ + -R\t\topen mailbox in read-only mode\n\ + -s \tspecify a subject (must be in quotes if it has spaces)\n\ + -v\t\tshow version and compile-time definitions\n\ + -x\t\tsimulate the mailx send mode\n\ + -y\t\tselect a mailbox specified in your `mailboxes' list\n\ + -z\t\texit immediately if there are no messages in the mailbox\n\ + -Z\t\topen the first folder with new message, exit immediately if none\n\ + -h\t\tthis help message", 385}, + {"\ +\n\ +Mail bug reports along with this output to .", 386}, + {"Error initializing terminal.", 387}, + {"Debugging at level %d.\n", 388}, + {"DEBUG was not defined during compilation. Ignored.\n", 389}, + {"No recipients specified.\n", 390}, + {"%s: unable to attach file.\n", 391}, + {"No mailbox with new mail.", 392}, + {"Mailbox is empty.", 393}, + {"Mailbox is corrupt!", 394}, + {"Reading %s... %d (%d%%)", 395}, + {"Mailbox was corrupted!", 396}, + {"Fatal error! Could not reopen mailbox!", 397}, + {"Unable to lock mailbox!", 398}, + {"sync: mbox modified, but no modified messages! (report this bug)", 399}, + {"Writing messages... %d (%d%%)", 400}, + {"Write failed! Saved partial mailbox to %s", 401}, + {"Could not reopen mailbox!", 402}, + {"Jump to: ", 403}, + {"Invalid index number.", 404}, + {"No entries.", 405}, + {"You cannot scroll down farther.", 406}, + {"You cannot scroll up farther.", 407}, + {"You are on the last page.", 408}, + {"You are on the first page.", 409}, + {"First entry is shown.", 410}, + {"Last entry is shown.", 411}, + {"You are on the last entry.", 412}, + {"You are on the first entry.", 413}, + {"Search for: ", 414}, + {"Reverse search for: ", 415}, + {"No search pattern.", 416}, + {"Not found.", 417}, + {"Search is not implemented for this menu.", 418}, + {"Tagging is not supported.", 419}, + {"Reading %s... %d", 420}, + {"mh_parse_sequences: Unable to allocate hash table!\n", 421}, + {"Cannot open %s", 422}, + {"Folder %s: %d unread", 423}, + {"fopen %s failed", 424}, + {"Lock count exceeded, remove lock for %s?", 425}, + {"Timeout exceeded while attempting fcntl lock!", 426}, + {"Waiting for fcntl lock... %d", 427}, + {"Timeout exceeded while attempting flock lock!", 428}, + {"Waiting for flock attempt... %d", 429}, + {"Reading %s...", 430}, + {"Writing %s...", 431}, + {"Move read messages to %s?", 432}, + {"Purge %d deleted message?", 433}, + {"Purge %d deleted messages?", 434}, + {"Moving read messages to %s...", 435}, + {"Mailbox is unchanged.", 436}, + {"%d kept, %d moved, %d deleted.", 437}, + {"%d kept, %d deleted.", 438}, + {" Press '%s' to toggle write", 439}, + {"Use 'toggle-write' to re-enable write!", 440}, + {"Mailbox is marked unwritable. %s", 441}, + {"Mailbox is read-only.", 442}, + {"Reopening mailbox...", 443}, + {"Help", 444}, + {"Bottom of message is shown.", 445}, + {"Top of message is shown.", 446}, + {"Reverse search: ", 447}, + {"Search: ", 448}, + {"Help is currently being shown.", 449}, + {"No more quoted text.", 450}, + {"No more unquoted text after quoted text.", 451}, + {"multipart message has no boundary parameter!", 452}, + {"Error in expression: %s", 453}, + {"Invalid day of month: %s", 454}, + {"Invalid month: %s", 455}, + {"error in expression", 456}, + {"error in pattern at: %s", 457}, + {"%c: invalid command", 458}, + {"%c: not supported in this mode", 459}, + {"missing parameter", 460}, + {"mismatched parenthesis: %s", 461}, + {"empty pattern", 462}, + {"error: unknown op %d (report this error).", 463}, + {"Compiling search pattern...", 464}, + {"Executing command on matching messages...", 465}, + {"No messages matched criteria.", 466}, + {"Search hit bottom without finding match", 467}, + {"Search hit top without finding match", 468}, + {"Search interrupted.", 469}, + {"Enter PGP passphrase:", 470}, + {"PGP passphrase forgotten.", 471}, + {"Unknown PGP version \"%s\".", 472}, + {"[-- PGP output follows (current time: ", 473}, + {"[-- Error: unable to create PGP subprocess! --]\n", 474}, + {"\ +\n\ +[-- End of PGP output --]\n\ +\n", 475}, + {"\ +[-- Error: could not find beginning of PGP message! --]\n\ +\n", 476}, + {"\ +[-- End of PGP output --]\n\ +\n", 477}, + {"\ +[-- The following data is PGP/MIME signed --]\n\ +\n", 478}, + {"\ +\n\ +[-- End of PGP/MIME signed data --]\n", 479}, + {"\ +[-- Error: this message does not comply with the PGP/MIME specification! \ +--]\n\ +\n", 480}, + {"Internal error. Inform .", 481}, + {"\ +[-- Error: could not create a PGP subprocess! --]\n\ +\n", 482}, + {"\ +[-- Error: malformed PGP/MIME message! --]\n\ +\n", 483}, + {"[-- Error: could not create temporary file! --]\n", 484}, + {"\ +[-- The following data is PGP/MIME encrypted --]\n\ +\n", 485}, + {"\ +\n\ +[-- End of PGP/MIME encrypted data --]\n", 486}, + {"Can't open PGP subprocess!", 487}, + {"Use keyID = \"%s\" for %s?", 488}, + {"Enter keyID for %s: ", 489}, + {"Exit ", 490}, + {"Select ", 491}, + {"Check key ", 492}, + {"PGP keys matching ", 493}, + {"Can't open /dev/null", 494}, + {"Can't create temporary file", 495}, + {"Can't create filter", 496}, + {"Key ID: 0x%s", 497}, + {"This ID's trust level is undefined.", 498}, + {"This ID is not trusted.", 499}, + {"This ID is only marginally trusted.", 500}, + {"%s Do you really want to use it?", 501}, + {"Please enter the key ID: ", 502}, + {"PGP Key 0x%s.", 503}, + {"reserved", 504}, + {"Encrypted Session Key", 505}, + {"Signature Packet", 506}, + {"Conventionally Encrypted Session Key Packet", 507}, + {"One-Pass Signature Packet", 508}, + {"Secret Key Packet", 509}, + {"Public Key Packet", 510}, + {"Secret Subkey Packet", 511}, + {"Compressed Data Packet", 512}, + {"Symmetrically Encrypted Data Packet", 513}, + {"Marker Packet", 514}, + {"Literal Data Packet", 515}, + {"Trust Packet", 516}, + {"Name Packet", 517}, + {"Subkey Packet", 518}, + {"Reserved", 519}, + {"Comment Packet", 520}, + {"POP Password: ", 521}, + {"POP host is not defined.", 522}, + {"No POP username is defined.", 523}, + {"Could not find address for host %s.", 524}, + {"Connecting to %s", 525}, + {"Server closed connection!", 526}, + {"No new mail in POP mailbox.", 527}, + {"Error reading message!", 528}, + {"Error while writing mailbox!", 529}, + {"%s [%d messages read]", 530}, + {"Postponed Messages", 531}, + {"No postponed messages.", 532}, + {"Illegal PGP header", 533}, + {"Waiting for response...", 534}, + {"Query command not defined.", 535}, + {"Query", 536}, + {"Query: ", 537}, + {"Query '%s'", 538}, + {"Saving...", 539}, + {"Attachment saved", 540}, + {"WARNING! You are about to overwrite %s, continue?", 541}, + {"Attachment filtered.", 542}, + {"Filter through: ", 543}, + {"Pipe to: ", 544}, + {"I dont know how to print %s attachments!", 545}, + {"Print tagged attachment(s)?", 546}, + {"Print attachment?", 547}, + {"You may only bounce message/rfc822 parts.", 548}, + {"Bounce messages to %s...?", 549}, + {"Bounce message to %s...?", 550}, + {"Attachments", 551}, + {"Only deletion of multipart attachments is supported.", 552}, + {"Deletion of attachments from PGP messages is unsupported.", 553}, + {"This operation is not currently supported for PGP messages.", 554}, + {"Improperly formated entry for type %s in \"%s\" line %d", 555}, + {"No mailcap path specified", 556}, + {"mailcap entry for type %s not found", 557}, + {"score: too few arguments", 558}, + {"score: too many arguments", 559}, + {"No subject, abort?", 560}, + {"No subject, aborting.", 561}, + {"Reply to %s?", 562}, + {"No tagged messages are visible!", 563}, + {"No mailing lists found!", 564}, + {"Include message in reply?", 565}, + {"Could not include all requested messages!", 566}, + {"Forward MIME encapsulated?", 567}, + {"Recall postponed message?", 568}, + {"Abort unmodified message?", 569}, + {"Aborted unmodified message.", 570}, + {"Mail not sent.", 571}, + {"Message postponed.", 572}, + {"No recipients are specified!", 573}, + {"No recipients were specified.", 574}, + {"No subject, abort sending?", 575}, + {"No subject specified.", 576}, + {"Message edited. Really send?", 577}, + {"Sending message...", 578}, + {"Mail sent.", 579}, + {"No boundary parameter found! [report this error]", 580}, + {"%s no longer exists!", 581}, + {"Could not open %s", 582}, + {"Error sending message, child exited %d (%s).\n", 583}, + {"Saved output of child process to %s.\n", 584}, + {"Error sending message.", 585}, + {"Caught %s... Exiting.\n", 586}, + {"Caught signal %d... Exiting.\n", 587}, + {"Sorting mailbox...", 588}, + {"Could not find sorting function! [report this bug]", 589}, + {"(no mailbox)", 590}, +}; + +int _msg_tbl_length = 590; diff --git a/po/de.po b/po/de.po new file mode 100644 index 00000000..b734e7b4 --- /dev/null +++ b/po/de.po @@ -0,0 +1,2595 @@ +# German messages for Mutt. +# Copyright (C) 1998 Thomas Roessler +# Thomas Roessler , 1998 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 1998-10-01 09:27+0200\n" +"PO-Revision-Date: 1998-10-01 10:20 MET DST\n" +"Last-Translator: Thomas Roessler " +"Language-Team: mutt-dev " +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: addrbook.c:131 +msgid "You have no aliases!" +msgstr "Keine Einträge im Adreßbuch!" + +#: addrbook.c:143 +msgid "Aliases" +msgstr "Adressen" + +#. add a new alias +#: alias.c:192 +msgid "Alias as: " +msgstr "Kurzname: " + +#: alias.c:198 +msgid "You already have an alias defined with that name!" +msgstr "Sie haben bereits einen Adreßbucheintrag mit diesem Kurznamen definiert." + +#: alias.c:212 +msgid "Address: " +msgstr "Adresse: " + +#: alias.c:228 +msgid "Personal name: " +msgstr "Name: " + +#: alias.c:237 +#, c-format +msgid "[%s = %s] Accept?" +msgstr "[%s = %s] Eintragen?" + +#: alias.c:254 recvattach.c:282 recvattach.c:337 +msgid "Save to file: " +msgstr "Speichern in Datei: " + +#: alias.c:265 +msgid "Alias added." +msgstr "Adresse eingetragen." + +#: attach.c:111 attach.c:234 attach.c:366 attach.c:813 +msgid "Can't match nametemplate, continue?" +msgstr "Namensmuster kann nicht erfüllt werden, fortfahren?" + +#. For now, editing requires a file, no piping +#: attach.c:123 +msgid "Mailcap compose entry requires %%s" +msgstr "\"compose\"-Eintrag in der Mailcap-Datei erfordert %%s" + +#: attach.c:137 +msgid "Failure to open file to parse headers." +msgstr "Kann Datei nicht öffnen, um Nachrichtenkopf zu untersuchen." + +#: attach.c:168 +msgid "Failure to open file to strip headers." +msgstr "Kann Datei nicht öffnen, um Nachrichtenkopf zu entfernen." + +#: attach.c:186 +#, c-format +msgid "No mailcap compose entry for %s, creating empty file." +msgstr "Kein \"compose\"-Eintrag für %s in der Mailcap-Datei, erzeuge leere Datei." + +#. For now, editing requires a file, no piping +#: attach.c:246 +msgid "Mailcap Edit entry requires %%s" +msgstr "\"Edit\"-Eintrag in Mailcap erfordert %%s" + +#: attach.c:264 +#, c-format +msgid "No mailcap edit entry for %s" +msgstr "Kein \"edit\"-Eintrag für %s in Mailcap." + +#: attach.c:332 +msgid "No matching mailcap entry found. Viewing as text." +msgstr "Es gibt keinen passenden Mailcap-Eintrag, Anzeige als Text." + +#: attach.c:345 +msgid "MIME type not defined. Cannot view attachment." +msgstr "Undefinierter MIME-Typ, kann Anhang nicht anzeigen." + +#: attach.c:436 +msgid "Cannot create filter" +msgstr "Kann Filter nicht erzeugen." + +#: attach.c:642 recvattach.c:312 +msgid "Attachment saved." +msgstr "Anhang gespeichert." + +#: attach.c:695 +msgid "Write fault!" +msgstr "Schreibfehler!" + +#: attach.c:897 +msgid "I don't know how to print that!" +msgstr "Ich weiß nicht, wie man das druckt." + +#: browser.c:344 browser.c:669 +#, c-format +msgid "%s is not a directory." +msgstr "%s ist kein Verzeichnis." + +#: browser.c:447 +#, c-format +msgid "Mailboxes [%d]" +msgstr "Mailbox-Dateien [%d]" + +#: browser.c:452 +#, c-format +msgid "Directory [%s], File mask: %s" +msgstr "Verzeichnis [%s], Dateimaske: %s" + +#: browser.c:536 browser.c:726 browser.c:816 +msgid "No files match the file mask" +msgstr "Es gibt keine zur Maske passenden Dateien" + +#: browser.c:643 +msgid "Chdir to: " +msgstr "Verzeichnis wechseln nach: " + +#: browser.c:662 browser.c:719 +msgid "Error scanning directory." +msgstr "Fehler beim Einlesen des Verzeichnisses" + +#: browser.c:680 +msgid "File Mask: " +msgstr "Dateimaske: " + +#: browser.c:744 +msgid "Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? " +msgstr "Sortiere umgekehrt nach (D)atum, (a)lphabetisch, (z) Größe, oder (n)icht? " + +#: browser.c:746 +msgid "Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? " +msgstr "Sortiere nach (D)atum, (a)lphabetisch, (z) Größe oder (n)icht?" + +#: browser.c:803 +msgid "New file name: " +msgstr "Neuer Dateiname: " + +#: browser.c:824 +msgid "Can't view a directory" +msgstr "Verzeichnisse können nicht angezeigt werden." + +#: browser.c:842 +msgid "Error trying to view file" +msgstr "Fehler" + +#: buffy.c:368 +#, c-format +msgid "New mail in %s." +msgstr "Neue Nachrichten in %s." + +#: color.c:306 +#, c-format +msgid "%s: color not supported by term" +msgstr "%s: color wird nicht vom Terminal unterstützt." + +#: color.c:312 +#, c-format +msgid "%s: no such color" +msgstr "%s: Farbe unbekannt" + +#: color.c:358 color.c:541 color.c:552 +#, c-format +msgid "%s: no such object" +msgstr "%s: Objekt unbekannt" + +#: color.c:365 +#, c-format +msgid "%s: command valid only for index object" +msgstr "%s: Kommando ist nur für Index-Objekt gültig" + +#: color.c:373 +#, c-format +msgid "%s: too few arguments" +msgstr "%s: Zu wenige Parameter." + +#: color.c:529 +msgid "Missing arguments." +msgstr "Fehlende Parameter." + +#: color.c:568 color.c:579 +msgid "color: too few arguments" +msgstr "color: Zu wenige Parameter." + +#: color.c:602 +msgid "mono: too few arguments" +msgstr "mono: Zu wenige Parameter" + +#: color.c:622 +#, c-format +msgid "%s: no such attribute" +msgstr "%s: Attribut unbekannt" + +#: color.c:662 hook.c:61 hook.c:69 keymap.c:557 +msgid "too few arguments" +msgstr "Zu wenige Parameter" + +#: color.c:671 hook.c:75 +msgid "too many arguments" +msgstr "Zu viele Parameter" + +#: color.c:685 +msgid "default colors not supported" +msgstr "Standard-Farben werden nicht unterstützt" + +#: commands.c:122 +msgid "Display message using mailcap?" +msgstr "Nachricht mittels Mailcap anzeigen?" + +#: commands.c:153 commands.c:161 pgpkey.c:220 +msgid "Invoking PGP..." +msgstr "Rufe PGP auf..." + +#. find out whether or not the verify signature +#: commands.c:158 +msgid "Verify PGP signature?" +msgstr "PGP-Signatur überprüfen?" + +#: commands.c:176 mbox.c:695 +msgid "Could not create temporary file!" +msgstr "Konnte Temporärdatei nicht anzeigen!" + +#: commands.c:224 +msgid "Command: " +msgstr "Kommando: " + +#: commands.c:257 +msgid "Error parsing address!" +msgstr "Unverständliche Adresse!" + +#: commands.c:267 +#, c-format +msgid "Bounce message to %s" +msgstr "Nachricht an %s weiterleiten" + +#: commands.c:267 +#, c-format +msgid "Bounce messages to %s" +msgstr "Nachrichten an %s weiterleiten" + +#: commands.c:278 +msgid "Message bounced." +msgstr "Nachricht weitergeleitet." + +#: commands.c:278 +msgid "Messages bounced." +msgstr "Nachrichten weitergeleitet." + +#: commands.c:298 +msgid "Pipe to command: " +msgstr "In Kommando einspeisen: " + +#: commands.c:403 +msgid "" +"Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: " +msgstr "" + +#: commands.c:404 +msgid "" +"Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: " +msgstr "" + +#: commands.c:459 +msgid "Shell command: " +msgstr "Shell-Kommando: " + +#: commands.c:575 +#, c-format +msgid "%s%s to mailbox" +msgstr "%s%s in Mailbox" + +#: commands.c:576 +msgid "Decode-save" +msgstr "Decodiert speichern" + +#: commands.c:576 +msgid "Decode-copy" +msgstr "Decodiert kopieren" + +#: commands.c:577 +msgid "Decrypt-save" +msgstr "Entschlüsselt speichern" + +#: commands.c:577 +msgid "Decrypt-copy" +msgstr "Entschlüsselt kopieren" + +#: commands.c:578 +msgid "Save" +msgstr "Speichern" + +#: commands.c:578 +msgid "Copy" +msgstr "Kopieren" + +#: commands.c:578 +msgid " tagged" +msgstr " ausgewählt" + +#: commands.c:647 +#, c-format +msgid "Copying to %s..." +msgstr "Kopiere nach %s..." + +#: commands.c:719 +msgid "Print message?" +msgstr "Nachricht drucken?" + +#: commands.c:719 +msgid "Print tagged messages?" +msgstr "Ausgewählte Nachrichten drucken?" + +#: commands.c:746 +msgid "Message printed" +msgstr "Nachricht gedruckt" + +#: commands.c:746 +msgid "Messages printed" +msgstr "Nachrichten gedruckt" + +#: compose.c:97 +msgid "" +"(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget " +"it? " +msgstr "" + +#: compose.c:112 +msgid "Can't open your secret key ring!" +msgstr "Kann geheimen Schlüsselbund nicht öffnen!" + +#: compose.c:117 +msgid "Sign as: " +msgstr "Signiere als: " + +#: compose.c:136 +msgid "An unkown PGP version was defined for signing." +msgstr "Eine unbekannte PGP-Version wurde zum Signieren eingetragen." + +#: compose.c:142 +msgid "This doesn't make sense if you don't want to sign the message." +msgstr "Dies macht keinen Sinn, wenn Sie die Nachricht nicht signieren wollen." + +#: compose.c:148 compose.c:284 +msgid "MIC algorithm: " +msgstr "MIC-Algorithmus: " + +#: compose.c:153 +msgid "Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160" +msgstr "Unbekannter MIC-Algorithmus. Gültig sind: pgp-md5, pgp-sha1, pgp-rmd160" + +#: compose.c:197 +#, c-format +msgid "%s [#%d] no longer exists!" +msgstr "%s [#%d] existiert nicht mehr!" + +#: compose.c:205 +#, c-format +msgid "%s [#%d] modified. Update encoding?" +msgstr "%s [#%d] wurde modifiziert. Codierung neu bestimmen?" + +#: compose.c:267 +msgid "Sign, Encrypt" +msgstr "Signieren, Verschlüsseln" + +#: compose.c:269 +msgid "Encrypt" +msgstr "Verschlüsseln" + +#: compose.c:271 +msgid "Sign" +msgstr "Signieren" + +#: compose.c:273 +msgid "Clear" +msgstr "Klartext" + +#: compose.c:278 +msgid " sign as: " +msgstr " signiere als: " + +#: compose.c:282 +msgid "" +msgstr "" + +#: compose.c:373 +msgid "You may not delete the only attachment." +msgstr "Der einzige Nachrichtenteil kann nicht gelöscht werden." + +#: compose.c:447 +msgid "Compose" +msgstr "Erstelle" + +#: compose.c:603 +msgid "Attach file" +msgstr "Datei anhängen" + +#: compose.c:608 +msgid "Open mailbox to attach message from" +msgstr "Öffne Quell-Mailbox für Nachrichtenanhang" + +#: compose.c:647 +msgid "No messages in that folder." +msgstr "Keine Nachrichten in diesem Ordner" + +#: compose.c:685 compose.c:705 +msgid "Unable to attach!" +msgstr "Kann nicht anhängen!" + +#: compose.c:813 +msgid "Invalid encoding." +msgstr "Ungültige Codierung." + +#: compose.c:828 +msgid "Save a copy of this message?" +msgstr "Soll eine Kopie dieser Nachricht gespeichert werden?" + +#: compose.c:873 +msgid "Rename to: " +msgstr "Umbenennen in: " + +#: compose.c:878 +#, c-format +msgid "Can't stat: %s" +msgstr "Kann Datei nicht prüfen: %s" + +#: compose.c:905 +msgid "New file: " +msgstr "Neue Datei: " + +#: compose.c:918 +msgid "Content-Type is of the form base/sub" +msgstr "Content-Type ist von der Form Basis/Untertyp" + +#: compose.c:924 +#, c-format +msgid "Unknown Content-Type %s" +msgstr "Unbekannter Content-Type %s" + +#: compose.c:937 +#, c-format +msgid "Can't create file %s" +msgstr "Kann Datei %s nicht anlegen" + +#: compose.c:945 +msgid "What we have here is a failure to make an attachment" +msgstr "Anhang kann nicht erzeugt werden" + +#: compose.c:1017 +msgid "Postpone this message?" +msgstr "Nachricht zurückstellen?" + +#: compose.c:1064 +msgid "Write message to mailbox" +msgstr "Schreibe Nachricht in Mailbox" + +#: compose.c:1068 +#, c-format +msgid "Writing message to %s ..." +msgstr "Schreibe Nachricht nach %s ..." + +#: compose.c:1079 +msgid "Message written." +msgstr "Nachricht geschrieben." + +#: copy.c:567 +msgid "Confused when attempting to delete attachment, h & m can't be NULL" +msgstr "Interner Fehler." + +#: copy.c:582 +msgid "Deleting non-multipart messages not yet supported" +msgstr "Nur Teile von multipart-Nachrichten können gelöscht werden." + +#. restore blocking operation +#: curs_lib.c:167 +msgid "Exit Mutt?" +msgstr "Mutt verlassen?" + +#: curs_lib.c:242 +msgid "unknown error" +msgstr "unbekannter Fehler" + +#: curs_lib.c:262 +msgid "Press any key to continue..." +msgstr "Bitte drücken Sie eine Taste." + +#: curs_lib.c:300 +msgid " ('?' for list): " +msgstr " ('?' für eine Liste eingeben): " + +#: curs_main.c:201 +msgid "Cannot toggle write on a readonly mailbox!" +msgstr "Kann Schreib-Modus für eine nur-Lesen-Mailbox nicht ändern!" + +#: curs_main.c:208 +msgid "Changes to folder will be written on folder exit." +msgstr "Änderungen an dieser Mailbox werden beim Verlassen geschrieben." + +#: curs_main.c:213 +msgid "Changes to folder will not be written." +msgstr "Änderungen an dieser Mailbox werden nicht geschrieben." + +#: curs_main.c:390 +msgid "Mailbox was externally modified. Flags may be wrong." +msgstr "Mailbox wurde modifiziert." + +#: curs_main.c:393 +msgid "New mail in this mailbox." +msgstr "Neue Nachrichten in dieser Mailbox." + +#: curs_main.c:455 +#, c-format +msgid "Folder: %s Tagged messages will be attached upon exiting" +msgstr "Ordner: %s Markierte Nachrichten werden nach Verlassen angehängt." + +#: curs_main.c:514 +msgid "No mailbox is open." +msgstr "Keine Mailbox offen." + +#: curs_main.c:520 +msgid "No tagged messages." +msgstr "Keine markierten Nachrichten" + +#: curs_main.c:600 +msgid "Jump to message: " +msgstr "Springe zu Nachricht: " + +#: curs_main.c:606 +msgid "Argument must be a message number." +msgstr "Argument muß eine Nachrichtennummer sein." + +#: curs_main.c:639 +msgid "That message is not visible." +msgstr "Diese Nachricht ist nicht sichtbar." + +#: curs_main.c:642 +msgid "Invalid message number." +msgstr "Ungültige Nachrichtennummer." + +#: curs_main.c:654 +msgid "Delete messages matching: " +msgstr "Lösche Nachrichten nach Muster: " + +#: curs_main.c:675 +msgid "No limit pattern is in effect." +msgstr "Zur Zeit ist kein Muster aktiv." + +#. i18n: ask for a limit to apply +#: curs_main.c:680 +#, c-format +msgid "Limit: %s" +msgstr "Begrenze: %s" + +#: curs_main.c:689 +msgid "Limit to messages matching: " +msgstr "Begrenze auf Nachrichten nach Muster: " + +#: curs_main.c:719 +msgid "Quit Mutt?" +msgstr "Mutt verlassen?" + +#: curs_main.c:830 +msgid "Tag messages matching: " +msgstr "Markiere Nachrichten nach Muster: " + +#: curs_main.c:838 +msgid "Undelete messages matching: " +msgstr "Entferne Löschmarkierung nach Muster: " + +#: curs_main.c:845 +msgid "Untag messages matching: " +msgstr "Entferne Markierung nach Muster: " + +#: curs_main.c:863 +msgid "Open mailbox" +msgstr "Öffne Mailbox" + +#: curs_main.c:865 +msgid "Open mailbox in read-only mode" +msgstr "Öffne Mailbox im nur-Lesen-Modus" + +#: curs_main.c:881 mx.c:420 mx.c:561 +#, c-format +msgid "%s is not a mailbox." +msgstr "%s ist keine Mailbox." + +#: curs_main.c:977 +msgid "Exit Mutt without saving?" +msgstr "Mutt verlassen, ohne Änderungen zu speichern?" + +#: curs_main.c:987 curs_main.c:1011 +msgid "You are on the last message." +msgstr "Sie sind bereits auf der letzten Nachricht." + +#: curs_main.c:994 curs_main.c:1036 +msgid "No undeleted messages." +msgstr "Alle Nachrichten gelöscht." + +#: curs_main.c:1029 curs_main.c:1052 +msgid "You are on the first message." +msgstr "Sie sind bereits auf der ersten Nachricht." + +#: curs_main.c:1125 pattern.c:1050 +msgid "Search wrapped to top." +msgstr "Suche von vorne begonnen." + +#: curs_main.c:1134 pattern.c:1061 +msgid "Search wrapped to bottom." +msgstr "Suche von hinten begonnen." + +#: curs_main.c:1160 +msgid "No new messages" +msgstr "Keine neuen Nachrichten" + +#: curs_main.c:1160 +msgid "No unread messages" +msgstr "Keine ungelesenen Nachrichten" + +#: curs_main.c:1161 +msgid " in this limited view" +msgstr " in dieser begrenzeten Ansicht" + +#: curs_main.c:1271 +msgid "No more threads." +msgstr "Keine weiteren Diskussionsfäden." + +#: curs_main.c:1273 +msgid "You are on the first thread." +msgstr "Sie haben bereits den ersten Diskussionsfaden ausgewählt." + +#: curs_main.c:1326 +msgid "Thread contains unread messages." +msgstr "Diskussionsfaden enthält ungelesene Nachrichten." + +#: curs_main.c:1339 flags.c:217 thread.c:628 +msgid "Threading is not enabled." +msgstr "Darstellung von Diskussionsfäden ist nicht eingeschaltet." + +#: date.c:48 +msgid "Please report this program error in the function mutt_mktime." +msgstr "" + +#. +#. * SLcurses_waddnstr() can't take a "const char *", so this is only +#. * declared "static" (sigh) +#. +#: edit.c:36 +msgid "" +"~~\t\tinsert a line begining with a single ~\n" +"~b users\tadd users to the Bcc: field\n" +"~c users\tadd users to the Cc: field\n" +"~f messages\tinclude messages\n" +"~F messages\tsame as ~f, except also include headers\n" +"~h\t\tedit the message header\n" +"~m messages\tinclude and quote messages\n" +"~M messages\tsame as ~m, except include headers\n" +"~p\t\tprint the message\n" +"~q\t\twrite file and quit editor\n" +"~r file\t\tread a file into the editor\n" +"~t users\tadd users to the To: field\n" +"~u\t\trecall the previous line\n" +"~v\t\tedit message with the $visual editor\n" +"~w file\t\twrite message to file\n" +"~x\t\tabort changes and quit editor\n" +"~?\t\tthis message\n" +".\t\ton a line by itself ends input\n" +msgstr "" + +#: edit.c:178 +#, c-format +msgid "%d: invalid message number.\n" +msgstr "" + +#: edit.c:312 +msgid "(End message with a . on a line by itself)\n" +msgstr "" + +#: edit.c:370 +msgid "No mailbox.\n" +msgstr "" + +#: edit.c:374 +msgid "Message contains:\n" +msgstr "" + +#: edit.c:378 edit.c:430 +msgid "(continue)\n" +msgstr "" + +#: edit.c:391 +msgid "missing filename.\n" +msgstr "" + +#: edit.c:412 +msgid "No lines in message.\n" +msgstr "" + +#: edit.c:441 +#, c-format +msgid "%s: unknown editor command (~? for help)\n" +msgstr "" + +#: flags.c:254 +#, c-format +msgid "Set %s flag" +msgstr "" + +#: flags.c:255 +#, c-format +msgid "Clear %s flag" +msgstr "" + +#: headers.c:201 +#, c-format +msgid "%s: unable to attach file" +msgstr "" + +#: help.c:185 +msgid "ERROR: please report this bug" +msgstr "" + +#: help.c:232 +msgid "" +msgstr "" + +#: help.c:237 +msgid "" +"\n" +"Generic bindings:\n" +"\n" +msgstr "" + +#: help.c:241 +msgid "" +"\n" +"Unbound functions:\n" +"\n" +msgstr "" + +#: help.c:249 +#, c-format +msgid "Help for %s" +msgstr "" + +#: imap.c:100 +#, c-format +msgid "imap_error(): unexpected response in %s: %s\n" +msgstr "" + +#. something is wrong because the server reported fewer messages +#. * than we previously saw +#. +#: imap.c:353 +msgid "Fatal error. Message count is out of sync!" +msgstr "" + +#: imap.c:428 +#, c-format +msgid "Fetching message headers... [%d/%d]" +msgstr "" + +#: imap.c:662 +#, c-format +msgid "Connecting to %s..." +msgstr "" + +#: imap.c:681 +msgid "IMAP Username: " +msgstr "" + +#: imap.c:694 +#, c-format +msgid "Password for %s@%s: " +msgstr "" + +#: imap.c:707 +msgid "Logging in..." +msgstr "" + +#: imap.c:759 +#, c-format +msgid "Selecting %s..." +msgstr "" + +#: imap.c:854 lib.c:1164 +#, c-format +msgid "Create %s?" +msgstr "" + +#: imap.c:898 +msgid "Fetching message..." +msgstr "" + +#: imap.c:1006 +msgid "Sending APPEND command ..." +msgstr "" + +#: imap.c:1044 +msgid "Uploading message ..." +msgstr "" + +#: imap.c:1099 +msgid "Closing connection to IMAP server..." +msgstr "" + +#: imap.c:1128 +#, c-format +msgid "Saving message status flags... [%d/%d]" +msgstr "" + +#: imap.c:1154 +msgid "Expunging messages from server..." +msgstr "" + +#. tell the server to commit changes +#: imap.c:1205 +msgid "Closing mailbox..." +msgstr "" + +#: imap.c:1306 +msgid "BUG! Untagged IMAP Response during BUFFY Check" +msgstr "" + +#: init.c:431 +msgid "alias: no address" +msgstr "" + +#: init.c:525 +msgid "invalid header field" +msgstr "" + +#: init.c:533 +#, c-format +msgid "ignoring empty header field: %s" +msgstr "" + +#: init.c:585 +#, c-format +msgid "%s: unknown sorting method" +msgstr "" + +#: init.c:658 +#, c-format +msgid "mutt_restore_default: error in regexp: %s\n" +msgstr "" + +#: init.c:718 +#, c-format +msgid "%s: unknown variable" +msgstr "" + +#: init.c:727 +msgid "prefix is illegal with reset" +msgstr "" + +#: init.c:733 +msgid "value is illegal with reset" +msgstr "" + +#: init.c:750 +#, c-format +msgid "%s is a boolean var!" +msgstr "" + +#: init.c:757 +#, c-format +msgid "%s is set" +msgstr "" + +#: init.c:757 +#, c-format +msgid "%s is unset" +msgstr "" + +#: init.c:910 +#, c-format +msgid "%s: invalid mailbox type" +msgstr "" + +#: init.c:969 +#, c-format +msgid "%s: invalid value" +msgstr "" + +#: init.c:1019 +#, c-format +msgid "%s: unknown type" +msgstr "" + +#: init.c:1068 +#, c-format +msgid "Error in %s, line %d: %s" +msgstr "" + +#. the muttrc source keyword +#: init.c:1079 +#, c-format +msgid "source: errors in %s" +msgstr "" + +#: init.c:1089 +#, c-format +msgid "source: error at %s" +msgstr "" + +#: init.c:1094 +msgid "source: too many arguments" +msgstr "" + +#: init.c:1145 +#, c-format +msgid "%s: unknown command" +msgstr "" + +#: init.c:1424 +#, c-format +msgid "Error in command line: %s\n" +msgstr "" + +#: init.c:1467 +msgid "unable to determine home directory" +msgstr "" + +#: init.c:1475 +msgid "unable to determine username" +msgstr "" + +#: keymap.c:312 +msgid "Macro loop detected." +msgstr "" + +#: keymap.c:507 +#, c-format +msgid "Key is not bound. Press '%s' for help." +msgstr "" + +#: keymap.c:509 +msgid "Key is not bound. See the manual." +msgstr "" + +#: keymap.c:519 +msgid "push: too many arguments" +msgstr "" + +#: keymap.c:540 +#, c-format +msgid "%s: no such menu" +msgstr "" + +#: keymap.c:549 +msgid "null key sequence" +msgstr "" + +#: keymap.c:627 +msgid "bind: too many arguments" +msgstr "" + +#: keymap.c:642 +#, c-format +msgid "%s: no such function in map" +msgstr "" + +#: keymap.c:665 +msgid "macro: empty key sequence" +msgstr "" + +#: keymap.c:676 +msgid "macro: too many arguments" +msgstr "" + +#: keymap_defs.h:5 +msgid "null operation" +msgstr "" + +#: keymap_defs.h:6 +msgid "force viewing of attachment using mailcap" +msgstr "" + +#: keymap_defs.h:7 +msgid "view attachment as text" +msgstr "" + +#: keymap_defs.h:8 +msgid "move to the bottom of the page" +msgstr "" + +#: keymap_defs.h:9 +msgid "remail a message to another user" +msgstr "" + +#: keymap_defs.h:10 +msgid "select a new file in this directory" +msgstr "" + +#: keymap_defs.h:11 +msgid "view file" +msgstr "" + +#: keymap_defs.h:12 +msgid "display the currently selected file's name" +msgstr "" + +#: keymap_defs.h:13 +msgid "change directories" +msgstr "" + +#: keymap_defs.h:14 +msgid "check mailboxes for new mail" +msgstr "" + +#: keymap_defs.h:15 +msgid "attach a file(s) to this message" +msgstr "" + +#: keymap_defs.h:16 +msgid "attach message(s) to this message" +msgstr "" + +#: keymap_defs.h:17 +msgid "edit the BCC list" +msgstr "" + +#: keymap_defs.h:18 +msgid "edit the CC list" +msgstr "" + +#: keymap_defs.h:19 +msgid "edit attachment description" +msgstr "" + +#: keymap_defs.h:20 +msgid "edit attachment transfer-encoding" +msgstr "" + +#: keymap_defs.h:21 +msgid "enter a file to save a copy of this message in" +msgstr "" + +#: keymap_defs.h:22 +msgid "edit the file to be attached" +msgstr "" + +#: keymap_defs.h:23 +msgid "edit the from field" +msgstr "" + +#: keymap_defs.h:24 +msgid "edit the message with headers" +msgstr "" + +#: keymap_defs.h:25 +msgid "edit the message" +msgstr "" + +#: keymap_defs.h:26 +msgid "edit attachment using mailcap entry" +msgstr "" + +#: keymap_defs.h:27 +msgid "edit the Reply-To field" +msgstr "" + +#: keymap_defs.h:28 +msgid "edit the subject of this message" +msgstr "" + +#: keymap_defs.h:29 +msgid "edit the TO list" +msgstr "" + +#: keymap_defs.h:30 +msgid "edit attachment type" +msgstr "" + +#: keymap_defs.h:31 +msgid "get a temporary copy of an attachment" +msgstr "" + +#: keymap_defs.h:32 +msgid "run ispell on the message" +msgstr "" + +#: keymap_defs.h:33 +msgid "compose new attachment using mailcap entry" +msgstr "" + +#: keymap_defs.h:34 +msgid "save this message to send later" +msgstr "" + +#: keymap_defs.h:35 +msgid "rename/move an attached file" +msgstr "" + +#: keymap_defs.h:36 +msgid "send the message" +msgstr "" + +#: keymap_defs.h:37 +msgid "toggle whether to delete file after sending it" +msgstr "" + +#: keymap_defs.h:38 +msgid "update an attachment's encoding info" +msgstr "" + +#: keymap_defs.h:39 +msgid "write the message to a folder" +msgstr "" + +#: keymap_defs.h:40 +msgid "copy a message to a file/mailbox" +msgstr "" + +#: keymap_defs.h:41 +msgid "create an alias from a message sender" +msgstr "" + +#: keymap_defs.h:42 +msgid "move entry to bottom of screen" +msgstr "" + +#: keymap_defs.h:43 +msgid "move entry to middle of screen" +msgstr "" + +#: keymap_defs.h:44 +msgid "move entry to top of screen" +msgstr "" + +#: keymap_defs.h:45 +msgid "make decoded (text/plain) copy" +msgstr "" + +#: keymap_defs.h:46 +msgid "make decoded copy (text/plain) and delete" +msgstr "" + +#: keymap_defs.h:47 +msgid "delete the current entry" +msgstr "" + +#: keymap_defs.h:48 +msgid "delete all messages in subthread" +msgstr "" + +#: keymap_defs.h:49 +msgid "delete all messages in thread" +msgstr "" + +#: keymap_defs.h:50 +msgid "display full address of sender" +msgstr "" + +#: keymap_defs.h:51 +msgid "display message with full headers" +msgstr "" + +#: keymap_defs.h:52 +msgid "display a message" +msgstr "" + +#: keymap_defs.h:53 +msgid "edit the current message for resending" +msgstr "" + +#: keymap_defs.h:54 +msgid "delete the char in front of the cursor" +msgstr "" + +#: keymap_defs.h:55 +msgid "move the cursor one character to the left" +msgstr "" + +#: keymap_defs.h:56 +msgid "jump to the beginning of the line" +msgstr "" + +#: keymap_defs.h:57 +msgid "cycle among incoming mailboxes" +msgstr "" + +#: keymap_defs.h:58 +msgid "complete filename or alias" +msgstr "" + +#: keymap_defs.h:59 +msgid "complete address with query" +msgstr "" + +#: keymap_defs.h:60 +msgid "delete the char under the cursor" +msgstr "" + +#: keymap_defs.h:61 +msgid "jump to the end of the line" +msgstr "" + +#: keymap_defs.h:62 +msgid "move the cursor one character to the right" +msgstr "" + +#: keymap_defs.h:63 keymap_defs.h:64 +msgid "scroll up through the history list" +msgstr "" + +#: keymap_defs.h:65 +msgid "delete chars from cursor to end of line" +msgstr "" + +#: keymap_defs.h:66 +msgid "delete all chars on the line" +msgstr "" + +#: keymap_defs.h:67 +msgid "delete the word in front of the cursor" +msgstr "" + +#: keymap_defs.h:68 +msgid "quote the next typed key" +msgstr "" + +#: keymap_defs.h:69 +msgid "enter a muttrc command" +msgstr "" + +#: keymap_defs.h:70 +msgid "enter a file mask" +msgstr "" + +#: keymap_defs.h:71 +msgid "exit this menu" +msgstr "" + +#: keymap_defs.h:72 +msgid "filter attachment through a shell command" +msgstr "" + +#: keymap_defs.h:73 +msgid "move to the first entry" +msgstr "" + +#: keymap_defs.h:74 +msgid "toggle a message's 'important' flag" +msgstr "" + +#: keymap_defs.h:75 +msgid "forward a message with comments" +msgstr "" + +#: keymap_defs.h:76 +msgid "select the current entry" +msgstr "" + +#: keymap_defs.h:77 +msgid "reply to all recipients" +msgstr "" + +#: keymap_defs.h:78 +msgid "scroll down 1/2 page" +msgstr "" + +#: keymap_defs.h:79 +msgid "scroll up 1/2 page" +msgstr "" + +#: keymap_defs.h:80 +msgid "this screen" +msgstr "" + +#: keymap_defs.h:81 +msgid "jump to an index number" +msgstr "" + +#: keymap_defs.h:82 +msgid "move to the last entry" +msgstr "" + +#: keymap_defs.h:83 +msgid "reply to specified mailing list" +msgstr "" + +#: keymap_defs.h:84 +msgid "execute a macro" +msgstr "" + +#: keymap_defs.h:85 +msgid "compose a new mail message" +msgstr "" + +#: keymap_defs.h:86 +msgid "open a different folder" +msgstr "" + +#: keymap_defs.h:87 +msgid "open a different folder in read only mode" +msgstr "" + +#: keymap_defs.h:88 +msgid "clear a status flag from a message" +msgstr "" + +#: keymap_defs.h:89 +msgid "delete messages matching a pattern" +msgstr "" + +#: keymap_defs.h:90 +msgid "retrieve mail from POP server" +msgstr "" + +#: keymap_defs.h:91 +msgid "move to the first message" +msgstr "" + +#: keymap_defs.h:92 +msgid "move to the last message" +msgstr "" + +#: keymap_defs.h:93 +msgid "show only messages matching a pattern" +msgstr "" + +#: keymap_defs.h:94 +msgid "jump to the next new message" +msgstr "" + +#: keymap_defs.h:95 +msgid "jump to the next subthread" +msgstr "" + +#: keymap_defs.h:96 +msgid "jump to the next thread" +msgstr "" + +#: keymap_defs.h:97 +msgid "move to the next undeleted message" +msgstr "" + +#: keymap_defs.h:98 +msgid "jump to the next unread message" +msgstr "" + +#: keymap_defs.h:99 +msgid "jump to previous thread" +msgstr "" + +#: keymap_defs.h:100 +msgid "jump to previous subthread" +msgstr "" + +#: keymap_defs.h:101 +msgid "move to the last undelete message" +msgstr "" + +#: keymap_defs.h:102 +msgid "jump to the previous new message" +msgstr "" + +#: keymap_defs.h:103 +msgid "jump to the previous unread message" +msgstr "" + +#: keymap_defs.h:104 +msgid "mark the current thread as read" +msgstr "" + +#: keymap_defs.h:105 +msgid "mark the current subthread as read" +msgstr "" + +#: keymap_defs.h:106 +msgid "set a status flag on a message" +msgstr "" + +#: keymap_defs.h:107 +msgid "save changes to mailbox" +msgstr "" + +#: keymap_defs.h:108 +msgid "tag messages matching a pattern" +msgstr "" + +#: keymap_defs.h:109 +msgid "undelete messages matching a pattern" +msgstr "" + +#: keymap_defs.h:110 +msgid "untag messages matching a pattern" +msgstr "" + +#: keymap_defs.h:111 +msgid "move to the middle of the page" +msgstr "" + +#: keymap_defs.h:112 +msgid "move to the next entry" +msgstr "" + +#: keymap_defs.h:113 +msgid "scroll down one line" +msgstr "" + +#: keymap_defs.h:114 +msgid "move to the next page" +msgstr "" + +#: keymap_defs.h:115 +msgid "jump to the bottom of the message" +msgstr "" + +#: keymap_defs.h:116 +msgid "return to the main-menu" +msgstr "" + +#: keymap_defs.h:117 +msgid "toggle display of quoted text" +msgstr "" + +#: keymap_defs.h:118 +msgid "skip beyond quoted text" +msgstr "" + +#: keymap_defs.h:119 +msgid "jump to the top of the message" +msgstr "" + +#: keymap_defs.h:120 +msgid "pipe message/attachment to a shell command" +msgstr "" + +#: keymap_defs.h:121 +msgid "move to the previous entry" +msgstr "" + +#: keymap_defs.h:122 +msgid "scroll up one line" +msgstr "" + +#: keymap_defs.h:123 +msgid "move to the previous page" +msgstr "" + +#: keymap_defs.h:124 +msgid "print the current entry" +msgstr "" + +#: keymap_defs.h:125 +msgid "query external program for addresses" +msgstr "" + +#: keymap_defs.h:126 +msgid "append new query results to current results" +msgstr "" + +#: keymap_defs.h:127 +msgid "save changes to mailbox and quit" +msgstr "" + +#: keymap_defs.h:128 +msgid "recall a postponed message" +msgstr "" + +#: keymap_defs.h:129 +msgid "clear and redraw the screen" +msgstr "" + +#: keymap_defs.h:130 +msgid "reply to a message" +msgstr "" + +#: keymap_defs.h:131 +msgid "save message/attachment to a file" +msgstr "" + +#: keymap_defs.h:132 +msgid "search for a regular expression" +msgstr "" + +#: keymap_defs.h:133 +msgid "search backwards for a regular expression" +msgstr "" + +#: keymap_defs.h:134 +msgid "search for next match" +msgstr "" + +#: keymap_defs.h:135 +msgid "search for next match in opposite direction" +msgstr "" + +#: keymap_defs.h:136 +msgid "toggle search pattern coloring" +msgstr "" + +#: keymap_defs.h:137 +msgid "invoke a command in a subshell" +msgstr "" + +#: keymap_defs.h:138 +msgid "sort messages" +msgstr "" + +#: keymap_defs.h:139 +msgid "sort messages in reverse order" +msgstr "" + +#: keymap_defs.h:140 +msgid "tag the current entry" +msgstr "" + +#: keymap_defs.h:141 +msgid "apply next function to tagged messages" +msgstr "" + +#: keymap_defs.h:142 +msgid "tag the current subthread" +msgstr "" + +#: keymap_defs.h:143 +msgid "tag the current thread" +msgstr "" + +#: keymap_defs.h:144 +msgid "toggle a message's 'new' flag" +msgstr "" + +#: keymap_defs.h:145 +msgid "toggle whether the mailbox will be rewritten" +msgstr "" + +#: keymap_defs.h:146 +msgid "toggle wether to browse mailboxes or all files" +msgstr "" + +#: keymap_defs.h:147 +msgid "move to the top of the page" +msgstr "" + +#: keymap_defs.h:148 +msgid "undelete the current entry" +msgstr "" + +#: keymap_defs.h:149 +msgid "undelete all messages in thread" +msgstr "" + +#: keymap_defs.h:150 +msgid "undelete all messages in subthread" +msgstr "" + +#: keymap_defs.h:151 +msgid "show the Mutt version number and date" +msgstr "" + +#: keymap_defs.h:152 +msgid "view attachment using mailcap entry if necessary" +msgstr "" + +#: keymap_defs.h:153 +msgid "show MIME attachments" +msgstr "" + +#: keymap_defs.h:154 +msgid "show currently active limit pattern" +msgstr "" + +#: keymap_defs.h:155 +msgid "collapse/uncollapse current thread" +msgstr "" + +#: keymap_defs.h:156 +msgid "collapse/uncollapse all threads" +msgstr "" + +#: keymap_defs.h:157 +msgid "attach a PGP public key" +msgstr "" + +#: keymap_defs.h:158 +msgid "show PGP options" +msgstr "" + +#: keymap_defs.h:159 +msgid "extract PGP public keys" +msgstr "" + +#: keymap_defs.h:160 +msgid "wipe PGP passphrase from memory" +msgstr "" + +#: keymap_defs.h:161 +msgid "mail a PGP public key" +msgstr "" + +#: keymap_defs.h:162 +msgid "verify a PGP public key" +msgstr "" + +#: keymap_defs.h:163 +msgid "view the key's user id" +msgstr "" + +#: keymap_defs.h:164 +msgid "make decrypted copy and delete" +msgstr "" + +#: keymap_defs.h:165 +msgid "make decrypted copy" +msgstr "" + +#: lib.c:275 lib.c:290 lib.c:321 +msgid "Out of memory!" +msgstr "" + +#: lib.c:753 +msgid "File is a directory, save under it?" +msgstr "" + +#: lib.c:758 +msgid "File under directory: " +msgstr "" + +#: lib.c:769 +msgid "File exists, overwrite?" +msgstr "" + +#: lib.c:1142 +#, c-format +msgid "%s is not a mailbox!" +msgstr "" + +#: lib.c:1148 +#, c-format +msgid "Append messages to %s?" +msgstr "" + +#: main.c:68 +msgid "" +"usage: mutt [ -nRzZ ] [ -e ] [ -F ] [ -m ] [ -f " +"]\n" +" mutt [ -nx ] [ -e ] [ -a ] [ -F ] [ -H ] [ " +"-i ] [ -s ] [ -b ] [ -c ] [ ... ]\n" +" mutt [ -n ] [ -e ] [ -F ] -p\n" +" mutt -v[v]\n" +"\n" +"options:\n" +" -a \tattach a file to the message\n" +" -b
\tspecify a blind carbon-copy (BCC) address\n" +" -c
\tspecify a carbon-copy (CC) address\n" +" -e \tspecify a command to be executed after initialization\n" +" -f \tspecify which mailbox to read\n" +" -F \tspecify an alternate muttrc file\n" +" -H \tspecify a draft file to read header from\n" +" -i \tspecify a file which Mutt should include in the reply\n" +" -m \tspecify a default mailbox type\n" +" -n\t\tcauses Mutt not to read the system Muttrc\n" +" -p\t\trecall a postponed message\n" +" -R\t\topen mailbox in read-only mode\n" +" -s \tspecify a subject (must be in quotes if it has spaces)\n" +" -v\t\tshow version and compile-time definitions\n" +" -x\t\tsimulate the mailx send mode\n" +" -y\t\tselect a mailbox specified in your `mailboxes' list\n" +" -z\t\texit immediately if there are no messages in the mailbox\n" +" -Z\t\topen the first folder with new message, exit immediately if none\n" +" -h\t\tthis help message" +msgstr "" + +#: main.c:255 +msgid "" +"\n" +"Mail bug reports along with this output to ." +msgstr "" + +#: main.c:274 +msgid "Error initializing terminal." +msgstr "" + +#: main.c:370 +#, c-format +msgid "Debugging at level %d.\n" +msgstr "" + +#: main.c:372 +msgid "DEBUG was not defined during compilation. Ignored.\n" +msgstr "" + +#: main.c:506 +msgid "No recipients specified.\n" +msgstr "" + +#: main.c:579 +#, c-format +msgid "%s: unable to attach file.\n" +msgstr "" + +#: main.c:599 +msgid "No mailbox with new mail." +msgstr "" + +#: main.c:633 +msgid "Mailbox is empty." +msgstr "" + +#: mbox.c:186 +msgid "Mailbox is corrupt!" +msgstr "" + +#: mbox.c:261 +msgid "Reading %s... %d (%d%%)" +msgstr "" + +#: mbox.c:626 +msgid "Mailbox was corrupted!" +msgstr "" + +#: mbox.c:663 mbox.c:852 +msgid "Fatal error! Could not reopen mailbox!" +msgstr "" + +#: mbox.c:672 +msgid "Unable to lock mailbox!" +msgstr "" + +#. this means ctx->changed or ctx->deleted was set, but no +#. * messages were found to be changed or deleted. This should +#. * never happen, is we presume it is a bug in mutt. +#. +#: mbox.c:711 +msgid "sync: mbox modified, but no modified messages! (report this bug)" +msgstr "" + +#: mbox.c:735 +msgid "Writing messages... %d (%d%%)" +msgstr "" + +#: mbox.c:837 +#, c-format +msgid "Write failed! Saved partial mailbox to %s" +msgstr "" + +#: mbox.c:885 +msgid "Could not reopen mailbox!" +msgstr "" + +#: menu.c:297 +msgid "Jump to: " +msgstr "" + +#: menu.c:306 +msgid "Invalid index number." +msgstr "" + +#: menu.c:310 menu.c:328 menu.c:364 menu.c:405 menu.c:421 menu.c:432 +#: menu.c:443 menu.c:485 menu.c:496 menu.c:509 menu.c:522 menu.c:799 +msgid "No entries." +msgstr "" + +#: menu.c:325 +msgid "You cannot scroll down farther." +msgstr "" + +#: menu.c:341 +msgid "You cannot scroll up farther." +msgstr "" + +#: menu.c:361 +msgid "You are on the last page." +msgstr "" + +#: menu.c:383 +msgid "You are on the first page." +msgstr "" + +#: menu.c:462 +msgid "First entry is shown." +msgstr "" + +#: menu.c:482 +msgid "Last entry is shown." +msgstr "" + +#: menu.c:533 +msgid "You are on the last entry." +msgstr "" + +#: menu.c:544 +msgid "You are on the first entry." +msgstr "" + +#: menu.c:584 pattern.c:996 +msgid "Search for: " +msgstr "" + +#: menu.c:585 +msgid "Reverse search for: " +msgstr "" + +#: menu.c:596 pattern.c:1029 +msgid "No search pattern." +msgstr "" + +#: menu.c:626 pager.c:1657 pager.c:1673 pager.c:1760 pattern.c:1094 +msgid "Not found." +msgstr "" + +#: menu.c:764 +msgid "Search is not implemented for this menu." +msgstr "" + +#: menu.c:802 +msgid "Tagging is not supported." +msgstr "" + +#: mh.c:59 +#, c-format +msgid "Reading %s... %d" +msgstr "" + +#: mh.c:216 +msgid "mh_parse_sequences: Unable to allocate hash table!\n" +msgstr "" + +#: mh.c:247 +#, c-format +msgid "Cannot open %s" +msgstr "" + +#: mh.c:299 +#, c-format +msgid "Folder %s: %d unread" +msgstr "" + +#: mh.c:652 +#, c-format +msgid "fopen %s failed" +msgstr "" + +#: mx.c:113 +#, c-format +msgid "Lock count exceeded, remove lock for %s?" +msgstr "" + +#: mx.c:177 +msgid "Timeout exceeded while attempting fcntl lock!" +msgstr "" + +#: mx.c:183 +#, c-format +msgid "Waiting for fcntl lock... %d" +msgstr "" + +#: mx.c:211 +msgid "Timeout exceeded while attempting flock lock!" +msgstr "" + +#: mx.c:218 +#, c-format +msgid "Waiting for flock attempt... %d" +msgstr "" + +#: mx.c:586 +#, c-format +msgid "Reading %s..." +msgstr "" + +#: mx.c:673 +#, c-format +msgid "Writing %s..." +msgstr "" + +#: mx.c:753 +#, c-format +msgid "Move read messages to %s?" +msgstr "" + +#: mx.c:762 mx.c:872 +#, c-format +msgid "Purge %d deleted message?" +msgstr "" + +#: mx.c:762 mx.c:872 +#, c-format +msgid "Purge %d deleted messages?" +msgstr "" + +#: mx.c:782 +#, c-format +msgid "Moving read messages to %s..." +msgstr "" + +#: mx.c:798 mx.c:863 +msgid "Mailbox is unchanged." +msgstr "" + +#: mx.c:817 +#, c-format +msgid "%d kept, %d moved, %d deleted." +msgstr "" + +#: mx.c:820 mx.c:888 +#, c-format +msgid "%d kept, %d deleted." +msgstr "" + +#: mx.c:848 +#, c-format +msgid " Press '%s' to toggle write" +msgstr "" + +#: mx.c:850 +msgid "Use 'toggle-write' to re-enable write!" +msgstr "" + +#: mx.c:852 +#, c-format +msgid "Mailbox is marked unwritable. %s" +msgstr "" + +#: mx.c:857 +msgid "Mailbox is read-only." +msgstr "" + +#: mx.c:1136 +msgid "Reopening mailbox..." +msgstr "" + +#: pager.c:1340 pgpkey.c:180 +msgid "Help" +msgstr "" + +#. emulate "less -q" and don't go on to the next message. +#: pager.c:1569 pager.c:1600 pager.c:1629 pager.c:1848 +msgid "Bottom of message is shown." +msgstr "" + +#: pager.c:1585 pager.c:1607 pager.c:1618 +msgid "Top of message is shown." +msgstr "" + +#: pager.c:1691 +msgid "Reverse search: " +msgstr "" + +#: pager.c:1692 +msgid "Search: " +msgstr "" + +#: pager.c:1786 +msgid "Help is currently being shown." +msgstr "" + +#: pager.c:1815 +msgid "No more quoted text." +msgstr "" + +#: pager.c:1828 +msgid "No more unquoted text after quoted text." +msgstr "" + +#: parse.c:476 +msgid "multipart message has no boundary parameter!" +msgstr "" + +#: pattern.c:226 +#, c-format +msgid "Error in expression: %s" +msgstr "" + +#: pattern.c:322 +#, c-format +msgid "Invalid day of month: %s" +msgstr "" + +#: pattern.c:336 +#, c-format +msgid "Invalid month: %s" +msgstr "" + +#: pattern.c:390 +msgid "error in expression" +msgstr "" + +#: pattern.c:570 pattern.c:673 +#, c-format +msgid "error in pattern at: %s" +msgstr "" + +#: pattern.c:615 +#, c-format +msgid "%c: invalid command" +msgstr "" + +#: pattern.c:621 +#, c-format +msgid "%c: not supported in this mode" +msgstr "" + +#: pattern.c:634 +msgid "missing parameter" +msgstr "" + +#: pattern.c:650 +#, c-format +msgid "mismatched parenthesis: %s" +msgstr "" + +#: pattern.c:680 +msgid "empty pattern" +msgstr "" + +#: pattern.c:823 +#, c-format +msgid "error: unknown op %d (report this error)." +msgstr "" + +#: pattern.c:887 pattern.c:1015 +msgid "Compiling search pattern..." +msgstr "" + +#: pattern.c:901 +msgid "Executing command on matching messages..." +msgstr "" + +#: pattern.c:958 +msgid "No messages matched criteria." +msgstr "" + +#: pattern.c:1053 +msgid "Search hit bottom without finding match" +msgstr "" + +#: pattern.c:1064 +msgid "Search hit top without finding match" +msgstr "" + +#: pattern.c:1086 +msgid "Search interrupted." +msgstr "" + +#: pgp.c:130 +msgid "Enter PGP passphrase:" +msgstr "" + +#: pgp.c:146 +msgid "PGP passphrase forgotten." +msgstr "" + +#: pgp.c:174 +#, c-format +msgid "Unknown PGP version \"%s\"." +msgstr "" + +#: pgp.c:207 +msgid "[-- PGP output follows (current time: " +msgstr "" + +#: pgp.c:320 +msgid "[-- Error: unable to create PGP subprocess! --]\n" +msgstr "" + +#: pgp.c:347 +msgid "" +"\n" +"[-- End of PGP output --]\n" +"\n" +msgstr "" + +#: pgp.c:476 +msgid "" +"[-- Error: could not find beginning of PGP message! --]\n" +"\n" +msgstr "" + +#: pgp.c:669 pgp.c:894 +msgid "" +"[-- End of PGP output --]\n" +"\n" +msgstr "" + +#. Now display the signed body +#: pgp.c:676 +msgid "" +"[-- The following data is PGP/MIME signed --]\n" +"\n" +msgstr "" + +#: pgp.c:682 +msgid "" +"\n" +"[-- End of PGP/MIME signed data --]\n" +msgstr "" + +#: pgp.c:687 +msgid "" +"[-- Error: this message does not comply with the PGP/MIME specification! " +"--]\n" +"\n" +msgstr "" + +#: pgp.c:801 +msgid "Internal error. Inform ." +msgstr "" + +#: pgp.c:865 +msgid "" +"[-- Error: could not create a PGP subprocess! --]\n" +"\n" +msgstr "" + +#: pgp.c:967 +msgid "" +"[-- Error: malformed PGP/MIME message! --]\n" +"\n" +msgstr "" + +#: pgp.c:980 +msgid "[-- Error: could not create temporary file! --]\n" +msgstr "" + +#: pgp.c:989 +msgid "" +"[-- The following data is PGP/MIME encrypted --]\n" +"\n" +msgstr "" + +#: pgp.c:997 +msgid "" +"\n" +"[-- End of PGP/MIME encrypted data --]\n" +msgstr "" + +#: pgp.c:1080 +msgid "Can't open PGP subprocess!" +msgstr "" + +#: pgp.c:1214 +#, c-format +msgid "Use keyID = \"%s\" for %s?" +msgstr "" + +#: pgp.c:1220 +#, c-format +msgid "Enter keyID for %s: " +msgstr "" + +#: pgpkey.c:173 +msgid "Exit " +msgstr "" + +#: pgpkey.c:175 +msgid "Select " +msgstr "" + +#: pgpkey.c:178 +msgid "Check key " +msgstr "" + +#: pgpkey.c:191 +msgid "PGP keys matching " +msgstr "" + +#: pgpkey.c:210 pgpkey.c:387 +msgid "Can't open /dev/null" +msgstr "" + +#: pgpkey.c:216 pgpkey.c:381 +msgid "Can't create temporary file" +msgstr "" + +#: pgpkey.c:226 pgpkey.c:398 +msgid "Can't create filter" +msgstr "" + +#: pgpkey.c:236 +#, c-format +msgid "Key ID: 0x%s" +msgstr "" + +#: pgpkey.c:257 +msgid "This ID's trust level is undefined." +msgstr "" + +#: pgpkey.c:258 +msgid "This ID is not trusted." +msgstr "" + +#: pgpkey.c:259 +msgid "This ID is only marginally trusted." +msgstr "" + +#: pgpkey.c:262 +#, c-format +msgid "%s Do you really want to use it?" +msgstr "" + +#: pgpkey.c:369 +msgid "Please enter the key ID: " +msgstr "" + +#: pgpkey.c:416 +#, c-format +msgid "PGP Key 0x%s." +msgstr "" + +#: pgppubring.c:58 +msgid "reserved" +msgstr "" + +#: pgppubring.c:59 +msgid "Encrypted Session Key" +msgstr "" + +#: pgppubring.c:60 +msgid "Signature Packet" +msgstr "" + +#: pgppubring.c:61 +msgid "Conventionally Encrypted Session Key Packet" +msgstr "" + +#: pgppubring.c:62 +msgid "One-Pass Signature Packet" +msgstr "" + +#: pgppubring.c:63 +msgid "Secret Key Packet" +msgstr "" + +#: pgppubring.c:64 +msgid "Public Key Packet" +msgstr "" + +#: pgppubring.c:65 +msgid "Secret Subkey Packet" +msgstr "" + +#: pgppubring.c:66 +msgid "Compressed Data Packet" +msgstr "" + +#: pgppubring.c:67 +msgid "Symmetrically Encrypted Data Packet" +msgstr "" + +#: pgppubring.c:68 +msgid "Marker Packet" +msgstr "" + +#: pgppubring.c:69 +msgid "Literal Data Packet" +msgstr "" + +#: pgppubring.c:70 +msgid "Trust Packet" +msgstr "" + +#: pgppubring.c:71 +msgid "Name Packet" +msgstr "" + +#: pgppubring.c:72 +msgid "Subkey Packet" +msgstr "" + +#: pgppubring.c:73 +msgid "Reserved" +msgstr "" + +#: pgppubring.c:74 +msgid "Comment Packet" +msgstr "" + +#: pop.c:66 +msgid "POP Password: " +msgstr "" + +#: pop.c:91 +msgid "POP host is not defined." +msgstr "" + +#: pop.c:97 +msgid "No POP username is defined." +msgstr "" + +#: pop.c:114 +#, c-format +msgid "Could not find address for host %s." +msgstr "" + +#: pop.c:122 +#, c-format +msgid "Connecting to %s" +msgstr "" + +#: pop.c:166 pop.c:317 +msgid "Server closed connection!" +msgstr "" + +#: pop.c:187 +msgid "No new mail in POP mailbox." +msgstr "" + +#: pop.c:231 +msgid "Error reading message!" +msgstr "" + +#: pop.c:267 +msgid "Error while writing mailbox!" +msgstr "" + +#: pop.c:291 +#, c-format +msgid "%s [%d messages read]" +msgstr "" + +#: postpone.c:111 +msgid "Postponed Messages" +msgstr "" + +#: postpone.c:182 postpone.c:191 +msgid "No postponed messages." +msgstr "" + +#: postpone.c:319 postpone.c:339 postpone.c:348 +msgid "Illegal PGP header" +msgstr "" + +#: query.c:91 +msgid "Waiting for response..." +msgstr "" + +#: query.c:192 query.c:217 +msgid "Query command not defined." +msgstr "" + +#: query.c:243 +msgid "Query" +msgstr "" + +#. Prompt for Query +#: query.c:256 query.c:284 +msgid "Query: " +msgstr "" + +#: query.c:267 query.c:293 +#, c-format +msgid "Query '%s'" +msgstr "" + +#: recvattach.c:309 +msgid "Saving..." +msgstr "" + +#: recvattach.c:370 +msgid "Attachment saved" +msgstr "" + +#: recvattach.c:382 +#, c-format +msgid "WARNING! You are about to overwrite %s, continue?" +msgstr "" + +#: recvattach.c:400 +msgid "Attachment filtered." +msgstr "" + +#: recvattach.c:466 +msgid "Filter through: " +msgstr "" + +#: recvattach.c:466 +msgid "Pipe to: " +msgstr "" + +#: recvattach.c:501 +#, c-format +msgid "I dont know how to print %s attachments!" +msgstr "" + +#: recvattach.c:564 +msgid "Print tagged attachment(s)?" +msgstr "" + +#: recvattach.c:564 +msgid "Print attachment?" +msgstr "" + +#: recvattach.c:592 +msgid "You may only bounce message/rfc822 parts." +msgstr "" + +#: recvattach.c:625 +#, c-format +msgid "Bounce messages to %s...?" +msgstr "" + +#: recvattach.c:626 +#, c-format +msgid "Bounce message to %s...?" +msgstr "" + +#: recvattach.c:843 +msgid "Attachments" +msgstr "" + +#: recvattach.c:898 +msgid "Only deletion of multipart attachments is supported." +msgstr "" + +#: recvattach.c:906 +msgid "Deletion of attachments from PGP messages is unsupported." +msgstr "" + +#: recvattach.c:981 +msgid "This operation is not currently supported for PGP messages." +msgstr "" + +#: rfc1524.c:157 +#, c-format +msgid "Improperly formated entry for type %s in \"%s\" line %d" +msgstr "" + +#: rfc1524.c:389 +msgid "No mailcap path specified" +msgstr "" + +#: rfc1524.c:415 +#, c-format +msgid "mailcap entry for type %s not found" +msgstr "" + +#: score.c:71 +msgid "score: too few arguments" +msgstr "" + +#: score.c:80 +msgid "score: too many arguments" +msgstr "" + +#: send.c:229 +msgid "No subject, abort?" +msgstr "" + +#: send.c:231 +msgid "No subject, aborting." +msgstr "" + +#. There are quite a few mailing lists which set the Reply-To: +#. * header field to the list address, which makes it quite impossible +#. * to send a message to only the sender of the message. This +#. * provides a way to do that. +#. +#: send.c:429 +#, c-format +msgid "Reply to %s?" +msgstr "" + +#. This could happen if the user tagged some messages and then did +#. * a limit such that none of the tagged message are visible. +#. +#: send.c:510 +msgid "No tagged messages are visible!" +msgstr "" + +#: send.c:535 +msgid "No mailing lists found!" +msgstr "" + +#: send.c:622 +msgid "Include message in reply?" +msgstr "" + +#: send.c:636 +msgid "Could not include all requested messages!" +msgstr "" + +#: send.c:649 +msgid "Forward MIME encapsulated?" +msgstr "" + +#. If the user is composing a new message, check to see if there +#. * are any postponed messages first. +#. +#: send.c:888 +msgid "Recall postponed message?" +msgstr "" + +#: send.c:1091 +msgid "Abort unmodified message?" +msgstr "" + +#: send.c:1093 +msgid "Aborted unmodified message." +msgstr "" + +#. abort +#: send.c:1131 +msgid "Mail not sent." +msgstr "" + +#: send.c:1144 +msgid "Message postponed." +msgstr "" + +#: send.c:1153 +msgid "No recipients are specified!" +msgstr "" + +#: send.c:1158 +msgid "No recipients were specified." +msgstr "" + +#: send.c:1164 +msgid "No subject, abort sending?" +msgstr "" + +#: send.c:1168 +msgid "No subject specified." +msgstr "" + +#: send.c:1207 +msgid "Message edited. Really send?" +msgstr "" + +#: send.c:1213 +msgid "Sending message..." +msgstr "" + +#: send.c:1313 +msgid "Mail sent." +msgstr "" + +#: sendlib.c:452 +msgid "No boundary parameter found! [report this error]" +msgstr "" + +#: sendlib.c:486 +#, c-format +msgid "%s no longer exists!" +msgstr "" + +#: sendlib.c:725 +#, c-format +msgid "Could not open %s" +msgstr "" + +#: sendlib.c:1651 +#, c-format +msgid "Error sending message, child exited %d (%s).\n" +msgstr "" + +#: sendlib.c:1653 +#, c-format +msgid "Saved output of child process to %s.\n" +msgstr "" + +#: sendlib.c:1657 +msgid "Error sending message." +msgstr "" + +#: signal.c:38 signal.c:41 +#, c-format +msgid "Caught %s... Exiting.\n" +msgstr "" + +#: signal.c:43 +#, c-format +msgid "Caught signal %d... Exiting.\n" +msgstr "" + +#: sort.c:198 +msgid "Sorting mailbox..." +msgstr "" + +#: sort.c:226 +msgid "Could not find sorting function! [report this bug]" +msgstr "" + +#: status.c:101 +msgid "(no mailbox)" +msgstr "" diff --git a/po/mutt.pot b/po/mutt.pot new file mode 100644 index 00000000..8dc440ce --- /dev/null +++ b/po/mutt.pot @@ -0,0 +1,2595 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 1998-10-01 09:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" + +#: addrbook.c:131 +msgid "You have no aliases!" +msgstr "" + +#: addrbook.c:143 +msgid "Aliases" +msgstr "" + +#. add a new alias +#: alias.c:192 +msgid "Alias as: " +msgstr "" + +#: alias.c:198 +msgid "You already have an alias defined with that name!" +msgstr "" + +#: alias.c:212 +msgid "Address: " +msgstr "" + +#: alias.c:228 +msgid "Personal name: " +msgstr "" + +#: alias.c:237 +#, c-format +msgid "[%s = %s] Accept?" +msgstr "" + +#: alias.c:254 recvattach.c:282 recvattach.c:337 +msgid "Save to file: " +msgstr "" + +#: alias.c:265 +msgid "Alias added." +msgstr "" + +#: attach.c:111 attach.c:234 attach.c:366 attach.c:813 +msgid "Can't match nametemplate, continue?" +msgstr "" + +#. For now, editing requires a file, no piping +#: attach.c:123 +msgid "Mailcap compose entry requires %%s" +msgstr "" + +#: attach.c:137 +msgid "Failure to open file to parse headers." +msgstr "" + +#: attach.c:168 +msgid "Failure to open file to strip headers." +msgstr "" + +#: attach.c:186 +#, c-format +msgid "No mailcap compose entry for %s, creating empty file." +msgstr "" + +#. For now, editing requires a file, no piping +#: attach.c:246 +msgid "Mailcap Edit entry requires %%s" +msgstr "" + +#: attach.c:264 +#, c-format +msgid "No mailcap edit entry for %s" +msgstr "" + +#: attach.c:332 +msgid "No matching mailcap entry found. Viewing as text." +msgstr "" + +#: attach.c:345 +msgid "MIME type not defined. Cannot view attachment." +msgstr "" + +#: attach.c:436 +msgid "Cannot create filter" +msgstr "" + +#: attach.c:642 recvattach.c:312 +msgid "Attachment saved." +msgstr "" + +#: attach.c:695 +msgid "Write fault!" +msgstr "" + +#: attach.c:897 +msgid "I don't know how to print that!" +msgstr "" + +#: browser.c:344 browser.c:669 +#, c-format +msgid "%s is not a directory." +msgstr "" + +#: browser.c:447 +#, c-format +msgid "Mailboxes [%d]" +msgstr "" + +#: browser.c:452 +#, c-format +msgid "Directory [%s], File mask: %s" +msgstr "" + +#: browser.c:536 browser.c:726 browser.c:816 +msgid "No files match the file mask" +msgstr "" + +#: browser.c:643 +msgid "Chdir to: " +msgstr "" + +#: browser.c:662 browser.c:719 +msgid "Error scanning directory." +msgstr "" + +#: browser.c:680 +msgid "File Mask: " +msgstr "" + +#: browser.c:744 +msgid "Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? " +msgstr "" + +#: browser.c:746 +msgid "Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? " +msgstr "" + +#: browser.c:803 +msgid "New file name: " +msgstr "" + +#: browser.c:824 +msgid "Can't view a directory" +msgstr "" + +#: browser.c:842 +msgid "Error trying to view file" +msgstr "" + +#: buffy.c:368 +#, c-format +msgid "New mail in %s." +msgstr "" + +#: color.c:306 +#, c-format +msgid "%s: color not supported by term" +msgstr "" + +#: color.c:312 +#, c-format +msgid "%s: no such color" +msgstr "" + +#: color.c:358 color.c:541 color.c:552 +#, c-format +msgid "%s: no such object" +msgstr "" + +#: color.c:365 +#, c-format +msgid "%s: command valid only for index object" +msgstr "" + +#: color.c:373 +#, c-format +msgid "%s: too few arguments" +msgstr "" + +#: color.c:529 +msgid "Missing arguments." +msgstr "" + +#: color.c:568 color.c:579 +msgid "color: too few arguments" +msgstr "" + +#: color.c:602 +msgid "mono: too few arguments" +msgstr "" + +#: color.c:622 +#, c-format +msgid "%s: no such attribute" +msgstr "" + +#: color.c:662 hook.c:61 hook.c:69 keymap.c:557 +msgid "too few arguments" +msgstr "" + +#: color.c:671 hook.c:75 +msgid "too many arguments" +msgstr "" + +#: color.c:685 +msgid "default colors not supported" +msgstr "" + +#: commands.c:122 +msgid "Display message using mailcap?" +msgstr "" + +#: commands.c:153 commands.c:161 pgpkey.c:220 +msgid "Invoking PGP..." +msgstr "" + +#. find out whether or not the verify signature +#: commands.c:158 +msgid "Verify PGP signature?" +msgstr "" + +#: commands.c:176 mbox.c:695 +msgid "Could not create temporary file!" +msgstr "" + +#: commands.c:224 +msgid "Command: " +msgstr "" + +#: commands.c:257 +msgid "Error parsing address!" +msgstr "" + +#: commands.c:267 +#, c-format +msgid "Bounce message to %s" +msgstr "" + +#: commands.c:267 +#, c-format +msgid "Bounce messages to %s" +msgstr "" + +#: commands.c:278 +msgid "Message bounced." +msgstr "" + +#: commands.c:278 +msgid "Messages bounced." +msgstr "" + +#: commands.c:298 +msgid "Pipe to command: " +msgstr "" + +#: commands.c:403 +msgid "" +"Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: " +msgstr "" + +#: commands.c:404 +msgid "" +"Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: " +msgstr "" + +#: commands.c:459 +msgid "Shell command: " +msgstr "" + +#: commands.c:575 +#, c-format +msgid "%s%s to mailbox" +msgstr "" + +#: commands.c:576 +msgid "Decode-save" +msgstr "" + +#: commands.c:576 +msgid "Decode-copy" +msgstr "" + +#: commands.c:577 +msgid "Decrypt-save" +msgstr "" + +#: commands.c:577 +msgid "Decrypt-copy" +msgstr "" + +#: commands.c:578 +msgid "Save" +msgstr "" + +#: commands.c:578 +msgid "Copy" +msgstr "" + +#: commands.c:578 +msgid " tagged" +msgstr "" + +#: commands.c:647 +#, c-format +msgid "Copying to %s..." +msgstr "" + +#: commands.c:719 +msgid "Print message?" +msgstr "" + +#: commands.c:719 +msgid "Print tagged messages?" +msgstr "" + +#: commands.c:746 +msgid "Message printed" +msgstr "" + +#: commands.c:746 +msgid "Messages printed" +msgstr "" + +#: compose.c:97 +msgid "" +"(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget " +"it? " +msgstr "" + +#: compose.c:112 +msgid "Can't open your secret key ring!" +msgstr "" + +#: compose.c:117 +msgid "Sign as: " +msgstr "" + +#: compose.c:136 +msgid "An unkown PGP version was defined for signing." +msgstr "" + +#: compose.c:142 +msgid "This doesn't make sense if you don't want to sign the message." +msgstr "" + +#: compose.c:148 compose.c:284 +msgid "MIC algorithm: " +msgstr "" + +#: compose.c:153 +msgid "Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160" +msgstr "" + +#: compose.c:197 +#, c-format +msgid "%s [#%d] no longer exists!" +msgstr "" + +#: compose.c:205 +#, c-format +msgid "%s [#%d] modified. Update encoding?" +msgstr "" + +#: compose.c:267 +msgid "Sign, Encrypt" +msgstr "" + +#: compose.c:269 +msgid "Encrypt" +msgstr "" + +#: compose.c:271 +msgid "Sign" +msgstr "" + +#: compose.c:273 +msgid "Clear" +msgstr "" + +#: compose.c:278 +msgid " sign as: " +msgstr "" + +#: compose.c:282 +msgid "" +msgstr "" + +#: compose.c:373 +msgid "You may not delete the only attachment." +msgstr "" + +#: compose.c:447 +msgid "Compose" +msgstr "" + +#: compose.c:603 +msgid "Attach file" +msgstr "" + +#: compose.c:608 +msgid "Open mailbox to attach message from" +msgstr "" + +#: compose.c:647 +msgid "No messages in that folder." +msgstr "" + +#: compose.c:685 compose.c:705 +msgid "Unable to attach!" +msgstr "" + +#: compose.c:813 +msgid "Invalid encoding." +msgstr "" + +#: compose.c:828 +msgid "Save a copy of this message?" +msgstr "" + +#: compose.c:873 +msgid "Rename to: " +msgstr "" + +#: compose.c:878 +#, c-format +msgid "Can't stat: %s" +msgstr "" + +#: compose.c:905 +msgid "New file: " +msgstr "" + +#: compose.c:918 +msgid "Content-Type is of the form base/sub" +msgstr "" + +#: compose.c:924 +#, c-format +msgid "Unknown Content-Type %s" +msgstr "" + +#: compose.c:937 +#, c-format +msgid "Can't create file %s" +msgstr "" + +#: compose.c:945 +msgid "What we have here is a failure to make an attachment" +msgstr "" + +#: compose.c:1017 +msgid "Postpone this message?" +msgstr "" + +#: compose.c:1064 +msgid "Write message to mailbox" +msgstr "" + +#: compose.c:1068 +#, c-format +msgid "Writing message to %s ..." +msgstr "" + +#: compose.c:1079 +msgid "Message written." +msgstr "" + +#: copy.c:567 +msgid "Confused when attempting to delete attachment, h & m can't be NULL" +msgstr "" + +#: copy.c:582 +msgid "Deleting non-multipart messages not yet supported" +msgstr "" + +#. restore blocking operation +#: curs_lib.c:167 +msgid "Exit Mutt?" +msgstr "" + +#: curs_lib.c:242 +msgid "unknown error" +msgstr "" + +#: curs_lib.c:262 +msgid "Press any key to continue..." +msgstr "" + +#: curs_lib.c:300 +msgid " ('?' for list): " +msgstr "" + +#: curs_main.c:201 +msgid "Cannot toggle write on a readonly mailbox!" +msgstr "" + +#: curs_main.c:208 +msgid "Changes to folder will be written on folder exit." +msgstr "" + +#: curs_main.c:213 +msgid "Changes to folder will not be written." +msgstr "" + +#: curs_main.c:390 +msgid "Mailbox was externally modified. Flags may be wrong." +msgstr "" + +#: curs_main.c:393 +msgid "New mail in this mailbox." +msgstr "" + +#: curs_main.c:455 +#, c-format +msgid "Folder: %s Tagged messages will be attached upon exiting" +msgstr "" + +#: curs_main.c:514 +msgid "No mailbox is open." +msgstr "" + +#: curs_main.c:520 +msgid "No tagged messages." +msgstr "" + +#: curs_main.c:600 +msgid "Jump to message: " +msgstr "" + +#: curs_main.c:606 +msgid "Argument must be a message number." +msgstr "" + +#: curs_main.c:639 +msgid "That message is not visible." +msgstr "" + +#: curs_main.c:642 +msgid "Invalid message number." +msgstr "" + +#: curs_main.c:654 +msgid "Delete messages matching: " +msgstr "" + +#: curs_main.c:675 +msgid "No limit pattern is in effect." +msgstr "" + +#. i18n: ask for a limit to apply +#: curs_main.c:680 +#, c-format +msgid "Limit: %s" +msgstr "" + +#: curs_main.c:689 +msgid "Limit to messages matching: " +msgstr "" + +#: curs_main.c:719 +msgid "Quit Mutt?" +msgstr "" + +#: curs_main.c:830 +msgid "Tag messages matching: " +msgstr "" + +#: curs_main.c:838 +msgid "Undelete messages matching: " +msgstr "" + +#: curs_main.c:845 +msgid "Untag messages matching: " +msgstr "" + +#: curs_main.c:863 +msgid "Open mailbox" +msgstr "" + +#: curs_main.c:865 +msgid "Open mailbox in read-only mode" +msgstr "" + +#: curs_main.c:881 mx.c:420 mx.c:561 +#, c-format +msgid "%s is not a mailbox." +msgstr "" + +#: curs_main.c:977 +msgid "Exit Mutt without saving?" +msgstr "" + +#: curs_main.c:987 curs_main.c:1011 +msgid "You are on the last message." +msgstr "" + +#: curs_main.c:994 curs_main.c:1036 +msgid "No undeleted messages." +msgstr "" + +#: curs_main.c:1029 curs_main.c:1052 +msgid "You are on the first message." +msgstr "" + +#: curs_main.c:1125 pattern.c:1050 +msgid "Search wrapped to top." +msgstr "" + +#: curs_main.c:1134 pattern.c:1061 +msgid "Search wrapped to bottom." +msgstr "" + +#: curs_main.c:1160 +msgid "No new messages" +msgstr "" + +#: curs_main.c:1160 +msgid "No unread messages" +msgstr "" + +#: curs_main.c:1161 +msgid " in this limited view" +msgstr "" + +#: curs_main.c:1271 +msgid "No more threads." +msgstr "" + +#: curs_main.c:1273 +msgid "You are on the first thread." +msgstr "" + +#: curs_main.c:1326 +msgid "Thread contains unread messages." +msgstr "" + +#: curs_main.c:1339 flags.c:217 thread.c:628 +msgid "Threading is not enabled." +msgstr "" + +#: date.c:48 +msgid "Please report this program error in the function mutt_mktime." +msgstr "" + +#. +#. * SLcurses_waddnstr() can't take a "const char *", so this is only +#. * declared "static" (sigh) +#. +#: edit.c:36 +msgid "" +"~~\t\tinsert a line begining with a single ~\n" +"~b users\tadd users to the Bcc: field\n" +"~c users\tadd users to the Cc: field\n" +"~f messages\tinclude messages\n" +"~F messages\tsame as ~f, except also include headers\n" +"~h\t\tedit the message header\n" +"~m messages\tinclude and quote messages\n" +"~M messages\tsame as ~m, except include headers\n" +"~p\t\tprint the message\n" +"~q\t\twrite file and quit editor\n" +"~r file\t\tread a file into the editor\n" +"~t users\tadd users to the To: field\n" +"~u\t\trecall the previous line\n" +"~v\t\tedit message with the $visual editor\n" +"~w file\t\twrite message to file\n" +"~x\t\tabort changes and quit editor\n" +"~?\t\tthis message\n" +".\t\ton a line by itself ends input\n" +msgstr "" + +#: edit.c:178 +#, c-format +msgid "%d: invalid message number.\n" +msgstr "" + +#: edit.c:312 +msgid "(End message with a . on a line by itself)\n" +msgstr "" + +#: edit.c:370 +msgid "No mailbox.\n" +msgstr "" + +#: edit.c:374 +msgid "Message contains:\n" +msgstr "" + +#: edit.c:378 edit.c:430 +msgid "(continue)\n" +msgstr "" + +#: edit.c:391 +msgid "missing filename.\n" +msgstr "" + +#: edit.c:412 +msgid "No lines in message.\n" +msgstr "" + +#: edit.c:441 +#, c-format +msgid "%s: unknown editor command (~? for help)\n" +msgstr "" + +#: flags.c:254 +#, c-format +msgid "Set %s flag" +msgstr "" + +#: flags.c:255 +#, c-format +msgid "Clear %s flag" +msgstr "" + +#: headers.c:201 +#, c-format +msgid "%s: unable to attach file" +msgstr "" + +#: help.c:185 +msgid "ERROR: please report this bug" +msgstr "" + +#: help.c:232 +msgid "" +msgstr "" + +#: help.c:237 +msgid "" +"\n" +"Generic bindings:\n" +"\n" +msgstr "" + +#: help.c:241 +msgid "" +"\n" +"Unbound functions:\n" +"\n" +msgstr "" + +#: help.c:249 +#, c-format +msgid "Help for %s" +msgstr "" + +#: imap.c:100 +#, c-format +msgid "imap_error(): unexpected response in %s: %s\n" +msgstr "" + +#. something is wrong because the server reported fewer messages +#. * than we previously saw +#. +#: imap.c:353 +msgid "Fatal error. Message count is out of sync!" +msgstr "" + +#: imap.c:428 +#, c-format +msgid "Fetching message headers... [%d/%d]" +msgstr "" + +#: imap.c:662 +#, c-format +msgid "Connecting to %s..." +msgstr "" + +#: imap.c:681 +msgid "IMAP Username: " +msgstr "" + +#: imap.c:694 +#, c-format +msgid "Password for %s@%s: " +msgstr "" + +#: imap.c:707 +msgid "Logging in..." +msgstr "" + +#: imap.c:759 +#, c-format +msgid "Selecting %s..." +msgstr "" + +#: imap.c:854 lib.c:1164 +#, c-format +msgid "Create %s?" +msgstr "" + +#: imap.c:898 +msgid "Fetching message..." +msgstr "" + +#: imap.c:1006 +msgid "Sending APPEND command ..." +msgstr "" + +#: imap.c:1044 +msgid "Uploading message ..." +msgstr "" + +#: imap.c:1099 +msgid "Closing connection to IMAP server..." +msgstr "" + +#: imap.c:1128 +#, c-format +msgid "Saving message status flags... [%d/%d]" +msgstr "" + +#: imap.c:1154 +msgid "Expunging messages from server..." +msgstr "" + +#. tell the server to commit changes +#: imap.c:1205 +msgid "Closing mailbox..." +msgstr "" + +#: imap.c:1306 +msgid "BUG! Untagged IMAP Response during BUFFY Check" +msgstr "" + +#: init.c:431 +msgid "alias: no address" +msgstr "" + +#: init.c:525 +msgid "invalid header field" +msgstr "" + +#: init.c:533 +#, c-format +msgid "ignoring empty header field: %s" +msgstr "" + +#: init.c:585 +#, c-format +msgid "%s: unknown sorting method" +msgstr "" + +#: init.c:658 +#, c-format +msgid "mutt_restore_default: error in regexp: %s\n" +msgstr "" + +#: init.c:718 +#, c-format +msgid "%s: unknown variable" +msgstr "" + +#: init.c:727 +msgid "prefix is illegal with reset" +msgstr "" + +#: init.c:733 +msgid "value is illegal with reset" +msgstr "" + +#: init.c:750 +#, c-format +msgid "%s is a boolean var!" +msgstr "" + +#: init.c:757 +#, c-format +msgid "%s is set" +msgstr "" + +#: init.c:757 +#, c-format +msgid "%s is unset" +msgstr "" + +#: init.c:910 +#, c-format +msgid "%s: invalid mailbox type" +msgstr "" + +#: init.c:969 +#, c-format +msgid "%s: invalid value" +msgstr "" + +#: init.c:1019 +#, c-format +msgid "%s: unknown type" +msgstr "" + +#: init.c:1068 +#, c-format +msgid "Error in %s, line %d: %s" +msgstr "" + +#. the muttrc source keyword +#: init.c:1079 +#, c-format +msgid "source: errors in %s" +msgstr "" + +#: init.c:1089 +#, c-format +msgid "source: error at %s" +msgstr "" + +#: init.c:1094 +msgid "source: too many arguments" +msgstr "" + +#: init.c:1145 +#, c-format +msgid "%s: unknown command" +msgstr "" + +#: init.c:1424 +#, c-format +msgid "Error in command line: %s\n" +msgstr "" + +#: init.c:1467 +msgid "unable to determine home directory" +msgstr "" + +#: init.c:1475 +msgid "unable to determine username" +msgstr "" + +#: keymap.c:312 +msgid "Macro loop detected." +msgstr "" + +#: keymap.c:507 +#, c-format +msgid "Key is not bound. Press '%s' for help." +msgstr "" + +#: keymap.c:509 +msgid "Key is not bound. See the manual." +msgstr "" + +#: keymap.c:519 +msgid "push: too many arguments" +msgstr "" + +#: keymap.c:540 +#, c-format +msgid "%s: no such menu" +msgstr "" + +#: keymap.c:549 +msgid "null key sequence" +msgstr "" + +#: keymap.c:627 +msgid "bind: too many arguments" +msgstr "" + +#: keymap.c:642 +#, c-format +msgid "%s: no such function in map" +msgstr "" + +#: keymap.c:665 +msgid "macro: empty key sequence" +msgstr "" + +#: keymap.c:676 +msgid "macro: too many arguments" +msgstr "" + +#: keymap_defs.h:5 +msgid "null operation" +msgstr "" + +#: keymap_defs.h:6 +msgid "force viewing of attachment using mailcap" +msgstr "" + +#: keymap_defs.h:7 +msgid "view attachment as text" +msgstr "" + +#: keymap_defs.h:8 +msgid "move to the bottom of the page" +msgstr "" + +#: keymap_defs.h:9 +msgid "remail a message to another user" +msgstr "" + +#: keymap_defs.h:10 +msgid "select a new file in this directory" +msgstr "" + +#: keymap_defs.h:11 +msgid "view file" +msgstr "" + +#: keymap_defs.h:12 +msgid "display the currently selected file's name" +msgstr "" + +#: keymap_defs.h:13 +msgid "change directories" +msgstr "" + +#: keymap_defs.h:14 +msgid "check mailboxes for new mail" +msgstr "" + +#: keymap_defs.h:15 +msgid "attach a file(s) to this message" +msgstr "" + +#: keymap_defs.h:16 +msgid "attach message(s) to this message" +msgstr "" + +#: keymap_defs.h:17 +msgid "edit the BCC list" +msgstr "" + +#: keymap_defs.h:18 +msgid "edit the CC list" +msgstr "" + +#: keymap_defs.h:19 +msgid "edit attachment description" +msgstr "" + +#: keymap_defs.h:20 +msgid "edit attachment transfer-encoding" +msgstr "" + +#: keymap_defs.h:21 +msgid "enter a file to save a copy of this message in" +msgstr "" + +#: keymap_defs.h:22 +msgid "edit the file to be attached" +msgstr "" + +#: keymap_defs.h:23 +msgid "edit the from field" +msgstr "" + +#: keymap_defs.h:24 +msgid "edit the message with headers" +msgstr "" + +#: keymap_defs.h:25 +msgid "edit the message" +msgstr "" + +#: keymap_defs.h:26 +msgid "edit attachment using mailcap entry" +msgstr "" + +#: keymap_defs.h:27 +msgid "edit the Reply-To field" +msgstr "" + +#: keymap_defs.h:28 +msgid "edit the subject of this message" +msgstr "" + +#: keymap_defs.h:29 +msgid "edit the TO list" +msgstr "" + +#: keymap_defs.h:30 +msgid "edit attachment type" +msgstr "" + +#: keymap_defs.h:31 +msgid "get a temporary copy of an attachment" +msgstr "" + +#: keymap_defs.h:32 +msgid "run ispell on the message" +msgstr "" + +#: keymap_defs.h:33 +msgid "compose new attachment using mailcap entry" +msgstr "" + +#: keymap_defs.h:34 +msgid "save this message to send later" +msgstr "" + +#: keymap_defs.h:35 +msgid "rename/move an attached file" +msgstr "" + +#: keymap_defs.h:36 +msgid "send the message" +msgstr "" + +#: keymap_defs.h:37 +msgid "toggle whether to delete file after sending it" +msgstr "" + +#: keymap_defs.h:38 +msgid "update an attachment's encoding info" +msgstr "" + +#: keymap_defs.h:39 +msgid "write the message to a folder" +msgstr "" + +#: keymap_defs.h:40 +msgid "copy a message to a file/mailbox" +msgstr "" + +#: keymap_defs.h:41 +msgid "create an alias from a message sender" +msgstr "" + +#: keymap_defs.h:42 +msgid "move entry to bottom of screen" +msgstr "" + +#: keymap_defs.h:43 +msgid "move entry to middle of screen" +msgstr "" + +#: keymap_defs.h:44 +msgid "move entry to top of screen" +msgstr "" + +#: keymap_defs.h:45 +msgid "make decoded (text/plain) copy" +msgstr "" + +#: keymap_defs.h:46 +msgid "make decoded copy (text/plain) and delete" +msgstr "" + +#: keymap_defs.h:47 +msgid "delete the current entry" +msgstr "" + +#: keymap_defs.h:48 +msgid "delete all messages in subthread" +msgstr "" + +#: keymap_defs.h:49 +msgid "delete all messages in thread" +msgstr "" + +#: keymap_defs.h:50 +msgid "display full address of sender" +msgstr "" + +#: keymap_defs.h:51 +msgid "display message with full headers" +msgstr "" + +#: keymap_defs.h:52 +msgid "display a message" +msgstr "" + +#: keymap_defs.h:53 +msgid "edit the current message for resending" +msgstr "" + +#: keymap_defs.h:54 +msgid "delete the char in front of the cursor" +msgstr "" + +#: keymap_defs.h:55 +msgid "move the cursor one character to the left" +msgstr "" + +#: keymap_defs.h:56 +msgid "jump to the beginning of the line" +msgstr "" + +#: keymap_defs.h:57 +msgid "cycle among incoming mailboxes" +msgstr "" + +#: keymap_defs.h:58 +msgid "complete filename or alias" +msgstr "" + +#: keymap_defs.h:59 +msgid "complete address with query" +msgstr "" + +#: keymap_defs.h:60 +msgid "delete the char under the cursor" +msgstr "" + +#: keymap_defs.h:61 +msgid "jump to the end of the line" +msgstr "" + +#: keymap_defs.h:62 +msgid "move the cursor one character to the right" +msgstr "" + +#: keymap_defs.h:63 keymap_defs.h:64 +msgid "scroll up through the history list" +msgstr "" + +#: keymap_defs.h:65 +msgid "delete chars from cursor to end of line" +msgstr "" + +#: keymap_defs.h:66 +msgid "delete all chars on the line" +msgstr "" + +#: keymap_defs.h:67 +msgid "delete the word in front of the cursor" +msgstr "" + +#: keymap_defs.h:68 +msgid "quote the next typed key" +msgstr "" + +#: keymap_defs.h:69 +msgid "enter a muttrc command" +msgstr "" + +#: keymap_defs.h:70 +msgid "enter a file mask" +msgstr "" + +#: keymap_defs.h:71 +msgid "exit this menu" +msgstr "" + +#: keymap_defs.h:72 +msgid "filter attachment through a shell command" +msgstr "" + +#: keymap_defs.h:73 +msgid "move to the first entry" +msgstr "" + +#: keymap_defs.h:74 +msgid "toggle a message's 'important' flag" +msgstr "" + +#: keymap_defs.h:75 +msgid "forward a message with comments" +msgstr "" + +#: keymap_defs.h:76 +msgid "select the current entry" +msgstr "" + +#: keymap_defs.h:77 +msgid "reply to all recipients" +msgstr "" + +#: keymap_defs.h:78 +msgid "scroll down 1/2 page" +msgstr "" + +#: keymap_defs.h:79 +msgid "scroll up 1/2 page" +msgstr "" + +#: keymap_defs.h:80 +msgid "this screen" +msgstr "" + +#: keymap_defs.h:81 +msgid "jump to an index number" +msgstr "" + +#: keymap_defs.h:82 +msgid "move to the last entry" +msgstr "" + +#: keymap_defs.h:83 +msgid "reply to specified mailing list" +msgstr "" + +#: keymap_defs.h:84 +msgid "execute a macro" +msgstr "" + +#: keymap_defs.h:85 +msgid "compose a new mail message" +msgstr "" + +#: keymap_defs.h:86 +msgid "open a different folder" +msgstr "" + +#: keymap_defs.h:87 +msgid "open a different folder in read only mode" +msgstr "" + +#: keymap_defs.h:88 +msgid "clear a status flag from a message" +msgstr "" + +#: keymap_defs.h:89 +msgid "delete messages matching a pattern" +msgstr "" + +#: keymap_defs.h:90 +msgid "retrieve mail from POP server" +msgstr "" + +#: keymap_defs.h:91 +msgid "move to the first message" +msgstr "" + +#: keymap_defs.h:92 +msgid "move to the last message" +msgstr "" + +#: keymap_defs.h:93 +msgid "show only messages matching a pattern" +msgstr "" + +#: keymap_defs.h:94 +msgid "jump to the next new message" +msgstr "" + +#: keymap_defs.h:95 +msgid "jump to the next subthread" +msgstr "" + +#: keymap_defs.h:96 +msgid "jump to the next thread" +msgstr "" + +#: keymap_defs.h:97 +msgid "move to the next undeleted message" +msgstr "" + +#: keymap_defs.h:98 +msgid "jump to the next unread message" +msgstr "" + +#: keymap_defs.h:99 +msgid "jump to previous thread" +msgstr "" + +#: keymap_defs.h:100 +msgid "jump to previous subthread" +msgstr "" + +#: keymap_defs.h:101 +msgid "move to the last undelete message" +msgstr "" + +#: keymap_defs.h:102 +msgid "jump to the previous new message" +msgstr "" + +#: keymap_defs.h:103 +msgid "jump to the previous unread message" +msgstr "" + +#: keymap_defs.h:104 +msgid "mark the current thread as read" +msgstr "" + +#: keymap_defs.h:105 +msgid "mark the current subthread as read" +msgstr "" + +#: keymap_defs.h:106 +msgid "set a status flag on a message" +msgstr "" + +#: keymap_defs.h:107 +msgid "save changes to mailbox" +msgstr "" + +#: keymap_defs.h:108 +msgid "tag messages matching a pattern" +msgstr "" + +#: keymap_defs.h:109 +msgid "undelete messages matching a pattern" +msgstr "" + +#: keymap_defs.h:110 +msgid "untag messages matching a pattern" +msgstr "" + +#: keymap_defs.h:111 +msgid "move to the middle of the page" +msgstr "" + +#: keymap_defs.h:112 +msgid "move to the next entry" +msgstr "" + +#: keymap_defs.h:113 +msgid "scroll down one line" +msgstr "" + +#: keymap_defs.h:114 +msgid "move to the next page" +msgstr "" + +#: keymap_defs.h:115 +msgid "jump to the bottom of the message" +msgstr "" + +#: keymap_defs.h:116 +msgid "return to the main-menu" +msgstr "" + +#: keymap_defs.h:117 +msgid "toggle display of quoted text" +msgstr "" + +#: keymap_defs.h:118 +msgid "skip beyond quoted text" +msgstr "" + +#: keymap_defs.h:119 +msgid "jump to the top of the message" +msgstr "" + +#: keymap_defs.h:120 +msgid "pipe message/attachment to a shell command" +msgstr "" + +#: keymap_defs.h:121 +msgid "move to the previous entry" +msgstr "" + +#: keymap_defs.h:122 +msgid "scroll up one line" +msgstr "" + +#: keymap_defs.h:123 +msgid "move to the previous page" +msgstr "" + +#: keymap_defs.h:124 +msgid "print the current entry" +msgstr "" + +#: keymap_defs.h:125 +msgid "query external program for addresses" +msgstr "" + +#: keymap_defs.h:126 +msgid "append new query results to current results" +msgstr "" + +#: keymap_defs.h:127 +msgid "save changes to mailbox and quit" +msgstr "" + +#: keymap_defs.h:128 +msgid "recall a postponed message" +msgstr "" + +#: keymap_defs.h:129 +msgid "clear and redraw the screen" +msgstr "" + +#: keymap_defs.h:130 +msgid "reply to a message" +msgstr "" + +#: keymap_defs.h:131 +msgid "save message/attachment to a file" +msgstr "" + +#: keymap_defs.h:132 +msgid "search for a regular expression" +msgstr "" + +#: keymap_defs.h:133 +msgid "search backwards for a regular expression" +msgstr "" + +#: keymap_defs.h:134 +msgid "search for next match" +msgstr "" + +#: keymap_defs.h:135 +msgid "search for next match in opposite direction" +msgstr "" + +#: keymap_defs.h:136 +msgid "toggle search pattern coloring" +msgstr "" + +#: keymap_defs.h:137 +msgid "invoke a command in a subshell" +msgstr "" + +#: keymap_defs.h:138 +msgid "sort messages" +msgstr "" + +#: keymap_defs.h:139 +msgid "sort messages in reverse order" +msgstr "" + +#: keymap_defs.h:140 +msgid "tag the current entry" +msgstr "" + +#: keymap_defs.h:141 +msgid "apply next function to tagged messages" +msgstr "" + +#: keymap_defs.h:142 +msgid "tag the current subthread" +msgstr "" + +#: keymap_defs.h:143 +msgid "tag the current thread" +msgstr "" + +#: keymap_defs.h:144 +msgid "toggle a message's 'new' flag" +msgstr "" + +#: keymap_defs.h:145 +msgid "toggle whether the mailbox will be rewritten" +msgstr "" + +#: keymap_defs.h:146 +msgid "toggle wether to browse mailboxes or all files" +msgstr "" + +#: keymap_defs.h:147 +msgid "move to the top of the page" +msgstr "" + +#: keymap_defs.h:148 +msgid "undelete the current entry" +msgstr "" + +#: keymap_defs.h:149 +msgid "undelete all messages in thread" +msgstr "" + +#: keymap_defs.h:150 +msgid "undelete all messages in subthread" +msgstr "" + +#: keymap_defs.h:151 +msgid "show the Mutt version number and date" +msgstr "" + +#: keymap_defs.h:152 +msgid "view attachment using mailcap entry if necessary" +msgstr "" + +#: keymap_defs.h:153 +msgid "show MIME attachments" +msgstr "" + +#: keymap_defs.h:154 +msgid "show currently active limit pattern" +msgstr "" + +#: keymap_defs.h:155 +msgid "collapse/uncollapse current thread" +msgstr "" + +#: keymap_defs.h:156 +msgid "collapse/uncollapse all threads" +msgstr "" + +#: keymap_defs.h:157 +msgid "attach a PGP public key" +msgstr "" + +#: keymap_defs.h:158 +msgid "show PGP options" +msgstr "" + +#: keymap_defs.h:159 +msgid "extract PGP public keys" +msgstr "" + +#: keymap_defs.h:160 +msgid "wipe PGP passphrase from memory" +msgstr "" + +#: keymap_defs.h:161 +msgid "mail a PGP public key" +msgstr "" + +#: keymap_defs.h:162 +msgid "verify a PGP public key" +msgstr "" + +#: keymap_defs.h:163 +msgid "view the key's user id" +msgstr "" + +#: keymap_defs.h:164 +msgid "make decrypted copy and delete" +msgstr "" + +#: keymap_defs.h:165 +msgid "make decrypted copy" +msgstr "" + +#: lib.c:275 lib.c:290 lib.c:321 +msgid "Out of memory!" +msgstr "" + +#: lib.c:753 +msgid "File is a directory, save under it?" +msgstr "" + +#: lib.c:758 +msgid "File under directory: " +msgstr "" + +#: lib.c:769 +msgid "File exists, overwrite?" +msgstr "" + +#: lib.c:1142 +#, c-format +msgid "%s is not a mailbox!" +msgstr "" + +#: lib.c:1148 +#, c-format +msgid "Append messages to %s?" +msgstr "" + +#: main.c:68 +msgid "" +"usage: mutt [ -nRzZ ] [ -e ] [ -F ] [ -m ] [ -f " +"]\n" +" mutt [ -nx ] [ -e ] [ -a ] [ -F ] [ -H ] [ " +"-i ] [ -s ] [ -b ] [ -c ] [ ... ]\n" +" mutt [ -n ] [ -e ] [ -F ] -p\n" +" mutt -v[v]\n" +"\n" +"options:\n" +" -a \tattach a file to the message\n" +" -b
\tspecify a blind carbon-copy (BCC) address\n" +" -c
\tspecify a carbon-copy (CC) address\n" +" -e \tspecify a command to be executed after initialization\n" +" -f \tspecify which mailbox to read\n" +" -F \tspecify an alternate muttrc file\n" +" -H \tspecify a draft file to read header from\n" +" -i \tspecify a file which Mutt should include in the reply\n" +" -m \tspecify a default mailbox type\n" +" -n\t\tcauses Mutt not to read the system Muttrc\n" +" -p\t\trecall a postponed message\n" +" -R\t\topen mailbox in read-only mode\n" +" -s \tspecify a subject (must be in quotes if it has spaces)\n" +" -v\t\tshow version and compile-time definitions\n" +" -x\t\tsimulate the mailx send mode\n" +" -y\t\tselect a mailbox specified in your `mailboxes' list\n" +" -z\t\texit immediately if there are no messages in the mailbox\n" +" -Z\t\topen the first folder with new message, exit immediately if none\n" +" -h\t\tthis help message" +msgstr "" + +#: main.c:255 +msgid "" +"\n" +"Mail bug reports along with this output to ." +msgstr "" + +#: main.c:274 +msgid "Error initializing terminal." +msgstr "" + +#: main.c:370 +#, c-format +msgid "Debugging at level %d.\n" +msgstr "" + +#: main.c:372 +msgid "DEBUG was not defined during compilation. Ignored.\n" +msgstr "" + +#: main.c:506 +msgid "No recipients specified.\n" +msgstr "" + +#: main.c:579 +#, c-format +msgid "%s: unable to attach file.\n" +msgstr "" + +#: main.c:599 +msgid "No mailbox with new mail." +msgstr "" + +#: main.c:633 +msgid "Mailbox is empty." +msgstr "" + +#: mbox.c:186 +msgid "Mailbox is corrupt!" +msgstr "" + +#: mbox.c:261 +msgid "Reading %s... %d (%d%%)" +msgstr "" + +#: mbox.c:626 +msgid "Mailbox was corrupted!" +msgstr "" + +#: mbox.c:663 mbox.c:852 +msgid "Fatal error! Could not reopen mailbox!" +msgstr "" + +#: mbox.c:672 +msgid "Unable to lock mailbox!" +msgstr "" + +#. this means ctx->changed or ctx->deleted was set, but no +#. * messages were found to be changed or deleted. This should +#. * never happen, is we presume it is a bug in mutt. +#. +#: mbox.c:711 +msgid "sync: mbox modified, but no modified messages! (report this bug)" +msgstr "" + +#: mbox.c:735 +msgid "Writing messages... %d (%d%%)" +msgstr "" + +#: mbox.c:837 +#, c-format +msgid "Write failed! Saved partial mailbox to %s" +msgstr "" + +#: mbox.c:885 +msgid "Could not reopen mailbox!" +msgstr "" + +#: menu.c:297 +msgid "Jump to: " +msgstr "" + +#: menu.c:306 +msgid "Invalid index number." +msgstr "" + +#: menu.c:310 menu.c:328 menu.c:364 menu.c:405 menu.c:421 menu.c:432 +#: menu.c:443 menu.c:485 menu.c:496 menu.c:509 menu.c:522 menu.c:799 +msgid "No entries." +msgstr "" + +#: menu.c:325 +msgid "You cannot scroll down farther." +msgstr "" + +#: menu.c:341 +msgid "You cannot scroll up farther." +msgstr "" + +#: menu.c:361 +msgid "You are on the last page." +msgstr "" + +#: menu.c:383 +msgid "You are on the first page." +msgstr "" + +#: menu.c:462 +msgid "First entry is shown." +msgstr "" + +#: menu.c:482 +msgid "Last entry is shown." +msgstr "" + +#: menu.c:533 +msgid "You are on the last entry." +msgstr "" + +#: menu.c:544 +msgid "You are on the first entry." +msgstr "" + +#: menu.c:584 pattern.c:996 +msgid "Search for: " +msgstr "" + +#: menu.c:585 +msgid "Reverse search for: " +msgstr "" + +#: menu.c:596 pattern.c:1029 +msgid "No search pattern." +msgstr "" + +#: menu.c:626 pager.c:1657 pager.c:1673 pager.c:1760 pattern.c:1094 +msgid "Not found." +msgstr "" + +#: menu.c:764 +msgid "Search is not implemented for this menu." +msgstr "" + +#: menu.c:802 +msgid "Tagging is not supported." +msgstr "" + +#: mh.c:59 +#, c-format +msgid "Reading %s... %d" +msgstr "" + +#: mh.c:216 +msgid "mh_parse_sequences: Unable to allocate hash table!\n" +msgstr "" + +#: mh.c:247 +#, c-format +msgid "Cannot open %s" +msgstr "" + +#: mh.c:299 +#, c-format +msgid "Folder %s: %d unread" +msgstr "" + +#: mh.c:652 +#, c-format +msgid "fopen %s failed" +msgstr "" + +#: mx.c:113 +#, c-format +msgid "Lock count exceeded, remove lock for %s?" +msgstr "" + +#: mx.c:177 +msgid "Timeout exceeded while attempting fcntl lock!" +msgstr "" + +#: mx.c:183 +#, c-format +msgid "Waiting for fcntl lock... %d" +msgstr "" + +#: mx.c:211 +msgid "Timeout exceeded while attempting flock lock!" +msgstr "" + +#: mx.c:218 +#, c-format +msgid "Waiting for flock attempt... %d" +msgstr "" + +#: mx.c:586 +#, c-format +msgid "Reading %s..." +msgstr "" + +#: mx.c:673 +#, c-format +msgid "Writing %s..." +msgstr "" + +#: mx.c:753 +#, c-format +msgid "Move read messages to %s?" +msgstr "" + +#: mx.c:762 mx.c:872 +#, c-format +msgid "Purge %d deleted message?" +msgstr "" + +#: mx.c:762 mx.c:872 +#, c-format +msgid "Purge %d deleted messages?" +msgstr "" + +#: mx.c:782 +#, c-format +msgid "Moving read messages to %s..." +msgstr "" + +#: mx.c:798 mx.c:863 +msgid "Mailbox is unchanged." +msgstr "" + +#: mx.c:817 +#, c-format +msgid "%d kept, %d moved, %d deleted." +msgstr "" + +#: mx.c:820 mx.c:888 +#, c-format +msgid "%d kept, %d deleted." +msgstr "" + +#: mx.c:848 +#, c-format +msgid " Press '%s' to toggle write" +msgstr "" + +#: mx.c:850 +msgid "Use 'toggle-write' to re-enable write!" +msgstr "" + +#: mx.c:852 +#, c-format +msgid "Mailbox is marked unwritable. %s" +msgstr "" + +#: mx.c:857 +msgid "Mailbox is read-only." +msgstr "" + +#: mx.c:1136 +msgid "Reopening mailbox..." +msgstr "" + +#: pager.c:1340 pgpkey.c:180 +msgid "Help" +msgstr "" + +#. emulate "less -q" and don't go on to the next message. +#: pager.c:1569 pager.c:1600 pager.c:1629 pager.c:1848 +msgid "Bottom of message is shown." +msgstr "" + +#: pager.c:1585 pager.c:1607 pager.c:1618 +msgid "Top of message is shown." +msgstr "" + +#: pager.c:1691 +msgid "Reverse search: " +msgstr "" + +#: pager.c:1692 +msgid "Search: " +msgstr "" + +#: pager.c:1786 +msgid "Help is currently being shown." +msgstr "" + +#: pager.c:1815 +msgid "No more quoted text." +msgstr "" + +#: pager.c:1828 +msgid "No more unquoted text after quoted text." +msgstr "" + +#: parse.c:476 +msgid "multipart message has no boundary parameter!" +msgstr "" + +#: pattern.c:226 +#, c-format +msgid "Error in expression: %s" +msgstr "" + +#: pattern.c:322 +#, c-format +msgid "Invalid day of month: %s" +msgstr "" + +#: pattern.c:336 +#, c-format +msgid "Invalid month: %s" +msgstr "" + +#: pattern.c:390 +msgid "error in expression" +msgstr "" + +#: pattern.c:570 pattern.c:673 +#, c-format +msgid "error in pattern at: %s" +msgstr "" + +#: pattern.c:615 +#, c-format +msgid "%c: invalid command" +msgstr "" + +#: pattern.c:621 +#, c-format +msgid "%c: not supported in this mode" +msgstr "" + +#: pattern.c:634 +msgid "missing parameter" +msgstr "" + +#: pattern.c:650 +#, c-format +msgid "mismatched parenthesis: %s" +msgstr "" + +#: pattern.c:680 +msgid "empty pattern" +msgstr "" + +#: pattern.c:823 +#, c-format +msgid "error: unknown op %d (report this error)." +msgstr "" + +#: pattern.c:887 pattern.c:1015 +msgid "Compiling search pattern..." +msgstr "" + +#: pattern.c:901 +msgid "Executing command on matching messages..." +msgstr "" + +#: pattern.c:958 +msgid "No messages matched criteria." +msgstr "" + +#: pattern.c:1053 +msgid "Search hit bottom without finding match" +msgstr "" + +#: pattern.c:1064 +msgid "Search hit top without finding match" +msgstr "" + +#: pattern.c:1086 +msgid "Search interrupted." +msgstr "" + +#: pgp.c:130 +msgid "Enter PGP passphrase:" +msgstr "" + +#: pgp.c:146 +msgid "PGP passphrase forgotten." +msgstr "" + +#: pgp.c:174 +#, c-format +msgid "Unknown PGP version \"%s\"." +msgstr "" + +#: pgp.c:207 +msgid "[-- PGP output follows (current time: " +msgstr "" + +#: pgp.c:320 +msgid "[-- Error: unable to create PGP subprocess! --]\n" +msgstr "" + +#: pgp.c:347 +msgid "" +"\n" +"[-- End of PGP output --]\n" +"\n" +msgstr "" + +#: pgp.c:476 +msgid "" +"[-- Error: could not find beginning of PGP message! --]\n" +"\n" +msgstr "" + +#: pgp.c:669 pgp.c:894 +msgid "" +"[-- End of PGP output --]\n" +"\n" +msgstr "" + +#. Now display the signed body +#: pgp.c:676 +msgid "" +"[-- The following data is PGP/MIME signed --]\n" +"\n" +msgstr "" + +#: pgp.c:682 +msgid "" +"\n" +"[-- End of PGP/MIME signed data --]\n" +msgstr "" + +#: pgp.c:687 +msgid "" +"[-- Error: this message does not comply with the PGP/MIME specification! " +"--]\n" +"\n" +msgstr "" + +#: pgp.c:801 +msgid "Internal error. Inform ." +msgstr "" + +#: pgp.c:865 +msgid "" +"[-- Error: could not create a PGP subprocess! --]\n" +"\n" +msgstr "" + +#: pgp.c:967 +msgid "" +"[-- Error: malformed PGP/MIME message! --]\n" +"\n" +msgstr "" + +#: pgp.c:980 +msgid "[-- Error: could not create temporary file! --]\n" +msgstr "" + +#: pgp.c:989 +msgid "" +"[-- The following data is PGP/MIME encrypted --]\n" +"\n" +msgstr "" + +#: pgp.c:997 +msgid "" +"\n" +"[-- End of PGP/MIME encrypted data --]\n" +msgstr "" + +#: pgp.c:1080 +msgid "Can't open PGP subprocess!" +msgstr "" + +#: pgp.c:1214 +#, c-format +msgid "Use keyID = \"%s\" for %s?" +msgstr "" + +#: pgp.c:1220 +#, c-format +msgid "Enter keyID for %s: " +msgstr "" + +#: pgpkey.c:173 +msgid "Exit " +msgstr "" + +#: pgpkey.c:175 +msgid "Select " +msgstr "" + +#: pgpkey.c:178 +msgid "Check key " +msgstr "" + +#: pgpkey.c:191 +msgid "PGP keys matching " +msgstr "" + +#: pgpkey.c:210 pgpkey.c:387 +msgid "Can't open /dev/null" +msgstr "" + +#: pgpkey.c:216 pgpkey.c:381 +msgid "Can't create temporary file" +msgstr "" + +#: pgpkey.c:226 pgpkey.c:398 +msgid "Can't create filter" +msgstr "" + +#: pgpkey.c:236 +#, c-format +msgid "Key ID: 0x%s" +msgstr "" + +#: pgpkey.c:257 +msgid "This ID's trust level is undefined." +msgstr "" + +#: pgpkey.c:258 +msgid "This ID is not trusted." +msgstr "" + +#: pgpkey.c:259 +msgid "This ID is only marginally trusted." +msgstr "" + +#: pgpkey.c:262 +#, c-format +msgid "%s Do you really want to use it?" +msgstr "" + +#: pgpkey.c:369 +msgid "Please enter the key ID: " +msgstr "" + +#: pgpkey.c:416 +#, c-format +msgid "PGP Key 0x%s." +msgstr "" + +#: pgppubring.c:58 +msgid "reserved" +msgstr "" + +#: pgppubring.c:59 +msgid "Encrypted Session Key" +msgstr "" + +#: pgppubring.c:60 +msgid "Signature Packet" +msgstr "" + +#: pgppubring.c:61 +msgid "Conventionally Encrypted Session Key Packet" +msgstr "" + +#: pgppubring.c:62 +msgid "One-Pass Signature Packet" +msgstr "" + +#: pgppubring.c:63 +msgid "Secret Key Packet" +msgstr "" + +#: pgppubring.c:64 +msgid "Public Key Packet" +msgstr "" + +#: pgppubring.c:65 +msgid "Secret Subkey Packet" +msgstr "" + +#: pgppubring.c:66 +msgid "Compressed Data Packet" +msgstr "" + +#: pgppubring.c:67 +msgid "Symmetrically Encrypted Data Packet" +msgstr "" + +#: pgppubring.c:68 +msgid "Marker Packet" +msgstr "" + +#: pgppubring.c:69 +msgid "Literal Data Packet" +msgstr "" + +#: pgppubring.c:70 +msgid "Trust Packet" +msgstr "" + +#: pgppubring.c:71 +msgid "Name Packet" +msgstr "" + +#: pgppubring.c:72 +msgid "Subkey Packet" +msgstr "" + +#: pgppubring.c:73 +msgid "Reserved" +msgstr "" + +#: pgppubring.c:74 +msgid "Comment Packet" +msgstr "" + +#: pop.c:66 +msgid "POP Password: " +msgstr "" + +#: pop.c:91 +msgid "POP host is not defined." +msgstr "" + +#: pop.c:97 +msgid "No POP username is defined." +msgstr "" + +#: pop.c:114 +#, c-format +msgid "Could not find address for host %s." +msgstr "" + +#: pop.c:122 +#, c-format +msgid "Connecting to %s" +msgstr "" + +#: pop.c:166 pop.c:317 +msgid "Server closed connection!" +msgstr "" + +#: pop.c:187 +msgid "No new mail in POP mailbox." +msgstr "" + +#: pop.c:231 +msgid "Error reading message!" +msgstr "" + +#: pop.c:267 +msgid "Error while writing mailbox!" +msgstr "" + +#: pop.c:291 +#, c-format +msgid "%s [%d messages read]" +msgstr "" + +#: postpone.c:111 +msgid "Postponed Messages" +msgstr "" + +#: postpone.c:182 postpone.c:191 +msgid "No postponed messages." +msgstr "" + +#: postpone.c:319 postpone.c:339 postpone.c:348 +msgid "Illegal PGP header" +msgstr "" + +#: query.c:91 +msgid "Waiting for response..." +msgstr "" + +#: query.c:192 query.c:217 +msgid "Query command not defined." +msgstr "" + +#: query.c:243 +msgid "Query" +msgstr "" + +#. Prompt for Query +#: query.c:256 query.c:284 +msgid "Query: " +msgstr "" + +#: query.c:267 query.c:293 +#, c-format +msgid "Query '%s'" +msgstr "" + +#: recvattach.c:309 +msgid "Saving..." +msgstr "" + +#: recvattach.c:370 +msgid "Attachment saved" +msgstr "" + +#: recvattach.c:382 +#, c-format +msgid "WARNING! You are about to overwrite %s, continue?" +msgstr "" + +#: recvattach.c:400 +msgid "Attachment filtered." +msgstr "" + +#: recvattach.c:466 +msgid "Filter through: " +msgstr "" + +#: recvattach.c:466 +msgid "Pipe to: " +msgstr "" + +#: recvattach.c:501 +#, c-format +msgid "I dont know how to print %s attachments!" +msgstr "" + +#: recvattach.c:564 +msgid "Print tagged attachment(s)?" +msgstr "" + +#: recvattach.c:564 +msgid "Print attachment?" +msgstr "" + +#: recvattach.c:592 +msgid "You may only bounce message/rfc822 parts." +msgstr "" + +#: recvattach.c:625 +#, c-format +msgid "Bounce messages to %s...?" +msgstr "" + +#: recvattach.c:626 +#, c-format +msgid "Bounce message to %s...?" +msgstr "" + +#: recvattach.c:843 +msgid "Attachments" +msgstr "" + +#: recvattach.c:898 +msgid "Only deletion of multipart attachments is supported." +msgstr "" + +#: recvattach.c:906 +msgid "Deletion of attachments from PGP messages is unsupported." +msgstr "" + +#: recvattach.c:981 +msgid "This operation is not currently supported for PGP messages." +msgstr "" + +#: rfc1524.c:157 +#, c-format +msgid "Improperly formated entry for type %s in \"%s\" line %d" +msgstr "" + +#: rfc1524.c:389 +msgid "No mailcap path specified" +msgstr "" + +#: rfc1524.c:415 +#, c-format +msgid "mailcap entry for type %s not found" +msgstr "" + +#: score.c:71 +msgid "score: too few arguments" +msgstr "" + +#: score.c:80 +msgid "score: too many arguments" +msgstr "" + +#: send.c:229 +msgid "No subject, abort?" +msgstr "" + +#: send.c:231 +msgid "No subject, aborting." +msgstr "" + +#. There are quite a few mailing lists which set the Reply-To: +#. * header field to the list address, which makes it quite impossible +#. * to send a message to only the sender of the message. This +#. * provides a way to do that. +#. +#: send.c:429 +#, c-format +msgid "Reply to %s?" +msgstr "" + +#. This could happen if the user tagged some messages and then did +#. * a limit such that none of the tagged message are visible. +#. +#: send.c:510 +msgid "No tagged messages are visible!" +msgstr "" + +#: send.c:535 +msgid "No mailing lists found!" +msgstr "" + +#: send.c:622 +msgid "Include message in reply?" +msgstr "" + +#: send.c:636 +msgid "Could not include all requested messages!" +msgstr "" + +#: send.c:649 +msgid "Forward MIME encapsulated?" +msgstr "" + +#. If the user is composing a new message, check to see if there +#. * are any postponed messages first. +#. +#: send.c:888 +msgid "Recall postponed message?" +msgstr "" + +#: send.c:1091 +msgid "Abort unmodified message?" +msgstr "" + +#: send.c:1093 +msgid "Aborted unmodified message." +msgstr "" + +#. abort +#: send.c:1131 +msgid "Mail not sent." +msgstr "" + +#: send.c:1144 +msgid "Message postponed." +msgstr "" + +#: send.c:1153 +msgid "No recipients are specified!" +msgstr "" + +#: send.c:1158 +msgid "No recipients were specified." +msgstr "" + +#: send.c:1164 +msgid "No subject, abort sending?" +msgstr "" + +#: send.c:1168 +msgid "No subject specified." +msgstr "" + +#: send.c:1207 +msgid "Message edited. Really send?" +msgstr "" + +#: send.c:1213 +msgid "Sending message..." +msgstr "" + +#: send.c:1313 +msgid "Mail sent." +msgstr "" + +#: sendlib.c:452 +msgid "No boundary parameter found! [report this error]" +msgstr "" + +#: sendlib.c:486 +#, c-format +msgid "%s no longer exists!" +msgstr "" + +#: sendlib.c:725 +#, c-format +msgid "Could not open %s" +msgstr "" + +#: sendlib.c:1651 +#, c-format +msgid "Error sending message, child exited %d (%s).\n" +msgstr "" + +#: sendlib.c:1653 +#, c-format +msgid "Saved output of child process to %s.\n" +msgstr "" + +#: sendlib.c:1657 +msgid "Error sending message." +msgstr "" + +#: signal.c:38 signal.c:41 +#, c-format +msgid "Caught %s... Exiting.\n" +msgstr "" + +#: signal.c:43 +#, c-format +msgid "Caught signal %d... Exiting.\n" +msgstr "" + +#: sort.c:198 +msgid "Sorting mailbox..." +msgstr "" + +#: sort.c:226 +msgid "Could not find sorting function! [report this bug]" +msgstr "" + +#: status.c:101 +msgid "(no mailbox)" +msgstr "" diff --git a/po/stamp-cat-id b/po/stamp-cat-id new file mode 100644 index 00000000..9788f702 --- /dev/null +++ b/po/stamp-cat-id @@ -0,0 +1 @@ +timestamp diff --git a/pop.c b/pop.c index 76e7fd50..66f892c6 100644 --- a/pop.c +++ b/pop.c @@ -63,7 +63,7 @@ static int getPass (void) { char tmp[SHORT_STRING]; tmp[0] = '\0'; - if (mutt_get_password ("POP Password: ", tmp, sizeof (tmp)) != 0 + if (mutt_get_password (_("POP Password: "), tmp, sizeof (tmp)) != 0 || *tmp == '\0') return 0; PopPass = safe_strdup (tmp); @@ -88,13 +88,13 @@ void mutt_fetchPopMail (void) if (!PopHost) { - mutt_error ("POP host is not defined."); + mutt_error _("POP host is not defined."); return; } if (!PopUser) { - mutt_error ("No POP username is defined."); + mutt_error _("No POP username is defined."); return; } @@ -111,7 +111,7 @@ void mutt_fetchPopMail (void) /* Must be a DNS name */ if ((he = gethostbyname (NONULL(PopHost))) == NULL) { - mutt_error ("Could not find address for host %s.", PopHost); + mutt_error (_("Could not find address for host %s."), PopHost); return; } memcpy ((void *)&sin.sin_addr, *(he->h_addr_list), he->h_length); @@ -119,7 +119,7 @@ void mutt_fetchPopMail (void) else memcpy ((void *)&sin.sin_addr, (void *)&n, sizeof(n)); - mutt_message ("Connecting to %s", inet_ntoa (sin.sin_addr)); + mutt_message (_("Connecting to %s"), inet_ntoa (sin.sin_addr)); if (connect (s, (struct sockaddr *) &sin, sizeof (struct sockaddr_in)) == -1) { @@ -163,7 +163,7 @@ void mutt_fetchPopMail (void) safe_free((void **) &PopPass); /* void the given password */ mutt_remove_trailing_ws (buffer); - mutt_error (buffer[0] ? buffer : "Server closed connection!"); + mutt_error (buffer[0] ? buffer : _("Server closed connection!")); goto finish; } @@ -184,7 +184,7 @@ void mutt_fetchPopMail (void) if (msgs == 0) { - mutt_message ("No new mail in POP mailbox."); + mutt_message _("No new mail in POP mailbox."); goto finish; } @@ -192,7 +192,8 @@ void mutt_fetchPopMail (void) goto finish; snprintf (msgbuf, sizeof (msgbuf), - "Reading %d new message%s (%d bytes)...", msgs, msgs > 1 ? "s" : "", bytes); + msgs > 1 ? "_(Reading %d new message (%d bytes)...") : + ("Reading %d new messages (%d bytes)..."), msgs, bytes); mutt_message (msgbuf); for (i = 1 ; i <= msgs ; i++) @@ -227,7 +228,7 @@ void mutt_fetchPopMail (void) if ((chunk = getLine (s, buffer, sizeof (buffer))) == -1) { - mutt_error ("Error reading message!"); + mutt_error _("Error reading message!"); err = 1; break; } @@ -263,7 +264,7 @@ void mutt_fetchPopMail (void) if (mx_close_message (&msg) != 0) { - mutt_error ("Error while writing mailbox!"); + mutt_error _("Error while writing mailbox!"); err = 1; } @@ -287,7 +288,7 @@ void mutt_fetchPopMail (void) } } - mutt_message ("%s [%d messages read]", msgbuf, i); + mutt_message (_("%s [%d messages read]"), msgbuf, i); } if (msg) @@ -313,6 +314,6 @@ finish: fail: - mutt_error ("Server closed connection!"); + mutt_error _("Server closed connection!"); close (s); } diff --git a/postpone.c b/postpone.c index 5f35ff85..42a31f5b 100644 --- a/postpone.c +++ b/postpone.c @@ -108,7 +108,7 @@ static HEADER *select_msg (void) menu->make_entry = post_entry; menu->menu = MENU_POST; menu->max = PostContext->msgcount; - menu->title = "Postponed Messages"; + menu->title = _("Postponed Messages"); menu->data = PostContext; menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_POST, PostponeHelp); @@ -179,7 +179,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur) if ((PostContext = mx_open_mailbox (Postponed, M_NOSORT, NULL)) == NULL) { PostCount = 0; - mutt_error ("No postponed messages."); + mutt_error _("No postponed messages."); return (-1); } @@ -188,7 +188,7 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur) PostCount = 0; mx_close_mailbox (PostContext); safe_free ((void **) &PostContext); - mutt_error ("No postponed messages."); + mutt_error _("No postponed messages."); return (-1); } @@ -316,7 +316,7 @@ int mutt_parse_pgp_hdr (char *p, int set_signas) if (*p!='>') { - mutt_error ("Illegal PGP header"); + mutt_error _("Illegal PGP header"); return 0; } } @@ -336,7 +336,7 @@ int mutt_parse_pgp_hdr (char *p, int set_signas) if(*p != '>') { - mutt_error("Illegal PGP header"); + mutt_error _("Illegal PGP header"); return 0; } } @@ -345,7 +345,7 @@ int mutt_parse_pgp_hdr (char *p, int set_signas) break; default: - mutt_error ("Illegal PGP header"); + mutt_error _("Illegal PGP header"); return 0; } diff --git a/query.c b/query.c index d09040f1..c1db27dd 100644 --- a/query.c +++ b/query.c @@ -88,7 +88,7 @@ static QUERY *run_query (char *s, int quiet) return 0; } if (!quiet) - mutt_message ("Waiting for response..."); + mutt_message _("Waiting for response..."); fgets (msg, sizeof (msg) - 1, fp); while (fgets(buf, sizeof (buf) - 1, fp)) { @@ -189,7 +189,7 @@ int mutt_query_complete (char *buf, size_t buflen) if (!QueryCmd) { - mutt_error ("Query command not defined."); + mutt_error _("Query command not defined."); return 0; } @@ -214,7 +214,7 @@ void mutt_query_menu (char *buf, size_t buflen) { if (!QueryCmd) { - mutt_error ("Query command not defined."); + mutt_error _("Query command not defined."); return; } @@ -239,7 +239,8 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf) int i, done = 0; int op; char helpstr[SHORT_STRING]; - char title[STRING] = "Query"; + char title[STRING]; + snprintf (title, sizeof (title), _("Query")); /* FIXME */ menu = mutt_new_menu (); menu->make_entry = query_entry; @@ -252,7 +253,7 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf) if (results == NULL) { /* Prompt for Query */ - if (mutt_get_field ("Query: ", buf, buflen, 0) == 0 && buf[0]) + if (mutt_get_field (_("Query: "), buf, buflen, 0) == 0 && buf[0]) { results = run_query (buf, 0); } @@ -263,7 +264,7 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf) /* tell whoever called me to redraw the screen when I return */ set_option (OPTNEEDREDRAW); - snprintf (title, sizeof (title), "Query '%s'", buf); + snprintf (title, sizeof (title), _("Query '%s'"), buf); /* count the number of results */ for (queryp = results; queryp; queryp = queryp->next) @@ -280,7 +281,7 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf) { case OP_QUERY_APPEND: case OP_QUERY: - if (mutt_get_field ("Query: ", buf, buflen, 0) == 0 && buf[0]) + if (mutt_get_field (_("Query: "), buf, buflen, 0) == 0 && buf[0]) { QUERY *newresults = NULL; @@ -289,7 +290,7 @@ static void query_menu (char *buf, size_t buflen, QUERY *results, int retbuf) menu->redraw = REDRAW_FULL; if (newresults) { - snprintf (title, sizeof (title), "Query '%s'", buf); + snprintf (title, sizeof (title), _("Query '%s'"), buf); if (op == OP_QUERY) { diff --git a/recvattach.c b/recvattach.c index 1ac98c56..d1e00fd6 100644 --- a/recvattach.c +++ b/recvattach.c @@ -279,7 +279,7 @@ static int mutt_query_save_attachment (FILE *fp, BODY *body, HEADER *hdr) else buf[0] = 0; - if (mutt_get_field ("Save to file: ", buf, sizeof (buf), M_FILE | M_CLEAR) != 0 + if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), M_FILE | M_CLEAR) != 0 || !buf[0]) return -1; @@ -306,10 +306,10 @@ static int mutt_query_save_attachment (FILE *fp, BODY *body, HEADER *hdr) else if (mutt_check_overwrite (body->filename, buf, tfile, sizeof (tfile), 0)) return -1; - mutt_message ("Saving..."); + mutt_message _("Saving..."); if (mutt_save_attachment (fp, body, tfile, 0, (hdr || !is_message) ? hdr : body->hdr) == 0) { - mutt_message ("Attachment saved."); + mutt_message _("Attachment saved."); return 0; } @@ -334,7 +334,7 @@ void mutt_save_attachment_list (FILE *fp, int tag, BODY *top, HEADER *hdr) if (!buf[0]) { strfcpy (buf, NONULL (top->filename), sizeof (buf)); - if (mutt_get_field ("Save to file: ", buf, sizeof (buf), + if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), M_FILE | M_CLEAR) != 0 || !buf[0]) return; mutt_expand_path (buf, sizeof (buf)); @@ -367,7 +367,7 @@ void mutt_save_attachment_list (FILE *fp, int tag, BODY *top, HEADER *hdr) } if (!option (OPTATTACHSPLIT) && (rc == 0)) - mutt_message ("Attachment saved"); + mutt_message _("Attachment saved"); } static void @@ -379,7 +379,7 @@ mutt_query_pipe_attachment (char *command, FILE *fp, BODY *body, int filter) if (filter) { snprintf (warning, sizeof (warning), - "WARNING! You are about to overwrite %s, continue?", + _("WARNING! You are about to overwrite %s, continue?"), body->filename); if (mutt_yesorno (warning, M_NO) != M_YES) { CLEARLINE (LINES-1); @@ -397,7 +397,7 @@ mutt_query_pipe_attachment (char *command, FILE *fp, BODY *body, int filter) mutt_unlink (body->filename); mutt_rename_file (tfile, body->filename); mutt_update_encoding (body); - mutt_message ("Attachment filtered."); + mutt_message _("Attachment filtered."); } } else @@ -463,7 +463,7 @@ void mutt_pipe_attachment_list (FILE *fp, int tag, BODY *top, int filter) buf[0] = 0; memset (&state, 0, sizeof (STATE)); - if (mutt_get_field ((filter ? "Filter through: " : "Pipe to: "), + if (mutt_get_field ((filter ? _("Filter through: ") : _("Pipe to: ")), buf, sizeof (buf), M_CMD) != 0 || !buf[0]) return; @@ -498,7 +498,7 @@ static int can_print (BODY *top, int tag) { if (!mutt_can_decode (top)) { - mutt_error ("I dont know how to print %s attachments!", type); + mutt_error (_("I dont know how to print %s attachments!"), type); return (0); } } @@ -561,7 +561,7 @@ static void print_attachment_list (FILE *fp, int tag, BODY *top) void mutt_print_attachment_list (FILE *fp, int tag, BODY *top) { pid_t thepid; - if (query_quadoption (OPT_PRINT, tag ? "Print tagged attachment(s)?" : "Print attachment?") != M_YES) + if (query_quadoption (OPT_PRINT, tag ? _("Print tagged attachment(s)?") : _("Print attachment?")) != M_YES) return; if (!option (OPTATTACHSPLIT)) @@ -589,7 +589,7 @@ bounce_attachment_list (ADDRESS *adr, int tag, BODY *body, HEADER *hdr) { if (!mutt_is_message_type (body->type, body->subtype)) { - mutt_error ("You may only bounce message/rfc822 parts."); + mutt_error _("You may only bounce message/rfc822 parts."); continue; } body->hdr->msgno = hdr->msgno; @@ -610,6 +610,7 @@ static void query_bounce_attachment (int tag, BODY *top, HEADER *hdr) int rc; buf[0] = 0; + /* FIXME i18n */ snprintf (prompt, sizeof (prompt), "Bounce %smessage%s to: ", tag ? "tagged " : "", tag ? "s" : ""); rc = mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS); @@ -621,7 +622,8 @@ static void query_bounce_attachment (int tag, BODY *top, HEADER *hdr) adr = mutt_expand_aliases (adr); buf[0] = 0; rfc822_write_address (buf, sizeof (buf), adr); - snprintf (prompt, sizeof (prompt), "Bounce message%s to %s...?", (tag ? "s" : ""), buf); + snprintf (prompt, sizeof (prompt), tag ? _("Bounce messages to %s...?") + : _("Bounce message to %s...?"), buf); if (mutt_yesorno (prompt, 1) != 1) { rfc822_free_address (&adr); @@ -846,7 +848,7 @@ void mutt_view_attachments (HEADER *hdr) menu->make_entry = attach_entry; menu->tag = mutt_tag_attach; menu->menu = MENU_ATTACH; - menu->title = "Attachments"; + menu->title = _("Attachments"); menu->data = idx; menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_ATTACH, AttachHelp); @@ -901,14 +903,14 @@ void mutt_view_attachments (HEADER *hdr) if (menu->max == 1) { - mutt_message ("Only deletion of multipart attachments is supported."); + mutt_message _("Only deletion of multipart attachments is supported."); } else { #ifdef _PGPPATH if (hdr->pgp) { - mutt_message ( + mutt_message _( "Deletion of attachments from PGP messages is unsupported."); } else @@ -984,7 +986,7 @@ void mutt_view_attachments (HEADER *hdr) #ifdef _PGPPATH if ((hdr->pgp & PGPENCRYPT) && hdr->content->type == TYPEMULTIPART) { - mutt_error ( + mutt_error _( "This operation is not currently supported for PGP messages."); break; } diff --git a/rfc1524.c b/rfc1524.c index 8bda5308..9c54ef9f 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -154,7 +154,7 @@ static int get_field_text (char *field, char **entry, } else { - mutt_error ("Improperly formated entry for type %s in \"%s\" line %d", + mutt_error (_("Improperly formated entry for type %s in \"%s\" line %d"), type, filename, line); return 0; } @@ -386,7 +386,7 @@ int rfc1524_mailcap_lookup (BODY *a, char *type, rfc1524_entry *entry, int opt) */ if (!*curr) { - mutt_error ("No mailcap path specified"); + mutt_error _("No mailcap path specified"); return 0; } @@ -412,7 +412,7 @@ int rfc1524_mailcap_lookup (BODY *a, char *type, rfc1524_entry *entry, int opt) } if (entry && !found) - mutt_error ("mailcap entry for type %s not found", type); + mutt_error (_("mailcap entry for type %s not found"), type); return found; } diff --git a/score.c b/score.c index 4fa11c15..a0dba15b 100644 --- a/score.c +++ b/score.c @@ -68,7 +68,7 @@ int mutt_parse_score (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) mutt_extract_token (buf, s, 0); if (!MoreArgs (s)) { - strfcpy (err->data, "score: too few arguments", err->dsize); + strfcpy (err->data, _("score: too few arguments"), err->dsize); return (-1); } pattern = buf->data; @@ -77,7 +77,7 @@ int mutt_parse_score (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) if (MoreArgs (s)) { FREE (&pattern); - strfcpy (err->data, "score: too many arguments", err->dsize); + strfcpy (err->data, _("score: too many arguments"), err->dsize); return (-1); } diff --git a/send.c b/send.c index 53ed7153..f3806ffd 100644 --- a/send.c +++ b/send.c @@ -226,9 +226,9 @@ static int edit_envelope (ENVELOPE *en) } if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) != 0 || - (!buf[0] && query_quadoption (OPT_SUBJECT, "No subject, abort?") != 0)) + (!buf[0] && query_quadoption (OPT_SUBJECT, _("No subject, abort?")) != 0)) { - mutt_message ("No subject, aborting."); + mutt_message _("No subject, aborting."); return (-1); } safe_free ((void **) &en->subject); @@ -426,7 +426,7 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int group) * to send a message to only the sender of the message. This * provides a way to do that. */ - snprintf (prompt, sizeof (prompt), "Reply to %s?", env->reply_to->mailbox); + snprintf (prompt, sizeof (prompt), _("Reply to %s?"), env->reply_to->mailbox); if ((i = query_quadoption (OPT_REPLYTO, prompt)) == M_YES) rfc822_append (to, env->reply_to); else if (i == M_NO) @@ -507,7 +507,7 @@ envelope_defaults (ENVELOPE *env, CONTEXT *ctx, HEADER *cur, int flags) /* This could happen if the user tagged some messages and then did * a limit such that none of the tagged message are visible. */ - mutt_error ("No tagged messages are visible!"); + mutt_error _("No tagged messages are visible!"); return (-1); } } @@ -532,7 +532,7 @@ envelope_defaults (ENVELOPE *env, CONTEXT *ctx, HEADER *cur, int flags) if ((flags & SENDLISTREPLY) && !env->to) { - mutt_error ("No mailing lists found!"); + mutt_error _("No mailing lists found!"); return (-1); } @@ -619,7 +619,7 @@ generate_body (FILE *tempfp, /* stream for outgoing message */ if (flags & SENDREPLY) { - if ((i = query_quadoption (OPT_INCLUDE, "Include message in reply?")) == -1) + if ((i = query_quadoption (OPT_INCLUDE, _("Include message in reply?"))) == -1) return (-1); if (i == M_YES) @@ -633,7 +633,7 @@ generate_body (FILE *tempfp, /* stream for outgoing message */ { if (include_reply (ctx, h, tempfp) == -1) { - mutt_error ("Could not include all requested messages!"); + mutt_error _("Could not include all requested messages!"); return (-1); } fputc ('\n', tempfp); @@ -646,7 +646,7 @@ generate_body (FILE *tempfp, /* stream for outgoing message */ } else if (flags & SENDFORWARD) { - if (query_quadoption (OPT_MIMEFWD, "Forward MIME encapsulated?")) + if (query_quadoption (OPT_MIMEFWD, _("Forward MIME encapsulated?"))) { BODY *last = msg->content; @@ -857,7 +857,7 @@ ci_send_message (int flags, /* send mode */ /* If the user is composing a new message, check to see if there * are any postponed messages first. */ - if ((i = query_quadoption (OPT_RECALL, "Recall postponed message?")) == -1) + if ((i = query_quadoption (OPT_RECALL, _("Recall postponed message?"))) == -1) goto cleanup; if(i == M_YES) @@ -1087,9 +1087,9 @@ ci_send_message (int flags, /* send mode */ { /* if the file was not modified, bail out now */ if (mtime == st.st_mtime && - query_quadoption (OPT_ABORT, "Abort unmodified message?") == M_YES) + query_quadoption (OPT_ABORT, _("Abort unmodified message?")) == M_YES) { - mutt_message ("Aborted unmodified message."); + mutt_message _("Aborted unmodified message."); goto cleanup; } } @@ -1127,7 +1127,7 @@ main_loop: if (i == -1) { /* abort */ - mutt_message ("Mail not sent."); + mutt_message _("Mail not sent."); goto cleanup; } else if (i == 1) @@ -1140,7 +1140,7 @@ main_loop: msg->content = mutt_remove_multipart (msg->content); goto main_loop; } - mutt_message ("Message postponed."); + mutt_message _("Message postponed."); goto cleanup; } } @@ -1149,22 +1149,22 @@ main_loop: { if (! (flags & SENDBATCH)) { - mutt_error ("No recipients are specified!"); + mutt_error _("No recipients are specified!"); goto main_loop; } else { - puts ("No recipients were specified."); + puts _("No recipients were specified."); goto cleanup; } } if (!msg->env->subject && ! (flags & SENDBATCH) && - (i = query_quadoption (OPT_SUBJECT, "No subject, abort sending?")) != M_NO) + (i = query_quadoption (OPT_SUBJECT, _("No subject, abort sending?"))) != M_NO) { /* if the abort is automatic, print an error message */ if (quadoption (OPT_SUBJECT) == M_YES) - mutt_error ("No subject specified."); + mutt_error _("No subject specified."); goto main_loop; } @@ -1203,13 +1203,13 @@ main_loop: if (flags & SENDEDITMSG) { - int really_send = mutt_yesorno ("Message edited. Really send?", 1); + int really_send = mutt_yesorno (_("Message edited. Really send?"), 1); if (really_send != M_YES) goto main_loop; } if (!option (OPTNOCURSES) && !(flags & SENDMAILX)) - mutt_message ("Sending message..."); + mutt_message _("Sending message..."); mutt_prepare_envelope (msg->env); encode_descriptions (msg->content); @@ -1309,7 +1309,7 @@ full_fcc: } if (!option (OPTNOCURSES) && ! (flags & SENDMAILX)) - mutt_message ("Mail sent."); + mutt_message _("Mail sent."); if (flags & SENDREPLY) { diff --git a/sendlib.c b/sendlib.c index 1f04595b..eeceda66 100644 --- a/sendlib.c +++ b/sendlib.c @@ -405,7 +405,7 @@ int mutt_write_mime_body (BODY *a, FILE *f) if (!(p = mutt_get_parameter ("boundary", a->parameter))) { dprint (1, (debugfile, "mutt_write_mime_body(): no boundary parameter found!\n")); - mutt_error ("No boundary parameter found! [report this error]"); + mutt_error _("No boundary parameter found! [report this error]"); return (-1); } strfcpy (boundary, p, sizeof (boundary)); @@ -439,7 +439,7 @@ int mutt_write_mime_body (BODY *a, FILE *f) if ((fpin = fopen (a->filename, "r")) == NULL) { dprint(1,(debugfile, "write_mime_body: %s no longer exists!\n",a->filename)); - mutt_error ("%s no longer exists!", a->filename); + mutt_error (_("%s no longer exists!"), a->filename); return -1; } @@ -689,7 +689,7 @@ void mutt_message_to_7bit (BODY *a, FILE *fp) fpin = fp; else if (!a->filename || !(fpin = fopen (a->filename, "r"))) { - mutt_error ("Could not open %s", a->filename ? a->filename : "(null)"); + mutt_error (_("Could not open %s"), a->filename ? a->filename : "(null)"); return; } else @@ -1270,7 +1270,7 @@ int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach, int mode) if (mode == 0) { /* Add a vanity header */ - fprintf (fp, "X-Mailer: Mutt %s\n", VERSION); + fprintf (fp, "X-Mailer: Mutt %s\n", MUTT_VERSION); } #endif @@ -1616,13 +1616,13 @@ mutt_invoke_sendmail (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */ { const char *e = strsysexit(i); - fprintf (stderr, "Error sending message, child exited %d (%s).\n", i, NONULL (e)); + fprintf (stderr, _("Error sending message, child exited %d (%s).\n"), i, NONULL (e)); if (childout) - fprintf (stderr, "Saved output of child process to %s.\n", childout); + fprintf (stderr, _("Saved output of child process to %s.\n"), childout); if (!option (OPTNOCURSES)) { mutt_any_key_to_continue (NULL); - mutt_error ("Error sending message."); + mutt_error _("Error sending message."); } } FREE (&childout); diff --git a/signal.c b/signal.c index b8e63f72..dba16da3 100644 --- a/signal.c +++ b/signal.c @@ -35,12 +35,12 @@ RETSIGTYPE mutt_exit_handler (int sig) curs_set (1); endwin (); /* just to be safe */ #if SYS_SIGLIST_DECLARED - printf("Caught %s... Exiting.\n", sys_siglist[sig]); + printf(_("Caught %s... Exiting.\n"), sys_siglist[sig]); #else #if (__sun__ && __svr4__) - printf("Caught %s... Exiting.\n", _sys_siglist[sig]); + printf(_("Caught %s... Exiting.\n"), _sys_siglist[sig]); #else - printf("Caught signal %d... Exiting.\n", sig); + printf(_("Caught signal %d... Exiting.\n"), sig); #endif #endif exit (0); diff --git a/sort.c b/sort.c index 292435e5..3da38eeb 100644 --- a/sort.c +++ b/sort.c @@ -195,7 +195,7 @@ void mutt_sort_headers (CONTEXT *ctx, int init) } if (!ctx->quiet) - mutt_message ("Sorting mailbox..."); + mutt_message _("Sorting mailbox..."); /* threads may be bogus, so clear the links */ if (init) @@ -223,7 +223,7 @@ void mutt_sort_headers (CONTEXT *ctx, int init) else if ((sortfunc = mutt_get_sort_func (Sort)) == NULL || (AuxSort = mutt_get_sort_func (SortAux)) == NULL) { - mutt_error ("Could not find sorting function! [report this bug]"); + mutt_error _("Could not find sorting function! [report this bug]"); sleep (1); return; } diff --git a/stamp-h.in b/stamp-h.in new file mode 100644 index 00000000..9788f702 --- /dev/null +++ b/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/status.c b/status.c index 192e6b17..0eadf49a 100644 --- a/status.c +++ b/status.c @@ -98,7 +98,7 @@ status_format_str (char *buf, size_t buflen, char op, const char *src, mutt_pretty_mailbox (tmp); } else - strfcpy (tmp, "(no mailbox)", sizeof (tmp)); + strfcpy (tmp, _("(no mailbox)"), sizeof (tmp)); snprintf (buf, buflen, fmt, tmp); break; @@ -253,7 +253,7 @@ status_format_str (char *buf, size_t buflen, char op, const char *src, case 'v': snprintf (fmt, sizeof (fmt), "Mutt %%s"); - snprintf (buf, buflen, fmt, VERSION); + snprintf (buf, buflen, fmt, MUTT_VERSION); break; case 'V': diff --git a/thread.c b/thread.c index d22b5938..0e7db4c3 100644 --- a/thread.c +++ b/thread.c @@ -625,7 +625,7 @@ int _mutt_aside_thread (HEADER *hdr, short dir, short subthreads) if ((Sort & SORT_MASK) != SORT_THREADS) { - mutt_error ("Threading is not enabled."); + mutt_error _("Threading is not enabled."); return (hdr->virtual); }