bug-gnulib
[Top][All Lists]
Advanced

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

dosname: Redirect to 'filename'


From: Bruno Haible
Subject: dosname: Redirect to 'filename'
Date: Sat, 28 Mar 2020 15:13:10 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-174-generic; KDE/5.18.0; x86_64; ; )

Now we can unify the modules 'dosname' and 'filename'.


2020-03-28  Bruno Haible  <address@hidden>

        dosname: Redirect to 'filename'.
        Reported by Tim Rühsen <address@hidden> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00042.html>.
        * lib/dosname.h: Remove all definitions. Just include filename.h.
        * modules/dosname (Status, Notice): Mark as deprecated.
        (Depends-on): Add 'filename'.

diff --git a/lib/dosname.h b/lib/dosname.h
index 926a695..490e0c5 100644
--- a/lib/dosname.h
+++ b/lib/dosname.h
@@ -13,41 +13,6 @@
    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/>.
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-   From Paul Eggert and Jim Meyering.  */
-
-#ifndef _DOSNAME_H
-#define _DOSNAME_H
-
-#if (defined _WIN32 || defined __CYGWIN__ \
-     || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__)
-   /* This internal macro assumes ASCII, but all hosts that support drive
-      letters use ASCII.  */
-# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a'  \
-                              <= 'z' - 'a')
-# define FILE_SYSTEM_PREFIX_LEN(Filename) \
-          (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
-# ifndef __CYGWIN__
-#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
-# endif
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-#else
-# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
-# define ISSLASH(C) ((C) == '/')
-#endif
-
-#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-#endif
-
-#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-#  define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
-# else
-#  define IS_ABSOLUTE_FILE_NAME(F)                              \
-     (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
-#endif
-#define IS_RELATIVE_FILE_NAME(F) \
-  (! (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0))
-
-#endif /* DOSNAME_H_ */
+#include "filename.h"
diff --git a/modules/dosname b/modules/dosname
index 0e8703c..e323aa7 100644
--- a/modules/dosname
+++ b/modules/dosname
@@ -1,10 +1,17 @@
 Description:
 Macros for porting to systems with DOS-style file names.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'filename' instead.
+
 Files:
 lib/dosname.h
 
 Depends-on:
+filename
 
 configure.ac:
 




reply via email to

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