]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
C# support: Remove pnet choice.
authorBruno Haible <bruno@clisp.org>
Tue, 9 Oct 2018 00:44:00 +0000 (02:44 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 9 Oct 2018 00:44:00 +0000 (02:44 +0200)
* DEPENDENCIES: Don't mention pnet.
* PACKAGING: Likewise.
* gettext-tools/src/format-csharp.c: Simplify comment.
* gettext-tools/src/msgfmt.cs: Remove workarounds for cscc.
* gettext-tools/src/write-csharp.c (write_csharp_code): Update comment.
* gettext-tools/doc/gettext.texi (C#): Don't mention resgen.
* gettext-tools/tests/lang-csharp: Rely on mono, not pnet.
* gettext-tools/examples/hello-csharp/INSTALL: Likewise.
* gettext-tools/examples/hello-csharp-forms/INSTALL: Likewise.
* gettext-tools/examples/hello-csharp-forms/BUGS: Remove file.

DEPENDENCIES
PACKAGING
gettext-tools/doc/gettext.texi
gettext-tools/examples/hello-csharp-forms/BUGS [deleted file]
gettext-tools/examples/hello-csharp-forms/INSTALL
gettext-tools/examples/hello-csharp/INSTALL
gettext-tools/src/format-csharp.c
gettext-tools/src/msgfmt.cs
gettext-tools/src/write-csharp.c
gettext-tools/tests/lang-csharp

index 19e41f5324193e8ee67ee1385acb8f966f74725d..7a29efffe1870eb799bfde03acd50a46ae8ec94d 100644 (file)
@@ -51,7 +51,7 @@ The following packages should be installed before GNU gettext is installed
     http://openjdk.java.net/install/index.html
     https://github.com/kaffe/kaffe
 
-* A C# runtime and compiler (e.g. pnet or mono).
+* A C# runtime and compiler (e.g. mono).
   + Recommended.
     Needed for building GNU.Gettext.dll. Also needed for 'msgfmt' and
     'msgunfmt', so that they can handle C# resources and assemblies.
index 00a2dab0c5284e41d4b6a5a06b8ddd120dd465f8..419e7edbc13cfa1806c3ad6e3b6a9969ba49fd02 100644 (file)
--- a/PACKAGING
+++ b/PACKAGING
@@ -168,8 +168,4 @@ the Java virtual machine (OpenJDK, Oracle Java, IBM Java, or other).
 C# support:
 -----------
 
-For C# support, one of pnet or mono must be available at build time; it must
-also be available at run time. If you have both available, choose the desired
-one through the configure option. Note there is no interoperability currently
-between pnet and mono: Programs compiled with pnet don't run with mono, and
-vice versa.
+For C# support, mono must be available at build time and at run time.
index 49b284bd4b20f70acd394b4821fa85501161d4c6..5409cd59c06cf42eff7583c05b2e1712b0c67e1f 100644 (file)
@@ -10599,12 +10599,10 @@ To convert a PO file to a @code{.resources} file, the @code{msgfmt} program
 can be used with the option @samp{--csharp-resources}.  To convert a
 @code{.resources} file back to a PO file, the @code{msgunfmt} program can be
 used with the option @samp{--csharp-resources}.  You can also, in some cases,
-use the @code{resgen} program (from the @code{pnet} package) or the
-@code{monoresgen} program (from the @code{mono}/@code{mcs} package).  These
-programs can also convert a @code{.resources} file back to a PO file.  But
+use the @code{monoresgen} program (from the @code{mono}/@code{mcs} package).
+This program can also convert a @code{.resources} file back to a PO file.  But
 beware: as of this writing (January 2004), the @code{monoresgen} converter is
-quite buggy and the @code{resgen} converter ignores the encoding of the PO
-files.
+quite buggy.
 
 To convert a PO file to a @code{.dll} file, the @code{msgfmt} program can be
 used with the option @code{--csharp}.  The result will be a @code{.dll} file
diff --git a/gettext-tools/examples/hello-csharp-forms/BUGS b/gettext-tools/examples/hello-csharp-forms/BUGS
deleted file mode 100644 (file)
index af7009a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Correct display of characters depends on the C# execution engine. For example,
-in pnet 0.6.0.1, Western fonts display fine but East Asian fonts don't work.
index 011cc8169c7b45570b7e5c320adc94b148a93501..31c44e48095dd4e53e09663ea050a2521050fb14 100644 (file)
@@ -1,5 +1,5 @@
 This example relies on:
-  - a C# implementation with System.Windows.Forms library, e.g. pnet+pnetlib
+  - a C# implementation with System.Windows.Forms library: mono
 
 Installation:
   ./autogen.sh
index ea09f7ac92b99d9ebcb122eb3c636dd5621dd778..aacf6bc37001de2cd0e92d5137d3cf548eff2692 100644 (file)
@@ -1,5 +1,5 @@
 This example relies on:
-  - a C# implementation: either pnet+pnetlib or mono+mcs
+  - a C# implementation: mono
 
 Installation:
   ./autogen.sh
index 70588b49ca2de7a67b1c63b65745a872f37492d6..8998181797889b03c0f76fb5bebd8a72f077acac 100644 (file)
@@ -1,5 +1,5 @@
 /* C# format strings.
-   Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016 Free Software
+   Copyright (C) 2003-2004, 2006-2007, 2009, 2015-2016, 2018 Free Software
    Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
 #define _(str) gettext (str)
 
 /* C# format strings are described in the description of the .NET System.String
-   class and implemented in
-     pnetlib-0.5.6/runtime/System/String.cs
-   and
-     mcs-0.28/class/corlib/System/String.cs
+   class and implemented in mcs-0.28/class/corlib/System/String.cs .
    A format string consists of literal text (that is output verbatim), doubled
    braces ('{{' and '}}', that lead to a single brace when output), and
    directives.
index 6bf58d2e73c1e1ea1f20a97863646f4f98b0f88d..f7295d1dd2c0d4a1f612b9ba7b84f831a17df2cb 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext for C#
- * Copyright (C) 2003, 2015-2016 Free Software Foundation, Inc.
+ * Copyright (C) 2003, 2015-2016, 2018 Free Software Foundation, Inc.
  * Written by Bruno Haible <bruno@clisp.org>, 2003.
  *
  * This program is free software: you can redistribute it and/or modify
@@ -68,41 +68,13 @@ namespace GNU.Gettext {
         MemoryStream tmpoutput = new MemoryStream();
         ResourceWriter rw = new ResourceWriter(tmpoutput);
         ReadAllInput(rw);
-#if __CSCC__
-        // Use the ResourceReader to check against pnet-0.6.0 ResourceWriter
-        // bug.
-        try {
-          ResourceReader rr = new ResourceReader(new MemoryStream(tmpoutput.ToArray()));
-          foreach (System.Collections.DictionaryEntry entry in rr);
-        } catch (IOException e) {
-          throw new Exception("class ResourceWriter is buggy", e);
-        }
-#endif
         tmpoutput.WriteTo(output);
         rw.Close();
         output.Close();
       } else {
-#if __CSCC__
-        MemoryStream tmpoutput = new MemoryStream();
-        ResourceWriter rw = new ResourceWriter(tmpoutput);
-        ReadAllInput(rw);
-        // Use the ResourceReader to check against pnet-0.6.0 ResourceWriter
-        // bug.
-        try {
-          ResourceReader rr = new ResourceReader(new MemoryStream(tmpoutput.ToArray()));
-          foreach (System.Collections.DictionaryEntry entry in rr);
-        } catch (IOException e) {
-          throw new Exception("class ResourceWriter is buggy", e);
-        }
-        BufferedStream output = new BufferedStream(new FileStream(filename, FileMode.Create, FileAccess.Write));
-        tmpoutput.WriteTo(output);
-        rw.Close();
-        output.Close();
-#else
         ResourceWriter rw = new ResourceWriter(filename);
         ReadAllInput(rw);
         rw.Close();
-#endif
       }
     }
     public static int Main (String[] args) {
index 1a8efde52b750de4aeba8ecadf2db75dc511406e..1e39d4a03ea1bbdb4c8ed459d1eacdeff6ff2a86 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing C# satellite assemblies.
-   Copyright (C) 2003-2010, 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2003-2010, 2015-2016, 2018 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -507,7 +507,7 @@ write_csharp_code (FILE *stream, const char *culture_name, const char *class_nam
   fprintf (stream,
            "/* Automatically generated by GNU msgfmt.  Do not modify!  */\n");
 
-  /* We have to use a "using" statement here, to avoid a bug in the pnet-0.6.0
+  /* We chose to use a "using" statement here, to avoid a bug in the pnet-0.6.0
      compiler.  */
   fprintf (stream, "using GNU.Gettext;\n");
 
index eac133268894b2d002e0730bb0e99e663af8168b..065489607fdf93065525b97a8cd10994ccdd52e1 100755 (executable)
@@ -3,11 +3,7 @@
 
 # Test of gettext facilities in the C# language.
 # Assumes an fr_FR locale is installed.
-# Assumes the following packages are installed: pnet, pnetlib.
-
-# Note: This test fails with mono-0.28 because the CultureInfo.Parent pointers
-# are wrong for locales containing a language and a territory. This is fixed
-# in mono-0.29.
+# Assumes the following packages are installed: mono, mcs.
 
 # Test whether we can build and test C# programs.
 test "${CSHARP_CHOICE}" != no || {