}
}
-/* 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
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 *
/* 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
/* 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);
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);
\f
/* Common character classes for use with substring and string functions. */