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