]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Support for Scheme.
authorBruno Haible <bruno@clisp.org>
Tue, 18 Jan 2005 11:47:03 +0000 (11:47 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:06 +0000 (12:12 +0200)
20 files changed:
NEWS
gettext-tools/doc/ChangeLog
gettext-tools/doc/gettext.texi
gettext-tools/doc/xgettext.texi
gettext-tools/examples/ChangeLog
gettext-tools/examples/Makefile.am
gettext-tools/examples/README
gettext-tools/examples/po/Makefile.am
gettext-tools/src/ChangeLog
gettext-tools/src/FILES
gettext-tools/src/Makefile.am
gettext-tools/src/Makefile.msvc
gettext-tools/src/Makefile.vms
gettext-tools/src/format.c
gettext-tools/src/format.h
gettext-tools/src/message.c
gettext-tools/src/message.h
gettext-tools/src/xgettext.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/Makefile.am

diff --git a/NEWS b/NEWS
index 90c7125c539ad58c916505f9922633765ed04e79..6ec7d4dfae953fd9947a9dff628e33c854149339 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,14 @@
 Version 0.14.2 - January 2005
 
 * Improved detection of the locale on MacOS X.
+
 * The gettext autoconf macros now require autoconf 2.50 or newer.
+
+* Programming languages support:
+
+  - Scheme:
+    xgettext now also supports Scheme. Best used with guile 1.7 or newer.
+
 * msggrep is much faster now.
 \f
 Version 0.14 - January 2004
index b55de9d07a3c08f23b730c1a91e5776c0ee836bb..1535dbdf5cc759abad845fb093bdcba7ef3e6889 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-16  Bruno Haible  <bruno@clisp.org>
+
+       Support for Scheme.
+       * gettext.texi (PO Files): Mention scheme-format.
+       (scheme-format): New subsection.
+       (Scheme): New subsection.
+       * xgettext.texi: Document Scheme source language. Document that it is
+       applicable to --flag.
+
 2005-01-11  Bruno Haible  <bruno@clisp.org>
 
        * gettext.texi: Put the table of contents at the beginning, after the
index 582682e9ce6d703287c4ef9fa928b39ae89c7708..33ed892ac2e943c73719d402ea7de16e473b676d 100644 (file)
@@ -61,7 +61,7 @@
 This file provides documentation for GNU @code{gettext} utilities.
 It also serves as a reference for the free Translation Project.
 
-Copyright (C) 1995-1998, 2001-2004 Free Software Foundation, Inc.
+Copyright (C) 1995-1998, 2001-2005 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -339,6 +339,7 @@ The Translator's View
 * lisp-format::                 Lisp Format Strings
 * elisp-format::                Emacs Lisp Format Strings
 * librep-format::               librep Format Strings
+* scheme-format::               Scheme Format Strings
 * smalltalk-format::            Smalltalk Format Strings
 * java-format::                 Java Format Strings
 * csharp-format::               C# Format Strings
@@ -361,6 +362,7 @@ Individual Programming Languages
 * clisp C::                     GNU clisp C sources
 * Emacs Lisp::                  Emacs Lisp
 * librep::                      librep
+* Scheme::                      GNU guile - Scheme
 * Smalltalk::                   GNU Smalltalk
 * Java::                        Java
 * C#::                          C#
@@ -1212,6 +1214,12 @@ Likewise for Emacs Lisp, see @ref{elisp-format}.
 @kwindex no-librep-format@r{ flag}
 Likewise for librep, see @ref{librep-format}.
 
+@item scheme-format
+@kwindex scheme-format@r{ flag}
+@itemx no-scheme-format
+@kwindex no-scheme-format@r{ flag}
+Likewise for Scheme, see @ref{scheme-format}.
+
 @item smalltalk-format
 @kwindex smalltalk-format@r{ flag}
 @itemx no-smalltalk-format
@@ -7403,6 +7411,7 @@ strings.
 * lisp-format::                 Lisp Format Strings
 * elisp-format::                Emacs Lisp Format Strings
 * librep-format::               librep Format Strings
+* scheme-format::               Scheme Format Strings
 * smalltalk-format::            Smalltalk Format Strings
 * java-format::                 Java Format Strings
 * csharp-format::               C# Format Strings
@@ -7514,7 +7523,7 @@ section @w{Formatting Strings},
 Note that as of version 21, XEmacs supports numbered argument specifications
 in format strings while FSF Emacs doesn't.
 
-@node librep-format, smalltalk-format, elisp-format, Translators for other Languages
+@node librep-format, scheme-format, elisp-format, Translators for other Languages
 @subsection librep Format Strings
 
 librep format strings are documented in the librep manual, section
@@ -7522,7 +7531,13 @@ librep format strings are documented in the librep manual, section
 @url{http://librep.sourceforge.net/librep-manual.html#Formatted%20Output},
 @url{http://www.gwinnup.org/research/docs/librep.html#SEC122}.
 
-@node smalltalk-format, java-format, librep-format, Translators for other Languages
+@node scheme-format, smalltalk-format, librep-format, Translators for other Languages
+@subsection Scheme Format Strings
+
+Scheme format strings are documented in the SLIB manual, section
+@w{Format Specification}.
+
+@node smalltalk-format, java-format, scheme-format, Translators for other Languages
 @subsection Smalltalk Format Strings
 
 Smalltalk format strings are described in the GNU Smalltalk documentation,
@@ -7714,6 +7729,7 @@ that language, and to combine the resulting files using @code{msgcat}.
 * clisp C::                     GNU clisp C sources
 * Emacs Lisp::                  Emacs Lisp
 * librep::                      librep
+* Scheme::                      GNU guile - Scheme
 * Smalltalk::                   GNU Smalltalk
 * Java::                        Java
 * C#::                          C#
@@ -8276,7 +8292,7 @@ Only XEmacs.  Without @code{I18N3} defined at build time, no translation.
 ---
 @end table
 
-@node librep, Smalltalk, Emacs Lisp, List of Programming Languages
+@node librep, Scheme, Emacs Lisp, List of Programming Languages
 @subsection librep
 @cindex @code{librep} Lisp
 
@@ -8326,7 +8342,60 @@ On platforms without gettext, no translation.
 
 An example is available in the @file{examples} directory: @code{hello-librep}.
 
-@node Smalltalk, Java, librep, List of Programming Languages
+@node Scheme, Smalltalk, librep, List of Programming Languages
+@subsection GNU guile - Scheme
+@cindex Scheme
+@cindex guile
+
+@table @asis
+@item RPMs
+guile
+
+@item File extension
+@code{scm}
+
+@item String syntax
+@code{"abc"}
+
+@item gettext shorthand
+@code{(_ "abc")}
+
+@item gettext/ngettext functions
+@code{gettext}, @code{ngettext}
+
+@item textdomain
+@code{textdomain}
+
+@item bindtextdomain
+@code{bindtextdomain}
+
+@item setlocale
+automatic
+
+@item Prerequisite
+@code{(use-modules (ice-9 format))}
+
+@item Use or emulate GNU gettext
+use
+
+@item Extractor
+@code{xgettext -k_}
+
+@item Formatting with positions
+@c @code{format "~1@@*~D ~0@@*~D~2@@*"}, requires @code{(use-modules (ice-9 format))}
+@c not yet supported
+---
+
+@item Portability
+On platforms without gettext, no translation.
+
+@item po-mode marking
+---
+@end table
+
+An example is available in the @file{examples} directory: @code{hello-guile}.
+
+@node Smalltalk, Java, Scheme, List of Programming Languages
 @subsection GNU Smalltalk
 @cindex Smalltalk
 
index ea4ccab9fee492dd40d00c2af59aff08a6360921..a9602b2cb9eb6ba7bb9433684e05f82a1c409dfe 100644 (file)
@@ -70,10 +70,10 @@ is written to standard output.
 @cindex supported languages, @code{xgettext}
 Specifies the language of the input files.  The supported languages
 are @code{C}, @code{C++}, @code{ObjectiveC}, @code{PO}, @code{Python},
-@code{Lisp}, @code{EmacsLisp}, @code{librep}, @code{Smalltalk}, @code{Java},
-@code{JavaProperties}, @code{C#}, @code{awk}, @code{YCP}, @code{Tcl},
-@code{Perl}, @code{PHP}, @code{GCC-source}, @code{NXStringTable}, @code{RST},
-@code{Glade}.
+@code{Lisp}, @code{EmacsLisp}, @code{librep}, @code{Scheme}, @code{Smalltalk},
+@code{Java}, @code{JavaProperties}, @code{C#}, @code{awk}, @code{YCP},
+@code{Tcl}, @code{Perl}, @code{PHP}, @code{GCC-source}, @code{NXStringTable},
+@code{RST}, @code{Glade}.
 
 @item -C
 @itemx --c++
@@ -210,7 +210,7 @@ translators cannot accidentally use format string directives that would
 lead to a crash at runtime.
 @*
 This option has an effect with most languages, namely C, C++, ObjectiveC,
-Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, YCP, Tcl, Perl, PHP,
+Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP,
 GCC-source.
 
 @item -T
index 096f2bc73147cbee35e2695f6a878314385f558b..d03656e68ed8d896ed8a7acb798e547d15b95d06 100644 (file)
@@ -1,3 +1,15 @@
+2005-01-16  Bruno Haible  <bruno@clisp.org>
+
+       Support for Scheme.
+       * hello-guile: New subdirectory.
+       * README: Mention it.
+       * Makefile.am (EXAMPLESFILES): Add the files in hello-guile.
+       * po/Makefile.am (POTFILES): Add hello-guile source.
+       (SMALLPOTS): Add hello-guile.pot.
+       (hello-guile.pot): New rule.
+       (SMALLPOFILES_FOR_lang): Add hello-guile elements.
+       (../hello-guile/po/$(LL).po): New rule.
+
 2005-01-06  Bruno Haible  <bruno@clisp.org>
 
        * po/el.po: New file, from Simos Xenitellis <simos74@gmx.net>.
index ff9efc3fddf7019c12eadc79ae651cd1221e521e..fccd187c0f64709a6ec3640b5563c9e533332683 100644 (file)
@@ -430,6 +430,33 @@ EXAMPLESFILES = \
   hello-librep/po/uk.po \
   hello-librep/po/zh_CN.po \
   \
+  hello-guile/INSTALL \
+  hello-guile/autogen.sh \
+  hello-guile/autoclean.sh \
+  hello-guile/hello.scm \
+  hello-guile/Makefile.am \
+  hello-guile/configure.ac \
+  hello-guile/m4/Makefile.am \
+  hello-guile/po/Makefile.am \
+  hello-guile/po/LINGUAS \
+  hello-guile/po/af.po \
+  hello-guile/po/ca.po \
+  hello-guile/po/de.po \
+  hello-guile/po/el.po \
+  hello-guile/po/es.po \
+  hello-guile/po/fr.po \
+  hello-guile/po/ja.po \
+  hello-guile/po/nl.po \
+  hello-guile/po/pl.po \
+  hello-guile/po/ro.po \
+  hello-guile/po/ru.po \
+  hello-guile/po/sk.po \
+  hello-guile/po/sr.po \
+  hello-guile/po/sv.po \
+  hello-guile/po/tr.po \
+  hello-guile/po/uk.po \
+  hello-guile/po/zh_CN.po \
+  \
   hello-smalltalk/INSTALL \
   hello-smalltalk/autogen.sh \
   hello-smalltalk/autoclean.sh \
index 01b17cdfc6aff4e8af2a63012dd17a331220e631..2095e8e132f151de7263c7ee62075ef0029feafa 100644 (file)
@@ -18,6 +18,7 @@ environment.
     hello-python               Python
     hello-clisp                Lisp
     hello-librep               librep
+    hello-guile                Scheme
     hello-smalltalk            Smalltalk
     hello-java                 Java
     hello-java-awt             Java              AWT
index b954657453a8d5693ecb6e0deb60dfabe86e7561..a4c3f3b17f4f8a5366c7586fca280d8bf8f867a1 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/examples/po subdirectory of GNU gettext
-## Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+## Copyright (C) 1995-1998, 2000-2004 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
@@ -40,6 +40,7 @@ POTFILES = \
   examples/hello-python/hello.py.in \
   examples/hello-clisp/hello.lisp.in \
   examples/hello-librep/hello.jl.in \
+  examples/hello-guile/hello.scm \
   examples/hello-smalltalk/hello.st.in \
   examples/hello-java/Hello.java \
   examples/hello-java-awt/Hello.java \
@@ -70,6 +71,7 @@ SMALLPOTS = \
   hello-python.pot \
   hello-clisp.pot \
   hello-librep.pot \
+  hello-guile.pot \
   hello-smalltalk.pot \
   hello-java.pot \
   hello-java-awt.pot \
@@ -227,6 +229,9 @@ hello-clisp.pot : $(POTFILES_DEPS)
 hello-librep.pot : $(POTFILES_DEPS)
        $(SHELL) xsmallpot.sh hello-librep
 
+hello-guile.pot : $(POTFILES_DEPS)
+       $(SHELL) xsmallpot.sh hello-guile
+
 hello-smalltalk.pot : $(POTFILES_DEPS)
        $(SHELL) xsmallpot.sh hello-smalltalk
 
@@ -352,6 +357,7 @@ SMALLPOFILES_FOR_lang = \
   ../hello-python/po/$$lang.po \
   ../hello-clisp/po/$$lang.po \
   ../hello-librep/po/$$lang.po \
+  ../hello-guile/po/$$lang.po \
   ../hello-smalltalk/po/$$lang.po \
   ../hello-java/po/$$lang.po \
   ../hello-java-awt/po/$$lang.po \
@@ -405,6 +411,9 @@ SMALLPOFILES_FOR_lang = \
 ../hello-librep/po/$(LL).po: hello-librep.pot $(LL).po
        $(SHELL) mmsmallpo.sh hello-librep $(LL)
 
+../hello-guile/po/$(LL).po: hello-guile.pot $(LL).po
+       $(SHELL) mmsmallpo.sh hello-guile $(LL)
+
 ../hello-smalltalk/po/$(LL).po: hello-smalltalk.pot $(LL).po
        $(SHELL) mmsmallpo.sh hello-smalltalk $(LL)
 
index 0adf6252a48149e0a6a58f0e0a6aae4e57ae4bd2..358bd5319c61bfd74aa14e53c926fc35f1418e56 100644 (file)
@@ -1,3 +1,34 @@
+2005-01-16  Bruno Haible  <bruno@clisp.org>
+
+       Support for Scheme.
+       * message.h (format_type): New enum value 'format_scheme'.
+       (NFORMATS): Increment.
+       * message.c (format_language): Add format_scheme entry.
+       (format_language_pretty): Likewise.
+       * format.h (formatstring_scheme): New declaration.
+       * format-scheme.c: New file, based on format-lisp.c.
+       * format.c (formatstring_parsers): Add formatstring_scheme.
+       * x-scheme.h: New file.
+       * x-scheme.c: New file.
+       * xgettext.c: Include x-scheme.h.
+       (flag_table_scheme): New variable.
+       (main): Invoke init_flag_table_scheme, x_scheme_extract_all,
+       x_scheme_keyword.
+       (usage): Mention Scheme source language.
+       (xgettext_record_flag): Handle format_scheme.
+       (language_to_extractor): Add Scheme rule.
+       (extension_to_language): Add Scheme rule.
+       * Makefile.am (noinst_HEADERS): Add x-scheme.h.
+       (FORMAT_SOURCE): Add format-scheme.c.
+       (xgettext_SOURCES): Add x-scheme.c.
+       * Makefile.msvc (OBJECTS): Add format-scheme.obj.
+       (xgettext_OBJECTS): Add x-scheme.obj.
+       (format-scheme.obj, x-scheme.obj): New rules.
+       * Makefile.vms (OBJECTS): Add format-scheme.obj.
+       (xgettext_OBJECTS): Add x-scheme.obj.
+       (format-scheme.obj, x-scheme.obj): New rules.
+       * FILES: Update.
+
 2005-01-08  Bruno Haible  <bruno@clisp.org>
 
        * msggrep.c (grep_args, grep_path, grep_argv): Remove variables.
index d5f76e8d7a27aa760785f958085b7fcb2d9a4121..c42f0df0b5aa14608181036c19ad9dbcab0b2655 100644 (file)
@@ -199,6 +199,7 @@ format-python.c        Format string handling for Python.
 format-lisp.c          Format string handling for Common Lisp.
 format-elisp.c         Format string handling for Emacs Lisp.
 format-librep.c        Format string handling for librep.
+format-scheme.c        Format string handling for Scheme.
 format-java.c          Format string handling for Java.
 format-csharp.c        Format string handling for C#.
 format-awk.c           Format string handling for awk.
@@ -270,6 +271,9 @@ format.c        Table of the language dependent format string handlers.
 | x-librep.h
 | x-librep.c
 |               String extractor for librep.
+| x-scheme.h
+| x-scheme.c
+|               String extractor for Scheme.
 | x-smalltalk.h
 | x-smalltalk.c
 |               String extractor for Smalltalk.
index d1aafbaa44a55ccb7abb7a379bc5152e34b26ff8..2e54ded8e5c5cdd5e8024affa071ad0116fdb063 100644 (file)
@@ -50,8 +50,8 @@ read-tcl.h write-tcl.h \
 write-qt.h \
 po-time.h plural-table.h format.h \
 xgettext.h x-c.h x-po.h x-sh.h x-python.h x-lisp.h x-elisp.h x-librep.h \
-x-smalltalk.h x-java.h x-properties.h x-csharp.h x-awk.h x-ycp.h x-tcl.h \
-x-perl.h x-php.h x-stringtable.h x-rst.h x-glade.h
+x-scheme.h x-smalltalk.h x-java.h x-properties.h x-csharp.h x-awk.h x-ycp.h \
+x-tcl.h x-perl.h x-php.h x-stringtable.h x-rst.h x-glade.h
 
 EXTRA_DIST += FILES project-id ChangeLog.0
 
@@ -105,9 +105,9 @@ read-properties.c read-stringtable.c open-po.c dir-list.c str-list.c
 # xgettext and msgfmt deal with format strings.
 FORMAT_SOURCE = format.c format-invalid.h \
 format-c.c format-sh.c format-python.c format-lisp.c format-elisp.c \
-format-librep.c format-java.c format-csharp.c format-awk.c format-pascal.c \
-format-ycp.c format-tcl.c format-perl.c format-perl-brace.c format-php.c \
-format-gcc-internal.c format-qt.c
+format-librep.c format-scheme.c format-java.c format-csharp.c format-awk.c \
+format-pascal.c format-ycp.c format-tcl.c format-perl.c format-perl-brace.c \
+format-php.c format-gcc-internal.c format-qt.c
 
 # libgettextsrc contains all code that is needed by at least two programs.
 libgettextsrc_la_SOURCES = \
@@ -138,9 +138,9 @@ msgmerge_SOURCES = msgmerge.c plural-count.c
 msgunfmt_SOURCES = msgunfmt.c \
   read-mo.c read-java.c read-csharp.c read-resources.c read-tcl.c
 xgettext_SOURCES = xgettext.c \
-  x-c.c x-po.c x-sh.c x-python.c x-lisp.c x-elisp.c x-librep.c x-smalltalk.c \
-  x-java.c x-csharp.c x-awk.c x-ycp.c x-tcl.c x-perl.c x-php.c x-rst.c \
-  x-glade.c
+  x-c.c x-po.c x-sh.c x-python.c x-lisp.c x-elisp.c x-librep.c x-scheme.c \
+  x-smalltalk.c x-java.c x-csharp.c x-awk.c x-ycp.c x-tcl.c x-perl.c x-php.c \
+  x-rst.c x-glade.c
 msgattrib_SOURCES = msgattrib.c
 msgcat_SOURCES = msgcat.c
 msgcomm_SOURCES = msgcomm.c
index 373ed424d53d2b5d22913b2fd7018bc2a859652f..893d45aa5abd2f719e8b79b716aa5d97c7863501 100644 (file)
@@ -138,6 +138,7 @@ OBJECTS = \
   format-lisp.obj \
   format-elisp.obj \
   format-librep.obj \
+  format-scheme.obj \
   format-java.obj \
   format-csharp.obj \
   format-awk.obj \
@@ -154,7 +155,7 @@ msgcmp_OBJECTS = msgcmp.obj
 msgfmt_OBJECTS = msgfmt.obj write-mo.obj write-java.obj write-csharp.obj write-resources.obj write-tcl.obj write-qt.obj plural-eval.obj
 msgmerge_OBJECTS = msgmerge.obj plural-count.obj
 msgunfmt_OBJECTS = msgunfmt.obj read-mo.obj read-java.obj read-csharp.obj read-resources.obj read-tcl.obj
-xgettext_OBJECTS = xgettext.obj x-c.obj x-po.obj x-sh.obj x-python.obj x-lisp.obj x-elisp.obj x-librep.obj x-smalltalk.obj x-java.obj x-csharp.obj x-awk.obj x-ycp.obj x-tcl.obj x-perl.obj x-php.obj x-rst.obj x-glade.obj
+xgettext_OBJECTS = xgettext.obj x-c.obj x-po.obj x-sh.obj x-python.obj x-lisp.obj x-elisp.obj x-librep.obj x-scheme.obj x-smalltalk.obj x-java.obj x-csharp.obj x-awk.obj x-ycp.obj x-tcl.obj x-perl.obj x-php.obj x-rst.obj x-glade.obj
 msgattrib_OBJECTS = msgattrib.obj
 msgcat_OBJECTS = msgcat.obj
 msgcomm_OBJECTS = msgcomm.obj
@@ -272,6 +273,9 @@ format-elisp.obj : format-elisp.c
 format-librep.obj : format-librep.c
        $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-librep.c
 
+format-scheme.obj : format-scheme.c
+       $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-scheme.c
+
 format-java.obj : format-java.c
        $(CC) $(INCLUDES) $(CFLAGS) $(PICFLAGS) -c format-java.c
 
@@ -399,6 +403,9 @@ x-elisp.obj : x-elisp.c
 x-librep.obj : x-librep.c
        $(CC) $(INCLUDES) $(CFLAGS) -c x-librep.c
 
+x-scheme.obj : x-scheme.c
+       $(CC) $(INCLUDES) $(CFLAGS) -c x-scheme.c
+
 x-smalltalk.obj : x-smalltalk.c
        $(CC) $(INCLUDES) $(CFLAGS) -c x-smalltalk.c
 
index 509d4855b6e0f5135eaa779e940b608feec7ac51..38a2e27bd330aa0e0b248707e9f58c3bea6d4706 100644 (file)
@@ -84,6 +84,7 @@ OBJECTS = \
   format-lisp.obj, \
   format-elisp.obj, \
   format-librep.obj, \
+  format-scheme.obj, \
   format-java.obj, \
   format-csharp.obj, \
   format-awk.obj, \
@@ -100,7 +101,7 @@ msgcmp_OBJECTS = msgcmp.obj
 msgfmt_OBJECTS = msgfmt.obj, write-mo.obj, write-java.obj, write-csharp.obj, write-resources.obj, write-tcl.obj, write-qt.obj, plural-eval.obj
 msgmerge_OBJECTS = msgmerge.obj, plural-count.obj
 msgunfmt_OBJECTS = msgunfmt.obj, read-mo.obj, read-java.obj, read-csharp.obj, read-resources.obj, read-tcl.obj
-xgettext_OBJECTS = xgettext.obj, x-c.obj, x-po.obj, x-sh.obj, x-python.obj, x-lisp.obj, x-elisp.obj, x-librep.obj, x-smalltalk.obj, x-java.obj, x-csharp.obj, x-awk.obj, x-ycp.obj, x-tcl.obj, x-perl.obj, x-php.obj, x-rst.obj, x-glade.obj
+xgettext_OBJECTS = xgettext.obj, x-c.obj, x-po.obj, x-sh.obj, x-python.obj, x-lisp.obj, x-elisp.obj, x-librep.obj, x-scheme.obj, x-smalltalk.obj, x-java.obj, x-csharp.obj, x-awk.obj, x-ycp.obj, x-tcl.obj, x-perl.obj, x-php.obj, x-rst.obj, x-glade.obj
 msgattrib_OBJECTS = msgattrib.obj
 msgcat_OBJECTS = msgcat.obj
 msgcomm_OBJECTS = msgcomm.obj
@@ -216,6 +217,9 @@ format-elisp.obj : format-elisp.c
 format-librep.obj : format-librep.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) format-librep.c
 
+format-scheme.obj : format-scheme.c
+       $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) format-scheme.c
+
 format-java.obj : format-java.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) format-java.c
 
@@ -329,6 +333,9 @@ x-elisp.obj : x-elisp.c
 x-librep.obj : x-librep.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) x-librep.c
 
+x-scheme.obj : x-scheme.c
+       $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) x-scheme.c
+
 x-smalltalk.obj : x-smalltalk.c
        $(CC) $(INCLUDES) $(CFLAGS) /define=($(DEFS)) x-smalltalk.c
 
