3 * (C) Copyright May 6 2000, Edmond J. Breen.
5 * This code may be copied for personal, non-profit use only.
9 /* Modified by Intel OpenCV team. Added lines 53-56 in order to prevent
10 the parser exceptions throwing in specific cases. The fix is consistent
11 with the EiC Standard version. */
22 static size_t xalloc_bot, pp_bot, lut_bot, ENV_bot;
23 static size_t Ixalloc_bot, Ipp_bot, Ilut_bot, IENV_bot, Ibot_stab, Inincludes;
25 void EiC_pp_CleanUp(size_t bot);
26 void EiC_ENV_CleanUp(size_t bot);
27 size_t EiC_pp_NextEntryNum(void);
28 size_t EiC_ENV_NextEntryNum();
30 void EiCp_initiateReset(void)
32 ENV_bot = EiC_ENV_NextEntryNum();
33 lut_bot = EiC_lut_NextEntryNum();
34 pp_bot = EiC_pp_NextEntryNum();
35 xalloc_bot = EiC_xalloc_NextEntryNum();
38 void EiCp_Reset(int flag)
41 size_t xalloc_top = EiC_xalloc_NextEntryNum();
43 if(flag) EiC_messageDisplay("Error: clean up forced\n");
44 /* The while loop is a precaution against
45 * errors that occur during cleanup.
48 /*if(flag) {sprintf(buff,"%d,",errR); EiC_messageDisplay(buff);}*/
50 case 0: EiC_lut_CleanUp(lut_bot); break;
51 case 1: EiC_ENV_CleanUp(ENV_bot); break;
52 case 2: EiC_pp_CleanUp(pp_bot); break;
53 case 3: /* Vic's change */
55 xmark(EiC_ENV->ARgar.val,eicstay); /*End Vic's change */
56 EiC_xalloc_CleanUp(xalloc_bot,xalloc_top); break;
58 /*if(flag) EiC_messageDisplay("\n");*/
64 static AR_t *globals =NULL;
67 void EiCp_setResetStart(void)
69 size_t EiC_get_EiC_bot_stab(void);
70 size_t EiC_get_EiC_PP_NINCLUDES(void);
75 globals = (AR_t*)malloc(sizeof(AR_t)*ARsp);
77 memcpy(globals,EiC_ENV->AR,sizeof(AR_t)*ARsp);
80 Ixalloc_bot = xalloc_bot;
85 Inincludes = EiC_get_EiC_PP_NINCLUDES();
86 Ibot_stab = EiC_get_EiC_bot_stab();
89 void EiCp_ResetStart(void)
91 void EiC_set_EiC_PPtoStart(int bot_stab, int include);
92 xalloc_bot = Ixalloc_bot;
98 EiC_set_EiC_PPtoStart(Ibot_stab, Inincludes);
101 memcpy(EiC_ENV->AR,globals,sizeof(AR_t)*ARsp);