Move the xstr*() string variants from rpmio.h to rpmstring.h
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 23 Nov 2007 06:32:08 +0000 (08:32 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 23 Nov 2007 06:32:08 +0000 (08:32 +0200)
18 files changed:
lib/rpmds.c
lib/rpmrc.c
lib/rpmts.c
lib/rpmvercmp.c
lib/signature.c
python/header-py.c
python/rpmds-py.c
rpmdb/dbconfig.c
rpmdb/header.c
rpmdb/rpmdb.c
rpmdb/tagname.c
rpmio/macro.c
rpmio/rpmio.h
rpmio/rpmpgp.c
rpmio/rpmrpc.c
rpmio/rpmstring.c
rpmio/rpmstring.h
rpmio/strcasecmp.c

index cfd27d2..76064ba 100644 (file)
@@ -4,6 +4,7 @@
 #include "system.h"
 
 #include <rpmlib.h>
+#include <rpmstring.h>
 
 #include <rpmds.h>
 
index 1b31ae5..20107ad 100644 (file)
@@ -16,6 +16,7 @@
 #include "rpmio_internal.h"    /* XXX for rpmioSlurp */
 #include <rpmlib.h>
 #include <rpmmacro.h>
+#include <rpmstring.h>
 #include "rpmlua.h"
 
 #include <rpmlog.h>
index 01ca46c..547acec 100644 (file)
@@ -8,6 +8,7 @@
 #include "digest.h"
 #include <rpmlib.h>
 #include <rpmmacro.h>          /* XXX rpmtsOpenDB() needs rpmGetPath */
+#include <rpmstring.h>
 
 #include <rpmdb.h>
 
index 6ba089c..b847113 100644 (file)
@@ -5,6 +5,7 @@
 #include "system.h"
 
 #include <rpmlib.h>
+#include <rpmstring.h>
 
 #include "debug.h"
 
index 61f264b..3cee85a 100644 (file)
@@ -8,6 +8,7 @@
 #include <rpmlib.h>
 #include <rpmmacro.h>  /* XXX for rpmGetPath() */
 #include <rpmdb.h>
+#include <rpmstring.h>
 
 #include <rpmts.h>
 
index 7ff17f6..b7c8faf 100644 (file)
@@ -5,6 +5,7 @@
 #include "system.h"
 
 #include <rpmlib.h>
+#include <rpmstring.h>
 
 #include "legacy.h"
 
index ed7c4c4..6dc563f 100644 (file)
@@ -5,6 +5,7 @@
 #include "system.h"
 
 #include <rpmlib.h>
+#include <rpmstring.h>
 
 #include "header-py.h"
 #include "rpmds-py.h"
index aec53d5..504b35a 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <rpmlib.h>
 #include <rpmmacro.h>
-
+#include <rpmstring.h>
 #include <rpmlog.h>
 #include "rpmdb_internal.h"
 #include "debug.h"
index 3954969..ee9eb35 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "system.h"
 
+#include <rpmstring.h>
 #include "header_internal.h"
 
 #include "debug.h"
index 13d3bfc..0e07ce4 100644 (file)
@@ -19,6 +19,7 @@
 #include <rpmpgp.h>
 #include <rpmmacro.h>
 #include <rpmsq.h>
+#include <rpmstring.h>
 
 #include <rpmlog.h>
 #include "rpmdb_internal.h"
index 06d1afd..f7a2748 100644 (file)
@@ -5,7 +5,7 @@
 #include "system.h"
 
 #include <rpmlib.h>
-#include <rpmio.h>
+#include <rpmstring.h>
 #include "debug.h"
 
 struct headerTagIndices_s {
index 4e43acd..aac05fe 100644 (file)
@@ -13,6 +13,7 @@
 #define        STREQ(_t, _f, _fn)      ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn)))
 
 #include <rpmio.h>
+#include <rpmstring.h>
 #include <rpmurl.h>
 #include <rpmmessages.h>
 #include <rpmlog.h>
index 6d90d65..ea0749a 100644 (file)
@@ -300,45 +300,6 @@ int ufdGetFile( FD_t sfd, FD_t tfd);
  */
 int timedRead(FD_t fd, void * bufptr, int length);
 
-static inline int xislower(int c)  {
-    return (c >= 'a' && c <= 'z');
-}
-static inline int xisupper(int c)  {
-    return (c >= 'A' && c <= 'Z');
-}
-static inline int xisalpha(int c)  {
-    return (xislower(c) || xisupper(c));
-}
-static inline int xisdigit(int c)  {
-    return (c >= '0' && c <= '9');
-}
-static inline int xisalnum(int c)  {
-    return (xisalpha(c) || xisdigit(c));
-}
-static inline int xisblank(int c)  {
-    return (c == ' ' || c == '\t');
-}
-static inline int xisspace(int c)  {
-    return (xisblank(c) || c == '\n' || c == '\r' || c == '\f' || c == '\v');
-}
-
-static inline int xtolower(int c)  {
-    return ((xisupper(c)) ? (c | ('a' - 'A')) : c);
-}
-static inline int xtoupper(int c)  {
-    return ((xislower(c)) ? (c & ~('a' - 'A')) : c);
-}
-
-/** \ingroup rpmio
- * Locale insensitive strcasecmp(3).
- */
-int xstrcasecmp(const char * s1, const char * s2)              ;
-
-/** \ingroup rpmio
- * Locale insensitive strncasecmp(3).
- */
-int xstrncasecmp(const char *s1, const char * s2, size_t n)    ;
-
 #ifdef __cplusplus
 }
 #endif
index 8adc55c..ec06bce 100644 (file)
@@ -6,6 +6,9 @@
 #include "system.h"
 #include "digest.h"
 #include "rpmio_internal.h"    /* XXX rpmioSlurp */
+
+#include <rpmstring.h>
+
 #include "debug.h"
 
 
index f51c426..1f0434a 100644 (file)
@@ -9,6 +9,7 @@
 #endif
 
 #include <rpmurl.h>
+#include <rpmstring.h>
 #include "rpmio_internal.h"
 
 #include "ugid.h"
index 45314be..3e747b1 100644 (file)
@@ -16,13 +16,6 @@ struct StringBufRec {
     int free;
 };
 
-/**
- * Locale insensitive isspace(3).
- */
-static inline int xisspace(int c)  {
-    return (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == '\v');
-}
-
 char * stripTrailingChar(char * s, char c)
 {
     char * t;
index a31957e..ce265e1 100644 (file)
@@ -9,6 +9,45 @@
 extern "C" {
 #endif
 
+static inline int xislower(int c)  {
+    return (c >= 'a' && c <= 'z');
+}
+static inline int xisupper(int c)  {
+    return (c >= 'A' && c <= 'Z');
+}
+static inline int xisalpha(int c)  {
+    return (xislower(c) || xisupper(c));
+}
+static inline int xisdigit(int c)  {
+    return (c >= '0' && c <= '9');
+}
+static inline int xisalnum(int c)  {
+    return (xisalpha(c) || xisdigit(c));
+}
+static inline int xisblank(int c)  {
+    return (c == ' ' || c == '\t');
+}
+static inline int xisspace(int c)  {
+    return (xisblank(c) || c == '\n' || c == '\r' || c == '\f' || c == '\v');
+}
+
+static inline int xtolower(int c)  {
+    return ((xisupper(c)) ? (c | ('a' - 'A')) : c);
+}
+static inline int xtoupper(int c)  {
+    return ((xislower(c)) ? (c & ~('a' - 'A')) : c);
+}
+
+/** \ingroup rpmio
+ * Locale insensitive strcasecmp(3).
+ */
+int xstrcasecmp(const char * s1, const char * s2)              ;
+
+/** \ingroup rpmio
+ * Locale insensitive strncasecmp(3).
+ */
+int xstrncasecmp(const char *s1, const char * s2, size_t n)    ;
+
 /**
  * Split string into fields separated by a character.
  * @param str          string
index 35fdc46..686851d 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 #include "system.h"
-#include <rpmio.h>
+#include <rpmstring.h>
 #include "debug.h"
 
 int xstrcasecmp(const char * s1, const char * s2)