1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

See ChangeLog: Thu May 20 14:04:08 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-05-20 12:11:41 +00:00
parent bfb32130e5
commit 77d6309e21
14 changed files with 74 additions and 29 deletions

View file

@ -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.

View file

@ -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 ;

View file

@ -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