home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / source.lha / bin_c / short5.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  19.5 KB  |  748 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. void r699clear_all(T699 C,int a1){
  10. int _i=0;
  11. int _v=0;
  12. _i=a1;
  13. while (!((_i)<(0))) {
  14. (C)[_i]=(_v);
  15. _i=(_i)-(1);
  16. }
  17. }
  18. void r699set_all_with(T699 C,int a1,int a2){
  19. int _i=0;
  20. _i=a2;
  21. while (!((_i)<(0))) {
  22. (C)[_i]=(a1);
  23. _i=(_i)-(1);
  24. }
  25. }
  26. int r699fast_index_of(T699 C,int a1,int a2){
  27. int R=0;
  28. while (!(((R)>(a2))||((a1)==((C)[R])))) {
  29. R=(R)+(1);
  30. }
  31. return R;
  32. }
  33. void r699copy_from(T699 C,T699 a1,int a2){
  34. int _i=0;
  35. _i=a2;
  36. while (!((_i)<(0))) {
  37. (C)[_i]=((a1)[_i]);
  38. _i=(_i)-(1);
  39. }
  40. }
  41. T699 r699realloc(T699 C,int a1,int a2){
  42. T699 R=NULL;
  43. R=calloc(a2,sizeof(int));
  44. r699copy_from(R,C,(a1)-(1));
  45. return R;
  46. }
  47. void r44copy_from(T44 C,T44 a1,int a2){
  48. int _i=0;
  49. _i=a2;
  50. while (!((_i)<(0))) {
  51. (C)[_i]=((a1)[_i]);
  52. _i=(_i)-(1);
  53. }
  54. }
  55. T44 r44realloc(T44 C,int a1,int a2){
  56. T44 R=NULL;
  57. R=calloc(a2,sizeof(T0*));
  58. r44copy_from(R,C,(a1)-(1));
  59. return R;
  60. }
  61. void r191copy_from(T191 C,T191 a1,int a2){
  62. int _i=0;
  63. _i=a2;
  64. while (!((_i)<(0))) {
  65. (C)[_i]=((a1)[_i]);
  66. _i=(_i)-(1);
  67. }
  68. }
  69. T191 r191realloc(T191 C,int a1,int a2){
  70. T191 R=NULL;
  71. R=calloc(a2,sizeof(T0*));
  72. r191copy_from(R,C,(a1)-(1));
  73. return R;
  74. }
  75. void r7add_first(T7* C,char a1){
  76. int _i=0;
  77. r7extend(C,'\40');
  78. _i=(((T7*)C))->_count/*4*/;
  79. while (!((_i)==(1))) {
  80. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((_i)-(1))-(1)]/*)*/);
  81. /*]*/
  82. _i=(_i)-(1);
  83. }
  84. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(1)-(1)]=(a1);
  85. /*]*/
  86. }
  87. void r7extend(T7* C,char a1){
  88. int _new_capacity=0;
  89. /*IF*/if (((((T7*)C))->_capacity/*8*/)>((((T7*)C))->_count/*4*/)) {
  90. }
  91.  else if (((((T7*)C))->_capacity/*8*/)==(0)) {
  92. C->_capacity=32;
  93. C->_storage=calloc((((T7*)C))->_capacity/*8*/,sizeof(char));
  94. }
  95. else {
  96. _new_capacity=(2)*((((T7*)C))->_capacity/*8*/);
  97. C->_storage=r9realloc((((T7*)C))->_storage/*0*/,(((T7*)C))->_capacity/*8*/,_new_capacity);
  98. C->_capacity=_new_capacity;
  99. }
  100. /*FI*/C->_count=((((T7*)C))->_count/*4*/)+(1);
  101. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]=(a1);
  102. /*]*/
  103. }
  104. void r7set_last(T7* C,char a1){
  105. /*IF*/if ((((((T7*)C))->_count/*4*/)==(0))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/)!=(a1))) {
  106. r7extend(C,a1);
  107. }
  108. /*FI*/}
  109. /*No:STRING.remove_suffix*/
  110. void r7to_lower(T7* C){
  111. int _i=0;
  112. _i=(((T7*)C))->_count/*4*/;
  113. while (!((_i)==(0))) {
  114. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(r3to_lower(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/));
  115. /*]*/
  116. _i=(_i)-(1);
  117. }
  118. }
  119. int r7hash_code(T7* C){
  120. int R=0;
  121. R=r9hashcode((((T7*)C))->_storage/*0*/,((((T7*)C))->_count/*4*/)-(1));
  122. return R;
  123. }
  124. /*No:STRING.empty*/
  125. int r7index_of_string(T7* C,T0* a1){
  126. int R=0;
  127. int _i3=0;
  128. int _i2=0;
  129. int _i1=0;
  130. int _stop=0;
  131. _i1=1;
  132. _i2=(((T7*)((T7*)a1)))->_count/*4*/;
  133. _i3=_i2;
  134. while (!((R)!=(0))) {
  135. /*IF*/if ((_i2)>((((T7*)C))->_count/*4*/)) {
  136. R=((((T7*)C))->_count/*4*/)+(1);
  137. }
  138. else {
  139. _stop=0;
  140. while (!(_stop)) {
  141. /*IF*/if ((_i3)==(0)) {
  142. _stop=1;
  143. R=_i1;
  144. }
  145.  else if ((/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i3)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i2)-(1)]/*)*/)) {
  146. _stop=1;
  147. }
  148. /*FI*/_i3=(_i3)-(1);
  149. _i2=(_i2)-(1);
  150. }
  151. }
  152. /*FI*/_i1=(_i1)+(1);
  153. _i3=(((T7*)((T7*)a1)))->_count/*4*/;
  154. _i2=((_i1)+(_i3))-(1);
  155. }
  156. return R;
  157. }
  158. int r7_px_60(T7* C,T0* a1){
  159. int R=0;
  160. int _i=0;
  161. _i=1;
  162. while (!(((((((T7*)C))->_count/*4*/)<(_i))||(((((T7*)((T7*)a1)))->_count/*4*/)<(_i)))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/)))) {
  163. _i=(_i)+(1);
  164. }
  165. /*IF*/if (((((T7*)C))->_count/*4*/)<(_i)) {
  166. R=((((T7*)((T7*)a1)))->_count/*4*/)>=(_i);
  167. }
  168.  else if (((((T7*)((T7*)a1)))->_count/*4*/)<(_i)) {
  169. R=0;
  170. }
  171. else {
  172. R=(((unsigned)(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/))<((unsigned)(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/)));
  173. }
  174. /*FI*/return R;
  175. }
  176. void r7remove_between(T7* C,int a1,int a2){
  177. int _i=0;
  178. _i=a2;
  179. while (!((_i)>=((((T7*)C))->_count/*4*/))) {
  180. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(((a1)+(_i))-(a2))-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((_i)+(1))-(1)]/*)*/);
  181. /*]*/
  182. _i=(_i)+(1);
  183. }
  184. C->_count=((((T7*)C))->_count/*4*/)-(((a2)-(a1))+(1));
  185. }
  186. void r7make(T7* C,int a1){
  187. /*IF*/if ((a1)>(0)) {
  188. /*IF*/if (((((T7*)C))->_capacity/*8*/)<(a1)) {
  189. C->_storage=calloc(a1,sizeof(char));
  190. C->_capacity=a1;
  191. }
  192. /*FI*/}
  193. /*FI*/C->_count=0;
  194. }
  195. int r7_px_62(T7* C,T0* a1){
  196. int R=0;
  197. R=r7_px_60(((T7*)a1),(T0*)C);
  198. return R;
  199. }
  200. void* r7to_external(T7* C){
  201. void* R=0;
  202. /*IF*/if (((((T7*)C))->_capacity/*8*/)>((((T7*)C))->_count/*4*/)) {
  203. C->_count=((((T7*)C))->_count/*4*/)+(1);
  204. /*IF*/if ((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/)!=('\0')) {
  205. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]=('\0');
  206. /*]*/
  207. }
  208. /*FI*/}
  209. else {
  210. r7extend(C,'\0');
  211. }
  212. /*FI*/C->_count=((((T7*)C))->_count/*4*/)-(1);
  213. R=((void*)(((T7*)C))->_storage/*0*/);
  214. return R;
  215. }
  216. /*No:STRING.item*/
  217. int r7has_string(T7* C,T0* a1){
  218. int R=0;
  219. R=(r7index_of_string(C,a1))!=(((((T7*)C))->_count/*4*/)+(1));
  220. return R;
  221. }
  222. void r7remove_first(T7* C,int a1){
  223. /*IF*/if ((a1)>(0)) {
  224. r7remove_between(C,1,a1);
  225. }
  226. /*FI*/}
  227. /*No:STRING.clear*/
  228. /*No:STRING.storage*/
  229. T0* r7twin(T7* C){
  230. T0* R=NULL;
  231. R=malloc(sizeof(*C));
  232. *((T7*)R)=M7;
  233. r7copy(((T7*)R),((T0*)C));
  234. return R;
  235. }
  236. int r7is_equal(T7* C,T0* a1){
  237. int R=0;
  238. /*IF*/if ((C)==((void*)(a1))) {
  239. R=1;
  240. }
  241.  else if (((((T7*)C))->_count/*4*/)==((((T7*)((T7*)a1)))->_count/*4*/)) {
  242. /*IF*/if (((((T7*)C))->_count/*4*/)>(0)) {
  243. R=r9fast_memcmp((((T7*)C))->_storage/*0*/,(((T7*)((T7*)a1)))->_storage/*0*/,(((T7*)C))->_count/*4*/);
  244. }
  245. else {
  246. R=1;
  247. }
  248. /*FI*/}
  249. /*FI*/return R;
  250. }
  251. void r7swap(T7* C,int a1,int a2){
  252. char _tmp=0;
  253. _tmp=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(a1)-(1)]/*)*/;
  254. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(a1)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(a2)-(1)]/*)*/);
  255. /*]*/
  256. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(a2)-(1)]=(_tmp);
  257. /*]*/
  258. }
  259. char r7last(T7* C){
  260. char R=0;
  261. R=/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[((((T7*)C))->_count/*4*/)-(1)]/*)*/;
  262. return R;
  263. }
  264. /*No:STRING.capacity*/
  265. int r7has_suffix(T7* C,T0* a1){
  266. int R=0;
  267. int _i2=0;
  268. int _i1=0;
  269. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)<=((((T7*)C))->_count/*4*/)) {
  270. _i1=(((((T7*)C))->_count/*4*/)-((((T7*)((T7*)a1)))->_count/*4*/))+(1);
  271. _i2=1;
  272. while (!((((_i1)>((((T7*)C))->_count/*4*/))||((_i2)>((((T7*)((T7*)a1)))->_count/*4*/)))||((/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i1)-(1)]/*)*/)!=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i2)-(1)]/*)*/)))) {
  273. _i1=(_i1)+(1);
  274. _i2=(_i2)+(1);
  275. }
  276. R=(_i1)>((((T7*)C))->_count/*4*/);
  277. }
  278. /*FI*/return R;
  279. }
  280. int r7has(T7* C,char a1){
  281. int R=0;
  282. R=(r7index_of(C,a1))!=(((((T7*)C))->_count/*4*/)+(1));
  283. return R;
  284. }
  285. void r7copy(T7* C,T0* a1){
  286. C->_count=(((T7*)((T7*)a1)))->_count/*4*/;
  287. /*IF*/if (((((T7*)C))->_count/*4*/)>(0)) {
  288. /*IF*/if (((((T7*)C))->_capacity/*8*/)<((((T7*)C))->_count/*4*/)) {
  289. C->_storage=calloc((((T7*)C))->_count/*4*/,sizeof(char));
  290. C->_capacity=(((T7*)C))->_count/*4*/;
  291. }
  292. /*FI*/r9copy_from((((T7*)C))->_storage/*0*/,(((T7*)((T7*)a1)))->_storage/*0*/,((((T7*)C))->_count/*4*/)-(1));
  293. }
  294. /*FI*/}
  295. int r7same_as(T7* C,T0* a1){
  296. int R=0;
  297. int _i=0;
  298. /*IF*/if ((a1)==((void*)(C))) {
  299. R=1;
  300. }
  301. else {
  302. /*IF*/if (((((T7*)((T7*)a1)))->_count/*4*/)!=((((T7*)C))->_count/*4*/)) {
  303. }
  304. else {
  305. _i=(((T7*)C))->_count/*4*/;
  306. while (!(((_i)==(0))||(!(r3same_as(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/,/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/))))) {
  307. _i=(_i)-(1);
  308. }
  309. R=(_i)==(0);
  310. }
  311. /*FI*/}
  312. /*FI*/return R;
  313. }
  314. /*No:STRING.put*/
  315. void r7prepend(T7* C,T0* a1){
  316. int _old_count=0;
  317. int _i=0;
  318. _old_count=(((T7*)C))->_count/*4*/;
  319. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  320. while (!((_i)==(0))) {
  321. r7extend(C,'\40');
  322. _i=(_i)-(1);
  323. }
  324. _i=(((T7*)C))->_count/*4*/;
  325. while (!((_old_count)==(0))) {
  326. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_old_count)-(1)]/*)*/);
  327. /*]*/
  328. _i=(_i)-(1);
  329. _old_count=(_old_count)-(1);
  330. }
  331. _i=(((T7*)((T7*)a1)))->_count/*4*/;
  332. while (!((_i)==(0))) {
  333. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/);
  334. /*]*/
  335. _i=(_i)-(1);
  336. }
  337. }
  338. /*No:STRING.count*/
  339. void r7to_upper(T7* C){
  340. int _i=0;
  341. _i=(((T7*)C))->_count/*4*/;
  342. while (!((_i)==(0))) {
  343. /*[IRF3.5put*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]=(r3to_upper(/*(IRF4.6item*/((((T7*)C))->_storage/*0*/)[(_i)-(1)]/*)*/));
  344. /*]*/
  345. _i=(_i)-(1);
  346. }
  347. }
  348. void r7remove_last(T7* C,int a1){
  349. C->_count=((((T7*)C))->_count/*4*/)-(a1);
  350. }
  351. /*No:STRING.first*/
  352. int r7index_of(T7* C,char a1){
  353. int R=0;
  354. R=(1)+(r9fast_index_of((((T7*)C))->_storage/*0*/,a1,((((T7*)C))->_count/*4*/)-(1)));
  355. return R;
  356. }
  357. void r7append(T7* C,T0* a1){
  358. int _i=0;
  359. _i=1;
  360. while (!((_i)>((((T7*)((T7*)a1)))->_count/*4*/))) {
  361. r7extend(C,/*(IRF4.6item*/((((T7*)((T7*)a1)))->_storage/*0*/)[(_i)-(1)]/*)*/);
  362. _i=(_i)+(1);
  363. }
  364. }
  365. /*No:ARRAY[INTEGER_CONSTANT].clear_all*/
  366. /*No:ARRAY[INTEGER_CONSTANT].set_all_with*/
  367. void r28make(T28* C,int a1,int a2){
  368. int _needed=0;
  369. C->_lower=a1;
  370. C->_upper=a2;
  371. _needed=((a2)-(a1))+(1);
  372. /*IF*/if ((_needed)>(0)) {
  373. /*IF*/if (((((T28*)C))->_capacity/*8*/)<(_needed)) {
  374. /*IF*/if (((((T28*)C))->_capacity/*8*/)==(0)) {
  375. C->_storage=calloc(_needed,sizeof(T0*));
  376. }
  377. else {
  378. C->_storage=calloc(_needed,sizeof(T0*));
  379. }
  380. /*FI*/C->_capacity=_needed;
  381. }
  382. else {
  383. /*[IRF3.6clear_all*/{T28* C1=C;
  384. T0* __value=NULL;
  385. /*[IRF3.6set_all_with*/{T28* C2=C1;
  386. T0* c1=__value;
  387. r392set_all_with((((T28*)C2))->_storage/*4*/,c1,((((T28*)C2))->_upper/*12*/)-((((T28*)C2))->_lower/*16*/));
  388. }/*]*/
  389. }/*]*/
  390. }
  391. /*FI*/}
  392. /*FI*/}
  393. T0* r28item(T28* C,int a1){
  394. T0* R=NULL;
  395. R=((((T28*)C))->_storage/*4*/)[(a1)-((((T28*)C))->_lower/*16*/)];
  396. return R;
  397. }
  398. /*No:ARRAY[INTEGER_CONSTANT].storage*/
  399. T0* r28twin(T28* C){
  400. T0* R=NULL;
  401. R=malloc(sizeof(*C));
  402. *((T28*)R)=M28;
  403. r28copy(((T28*)R),((T0*)C));
  404. return R;
  405. }
  406. /*No:ARRAY[INTEGER_CONSTANT].capacity*/
  407. void r28copy(T28* C,T0* a1){
  408. int _needed_capacity=0;
  409. C->_lower=(((T28*)((T28*)a1)))->_lower/*16*/;
  410. C->_upper=(((T28*)((T28*)a1)))->_upper/*12*/;
  411. _needed_capacity=(((((T28*)C))->_upper/*12*/)-((((T28*)C))->_lower/*16*/))+(1);
  412. /*IF*/if (((((T28*)C))->_capacity/*8*/)<(_needed_capacity)) {
  413. C->_capacity=_needed_capacity;
  414. C->_storage=calloc((((T28*)C))->_capacity/*8*/,sizeof(T0*));
  415. }
  416. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  417. r392copy_from((((T28*)C))->_storage/*4*/,(((T28*)((T28*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  418. }
  419. /*FI*/}
  420. /*No:ARRAY[INTEGER_CONSTANT].lower*/
  421. /*No:ARRAY[INTEGER_CONSTANT].put*/
  422. /*No:ARRAY[INTEGER_CONSTANT].upper*/
  423. int r28count(T28* C){
  424. int R=0;
  425. R=(((((T28*)C))->_upper/*12*/)-((((T28*)C))->_lower/*16*/))+(1);
  426. return R;
  427. }
  428. void r28add_last(T28* C,T0* a1){
  429. int _new_capacity=0;
  430. /*IF*/if (((((T28*)C))->_capacity/*8*/)<((r28count(C))+(1))) {
  431. /*IF*/if (((((T28*)C))->_capacity/*8*/)==(0)) {
  432. C->_capacity=16;
  433. C->_storage=calloc((((T28*)C))->_capacity/*8*/,sizeof(T0*));
  434. }
  435. else {
  436. _new_capacity=(2)*((((T28*)C))->_capacity/*8*/);
  437. C->_storage=r392realloc((((T28*)C))->_storage/*4*/,(((T28*)C))->_capacity/*8*/,_new_capacity);
  438. C->_capacity=_new_capacity;
  439. }
  440. /*FI*/}
  441. /*FI*/C->_upper=((((T28*)C))->_upper/*12*/)+(1);
  442. /*[IRF3.6put*/{T28* C1=C;
  443. T0* b1=a1;
  444. int b2=(((T28*)C))->_upper/*12*/;
  445. ((((T28*)C1))->_storage/*4*/)[(b2)-((((T28*)C1))->_lower/*16*/)]=(b1);
  446. }/*]*/
  447. }
  448. T0* r28first(T28* C){
  449. T0* R=NULL;
  450. R=r28item(C,(((T28*)C))->_lower/*16*/);
  451. return R;
  452. }
  453. T0* r235item(T235* C,int a1){
  454. T0* R=NULL;
  455. R=((((T235*)C))->_storage/*0*/)[(a1)-((((T235*)C))->_lower/*12*/)];
  456. return R;
  457. }
  458. /*No:ARRAY[CREATION_CLAUSE].storage*/
  459. /*No:ARRAY[CREATION_CLAUSE].capacity*/
  460. /*No:ARRAY[CREATION_CLAUSE].lower*/
  461. /*No:ARRAY[CREATION_CLAUSE].put*/
  462. /*No:ARRAY[CREATION_CLAUSE].upper*/
  463. int r235count(T235* C){
  464. int R=0;
  465. R=(((((T235*)C))->_upper/*8*/)-((((T235*)C))->_lower/*12*/))+(1);
  466. return R;
  467. }
  468. void r235add_last(T235* C,T0* a1){
  469. int _new_capacity=0;
  470. /*IF*/if (((((T235*)C))->_capacity/*4*/)<((r235count(C))+(1))) {
  471. /*IF*/if (((((T235*)C))->_capacity/*4*/)==(0)) {
  472. C->_capacity=16;
  473. C->_storage=calloc((((T235*)C))->_capacity/*4*/,sizeof(T0*));
  474. }
  475. else {
  476. _new_capacity=(2)*((((T235*)C))->_capacity/*4*/);
  477. C->_storage=r513realloc((((T235*)C))->_storage/*0*/,(((T235*)C))->_capacity/*4*/,_new_capacity);
  478. C->_capacity=_new_capacity;
  479. }
  480. /*FI*/}
  481. /*FI*/C->_upper=((((T235*)C))->_upper/*8*/)+(1);
  482. /*[IRF3.6put*/{T235* C1=C;
  483. T0* b1=a1;
  484. int b2=(((T235*)C))->_upper/*8*/;
  485. ((((T235*)C1))->_storage/*0*/)[(b2)-((((T235*)C1))->_lower/*12*/)]=(b1);
  486. }/*]*/
  487. }
  488. T0* r235first(T235* C){
  489. T0* R=NULL;
  490. R=r235item(C,(((T235*)C))->_lower/*12*/);
  491. return R;
  492. }
  493. /*No:ARRAY[RUN_FEATURE].clear_all*/
  494. /*No:ARRAY[RUN_FEATURE].set_all_with*/
  495. void r477force(T477* C,T0* a1,int a2){
  496. /*IF*/if (((((T477*)C))->_upper/*8*/)<(a2)) {
  497. r477resize(C,(((T477*)C))->_lower/*12*/,a2);
  498. }
  499.  else if ((a2)<((((T477*)C))->_lower/*12*/)) {
  500. r477resize(C,a2,(((T477*)C))->_upper/*8*/);
  501. }
  502. /*FI*//*[IRF3.6put*/{T477* C1=C;
  503. T0* b1=a1;
  504. int b2=a2;
  505. ((((T477*)C1))->_storage/*0*/)[(b2)-((((T477*)C1))->_lower/*12*/)]=(b1);
  506. }/*]*/
  507. }
  508. void r477make(T477* C,int a1,int a2){
  509. int _needed=0;
  510. C->_lower=a1;
  511. C->_upper=a2;
  512. _needed=((a2)-(a1))+(1);
  513. /*IF*/if ((_needed)>(0)) {
  514. /*IF*/if (((((T477*)C))->_capacity/*4*/)<(_needed)) {
  515. /*IF*/if (((((T477*)C))->_capacity/*4*/)==(0)) {
  516. C->_storage=calloc(_needed,sizeof(T0*));
  517. }
  518. else {
  519. C->_storage=calloc(_needed,sizeof(T0*));
  520. }
  521. /*FI*/C->_capacity=_needed;
  522. }
  523. else {
  524. /*[IRF3.6clear_all*/{T477* C1=C;
  525. T0* __value=NULL;
  526. /*[IRF3.6set_all_with*/{T477* C2=C1;
  527. T0* c1=__value;
  528. r778set_all_with((((T477*)C2))->_storage/*0*/,c1,((((T477*)C2))->_upper/*8*/)-((((T477*)C2))->_lower/*12*/));
  529. }/*]*/
  530. }/*]*/
  531. }
  532. /*FI*/}
  533. /*FI*/}
  534. T0* r477item(T477* C,int a1){
  535. T0* R=NULL;
  536. R=((((T477*)C))->_storage/*0*/)[(a1)-((((T477*)C))->_lower/*12*/)];
  537. return R;
  538. }
  539. void r477resize(T477* C,int a1,int a2){
  540. int _mem=0;
  541. int _up=0;
  542. int _i=0;
  543. T0* _other=NULL;
  544. {T477*n=malloc(sizeof(*n));
  545. *n=M477;
  546. r477make(n,a1,a2);
  547. _other=(T0*)n;
  548. }
  549. _i=r2max((((T477*)C))->_lower/*12*/,(((T477*)((T477*)_other)))->_lower/*12*/);
  550. _up=r2min((((T477*)C))->_upper/*8*/,(((T477*)((T477*)_other)))->_upper/*8*/);
  551. while (!((_i)>(_up))) {
  552. /*[IRF3.6put*/{T477* C1=((T477*)_other);
  553. T0* b1=r477item(C,_i);
  554. int b2=_i;
  555. ((((T477*)C1))->_storage/*0*/)[(b2)-((((T477*)C1))->_lower/*12*/)]=(b1);
  556. }/*]*/
  557. _i=(_i)+(1);
  558. }
  559. *((T477*)(C))=*((T477*)(_other));
  560. }
  561. /*No:ARRAY[RUN_FEATURE].storage*/
  562. /*No:ARRAY[RUN_FEATURE].capacity*/
  563. /*No:ARRAY[RUN_FEATURE].lower*/
  564. /*No:ARRAY[RUN_FEATURE].put*/
  565. /*No:ARRAY[RUN_FEATURE].upper*/
  566. int r477count(T477* C){
  567. int R=0;
  568. R=(((((T477*)C))->_upper/*8*/)-((((T477*)C))->_lower/*12*/))+(1);
  569. return R;
  570. }
  571. T0* r147item(T147* C,int a1){
  572. T0* R=NULL;
  573. R=((((T147*)C))->_storage/*0*/)[(a1)-((((T147*)C))->_lower/*12*/)];
  574. return R;
  575. }
  576. /*No:ARRAY[E_WHEN].storage*/
  577. T0* r147twin(T147* C){
  578. T0* R=NULL;
  579. R=malloc(sizeof(*C));
  580. *((T147*)R)=M147;
  581. r147copy(((T147*)R),((T0*)C));
  582. return R;
  583. }
  584. /*No:ARRAY[E_WHEN].capacity*/
  585. void r147copy(T147* C,T0* a1){
  586. int _needed_capacity=0;
  587. C->_lower=(((T147*)((T147*)a1)))->_lower/*12*/;
  588. C->_upper=(((T147*)((T147*)a1)))->_upper/*8*/;
  589. _needed_capacity=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
  590. /*IF*/if (((((T147*)C))->_capacity/*4*/)<(_needed_capacity)) {
  591. C->_capacity=_needed_capacity;
  592. C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
  593. }
  594. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  595. r586copy_from((((T147*)C))->_storage/*0*/,(((T147*)((T147*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  596. }
  597. /*FI*/}
  598. /*No:ARRAY[E_WHEN].lower*/
  599. /*No:ARRAY[E_WHEN].put*/
  600. /*No:ARRAY[E_WHEN].upper*/
  601. int r147count(T147* C){
  602. int R=0;
  603. R=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
  604. return R;
  605. }
  606. void r147add_last(T147* C,T0* a1){
  607. int _new_capacity=0;
  608. /*IF*/if (((((T147*)C))->_capacity/*4*/)<((r147count(C))+(1))) {
  609. /*IF*/if (((((T147*)C))->_capacity/*4*/)==(0)) {
  610. C->_capacity=16;
  611. C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
  612. }
  613. else {
  614. _new_capacity=(2)*((((T147*)C))->_capacity/*4*/);
  615. C->_storage=r586realloc((((T147*)C))->_storage/*0*/,(((T147*)C))->_capacity/*4*/,_new_capacity);
  616. C->_capacity=_new_capacity;
  617. }
  618. /*FI*/}
  619. /*FI*/C->_upper=((((T147*)C))->_upper/*8*/)+(1);
  620. /*[IRF3.6put*/{T147* C1=C;
  621. T0* b1=a1;
  622. int b2=(((T147*)C))->_upper/*8*/;
  623. ((((T147*)C1))->_storage/*0*/)[(b2)-((((T147*)C1))->_lower/*12*/)]=(b1);
  624. }/*]*/
  625. }
  626. /*No:FIXED_ARRAY[TYPE_BIT_REF].storage*/
  627. /*No:FIXED_ARRAY[TYPE_BIT_REF].capacity*/
  628. void r41with_capacity(T41* C,int a1){
  629. /*IF*/if (((((T41*)C))->_capacity/*4*/)<(a1)) {
  630. C->_storage=calloc(a1,sizeof(T0*));
  631. C->_capacity=a1;
  632. }
  633. /*FI*/C->_upper=-(1);
  634. }
  635. /*No:FIXED_ARRAY[TYPE_BIT_REF].put*/
  636. /*No:FIXED_ARRAY[TYPE_BIT_REF].upper*/
  637. void r41add_last(T41* C,T0* a1){
  638. int _new_capacity=0;
  639. /*IF*/if ((((((T41*)C))->_upper/*8*/)+(1))<=(((((T41*)C))->_capacity/*4*/)-(1))) {
  640. C->_upper=((((T41*)C))->_upper/*8*/)+(1);
  641. }
  642.  else if (((((T41*)C))->_capacity/*4*/)==(0)) {
  643. C->_storage=calloc(2,sizeof(T0*));
  644. C->_capacity=2;
  645. C->_upper=0;
  646. }
  647. else {
  648. _new_capacity=(2)*((((T41*)C))->_capacity/*4*/);
  649. C->_storage=r539realloc((((T41*)C))->_storage/*0*/,(((T41*)C))->_capacity/*4*/,_new_capacity);
  650. C->_capacity=_new_capacity;
  651. C->_upper=((((T41*)C))->_upper/*8*/)+(1);
  652. }
  653. /*FI*//*[IRF3.5put*/((((T41*)C))->_storage/*0*/)[(((T41*)C))->_upper/*8*/]=(a1);
  654. /*]*/
  655. }
  656. /*No:FIXED_ARRAY[INTEGER].clear_all*/
  657. /*No:FIXED_ARRAY[INTEGER].set_all_with*/
  658. void r226make(T226* C,int a1){
  659. /*IF*/if ((a1)==(0)) {
  660. C->_upper=-(1);
  661. }
  662.  else if (((((T226*)C))->_capacity/*4*/)==(0)) {
  663. C->_storage=calloc(a1,sizeof(int));
  664. C->_capacity=a1;
  665. C->_upper=(a1)-(1);
  666. }
  667.  else if (((((T226*)C))->_capacity/*4*/)<(a1)) {
  668. C->_storage=calloc(a1,sizeof(int));
  669. C->_capacity=a1;
  670. C->_upper=(a1)-(1);
  671. }
  672. else {
  673. C->_upper=(a1)-(1);
  674. /*[IRF3.6clear_all*/{T226* C1=C;
  675. int __value=0;
  676. /*[IRF3.6set_all_with*/{T226* C2=C1;
  677. int c1=__value;
  678. r699set_all_with((((T226*)C2))->_storage/*0*/,c1,(((T226*)C2))->_upper/*8*/);
  679. }/*]*/
  680. }/*]*/
  681. }
  682. /*FI*/}
  683. int r226fast_has(T226* C,int a1){
  684. int R=0;
  685. /*IF*/if ((/*(IRF4.6count*/((((T226*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  686. R=(r226fast_index_of(C,a1))<=((((T226*)C))->_upper/*8*/);
  687. }
  688. /*FI*/return R;
  689. }
  690. /*No:FIXED_ARRAY[INTEGER].item*/
  691. /*No:FIXED_ARRAY[INTEGER].storage*/
  692. /*No:FIXED_ARRAY[INTEGER].capacity*/
  693. void r226copy(T226* C,T0* a1){
  694. int _new_capacity=0;
  695. int _other_upper=0;
  696. _other_upper=(((T226*)((T226*)a1)))->_upper/*8*/;
  697. /*IF*/if ((_other_upper)>=(0)) {
  698. _new_capacity=(_other_upper)+(1);
  699. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(_new_capacity)) {
  700. C->_capacity=_new_capacity;
  701. C->_storage=calloc(_new_capacity,sizeof(int));
  702. }
  703.  else if (((((T226*)C))->_capacity/*4*/)>(0)) {
  704. r699clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
  705. }
  706. /*FI*/r699copy_from((((T226*)C))->_storage/*0*/,(((T226*)((T226*)a1)))->_storage/*0*/,_other_upper);
  707. }
  708.  else if (((((T226*)C))->_capacity/*4*/)>(0)) {
  709. r699clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
  710. }
  711. /*FI*/C->_upper=_other_upper;
  712. }
  713. void r226with_capacity(T226* C,int a1){
  714. /*IF*/if (((((T226*)C))->_capacity/*4*/)<(a1)) {
  715. C->_storage=calloc(a1,sizeof(int));
  716. C->_capacity=a1;
  717. }
  718. /*FI*/C->_upper=-(1);
  719. }
  720. int r226fast_index_of(T226* C,int a1){
  721. int R=0;
  722. R=r699fast_index_of((((T226*)C))->_storage/*0*/,a1,(((T226*)C))->_upper/*8*/);
  723. return R;
  724. }
  725. /*No:FIXED_ARRAY[INTEGER].put*/
  726. /*No:FIXED_ARRAY[INTEGER].upper*/
  727. /*No:FIXED_ARRAY[INTEGER].count*/
  728. void r226add_last(T226* C,int a1){
  729. int _new_capacity=0;
  730. /*IF*/if ((((((T226*)C))->_upper/*8*/)+(1))<=(((((T226*)C))->_capacity/*4*/)-(1))) {
  731. C->_upper=((((T226*)C))->_upper/*8*/)+(1);
  732. }
  733.  else if (((((T226*)C))->_capacity/*4*/)==(0)) {
  734. C->_storage=calloc(2,sizeof(int));
  735. C->_capacity=2;
  736. C->_upper=0;
  737. }
  738. else {
  739. _new_capacity=(2)*((((T226*)C))->_capacity/*4*/);
  740. C->_storage=r699realloc((((T226*)C))->_storage/*0*/,(((T226*)C))->_capacity/*4*/,_new_capacity);
  741. C->_capacity=_new_capacity;
  742. C->_upper=((((T226*)C))->_upper/*8*/)+(1);
  743. }
  744. /*FI*//*[IRF3.5put*/((((T226*)C))->_storage/*0*/)[(((T226*)C))->_upper/*8*/]=(a1);
  745. /*]*/
  746. }
  747.  
  748.