Q:

In which cases should we use typedef for a structure definition?

Possible Duplicate:
typedef struct vs struct definitions 

Recently I'm reading nginx source code. There were so many structures defined as
typedef struct {
    field_1;
    field_2;
    /* ... */
} some_obj_t;

but there were still some other structures defined as
struct some_obj_s {
    field_1;
    field_2;
    /* ... */
};

Then, in some other header file, such as ngx_core.h, do some typedef:
typedef struct some_obj_s some_obj_t;

My question is (maybe duplicated...): 

Why do authors not use the same form to define all structures?
In which case(s) should we use typedef on a struct definition? Is there any OO or design pattern considerations?

A:

You use typedef on a structure mainly as a matter of convenience. For example:
typedef struct List_
{
    ...

} List;

This allows you to define variables of type List simply as:
List myList;

instead of:
struct List_ myList;

All those extra struct statements clutter up your code. The other use of typedef as you show it, is to implement one type as another. For example:
typedef List Queue;

This defines a new type Queue to be a previously defined type List. This then allows you to use Queue as you would use List.