index 38d9be75f30f9a3bf3c995d060f01fadaa29865b..6ec901c0f5e3dbe5133f28799a12dad427c5bfcb 100644 (file)
@@ -41,6 +41,7 @@ struct formatstring_parser *formatstring_parsers[NFORMATS] =
   /* format_lisp */            &formatstring_lisp,
   /* format_elisp */           &formatstring_elisp,
   /* format_librep */          &formatstring_librep,
+  /* format_scheme */          &formatstring_scheme,
   /* format_smalltalk */       &formatstring_smalltalk,
   /* format_java */            &formatstring_java,
   /* format_csharp */          &formatstring_csharp,
index cbd9f57d15ec4ccb6886e820278749938be455f0..5f9dc28871a608727627115318553073fcdce323 100644 (file)
@@ -75,6 +75,7 @@ extern DLL_VARIABLE struct formatstring_parser formatstring_python;
 extern DLL_VARIABLE struct formatstring_parser formatstring_lisp;
 extern DLL_VARIABLE struct formatstring_parser formatstring_elisp;
 extern DLL_VARIABLE struct formatstring_parser formatstring_librep;
+extern DLL_VARIABLE struct formatstring_parser formatstring_scheme;
 extern DLL_VARIABLE struct formatstring_parser formatstring_smalltalk;
 extern DLL_VARIABLE struct formatstring_parser formatstring_java;
 extern DLL_VARIABLE struct formatstring_parser formatstring_csharp;
