This is pretty22.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" /*E_CHECK*/T0* rT219add_comment(T219 *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; } /*E_CHECK*/void rT219pretty_print(T219 *C){ rT220pretty_print((T220*)(C)->_check_invariant); rT267put_string((T267*)oRBC27fmt,(T0 *)ms2_219); /*IF*/if (((T267*)oRBC27fmt)->_print_end_check) { rT267put_end((T267*)oRBC27fmt,(T0 *)ms3_219); } /*FI*/}/*E_CHECK*/void rT219make(T219 *C,T0* a1,T0* a2,T0* a3){ {T220 *n=((T220*)se_new(220)); rT220make(n,a1,a2,a3); C->_check_invariant=(T0 *)n;} }/*FEATURE_CLAUSE_LIST*/void rT263pretty_print(T263 *C){ int _i=0; _i=1; while (!((_i)>(((T264*)(C)->_list)->_upper))) { /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(0);/*]*/ rT267indent((T267*)oRBC27fmt); /*IF*/if (!(((T267*)oRBC27fmt)->_zen_mode)) { rT267skip((T267*)oRBC27fmt,1); } /*FI*/rT135pretty_print((T135*)rT264item((T264*)(C)->_list,_i)); _i=(_i)+(1); } }/*FEATURE_CLAUSE_LIST*/void rT263get_started(T263 *C,T0* a1){ int _i=0; _i=1; while (!((_i)>(((T264*)(C)->_list)->_upper))) { rT135add_into((T135*)rT264item((T264*)(C)->_list,_i),a1); _i=(_i)+(1); } }/*FEATURE_CLAUSE_LIST*/void rT263add_last(T263 *C,T0* a1){ rT264add_last((T264*)(C)->_list,a1); }/*FORMAL_ARG_LIST*/T0* rT95name(T95 *C,int a1){ T0* R=NULL; R=rT97item((T97*)(C)->_flat_list,a1); return R; } /*FORMAL_ARG_LIST*/void rT95fatal_error(/*C*/T0* a1){ rT46fatal_error(a1); }/*FORMAL_ARG_LIST*/int rT95count(T95 *C){ int R=0; R=((T97*)(C)->_flat_list)->_upper; return R; } /*FORMAL_ARG_LIST*/void rT95error(/*C*/T0* a1,T0* a2){ rT46add_position(a1); rT46error((T46*)oRBC27eh,a2); }/*FORMAL_ARG_LIST*/int rT95rank_of(T95 *C,T0* a1){ int R=0; R=rT95count(C); while (!(((R)==(0))||(rT7is_equal((T7*)a1,((T90*)rT95name(C,R))->_to_string)))) { R=(R)-(1); } return R; } /*FORMAL_ARG_LIST*/void rT95pretty_print(T95 *C){ int _i=0; rT267put_character((T267*)oRBC27fmt,'\50'); rT267level_incr((T267*)oRBC27fmt); _i=1; while (!((_i)>(((T145*)(C)->_list)->_upper))) { XrT141pretty_print(rT145item((T145*)(C)->_list,_i)); _i=(_i)+(1); /*IF*/if ((_i)<=(((T145*)(C)->_list)->_upper)) { rT267put_string((T267*)oRBC27fmt,(T0 *)ms2_95); } /*FI*/} rT267level_decr((T267*)oRBC27fmt); rT267put_character((T267*)oRBC27fmt,'\51'); }/*FORMAL_ARG_LIST*/void rT95add_last(T95 *C,T0* a1){ T0* _n2=NULL; int _i=0; _i=1; while (!(!(rT97item((T97*)(C)->_flat_list,_i)))) { _n2=rT97item((T97*)(C)->_flat_list,_i); /*IF*/if (rT7is_equal((T7*)((T90*)_n2)->_to_string,((T90*)a1)->_to_string)) { rT46add_position(((T90*)a1)->_start_position); rT46add_position(((T90*)_n2)->_start_position); rT95fatal_error((T0 *)ms2_96); } /*FI*/_i=(_i)+(1); } rT97put((T97*)(C)->_flat_list,a1,_i); /*[IRF3:set_rank*//*AW*/((T90*)a1)->_rank=(_i);/*]*/ }/*FORMAL_ARG_LIST*/void rT95standard_make(T95 *C,T0* a1,T0* a2){ int _actual_count=0; int _il=0; C->_start_position=a1; C->_list=a2; _il=1; while (!((_il)>(((T145*)(C)->_list)->_upper))) { _actual_count=(_actual_count)+(XrT141count(rT145item((T145*)(C)->_list,_il))); _il=(_il)+(1); } {T97 *n=((T97*)se_new(97)); rT97make(n,1,_actual_count); C->_flat_list=(T0 *)n;} _il=1; while (!((_il)>(((T145*)(C)->_list)->_upper))) { XrT141append_in(rT145item((T145*)(C)->_list,_il),(T0 *)C); _il=(_il)+(1); } }/*FORMAL_ARG_LIST*/void rT95make(T95 *C,T0* a1,T0* a2){ int _rank=0; int _i=0; T0* _tla=NULL; T0* _tlf=NULL; T0* _an=NULL; rT95standard_make(C,a1,a2); _i=((T97*)(C)->_flat_list)->_upper; while (!((_i)==(0))) { _an=rT97item((T97*)(C)->_flat_list,_i); _tlf=((T90*)_an)->_result_type; if ((int)_tlf) switch (((T0 *)_tlf)->id) { case 99: break; default: _tlf = NULL; };/*IF*/if (((int)_tlf)) { _rank=rT95rank_of(C,/*XrT*FEATURE_NAME*/((T68*)((T99*)_tlf)->_like_what)->_to_string); /*IF*/if ((_rank)==(_i)) { rT95error(((T99*)_tlf)->_start_position,(T0 *)ms1_95); } else if ((_rank)>(0)) { {T98 *n=((T98*)se_new(98)); rT98make(n,((T99*)_tlf)->_start_position,rT97item((T97*)(C)->_flat_list,_rank)); _tla=(T0 *)n;} /*[IRF3:set_result_type*//*AW*/((T90*)_an)->_result_type=(_tla);/*]*/ } /*FI*/} /*FI*/_i=(_i)-(1); } }/*FORMAL_GENERIC_LIST*/void rT87fatal_error(/*C*/T0* a1){ rT46fatal_error(a1); }/*FORMAL_GENERIC_LIST*/int rT87count(T87 *C){ int R=0; R=((T88*)(C)->_list)->_upper; return R; } /*FORMAL_GENERIC_LIST*/void rT87pretty_print(T87 *C){ int _i=0; rT267put_character((T267*)oRBC27fmt,'\133'); rT267level_incr((T267*)oRBC27fmt); _i=1; while (!((_i)>(((T88*)(C)->_list)->_upper))) { rT86pretty_print((T86*)rT88item((T88*)(C)->_list,_i)); _i=(_i)+(1); /*IF*/if ((_i)<=(((T88*)(C)->_list)->_upper)) { rT267put_string((T267*)oRBC27fmt,(T0 *)ms2_87); } /*FI*/} rT267put_character((T267*)oRBC27fmt,'\135'); rT267level_decr((T267*)oRBC27fmt); }/*FORMAL_GENERIC_LIST*/T0* rT87item(T87 *C,int a1){ T0* R=NULL; R=rT88item((T88*)(C)->_list,a1); return R; } /*FORMAL_GENERIC_LIST*/int rT87index_of(T87 *C,T0* a1){ int R=0; T0* _to_string=NULL; _to_string=((T49*)a1)->_to_string; R=((T88*)(C)->_list)->_upper; while (!(((R)==(0))||(((T0 *)_to_string)==((T0 *)((T49*)((T86*)rT88item((T88*)(C)->_list,R))->_name)->_to_string)))) { R=(R)-(1); } return R; } /*FORMAL_GENERIC_LIST*/void rT87make(T87 *C,T0* a1,T0* a2){ T0* _fga=NULL; int _i=0; int _rank=0; C->_start_position=a1; C->_list=a2; _i=((T88*)a2)->_upper; while (!((_i)==(0))) { _fga=rT88item((T88*)a2,_i); _rank=rT87index_of(C,((T86*)_fga)->_name); /*IF*/if ((_rank)!=(_i)) { rT46add_position(rT86start_position((T86*)rT88item((T88*)a2,_rank))); rT46add_position(rT86start_position((T86*)_fga)); rT87fatal_error((T0 *)ms1_87); } /*FI*/_i=(_i)-(1); } }/*FORMAL_GENERIC_ARG*/int rT86constrained(T86 *C){ int R=0; R=((int)(C)->_constraint); return R; } /*FORMAL_GENERIC_ARG*/T0* rT86start_position(T86 *C){ T0* R=NULL; R=((T49*)(C)->_name)->_start_position; return R; } /*FORMAL_GENERIC_ARG*/void rT86pretty_print(T86 *C){ rT49pretty_print((T49*)(C)->_name); /*IF*/if (rT86constrained(C)) { rT267level_incr((T267*)oRBC27fmt); rT267put_string((T267*)oRBC27fmt,(T0 *)ms1_86); XrT60pretty_print((C)->_constraint); rT267level_decr((T267*)oRBC27fmt); } /*FI*/}/*FORMAL_GENERIC_ARG*/void rT86make(T86 *C,T0* a1,T0* a2){ C->_name=a1; C->_constraint=a2; }/*FEATURE_NAME*/void rT69bracketed_print(T69 *C){ rT267put_character((T267*)oRBC27fmt,'\50'); rT69pretty_print(C); rT267put_character((T267*)oRBC27fmt,'\51'); }/*FEATURE_NAME*/int rT69same_as(T69 *C,T0* a1){ int R=0; R=rT7is_equal((T7*)rT69to_key(C),XrT50to_key(a1)); return R; } /*FEATURE_NAME*/T0* rT69add_comment(T69 *C,T0* a1){ T0* R=NULL; /*IF*/if ((!(a1))||((rT61count((T61*)a1))==(0))) { R=(T0 *)C; } else { {T226 *n=((T226*)se_new(226)); rT226make(n,(T0 *)C,a1); R=(T0 *)n;}} /*FI*/return R; } /*FEATURE_NAME*/void rT69print_as_target(T69 *C){ rT267put_string((T267*)oRBC27fmt,(C)->_to_string); rT267put_character((T267*)oRBC27fmt,'\56'); }/*FEATURE_NAME*/void rT69pretty_print(T69 *C){ rT267put_string((T267*)oRBC27fmt,(C)->_to_string); }/*FEATURE_NAME*/T0* rT69to_key(T69 *C){ T0* R=NULL; R=(C)->_to_string; return R; } /*FEATURE_NAME*/void rT69make(T69 *C,T0* a1,T0* a2){ C->_to_string=a1; C->_start_position=a2; }/*FEATURE_NAME_LIST*/int rT128count(T128 *C){ int R=0; R=((T129*)(C)->_list)->_upper; return R; } /*FEATURE_NAME_LIST*/void rT128error(/*C*/T0* a1,T0* a2){ rT46add_position(a1); rT46error((T46*)oRBC27eh,a2); }/*FEATURE_NAME_LIST*/void rT128pretty_print(T128 *C){ int _icount=0; int _i=0; _i=1; while (!((_i)>(rT128count(C)))) { /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(3);/*]*/ XrT69pretty_print(rT129item((T129*)(C)->_list,_i)); _i=(_i)+(1); _icount=(_icount)+(1); /*IF*/if ((_i)<=(rT128count(C))) { rT267put_string((T267*)oRBC27fmt,(T0 *)ms2_128); /*IF*/if ((_icount)>(4)) { /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(3);/*]*/ rT267indent((T267*)oRBC27fmt); _icount=0; } /*FI*/} /*FI*/} }/*FEATURE_NAME_LIST*/T0* rT128item(T128 *C,int a1){ T0* R=NULL; R=rT129item((T129*)(C)->_list,a1); return R; } /*FEATURE_NAME_LIST*/int rT128index_of(T128 *C,T0* a1){ int R=0; T0* _fn_key=NULL; _fn_key=XrT69to_key(a1); R=1; while (!(((R)>(rT128count(C)))||(rT7is_equal((T7*)_fn_key,XrT69to_key(rT128item(C,R)))))) { R=(R)+(1); } return R; } /*FEATURE_NAME_LIST*/void rT128make(T128 *C,T0* a1){ int _i2=0; int _i=0; C->_list=a1; _i=((T129*)a1)->_upper; while (!((_i)==(0))) { _i2=rT128index_of(C,rT129item((T129*)a1,_i)); /*IF*/if ((_i2)!=(_i)) { rT46add_position(/*XrT*FEATURE_NAME*/((T68*)rT129item((T129*)a1,_i2))->_start_position); rT128error(/*XrT*FEATURE_NAME*/((T68*)rT129item((T129*)a1,_i))->_start_position,(T0 *)ms1_128); } /*FI*/_i=(_i)-(1); } }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.