Help with sed/awk

Hi,

In a c file i have the declarations

Typedef struct test{
Row 1
Row 2
}test_t;

Typedef struct test1{
Row1
Row2
}test1_t;

Typedef struct test2{
Row1
Row2
}test2_t;

My search parameters will include : typedef and the typedef name, say test1_t, then i should only print the definition of

Typedef struct test1{
Row1
Row2
}test1_t;

How this can be accomplished with sed/awk? Anyother solution will also do

Thanks....

You can use grep

grep -B3 test1_t file

i dont have gnu sed and my output should contain the entire

Typedef struct test1{
Row1
Row2
}test1_t;