bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Is the 'diacrit' module still needed?
@ 2021-03-21 21:24 Paul Eggert
  2021-03-22  0:22 ` Bruno Haible
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2021-03-21 21:24 UTC (permalink / raw)
  To: Gnulib bugs; +Cc: Coreutils

Today I updated Coreutils to current Gnulib, and noticed that 
gnulib-tool warned that Gnulib's 'diacrit' module is obsolete. So I 
removed Coreutils's use of 'diacrit', as the only use was something 
obsolete in 'ptx'[1].

Does anyone else use 'diacrit'? If not, I suppose we can remove it from 
Gnulib.

[1] 
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=a71539e62830927957ddea3ddb7615f68ffcc55b


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is the 'diacrit' module still needed?
  2021-03-21 21:24 Is the 'diacrit' module still needed? Paul Eggert
@ 2021-03-22  0:22 ` Bruno Haible
  2021-03-22  0:41   ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Haible @ 2021-03-22  0:22 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Paul Eggert

Hi Paul,

> Today I updated Coreutils to current Gnulib, and noticed that 
> gnulib-tool warned that Gnulib's 'diacrit' module is obsolete. So I 
> removed Coreutils's use of 'diacrit', as the only use was something 
> obsolete in 'ptx'[1].

Nice. This fixes the warning that Berny reported [1].

> Does anyone else use 'diacrit'? If not, I suppose we can remove it from 
> Gnulib.

I don't think it is used elsewhere; 'diacrit' is a very specialized module.
It is deprecated for more than 1.5 years. It can be removed now.

Bruno

[1] https://lists.gnu.org/archive/html/bug-gnulib/2019-07/msg00056.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is the 'diacrit' module still needed?
  2021-03-22  0:22 ` Bruno Haible
@ 2021-03-22  0:41   ` Paul Eggert
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Eggert @ 2021-03-22  0:41 UTC (permalink / raw)
  To: Bruno Haible; +Cc: Gnulib bugs

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

On 3/21/21 5:22 PM, Bruno Haible wrote:
> I don't think it is used elsewhere; 'diacrit' is a very specialized module.
> It is deprecated for more than 1.5 years. It can be removed now.

Thanks, done by installing the attached.

I'll miss that comment dated 1988 saying "All this file is a temporary 
hack"....

