]> granicus.if.org Git - libevent/commitdiff
Reformat util.h slightly so that it looks ok with 8-char tabs.
authorNick Mathewson <nickm@torproject.org>
Mon, 26 Jan 2009 17:09:09 +0000 (17:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 26 Jan 2009 17:09:09 +0000 (17:09 +0000)
svn:r1050

include/event2/util.h

index 7735a157bf8418c19b7b513d26410517d0aae8d1..378104092898af75d168366340b860fdbe8b5fec 100644 (file)
@@ -102,8 +102,8 @@ extern "C" {
 #endif
 
 #ifdef WIN32
-/** Type to hold the output of "socket()" or "accept()".  On Windows, this is
- * an intptr_t; elsewhere, it is an int. */
+/** A type wide enough to hold the output of "socket()" or "accept()".  On
+ * Windows, this is an intptr_t; elsewhere, it is an int. */
 #define evutil_socket_t intptr_t
 #else
 #define evutil_socket_t int
@@ -148,23 +148,23 @@ const char *evutil_socket_error_to_string(int errcode);
 #define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp))
 #define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp))
 #else
-#define evutil_timeradd(tvp, uvp, vvp)                                                 \
-       do {                                                                                                            \
-               (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;                  \
+#define evutil_timeradd(tvp, uvp, vvp)                                 \
+       do {                                                            \
+               (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \
                (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \
-               if ((vvp)->tv_usec >= 1000000) {                                                \
-                       (vvp)->tv_sec++;                                                                        \
-                       (vvp)->tv_usec -= 1000000;                                                      \
-               }                                                                                                               \
+               if ((vvp)->tv_usec >= 1000000) {                        \
+                       (vvp)->tv_sec++;                                \
+                       (vvp)->tv_usec -= 1000000;                      \
+               }                                                       \
        } while (0)
-#define        evutil_timersub(tvp, uvp, vvp)                                          \
-       do {                                                                                                    \
+#define        evutil_timersub(tvp, uvp, vvp)                                  \
+       do {                                                            \
                (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \
                (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \
-               if ((vvp)->tv_usec < 0) {                                                       \
-                       (vvp)->tv_sec--;                                                                \
-                       (vvp)->tv_usec += 1000000;                                              \
-               }                                                                                                       \
+               if ((vvp)->tv_usec < 0) {                               \
+                       (vvp)->tv_sec--;                                \
+                       (vvp)->tv_usec += 1000000;                      \
+               }                                                       \
        } while (0)
 #endif /* !_EVENT_HAVE_HAVE_TIMERADD */
 
@@ -174,9 +174,9 @@ const char *evutil_socket_error_to_string(int errcode);
 #define        evutil_timerclear(tvp)  (tvp)->tv_sec = (tvp)->tv_usec = 0
 #endif
 
-#define        evutil_timercmp(tvp, uvp, cmp)                                                  \
-       (((tvp)->tv_sec == (uvp)->tv_sec) ?                                                     \
-        ((tvp)->tv_usec cmp (uvp)->tv_usec) :                                          \
+#define        evutil_timercmp(tvp, uvp, cmp)                                  \
+       (((tvp)->tv_sec == (uvp)->tv_sec) ?                             \
+        ((tvp)->tv_usec cmp (uvp)->tv_usec) :                          \
         ((tvp)->tv_sec cmp (uvp)->tv_sec))
 
 #ifdef _EVENT_HAVE_TIMERISSET