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

This is pretty15.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"
/*DECLARATION_GROUP*/int rT142count(T142 *C){
int R=0;
R=/*XrT*ARRAY[LOCAL_ARGUMENT]*/((T97*)(C)->_name_list)->_upper;
return R;
}
/*DECLARATION_GROUP*/void rT142pretty_print(T142 *C){
int _i=0;
_i=/*XrT*ARRAY[LOCAL_ARGUMENT]*/((T97*)(C)->_name_list)->_lower;
XrT91pretty_print(/*XrT*ARRAY[LOCAL_ARGUMENT]*/rT97item((T97*)(C)->_name_list,_i));
_i=(_i)+(1);
while (!((_i)>(/*XrT*ARRAY[LOCAL_ARGUMENT]*/((T97*)(C)->_name_list)->_upper))) {
rT267put_string((T267*)oRBC27fmt,(T0 *)ms1_142);
XrT91pretty_print(/*XrT*ARRAY[LOCAL_ARGUMENT]*/rT97item((T97*)(C)->_name_list,_i));
_i=(_i)+(1);
}
rT267put_string((T267*)oRBC27fmt,(T0 *)ms2_142);
XrT60pretty_print(/*XrT*LOCAL_ARGUMENT*/((T90*)/*XrT*ARRAY[LOCAL_ARGUMENT]*/rT97item((T97*)(C)->_name_list,1))->_result_type);
}/*DECLARATION_GROUP*/void rT142append_in(T142 *C,T0* a1){
int _i=0;
_i=/*XrT*ARRAY[LOCAL_ARGUMENT]*/((T97*)(C)->_name_list)->_lower;
while (!((_i)>(/*XrT*ARRAY[LOCAL_ARGUMENT]*/((T97*)(C)->_name_list)->_upper))) {
XrT96add_last(a1,/*XrT*ARRAY[LOCAL_ARGUMENT]*/rT97item((T97*)(C)->_name_list,_i));
_i=(_i)+(1);
}
}/*DECLARATION_GROUP*/void rT142make(T142 *C,T0* a1,T0* a2){
int _i=0;
C->_name_list=a1;
_i=/*XrT*ARRAY[LOCAL_ARGUMENT]*/((T97*)(C)->_name_list)->_upper;
while (!((_i)==(0))) {
/*XrT*LOCAL_ARGUMENT*//*[IRF3:set_result_type*//*AW*/((T90*)/*XrT*ARRAY[LOCAL_ARGUMENT]*/rT97item((T97*)(C)->_name_list,_i))->_result_type=(a2);/*]*/
_i=(_i)-(1);
}
}/*DECLARATION_1*/void rT144pretty_print(T144 *C){
XrT91pretty_print((C)->_name);
rT267put_string((T267*)oRBC27fmt,(T0 *)ms1_144);
XrT60pretty_print(/*XrT*LOCAL_ARGUMENT*/((T90*)(C)->_name)->_result_type);
}/*DECLARATION_1*/void rT144append_in(T144 *C,T0* a1){
XrT96add_last(a1,(C)->_name);
}/*DECLARATION_1*/void rT144make(T144 *C,T0* a1,T0* a2){
C->_name=a1;
/*XrT*LOCAL_ARGUMENT*//*[IRF3:set_result_type*//*AW*/((T90*)(C)->_name)->_result_type=(a2);/*]*/
}/*CHECK_INVARIANT*/void rT220pretty_print(T220 *C){
int _i=0;
rT267indent((T267*)oRBC27fmt);
rT267keyword((T267*)oRBC27fmt,/*(IRF4*/(T0 *)ms110_27/*)*/);
rT267level_incr((T267*)oRBC27fmt);
/*IF*/if (((int)(C)->_header_comment)) {
rT61pretty_print((T61*)(C)->_header_comment);
}
else {
rT267indent((T267*)oRBC27fmt);
}
/*FI*//*IF*/if (((int)(C)->_list)) {
_i=1;
while (!((_i)>(((T160*)(C)->_list)->_upper))) {
/*IF*/if (((((T267*)oRBC27fmt)->_zen_mode)&&((_i)==(((T160*)(C)->_list)->_upper)))) {
/*[IRF3:set_semi_colon_flag*//*AW*/((T267*)oRBC27fmt)->_semi_colon_flag=(0);/*]*/
}
else {
/*[IRF3:set_semi_colon_flag*//*AW*/((T267*)oRBC27fmt)->_semi_colon_flag=(1);/*]*/
}
/*FI*/rT267indent((T267*)oRBC27fmt);
rT66pretty_print((T66*)rT160item((T160*)(C)->_list,_i));
_i=(_i)+(1);
}
}
/*FI*/rT267level_decr((T267*)oRBC27fmt);
rT267indent((T267*)oRBC27fmt);
}/*CHECK_INVARIANT*/void rT220make(T220 *C,T0* a1,T0* a2,T0* a3){
C->_start_position=a1;
C->_header_comment=a2;
C->_list=a3;
}/*EIFFEL_RUN_CONTROL*/int rT266all_check(T266 *C){
int R=0;
R=((C)->_level)>=(0);
return R;
}
/*CHARACTER_CONSTANT*/void rT77bracketed_print(T77 *C){
rT267put_character((T267*)oRBC27fmt,'\50');
rT77pretty_print(C);
rT267put_character((T267*)oRBC27fmt,'\51');
}/*CHARACTER_CONSTANT*/T0* rT77to_string(T77 *C){
T0* R=NULL;
{T7 *n=((T7*)se_new(7));
rT7make(n,0);
R=(T0 *)n;}
rT7extend((T7*)R,'\47');
{int iv1=(C)->_pretty_print_mode;
if (0 == iv1) goto l2;
goto l3;
 l2: ;
rT7extend((T7*)R,(C)->_value);
goto l1;
 l3: ;
if (1 == iv1) goto l4;
goto l5;
 l4: ;
rT77character_coding((C)->_value,R);
goto l1;
 l5: ;
if (2 == iv1) goto l6;
goto l7;
 l6: ;
rT7extend((T7*)R,'\45');
rT7extend((T7*)R,'\57');
rT2append_in(((unsigned char)(C)->_value),R);
rT7extend((T7*)R,'\57');
goto l1;
 l7: ;
 l1: ;
}
rT7extend((T7*)R,'\47');
return R;
}
/*CHARACTER_CONSTANT*/T0* rT77add_comment(T77 *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;
}
/*CHARACTER_CONSTANT*/void rT77print_as_target(T77 *C){
rT77bracketed_print(C);
rT267put_character((T267*)oRBC27fmt,'\56');
}/*CHARACTER_CONSTANT*/void rT77pretty_print(T77 *C){
rT267put_string((T267*)oRBC27fmt,rT77to_string(C));
}/*CHARACTER_CONSTANT*/void rT77make(T77 *C,T0* a1,char a2,int a3){
C->_start_position=a1;
C->_value=a2;
/*[IRF3:set_pretty_print_mode*//*AW*/(C)->_pretty_print_mode=(a3);/*]*/
}/*CHARACTER_CONSTANT*/void rT77character_coding(/*C*/char a1,T0* a2){
char _special=0;
{int iv1=a1;
if (64 == iv1) goto l9;
goto l10;
 l9: ;
_special='A';
goto l8;
 l10: ;
if (8 == iv1) goto l11;
goto l12;
 l11: ;
_special='B';
goto l8;
 l12: ;
if (94 == iv1) goto l13;
goto l14;
 l13: ;
_special='C';
goto l8;
 l14: ;
if (36 == iv1) goto l15;
goto l16;
 l15: ;
_special='D';
goto l8;
 l16: ;
if (12 == iv1) goto l17;
goto l18;
 l17: ;
_special='F';
goto l8;
 l18: ;
if (92 == iv1) goto l19;
goto l20;
 l19: ;
_special='H';
goto l8;
 l20: ;
if (126 == iv1) goto l21;
goto l22;
 l21: ;
_special='L';
goto l8;
 l22: ;
if (10 == iv1) goto l23;
goto l24;
 l23: ;
_special='N';
goto l8;
 l24: ;
if (96 == iv1) goto l25;
goto l26;
 l25: ;
_special='Q';
goto l8;
 l26: ;
if (13 == iv1) goto l27;
goto l28;
 l27: ;
_special='R';
goto l8;
 l28: ;
if (35 == iv1) goto l29;
goto l30;
 l29: ;
_special='S';
goto l8;
 l30: ;
if (9 == iv1) goto l31;
goto l32;
 l31: ;
_special='T';
goto l8;
 l32: ;
if (0 == iv1) goto l33;
goto l34;
 l33: ;
_special='U';
goto l8;
 l34: ;
if (124 == iv1) goto l35;
goto l36;
 l35: ;
_special='V';
goto l8;
 l36: ;
if (37 == iv1) goto l37;
goto l38;
 l37: ;
_special='\45';
goto l8;
 l38: ;
if (39 == iv1) goto l39;
goto l40;
 l39: ;
_special='\47';
goto l8;
 l40: ;
if (34 == iv1) goto l41;
goto l42;
 l41: ;
_special='\42';
goto l8;
 l42: ;
if (91 == iv1) goto l43;
goto l44;
 l43: ;
_special='\50';
goto l8;
 l44: ;
if (93 == iv1) goto l45;
goto l46;
 l45: ;
_special='\51';
goto l8;
 l46: ;
if (123 == iv1) goto l47;
goto l48;
 l47: ;
_special='\74';
goto l8;
 l48: ;
if (125 == iv1) goto l49;
goto l50;
 l49: ;
_special='\76';
goto l8;
 l50: ;
 l8: ;
}
rT7extend((T7*)a2,'\45');
/*IF*/if ((_special)==('\0')) {
rT7extend((T7*)a2,'\57');
rT2append_in(((unsigned char)a1),a2);
rT7extend((T7*)a2,'\57');
}
else {
rT7extend((T7*)a2,_special);
}
/*FI*/}

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