index c75aa16eb3eb07dc0e4e365fdcef14f9fd8036c7..27de7bf848e477e8614167961b8b8fa545245845 100644 (file)
@@ -41,6 +41,7 @@ const char *const format_language[NFORMATS] =
   /* format_lisp */            "lisp",
   /* format_elisp */           "elisp",
   /* format_librep */          "librep",
+  /* format_scheme */          "scheme",
   /* format_smalltalk */       "smalltalk",
   /* format_java */            "java",
   /* format_csharp */          "csharp",
@@ -64,6 +65,7 @@ const char *const format_language_pretty[NFORMATS] =
   /* format_lisp */            "Lisp",
   /* format_elisp */           "Emacs Lisp",
   /* format_librep */          "librep",
+  /* format_scheme */          "Scheme",
   /* format_smalltalk */       "Smalltalk",
   /* format_java */            "Java",
   /* format_csharp */          "C#",
index ebbb848e6a07254edd5267491c7698cc599738c7..e9b6aed9470986e1e2ef57231a958a841482f98d 100644 (file)
@@ -47,6 +47,7 @@ enum format_type
   format_lisp,
   format_elisp,
   format_librep,
+  format_scheme,
   format_smalltalk,
   format_java,
   format_csharp,
@@ -60,7 +61,7 @@ enum format_type
   format_gcc_internal,
   format_qt
 };
