I tested with this program:
Code:
#include <stdio.h>
typedef enum {
L_R,
L_I,
L_L
}S_LVL;
typedef struct abc {
int mem_a;
long mem_b;
long mem_c;
long mem_d;
/*so on, and ... */
S_LVL lvl;
}abc_t, *abc_ptr;
int main(void) {
abc_t something;
something.lvl = L_I;
printf("L_R=%d\nsomething.lvl=%d\n", L_R, something.lvl);
return 0;
}
My output was:
Code:
L_R=0
something.lvl=1
so clearly you are mistaken about L_R always being assigned.
By the way, do not typedef struct abc* to be abc_ptr. Just use abc_t* instead as the pointer typedef does not add any value over actual pointer syntax.