apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject [PATCH] APR_REMOVEFROM
Date Mon, 23 Jul 2001 21:53:50 GMT
This basically does what it says...

david

Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.20
diff -u -r1.20 apr_common.m4
--- apr_common.m4       2001/07/05 00:02:10     1.20
+++ apr_common.m4       2001/07/23 20:55:42
@@ -174,6 +174,32 @@
 ])dnl

 dnl
+dnl APR_REMOVEFROM(variable, value)
+dnl
+dnl Remove a value from a variable
+dnl
+AC_DEFUN(APR_REMOVEFROM,[
+  if test "x$$1" = "x$2"; then
+    echo "  nulling $1"
+    $1=""
+  else
+    apr_new_bugger=""
+    apr_removed=0
+    for i in $$1; do
+      if test "x$i" != "x$2"; then
+        apr_new_bugger="$apr_new_bugger $i"
+      else
+        apr_removed=1
+      fi
+    done
+    if test $apr_removed = "1"; then
+      echo "  removed \"$2\" from $1"
+      $1=$apr_new_bugger
+    fi
+  fi
+]) dnl
+
+dnl
 dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
 dnl
 AC_DEFUN(APR_CHECK_DEFINE_FILES,[
cvs [diff aborted]: received interrupt signal    


Mime
View raw message