* return whether we removed a pattern or not.
authorWilfried Göesgens <willi@citadel.org>
Sat, 14 Feb 2009 11:38:08 +0000 (11:38 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 14 Feb 2009 11:38:08 +0000 (11:38 +0000)
libcitadel/debian/files
libcitadel/lib/libcitadel.h
libcitadel/lib/tools.c

index 73fc3064e0412a561172b5a5c47e4c6ec0596e3b..d2ac0561c0b0a03d7eab551e7db9c29484f59207 100644 (file)
@@ -1,3 +1,3 @@
-libcitadel1_7.38-8_amd64.deb libs optional
-libcitadel1-dbg_7.38-8_amd64.deb libdevel optional
-libcitadel-dev_7.38-8_amd64.deb libdevel optional
+libcitadel1_7.38-8_i386.deb libs optional
+libcitadel1-dbg_7.38-8_i386.deb libdevel optional
+libcitadel-dev_7.38-8_i386.deb libdevel optional
index 50d87f241591893439a06f450d182aa23598e3ac..32fbd6eb966ff5a80ce197d64f348aa52e011f65 100644 (file)
@@ -331,7 +331,7 @@ char *memreadline(char *start, char *buf, int maxlen);
 char *memreadlinelen(char *start, char *buf, int maxlen, int *retlen);
 #define IsEmptyStr(a) ((a)[0] == '\0')
 #define num_parms(source)              num_tokens(source,(char)'|')
-void stripout(char *str, char leftboundary, char rightboundary);
+int stripout(char *str, char leftboundary, char rightboundary);
 void stripallbut(char *str, char leftboundary, char rightboundary);
 char *myfgets(char *s, int size, FILE *stream);
 void urlesc(char *outbuf, size_t oblen, char *strbuf);
index 48a55fdf87ffc73a67d40d8e0153c38c5d63c290..a772bcadec1f2ee60ea26d732500480d453f24c6 100644 (file)
@@ -648,7 +648,7 @@ char *memreadlinelen(char *start, char *buf, int maxlen, int *retlen)
  * Strip a boundarized substring out of a string (for example, remove
  * parentheses and anything inside them).
  */
-void stripout(char *str, char leftboundary, char rightboundary) {
+int stripout(char *str, char leftboundary, char rightboundary) {
        int a;
         int lb = (-1);
         int rb = (-1);
@@ -660,12 +660,14 @@ void stripout(char *str, char leftboundary, char rightboundary) {
 
         if ( (lb > 0) && (rb > lb) ) {
                 strcpy(&str[lb - 1], &str[rb + 1]);
+               return 1;
         }
 
         else if ( (lb == 0) && (rb > lb) ) {
                 strcpy(str, &str[rb + 1]);
+               return 1;
         }
-
+       return 0;
 }