home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / source.lha / bin_c / pretty8.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  18.2 KB  |  673 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "pretty.h"
  9. /*No:FIXED_ARRAY[RUN_FEATURE_5].storage*/
  10. /*No:FIXED_ARRAY[RUN_FEATURE_5].capacity*/
  11. void r185with_capacity(T185* C,int a1){
  12. /*IF*/if (((((T185*)C))->_capacity/*4*/)<(a1)) {
  13. C->_storage=calloc(a1,sizeof(T0*));
  14. C->_capacity=a1;
  15. }
  16. /*FI*/C->_upper=-(1);
  17. }
  18. /*No:FIXED_ARRAY[RUN_FEATURE_5].put*/
  19. /*No:FIXED_ARRAY[RUN_FEATURE_5].upper*/
  20. void r185add_last(T185* C,T0* a1){
  21. int _new_capacity=0;
  22. /*IF*/if ((((((T185*)C))->_upper/*8*/)+(1))<=(((((T185*)C))->_capacity/*4*/)-(1))) {
  23. C->_upper=((((T185*)C))->_upper/*8*/)+(1);
  24. }
  25.  else if (((((T185*)C))->_capacity/*4*/)==(0)) {
  26. C->_storage=calloc(2,sizeof(T0*));
  27. C->_capacity=2;
  28. C->_upper=0;
  29. }
  30. else {
  31. _new_capacity=(2)*((((T185*)C))->_capacity/*4*/);
  32. C->_storage=r654realloc((((T185*)C))->_storage/*0*/,(((T185*)C))->_capacity/*4*/,_new_capacity);
  33. C->_capacity=_new_capacity;
  34. C->_upper=((((T185*)C))->_upper/*8*/)+(1);
  35. }
  36. /*FI*//*[IRF3.5put*/((((T185*)C))->_storage/*0*/)[(((T185*)C))->_upper/*8*/]=(a1);
  37. /*]*/
  38. }
  39. T0* r96item(T96* C,int a1){
  40. T0* R=NULL;
  41. R=((((T96*)C))->_storage/*4*/)[(a1)-((((T96*)C))->_lower/*16*/)];
  42. return R;
  43. }
  44. /*No:ARRAY[EXPRESSION].storage*/
  45. T0* r96twin(T96* C){
  46. T0* R=NULL;
  47. R=malloc(sizeof(*C));
  48. *((T96*)R)=M96;
  49. r96copy(((T96*)R),((T0*)C));
  50. return R;
  51. }
  52. /*No:ARRAY[EXPRESSION].capacity*/
  53. void r96copy(T96* C,T0* a1){
  54. int _needed_capacity=0;
  55. C->_lower=/*X96*/((int)(((T96*)((T96*)a1)))->_lower/*16*/);
  56. C->_upper=/*X96*/((int)(((T96*)((T96*)a1)))->_upper/*12*/);
  57. _needed_capacity=(((((T96*)C))->_upper/*12*/)-((((T96*)C))->_lower/*16*/))+(1);
  58. /*IF*/if (((((T96*)C))->_capacity/*8*/)<(_needed_capacity)) {
  59. C->_capacity=_needed_capacity;
  60. C->_storage=calloc((((T96*)C))->_capacity/*8*/,sizeof(T0*));
  61. }
  62. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  63. r500copy_from((((T96*)C))->_storage/*4*/,/*X96*/((T500)(((T96*)((T96*)a1)))->_storage/*4*/),(_needed_capacity)-(1));
  64. }
  65. /*FI*/}
  66. /*No:ARRAY[EXPRESSION].lower*/
  67. /*No:ARRAY[EXPRESSION].put*/
  68. /*No:ARRAY[EXPRESSION].upper*/
  69. int r96count(T96* C){
  70. int R=0;
  71. R=(((((T96*)C))->_upper/*12*/)-((((T96*)C))->_lower/*16*/))+(1);
  72. return R;
  73. }
  74. void r96add_last(T96* C,T0* a1){
  75. int _new_capacity=0;
  76. /*IF*/if (((((T96*)C))->_capacity/*8*/)<((r96count(C))+(1))) {
  77. /*IF*/if (((((T96*)C))->_capacity/*8*/)==(0)) {
  78. C->_capacity=16;
  79. C->_storage=calloc((((T96*)C))->_capacity/*8*/,sizeof(T0*));
  80. }
  81. else {
  82. _new_capacity=(2)*((((T96*)C))->_capacity/*8*/);
  83. C->_storage=r500realloc((((T96*)C))->_storage/*4*/,(((T96*)C))->_capacity/*8*/,_new_capacity);
  84. C->_capacity=_new_capacity;
  85. }
  86. /*FI*/}
  87. /*FI*/C->_upper=((((T96*)C))->_upper/*12*/)+(1);
  88. /*[IRF3.6put*/{T96* C1=C;
  89. T0* b1=a1;
  90. int b2=(((T96*)C))->_upper/*12*/;
  91. ((((T96*)C1))->_storage/*4*/)[(b2)-((((T96*)C1))->_lower/*16*/)]=(b1);
  92. }/*]*/
  93. }
  94. T0* r96first(T96* C){
  95. T0* R=NULL;
  96. R=r96item(C,(((T96*)C))->_lower/*16*/);
  97. return R;
  98. }
  99. T0* r681item(T681* C,int a1){
  100. T0* R=NULL;
  101. R=((((T681*)C))->_storage/*0*/)[(a1)-((((T681*)C))->_lower/*12*/)];
  102. return R;
  103. }
  104. /*No:ARRAY[FORMAL_GENERIC_ARG].storage*/
  105. /*No:ARRAY[FORMAL_GENERIC_ARG].capacity*/
  106. /*No:ARRAY[FORMAL_GENERIC_ARG].lower*/
  107. /*No:ARRAY[FORMAL_GENERIC_ARG].put*/
  108. /*No:ARRAY[FORMAL_GENERIC_ARG].upper*/
  109. int r681count(T681* C){
  110. int R=0;
  111. R=(((((T681*)C))->_upper/*8*/)-((((T681*)C))->_lower/*12*/))+(1);
  112. return R;
  113. }
  114. void r681add_last(T681* C,T0* a1){
  115. int _new_capacity=0;
  116. /*IF*/if (((((T681*)C))->_capacity/*4*/)<((r681count(C))+(1))) {
  117. /*IF*/if (((((T681*)C))->_capacity/*4*/)==(0)) {
  118. C->_capacity=16;
  119. C->_storage=calloc((((T681*)C))->_capacity/*4*/,sizeof(T0*));
  120. }
  121. else {
  122. _new_capacity=(2)*((((T681*)C))->_capacity/*4*/);
  123. C->_storage=r973realloc((((T681*)C))->_storage/*0*/,(((T681*)C))->_capacity/*4*/,_new_capacity);
  124. C->_capacity=_new_capacity;
  125. }
  126. /*FI*/}
  127. /*FI*/C->_upper=((((T681*)C))->_upper/*8*/)+(1);
  128. /*[IRF3.6put*/{T681* C1=C;
  129. T0* b1=a1;
  130. int b2=(((T681*)C))->_upper/*8*/;
  131. ((((T681*)C1))->_storage/*0*/)[(b2)-((((T681*)C1))->_lower/*12*/)]=(b1);
  132. }/*]*/
  133. }
  134. /*No:ARRAY[STRING].clear_all*/
  135. /*No:ARRAY[STRING].set_all_with*/
  136. int r52empty(T52* C){
  137. int R=0;
  138. R=(r52count(C))==(0);
  139. return R;
  140. }
  141. void r52make(T52* C,int a1,int a2){
  142. int _needed=0;
  143. C->_lower=a1;
  144. C->_upper=a2;
  145. _needed=((a2)-(a1))+(1);
  146. /*IF*/if ((_needed)>(0)) {
  147. /*IF*/if (((((T52*)C))->_capacity/*4*/)<(_needed)) {
  148. /*IF*/if (((((T52*)C))->_capacity/*4*/)==(0)) {
  149. C->_storage=calloc(_needed,sizeof(T0*));
  150. }
  151. else {
  152. C->_storage=calloc(_needed,sizeof(T0*));
  153. }
  154. /*FI*/C->_capacity=_needed;
  155. }
  156. else {
  157. /*[IRF3.6clear_all*/{T52* C1=C;
  158. T0* __value=NULL;
  159. /*[IRF3.6set_all_with*/{T52* C2=C1;
  160. T0* c1=__value;
  161. r400set_all_with((((T52*)C2))->_storage/*0*/,c1,((((T52*)C2))->_upper/*8*/)-((((T52*)C2))->_lower/*12*/));
  162. }/*]*/
  163. }/*]*/
  164. }
  165. /*FI*/}
  166. /*FI*/}
  167. int r52fast_has(T52* C,T0* a1){
  168. int R=0;
  169. /*IF*/if ((r52count(C))>(0)) {
  170. R=(r52fast_index_of(C,a1))<=((((T52*)C))->_upper/*8*/);
  171. }
  172. /*FI*/return R;
  173. }
  174. T0* r52item(T52* C,int a1){
  175. T0* R=NULL;
  176. R=((((T52*)C))->_storage/*0*/)[(a1)-((((T52*)C))->_lower/*12*/)];
  177. return R;
  178. }
  179. void r52resize(T52* C,int a1,int a2){
  180. int _mem=0;
  181. int _up=0;
  182. int _i=0;
  183. T0* _other=NULL;
  184. {T52*n=malloc(sizeof(*n));
  185. *n=M52;
  186. r52make(n,a1,a2);
  187. _other=(T0*)n;
  188. }
  189. _i=r2max((((T52*)C))->_lower/*12*/,(((T52*)((T52*)_other)))->_lower/*12*/);
  190. _up=r2min((((T52*)C))->_upper/*8*/,(((T52*)((T52*)_other)))->_upper/*8*/);
  191. while (!((_i)>(_up))) {
  192. /*[IRF3.6put*/{T52* C1=((T52*)_other);
  193. T0* b1=r52item(C,_i);
  194. int b2=_i;
  195. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  196. }/*]*/
  197. _i=(_i)+(1);
  198. }
  199. *((T52*)(C))=*((T52*)(_other));
  200. }
  201. void r52clear(T52* C){
  202. C->_upper=((((T52*)C))->_lower/*12*/)-(1);
  203. }
  204. /*No:ARRAY[STRING].storage*/
  205. /*No:ARRAY[STRING].capacity*/
  206. /*No:ARRAY[STRING].lower*/
  207. int r52fast_index_of(T52* C,T0* a1){
  208. int R=0;
  209. R=((((T52*)C))->_lower/*12*/)+(r400fast_index_of((((T52*)C))->_storage/*0*/,a1,((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/)));
  210. return R;
  211. }
  212. /*No:ARRAY[STRING].put*/
  213. /*No:ARRAY[STRING].upper*/
  214. int r52count(T52* C){
  215. int R=0;
  216. R=(((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/))+(1);
  217. return R;
  218. }
  219. void r52add_last(T52* C,T0* a1){
  220. int _new_capacity=0;
  221. /*IF*/if (((((T52*)C))->_capacity/*4*/)<((r52count(C))+(1))) {
  222. /*IF*/if (((((T52*)C))->_capacity/*4*/)==(0)) {
  223. C->_capacity=16;
  224. C->_storage=calloc((((T52*)C))->_capacity/*4*/,sizeof(T0*));
  225. }
  226. else {
  227. _new_capacity=(2)*((((T52*)C))->_capacity/*4*/);
  228. C->_storage=r400realloc((((T52*)C))->_storage/*0*/,(((T52*)C))->_capacity/*4*/,_new_capacity);
  229. C->_capacity=_new_capacity;
  230. }
  231. /*FI*/}
  232. /*FI*/C->_upper=((((T52*)C))->_upper/*8*/)+(1);
  233. /*[IRF3.6put*/{T52* C1=C;
  234. T0* b1=a1;
  235. int b2=(((T52*)C))->_upper/*8*/;
  236. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  237. }/*]*/
  238. }
  239. T0* r52first(T52* C){
  240. T0* R=NULL;
  241. R=r52item(C,(((T52*)C))->_lower/*12*/);
  242. return R;
  243. }
  244. int r52index_of(T52* C,T0* a1){
  245. int R=0;
  246. R=((((T52*)C))->_lower/*12*/)+(r400index_of((((T52*)C))->_storage/*0*/,a1,((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/)));
  247. return R;
  248. }
  249. /*No:FIXED_ARRAY[RUN_FEATURE_6].storage*/
  250. /*No:FIXED_ARRAY[RUN_FEATURE_6].capacity*/
  251. void r222with_capacity(T222* C,int a1){
  252. /*IF*/if (((((T222*)C))->_capacity/*4*/)<(a1)) {
  253. C->_storage=calloc(a1,sizeof(T0*));
  254. C->_capacity=a1;
  255. }
  256. /*FI*/C->_upper=-(1);
  257. }
  258. /*No:FIXED_ARRAY[RUN_FEATURE_6].put*/
  259. /*No:FIXED_ARRAY[RUN_FEATURE_6].upper*/
  260. void r222add_last(T222* C,T0* a1){
  261. int _new_capacity=0;
  262. /*IF*/if ((((((T222*)C))->_upper/*8*/)+(1))<=(((((T222*)C))->_capacity/*4*/)-(1))) {
  263. C->_upper=((((T222*)C))->_upper/*8*/)+(1);
  264. }
  265.  else if (((((T222*)C))->_capacity/*4*/)==(0)) {
  266. C->_storage=calloc(2,sizeof(T0*));
  267. C->_capacity=2;
  268. C->_upper=0;
  269. }
  270. else {
  271. _new_capacity=(2)*((((T222*)C))->_capacity/*4*/);
  272. C->_storage=r692realloc((((T222*)C))->_storage/*0*/,(((T222*)C))->_capacity/*4*/,_new_capacity);
  273. C->_capacity=_new_capacity;
  274. C->_upper=((((T222*)C))->_upper/*8*/)+(1);
  275. }
  276. /*FI*//*[IRF3.5put*/((((T222*)C))->_storage/*0*/)[(((T222*)C))->_upper/*8*/]=(a1);
  277. /*]*/
  278. }
  279. int r907fast_has(T907* C,T0* a1){
  280. int R=0;
  281. /*IF*/if ((/*(IRF4.6count*/((((T907*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  282. R=(r907fast_index_of(C,a1))<=((((T907*)C))->_upper/*8*/);
  283. }
  284. /*FI*/return R;
  285. }
  286. /*No:FIXED_ARRAY[POSITION].item*/
  287. /*No:FIXED_ARRAY[POSITION].clear*/
  288. /*No:FIXED_ARRAY[POSITION].storage*/
  289. /*No:FIXED_ARRAY[POSITION].capacity*/
  290. /*No:FIXED_ARRAY[POSITION].lower*/
  291. void r907with_capacity(T907* C,int a1){
  292. /*IF*/if (((((T907*)C))->_capacity/*4*/)<(a1)) {
  293. C->_storage=calloc(a1,sizeof(T0*));
  294. C->_capacity=a1;
  295. }
  296. /*FI*/C->_upper=-(1);
  297. }
  298. int r907fast_index_of(T907* C,T0* a1){
  299. int R=0;
  300. R=r379fast_index_of((((T907*)C))->_storage/*0*/,a1,(((T907*)C))->_upper/*8*/);
  301. return R;
  302. }
  303. /*No:FIXED_ARRAY[POSITION].put*/
  304. /*No:FIXED_ARRAY[POSITION].upper*/
  305. /*No:FIXED_ARRAY[POSITION].count*/
  306. void r907add_last(T907* C,T0* a1){
  307. int _new_capacity=0;
  308. /*IF*/if ((((((T907*)C))->_upper/*8*/)+(1))<=(((((T907*)C))->_capacity/*4*/)-(1))) {
  309. C->_upper=((((T907*)C))->_upper/*8*/)+(1);
  310. }
  311.  else if (((((T907*)C))->_capacity/*4*/)==(0)) {
  312. C->_storage=calloc(2,sizeof(T0*));
  313. C->_capacity=2;
  314. C->_upper=0;
  315. }
  316. else {
  317. _new_capacity=(2)*((((T907*)C))->_capacity/*4*/);
  318. C->_storage=r379realloc((((T907*)C))->_storage/*0*/,(((T907*)C))->_capacity/*4*/,_new_capacity);
  319. C->_capacity=_new_capacity;
  320. C->_upper=((((T907*)C))->_upper/*8*/)+(1);
  321. }
  322. /*FI*//*[IRF3.5put*/((((T907*)C))->_storage/*0*/)[(((T907*)C))->_upper/*8*/]=(a1);
  323. /*]*/
  324. }
  325. /*No:FIXED_ARRAY[POSITION].first*/
  326. /*No:ARRAY[BASE_CLASS].clear_all*/
  327. /*No:ARRAY[BASE_CLASS].set_all_with*/
  328. void r863make(T863* C,int a1,int a2){
  329. int _needed=0;
  330. C->_lower=a1;
  331. C->_upper=a2;
  332. _needed=((a2)-(a1))+(1);
  333. /*IF*/if ((_needed)>(0)) {
  334. /*IF*/if (((((T863*)C))->_capacity/*4*/)<(_needed)) {
  335. /*IF*/if (((((T863*)C))->_capacity/*4*/)==(0)) {
  336. C->_storage=calloc(_needed,sizeof(T0*));
  337. }
  338. else {
  339. C->_storage=calloc(_needed,sizeof(T0*));
  340. }
  341. /*FI*/C->_capacity=_needed;
  342. }
  343. else {
  344. /*[IRF3.6clear_all*/{T863* C1=C;
  345. T0* __value=NULL;
  346. /*[IRF3.6set_all_with*/{T863* C2=C1;
  347. T0* c1=__value;
  348. r113set_all_with((((T863*)C2))->_storage/*0*/,c1,((((T863*)C2))->_upper/*8*/)-((((T863*)C2))->_lower/*12*/));
  349. }/*]*/
  350. }/*]*/
  351. }
  352. /*FI*/}
  353. /*FI*/}
  354. int r863fast_has(T863* C,T0* a1){
  355. int R=0;
  356. /*IF*/if ((r863count(C))>(0)) {
  357. R=(r863fast_index_of(C,a1))<=((((T863*)C))->_upper/*8*/);
  358. }
  359. /*FI*/return R;
  360. }
  361. T0* r863item(T863* C,int a1){
  362. T0* R=NULL;
  363. R=((((T863*)C))->_storage/*0*/)[(a1)-((((T863*)C))->_lower/*12*/)];
  364. return R;
  365. }
  366. void r863resize(T863* C,int a1,int a2){
  367. int _mem=0;
  368. int _up=0;
  369. int _i=0;
  370. T0* _other=NULL;
  371. {T863*n=malloc(sizeof(*n));
  372. *n=M863;
  373. r863make(n,a1,a2);
  374. _other=(T0*)n;
  375. }
  376. _i=r2max((((T863*)C))->_lower/*12*/,(((T863*)((T863*)_other)))->_lower/*12*/);
  377. _up=r2min((((T863*)C))->_upper/*8*/,(((T863*)((T863*)_other)))->_upper/*8*/);
  378. while (!((_i)>(_up))) {
  379. /*[IRF3.6put*/{T863* C1=((T863*)_other);
  380. T0* b1=r863item(C,_i);
  381. int b2=_i;
  382. ((((T863*)C1))->_storage/*0*/)[(b2)-((((T863*)C1))->_lower/*12*/)]=(b1);
  383. }/*]*/
  384. _i=(_i)+(1);
  385. }
  386. *((T863*)(C))=*((T863*)(_other));
  387. }
  388. void r863clear(T863* C){
  389. C->_upper=((((T863*)C))->_lower/*12*/)-(1);
  390. }
  391. /*No:ARRAY[BASE_CLASS].storage*/
  392. /*No:ARRAY[BASE_CLASS].capacity*/
  393. /*No:ARRAY[BASE_CLASS].lower*/
  394. void r863with_capacity(T863* C,int a1,int a2){
  395. /*IF*/if (((((T863*)C))->_capacity/*4*/)<(a1)) {
  396. C->_storage=calloc(a1,sizeof(T0*));
  397. C->_capacity=a1;
  398. }
  399. /*FI*/C->_lower=a2;
  400. C->_upper=(a2)-(1);
  401. }
  402. int r863fast_index_of(T863* C,T0* a1){
  403. int R=0;
  404. R=((((T863*)C))->_lower/*12*/)+(r113fast_index_of((((T863*)C))->_storage/*0*/,a1,((((T863*)C))->_upper/*8*/)-((((T863*)C))->_lower/*12*/)));
  405. return R;
  406. }
  407. /*No:ARRAY[BASE_CLASS].put*/
  408. /*No:ARRAY[BASE_CLASS].upper*/
  409. int r863count(T863* C){
  410. int R=0;
  411. R=(((((T863*)C))->_upper/*8*/)-((((T863*)C))->_lower/*12*/))+(1);
  412. return R;
  413. }
  414. void r863add_last(T863* C,T0* a1){
  415. int _new_capacity=0;
  416. /*IF*/if (((((T863*)C))->_capacity/*4*/)<((r863count(C))+(1))) {
  417. /*IF*/if (((((T863*)C))->_capacity/*4*/)==(0)) {
  418. C->_capacity=16;
  419. C->_storage=calloc((((T863*)C))->_capacity/*4*/,sizeof(T0*));
  420. }
  421. else {
  422. _new_capacity=(2)*((((T863*)C))->_capacity/*4*/);
  423. C->_storage=r113realloc((((T863*)C))->_storage/*0*/,(((T863*)C))->_capacity/*4*/,_new_capacity);
  424. C->_capacity=_new_capacity;
  425. }
  426. /*FI*/}
  427. /*FI*/C->_upper=((((T863*)C))->_upper/*8*/)+(1);
  428. /*[IRF3.6put*/{T863* C1=C;
  429. T0* b1=a1;
  430. int b2=(((T863*)C))->_upper/*8*/;
  431. ((((T863*)C1))->_storage/*0*/)[(b2)-((((T863*)C1))->_lower/*12*/)]=(b1);
  432. }/*]*/
  433. }
  434. T0* r863first(T863* C){
  435. T0* R=NULL;
  436. R=r863item(C,(((T863*)C))->_lower/*12*/);
  437. return R;
  438. }
  439. /*No:ARRAY[ASSERTION].clear_all*/
  440. /*No:ARRAY[ASSERTION].set_all_with*/
  441. int r608empty(T608* C){
  442. int R=0;
  443. R=(r608count(C))==(0);
  444. return R;
  445. }
  446. void r608make(T608* C,int a1,int a2){
  447. int _needed=0;
  448. C->_lower=a1;
  449. C->_upper=a2;
  450. _needed=((a2)-(a1))+(1);
  451. /*IF*/if ((_needed)>(0)) {
  452. /*IF*/if (((((T608*)C))->_capacity/*4*/)<(_needed)) {
  453. /*IF*/if (((((T608*)C))->_capacity/*4*/)==(0)) {
  454. C->_storage=calloc(_needed,sizeof(T0*));
  455. }
  456. else {
  457. C->_storage=calloc(_needed,sizeof(T0*));
  458. }
  459. /*FI*/C->_capacity=_needed;
  460. }
  461. else {
  462. /*[IRF3.6clear_all*/{T608* C1=C;
  463. T0* __value=NULL;
  464. /*[IRF3.6set_all_with*/{T608* C2=C1;
  465. T0* c1=__value;
  466. r51set_all_with((((T608*)C2))->_storage/*0*/,c1,((((T608*)C2))->_upper/*8*/)-((((T608*)C2))->_lower/*12*/));
  467. }/*]*/
  468. }/*]*/
  469. }
  470. /*FI*/}
  471. /*FI*/}
  472. int r608fast_has(T608* C,T0* a1){
  473. int R=0;
  474. /*IF*/if ((r608count(C))>(0)) {
  475. R=(r608fast_index_of(C,a1))<=((((T608*)C))->_upper/*8*/);
  476. }
  477. /*FI*/return R;
  478. }
  479. T0* r608item(T608* C,int a1){
  480. T0* R=NULL;
  481. R=((((T608*)C))->_storage/*0*/)[(a1)-((((T608*)C))->_lower/*12*/)];
  482. return R;
  483. }
  484. void r608clear(T608* C){
  485. C->_upper=((((T608*)C))->_lower/*12*/)-(1);
  486. }
  487. /*No:ARRAY[ASSERTION].storage*/
  488. T0* r608twin(T608* C){
  489. T0* R=NULL;
  490. R=malloc(sizeof(*C));
  491. *((T608*)R)=M608;
  492. r608copy(((T608*)R),((T0*)C));
  493. return R;
  494. }
  495. /*No:ARRAY[ASSERTION].capacity*/
  496. void r608copy(T608* C,T0* a1){
  497. int _needed_capacity=0;
  498. C->_lower=(((T608*)((T608*)a1)))->_lower/*12*/;
  499. C->_upper=(((T608*)((T608*)a1)))->_upper/*8*/;
  500. _needed_capacity=(((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/))+(1);
  501. /*IF*/if (((((T608*)C))->_capacity/*4*/)<(_needed_capacity)) {
  502. C->_capacity=_needed_capacity;
  503. C->_storage=calloc((((T608*)C))->_capacity/*4*/,sizeof(T0*));
  504. }
  505. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  506. r51copy_from((((T608*)C))->_storage/*0*/,(((T608*)((T608*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  507. }
  508. /*FI*/}
  509. /*No:ARRAY[ASSERTION].lower*/
  510. int r608fast_index_of(T608* C,T0* a1){
  511. int R=0;
  512. R=((((T608*)C))->_lower/*12*/)+(r51fast_index_of((((T608*)C))->_storage/*0*/,a1,((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/)));
  513. return R;
  514. }
  515. /*No:ARRAY[ASSERTION].put*/
  516. /*No:ARRAY[ASSERTION].upper*/
  517. int r608count(T608* C){
  518. int R=0;
  519. R=(((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/))+(1);
  520. return R;
  521. }
  522. void r608add_last(T608* C,T0* a1){
  523. int _new_capacity=0;
  524. /*IF*/if (((((T608*)C))->_capacity/*4*/)<((r608count(C))+(1))) {
  525. /*IF*/if (((((T608*)C))->_capacity/*4*/)==(0)) {
  526. C->_capacity=16;
  527. C->_storage=calloc((((T608*)C))->_capacity/*4*/,sizeof(T0*));
  528. }
  529. else {
  530. _new_capacity=(2)*((((T608*)C))->_capacity/*4*/);
  531. C->_storage=r51realloc((((T608*)C))->_storage/*0*/,(((T608*)C))->_capacity/*4*/,_new_capacity);
  532. C->_capacity=_new_capacity;
  533. }
  534. /*FI*/}
  535. /*FI*/C->_upper=((((T608*)C))->_upper/*8*/)+(1);
  536. /*[IRF3.6put*/{T608* C1=C;
  537. T0* b1=a1;
  538. int b2=(((T608*)C))->_upper/*8*/;
  539. ((((T608*)C1))->_storage/*0*/)[(b2)-((((T608*)C1))->_lower/*12*/)]=(b1);
  540. }/*]*/
  541. }
  542. T0* r382item(T382* C,int a1){
  543. T0* R=NULL;
  544. R=((((T382*)C))->_storage/*0*/)[(a1)-((((T382*)C))->_lower/*12*/)];
  545. return R;
  546. }
  547. /*No:ARRAY[DECLARATION].storage*/
  548. /*No:ARRAY[DECLARATION].capacity*/
  549. /*No:ARRAY[DECLARATION].lower*/
  550. /*No:ARRAY[DECLARATION].put*/
  551. /*No:ARRAY[DECLARATION].upper*/
  552. int r382count(T382* C){
  553. int R=0;
  554. R=(((((T382*)C))->_upper/*8*/)-((((T382*)C))->_lower/*12*/))+(1);
  555. return R;
  556. }
  557. void r382add_last(T382* C,T0* a1){
  558. int _new_capacity=0;
  559. /*IF*/if (((((T382*)C))->_capacity/*4*/)<((r382count(C))+(1))) {
  560. /*IF*/if (((((T382*)C))->_capacity/*4*/)==(0)) {
  561. C->_capacity=16;
  562. C->_storage=calloc((((T382*)C))->_capacity/*4*/,sizeof(T0*));
  563. }
  564. else {
  565. _new_capacity=(2)*((((T382*)C))->_capacity/*4*/);
  566. C->_storage=r667realloc((((T382*)C))->_storage/*0*/,(((T382*)C))->_capacity/*4*/,_new_capacity);
  567. C->_capacity=_new_capacity;
  568. }
  569. /*FI*/}
  570. /*FI*/C->_upper=((((T382*)C))->_upper/*8*/)+(1);
  571. /*[IRF3.6put*/{T382* C1=C;
  572. T0* b1=a1;
  573. int b2=(((T382*)C))->_upper/*8*/;
  574. ((((T382*)C1))->_storage/*0*/)[(b2)-((((T382*)C1))->_lower/*12*/)]=(b1);
  575. }/*]*/
  576. }
  577. T0* r382first(T382* C){
  578. T0* R=NULL;
  579. R=r382item(C,(((T382*)C))->_lower/*12*/);
  580. return R;
  581. }
  582. /*No:ARRAY[BOOLEAN].clear_all*/
  583. /*No:ARRAY[BOOLEAN].set_all_with*/
  584. void r353force(T353* C,int a1,int a2){
  585. /*IF*/if (((((T353*)C))->_upper/*8*/)<(a2)) {
  586. r353resize(C,(((T353*)C))->_lower/*12*/,a2);
  587. }
  588.  else if ((a2)<((((T353*)C))->_lower/*12*/)) {
  589. r353resize(C,a2,(((T353*)C))->_upper/*8*/);
  590. }
  591. /*FI*//*[IRF3.6put*/{T353* C1=C;
  592. int b1=a1;
  593. int b2=a2;
  594. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  595. }/*]*/
  596. }
  597. void r353make(T353* C,int a1,int a2){
  598. int _needed=0;
  599. C->_lower=a1;
  600. C->_upper=a2;
  601. _needed=((a2)-(a1))+(1);
  602. /*IF*/if ((_needed)>(0)) {
  603. /*IF*/if (((((T353*)C))->_capacity/*4*/)<(_needed)) {
  604. /*IF*/if (((((T353*)C))->_capacity/*4*/)==(0)) {
  605. C->_storage=calloc(_needed,sizeof(int));
  606. }
  607. else {
  608. C->_storage=calloc(_needed,sizeof(int));
  609. }
  610. /*FI*/C->_capacity=_needed;
  611. }
  612. else {
  613. /*[IRF3.6clear_all*/{T353* C1=C;
  614. int __value=0;
  615. /*[IRF3.6set_all_with*/{T353* C2=C1;
  616. int c1=__value;
  617. r567set_all_with((((T353*)C2))->_storage/*0*/,c1,((((T353*)C2))->_upper/*8*/)-((((T353*)C2))->_lower/*12*/));
  618. }/*]*/
  619. }/*]*/
  620. }
  621. /*FI*/}
  622. /*FI*/}
  623. int r353item(T353* C,int a1){
  624. int R=0;
  625. R=((((T353*)C))->_storage/*0*/)[(a1)-((((T353*)C))->_lower/*12*/)];
  626. return R;
  627. }
  628. void r353resize(T353* C,int a1,int a2){
  629. int _mem=0;
  630. int _up=0;
  631. int _i=0;
  632. T0* _other=NULL;
  633. {T353*n=malloc(sizeof(*n));
  634. *n=M353;
  635. r353make(n,a1,a2);
  636. _other=(T0*)n;
  637. }
  638. _i=r2max((((T353*)C))->_lower/*12*/,(((T353*)((T353*)_other)))->_lower/*12*/);
  639. _up=r2min((((T353*)C))->_upper/*8*/,(((T353*)((T353*)_other)))->_upper/*8*/);
  640. while (!((_i)>(_up))) {
  641. /*[IRF3.6put*/{T353* C1=((T353*)_other);
  642. int b1=r353item(C,_i);
  643. int b2=_i;
  644. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  645. }/*]*/
  646. _i=(_i)+(1);
  647. }
  648. *((T353*)(C))=*((T353*)(_other));
  649. }
  650. /*No:ARRAY[BOOLEAN].storage*/
  651. /*No:ARRAY[BOOLEAN].capacity*/
  652. /*No:ARRAY[BOOLEAN].lower*/
  653. /*No:ARRAY[BOOLEAN].put*/
  654. /*No:ARRAY[BOOLEAN].upper*/
  655. int r353valid_index(T353* C,int a1){
  656. int R=0;
  657. R=(((((T353*)C))->_lower/*12*/)<=(a1))&&((a1)<=((((T353*)C))->_upper/*8*/));
  658. return R;
  659. }
  660. void r353set_slice_with(T353* C,int a1,int a2,int a3){
  661. int _i=0;
  662. _i=a2;
  663. while (!((_i)>(a3))) {
  664. /*[IRF3.6put*/{T353* C1=C;
  665. int b1=a1;
  666. int b2=_i;
  667. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  668. }/*]*/
  669. _i=(_i)+(1);
  670. }
  671. }
  672.  
  673.