X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fstr.c;h=09eb77cd5af3736890996ebfc7ad924beea4220d;hb=88106f033c3f823c9d65589081b12c870b43f821;hp=9f0cb6e31463ab5caf319114e43fed26f640ae2b;hpb=32c8a9891f2c0bdc9e1cda13f1313843bc4e6044;p=pspp-builds.git diff --git a/src/libpspp/str.c b/src/libpspp/str.c index 9f0cb6e3..09eb77cd 100644 --- a/src/libpspp/str.c +++ b/src/libpspp/str.c @@ -50,19 +50,6 @@ buf_reverse (char *p, size_t nbytes) } } -/* Finds the last NEEDLE of length NEEDLE_LEN in a HAYSTACK of length - HAYSTACK_LEN. Returns a pointer to the needle found. */ -char * -buf_find_reverse (const char *haystack, size_t haystack_len, - const char *needle, size_t needle_len) -{ - int i; - for (i = haystack_len - needle_len; i >= 0; i--) - if (!memcmp (needle, &haystack[i], needle_len)) - return (char *) &haystack[i]; - return 0; -} - /* Compares the SIZE bytes in A to those in B, disregarding case, and returns a strcmp()-type result. */ int @@ -295,21 +282,6 @@ str_format_26adic (unsigned long int number, char buffer[], size_t size) return true; } -/* Formats FORMAT into DST, as with sprintf(), and returns the - address of the terminating null written to DST. */ -char * -spprintf (char *dst, const char *format, ...) -{ - va_list args; - int count; - - va_start (args, format); - count = vsprintf (dst, format, args); - va_end (args); - - return dst + count; -} - /* Sets the SIZE bytes starting at BLOCK to C, and returns the byte following BLOCK. */ void *