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

This is pretty30.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[E_WHEN]*/int rT238count(T238 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[E_WHEN]*/T0* rT238item(T238 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[E_WHEN]*/T0** rT238realloc(/*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_WHEN]*/void rT238add_last(T238 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT238count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT238malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT238realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT238put(C,a1,(C)->_upper);
}/*ARRAY[E_WHEN]*/T0** rT238malloc(/*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_WHEN]*/void rT238put(T238 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[WHEN_ITEM_1]*/int rT235count(T235 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[WHEN_ITEM_1]*/T0* rT235item(T235 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[WHEN_ITEM_1]*/T0** rT235realloc(/*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[WHEN_ITEM_1]*/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)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT235realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT235put(C,a1,(C)->_upper);
}/*ARRAY[WHEN_ITEM_1]*/T0** rT235malloc(/*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[WHEN_ITEM_1]*/void rT235put(T235 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[IFTHEN]*/int rT229count(T229 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[IFTHEN]*/T0* rT229item(T229 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[IFTHEN]*/T0** rT229realloc(/*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[IFTHEN]*/void rT229add_last(T229 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT229count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT229malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT229realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT229put(C,a1,(C)->_upper);
}/*ARRAY[IFTHEN]*/T0** rT229malloc(/*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[IFTHEN]*/void rT229put(T229 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[INSTRUCTION]*/int rT223count(T223 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[INSTRUCTION]*/T0* rT223item(T223 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[INSTRUCTION]*/T0** rT223realloc(/*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[INSTRUCTION]*/void rT223add_last(T223 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT223count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT223malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT223realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT223put(C,a1,(C)->_upper);
}/*ARRAY[INSTRUCTION]*/T0** rT223malloc(/*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[INSTRUCTION]*/void rT223put(T223 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[LOCAL_NAME]*/void rT185clear_all(T185 *C){
T0* _value=NULL;
rT185set_all_with(C,_value);
}/*ARRAY[LOCAL_NAME]*/int rT185count(T185 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[LOCAL_NAME]*/void rT185set_all_with(T185 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT185put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[LOCAL_NAME]*/T0* rT185item(T185 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[LOCAL_NAME]*/T0** rT185realloc(/*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[LOCAL_NAME]*/void rT185add_last(T185 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT185count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT185malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT185realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT185put(C,a1,(C)->_upper);
}/*ARRAY[LOCAL_NAME]*/T0** rT185malloc(/*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[LOCAL_NAME]*/void rT185put(T185 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[LOCAL_NAME]*/void rT185make(T185 *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=rT185malloc((C)->_capacity);
rT185clear_all(C);
}
/*FI*/}/*ARRAY[ARGUMENT_NAME]*/void rT97clear_all(T97 *C){
T0* _value=NULL;
rT97set_all_with(C,_value);
}/*ARRAY[ARGUMENT_NAME]*/int rT97count(T97 *C){
int R=0;
R=(((C)->_upper)-((C)->_lower))+(1);
return R;
}
/*ARRAY[ARGUMENT_NAME]*/void rT97set_all_with(T97 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<((C)->_lower))) {
rT97put(C,a1,_i);
_i=(_i)-(1);
}
}/*ARRAY[ARGUMENT_NAME]*/T0* rT97item(T97 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1-(C->_lower)]);
return R;
}
/*ARRAY[ARGUMENT_NAME]*/T0** rT97realloc(/*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[ARGUMENT_NAME]*/void rT97add_last(T97 *C,T0* a1){
/*IF*//*AF*//*AE*/
/*FI*//*IF*/if (((C)->_capacity)<((rT97count(C))+(1))) {
/*IF*/if (((C)->_capacity)==(0)) {
C->_capacity=16;
C->_storage=rT97malloc((C)->_capacity);
}
else {
C->_capacity=((C)->_capacity)+(16);
C->_storage=rT97realloc((C)->_storage,(C)->_capacity);
}
/*FI*/}
/*FI*/C->_upper=((C)->_upper)+(1);
rT97put(C,a1,(C)->_upper);
}/*ARRAY[ARGUMENT_NAME]*/T0** rT97malloc(/*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[ARGUMENT_NAME]*/void rT97put(T97 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2-(C->_lower)]=a1;
}
/*ARRAY[ARGUMENT_NAME]*/void rT97make(T97 *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=rT97malloc((C)->_capacity);
rT97clear_all(C);
}
/*FI*/}

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