diff options
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/assuan-buffer.c | 6 | ||||
-rw-r--r-- | src/assuan-client.c | 3 | ||||
-rw-r--r-- | src/assuan-defs.h | 4 | ||||
-rwxr-xr-x | src/mkerrors | 2 |
5 files changed, 15 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4b02eb5..ec9e288 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2006-09-19 Marcus Brinkmann <[email protected]> + * mkerrors (_assuan_error): Change return type to assuan_error_t. + * assuan-buffer.c (_assuan_read_line): Change return type to + assuan_error_t. Map returned value of -1. + (_assuan_write_line): Change type of RC to assuan_error_t. + * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for + prototypes. + * assuan-defs.h (unsetenv): Define correctly. 2006-09-14 Werner Koch <[email protected]> diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c index 0a49b0d..5580392 100644 --- a/src/assuan-buffer.c +++ b/src/assuan-buffer.c @@ -95,7 +95,7 @@ readline (assuan_context_t ctx, char *buf, size_t buflen, /* Function returns an Assuan error. */ -int +assuan_error_t _assuan_read_line (assuan_context_t ctx) { char *line = ctx->inbound.line; @@ -104,7 +104,7 @@ _assuan_read_line (assuan_context_t ctx) char *endp = 0; if (ctx->inbound.eof) - return -1; + return _assuan_error (-1); atticlen = ctx->inbound.attic.linelen; if (atticlen) @@ -243,7 +243,7 @@ assuan_error_t _assuan_write_line (assuan_context_t ctx, const char *prefix, const char *line, size_t len) { - int rc = 0; + assuan_error_t rc = 0; size_t prefixlen = prefix? strlen (prefix):0; /* Make sure that the line is short enough. */ diff --git a/src/assuan-client.c b/src/assuan-client.c index a5d9798..06e3966 100644 --- a/src/assuan-client.c +++ b/src/assuan-client.c @@ -139,7 +139,8 @@ assuan_transact (assuan_context_t ctx, int (*status_cb)(void*, const char *), void *status_cb_arg) { - int rc, okay, off; + assuan_error_t rc; + int okay, off; char *line; int linelen; diff --git a/src/assuan-defs.h b/src/assuan-defs.h index 9c987e2..cf7ce09 100644 --- a/src/assuan-defs.h +++ b/src/assuan-defs.h @@ -200,7 +200,7 @@ void _assuan_init_uds_io (assuan_context_t ctx); int _assuan_register_std_commands (assuan_context_t ctx); /*-- assuan-buffer.c --*/ -int _assuan_read_line (assuan_context_t ctx); +assuan_error_t _assuan_read_line (assuan_context_t ctx); int _assuan_cookie_write_data (void *cookie, const char *buffer, size_t size); int _assuan_cookie_write_flush (void *cookie); assuan_error_t _assuan_write_line (assuan_context_t ctx, const char *prefix, @@ -215,7 +215,7 @@ assuan_error_t _assuan_read_from_server (assuan_context_t ctx, /* Map error codes as used in this implementaion to the libgpg-error codes. */ -int _assuan_error (int oldcode); +assuan_error_t _assuan_error (int oldcode); /* Extrac the erro code from A. This works for both the old and the new style error codes. This needs to be whenever an error code is diff --git a/src/mkerrors b/src/mkerrors index b5ab114..459c808 100755 --- a/src/mkerrors +++ b/src/mkerrors @@ -52,7 +52,7 @@ assuan_set_assuan_err_source (int errsource) /* Helper to map old style Assuan error codes to gpg-error codes. This is used internally to keep an compatible ABI. */ -int +assuan_error_t _assuan_error (int oldcode) { unsigned int n; |