diff mcabber/src/roster.h @ 965:1bdf0f1b16c0

Use U suffix for unsigned defines Also fix a few small typos: value 2 (1<<1) weren't used in enums.
author Mikael Berthe <mikael@lilotux.net>
date Wed, 27 Sep 2006 22:57:23 +0200
parents 527d6f234924
children 36f7753dfb59
line wrap: on
line diff
--- a/mcabber/src/roster.h	Tue Sep 19 19:08:09 2006 +0200
+++ b/mcabber/src/roster.h	Wed Sep 27 22:57:23 2006 +0200
@@ -41,10 +41,10 @@
 enum subscr {
   sub_none    = 0,
   sub_pending = 1,
-  sub_to      = 1 << 2,
-  sub_from    = 1 << 3,
+  sub_to      = 1 << 1,
+  sub_from    = 1 << 2,
   sub_both    = sub_to|sub_from,
-  sub_remove  = 1 << 4
+  sub_remove  = 1 << 3
 };
 
 enum findwhat {
@@ -61,17 +61,17 @@
 };
 
 // Roster_type is a set of flags, so values should be 2^n
-#define ROSTER_TYPE_USER    1
-#define ROSTER_TYPE_GROUP   2
-#define ROSTER_TYPE_AGENT   4
-#define ROSTER_TYPE_ROOM    8
-#define ROSTER_TYPE_SPECIAL 16
+#define ROSTER_TYPE_USER    1U
+#define ROSTER_TYPE_GROUP   (1U<<1)
+#define ROSTER_TYPE_AGENT   (1U<<2)
+#define ROSTER_TYPE_ROOM    (1U<<3)
+#define ROSTER_TYPE_SPECIAL (1U<<4)
 
 // Flags:
-#define ROSTER_FLAG_MSG     1   // Message not read
-#define ROSTER_FLAG_HIDE    2   // Group hidden (or buddy window closed)
-#define ROSTER_FLAG_LOCK    4   // Node should not be removed from buddylist
-// ROSTER_FLAG_LOCAL   8   // Buddy not on server's roster  (??)
+#define ROSTER_FLAG_MSG     1U      // Message not read
+#define ROSTER_FLAG_HIDE    (1U<<1) // Group hidden (or buddy window closed)
+#define ROSTER_FLAG_LOCK    (1U<<2) // Node should not be removed from buddylist
+// ROSTER_FLAG_LOCAL   (1U<<3) // Buddy not on server's roster  (??)
 
 extern GList *buddylist;
 extern GList *current_buddy;