[-- Attachment #2: 0001-diacrit-remove.patch --]
[-- Type: text/x-patch, Size: 12504 bytes --]

From 3a46e5adda5ef27b1f543888984a57ca8e12a2e3 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 21 Mar 2021 17:37:00 -0700
Subject: [PATCH] diacrit: remove

* MODULES.html.sh (func_all_modules), NEWS: Remove diacrit.
* lib/diacrit.c, lib/diacrit.h, modules/diacrit: Remove.
---
 ChangeLog       |   4 ++
 MODULES.html.sh |   1 -
 NEWS            |   2 +
 lib/diacrit.c   | 161 ------------------------------------------------
 lib/diacrit.h   |  27 --------
 modules/diacrit |  29 ---------
 6 files changed, 6 insertions(+), 218 deletions(-)
 delete mode 100644 lib/diacrit.c
 delete mode 100644 lib/diacrit.h
 delete mode 100644 modules/diacrit

diff --git a/ChangeLog b/ChangeLog
index 6c4d4b5f2..faf7927f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2021-03-21  Paul Eggert  <eggert@cs.ucla.edu>
 
+	diacrit: remove
+	* MODULES.html.sh (func_all_modules), NEWS: Remove diacrit.
+	* lib/diacrit.c, lib/diacrit.h, modules/diacrit: Remove.
+
 	tests: fix signed overflow issues
 	* tests/test-dynarray.c (value_at): Avoid undefined behavior
 	in signed integer multiplication.
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 38fd8369b..dad6c2a77 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -2013,7 +2013,6 @@ func_all_modules ()
   func_module base64
   func_module check-version
   func_module crc
-  func_module diacrit
   func_module diffseq
   func_module execinfo
   func_module getline
diff --git a/NEWS b/NEWS
index ba8988198..77cf565ec 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,8 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2021-03-21  diacrit         This deprecated module is removed.
+
 2021-03-07  mbrtowc         For single-locale optimizations, you now need to
             mbrtoc32        define GNULIB_WCHAR_SINGLE_LOCALE instead of
             wcwidth         GNULIB_WCHAR_SINGLE.
diff --git a/lib/diacrit.c b/lib/diacrit.c
deleted file mode 100644
index 1920cc0e5..000000000
--- a/lib/diacrit.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Diacritics processing for a few character codes.  -*- coding: utf-8 -*-
-
-   Copyright (C) 1990-1993, 2000, 2006, 2009-2021 Free Software Foundation,
-   Inc.
-
-   François Pinard <pinard@iro.umontreal.ca>, 1988.
-
-   All this file is a temporary hack, waiting for locales in GNU.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-#include "diacrit.h"
-
-/* ISO 8859-1 Latin-1 code is used as the underlying character set.  If
-   MSDOS is defined, IBM-PC's character set code is used instead.  */
-
-/*--------------------------------------------------------------------.
-| For each alphabetic character, returns what it would be without its |
-| possible diacritic symbol.                                          |
-`--------------------------------------------------------------------*/
-
-const char diacrit_base[256] =
-{
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      'A',    'B',    'C',    'D',    'E',    'F',    'G',
-  'H',    'I',    'J',    'K',    'L',    'M',    'N',    'O',
-  'P',    'Q',    'R',    'S',    'T',    'U',    'V',    'W',
-  'X',    'Y',    'Z',    0,      0,      0,      0,      0,
-  0,      'a',    'b',    'c',    'd',    'e',    'f',    'g',
-  'h',    'i',    'j',    'k',    'l',    'm',    'n',    'o',
-  'p',    'q',    'r',    's',    't',    'u',    'v',    'w',
-  'x',    'y',    'z',    0,      0,      0,      0,      0,
-
-#ifdef __MSDOS__
-
-  'C',    'u',    'e',    'a',    'a',    'a',    'a',    'c',
-  'e',    'e',    'e',    'i',    'i',    'i',    'A',    'A',
-  'E',    'e',    'E',    'o',    'o',    'o',    'u',    'u',
-  'y',    'O',    'U',    0,      0,      0,      0,      0,
-  'a',    'i',    'o',    'u',    'n',    'N',    0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-
-#else
-
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  'A',    'A',    'A',    'A',    'A',    'A',    'A',    'C',
-  'E',    'E',    'E',    'E',    'I',    'I',    'I',    'I',
-  0,      'N',    'O',    'O',    'O',    'O',    'O',    0,
-  'O',    'U',    'U',    'U',    'U',    'Y',    0,      0,
-  'a',    'a',    'a',    'a',    'a',    'a',    'a',    'c',
-  'e',    'e',    'e',    'e',    'i',    'i',    'i',    'i',
-  0,      'n',    'o',    'o',    'o',    'o',    'o',    0,
-  'o',    'u',    'u',    'u',    'u',    'y',    0,      'y',
-
-#endif
-};
-
-/*------------------------------------------------------------------------.
-| For each alphabetic character, returns a code of what its diacritic is, |
-| according to the following codes: 1 (eE) over aA for latin diphthongs;  |
-| 2 (') acute accent; 3 (`) grave accent; 4 (^) circumflex accent; 5 (")  |
-| umlaut or diaeresis; 6 (~) tilda; 7 (,) cedilla; 8 (o) covering degree  |
-| symbol; 9 (|) slashed character.                                        |
-`------------------------------------------------------------------------*/
-
-const char diacrit_diac[256] =
-{
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      4,      0,
-  3,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      6,      0,
-
-#ifdef __MSDOS__
-
-  7,      5,      2,      4,      5,      3,      8,      7,
-  4,      5,      3,      5,      4,      3,      5,      8,
-  2,      1,      1,      4,      5,      3,      4,      3,
-  5,      5,      5,      0,      0,      0,      0,      0,
-  2,      2,      2,      2,      6,      6,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-
-#else
-
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  0,      0,      0,      0,      0,      0,      0,      0,
-  3,      2,      4,      6,      5,      8,      1,      7,
-  3,      2,      4,      5,      3,      2,      4,      5,
-  0,      6,      3,      2,      4,      6,      5,      0,
-  9,      3,      2,      4,      5,      2,      0,      0,
-  3,      2,      4,      6,      5,      8,      1,      7,
-  3,      2,      4,      5,      3,      2,      4,      5,
-  0,      6,      3,      2,      4,      6,      5,      0,
-  9,      3,      2,      4,      5,      2,      0,      0,
-
-#endif
-};
diff --git a/lib/diacrit.h b/lib/diacrit.h
deleted file mode 100644
index b0c6c24aa..000000000
--- a/lib/diacrit.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Diacritics processing for a few character codes.  -*- coding: utf-8 -*-
-   Copyright (C) 1990-1993, 2009-2021 Free Software Foundation, Inc.
-   François Pinard <pinard@iro.umontreal.ca>, 1988.
-
-   All this file is a temporary hack, waiting for locales in GNU.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-extern const char diacrit_base[]; /* characters without diacritics */
-extern const char diacrit_diac[]; /* diacritic code for each character */
-
-/* Returns CHAR without its diacritic.  CHAR is known to be alphabetic.  */
-#define tobase(Char) (diacrit_base[(unsigned char) (Char)])
-
-/* Returns a diacritic code for CHAR.  CHAR is known to be alphabetic.  */
-#define todiac(Char) (diacrit_diac[(unsigned char) (Char)])
diff --git a/modules/diacrit b/modules/diacrit
deleted file mode 100644
index bda96f5c9..000000000
--- a/modules/diacrit
+++ /dev/null
@@ -1,29 +0,0 @@
-Description:
-Decomposition of composed ISO-8859-1 characters.
-
-Status:
-deprecated
-
-Notice:
-This module is deprecated. Use the module 'uninorm/canonical-decomposition' instead.
-
-Files:
-lib/diacrit.h
-lib/diacrit.c
-
-Depends-on:
-
-configure.ac:
-
-Makefile.am:
-lib_SOURCES += diacrit.h diacrit.c
-
-Include:
-"diacrit.h"
-
-License:
-GPL
-
-Maintainer:
-Jim Meyering
-
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-22  0:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 21:24 Is the 'diacrit' module still needed? Paul Eggert
2021-03-22  0:22 ` Bruno Haible
2021-03-22  0:41   ` Paul Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).