aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cipher.h1
-rw-r--r--include/errors.h1
-rw-r--r--include/iobuf.h1
-rw-r--r--include/mpi.h1
-rw-r--r--include/util.h31
5 files changed, 28 insertions, 7 deletions
diff --git a/include/cipher.h b/include/cipher.h
index 1f615e54d..52d1a7503 100644
--- a/include/cipher.h
+++ b/include/cipher.h
@@ -78,6 +78,7 @@ int check_pubkey_algo( int algo );
int check_digest_algo( int algo );
/*-- random.c --*/
+int quick_random_gen( int onoff );
void randomize_buffer( byte *buffer, size_t length, int level );
byte get_random_byte( int level );
diff --git a/include/errors.h b/include/errors.h
index 450d910cf..305a147e8 100644
--- a/include/errors.h
+++ b/include/errors.h
@@ -53,5 +53,6 @@
#define G10ERR_RESOURCE_LIMIT 31
#define G10ERR_INV_KEYRING 32
#define G10ERR_TRUSTDB 33 /* a problem with the trustdb */
+#define G10ERR_BAD_CERT 34 /* bad certicate */
#endif /*G10_ERRORS_H*/
diff --git a/include/iobuf.h b/include/iobuf.h
index d29e0a06e..e381445a5 100644
--- a/include/iobuf.h
+++ b/include/iobuf.h
@@ -93,6 +93,7 @@ u32 iobuf_get_filelength( IOBUF a );
const char *iobuf_get_fname( IOBUF a );
void iobuf_set_block_mode( IOBUF a, size_t n );
+void iobuf_set_partial_block_mode( IOBUF a, size_t len );
int iobuf_in_block_mode( IOBUF a );
/* get a byte form the iobuf; must check for eof prior to this function
diff --git a/include/mpi.h b/include/mpi.h
index 7c4639f18..7a43b3018 100644
--- a/include/mpi.h
+++ b/include/mpi.h
@@ -41,7 +41,6 @@ int mpi_debug_mode;
#define BITS_PER_MPI_LIMB (8*SIZEOF_UNSIGNED_LONG)
#define BYTES_PER_MPI_LIMB SIZEOF_UNSIGNED_LONG
-#define BYTES_PER_MPI_LIMB2 (2*SIZEOF_UNSIGNED_LONG)
typedef unsigned long int mpi_limb_t;
typedef signed long int mpi_limb_signed_t;
diff --git a/include/util.h b/include/util.h
index 7f2593022..a33b7f21f 100644
--- a/include/util.h
+++ b/include/util.h
@@ -58,20 +58,38 @@ typedef struct {
/*-- logger.c --*/
void log_set_pid( int pid );
int log_get_errorcount( int clear );
-void printstr( int level, const char *fmt, ... );
-void log_bug( const char *fmt, ... );
-void log_fatal( const char *fmt, ... );
-void log_error( const char *fmt, ... );
-void log_info( const char *fmt, ... );
-void log_debug( const char *fmt, ... );
void log_hexdump( const char *text, char *buf, size_t len );
void log_mpidump( const char *text, MPI a );
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
+ void printstr( int level, const char *fmt, ... )
+ __attribute__ ((format (printf,2,3)));
+ void log_bug( const char *fmt, ... )
+ __attribute__ ((noreturn, format (printf,1,2)));
+ void log_bug0( void ) __attribute__ ((noreturn));
+ void log_fatal( const char *fmt, ... )
+ __attribute__ ((noreturn, format (printf,1,2)));
+ void log_error( const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
+ void log_info( const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
+ void log_debug( const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
+#else
+ void printstr( int level, const char *fmt, ... );
+ void log_bug( const char *fmt, ... );
+ void log_bug0( void );
+ void log_fatal( const char *fmt, ... );
+ void log_error( const char *fmt, ... );
+ void log_info( const char *fmt, ... );
+ void log_debug( const char *fmt, ... );
+#endif
+
+
/*-- errors.c --*/
const char * g10_errstr( int no );
/*-- argparse.c --*/
int arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts);
+int optfile_parse( FILE *fp, const char *filename, unsigned *lineno,
+ ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts);
void usage( int level );
const char *default_strusage( int level );
@@ -112,5 +130,6 @@ char *strlwr(char *a);
#define STR2(v) STR(v)
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
#define DIMof(type,member) DIM(((type *)0)->member)
+#define BUG() log_bug0()
#endif /*G10_UTIL_H*/