Hi,
My work needs to be done on VC++. I have recently started with this prj.I dont have the licences for Vc++ yet. For shrtage of time I am writing code on notepad. But I can't compile.
I had a little doubt on my code.

I have a macro function that spans multiple lines and also has spaces in between.

I have pasted the code herein........
Please let me know if this is ths right way to do write this macro.....


#define gen_badframe_mgmt(ctxt_test_t * ctxt,int a)\//SANDEEP
//HANDLES BAD FRAME MAGMT FOR BOTH 8K AND 16 K FRAMES
{\
/*SANDEEP
FOR BAD FRAME MGMT*/
/*ALL CASES ARE--------

8K FRAME(a=1)
---------
case _AMR_4_75:
case _AMR_5_9:
case _AMR_6_7:

16K FRAME(a=0)
---------
case _AMR_10_2:
case _AMR_12_65:
case _AMR_8_85:
case _AMR_6_6:

*/

z=0;\
//int x=0;
//switch(z=(((ctxt->bad_frame_mgmt)<<6)&&((x=sat_rand(15))!((ctxt->dtx_enable)<<4)!(a<<5)))
if(ctxt->bad_frame_mgmt)\//TEST IF BAD FRAME MGMT OPTION IS ENABLED IN CTXT VARIABLE
{//BAD FRAME MGMT ENABLED
//GENEARATE A RANDOM NUMBER TO BE USED FOR SPEECH_BAD(5), SPEECH_DEGRADED(10), SID_BAD FRAMES(13)
int x;\
x=sat_rand(15);\
switch(z=(x|((ctxt->dtx_enable)<<4)|(a<<5)))\
{\
case 5:\
//0+0+5
//16K FRAME
//DTX DISABLED
//RANDOM NO IS 5
//ACTIONS---RANDOMLY GENERATE
//1.SPEECH_BAD FRAMES(5)
{\
dst[ctxt->ptr_mod_ctl_bit[21]] = 0;\
dst[ctxt->ptr_mod_ctl_bit[22]] = 1;\
}\
break;\
case 10:\
//0+0+10
//16K FRAME
//DTX DISABLED
//RANDOM NO IS 10
//ACTIONS---RANDOMLY GENERATE
//2.SPEECH_DEGRADED FRAMES(10)

{\
dst[ctxt->ptr_mod_ctl_bit[21]] = 1;\
dst[ctxt->ptr_mod_ctl_bit[22]] = 0;\

}\
break;\

case 29:\
//0+16+13
//16K FRAME
//DTX ENABLED
//RANDOM NO IS 13
//ACTIONS---RANDOMLY GENERATE
//1.SID_BAD FRAMES(13)

{\
dst[ctxt->ptr_mod_data[32]] = 1;\
dst[ctxt->ptr_mod_data[33]] = 0;\
dst[ctxt->ptr_mod_data[34]] = 0;\
}\
break;\

case 37:\
//32+0+5
//8K FRAME
//DTX DISABLED
//RANDOM NO IS 5
//ACTIONS---RANDOMLY GENERATE
//1.SPEECH_BAD FRAMES(5)
{\
dst[ctxt->ptr_mod_ctl_bit[4]] = 0;\
dst[ctxt->ptr_mod_ctl_bit[5]] = 1;\
}\
break;\

case 42:\
//32+0+10
//8K FRAME
//DTX DISABLED
//RANDOM NO IS 10
//ACTIONS---RANDOMLY GENERATE
//2.SPEECH_DEGRADED FRAMES(10)

{\
dst[ctxt->ptr_mod_ctl_bit[4]] = 1;\
dst[ctxt->ptr_mod_ctl_bit[5]] = 0;\
}\
break;\

case 61:\
//32+16+13
//8K FRAME
//DTX ENABLED
//RANDOM NO IS 13
//ACTIONS---RANDOMLY GENERATE
//1.SID_BAD FRAMES(13)

{\
dst[ctxt->ptr_mod_data[8]] = 1;\
dst[ctxt->ptr_mod_data[9]] = 0;\
dst[ctxt->ptr_mod_data[10]]= 0;\
}\
break;\
default:\

break;\


}\//END OF SWITCH IN WHICH RANDOM NO IS TESTED
}\//END OF IF LOOP TO TEST BAD FRAME MGMT


/*END OF SANDEEP---- BAD FRAME MGMT*/

return;\
}