diff options
author | Werner Koch <wk@gnupg.org> | 1999-05-20 14:11:41 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1999-05-20 14:11:41 +0200 |
commit | 77d6309e2189254cf7a45884fb7ef6a415761988 (patch) | |
tree | 60da5c2556a5b7cb9c8d65dedd7a293eec2a35e8 /util | |
parent | See ChangeLog: Wed May 19 16:04:30 CEST 1999 Werner Koch (diff) | |
download | gnupg2-77d6309e2189254cf7a45884fb7ef6a415761988.tar.xz gnupg2-77d6309e2189254cf7a45884fb7ef6a415761988.zip |
See ChangeLog: Thu May 20 14:04:08 CEST 1999 Werner Koch
Diffstat (limited to 'util')
-rw-r--r-- | util/ChangeLog | 6 | ||||
-rw-r--r-- | util/memory.c | 4 | ||||
-rw-r--r-- | util/strgutil.c | 16 |
3 files changed, 19 insertions, 7 deletions
diff --git a/util/ChangeLog b/util/ChangeLog index 1905d19c9..417c7b402 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,9 @@ +Thu May 20 14:04:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> + + * memory.c (membug): Nanu, there was a const instead of a static. + + * strgutil.c (trim_trailing_chars): New. + Mon May 17 21:54:43 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> * logger.c (g10_log_hexdump): Made 2nd arg a const. diff --git a/util/memory.c b/util/memory.c index 4370c72ec..ebf8f8893 100644 --- a/util/memory.c +++ b/util/memory.c @@ -48,7 +48,7 @@ #define EXTRA_ALIGN 0 #endif -const void membug( const char *fmt, ... ); +static void membug( const char *fmt, ... ); #ifdef M_DEBUG #ifndef M_GUARD @@ -320,7 +320,7 @@ check_allmem( const char *info ) #endif /* M_DEBUG */ -const void +static void membug( const char *fmt, ... ) { va_list arg_ptr ; diff --git a/util/strgutil.c b/util/strgutil.c index 5cef77bf6..ab0d2234a 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -213,17 +213,14 @@ trim_spaces( char *str ) -/**************** - * remove trailing white spaces and return the length of the buffer - */ unsigned -trim_trailing_ws( byte *line, unsigned len ) +trim_trailing_chars( byte *line, unsigned len, const char *trimchars ) { byte *p, *mark; unsigned n; for(mark=NULL, p=line, n=0; n < len; n++, p++ ) { - if( strchr(" \t\r\n", *p ) ) { + if( strchr(trimchars, *p ) ) { if( !mark ) mark = p; } @@ -238,6 +235,15 @@ trim_trailing_ws( byte *line, unsigned len ) return len; } +/**************** + * remove trailing white spaces and return the length of the buffer + */ +unsigned +trim_trailing_ws( byte *line, unsigned len ) +{ + return trim_trailing_chars( line, len, " \t\r\n" ); +} + int |