This is pretty20.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" /*CREATION_CLAUSE*/void rT132pretty_print(T132 *C){ int _i=0; /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(0);/*]*/ /*IF*/if (!(((T267*)oRBC27fmt)->_zen_mode)) { rT267skip((T267*)oRBC27fmt,1); } else { rT267indent((T267*)oRBC27fmt); } /*FI*/rT267keyword((T267*)oRBC27fmt,(T0 *)ms1_132); /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(1);/*]*/ /*IF*/if (((int)(C)->_clients)) { rT123pretty_print((T123*)(C)->_clients); } /*FI*//*IF*/if (((int)(C)->_comment)) { rT61pretty_print((T61*)(C)->_comment); } /*FI*//*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(1);/*]*/ /*IF*/if (!(((T267*)oRBC27fmt)->_zen_mode)) { rT267indent((T267*)oRBC27fmt); } /*FI*/rT128pretty_print((T128*)(C)->_procedure_list); }/*CREATION_CLAUSE*/void rT132make(T132 *C,T0* a1,T0* a2,T0* a3){ C->_clients=a1; C->_comment=a2; {T128 *n=((T128*)se_new(128)); rT128make(n,a3); C->_procedure_list=(T0 *)n;} }/*CREATION_CLAUSE_LIST*/void rT133pretty_print(T133 *C){ int _i=0; _i=1; while (!((_i)>(((T134*)(C)->_list)->_upper))) { rT132pretty_print((T132*)rT134item((T134*)(C)->_list,_i)); /*IF*/if (!(((T267*)oRBC27fmt)->_zen_mode)) { /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(0);/*]*/ rT267skip((T267*)oRBC27fmt,1); } /*FI*/_i=(_i)+(1); } }/*CREATION_CLAUSE_LIST*/void rT133add_last(T133 *C,T0* a1){ rT134add_last((T134*)(C)->_list,a1); }/*IFTHENLIST*/void rT228pretty_print(T228 *C){ int _i=0; _i=1; while (!((_i)>(((T229*)(C)->_list)->_upper))) { rT227pretty_print((T227*)rT229item((T229*)(C)->_list,_i)); _i=(_i)+(1); /*IF*/if ((_i)<=(((T229*)(C)->_list)->_upper)) { rT267indent((T267*)oRBC27fmt); rT267keyword((T267*)oRBC27fmt,(T0 *)ms1_228); } /*FI*/} }/*IFTHENLIST*/void rT228add_last(T228 *C,T0* a1){ rT229add_last((T229*)(C)->_list,a1); }/*IFTHEN*/void rT227pretty_print(T227 *C){ rT267level_incr((T267*)oRBC27fmt); /*[IRF3:set_semi_colon_flag*//*AW*/((T267*)oRBC27fmt)->_semi_colon_flag=(0);/*]*/ XrT70pretty_print((C)->_expression); rT267level_decr((T267*)oRBC27fmt); rT267keyword((T267*)oRBC27fmt,(T0 *)ms7_227); rT267indent((T267*)oRBC27fmt); /*IF*/if (((int)(C)->_then_compound)) { rT140pretty_print((T140*)(C)->_then_compound); } /*FI*/}/*IFTHEN*/void rT227make(T227 *C,T0* a1,T0* a2){ C->_expression=a1; C->_then_compound=a2; }/*IFTHENELSE*/T0* rT224add_comment(T224 *C,T0* a1){ T0* R=NULL; /*IF*/if ((!(a1))||((rT61count((T61*)a1))==(0))) { R=(T0 *)C; } else {/*AT*//*IF*/if ((rT61count((T61*)a1))==(1)) { R=(T0 *)C; } else { {T222 *n=((T222*)se_new(222)); rT222make(n,(T0 *)C,a1); R=(T0 *)n;}} /*FI*/} /*FI*/return R; } /*IFTHENELSE*/void rT224pretty_print(T224 *C){ rT267keyword((T267*)oRBC27fmt,(T0 *)ms6_224); rT228pretty_print((T228*)(C)->_ifthenlist); /*IF*/if (((int)(C)->_else_compound)) { rT267indent((T267*)oRBC27fmt); rT267keyword((T267*)oRBC27fmt,(T0 *)ms7_224); rT140pretty_print((T140*)(C)->_else_compound); } /*FI*/rT267indent((T267*)oRBC27fmt); rT267keyword((T267*)oRBC27fmt,(T0 *)ms8_224); /*IF*/if (((T267*)oRBC27fmt)->_print_end_if) { rT267put_end((T267*)oRBC27fmt,(T0 *)ms9_224); } /*FI*/}/*IFTHENELSE*/void rT224add_if_then(T224 *C,T0* a1,T0* a2){ T0* _ifthen=NULL; {T227 *n=((T227*)se_new(227)); rT227make(n,a1,a2); _ifthen=(T0 *)n;} /*IF*/if (!((C)->_ifthenlist)) { {T228 *n=((T228*)se_new(228)); /*[IRF3:make*//*AW*/(n)->_list=(ma(229,0,1,_ifthen));/*]*/ C->_ifthenlist=(T0 *)n;} } else { rT228add_last((T228*)(C)->_ifthenlist,_ifthen); } /*FI*/}/*FIXED_ARRAY[INTEGER]*/void rT56clear_all(T56 *C){ int _value=0; rT56set_all_with(C,_value); }/*FIXED_ARRAY[INTEGER]*/void rT56set_all_with(T56 *C,int a1){ int _i=0; _i=(C)->_upper; while (!((_i)<(0))) { rT56put(C,a1,_i); _i=(_i)-(1); } }/*FIXED_ARRAY[INTEGER]*/int rT56item(T56 *C,int a1){ int R=0; R=(((int*)(C->_storage))[a1]); return R; } /*FIXED_ARRAY[INTEGER]*/int* rT56realloc(/*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; } /*FIXED_ARRAY[INTEGER]*/int* rT56malloc(/*C*/int a1){ int* R=0; T37 _mem={0/*dummy*/}; int _x=0; /*IF*/{/*AT*/R=malloc((a1)*(((0),sizeof(T2)))); } /*FI*/return R; } /*FIXED_ARRAY[INTEGER]*/void rT56put(T56 *C,int a1,int a2){ ((int*)(C->_storage))[a2]=a1; } /*FIXED_ARRAY[INTEGER]*/void rT56make(T56 *C,int a1){ /*IF*/if (((int)(C)->_storage)) { C->_storage=rT56realloc((C)->_storage,a1); } else { C->_storage=rT56malloc(a1); } /*FI*/C->_upper=(a1)-(1); rT56clear_all(C); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.