-#define NFORMATS 19    /* Number of format_type enum values.  */
+#define NFORMATS 20    /* Number of format_type enum values.  */
 extern DLL_VARIABLE const char *const format_language[NFORMATS];
 extern DLL_VARIABLE const char *const format_language_pretty[NFORMATS];
 
index dba5ff4db902e33644ee071a51813347cdb558d7..e63bdc22fea8f5317b3c1785cab7690d0d9789ed 100644 (file)
@@ -77,6 +77,7 @@ extern "C" {
 #include "x-lisp.h"
 #include "x-elisp.h"
 #include "x-librep.h"
+#include "x-scheme.h"
 #include "x-smalltalk.h"
 #include "x-java.h"
 #include "x-properties.h"
@@ -144,6 +145,7 @@ static flag_context_list_table_ty flag_table_python;
 static flag_context_list_table_ty flag_table_lisp;
 static flag_context_list_table_ty flag_table_elisp;
 static flag_context_list_table_ty flag_table_librep;
+static flag_context_list_table_ty flag_table_scheme;
 static flag_context_list_table_ty flag_table_java;
 static flag_context_list_table_ty flag_table_csharp;
 static flag_context_list_table_ty flag_table_awk;
@@ -299,6 +301,7 @@ main (int argc, char *argv[])
   init_flag_table_lisp ();
   init_flag_table_elisp ();
   init_flag_table_librep ();
+  init_flag_table_scheme ();
   init_flag_table_java ();
   init_flag_table_csharp ();
   init_flag_table_awk ();
@@ -321,6 +324,7 @@ main (int argc, char *argv[])
        x_lisp_extract_all ();
        x_elisp_extract_all ();
        x_librep_extract_all ();
+       x_scheme_extract_all ();
        x_java_extract_all ();
        x_csharp_extract_all ();
        x_awk_extract_all ();
@@ -384,6 +388,7 @@ main (int argc, char *argv[])
            x_lisp_keyword (optarg);
            x_elisp_keyword (optarg);
            x_librep_keyword (optarg);
+           x_scheme_keyword (optarg);
            x_java_keyword (optarg);
            x_csharp_keyword (optarg);
            x_awk_keyword (optarg);
@@ -754,7 +759,7 @@ Choice of input file language:\n"));
       printf (_("\
   -L, --language=NAME         recognise the specified language\n\
                                 (C, C++, ObjectiveC, PO, Shell, Python, Lisp,\n\
-                                EmacsLisp, librep, Smalltalk, Java,\n\
+                                EmacsLisp, librep, Scheme, Smalltalk, Java,\n\
                                 JavaProperties, C#, awk, YCP, Tcl, Perl, PHP,\n\
                                 GCC-source, NXStringTable, RST, Glade)\n"));
       printf (_("\
@@ -786,22 +791,22 @@ Language specific options:\n"));
   -a, --extract-all           extract all strings\n"));
       printf (_("\
                                 (only languages C, C++, ObjectiveC, Shell,\n\
-                                Python, Lisp, EmacsLisp, librep, Java, C#, awk,\n\
-                                Tcl, Perl, PHP, GCC-source, Glade)\n"));
+                                Python, Lisp, EmacsLisp, librep, Scheme, Java,\n\
+                                C#, awk, Tcl, Perl, PHP, GCC-source, Glade)\n"));
       printf (_("\
   -k, --keyword[=WORD]        additional keyword to be looked for (without\n\
                               WORD means not to use default keywords)\n"));
       printf (_("\
                                 (only languages C, C++, ObjectiveC, Shell,\n\
-                                Python, Lisp, EmacsLisp, librep, Java, C#, awk,\n\
-                                Tcl, Perl, PHP, GCC-source, Glade)\n"));
+                                Python, Lisp, EmacsLisp, librep, Scheme, Java,\n\
+                                C#, awk, Tcl, Perl, PHP, GCC-source, Glade)\n"));
       printf (_("\
       --flag=WORD:ARG:FLAG    additional flag for strings inside the argument\n\
                               number ARG of keyword WORD\n"));
       printf (_("\
                                 (only languages C, C++, ObjectiveC, Shell,\n\
-                                Python, Lisp, EmacsLisp, librep, Java, C#, awk,\n\
-                                YCP, Tcl, Perl, PHP, GCC-source)\n"));
+                                Python, Lisp, EmacsLisp, librep, Scheme, Java,\n\
+                                C#, awk, YCP, Tcl, Perl, PHP, GCC-source)\n"));
       printf (_("\
   -T, --trigraphs             understand ANSI C trigraphs for input\n"));
       printf (_("\
@@ -1383,6 +1388,11 @@ xgettext_record_flag (const char *optionstring)
                                                    name_start, name_end,
                                                    argnum, value, pass);
                    break;
+                 case format_scheme:
+                   flag_context_list_table_insert (&flag_table_scheme, 0,
+                                                   name_start, name_end,
+                                                   argnum, value, pass);
+                   break;
                  case format_smalltalk:
                    break;
                  case format_java:
@@ -2211,6 +2221,7 @@ language_to_extractor (const char *name)
     SCANNERS_LISP
     SCANNERS_ELISP
     SCANNERS_LIBREP
+    SCANNERS_SCHEME
     SCANNERS_SMALLTALK
     SCANNERS_JAVA
     SCANNERS_PROPERTIES
@@ -2276,6 +2287,7 @@ extension_to_language (const char *extension)
     EXTENSIONS_LISP
     EXTENSIONS_ELISP
     EXTENSIONS_LIBREP
+    EXTENSIONS_SCHEME
     EXTENSIONS_SMALLTALK
     EXTENSIONS_JAVA
     EXTENSIONS_PROPERTIES
index 6b65a4391463487cc050523a88413613a7bdd15d..8a556ad2366f1eb2ef63407590369d37f721d1e0 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-16  Bruno Haible  <bruno@clisp.org>
+
+       Support for Scheme.
+       * format-scheme-1: New file.
+       * format-scheme-2: New file.
+       * xgettext-scheme-1: New file.
+       * lang-guile: New file.
+       * Makefile.am (TESTS): Add them.
+
 2005-01-08  Bruno Haible  <bruno@clisp.org>
 
        * msggrep-4: Remove unportability notes.
index f4480108eac0e1f3408686a6730ae71cd12fbceb..a57272cf524da1751dd349f7142a9579f755b5c4 100644 (file)
@@ -77,6 +77,7 @@ TESTS = gettext-1 gettext-2 \
        xgettext-po-1 \
        xgettext-properties-1 \
        xgettext-python-1 xgettext-python-2 \
+       xgettext-scheme-1 \
        xgettext-sh-1 xgettext-sh-2 xgettext-sh-3 \
        xgettext-smalltalk-1 \
        xgettext-stringtable-1 \
@@ -97,14 +98,15 @@ TESTS = gettext-1 gettext-2 \
        format-perl-brace-1 format-perl-brace-2 \
        format-perl-mixed-1 format-perl-mixed-2 \
        format-qt-1 format-qt-2 \
+       format-scheme-1 format-scheme-2 \
        format-sh-1 format-sh-2 \
        format-tcl-1 format-tcl-2 \
        format-ycp-1 format-ycp-2 \
        plural-1 plural-2 \
        lang-c lang-c++ lang-objc lang-sh lang-bash lang-python-1 \
-       lang-python-2 lang-clisp lang-elisp lang-librep lang-smalltalk \
-       lang-java lang-csharp lang-gawk lang-pascal lang-ycp lang-tcl \
-       lang-perl-1 lang-perl-2 lang-php lang-po lang-rst
+       lang-python-2 lang-clisp lang-elisp lang-librep lang-guile \
+       lang-smalltalk lang-java lang-csharp lang-gawk lang-pascal \
+       lang-ycp lang-tcl lang-perl-1 lang-perl-2 lang-php lang-po lang-rst
 
 EXTRA_DIST += $(TESTS) \
        test.mo xg-c-1.ok.po mex-test2.ok msguniq-a.in msguniq-a.inp \