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

This is pretty21.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"
/*FIXED_ARRAY[STRING]*/void rT34clear_all(T34 *C){
T0* _value=NULL;
rT34set_all_with(C,_value);
}/*FIXED_ARRAY[STRING]*/void rT34set_all_with(T34 *C,T0* a1){
int _i=0;
_i=(C)->_upper;
while (!((_i)<(0))) {
rT34put(C,a1,_i);
_i=(_i)-(1);
}
}/*FIXED_ARRAY[STRING]*/T0* rT34item(T34 *C,int a1){
T0* R=NULL;
R=(((T0**)(C->_storage))[a1]);
return R;
}
/*FIXED_ARRAY[STRING]*/T0** rT34realloc(/*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;
}
/*FIXED_ARRAY[STRING]*/T0** rT34malloc(/*C*/int a1){
T0** R=0;
T37 _mem={0/*dummy*/};
T0* _x=NULL;
/*IF*//*AF*//*AE*/
R=malloc((a1)*(sizeof(char *)));
/*FI*/return R;
}
/*FIXED_ARRAY[STRING]*/void rT34put(T34 *C,T0* a1,int a2){
((T0**)(C->_storage))[a2]=a1;
}
/*FIXED_ARRAY[STRING]*/void rT34make(T34 *C,int a1){
/*IF*/if (((int)(C)->_storage)) {
C->_storage=rT34realloc((C)->_storage,a1);
}
else {
C->_storage=rT34malloc(a1);
}
/*FI*/C->_upper=(a1)-(1);
rT34clear_all(C);
}/*COMMENT*/void rT61warning(/*C*/T0* a1,T0* a2){
rT46add_position(a1);
rT46warning((T46*)oRBC27eh,a2);
}/*COMMENT*/void rT61good_end(T61 *C,T0* a1){
/*IF*/if (!(rT7has_string((T7*)rT45item((T45*)(C)->_list,1),((T49*)a1)->_to_string))) {
rT46add_position(((T49*)a1)->_start_position);
rT61warning((C)->_start_position,(T0 *)ms2_61);
}
/*FI*/}/*COMMENT*/int rT61count(T61 *C){
int R=0;
R=rT45count((T45*)(C)->_list);
return R;
}
/*COMMENT*/int rT61dummy(T61 *C){
int R=0;
T0* _str=NULL;
/*IF*/if ((rT45count((T45*)(C)->_list))==(1)) {
_str=rT45first((T45*)(C)->_list);
R=(((T7*)_str)->_count)<(10);
}
/*FI*/return R;
}
/*COMMENT*/void rT61pretty_print(T61 *C){
int _column=0;
int _i=0;
/*IF*/if ((((((T267*)oRBC27fmt)->_column)>(1))&&((((T267*)oRBC27fmt)->_last_character)!=('\40')))) {
rT267put_character((T267*)oRBC27fmt,'\40');
}
/*FI*/_column=((T267*)oRBC27fmt)->_column;
_i=((T45*)(C)->_list)->_lower;
while (!((_i)>(((T45*)(C)->_list)->_upper))) {
rT267put_string((T267*)oRBC27fmt,(T0 *)ms1_61);
rT267put_string((T267*)oRBC27fmt,rT45item((T45*)(C)->_list,_i));
_i=(_i)+(1);
/*IF*/if ((_i)<=(((T45*)(C)->_list)->_upper)) {
rT267put_character((T267*)oRBC27fmt,'\12');
while (!((((T267*)oRBC27fmt)->_column)==(_column))) {
rT267put_character((T267*)oRBC27fmt,'\40');
}
}
/*FI*/}
rT267put_character((T267*)oRBC27fmt,'\12');
rT267indent((T267*)oRBC27fmt);
}/*COMMENT*/void rT61append(T61 *C,T0* a1){
int _i=0;
_i=1;
while (!((_i)>(((T45*)((T61*)a1)->_list)->_upper))) {
rT61add_last(C,rT45item((T45*)((T61*)a1)->_list,_i));
_i=(_i)+(1);
}
}/*COMMENT*/void rT61add_last(T61 *C,T0* a1){
rT45add_last((T45*)(C)->_list,a1);
}/*COMMENT*/void rT61make(T61 *C,T0* a1,T0* a2){
C->_start_position=a1;
C->_list=a2;
}/*BOOLEAN*/int rT6_ix111114(T6 C,int a1){
int R=0;
R=(C)||(a1);
return R;
}
/*BOOLEAN*/int rT6_ix97110100(T6 C,int a1){
int R=0;
R=(C)&&(a1);
return R;
}
/*BOOLEAN*/int rT6_px110111116(T6 C){
int R=0;
/*IF*/if (C) {
}
else {
R=1;
}
/*FI*/return R;
}
/*RENAME_PAIR*/void rT119pretty_print(T119 *C){
XrT69pretty_print((C)->_old_name);
rT267keyword((T267*)oRBC27fmt,(T0 *)ms1_119);
XrT69pretty_print((C)->_new_name);
}/*RENAME_PAIR*/void rT119make(T119 *C,T0* a1,T0* a2){
C->_old_name=a1;
C->_new_name=a2;
}/*RENAME_LIST*/void rT120fatal_error(/*C*/T0* a1){
rT46fatal_error(a1);
}/*RENAME_LIST*/void rT120pretty_print(T120 *C){
int _i=0;
int _icount=0;
/*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(2);/*]*/
rT267indent((T267*)oRBC27fmt);
rT267keyword((T267*)oRBC27fmt,(T0 *)ms1_120);
_i=1;
while (!((_i)>(((T121*)(C)->_list)->_upper))) {
rT119pretty_print((T119*)rT121item((T121*)(C)->_list,_i));
_i=(_i)+(1);
_icount=(_icount)+(1);
/*IF*/if ((_i)<=(((T121*)(C)->_list)->_upper)) {
rT267put_string((T267*)oRBC27fmt,(T0 *)ms2_120);
/*IF*/if ((_icount)>(3)) {
_icount=0;
/*[IRF3:set_indent_level*//*AW*/((T267*)oRBC27fmt)->_indent_level=(3);/*]*/
rT267indent((T267*)oRBC27fmt);
}
/*FI*/}
/*FI*/}
}/*RENAME_LIST*/void rT120get_started(T120 *C,T0* a1){
T0* _rp=NULL;
int _i=0;
_i=((T121*)(C)->_list)->_upper;
while (!((_i)==(0))) {
_rp=rT121item((T121*)(C)->_list,_i);
/*IF*/if (!(rT51has((T51*)a1,((T119*)_rp)->_old_name))) {
rT46add_position(/*XrT*FEATURE_NAME*/((T68*)((T119*)_rp)->_old_name)->_start_position);
rT120fatal_error((T0 *)ms3_120);
}
/*FI*/_i=(_i)-(1);
}
}/*RENAME_LIST*/void rT120add_last(T120 *C,T0* a1){
rT121add_last((T121*)(C)->_list,a1);
}/*RENAME_LIST*/T0* rT120to_new_name(T120 *C,T0* a1){
T0* R=NULL;
int _i=0;
_i=1;
while (!((((int)R))||((_i)>(((T121*)(C)->_list)->_upper)))) {
/*IF*/if (XrT69same_as(((T119*)rT121item((T121*)(C)->_list,_i))->_old_name,a1)) {
R=((T119*)rT121item((T121*)(C)->_list,_i))->_new_name;
}
/*FI*/_i=(_i)+(1);
}
/*IF*/if (!(R)) {
R=a1;
}
/*FI*/return R;
}
/*RENAME_LIST*/T0* rT120to_old_name(T120 *C,T0* a1){
T0* R=NULL;
int _i=0;
_i=1;
while (!((((int)R))||((_i)>(((T121*)(C)->_list)->_upper)))) {
/*IF*/if (XrT69same_as(((T119*)rT121item((T121*)(C)->_list,_i))->_new_name,a1)) {
R=((T119*)rT121item((T121*)(C)->_list,_i))->_old_name;
}
/*FI*/_i=(_i)+(1);
}
/*IF*/if (!(R)) {
R=a1;
}
/*FI*/return R;
}

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