bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: propose renaming gnulib memxfrm to amemxfrm (naming collision with c


From: Bruno Haible
Subject: Re: propose renaming gnulib memxfrm to amemxfrm (naming collision with coreutils)
Date: Sun, 15 Aug 2010 00:42:22 +0200
User-agent: KMail/1.9.9

Hi Paul,

I wrote:
> If we add such a wrapper to gnulib, it could be called 'astrxfrm'
> 
>   extern char * astrxfrm (const char *s, char *resultbuf, size_t *lengthp);
> 
> and then I would agree to renaming memxfrm -> amemxfrm, for consistency.

I'm doing the renaming:


2010-08-14  Bruno Haible  <address@hidden>

        Rename module 'memxfrm' to 'amemxfrm'.
        * lib/amemxfrm.h: Renamed from lib/memxfrm.h.
        (amemxfrm): Renamed from memxfrm.
        * lib/amemxfrm.c: Renamed from lib/memxfrm.h. Include amemxfrm.h.
        (amemxfrm): Renamed from memxfrm.
        * modules/amemxfrm: Renamed from modules/memxfrm. Update.
        * NEWS: Mention the change.
        * MODULES.html.sh (String handling <string.h>): Update.
        * lib/unicase/u-casexfrm.h: Invoke amemxfrm instead of memxfrm.
        * lib/unicase/u8-casexfrm.c: Include amemxfrm.h instead of memxfrm.h.
        * lib/unicase/u16-casexfrm.c: Likewise.
        * lib/unicase/u32-casexfrm.c: Likewise.
        * lib/uninorm/u-normxfrm.h: Invoke amemxfrm instead of memxfrm.
        * lib/uninorm/u8-normxfrm.c: Include amemxfrm.h instead of memxfrm.h.
        * lib/uninorm/u16-normxfrm.c: Likewise.
        * lib/uninorm/u32-normxfrm.c: Likewise.
        * modules/unicase/u8-casexfrm (Depends-on): Add amemxfrm, remove
        memxfrm.
        * modules/unicase/u16-casexfrm (Depends-on): Likewise.
        * modules/unicase/u32-casexfrm (Depends-on): Likewise.
        * modules/uninorm/u8-normxfrm (Depends-on): Likewise.
        * modules/uninorm/u16-normxfrm (Depends-on): Likewise.
        * modules/uninorm/u32-normxfrm (Depends-on): Likewise.
        Suggested by Paul Eggert.

--- MODULES.html.sh.orig        Sun Aug 15 00:34:22 2010
+++ MODULES.html.sh     Sun Aug 15 00:32:12 2010
@@ -1778,7 +1778,7 @@
   func_module memmem-simple
   func_module mempcpy
   func_module memrchr
-  func_module memxfrm
+  func_module amemxfrm
   func_module rawmemchr
   func_module stpcpy
   func_module stpncpy
--- NEWS.orig   Sun Aug 15 00:34:22 2010
+++ NEWS        Sun Aug 15 00:33:46 2010
@@ -6,6 +6,10 @@
 
 Date        Modules         Changes
 
+2010-08-14  memxfrm         This module is renamed to amemxfrm. The include
+                            file is renamed to "amemxfrm.h". The function is
+                            renamed to amemxfrm.
+
 2010-08-09  symlinkat       This module now only provides symlinkat; use the
                             new module 'readlinkat' if needed.
 
--- lib/amemxfrm.c.orig Sun Aug 15 00:34:22 2010
+++ lib/amemxfrm.c      Sun Aug 15 00:31:50 2010
@@ -18,14 +18,14 @@
 #include <config.h>
 
 /* Specification.  */
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 
 char *
-memxfrm (char *s, size_t n, char *resultbuf, size_t *lengthp)
+amemxfrm (char *s, size_t n, char *resultbuf, size_t *lengthp)
 {
   /* Result accumulator.  */
   char *result;
--- lib/amemxfrm.h.orig Sun Aug 15 00:34:23 2010
+++ lib/amemxfrm.h      Sun Aug 15 00:34:00 2010
@@ -1,5 +1,5 @@
 /* Locale dependent memory area transformation for comparison.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009-2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
@@ -14,8 +14,8 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef MEMXFRM_H
-#define MEMXFRM_H
+#ifndef AMEMXFRM_H
+#define AMEMXFRM_H
 
 #include <stddef.h>
 
@@ -28,7 +28,7 @@
 
 /* Transform the memory area [S..S+N-1] to a memory area, in such a way that
    comparing (S1,N1) and (S2,N2) with memcoll() is equivalent to comparing
-   memxfrm(S1,N1) and memxfrm(S2,N2) with memcmp2().
+   amemxfrm(S1,N1) and amemxfrm(S2,N2) with memcmp2().
    The byte S[N] may be temporarily overwritten by this function, but will be
    restored before this function returns.
    The result of this function depends on the LC_COLLATE category of the
@@ -38,11 +38,11 @@
    freshly allocated string is returned.  In both cases, *lengthp is set to the
    length of the returned string.
    Upon failure, return NULL, with errno set.  */
-extern char * memxfrm (char *s, size_t n, char *resultbuf, size_t *lengthp);
+extern char * amemxfrm (char *s, size_t n, char *resultbuf, size_t *lengthp);
 
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* MEMXFRM_H */
+#endif /* AMEMXFRM_H */
--- lib/unicase/u-casexfrm.h.orig       Sun Aug 15 00:34:23 2010
+++ lib/unicase/u-casexfrm.h    Sun Aug 15 00:31:32 2010
@@ -70,7 +70,7 @@
     }
 
   /* Apply locale dependent transformations for comparison.  */
-  result = memxfrm (convs, convs_length, resultbuf, lengthp);
+  result = amemxfrm (convs, convs_length, resultbuf, lengthp);
   if (result == NULL)
     {
       if (convs != convsbuf)
--- lib/unicase/u16-casexfrm.c.orig     Sun Aug 15 00:34:23 2010
+++ lib/unicase/u16-casexfrm.c  Sun Aug 15 00:30:59 2010
@@ -26,7 +26,7 @@
 
 #include "localcharset.h"
 #include "uniconv.h"
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #define FUNC u16_casexfrm
 #define UNIT uint16_t
--- lib/unicase/u32-casexfrm.c.orig     Sun Aug 15 00:34:23 2010
+++ lib/unicase/u32-casexfrm.c  Sun Aug 15 00:30:52 2010
@@ -26,7 +26,7 @@
 
 #include "localcharset.h"
 #include "uniconv.h"
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #define FUNC u32_casexfrm
 #define UNIT uint32_t
--- lib/unicase/u8-casexfrm.c.orig      Sun Aug 15 00:34:23 2010
+++ lib/unicase/u8-casexfrm.c   Sun Aug 15 00:30:45 2010
@@ -26,7 +26,7 @@
 
 #include "localcharset.h"
 #include "uniconv.h"
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #define FUNC u8_casexfrm
 #define UNIT uint8_t
--- lib/uninorm/u-normxfrm.h.orig       Sun Aug 15 00:34:23 2010
+++ lib/uninorm/u-normxfrm.h    Sun Aug 15 00:31:41 2010
@@ -69,7 +69,7 @@
     }
 
   /* Apply locale dependent transformations for comparison.  */
-  result = memxfrm (convs, convs_length, resultbuf, lengthp);
+  result = amemxfrm (convs, convs_length, resultbuf, lengthp);
   if (result == NULL)
     {
       if (convs != convsbuf)
--- lib/uninorm/u16-normxfrm.c.orig     Sun Aug 15 00:34:23 2010
+++ lib/uninorm/u16-normxfrm.c  Sun Aug 15 00:31:08 2010
@@ -25,7 +25,7 @@
 
 #include "localcharset.h"
 #include "uniconv.h"
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #define FUNC u16_normxfrm
 #define UNIT uint16_t
--- lib/uninorm/u32-normxfrm.c.orig     Sun Aug 15 00:34:23 2010
+++ lib/uninorm/u32-normxfrm.c  Sun Aug 15 00:31:15 2010
@@ -25,7 +25,7 @@
 
 #include "localcharset.h"
 #include "uniconv.h"
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #define FUNC u32_normxfrm
 #define UNIT uint32_t
--- lib/uninorm/u8-normxfrm.c.orig      Sun Aug 15 00:34:23 2010
+++ lib/uninorm/u8-normxfrm.c   Sun Aug 15 00:31:22 2010
@@ -25,7 +25,7 @@
 
 #include "localcharset.h"
 #include "uniconv.h"
-#include "memxfrm.h"
+#include "amemxfrm.h"
 
 #define FUNC u8_normxfrm
 #define UNIT uint8_t
--- modules/amemxfrm.orig       Sun Aug 15 00:34:23 2010
+++ modules/amemxfrm    Sun Aug 15 00:29:30 2010
@@ -2,18 +2,18 @@
 Locale dependent memory area transformation for comparison.
 
 Files:
-lib/memxfrm.h
-lib/memxfrm.c
+lib/amemxfrm.h
+lib/amemxfrm.c
 
 Depends-on:
 
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += memxfrm.c
+lib_SOURCES += amemxfrm.c
 
 Include:
-"memxfrm.h"
+"amemxfrm.h"
 
 License:
 LGPL
--- modules/unicase/u16-casexfrm.orig   Sun Aug 15 00:34:23 2010
+++ modules/unicase/u16-casexfrm        Sun Aug 15 00:28:30 2010
@@ -11,7 +11,7 @@
 unicase/u16-casefold
 uniconv/u16-conv-to-enc
 localcharset
-memxfrm
+amemxfrm
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([0.9.1], [unicase/u16-casexfrm])
--- modules/unicase/u32-casexfrm.orig   Sun Aug 15 00:34:23 2010
+++ modules/unicase/u32-casexfrm        Sun Aug 15 00:28:35 2010
@@ -11,7 +11,7 @@
 unicase/u32-casefold
 uniconv/u32-conv-to-enc
 localcharset
-memxfrm
+amemxfrm
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([0.9.1], [unicase/u32-casexfrm])
--- modules/unicase/u8-casexfrm.orig    Sun Aug 15 00:34:23 2010
+++ modules/unicase/u8-casexfrm Sun Aug 15 00:28:33 2010
@@ -11,7 +11,7 @@
 unicase/u8-casefold
 uniconv/u8-conv-to-enc
 localcharset
-memxfrm
+amemxfrm
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([0.9.1], [unicase/u8-casexfrm])
--- modules/uninorm/u16-normxfrm.orig   Sun Aug 15 00:34:23 2010
+++ modules/uninorm/u16-normxfrm        Sun Aug 15 00:28:39 2010
@@ -10,7 +10,7 @@
 uninorm/u16-normalize
 uniconv/u16-conv-to-enc
 localcharset
-memxfrm
+amemxfrm
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([0.9], [uninorm/u16-normxfrm])
--- modules/uninorm/u32-normxfrm.orig   Sun Aug 15 00:34:23 2010
+++ modules/uninorm/u32-normxfrm        Sun Aug 15 00:28:42 2010
@@ -10,7 +10,7 @@
 uninorm/u32-normalize
 uniconv/u32-conv-to-enc
 localcharset
-memxfrm
+amemxfrm
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([0.9], [uninorm/u32-normxfrm])
--- modules/uninorm/u8-normxfrm.orig    Sun Aug 15 00:34:23 2010
+++ modules/uninorm/u8-normxfrm Sun Aug 15 00:28:36 2010
@@ -10,7 +10,7 @@
 uninorm/u8-normalize
 uniconv/u8-conv-to-enc
 localcharset
-memxfrm
+amemxfrm
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([0.9], [uninorm/u8-normxfrm])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]