ftp.nice.ch/pub/next/developer/languages/eiffel/SmallEiffel.0.91.N.bs.tar.gz#/SmallEiffel/bin_c/compile_to_c39.c

This is compile_to_c39.c in view mode; [Download] [Up]

/* ANSI C code generated by SmallEiffel. */
/*
-- SmallEiffel  -- Release (- 0.91)    --      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"
/*ARRAY[TYPE]*/T0* rT108twin(T108 *C){
T0* R=NULL;
/*IF*//*AF*//*AE*/
R=(T0 *)se_new(C->id);AF_1
rT108copy((T108*)R,(T0 *)C);
AF_0
/*FI*/return R;
}
/*ARRAY[TYPE]*/void rT108clear_all(T108 *C){
T0* _value=NULL;
rT108set_all_with(C,_value);
}/*ARRAY[TYPE]*/T0* rT108first(T108 *C){
T0* R=NULL;
R=rT108item(C,(C)->_lower);
return R;
}
/*ARRAY[TYPE]*/int rT108count(T108 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[TYPE]*/void rT108set_all_with(T108 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT108put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[TYPE]*/void rT108resize(T108 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
int _up=0;
int _i=0;
T0* _other=NULL;
{T108 *n=((T108*)se_new(108));
rT108make(n,a1,a2);
_other=(T0 *)n;}
_i=rT2max((C)->_lower,((T108*)_other)->_lower);
_up=rT2min((C)->_upper,((T108*)_other)->_upper);
while (!((_i)>(_up))) {
rT108put((T108*)_other,rT108item(C,_i),_i);
_i=(_i)+(1);
}
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/rT108standard_copy(C,_other);
free(((void *)(T108*)_other));
}/*ARRAY[TYPE]*/T0* rT108item(T108 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[TYPE]*/T0** rT108realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[TYPE]*/void rT108add_last(T108 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT108count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT108malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT108realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT108put(C,a1,(C)->_upper);
}/*ARRAY[TYPE]*/T0** rT108malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[TYPE]*/void rT108put(T108 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[TYPE]*/void rT108standard_copy(T108 *C,T0* a1){
memcpy(C,a1,s[a1->id]);
}/*ARRAY[TYPE]*/void rT108copy(T108 *C,T0* a1){
int _i=0;
C->_upper=((C)->_lower)-(1);
/*IF*/if (((C)->_capacity)==(0)) {
rT108make(C,((T108*)a1)->_lower,((T108*)a1)->_upper);
}
else {
rT108resize(C,((T108*)a1)->_lower,((T108*)a1)->_upper);
}
/*FI*/_i=(C)->_lower;
while (!((_i)>((C)->_upper))) {
rT108put(C,rT108item((T108*)a1,_i),_i);
_i=(_i)+(1);
}
}/*ARRAY[TYPE]*/void rT108make(T108 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
C->_lower=a1;
C->_upper=a2;
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/C->_capacity=((a2)-(a1))+(1);
/*IF*/if (((C)->_capacity)>(0)) {
/*IF*/if (((C)->_capacity)<(16)) {
C->_capacity=16;
}
/*FI*/C->_storage=rT108malloc((C)->_capacity);
rT108clear_all(C);
}
/*FI*/}/*ARRAY[RENAME_PAIR]*/int rT123count(T123 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[RENAME_PAIR]*/T0* rT123item(T123 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[RENAME_PAIR]*/T0** rT123realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[RENAME_PAIR]*/void rT123add_last(T123 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT123count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT123malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT123realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT123put(C,a1,(C)->_upper);
}/*ARRAY[RENAME_PAIR]*/T0** rT123malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[RENAME_PAIR]*/void rT123put(T123 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[CLASS_NAME]*/int rT127count(T127 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[CLASS_NAME]*/T0* rT127item(T127 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[CLASS_NAME]*/T0** rT127realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[CLASS_NAME]*/void rT127add_last(T127 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT127count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT127malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT127realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT127put(C,a1,(C)->_upper);
}/*ARRAY[CLASS_NAME]*/T0** rT127malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[CLASS_NAME]*/void rT127put(T127 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[EXPORT_ITEM]*/int rT129count(T129 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[EXPORT_ITEM]*/T0* rT129item(T129 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[EXPORT_ITEM]*/T0** rT129realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[EXPORT_ITEM]*/void rT129add_last(T129 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT129count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT129malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT129realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT129put(C,a1,(C)->_upper);
}/*ARRAY[EXPORT_ITEM]*/T0** rT129malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[EXPORT_ITEM]*/void rT129put(T129 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[FEATURE_NAME]*/T0* rT131twin(T131 *C){
T0* R=NULL;
/*IF*//*AF*//*AE*/
R=(T0 *)se_new(C->id);AF_1
rT131copy((T131*)R,(T0 *)C);
AF_0
/*FI*/return R;
}
/*ARRAY[FEATURE_NAME]*/void rT131clear(T131 *C){
C->_upper=((C)->_lower)-(1);
}/*ARRAY[FEATURE_NAME]*/void rT131clear_all(T131 *C){
T0* _value=NULL;
rT131set_all_with(C,_value);
}/*ARRAY[FEATURE_NAME]*/T0* rT131first(T131 *C){
T0* R=NULL;
R=rT131item(C,(C)->_lower);
return R;
}
/*ARRAY[FEATURE_NAME]*/int rT131count(T131 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[FEATURE_NAME]*/void rT131set_all_with(T131 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT131put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[FEATURE_NAME]*/void rT131resize(T131 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
int _up=0;
int _i=0;
T0* _other=NULL;
{T131 *n=((T131*)se_new(131));
rT131make(n,a1,a2);
_other=(T0 *)n;}
_i=rT2max((C)->_lower,((T131*)_other)->_lower);
_up=rT2min((C)->_upper,((T131*)_other)->_upper);
while (!((_i)>(_up))) {
rT131put((T131*)_other,rT131item(C,_i),_i);
_i=(_i)+(1);
}
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/rT131standard_copy(C,_other);
free(((void *)(T131*)_other));
}/*ARRAY[FEATURE_NAME]*/T0* rT131item(T131 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[FEATURE_NAME]*/T0** rT131realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[FEATURE_NAME]*/void rT131add_last(T131 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT131count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT131malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT131realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT131put(C,a1,(C)->_upper);
}/*ARRAY[FEATURE_NAME]*/T0** rT131malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[FEATURE_NAME]*/void rT131put(T131 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[FEATURE_NAME]*/void rT131standard_copy(T131 *C,T0* a1){
memcpy(C,a1,s[a1->id]);
}/*ARRAY[FEATURE_NAME]*/void rT131copy(T131 *C,T0* a1){
int _i=0;
C->_upper=((C)->_lower)-(1);
/*IF*/if (((C)->_capacity)==(0)) {
rT131make(C,((T131*)a1)->_lower,((T131*)a1)->_upper);
}
else {
rT131resize(C,((T131*)a1)->_lower,((T131*)a1)->_upper);
}
/*FI*/_i=(C)->_lower;
while (!((_i)>((C)->_upper))) {
rT131put(C,rT131item((T131*)a1,_i),_i);
_i=(_i)+(1);
}
}/*ARRAY[FEATURE_NAME]*/void rT131make(T131 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
C->_lower=a1;
C->_upper=a2;
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/C->_capacity=((a2)-(a1))+(1);
/*IF*/if (((C)->_capacity)>(0)) {
/*IF*/if (((C)->_capacity)<(16)) {
C->_capacity=16;
}
/*FI*/C->_storage=rT131malloc((C)->_capacity);
rT131clear_all(C);
}
/*FI*/}/*ARRAY[PARENT]*/T0* rT132first(T132 *C){
T0* R=NULL;
R=rT132item(C,(C)->_lower);
return R;
}
/*ARRAY[PARENT]*/int rT132count(T132 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[PARENT]*/T0* rT132item(T132 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[PARENT]*/T0** rT132realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[PARENT]*/void rT132add_last(T132 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT132count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT132malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT132realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT132put(C,a1,(C)->_upper);
}/*ARRAY[PARENT]*/T0** rT132malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[PARENT]*/void rT132put(T132 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[CREATION_CLAUSE]*/int rT136count(T136 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[CREATION_CLAUSE]*/T0* rT136item(T136 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[CREATION_CLAUSE]*/T0** rT136realloc(/*C*/T0** a1,int a2){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=realloc(a1,(a2)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[CREATION_CLAUSE]*/void rT136add_last(T136 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT136count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT136malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT136realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT136put(C,a1,(C)->_upper);
}/*ARRAY[CREATION_CLAUSE]*/T0** rT136malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*ARRAY[CREATION_CLAUSE]*/void rT136put(T136 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.