This is pretty4.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" /*TAG_NAME*/T0* rT161to_key(T161 *C){ T0* R=NULL; R=(C)->_to_string; return R; } /*TAG_NAME*/void rT161make(T161 *C,T0* a1,T0* a2){ C->_to_string=a1; C->_start_position=a2; }/*ERROR_HANDLER*/void rT46warning(T46 *C,T0* a1){ rT46append(a1); rT46print_as_warning(C); }/*ERROR_HANDLER*/void rT46die_with_code(/*C*/int a1){ exit(a1); }/*ERROR_HANDLER*/void rT46fatal_error(/*C*/T0* a1){ rT7append((T7*)oRBC46explanation,a1); /*[IRF3:print_as_fatal_error*/rT46do_print((T0 *)ms4_46); rT46die_with_code(1); /*]*/ /*[IRF3:crash*/rsp(); rT46die_with_code(1); /*]*/ }/*ERROR_HANDLER*/void rT46error(T46 *C,T0* a1){ rT46append(a1); rT46print_as_error(C); }/*ERROR_HANDLER*/void rT46incr_nb_errors(T46 *C){ C->_nb_errors=((C)->_nb_errors)+(1); /*IF*/if (((C)->_nb_errors)>=(10)) { rT38put_string((T38*)oRBC1std_error,(T0 *)ms109_27); rT38put_string((T38*)oRBC1std_error,(T0 *)ms5_46); rT38put_integer((T38*)oRBC1std_error,10); rT38put_string((T38*)oRBC1std_error,(T0 *)ms6_46); rT46die_with_code(1); } /*FI*/}/*ERROR_HANDLER*/void rT46incr_nb_warnings(T46 *C){ C->_nb_warnings=((C)->_nb_warnings)+(1); }/*ERROR_HANDLER*/void rT46print_as_warning(T46 *C){ rT46do_print((T0 *)ms2_46); rT46incr_nb_warnings(C); }/*ERROR_HANDLER*/void rT46print_as_error(T46 *C){ rT46do_print((T0 *)ms3_46); rT46incr_nb_errors(C); }T0*oRBC46positions; T0*oRBC1std_error; /*ERROR_HANDLER*/void rT46do_print(/*C*/T0* a1){ char _previous_cc=0; char _cc=0; int _cpt=0; int _i=0; rT38put_string((T38*)oRBC1std_error,(T0 *)ms109_27); rT38put_string((T38*)oRBC1std_error,a1); rT38put_string((T38*)oRBC1std_error,(T0 *)ms7_46); _i=1; _cpt=(9)+(((T7*)a1)->_count); while (!((_i)>(((T7*)oRBC46explanation)->_count))) { _previous_cc=_cc; _cc=rT7item((T7*)oRBC46explanation,_i); _i=(_i)+(1); /*IF*/if ((_cpt)>(60)) { /*IF*/if ((_cc)==('\40')) { rT38put_character((T38*)oRBC1std_error,'\12'); _cpt=0; } else if (((_previous_cc)==('\54'))||((_previous_cc)==('\57'))) { rT38put_character((T38*)oRBC1std_error,'\12'); rT38put_character((T38*)oRBC1std_error,_cc); _cpt=1; } else { rT38put_character((T38*)oRBC1std_error,_cc); _cpt=(_cpt)+(1); } /*FI*/} else { rT38put_character((T38*)oRBC1std_error,_cc); _cpt=(_cpt)+(1); } /*FI*/} rT38put_character((T38*)oRBC1std_error,'\12'); _i=((T48*)oRBC46positions)->_lower; while (!((_i)>(((T48*)oRBC46positions)->_upper))) { rT47show((T47*)rT48item((T48*)oRBC46positions,_i)); _i=(_i)+(1); } /*[IRF3:cancel*//*[IRF3:clear*//*AW*/((T7*)oRBC46explanation)->_count=(0);/*]*/ rT48clear((T48*)oRBC46positions); /*]*/ rT38put_string((T38*)oRBC1std_error,(T0 *)ms8_46); }/*ERROR_HANDLER*/void rT46append(/*C*/T0* a1){ rT7append((T7*)oRBC46explanation,a1); }/*ERROR_HANDLER*/void rT46add_position(/*C*/T0* a1){ /*IF*/if (((int)a1)) { /*IF*/if (!(rT48has((T48*)oRBC46positions,a1))) { rT48add_last((T48*)oRBC46positions,a1); } /*FI*/} /*FI*/}T0*oRBC46explanation; /*ERROR_HANDLER*/void rT46add_type(/*C*/T0* a1,T0* a2){ rT46append((T0 *)ms1_46); /*IF*/if (XrT60is_run_type(a1)) { rT46append(XrT60run_time_mark(a1)); } else { rT46append(XrT60written_mark(a1)); } /*FI*/rT46append(a2); rT46add_position(XrT60start_position(a1)); }/*CST_ATT_UNIQUE*/T0* rT146first_name(T146 *C){ T0* R=NULL; R=rT128item((T128*)(C)->_names,1); return R; } /*CST_ATT_UNIQUE*/void rT146pretty_print_one_name(/*C*/T0* a1){ /*IF*/if (/*XrT*FEATURE_NAME*/((T68*)a1)->_is_frozen) { rT267keyword((T267*)oRBC27fmt,(T0 *)ms11_64); } /*FI*/XrT69pretty_print(a1); }/*CST_ATT_UNIQUE*/void rT146pretty_print_names(T146 *C){ int _i=0; _i=1; rT146pretty_print_one_name(rT128item((T128*)(C)->_names,_i)); _i=(_i)+(1); while (!((_i)>(rT128count((T128*)(C)->_names)))) { rT267put_string((T267*)oRBC27fmt,(T0 *)ms10_64); rT146pretty_print_one_name(rT128item((T128*)(C)->_names,_i)); _i=(_i)+(1); } }/*CST_ATT_UNIQUE*/void rT146pretty_print_profile(T146 *C){ rT146pretty_print_names(C); /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(2);/*]*/ /*[IRF3:pretty_print_arguments*//*]*/ /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(3);/*]*/ /*IF*/if (((int)(C)->_result_type)) { rT267put_string((T267*)oRBC27fmt,(T0 *)ms9_64); XrT60pretty_print((C)->_result_type); } /*FI*/}/*CST_ATT_UNIQUE*/void rT146pretty_print(T146 *C){ rT146pretty_print_profile(C); /*[IRF3:pretty_tail*/rT267put_string((T267*)oRBC27fmt,(T0 *)ms1_146); /*]*/ rT267put_character((T267*)oRBC27fmt,'\73'); /*IF*/if (((int)(C)->_header_comment)) { /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(2);/*]*/ rT267indent((T267*)oRBC27fmt); /*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(1);/*]*/ rT61pretty_print((T61*)(C)->_header_comment); } /*FI*/}/*CST_ATT_UNIQUE*/void rT146add_into(T146 *C,T0* a1){ T0* _fn=NULL; int _i=0; C->_base_class=rT47base_class((T47*)/*XrT*FEATURE_NAME*/((T68*)rT128item((T128*)(C)->_names,1))->_start_position); _i=1; while (!((_i)>(rT128count((T128*)(C)->_names)))) { _fn=rT128item((T128*)(C)->_names,_i); /*IF*/if (rT63has((T63*)a1,XrT69to_key(_fn))) { _fn=XrT64first_name(rT63at((T63*)a1,XrT69to_key(_fn))); rT46add_position(/*XrT*FEATURE_NAME*/((T68*)_fn)->_start_position); rT46add_position(/*XrT*FEATURE_NAME*/((T68*)rT128item((T128*)(C)->_names,_i))->_start_position); rT46error((T46*)oRBC27eh,(T0 *)ms12_64); rT46append(/*XrT*FEATURE_NAME*/((T68*)_fn)->_to_string); rT46error((T46*)oRBC27eh,(T0 *)ms102_27); } else { rT63put((T63*)a1,(T0 *)C,XrT69to_key(_fn)); } /*FI*/_i=(_i)+(1); } }T0*oRBC27small_eiffel; /*CST_ATT_UNIQUE*/void rT146make_e_feature(T146 *C,T0* a1,T0* a2){ C->_names=a1; C->_result_type=a2; }/*CST_ATT_UNIQUE*/void rT146make(T146 *C,T0* a1,T0* a2){ T0* _ic=NULL; int _i=0; rT146make_e_feature(C,a1,a2); {T149 *n=((T149*)se_new(149)); rT149make(n,1,rT128count((T128*)(C)->_names)); C->_values=(T0 *)n;} _i=1; while (!((_i)>(((T149*)(C)->_values)->_upper))) { {T82 *n=((T82*)se_new(82)); rT82make(n,rT53next_unique((T53*)oRBC27small_eiffel),NULL); _ic=(T0 *)n;} rT149put((T149*)(C)->_values,_ic,_i); _i=(_i)+(1); } }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.