emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115503: * gnutls.c, gnutls.h (emacs_gnutls_record_c


From: Paul Eggert
Subject: [Emacs-diffs] trunk r115503: * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
Date: Fri, 13 Dec 2013 03:45:05 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115503
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-12 19:44:59 -0800
message:
  * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
  
  Return ptrdiff_t, not int, since it's a buffer size.
  Reindent/reparen some macros to a more Gnuish style.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/gnutls.c                   gnutls.c-20100926054902-dzayyj6wycit6kzn-3
  src/gnutls.h                   gnutls.h-20100926054902-dzayyj6wycit6kzn-4
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-12 19:23:25 +0000
+++ b/src/ChangeLog     2013-12-13 03:44:59 +0000
@@ -1,3 +1,9 @@
+2013-12-13  Paul Eggert  <address@hidden>
+
+       * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
+       Return ptrdiff_t, not int, since it's a buffer size.
+       Reindent/reparen some macros to a more Gnuish style.
+
 2013-12-12  Paul Eggert  <address@hidden>
 
        Avoid undefined behavior with huge regexp interval counts.

=== modified file 'src/gnutls.c'
--- a/src/gnutls.c      2013-12-07 17:21:57 +0000
+++ b/src/gnutls.c      2013-12-13 03:44:59 +0000
@@ -365,7 +365,7 @@
   return ret;
 }
 
-int
+ptrdiff_t
 emacs_gnutls_record_check_pending (gnutls_session_t state)
 {
   return fn_gnutls_record_check_pending (state);

=== modified file 'src/gnutls.h'
--- a/src/gnutls.h      2013-10-17 06:42:21 +0000
+++ b/src/gnutls.h      2013-12-13 03:44:59 +0000
@@ -45,25 +45,38 @@
   GNUTLS_STAGE_READY
 } gnutls_initstage_t;
 
-#define GNUTLS_EMACS_ERROR_NOT_LOADED GNUTLS_E_APPLICATION_ERROR_MIN + 1
+#define GNUTLS_EMACS_ERROR_NOT_LOADED (GNUTLS_E_APPLICATION_ERROR_MIN + 1)
 #define GNUTLS_EMACS_ERROR_INVALID_TYPE GNUTLS_E_APPLICATION_ERROR_MIN
 
 #define GNUTLS_INITSTAGE(proc) (XPROCESS (proc)->gnutls_initstage)
 
-#define GNUTLS_PROCESS_USABLE(proc) (GNUTLS_INITSTAGE(proc) >= 
GNUTLS_STAGE_READY)
-
-#define GNUTLS_LOG(level, max, string) do { if (level <= max) { 
gnutls_log_function (level, "(Emacs) " string); } } while (0)
-
-#define GNUTLS_LOG2(level, max, string, extra) do { if (level <= max) { 
gnutls_log_function2 (level, "(Emacs) " string, extra); } } while (0)
-
-#define GNUTLS_LOG2i(level, max, string, extra) do { if (level <= max) { 
gnutls_log_function2i (level, "(Emacs) " string, extra); } } while (0)
+#define GNUTLS_PROCESS_USABLE(proc) \
+  (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_READY)
+
+#define GNUTLS_LOG(level, max, string)                         \
+  do {                                                         \
+    if ((level) <= (max))                                      \
+      gnutls_log_function (level, "(Emacs) " string);          \
+  } while (0)
+
+#define GNUTLS_LOG2(level, max, string, extra)                 \
+  do {                                                         \
+    if ((level) <= (max))                                      \
+      gnutls_log_function2 (level, "(Emacs) " string, extra);  \
+  } while (0)
+
+#define GNUTLS_LOG2i(level, max, string, extra)                        \
+  do {                                                         \
+    if ((level) <= (max))                                      \
+      gnutls_log_function2i (level, "(Emacs) " string, extra); \
+  } while (0)
 
 extern ptrdiff_t
 emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t 
nbyte);
 extern ptrdiff_t
 emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte);
 
-extern int emacs_gnutls_record_check_pending (gnutls_session_t state);
+extern ptrdiff_t emacs_gnutls_record_check_pending (gnutls_session_t state);
 #ifdef WINDOWSNT
 extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err);
 #endif


reply via email to

[Prev in Thread] Current Thread [Next in Thread]