mergine #define NUMS into enum {}



enum statement begins with 0, and the end of elements gets the number of elements.
many code rely on this functionality.

so I suggest to change.
Index: misc.h
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/misc.h,v
retrieving revision 1.65
diff -u -r1.65 misc.h
--- misc.h	7 Apr 2003 12:43:22 -0000	1.65
+++ misc.h	18 Apr 2003 13:34:44 -0000
@@ -57,9 +57,9 @@
     RUSSIAN,            /* koi-8r */
     UKRAINE,            /* koi-8u */
     JAPAN,              /* euc-jp */
-    KOREA               /* euc-kr */
+    KOREA,              /* euc-kr */
+    LIBBALSA_NUM_CODESETS
 };
-#define LIBBALSA_NUM_CODESETS 18
 
 gchar *libbalsa_lookup_mime_type(const gchar * path);
 gchar *libbalsa_make_string_from_list(const GList *);


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