[pisa-src] r1608 - trunk/libpisa/debug.h

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 10 Nov 2009 16:29:59 +0100

Author: biurrun
Date: Tue Nov 10 16:29:58 2009
New Revision: 1608

Log:
Remove cog-based code generator stuff.
There is no need to add a cog/Python dependency for such a triviality.

Modified:
   trunk/libpisa/debug.h

Modified: trunk/libpisa/debug.h
==============================================================================
--- trunk/libpisa/debug.h       Tue Nov 10 16:13:50 2009        (r1607)
+++ trunk/libpisa/debug.h       Tue Nov 10 16:29:58 2009        (r1608)
@@ -43,77 +43,45 @@
  * with PISA_DEBUG
  */
 
-/* 
- * The code below was generated using cog, see
- * http://nedbatchelder.com/code/cog/index.html
- */
-// [[[cog
-// import cog
-// WARNING="/* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */"
-// value=1
-// symbols=["PL_ERROR", 
-//                     "PL_GENERIC", 
-//                     "PL_INIT", "PL_DEINIT", "PL_SHUTDOWN",
-//                     "PL_REGISTER", "PL_DEREGISTER",
-//                     "PL_PREAUTH", "PL_STATEMACHINE", "PL_HEARTBEAT",
-//                     "PL_DATA", "PL_TIMEOUT", "PL_CONFIG", "PL_IW", 
"PL_LEGACY",
-//                     "PL_NAT"]
-// assert(len(symbols)<=32)
-// for s in symbols:
-//     cog.outl("#define %s \t\t 1<<%2i %s" % (s,value,WARNING))
-//     value+=1
-// value=1
-// cog.outl("#ifndef DEBUG_PL_LOOKUP_TABLE")
-// cog.outl("extern struct {const char* symbol;unsigned 
value;}pl_lookup_table[];")
-// cog.outl("#else")
-// cog.outl("struct {const char* symbol;unsigned value;}pl_lookup_table[]={")
-// for s in symbols:
-//     cog.outl('\t{"%s",\t%i}, %s' % (s.lower()[3:],value,WARNING))
-//     value+=1
-// cog.outl("\t{NULL,\t0}"+ WARNING)
-// cog.outl("};")
-// cog.outl("#endif")
-// ]]]
-#define PL_ERROR                1<< 1 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_GENERIC              1<< 2 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_INIT                 1<< 3 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_DEINIT               1<< 4 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_SHUTDOWN             1<< 5 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_REGISTER             1<< 6 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_DEREGISTER           1<< 7 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_PREAUTH              1<< 8 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_STATEMACHINE                 1<< 9 /* DONT EDIT ME!!! 
AUTOGENERATED, SEE ABOVE! */
-#define PL_HEARTBEAT            1<<10 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_DATA                 1<<11 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_TIMEOUT              1<<12 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_CONFIG               1<<13 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_IW           1<<14 /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-#define PL_LEGACY               1<<15 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-#define PL_NAT                  1<<16 /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
+#define PL_ERROR                 1 <<  1
+#define PL_GENERIC               1 <<  2
+#define PL_INIT                  1 <<  3
+#define PL_DEINIT                1 <<  4
+#define PL_SHUTDOWN              1 <<  5
+#define PL_REGISTER              1 <<  6
+#define PL_DEREGISTER            1 <<  7
+#define PL_PREAUTH               1 <<  8
+#define PL_STATEMACHINE          1 <<  9
+#define PL_HEARTBEAT             1 << 10
+#define PL_DATA                  1 << 11
+#define PL_TIMEOUT               1 << 12
+#define PL_CONFIG                1 << 13
+#define PL_IW                    1 << 14
+#define PL_LEGACY                1 << 15
+#define PL_NAT                   1 << 16
 #ifndef DEBUG_PL_LOOKUP_TABLE
 extern struct {const char* symbol;unsigned value;}pl_lookup_table[];
 #else
 struct {const char* symbol;unsigned value;}pl_lookup_table[]={
-       {"error",       1}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"generic",     2}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"init",        3}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"deinit",      4}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"shutdown",    5}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"register",    6}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"deregister",  7}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"preauth",     8}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"statemachine",        9}, /* DONT EDIT ME!!! AUTOGENERATED, SEE 
ABOVE! */
-       {"heartbeat",   10}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"data",        11}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"timeout",     12}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"config",      13}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"iw",  14}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"legacy",      15}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {"nat", 16}, /* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
-       {NULL,  0}/* DONT EDIT ME!!! AUTOGENERATED, SEE ABOVE! */
+        {"error",         1},
+        {"generic",       2},
+        {"init",          3},
+        {"deinit",        4},
+        {"shutdown",      5},
+        {"register",      6},
+        {"deregister",    7},
+        {"preauth",       8},
+        {"statemachine",  9},
+        {"heartbeat",    10},
+        {"data",         11},
+        {"timeout",      12},
+        {"config",       13},
+        {"iw",           14},
+        {"legacy",       15},
+        {"nat",          16},
+        {NULL,            0}
 };
 #endif
-// [[[[end]]]
 
 void pisa_debug_set_type_mask_bits(unsigned long m);
 void pisa_debug_del_type_mask_bits(unsigned long m);

Other related posts:

  • » [pisa-src] r1608 - trunk/libpisa/debug.h - Diego Biurrun