[svn] assuan - r204 - trunk/src

svn author marcus cvs at cvs.gnupg.org
Tue Sep 19 12:17:51 CEST 2006


Author: marcus
Date: 2006-09-19 12:17:51 +0200 (Tue, 19 Sep 2006)
New Revision: 204

Modified:
   trunk/src/ChangeLog
   trunk/src/assuan-buffer.c
   trunk/src/assuan-client.c
   trunk/src/assuan-defs.h
   trunk/src/mkerrors
Log:
2006-09-19  Marcus Brinkmann  <marcus at g10code.de>

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


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2006-09-19 10:16:59 UTC (rev 203)
+++ trunk/src/ChangeLog	2006-09-19 10:17:51 UTC (rev 204)
@@ -1,5 +1,12 @@
 2006-09-19  Marcus Brinkmann  <marcus at g10code.de>
 
+	* 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  <wk at g10code.com>

Modified: trunk/src/assuan-buffer.c
===================================================================
--- trunk/src/assuan-buffer.c	2006-09-19 10:16:59 UTC (rev 203)
+++ trunk/src/assuan-buffer.c	2006-09-19 10:17:51 UTC (rev 204)
@@ -95,7 +95,7 @@
 
 
 /* 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 @@
   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_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. */

Modified: trunk/src/assuan-client.c
===================================================================
--- trunk/src/assuan-client.c	2006-09-19 10:16:59 UTC (rev 203)
+++ trunk/src/assuan-client.c	2006-09-19 10:17:51 UTC (rev 204)
@@ -139,7 +139,8 @@
                  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;
 

Modified: trunk/src/assuan-defs.h
===================================================================
--- trunk/src/assuan-defs.h	2006-09-19 10:16:59 UTC (rev 203)
+++ trunk/src/assuan-defs.h	2006-09-19 10:17:51 UTC (rev 204)
@@ -200,7 +200,7 @@
 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 @@
 
 /* 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

Modified: trunk/src/mkerrors
===================================================================
--- trunk/src/mkerrors	2006-09-19 10:16:59 UTC (rev 203)
+++ trunk/src/mkerrors	2006-09-19 10:17:51 UTC (rev 204)
@@ -52,7 +52,7 @@
 
 /* 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;




More information about the Gnupg-commits mailing list