initial import
[patches.git] / libstdf-init-header-state.patch
CommitLineData
5e993f12 1Index: include/libstdf_types.h
2===================================================================
3--- include/libstdf_types.h (revision 276)
4+++ include/libstdf_types.h (working copy)
5@@ -69,7 +69,7 @@ typedef enum {
6 #define MAKE_REC(typ,sub) ((typ << 8) + sub)
7 #define BREAK_REC(h,t) do { h.REC_TYP = (stdf_rec_typ)(t >> 8); h.REC_SUB = (stdf_rec_sub)(t & 0xFF); } while (0)
8 #define SET_HEADER(h,t,l) do { BREAK_REC(h, t); h.REC_LEN = l; } while (0)
9-#define INIT_HEADER(h,t) SET_HEADER(h,t,0)
10+#define INIT_HEADER(h,t) do { SET_HEADER(h, t, 0); h.state = REC_STATE_PARSED; } while (0)
11 #define HEAD_TO_REC(h) MAKE_REC(h.REC_TYP,h.REC_SUB)
12 #define STDF_REC_FAR MAKE_REC(STDF_REC_TYP_INFO, STDF_REC_SUB_FAR)
13 #define STDF_REC_ATR MAKE_REC(STDF_REC_TYP_INFO, STDF_REC_SUB_ATR)