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