This is pretty33.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[CREATION_CLAUSE]*/int rT134count(T134 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } /*ARRAY[CREATION_CLAUSE]*/T0* rT134item(T134 *C,int a1){ T0* R=NULL; R=(((T0**)(C->_storage))[a1-(C->_lower)]); return R; } /*ARRAY[CREATION_CLAUSE]*/T0** rT134realloc(/*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 rT134add_last(T134 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT134count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT134malloc((C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT134realloc((C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT134put(C,a1,(C)->_upper); }/*ARRAY[CREATION_CLAUSE]*/T0** rT134malloc(/*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 rT134put(T134 *C,T0* a1,int a2){ ((T0**)(C->_storage))[a2-(C->_lower)]=a1; } /*ARRAY[DECLARATION]*/T0* rT145first(T145 *C){ T0* R=NULL; R=rT145item(C,(C)->_lower); return R; } /*ARRAY[DECLARATION]*/int rT145count(T145 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } /*ARRAY[DECLARATION]*/T0* rT145item(T145 *C,int a1){ T0* R=NULL; R=(((T0**)(C->_storage))[a1-(C->_lower)]); return R; } /*ARRAY[DECLARATION]*/T0** rT145realloc(/*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[DECLARATION]*/void rT145add_last(T145 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT145count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT145malloc((C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT145realloc((C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT145put(C,a1,(C)->_upper); }/*ARRAY[DECLARATION]*/T0** rT145malloc(/*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[DECLARATION]*/void rT145put(T145 *C,T0* a1,int a2){ ((T0**)(C->_storage))[a2-(C->_lower)]=a1; } /*ARRAY[INTEGER_CONSTANT]*/void rT149clear_all(T149 *C){ T0* _value=NULL; rT149set_all_with(C,_value); }/*ARRAY[INTEGER_CONSTANT]*/int rT149count(T149 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } /*ARRAY[INTEGER_CONSTANT]*/void rT149set_all_with(T149 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT149put(C,a1,_i); _i=(_i)-(1); } }/*ARRAY[INTEGER_CONSTANT]*/T0* rT149item(T149 *C,int a1){ T0* R=NULL; R=(((T0**)(C->_storage))[a1-(C->_lower)]); return R; } /*ARRAY[INTEGER_CONSTANT]*/T0** rT149realloc(/*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[INTEGER_CONSTANT]*/void rT149add_last(T149 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT149count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT149malloc((C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT149realloc((C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT149put(C,a1,(C)->_upper); }/*ARRAY[INTEGER_CONSTANT]*/T0** rT149malloc(/*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[INTEGER_CONSTANT]*/void rT149put(T149 *C,T0* a1,int a2){ ((T0**)(C->_storage))[a2-(C->_lower)]=a1; } /*ARRAY[INTEGER_CONSTANT]*/void rT149make(T149 *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=rT149malloc((C)->_capacity); rT149clear_all(C); } /*FI*/}/*ARRAY[MANIFEST_STRING]*/void rT153clear_all(T153 *C){ T0* _value=NULL; rT153set_all_with(C,_value); }/*ARRAY[MANIFEST_STRING]*/int rT153count(T153 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } /*ARRAY[MANIFEST_STRING]*/void rT153set_all_with(T153 *C,T0* a1){ int _i=0; _i=(C)->_upper; while (!((_i)<((C)->_lower))) { rT153put(C,a1,_i); _i=(_i)-(1); } }/*ARRAY[MANIFEST_STRING]*/T0* rT153item(T153 *C,int a1){ T0* R=NULL; R=(((T0**)(C->_storage))[a1-(C->_lower)]); return R; } /*ARRAY[MANIFEST_STRING]*/T0** rT153realloc(/*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[MANIFEST_STRING]*/void rT153add_last(T153 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT153count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT153malloc((C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT153realloc((C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT153put(C,a1,(C)->_upper); }/*ARRAY[MANIFEST_STRING]*/T0** rT153malloc(/*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[MANIFEST_STRING]*/void rT153put(T153 *C,T0* a1,int a2){ ((T0**)(C->_storage))[a2-(C->_lower)]=a1; } /*ARRAY[MANIFEST_STRING]*/void rT153make(T153 *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=rT153malloc((C)->_capacity); rT153clear_all(C); } /*FI*/}/*ARRAY[ASSERTION]*/int rT160count(T160 *C){ int R=0; R=(((C)->_upper)-((C)->_lower))+(1); return R; } /*ARRAY[ASSERTION]*/T0* rT160item(T160 *C,int a1){ T0* R=NULL; R=(((T0**)(C->_storage))[a1-(C->_lower)]); return R; } /*ARRAY[ASSERTION]*/T0** rT160realloc(/*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[ASSERTION]*/void rT160add_last(T160 *C,T0* a1){ /*IF*//*AF*//*AE*/ /*FI*//*IF*/if (((C)->_capacity)<((rT160count(C))+(1))) { /*IF*/if (((C)->_capacity)==(0)) { C->_capacity=16; C->_storage=rT160malloc((C)->_capacity); } else { C->_capacity=((C)->_capacity)+(16); C->_storage=rT160realloc((C)->_storage,(C)->_capacity); } /*FI*/} /*FI*/C->_upper=((C)->_upper)+(1); rT160put(C,a1,(C)->_upper); }/*ARRAY[ASSERTION]*/T0** rT160malloc(/*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[ASSERTION]*/void rT160put(T160 *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.