home *** CD-ROM | disk | FTP | other *** search
- /* ANSI C code generated by SmallEiffel. */
- /*
- -- SmallEiffel -- Release (- 0.97) -- 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"
- void rT130copy(T130 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT130make(C,((T130*)a1)->_lower,((T130*)a1)->_upper);
- }
- else {
- rT130resize(C,((T130*)a1)->_lower,((T130*)a1)->_upper);
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT130put(C,rT130item((T130*)a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT130make(T130 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT130clear_all(C);
- }
- /*FI*/}
- void rT134clear_all(T134 *C){
- T0 * _value=NULL;
- rT134set_all_with(C,_value);
- }
- int rT134count(T134 *C){
- int R=0;
- R=(((C)->_upper)-((C)->_lower))+(1);
- return R;
- }
- void rT134set_all_with(T134 *C,T0 * a1){
- int _i=0;
- _i=(C)->_upper;
- while (!((_i)<((C)->_lower))) {
- rT134put(C,a1,_i);
- _i=(_i)-(1);
- }
- }
- void rT134resize(T134 *C,int a1,int a2){
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T134 *n=((T134*)new(134));
- rT134make(n,a1,a2);
- _other=(T0 *)n;}
- _i=rT2max((C)->_lower,((T134*)_other)->_lower);
- _up=rT2min((C)->_upper,((T134*)_other)->_upper);
- while (!((_i)>(_up))) {
- rT134put((T134*)_other,rT134item(C,_i),_i);
- _i=(_i)+(1);
- }
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/memcpy(C,_other,sizeof(*C));free(_other);
- }
- T0 * rT134item(T134 *C,int a1){
- T0 * R=NULL;
- R=(C->_storage)[a1-(C->_lower)];
- return R;
- }
- void rT134add_last(T134 *C,T0 * a1){
- /*IF*/if (((C)->_capacity)<((rT134count(C))+(1))) {
- C->_capacity=((C)->_capacity)+(16);
- /*IF*/if (((C)->_capacity)==(16)) {
- C->_storage=malloc(16*sizeof(*(C->_storage)));
- }
- else {
- C->_storage=realloc(C->_storage,((C->_capacity)*sizeof(*(C->_storage))));
- }
- /*FI*/}
- /*FI*/C->_upper=((C)->_upper)+(1);
- rT134put(C,a1,(C)->_upper);
- }
- void rT134put(T134 *C,T0 * a1,int a2){
- (C->_storage)[a2-(C->_lower)]=a1;
- }
- void rT134copy(T134 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT134make(C,((T134*)a1)->_lower,((T134*)a1)->_upper);
- }
- else {
- rT134resize(C,((T134*)a1)->_lower,((T134*)a1)->_upper);
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT134put(C,rT134item((T134*)a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT134make(T134 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT134clear_all(C);
- }
- /*FI*/}
- void rT141clear_all(T141 *C){
- T0 * _value=NULL;
- rT141set_all_with(C,_value);
- }
- int rT141count(T141 *C){
- int R=0;
- R=(((C)->_upper)-((C)->_lower))+(1);
- return R;
- }
- void rT141set_all_with(T141 *C,T0 * a1){
- int _i=0;
- _i=(C)->_upper;
- while (!((_i)<((C)->_lower))) {
- rT141put(C,a1,_i);
- _i=(_i)-(1);
- }
- }
- void rT141resize(T141 *C,int a1,int a2){
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T141 *n=((T141*)new(141));
- rT141make(n,a1,a2);
- _other=(T0 *)n;}
- _i=rT2max((C)->_lower,((T141*)_other)->_lower);
- _up=rT2min((C)->_upper,((T141*)_other)->_upper);
- while (!((_i)>(_up))) {
- rT141put((T141*)_other,rT141item(C,_i),_i);
- _i=(_i)+(1);
- }
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/memcpy(C,_other,sizeof(*C));free(_other);
- }
- T0 * rT141item(T141 *C,int a1){
- T0 * R=NULL;
- R=(C->_storage)[a1-(C->_lower)];
- return R;
- }
- void rT141add_last(T141 *C,T0 * a1){
- /*IF*/if (((C)->_capacity)<((rT141count(C))+(1))) {
- C->_capacity=((C)->_capacity)+(16);
- /*IF*/if (((C)->_capacity)==(16)) {
- C->_storage=malloc(16*sizeof(*(C->_storage)));
- }
- else {
- C->_storage=realloc(C->_storage,((C->_capacity)*sizeof(*(C->_storage))));
- }
- /*FI*/}
- /*FI*/C->_upper=((C)->_upper)+(1);
- rT141put(C,a1,(C)->_upper);
- }
- void rT141put(T141 *C,T0 * a1,int a2){
- (C->_storage)[a2-(C->_lower)]=a1;
- }
- void rT141copy(T141 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT141make(C,((T141*)a1)->_lower,((T141*)a1)->_upper);
- }
- else {
- rT141resize(C,((T141*)a1)->_lower,((T141*)a1)->_upper);
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT141put(C,rT141item((T141*)a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT141make(T141 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT141clear_all(C);
- }
- /*FI*/}
- void rT143clear_all(T143 *C){
- T0 * _value=NULL;
- rT143set_all_with(C,_value);
- }
- int rT143count(T143 *C){
- int R=0;
- R=(((C)->_upper)-((C)->_lower))+(1);
- return R;
- }
- void rT143set_all_with(T143 *C,T0 * a1){
- int _i=0;
- _i=(C)->_upper;
- while (!((_i)<((C)->_lower))) {
- rT143put(C,a1,_i);
- _i=(_i)-(1);
- }
- }
- void rT143resize(T143 *C,int a1,int a2){
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T143 *n=((T143*)new(143));
- rT143make(n,a1,a2);
- _other=(T0 *)n;}
- _i=rT2max((C)->_lower,XrT143lower(_other));
- _up=rT2min((C)->_upper,XrT143upper(_other));
- while (!((_i)>(_up))) {
- XrT143put(_other,rT143item(C,_i),_i);
- _i=(_i)+(1);
- }
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/memcpy(C,_other,sizeof(*C));free(_other);
- }
- T0 * rT143item(T143 *C,int a1){
- T0 * R=NULL;
- R=(C->_storage)[a1-(C->_lower)];
- return R;
- }
- void rT143add_last(T143 *C,T0 * a1){
- /*IF*/if (((C)->_capacity)<((rT143count(C))+(1))) {
- C->_capacity=((C)->_capacity)+(16);
- /*IF*/if (((C)->_capacity)==(16)) {
- C->_storage=malloc(16*sizeof(*(C->_storage)));
- }
- else {
- C->_storage=realloc(C->_storage,((C->_capacity)*sizeof(*(C->_storage))));
- }
- /*FI*/}
- /*FI*/C->_upper=((C)->_upper)+(1);
- rT143put(C,a1,(C)->_upper);
- }
- void rT143put(T143 *C,T0 * a1,int a2){
- (C->_storage)[a2-(C->_lower)]=a1;
- }
- void rT143copy(T143 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT143make(C,XrT143lower(a1),XrT143upper(a1));
- }
- else {
- rT143resize(C,XrT143lower(a1),XrT143upper(a1));
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT143put(C,XrT143item(a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT143make(T143 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT143clear_all(C);
- }
- /*FI*/}
- void rT147clear_all(T147 *C){
- T0 * _value=NULL;
- rT147set_all_with(C,_value);
- }
- int rT147count(T147 *C){
- int R=0;
- R=(((C)->_upper)-((C)->_lower))+(1);
- return R;
- }
- void rT147set_all_with(T147 *C,T0 * a1){
- int _i=0;
- _i=(C)->_upper;
- while (!((_i)<((C)->_lower))) {
- rT147put(C,a1,_i);
- _i=(_i)-(1);
- }
- }
- void rT147resize(T147 *C,int a1,int a2){
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T147 *n=((T147*)new(147));
- rT147make(n,a1,a2);
- _other=(T0 *)n;}
- _i=rT2max((C)->_lower,((T147*)_other)->_lower);
- _up=rT2min((C)->_upper,((T147*)_other)->_upper);
- while (!((_i)>(_up))) {
- rT147put((T147*)_other,rT147item(C,_i),_i);
- _i=(_i)+(1);
- }
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/memcpy(C,_other,sizeof(*C));free(_other);
- }
- T0 * rT147item(T147 *C,int a1){
- T0 * R=NULL;
- R=(C->_storage)[a1-(C->_lower)];
- return R;
- }
- void rT147add_last(T147 *C,T0 * a1){
- /*IF*/if (((C)->_capacity)<((rT147count(C))+(1))) {
- C->_capacity=((C)->_capacity)+(16);
- /*IF*/if (((C)->_capacity)==(16)) {
- C->_storage=malloc(16*sizeof(*(C->_storage)));
- }
- else {
- C->_storage=realloc(C->_storage,((C->_capacity)*sizeof(*(C->_storage))));
- }
- /*FI*/}
- /*FI*/C->_upper=((C)->_upper)+(1);
- rT147put(C,a1,(C)->_upper);
- }
- void rT147put(T147 *C,T0 * a1,int a2){
- (C->_storage)[a2-(C->_lower)]=a1;
- }
- void rT147copy(T147 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT147make(C,((T147*)a1)->_lower,((T147*)a1)->_upper);
- }
- else {
- rT147resize(C,((T147*)a1)->_lower,((T147*)a1)->_upper);
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT147put(C,rT147item((T147*)a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT147make(T147 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT147clear_all(C);
- }
- /*FI*/}
- void rT151clear_all(T151 *C){
- T0 * _value=NULL;
- rT151set_all_with(C,_value);
- }
- int rT151count(T151 *C){
- int R=0;
- R=(((C)->_upper)-((C)->_lower))+(1);
- return R;
- }
- void rT151set_all_with(T151 *C,T0 * a1){
- int _i=0;
- _i=(C)->_upper;
- while (!((_i)<((C)->_lower))) {
- rT151put(C,a1,_i);
- _i=(_i)-(1);
- }
- }
- int rT151fast_index_of(T151 *C,T0 * a1){
- int R=0;
- R=(C)->_lower;
- while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT151item(C,R))))) {
- R=(R)+(1);
- }
- return R;
- }
- void rT151resize(T151 *C,int a1,int a2){
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T151 *n=((T151*)new(151));
- rT151make(n,a1,a2);
- _other=(T0 *)n;}
- _i=rT2max((C)->_lower,((T151*)_other)->_lower);
- _up=rT2min((C)->_upper,((T151*)_other)->_upper);
- while (!((_i)>(_up))) {
- rT151put((T151*)_other,rT151item(C,_i),_i);
- _i=(_i)+(1);
- }
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/memcpy(C,_other,sizeof(*C));free(_other);
- }
- T0 * rT151item(T151 *C,int a1){
- T0 * R=NULL;
- R=(C->_storage)[a1-(C->_lower)];
- return R;
- }
- void rT151add_last(T151 *C,T0 * a1){
- /*IF*/if (((C)->_capacity)<((rT151count(C))+(1))) {
- C->_capacity=((C)->_capacity)+(16);
- /*IF*/if (((C)->_capacity)==(16)) {
- C->_storage=malloc(16*sizeof(*(C->_storage)));
- }
- else {
- C->_storage=realloc(C->_storage,((C->_capacity)*sizeof(*(C->_storage))));
- }
- /*FI*/}
- /*FI*/C->_upper=((C)->_upper)+(1);
- rT151put(C,a1,(C)->_upper);
- }
- void rT151put(T151 *C,T0 * a1,int a2){
- (C->_storage)[a2-(C->_lower)]=a1;
- }
- void rT151copy(T151 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT151make(C,((T151*)a1)->_lower,((T151*)a1)->_upper);
- }
- else {
- rT151resize(C,((T151*)a1)->_lower,((T151*)a1)->_upper);
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT151put(C,rT151item((T151*)a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT151make(T151 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT151clear_all(C);
- }
- /*FI*/}
- void rT158clear(T158 *C){
- C->_upper=((C)->_lower)-(1);
- }
- void rT158clear_all(T158 *C){
- T0 * _value=NULL;
- rT158set_all_with(C,_value);
- }
- int rT158count(T158 *C){
- int R=0;
- R=(((C)->_upper)-((C)->_lower))+(1);
- return R;
- }
- void rT158set_all_with(T158 *C,T0 * a1){
- int _i=0;
- _i=(C)->_upper;
- while (!((_i)<((C)->_lower))) {
- rT158put(C,a1,_i);
- _i=(_i)-(1);
- }
- }
- void rT158resize(T158 *C,int a1,int a2){
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T158 *n=((T158*)new(158));
- rT158make(n,a1,a2);
- _other=(T0 *)n;}
- _i=rT2max((C)->_lower,((T158*)_other)->_lower);
- _up=rT2min((C)->_upper,((T158*)_other)->_upper);
- while (!((_i)>(_up))) {
- rT158put((T158*)_other,rT158item(C,_i),_i);
- _i=(_i)+(1);
- }
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/memcpy(C,_other,sizeof(*C));free(_other);
- }
- int rT158fast_index_of(T158 *C,T0 * a1){
- int R=0;
- R=(C)->_lower;
- while (!(((R)>((C)->_upper))||(((T0 *)a1)==((T0 *)rT158item(C,R))))) {
- R=(R)+(1);
- }
- return R;
- }
- int rT158fast_has(T158 *C,T0 * a1){
- int R=0;
- R=(rT158fast_index_of(C,a1))!=(((C)->_upper)+(1));
- return R;
- }
- int rT158empty(T158 *C){
- int R=0;
- R=(rT158count(C))==(0);
- return R;
- }
- T0 * rT158item(T158 *C,int a1){
- T0 * R=NULL;
- R=(C->_storage)[a1-(C->_lower)];
- return R;
- }
- void rT158add_last(T158 *C,T0 * a1){
- /*IF*/if (((C)->_capacity)<((rT158count(C))+(1))) {
- C->_capacity=((C)->_capacity)+(16);
- /*IF*/if (((C)->_capacity)==(16)) {
- C->_storage=malloc(16*sizeof(*(C->_storage)));
- }
- else {
- C->_storage=realloc(C->_storage,((C->_capacity)*sizeof(*(C->_storage))));
- }
- /*FI*/}
- /*FI*/C->_upper=((C)->_upper)+(1);
- rT158put(C,a1,(C)->_upper);
- }
- void rT158put(T158 *C,T0 * a1,int a2){
- (C->_storage)[a2-(C->_lower)]=a1;
- }
- void rT158copy(T158 *C,T0* a1){
- int _i=0;
- C->_upper=((C)->_lower)-(1);
- /*IF*/if (((C)->_capacity)==(0)) {
- rT158make(C,((T158*)a1)->_lower,((T158*)a1)->_upper);
- }
- else {
- rT158resize(C,((T158*)a1)->_lower,((T158*)a1)->_upper);
- }
- /*FI*/_i=(C)->_lower;
- while (!((_i)>((C)->_upper))) {
- rT158put(C,rT158item((T158*)a1,_i),_i);
- _i=(_i)+(1);
- }
- }
- void rT158make(T158 *C,int a1,int a2){
- /*IF*/{/*AT*/free(C->_storage);
- }
- /*FI*/C->_lower=a1;
- C->_upper=a2;
- C->_capacity=(((C)->_upper)-((C)->_lower))+(1);
- C->_storage=NULL;
- /*IF*/if (((C)->_capacity)>(0)) {
- C->_capacity=((C)->_capacity)+(16);
- C->_storage=malloc((size_t)((C->_capacity)*sizeof(*(C->_storage))));
- rT158clear_all(C);
- }
- /*FI*/}
- int argument_count;
- T0 **argument;
-