mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
List and check sigs works
This commit is contained in:
parent
649eae8f1b
commit
5c1cca042e
35 changed files with 1007 additions and 793 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include "types.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@ -31,3 +32,23 @@ make_timestamp()
|
|||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Print a string to FP, but filter all control characters out.
|
||||
*/
|
||||
void
|
||||
print_string( FILE *fp, byte *p, size_t n )
|
||||
{
|
||||
for( ; n; n--, p++ )
|
||||
if( iscntrl( *p ) ) {
|
||||
putc('\\', fp);
|
||||
if( *p == '\n' )
|
||||
putc('n', fp);
|
||||
else if( !*p )
|
||||
putc('0', fp);
|
||||
else
|
||||
printf("x%02x", *p );
|
||||
}
|
||||
else
|
||||
putc(*p, fp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue