sort is good to go.
[oweals/busybox.git] / regexp.c
index fb0170739ecfe3f8bd2245967b7f9ff8d9a3b36a..b264ffb6fd3bba6c91736ec4a6fe26fe29e6fafc 100644 (file)
--- a/regexp.c
+++ b/regexp.c
@@ -7,7 +7,7 @@
 #include <ctype.h>
 
 
-#if ( defined BB_GREP || defined BB_FIND  || defined BB_SED)
+#if ( defined BB_GREP || defined BB_SED)
 
 /* This also tries to find a needle in a haystack, but uses
  * real regular expressions....  The fake regular expression
@@ -98,7 +98,9 @@ extern int replace_match(char *haystack, char *needle, char *newNeedle, int igno
 
 
 static char *previous; /* the previous regexp, used when null regexp is given */
+#if defined BB_SED
 static char *previous1;        /* a copy of the text from the previous substitution for regsub()*/
+#endif
 
 
 /* These are used to classify or recognize meta-characters */
@@ -135,7 +137,7 @@ static char *retext;        /* points to the text being compiled */
 
 /* error-handling stuff */
 jmp_buf        errorhandler;
-#define FAIL(why)      fprintf(stderr, why); longjmp(errorhandler, 1)
+#define FAIL(why)  do {fprintf(stderr, why); longjmp(errorhandler, 1);} while (0)