Permalink
Browse files

Minor code cleanups

  • Loading branch information...
1 parent ee71717 commit 4d5bb496fd32728db90891701b942f5ead5a09e4 @hintjens committed Jan 16, 2013
Showing with 5 additions and 2 deletions.
  1. +4 −1 include/czmq_prelude.h
  2. +1 −1 include/zloop.h
View
@@ -364,7 +364,6 @@
//- Data types --------------------------------------------------------------
-typedef int Bool; // Boolean TRUE/FALSE value
typedef unsigned char byte; // Single unsigned byte = 8 bits
typedef unsigned short dbyte; // Double byte = 16 bits
typedef unsigned int qbyte; // Quad byte = 32 bits
@@ -373,19 +372,23 @@ typedef unsigned int qbyte; // Quad byte = 32 bits
#define streq(s1,s2) (!strcmp ((s1), (s2)))
#define strneq(s1,s2) (strcmp ((s1), (s2)))
+
// Provide random number from 0..(num-1)
#if (defined (__WINDOWS__)) || (defined (__UTYPE_IBMAIX)) || (defined (__UTYPE_HPUX)) || (defined (__UTYPE_SUNOS))
# define randof(num) (int) ((float) (num) * rand () / (RAND_MAX + 1.0))
#else
# define randof(num) (int) ((float) (num) * random () / (RAND_MAX + 1.0))
#endif
+
// I'd rather use stdbool.h but that is not available on current MSVC
#if (!defined (true))
# define true 1
# define false 0
typedef char bool;
#endif
+
// Deprecated, remove at some stage
+typedef int Bool; // Boolean TRUE/FALSE value
#if (!defined (TRUE))
# define TRUE 1
# define FALSE 0
View
@@ -83,7 +83,7 @@ CZMQ_EXPORT int
zloop_start (zloop_t *self);
// Self test of this class
-int
+void
zloop_test (bool verbose);
// @end

0 comments on commit 4d5bb49

Please sign in to comment.