Both this style:
struct _something
{
...
};
typedef struct _something someting;
and that style:
typedef struct _something
{
...
} something;
are correct typedef declarations in C.
Note that the presence of the structure declaration in the header file is made on purpose: I need to have access to the inner components of the structure somewhere else.
One drawback of the first declaration is that when you use any IDE, the automatic "jump to declaration" often directs you to the typedef struct _something someting;
instead of giving you directly the real structure definition.
In the second method, you get directly to the structure definition.
Is there a reason why one would use the first method?
The code I'm working on is full with these...
Is it simply a bad/good habit from the maintainers?