This is compile_to_c19.c in view mode; [Download] [Up]
/* ANSI C code generated by SmallEiffel. */ /* -- SmallEiffel -- Release (- 0.95) -- FRANCE -- Copyright (C), 1994 - Dominique COLNET and Suzanne COLLIN -- University Henri Poincare' - Nancy 1 - email colnet@loria.fr -- CRIN (Centre de Recherche en Informatique de Nancy) -- FRANCE */ #include "compile_to_c.h" T0* rT70run_feature(T70 *C,T0* a1){ T0* R=NULL; R=rT261get_feature((T261*)XrT58run_class(a1),(T0 *)C); return R; } int rT70standard_is_equal(T70 *C,T0* a1){ int R=0; /*IF*//*AF*/if (((T0 *)a1)==((T0 *)C)) { R=1; } else { R=!memcmp(C,a1,s[C->id]); } /*FI*/return R; } int rT70is_a(T70 *C,T0* a1){ int R=0; R=XrT58is_a(XrT58run_type((C)->_result_type),XrT58run_type(XrT68result_type(a1))); /*IF*/if (!(R)) { (/*UT*/(void)(T45*)oRBC27eh); rT45add_position((C)->_start_position); rT70error(XrT68start_position(a1),(T0 *)ms1289); } /*FI*/return R; } void rT70make(T70 *C,T0* a1,T0* a2){ C->_to_string=a1; C->_start_position=a2; } T0* rT64to_runnable(T64 *C,T0* a1){ T0* R=NULL; T0* _e=NULL; /*IF*/if (!((C)->_current_type)) { C->_current_type=a1; R=(T0 *)C; /*IF*/if (((int)(C)->_expression)) { _e=XrT68to_runnable((C)->_expression,a1); /*IF*/if (!(_e)) { rT64error(rT64start_position(C),(T0 *)ms473); } else { C->_expression=_e; /*IF*/if (!(XrT58is_boolean(XrT68result_type((C)->_expression)))) { (/*UT*/(void)(T45*)oRBC27eh); rT45add_type(XrT68result_type((C)->_expression),(T0 *)ms475); rT64error(rT64start_position(C),(T0 *)ms473); } /*FI*/} /*FI*/} /*FI*/} else { {T64 *n=((T64*)se_new(64)); rT64make(n,(C)->_tag,(C)->_expression,(C)->_comment); R=(T0 *)n;} R=rT64to_runnable((T64*)R,a1); } /*FI*/return R; } void rT64error(/*C*/T0* a1,T0* a2){ (/*UT*/(void)(T45*)oRBC27eh); rT45add_position(a1); rT45error((T45*)oRBC27eh,a2); } T0* rT64start_position(T64 *C){ T0* R=NULL; /*IF*/if (((int)(C)->_tag)) { R=((T159*)(C)->_tag)->_start_position; } else if (((int)(C)->_expression)) { R=XrT68start_position((C)->_expression); } else { R=((T59*)(C)->_comment)->_start_position; } /*FI*/return R; } int rT64use_current(T64 *C){ int R=0; /*IF*/if (((int)(C)->_expression)) { R=XrT68use_current((C)->_expression); } /*FI*/return R; } void rT64compile_to_c_old(T64 *C){ /*IF*/if (((int)(C)->_expression)) { XrT68compile_to_c_old((C)->_expression); } /*FI*/} void rT64compile_to_c(T64 *C){ /*IF*/if (((int)(C)->_expression)) { rT43check_assertion((T43*)oRBC27cpp,(C)->_expression); } /*FI*/} void rT64make(T64 *C,T0* a1,T0* a2,T0* a3){ C->_tag=a1; C->_expression=a2; C->_comment=a3; } T0* rT140first(T140 *C){ T0* R=NULL; /*IF*/if (((int)(C)->_list)) { R=rT218first((T218*)(C)->_list); } /*FI*/return R; } void rT140fatal_error(/*C*/T0* a1){ (/*UT*/(void)(T45*)oRBC27eh); rT45fatal_error(a1); } int rT140count(T140 *C){ int R=0; /*IF*/if (((int)(C)->_list)) { R=((T218*)(C)->_list)->_upper; } /*FI*/return R; } T0* rT140to_runnable(T140 *C,T0* a1){ T0* R=NULL; T0* _i2=NULL; T0* _i1=NULL; int _i=0; /*IF*/if (!((C)->_current_type)) { C->_current_type=a1; /*IF*/if (((int)(C)->_list)) { _i=1; while (!((_i)>(((T218*)(C)->_list)->_upper))) { _i1=rT218item((T218*)(C)->_list,_i); _i2=XrT177to_runnable(_i1,(T0 *)C); /*IF*/if ((/*(IRF4*/((T45*)oRBC27eh)->_nb_errors/*)*/)>(0)) { (/*UT*/(void)(T45*)oRBC27eh); rT45append((T0 *)ms511); (/*UT*/(void)(T45*)oRBC27eh); rT45append(XrT58written_mark((C)->_current_type)); (/*UT*/(void)(T45*)oRBC27eh); rT45add_position(XrT177start_position(_i1)); rT140fatal_error((T0 *)ms512); } else { rT218put((T218*)(C)->_list,_i2,_i); } /*FI*/_i=(_i)+(1); } } /*FI*/R=(T0 *)C; } else { /*IF*/if (!((C)->_list)) { {T140 *n=((T140*)se_new(140)); rT140make(n,(C)->_header_comment,NULL); R=(T0 *)n;} } else { {T140 *n=((T140*)se_new(140)); rT140make(n,(C)->_header_comment,rT218twin((T218*)(C)->_list)); R=(T0 *)n;} } /*FI*/R=rT140to_runnable((T140*)R,a1); } /*FI*/return R; } int rT140use_current(T140 *C){ int R=0; int _i=0; /*IF*/if (((int)(C)->_list)) { _i=1; while (!((R)||((_i)>(((T218*)(C)->_list)->_upper)))) { R=XrT177use_current(rT218item((T218*)(C)->_list,_i)); _i=(_i)+(1); } } /*FI*/return R; } T0* rT140run_class(T140 *C){ T0* R=NULL; R=XrT58run_class((C)->_current_type); return R; } void rT140compile_to_c(T140 *C){ int _i=0; /*IF*/if (((int)(C)->_list)) { _i=1; while (!((_i)>(((T218*)(C)->_list)->_upper))) { XrT177compile_to_c(rT218item((T218*)(C)->_list,_i)); _i=(_i)+(1); } } /*FI*/} int rT140is_pre_computable(T140 *C){ int R=0; T0* _a=NULL; T0* _cc=NULL; T0* _i=NULL; /*IF*/if (!((C)->_list)) { R=1; } else if ((((T218*)(C)->_list)->_upper)==(1)) { _i=rT218item((T218*)(C)->_list,1); _cc=_i; if ((int)_cc) switch (((T0 *)_cc)->id) { case 248: case 246: case 244: case 241: break; default: _cc = NULL; };/*IF*/if (((int)_cc)) { R=XrT243is_pre_computable(_cc); } else { _a=_i; if ((int)_a) switch (((T0 *)_a)->id) { case 249: break; default: _a = NULL; };/*IF*/if (((int)_a)) { R=rT249is_pre_computable((T249*)_a); } /*FI*/} /*FI*/} /*FI*/return R; } void rT140make(T140 *C,T0* a1,T0* a2){ C->_header_comment=a1; C->_list=a2; } void rT277clear_all(T277 *C){ int _value=0; rT277set_all_with(C,_value); } void rT277set_all_with(T277 *C,int a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT277put(C,a1,_i); _i=(_i)-(1); } } void rT277resize(T277 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T277 *n=((T277*)se_new(277)); rT277make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T277*)_other)->_lower); _up=rT2min((C)->_upper,((T277*)_other)->_upper); while (!((_i)>(_up))) { rT277put((T277*)_other,rT277item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT277standard_copy(C,_other); free((T277*)_other); } void rT277force(T277 *C,int a1,int a2){ /*IF*/if (((C)->_upper)<(a2)) { rT277resize(C,(C)->_lower,a2); } else if ((a2)<((C)->_lower)) { rT277resize(C,a2,(C)->_upper); } /*FI*/rT277put(C,a1,a2); } int rT277item(T277 *C,int a1){ int R=0; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } int rT277valid_index(T277 *C,int a1){ int R=0; R=(((C)->_lower)<=(a1))&&((a1)<=((C)->_upper)); return R; } int* rT277malloc(T277 *C,int a1){ int* R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT277put(T277 *C,int a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT277standard_copy(T277 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT277set_slice_with(T277 *C,int a1,int a2,int a3){ int _i=0; _i=a2; while (!((_i)>(a3))) { rT277put(C,a1,_i); _i=(_i)+(1); } } void rT277make(T277 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT277malloc(C,(C)->_capacity); rT277clear_all(C); } /*FI*/} void rT276clear(T276 *C){ C->_upper=((C)->_lower)-(1); } void rT276clear_all(T276 *C){ T0* _value=NULL; rT276set_all_with(C,_value); } int rT276count(T276 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT276set_all_with(T276 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT276put(C,a1,_i); _i=(_i)-(1); } } void rT276resize(T276 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T276 *n=((T276*)se_new(276)); rT276make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T276*)_other)->_lower); _up=rT2min((C)->_upper,((T276*)_other)->_upper); while (!((_i)>(_up))) { rT276put((T276*)_other,rT276item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT276standard_copy(C,_other); free((T276*)_other); } int rT276fast_index_of(T276 *C,T0* a1){ int R=0; R=(C)->_lower; while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT276item(C,R))))) { R=(R)+(1); } return R; } int rT276fast_has(T276 *C,T0* a1){ int R=0; R=(rT276fast_index_of(C,a1))!=(((C)->_upper)+(1)); return R; } int rT276empty(T276 *C){ int R=0; R=(rT276count(C))==(0); return R; } T0* rT276item(T276 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT276realloc(T276 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT276add_last(T276 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT276count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT276malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT276realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT276put(C,a1,(C)->_upper); } T0** rT276malloc(T276 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT276put(T276 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT276standard_copy(T276 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT276make(T276 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT276malloc(C,(C)->_capacity); rT276clear_all(C); } /*FI*/} void rT275clear_all(T275 *C){ T0* _value=NULL; rT275set_all_with(C,_value); } int rT275count(T275 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT275set_all_with(T275 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT275put(C,a1,_i); _i=(_i)-(1); } } void rT275resize(T275 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T275 *n=((T275*)se_new(275)); rT275make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T275*)_other)->_lower); _up=rT2min((C)->_upper,((T275*)_other)->_upper); while (!((_i)>(_up))) { rT275put((T275*)_other,rT275item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT275standard_copy(C,_other); free((T275*)_other); } int rT275fast_has(T275 *C,T0* a1){ int R=0; R=(rT275fast_index_of(C,a1))!=(((C)->_upper)+(1)); return R; } int rT275fast_index_of(T275 *C,T0* a1){ int R=0; R=(C)->_lower; while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT275item(C,R))))) { R=(R)+(1); } return R; } void rT275force(T275 *C,T0* a1,int a2){ /*IF*/if (((C)->_upper)<(a2)) { rT275resize(C,(C)->_lower,a2); } else if ((a2)<((C)->_lower)) { rT275resize(C,a2,(C)->_upper); } /*FI*/rT275put(C,a1,a2); } T0* rT275item(T275 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT275realloc(T275 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT275add_last(T275 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT275count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT275malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT275realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT275put(C,a1,(C)->_upper); } T0** rT275malloc(T275 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT275put(T275 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT275standard_copy(T275 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT275make(T275 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT275malloc(C,(C)->_capacity); rT275clear_all(C); } /*FI*/} void rT273clear_all(T273 *C){ T0* _value=NULL; rT273set_all_with(C,_value); } void rT273set_all_with(T273 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT273put(C,a1,_i); _i=(_i)-(1); } } void rT273resize(T273 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T273 *n=((T273*)se_new(273)); rT273make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T273*)_other)->_lower); _up=rT2min((C)->_upper,((T273*)_other)->_upper); while (!((_i)>(_up))) { rT273put((T273*)_other,rT273item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT273standard_copy(C,_other); free((T273*)_other); } T0* rT273item(T273 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT273malloc(T273 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT273put(T273 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT273standard_copy(T273 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT273make(T273 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT273malloc(C,(C)->_capacity); rT273clear_all(C); } /*FI*/} void rT272clear_all(T272 *C){ T0* _value=NULL; rT272set_all_with(C,_value); } int rT272count(T272 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT272set_all_with(T272 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT272put(C,a1,_i); _i=(_i)-(1); } } void rT272resize(T272 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T272 *n=((T272*)se_new(272)); rT272make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T272*)_other)->_lower); _up=rT2min((C)->_upper,((T272*)_other)->_upper); while (!((_i)>(_up))) { rT272put((T272*)_other,rT272item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT272standard_copy(C,_other); free((T272*)_other); } T0* rT272item(T272 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT272realloc(T272 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT272add_last(T272 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT272count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT272malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT272realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT272put(C,a1,(C)->_upper); } T0** rT272malloc(T272 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT272put(T272 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT272standard_copy(T272 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT272make(T272 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT272malloc(C,(C)->_capacity); rT272clear_all(C); } /*FI*/} void rT271clear_all(T271 *C){ T0* _value=NULL; rT271set_all_with(C,_value); } void rT271set_all_with(T271 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT271put(C,a1,_i); _i=(_i)-(1); } } void rT271resize(T271 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T271 *n=((T271*)se_new(271)); rT271make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T271*)_other)->_lower); _up=rT2min((C)->_upper,((T271*)_other)->_upper); while (!((_i)>(_up))) { rT271put((T271*)_other,rT271item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT271standard_copy(C,_other); free((T271*)_other); } T0* rT271item(T271 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } void rT271force(T271 *C,T0* a1,int a2){ /*IF*/if (((C)->_upper)<(a2)) { rT271resize(C,(C)->_lower,a2); } else if ((a2)<((C)->_lower)) { rT271resize(C,a2,(C)->_upper); } /*FI*/rT271put(C,a1,a2); } int rT271valid_index(T271 *C,int a1){ int R=0; R=(((C)->_lower)<=(a1))&&((a1)<=((C)->_upper)); return R; } T0** rT271malloc(T271 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT271put(T271 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT271standard_copy(T271 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT271make(T271 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT271malloc(C,(C)->_capacity); rT271clear_all(C); } /*FI*/} void rT269clear(T269 *C){ C->_upper=((C)->_lower)-(1); } void rT269clear_all(T269 *C){ T0* _value=NULL; rT269set_all_with(C,_value); } T0* rT269first(T269 *C){ T0* R=NULL; R=rT269item(C,(C)->_lower); return R; } int rT269count(T269 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT269set_all_with(T269 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT269put(C,a1,_i); _i=(_i)-(1); } } int rT269fast_index_of(T269 *C,T0* a1){ int R=0; R=(C)->_lower; while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT269item(C,R))))) { R=(R)+(1); } return R; } int rT269fast_has(T269 *C,T0* a1){ int R=0; R=(rT269fast_index_of(C,a1))!=(((C)->_upper)+(1)); return R; } int rT269empty(T269 *C){ int R=0; R=(rT269count(C))==(0); return R; } T0* rT269item(T269 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT269realloc(T269 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT269add_last(T269 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT269count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT269malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT269realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT269put(C,a1,(C)->_upper); } T0** rT269malloc(T269 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT269put(T269 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT269make(T269 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT269malloc(C,(C)->_capacity); rT269clear_all(C); } /*FI*/} void rT266clear_all(T266 *C){ T0* _value=NULL; rT266set_all_with(C,_value); } int rT266count(T266 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT266set_all_with(T266 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT266put(C,a1,_i); _i=(_i)-(1); } } int rT266fast_index_of(T266 *C,T0* a1){ int R=0; R=(C)->_lower; while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT266item(C,R))))) { R=(R)+(1); } return R; } int rT266fast_has(T266 *C,T0* a1){ int R=0; R=(rT266fast_index_of(C,a1))!=(((C)->_upper)+(1)); return R; } void rT266resize(T266 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T266 *n=((T266*)se_new(266)); rT266make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,XrT266lower(_other)); _up=rT2min((C)->_upper,XrT266upper(_other)); while (!((_i)>(_up))) { XrT266put(_other,rT266item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT266standard_copy(C,_other); XrT266free_array(_other); } T0* rT266item(T266 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } void rT266force(T266 *C,T0* a1,int a2){ /*IF*/if (((C)->_upper)<(a2)) { rT266resize(C,(C)->_lower,a2); } else if ((a2)<((C)->_lower)) { rT266resize(C,a2,(C)->_upper); } /*FI*/rT266put(C,a1,a2); } T0** rT266realloc(T266 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT266add_last(T266 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT266count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT266malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT266realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT266put(C,a1,(C)->_upper); } T0** rT266malloc(T266 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT266put(T266 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT266standard_copy(T266 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT266make(T266 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT266malloc(C,(C)->_capacity); rT266clear_all(C); } /*FI*/} void rT264clear_all(T264 *C){ T0* _value=NULL; rT264set_all_with(C,_value); } T0* rT264first(T264 *C){ T0* R=NULL; R=rT264item(C,(C)->_lower); return R; } int rT264count(T264 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT264set_all_with(T264 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT264put(C,a1,_i); _i=(_i)-(1); } } int rT264fast_index_of(T264 *C,T0* a1){ int R=0; R=(C)->_lower; while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT264item(C,R))))) { R=(R)+(1); } return R; } int rT264fast_has(T264 *C,T0* a1){ int R=0; R=(rT264fast_index_of(C,a1))!=(((C)->_upper)+(1)); return R; } void rT264resize(T264 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T264 *n=((T264*)se_new(264)); rT264make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T264*)_other)->_lower); _up=rT2min((C)->_upper,((T264*)_other)->_upper); while (!((_i)>(_up))) { rT264put((T264*)_other,rT264item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT264standard_copy(C,_other); free((T264*)_other); } int rT264empty(T264 *C){ int R=0; R=(rT264count(C))==(0); return R; } T0* rT264item(T264 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT264realloc(T264 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT264add_last(T264 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT264count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT264malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT264realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT264put(C,a1,(C)->_upper); } T0** rT264malloc(T264 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT264put(T264 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT264standard_copy(T264 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT264swap(T264 *C,int a1,int a2){ T0* _tmp=NULL; _tmp=rT264item(C,a1); rT264put(C,rT264item(C,a2),a1); rT264put(C,_tmp,a2); } void rT264make(T264 *C,int a1,int a2){ /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/C->_lower=a1; C->_upper=a2; C->_capacity=(((C)->_upper)-((C)->_lower))+(1); /*IF*/if (((C)->_capacity)>(0)) { C->_capacity=((C)->_capacity)+(16); C->_storage=rT264malloc(C,(C)->_capacity); rT264clear_all(C); } /*FI*/} int rT259count(T259 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } T0* rT259item(T259 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT259realloc(T259 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT259add_last(T259 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT259count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT259malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT259realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT259put(C,a1,(C)->_upper); } T0** rT259malloc(T259 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT259put(T259 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } T0* rT235twin(T235 *C){ T0* R=NULL; /*IF*//*AF*//*AE*/ R=(T0 *)se_new(C->id); AF_1 rT235copy((T235*)R,(T0 *)C); AF_0 /*FI*/return R; } void rT235clear_all(T235 *C){ T0* _value=NULL; rT235set_all_with(C,_value); } int rT235count(T235 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } void rT235set_all_with(T235 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT235put(C,a1,_i); _i=(_i)-(1); } } void rT235resize(T235 *C,int a1,int a2){ int _up=0; int _i=0; T0* _other=NULL; {T235 *n=((T235*)se_new(235)); rT235make(n,a1,a2); _other=(T0 *)n;} _i=rT2max((C)->_lower,((T235*)_other)->_lower); _up=rT2min((C)->_upper,((T235*)_other)->_upper); while (!((_i)>(_up))) { rT235put((T235*)_other,rT235item(C,_i),_i); _i=(_i)+(1); } /*IF*/if (((int)(C)->_storage)) { free((C)->_storage); } /*FI*/rT235standard_copy(C,_other); free((T235*)_other); } T0* rT235item(T235 *C,int a1){ T0* R=NULL; /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/R=(((C->_storage))[a1-(C->_lower)]); return R; } T0** rT235realloc(T235 *C,T0** a1,int a2){ T0** R=0; R=realloc(a1,((size_t)(a2*sizeof(*(C->_storage))))); return R; } void rT235add_last(T235 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT235count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT235malloc(C,(C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT235realloc(C,(C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT235put(C,a1,(C)->_upper); } T0** rT235malloc(T235 *C,int a1){ T0** R=0; R=malloc((size_t)(a1*sizeof(*(C->_storage)))); return R; } void rT235put(T235 *C,T0* a1,int a2){ /*IF*//*AF*//*AE*/ /*FI*//*IF*//*AF*//*AE*/ /*FI*/((C->_storage)[a2-(C->_lower)])=a1; } void rT235standard_copy(T235 *C,T0* a1){ memcpy(C,a1,s[a1->id]); } void rT235copy(T235 *C,T0* a1){ int _i=0; C->_upper=((C)->_lower)-(1); /*IF*/if (((C)->_capacity)==(0)) { rT235make(C,((T235*)a1)->_lower,((T235*)a1)->_upper); } else { rT235resize(C,((T235*)a1)->_lower,((T235*)a1)->_upper); } /*FI*/_i=(C)->_lower; while (!((_i)>((C)->_upper))) { rT235put(C,rT235item((T235*)a1,_i),_i); _i=(_i)+(1); } }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.