1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +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

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