From 88106f033c3f823c9d65589081b12c870b43f821 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 17 Oct 2010 20:31:02 -0700 Subject: [PATCH] str: Remove unused functions. --- src/libpspp/str.c | 28 ---------------------------- src/libpspp/str.h | 5 +---- 2 files changed, 1 insertion(+), 32 deletions(-) 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. */ -- 2.30.2