From: Ben Pfaff Date: Mon, 18 Oct 2010 03:31:02 +0000 (-0700) Subject: str: Remove unused functions. X-Git-Tag: v0.7.7~198 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88106f033c3f823c9d65589081b12c870b43f821;p=pspp-builds.git str: Remove unused functions. --- 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 * diff --git a/src/libpspp/str.h b/src/libpspp/str.h index 0b57f736..64da8562 100644 --- a/src/libpspp/str.h +++ b/src/libpspp/str.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +32,6 @@ /* Miscellaneous. */ void buf_reverse (char *, size_t); -char *buf_find_reverse (const char *, size_t, const char *, size_t); int buf_compare_case (const char *, const char *, size_t); int buf_compare_rpad (const char *, size_t, const char *, size_t); void buf_copy_lpad (char *, size_t, const char *, size_t, char pad); @@ -49,8 +48,6 @@ void str_lowercase (char *); bool str_format_26adic (unsigned long int number, char buffer[], size_t); -char *spprintf (char *dst, const char *format, ...); - void *mempset (void *, int, size_t); /* Common character classes for use with substring and string functions. */