comparison 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
comparison
equal deleted inserted replaced
964:2c645e0a3304 965:1bdf0f1b16c0
39 extern char *straffil[]; // Should match enum above 39 extern char *straffil[]; // Should match enum above
40 40
41 enum subscr { 41 enum subscr {
42 sub_none = 0, 42 sub_none = 0,
43 sub_pending = 1, 43 sub_pending = 1,
44 sub_to = 1 << 2, 44 sub_to = 1 << 1,
45 sub_from = 1 << 3, 45 sub_from = 1 << 2,
46 sub_both = sub_to|sub_from, 46 sub_both = sub_to|sub_from,
47 sub_remove = 1 << 4 47 sub_remove = 1 << 3
48 }; 48 };
49 49
50 enum findwhat { 50 enum findwhat {
51 jidsearch, 51 jidsearch,
52 namesearch 52 namesearch
59 enum imaffiliation affil; 59 enum imaffiliation affil;
60 } val; 60 } val;
61 }; 61 };
62 62
63 // Roster_type is a set of flags, so values should be 2^n 63 // Roster_type is a set of flags, so values should be 2^n
64 #define ROSTER_TYPE_USER 1 64 #define ROSTER_TYPE_USER 1U
65 #define ROSTER_TYPE_GROUP 2 65 #define ROSTER_TYPE_GROUP (1U<<1)
66 #define ROSTER_TYPE_AGENT 4 66 #define ROSTER_TYPE_AGENT (1U<<2)
67 #define ROSTER_TYPE_ROOM 8 67 #define ROSTER_TYPE_ROOM (1U<<3)
68 #define ROSTER_TYPE_SPECIAL 16 68 #define ROSTER_TYPE_SPECIAL (1U<<4)
69 69
70 // Flags: 70 // Flags:
71 #define ROSTER_FLAG_MSG 1 // Message not read 71 #define ROSTER_FLAG_MSG 1U // Message not read
72 #define ROSTER_FLAG_HIDE 2 // Group hidden (or buddy window closed) 72 #define ROSTER_FLAG_HIDE (1U<<1) // Group hidden (or buddy window closed)
73 #define ROSTER_FLAG_LOCK 4 // Node should not be removed from buddylist 73 #define ROSTER_FLAG_LOCK (1U<<2) // Node should not be removed from buddylist
74 // ROSTER_FLAG_LOCAL 8 // Buddy not on server's roster (??) 74 // ROSTER_FLAG_LOCAL (1U<<3) // Buddy not on server's roster (??)
75 75
76 extern GList *buddylist; 76 extern GList *buddylist;
77 extern GList *current_buddy; 77 extern GList *current_buddy;
78 extern GList *alternate_buddy; 78 extern GList *alternate_buddy;
79 79