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

This is pretty31.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 "pretty.h"
/*ARRAY[FORMAL_GENERIC_ARG]*/int rT88count(T88 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[FORMAL_GENERIC_ARG]*/T0* rT88item(T88 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[FORMAL_GENERIC_ARG]*/T0** rT88realloc(/*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[FORMAL_GENERIC_ARG]*/void rT88add_last(T88 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT88count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT88malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT88realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT88put(C,a1,(C)->_upper);
}/*ARRAY[FORMAL_GENERIC_ARG]*/T0** rT88malloc(/*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[FORMAL_GENERIC_ARG]*/void rT88put(T88 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[INDEX_CLAUSE]*/int rT85count(T85 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[INDEX_CLAUSE]*/T0* rT85item(T85 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[INDEX_CLAUSE]*/T0** rT85realloc(/*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[INDEX_CLAUSE]*/void rT85add_last(T85 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT85count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT85malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT85realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT85put(C,a1,(C)->_upper);
}/*ARRAY[INDEX_CLAUSE]*/T0** rT85malloc(/*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[INDEX_CLAUSE]*/void rT85put(T85 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[EXPRESSION]*/int rT83count(T83 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[EXPRESSION]*/T0* rT83item(T83 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[EXPRESSION]*/T0** rT83realloc(/*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[EXPRESSION]*/void rT83add_last(T83 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT83count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT83malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT83realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT83put(C,a1,(C)->_upper);
}/*ARRAY[EXPRESSION]*/T0** rT83malloc(/*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[EXPRESSION]*/void rT83put(T83 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[E_FEATURE]*/void rT65clear_all(T65 *C){
T0* _value=NULL;
rT65set_all_with(C,_value);
}/*ARRAY[E_FEATURE]*/int rT65count(T65 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[E_FEATURE]*/void rT65set_all_with(T65 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT65put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[E_FEATURE]*/void rT65resize(T65 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
int _up=0;
int _i=0;
T0* _other=NULL;
{T65 *n=((T65*)se_new(65));
rT65make(n,a1,a2);
_other=(T0 *)n;}
_i=rT2max((C)->_lower,((T65*)_other)->_lower);
_up=rT2min((C)->_upper,((T65*)_other)->_upper);
while (!((_i)>(_up))) {
rT65put((T65*)_other,rT65item(C,_i),_i);
_i=(_i)+(1);
}
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/rT65standard_copy(C,_other);
free(((void *)(T65*)_other));
}/*ARRAY[E_FEATURE]*/T0* rT65item(T65 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[E_FEATURE]*/int rT65empty(T65 *C){
int R=0;
R=(rT65count(C))==(0);
return R;
}
/*ARRAY[E_FEATURE]*/T0** rT65realloc(/*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[E_FEATURE]*/void rT65add_last(T65 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT65count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT65malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT65realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT65put(C,a1,(C)->_upper);
}/*ARRAY[E_FEATURE]*/T0** rT65malloc(/*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[E_FEATURE]*/void rT65put(T65 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[E_FEATURE]*/void rT65standard_copy(T65 *C,T0* a1){
memcpy(C,a1,s[a1->id]);
}/*ARRAY[E_FEATURE]*/void rT65make(T65 *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=rT65malloc((C)->_capacity);
rT65clear_all(C);
}
/*FI*/}/*ARRAY[BASE_CLASS]*/void rT58clear_all(T58 *C){
T0* _value=NULL;
rT58set_all_with(C,_value);
}/*ARRAY[BASE_CLASS]*/int rT58count(T58 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[BASE_CLASS]*/void rT58set_all_with(T58 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT58put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[BASE_CLASS]*/void rT58resize(T58 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
int _up=0;
int _i=0;
T0* _other=NULL;
{T58 *n=((T58*)se_new(58));
rT58make(n,a1,a2);
_other=(T0 *)n;}
_i=rT2max((C)->_lower,((T58*)_other)->_lower);
_up=rT2min((C)->_upper,((T58*)_other)->_upper);
while (!((_i)>(_up))) {
rT58put((T58*)_other,rT58item(C,_i),_i);
_i=(_i)+(1);
}
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/rT58standard_copy(C,_other);
free(((void *)(T58*)_other));
}/*ARRAY[BASE_CLASS]*/T0* rT58item(T58 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[BASE_CLASS]*/T0** rT58malloc(/*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[BASE_CLASS]*/void rT58put(T58 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[BASE_CLASS]*/void rT58standard_copy(T58 *C,T0* a1){
memcpy(C,a1,s[a1->id]);
}/*ARRAY[BASE_CLASS]*/void rT58make(T58 *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=rT58malloc((C)->_capacity);
rT58clear_all(C);
}
/*FI*/}/*ARRAY[INTEGER]*/void rT57clear_all(T57 *C){
int _value=0;
rT57set_all_with(C,_value);
}/*ARRAY[INTEGER]*/int rT57count(T57 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[INTEGER]*/void rT57set_all_with(T57 *C,int a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT57put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[INTEGER]*/int rT57fast_index_of(T57 *C,int a1){
int R=0;
R=(C)->_lower;
while (!(((R)>((C)->_upper))||((a1)==(rT57item(C,R))))) {
R=(R)+(1);
}
return R;
}
/*ARRAY[INTEGER]*/int rT57fast_has(T57 *C,int a1){
int R=0;
R=(rT57fast_index_of(C,a1))!=(((C)->_upper)+(1));
return R;
}
/*ARRAY[INTEGER]*/void rT57resize(T57 *C,int a1,int a2){
T37 _mem={0/*dummy*/};
int _up=0;
int _i=0;
T0* _other=NULL;
{T57 *n=((T57*)se_new(57));
rT57make(n,a1,a2);
_other=(T0 *)n;}
_i=rT2max((C)->_lower,((T57*)_other)->_lower);
_up=rT2min((C)->_upper,((T57*)_other)->_upper);
while (!((_i)>(_up))) {
rT57put((T57*)_other,rT57item(C,_i),_i);
_i=(_i)+(1);
}
/*IF*/if (((int)(C)->_storage)) {
free((C)->_storage);
}
/*FI*/rT57standard_copy(C,_other);
free(((void *)(T57*)_other));
}/*ARRAY[INTEGER]*/int rT57item(T57 *C,int a1){
int R=0;
R=(((int*)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[INTEGER]*/int* rT57realloc(/*C*/int* a1,int a2){
int* R=0;
T37 _mem={0/*dummy*/};
int _x=0;
/*IF*/{/*AT*/R=realloc(a1,(a2)*(((0),sizeof(T2))));
}
/*FI*/return R;
}
/*ARRAY[INTEGER]*/void rT57add_last(T57 *C,int a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT57count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT57malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT57realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT57put(C,a1,(C)->_upper);
}/*ARRAY[INTEGER]*/int* rT57malloc(/*C*/int a1){
int* R=0;
T37 _mem={0/*dummy*/};
int _x=0;
/*IF*/{/*AT*/R=malloc((a1)*(((0),sizeof(T2))));
}
/*FI*/return R;
}
/*ARRAY[INTEGER]*/void rT57put(T57 *C,int a1,int a2){
((int*)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[INTEGER]*/void rT57standard_copy(T57 *C,T0* a1){
memcpy(C,a1,s[a1->id]);
}/*ARRAY[INTEGER]*/void rT57make(T57 *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=rT57malloc((C)->_capacity);
rT57clear_all(C);
}
/*FI*/}/*ARRAY[POSITION]*/void rT48clear(T48 *C){
C->_upper=((C)->_lower)-(1);
}/*ARRAY[POSITION]*/void rT48clear_all(T48 *C){
T0* _value=NULL;
rT48set_all_with(C,_value);
}/*ARRAY[POSITION]*/int rT48count(T48 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[POSITION]*/void rT48set_all_with(T48 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT48put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[POSITION]*/T0* rT48item(T48 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[POSITION]*/T0** rT48realloc(/*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[POSITION]*/void rT48add_last(T48 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT48count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT48malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT48realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT48put(C,a1,(C)->_upper);
}/*ARRAY[POSITION]*/T0** rT48malloc(/*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[POSITION]*/int rT48equal_like(/*C*/T0* a1,T0* a2){
int R=0;
/*IF*//*AF*//*AF*/if (((T0 *)a1)==((T0 *)a2)) {
R=1;
}
 else if ((!(a1))||(!(a2))) {
}
else {
R=rT47is_equal((T47*)a1,a2);
}
/*FI*/return R;
}
/*ARRAY[POSITION]*/int rT48index_of(T48 *C,T0* a1){
int R=0;
R=(C)->_lower;
while (!(((R)>((C)->_upper))||(rT48equal_like(a1,rT48item(C,R))))) {
R=(R)+(1);
}
return R;
}
/*ARRAY[POSITION]*/void rT48put(T48 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[POSITION]*/void rT48with_capacity(T48 *C,int a1,int a2){
rT48make(C,a2,((a2)+(a1))-(1));
C->_upper=(a2)-(1);
}/*ARRAY[POSITION]*/int rT48has(T48 *C,T0* a1){
int R=0;
R=(rT48index_of(C,a1))!=(((C)->_upper)+(1));
return R;
}
/*ARRAY[POSITION]*/void rT48make(T48 *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=rT48malloc((C)->_capacity);
rT48clear_all(C);
}
/*FI*/}

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