summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-08-30 16:52:56 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-08-30 16:52:56 +0000
commitfc94a56f56821957da7cc4c8974dae87881bb514 (patch)
tree84b8c3b4f5168c5bbacdb8aa5746010d21724234
parenta328cefbf067785a867f53df042ca02ec3e6f39d (diff)
downloadtinyproxy-fc94a56f56821957da7cc4c8974dae87881bb514.tar.gz
tinyproxy-fc94a56f56821957da7cc4c8974dae87881bb514.zip
Removed the xstrstr() function since it is no longer used. reqs.c was the
only place it was called from, and strstr() will do the same work.
Diffstat (limited to '')
-rw-r--r--src/utils.c30
-rw-r--r--src/utils.h5
2 files changed, 2 insertions, 33 deletions
diff --git a/src/utils.c b/src/utils.c
index 5278a14..9c7bf19 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.7 2001-08-28 04:33:54 rjkaes Exp $
+/* $Id: utils.c,v 1.8 2001-08-30 16:52:56 rjkaes Exp $
*
* Misc. routines which are used by the various functions to handle strings
* and memory allocation and pretty much anything else we can think of. Also,
@@ -31,34 +31,6 @@
#include "utils.h"
/*
- * Find the start of the needle in the haystack. Limits the search to less
- * than "length" characters. Returns NULL if the needle is not found.
- */
-char *xstrstr(char *haystack, char *needle, size_t length,
- bool_t case_sensitive)
-{
- unsigned int i;
- /* Used to specify which function to use... need the decl. */
- int (*fn) (const char *s1, const char *s2, size_t n);
-
- if (case_sensitive)
- fn = strncmp;
- else
- fn = strncasecmp;
-
- if (strlen(needle) > length)
- return NULL;
-
- for (i = 0; i <= length - strlen(needle); i++) {
- if ((*fn) (haystack + i, needle, strlen(needle)) == 0)
- return (haystack + i);
-
- }
-
- return NULL;
-}
-
-/*
* Display an error to the client.
*/
#define HEADER_SIZE (1024 * 8)
diff --git a/src/utils.h b/src/utils.h
index da4dd2f..6c22395 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,4 +1,4 @@
-/* $Id: utils.h,v 1.5 2001-08-27 03:45:34 rjkaes Exp $
+/* $Id: utils.h,v 1.6 2001-08-30 16:52:56 rjkaes Exp $
*
* See 'utils.h' for a detailed description.
*
@@ -21,9 +21,6 @@
#include "tinyproxy.h"
-extern char *xstrstr(char *haystack, char *needle, size_t length,
- bool_t case_sensitive);
-
extern int httperr(struct conn_s *connptr, int err, const char *msg);
extern void makedaemon(void);