Remove kfile sub-classes aggregation.
[bertos.git] / cfg / macros.h
index b3be457fb9b8c185aa0d1932678fdc39db1403cc..f0520eff74b24d5a145eabe29f994aa2d0496f88 100644 (file)
 #define ROTL(var, rot) (((var) << (rot)) | ((var) >> ((sizeof(var) * 8) - (rot))))
 /*\}*/
 
+/**
+ * Make an id from 4 letters, useful for
+ * file formats and kfile ids.
+ */
+#define MAKE_ID(a,b,c,d) \
+       ( ((uint32_t)(a) << 24) \
+       | ((uint32_t)(b) << 16) \
+       | ((uint32_t)(c) <<  8) \
+       | ((uint32_t)(d) <<  0) )
+
+/**
+ * Type for id generated by MAKE_ID().
+ */
+typedef uint32_t id_t;
+
 #endif /* MACROS_H */