]> mj.ucw.cz Git - libucw.git/commitdiff
Moved regex functions to lib/regex.h.
authorMartin Mares <mj@ucw.cz>
Wed, 25 Jun 2008 17:49:01 +0000 (19:49 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 25 Jun 2008 17:49:01 +0000 (19:49 +0200)
lib/Makefile
lib/lib.h
lib/regex.c
lib/regex.h [new file with mode: 0644]

index e8db62e78db10681bacb5ad4c3b76f4be88731c8..470feabc0653937d7aaa5dfd8e3a14d91f2733c7 100644 (file)
@@ -40,7 +40,8 @@ LIBUCW_INCLUDES= \
        mempool.h pagecache.h \
        arraysort.h \
        lists.h clists.h slists.h simple-lists.h \
-       string.h \
+       string.h stkstring.h unicode.h chartype.h regex.h \
+       wildmatch.h patmatch.h \
        unaligned.h prefetch.h \
        bbuf.h gbuf.h bitarray.h bitsig.h \
        hashfunc.h hashtable.h \
@@ -51,8 +52,6 @@ LIBUCW_INCLUDES= \
        conf.h getopt.h ipaccess.h \
        profile.h \
        fastbuf.h lfs.h ff-unicode.h ff-binary.h \
-       chartype.h unicode.h stkstring.h \
-       wildmatch.h patmatch.h \
        db.h \
        url.h \
        mainloop.h \
index 1ce5a463356ecbc7c0ddf171a73c074093e1b704..cd3ba862d4ab2e7e1acafebbcf6e64dae378ed15 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -201,15 +201,6 @@ void init_timer(timestamp_t *timer);
 uns get_timer(timestamp_t *timer);
 uns switch_timer(timestamp_t *old, timestamp_t *new);
 
-/* regex.c */
-
-typedef struct regex regex;
-
-regex *rx_compile(const char *r, int icase);
-void rx_free(regex *r);
-int rx_match(regex *r, const char *s);
-int rx_subst(regex *r, const char *by, const char *src, char *dest, uns destlen);
-
 /* random.c */
 
 uns random_u32(void);
index cfabd4d0b6043cc7a63884fc4294a8cefe922871..8eb24432ce13555fd390d60536952e23e8308ace 100644 (file)
@@ -11,6 +11,7 @@
 #include "lib/lib.h"
 #include "lib/chartype.h"
 #include "lib/hashfunc.h"
+#include "lib/regex.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/lib/regex.h b/lib/regex.h
new file mode 100644 (file)
index 0000000..584d70c
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ *     UCW Library -- Interface to Regular Expression Libraries
+ *
+ *     (c) 1997--2004 Martin Mares <mj@ucw.cz>
+ *     (c) 2001 Robert Spalek <robert@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
+ */
+
+#ifndef _UCW_REGEX_H
+#define _UCW_REGEX_H
+
+typedef struct regex regex;
+
+regex *rx_compile(const char *r, int icase);
+void rx_free(regex *r);
+int rx_match(regex *r, const char *s);
+int rx_subst(regex *r, const char *by, const char *src, char *dest, uns destlen);
+
+#endif