diff options
author | Werner Koch <wk@gnupg.org> | 2003-06-18 21:56:13 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-06-18 21:56:13 +0200 |
commit | c0c2c58054923d506f61ce9a71d509b48a381211 (patch) | |
tree | a8f82bffb44eb68eb726ff6db41fa715bcd29193 /jnlib/stringhelp.h | |
parent | A small step for GnuPG but a huge leap for error codes. (diff) | |
download | gnupg2-c0c2c58054923d506f61ce9a71d509b48a381211.tar.xz gnupg2-c0c2c58054923d506f61ce9a71d509b48a381211.zip |
Finished the bulk of changes for gnupg 1.9. This included switching
to libgcrypt functions, using shared error codes from libgpg-error,
replacing the old functions we used to have in ../util by those in
../jnlib and ../common, renaming the malloc functions and a couple of
types. Note, that not all changes are listed below becuause they are
too similar and done at far too many places. As of today the code
builds using the current libgcrypt from CVS but it is very unlikely
that it actually works.
Diffstat (limited to 'jnlib/stringhelp.h')
-rw-r--r-- | jnlib/stringhelp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jnlib/stringhelp.h b/jnlib/stringhelp.h index 027d30c72..fe5786e59 100644 --- a/jnlib/stringhelp.h +++ b/jnlib/stringhelp.h @@ -1,5 +1,5 @@ /* stringhelp.h - * Copyright (C) 1998,1999,2000,2001 Free Software Foundation, Inc. + * Copyright (C) 1998,1999,2000,2001,2003 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -30,6 +30,9 @@ char *trim_trailing_spaces( char *string ); unsigned int trim_trailing_chars( unsigned char *line, unsigned len, const char *trimchars); unsigned int trim_trailing_ws( unsigned char *line, unsigned len ); +size_t length_sans_trailing_chars (const unsigned char *line, size_t len, + const char *trimchars ); +size_t length_sans_trailing_ws (const unsigned char *line, size_t len); char *make_basename(const char *filepath); @@ -43,6 +46,7 @@ size_t print_sanitized_utf8_buffer (FILE *fp, const void *buffer, size_t length, int delim); size_t print_sanitized_string (FILE *fp, const char *string, int delim); size_t print_sanitized_utf8_string (FILE *fp, const char *string, int delim); +char *sanitize_buffer (const unsigned char *p, size_t n, int delim); const char *ascii_memistr( const char *buf, size_t buflen, const char *sub ); @@ -51,7 +55,9 @@ int ascii_islower (int c); int ascii_toupper (int c); int ascii_tolower (int c); int ascii_strcasecmp( const char *a, const char *b ); +int ascii_strncasecmp (const char *a, const char *b, size_t n); int ascii_memcasecmp( const char *a, const char *b, size_t n ); +const char *ascii_memistr ( const char *buf, size_t buflen, const char *sub); void *ascii_memcasemem (const void *haystack, size_t nhaystack, const void *needle, size_t nneedle); |