summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-29 23:09:13 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-29 23:09:13 +0000
commit7f1acfdb8928de69bf02db6cf217f0f3b4af45ea (patch)
tree752654d9a3ef967d5409600962e31bea5cae14fc /utility.c
parent24d8e7d787aa1940030a1beaabdd4388588ca512 (diff)
downloadbusybox-w32-7f1acfdb8928de69bf02db6cf217f0f3b4af45ea.tar.gz
busybox-w32-7f1acfdb8928de69bf02db6cf217f0f3b4af45ea.tar.bz2
busybox-w32-7f1acfdb8928de69bf02db6cf217f0f3b4af45ea.zip
More stuf. sed works.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utility.c b/utility.c
index e0f9d1246..637368740 100644
--- a/utility.c
+++ b/utility.c
@@ -777,7 +777,7 @@ int get_console_fd(char* tty_name)
777#endif 777#endif
778 778
779 779
780#if !defined BB_REGEXP && (defined BB_GREP || defined BB_FIND ) 780#if !defined BB_REGEXP && (defined BB_GREP || defined BB_FIND || defined BB_SED)
781 781
782/* Do a case insensitive strstr() */ 782/* Do a case insensitive strstr() */
783char* stristr(char *haystack, const char *needle) 783char* stristr(char *haystack, const char *needle)
@@ -817,7 +817,7 @@ extern int find_match(char *haystack, char *needle, int ignoreCase)
817/* This performs substitutions after a string match has been found. */ 817/* This performs substitutions after a string match has been found. */
818extern int replace_match(char *haystack, char *needle, char *newNeedle, int ignoreCase) 818extern int replace_match(char *haystack, char *needle, char *newNeedle, int ignoreCase)
819{ 819{
820 int foundOne; 820 int foundOne=0;
821 char *where, *slider, *slider1, *oldhayStack; 821 char *where, *slider, *slider1, *oldhayStack;
822 822
823 if (ignoreCase == FALSE) 823 if (ignoreCase == FALSE)
@@ -847,7 +847,7 @@ extern int replace_match(char *haystack, char *needle, char *newNeedle, int igno
847 } 847 }
848 free( oldhayStack); 848 free( oldhayStack);
849 849
850 if (foundOne) 850 if (foundOne > 0)
851 return TRUE; 851 return TRUE;
852 else 852 else
853 return FALSE; 853 return FALSE;