PageRenderTime 77ms CodeModel.GetById 16ms app.highlight 53ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/test_overload01.c

http://github.com/tybor/Liberty
C | 921 lines | 718 code | 61 blank | 142 comment | 44 complexity | 807e5ed8d89ae891c83ded8537ab11dd MD5 | raw file
  1#ifdef __cplusplus
  2extern "C" {
  3#endif
  4/*
  5ANSI C code generated by SmartEiffel The GNU Eiffel Compiler, Eiffel tools and libraries
  6Release 2.4 (??? June ??th 2008) [????]
  7Copyright (C), 1994-2002 - INRIA - LORIA - ESIAL UHP Nancy 1 - FRANCE
  8Copyright (C), 2003-2005 - INRIA - LORIA - IUT Charlemagne Nancy 2 - FRANCE
  9D.COLNET, P.RIBET, C.ADRIAN, V.CROIZIER F.MERIZEN - SmartEiffel@loria.fr
 10http://SmartEiffel.loria.fr
 11C Compiler options used: -pipe -Os
 12*/
 13
 14#ifdef __cplusplus
 15}
 16#endif
 17#include "test_overload01.h"
 18#ifdef __cplusplus
 19extern "C" {
 20#endif
 21/*
 22-- ------------------------------------------------------------------------------------------------------------
 23-- Copyright notice below. Please read.
 24--
 25-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
 26-- Copyright(C) 2003-2005: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
 27--
 28-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
 29--
 30-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 31-- documentation files (the "Software"), to deal in the Software without restriction, including without
 32-- limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 33-- the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
 34-- conditions:
 35--
 36-- The above copyright notice and this permission notice shall be included in all copies or substantial
 37-- portions of the Software.
 38--
 39-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 40-- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
 41-- EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 42-- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 43-- OR OTHER DEALINGS IN THE SOFTWARE.
 44--
 45-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
 46-- ------------------------------------------------------------------------------------------------------------
 47*/
 48/*
 49  This file (SmartEiffel/sys/runtime/base.c) is included for _all_ modes of
 50  compilation (-boost, -no_check, ... -all_check).
 51*/
 52
 53/*
 54  Byte swapping function
 55*/
 56void copy_swap_16(const uint16_t *src, uint16_t *dest, int count){
 57  while (count--) {
 58    *dest++ = (*src << 8) | (*src >> 8);
 59    src++;
 60  }
 61}
 62
 63
 64/*
 65  The wrapper for `malloc' (generated C code is supposed to use
 66  only `se_malloc' instead of direct `malloc').
 67*/
 68void* se_malloc(size_t size) {
 69  void *result = malloc(size);
 70  if (result == NULL) {
 71    handle(SE_HANDLE_NO_MORE_MEMORY, NULL);
 72#ifdef SE_EXCEPTIONS
 73    internal_exception_handler(No_more_memory);
 74#elif !defined(SE_BOOST)
 75    error0("No more memory.", NULL);
 76#else
 77  fprintf(SE_ERR,"No more memory (malloc failed).\n");
 78  exit(EXIT_FAILURE);
 79#endif
 80  }
 81  return result;
 82}
 83
 84/*
 85  The wrapper for `calloc' (generated C code is supposed to use
 86  only `se_calloc' instead of direct `calloc').
 87*/
 88void* se_calloc(size_t nmemb, size_t size) {
 89  void *result = calloc(nmemb,size);
 90  if (result == NULL) {
 91    handle(SE_HANDLE_NO_MORE_MEMORY, NULL);
 92#ifdef SE_EXCEPTIONS
 93    internal_exception_handler(No_more_memory);
 94#elif !defined(SE_BOOST)
 95    error0("No more memory.", NULL);
 96#else
 97  fprintf(SE_ERR,"No more memory (calloc failed).\n");
 98  exit(EXIT_FAILURE);
 99#endif
100  }
101  return result;
102}
103
104/*
105  The wrapper for `realloc' (generated C code is supposed to use
106  only `se_realloc' instead of direct `realloc').
107*/
108void* se_realloc(void* src, size_t size) {
109  void *result = realloc(src, size);
110  if (result == NULL) {
111    handle(SE_HANDLE_NO_MORE_MEMORY, NULL);
112#ifdef SE_EXCEPTIONS
113    internal_exception_handler(No_more_memory);
114#elif !defined(SE_BOOST)
115    error0("No more memory.", NULL);
116#else
117  fprintf(SE_ERR,"No more memory (realloc failed).\n");
118  exit(EXIT_FAILURE);
119#endif
120  }
121  return result;
122}
123
124/* ---------------------------------------------------------------------- */
125
126void se_die (int code) {
127  handle(SE_HANDLE_DIE_WITH_CODE, &code);
128  exit(code);
129}
130
131/*
132    Runtime hooks
133 */
134
135static se_runtime_handler_t** handlers = NULL;
136int handlers_count=0;
137
138void register_handler(se_runtime_handler_t*handler) {
139  int new_count = handlers_count + 1;
140  handlers = (se_runtime_handler_t**)se_realloc(handlers, (new_count) * sizeof(void*));
141  handlers[handlers_count] = handler;
142  handlers_count = new_count;
143}
144
145void _handle(se_handler_action_t action, void*data) {
146  int i;
147  for (i = 0; i < handlers_count; i++) {
148    handlers[i](action, data);
149    /* *** Check type of this array. Function pointer may have different size from data pointer. (PH 17/07/08) */
150  }
151}
152/*
153-- ------------------------------------------------------------------------------------------------------------
154-- Copyright notice below. Please read.
155--
156-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
157-- Copyright(C) 2003-2005: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
158--
159-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
160--
161-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
162-- documentation files (the "Software"), to deal in the Software without restriction, including without
163-- limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
164-- the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
165-- conditions:
166--
167-- The above copyright notice and this permission notice shall be included in all copies or substantial
168-- portions of the Software.
169--
170-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
171-- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
172-- EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
173-- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
174-- OR OTHER DEALINGS IN THE SOFTWARE.
175--
176-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
177-- ------------------------------------------------------------------------------------------------------------
178*/
179#if defined __USE_POSIX || defined __unix__ || defined _POSIX_C_SOURCE
180/* macro read is used of read_stdin */
181
182void io_copy (char*source, char*target) {
183  /* We use the low-level descriptor functions rather than stream-oriented functions.
184   * This allows us to copy the file's permissions. */
185
186  int src;
187  int tgt;
188  struct stat info;
189  static char *buffer = NULL;
190  static int bufsize = 0;
191  int read_count, write_count, written;
192
193  src=open (source, O_RDONLY);
194  if (fstat (src, &info))
195    return; /* Ooops */
196  if (bufsize < info.st_blksize)
197    buffer=se_realloc (buffer, info.st_blksize);
198  tgt=creat (target, info.st_mode);
199  do {
200    read_count = read (src, buffer, info.st_blksize);
201    write_count = 0; written = 0;
202    while  ((write_count < read_count) && (written >= 0))
203      {
204	written = write (tgt, buffer + write_count, read_count - write_count);
205	write_count += written;
206      }
207  } while ((read_count > 0) && (written >= 0));
208  close (src);
209  close (tgt);
210}
211
212int io_same_physical_file(char*path1,char*path2) {
213  struct stat info1, info2;
214  if (stat(path1, &info1))
215    return 0; /* oops */
216  if (stat(path2, &info2))
217    return 0; /* oops */
218  return (info1.st_dev == info2.st_dev) && (info1.st_ino == info2.st_ino);
219}
220
221#else
222#define IO_COPY_BUFSIZE 4096
223
224int read_stdin(EIF_CHARACTER *buffer, int size) {
225  int c;
226  c = getc(stdin);
227  if (c==EOF)
228    return 0;
229  *buffer = (EIF_CHARACTER)c;
230  return 1;
231}
232
233void io_copy(char*source, char*target) {
234  static char *buffer = NULL;
235  int read_count;
236  FILE*src=fopen(source, "rb");
237  FILE*tgt=fopen(target, "wb");
238
239  if(!buffer)
240    buffer = (char*)se_malloc(IO_COPY_BUFSIZE);
241
242  while ((read_count = fread(buffer, 1, IO_COPY_BUFSIZE, src)), read_count) {
243    size_t dummy = fwrite(buffer, 1, read_count, tgt);
244  }
245  fclose(src);
246  fclose(tgt);
247}
248
249int io_same_physical_file(char*path1,char*path2) {
250  /* default implementation returns true only if the paths are the same */
251  return !strcmp(path1, path2);
252}
253#endif
254
255int io_file_exists(char*source) {
256  FILE*src=fopen(source, "rb");
257  if (src!=NULL) {
258    fclose(src);
259    return 1;
260  }
261  else {
262    return (errno != ENOENT);
263  }
264}
265T53 M53={0};
266T7 M7={(void*)0,0,0};
267T49 M49={0,(void*)0,0};
268T25 M25={0,(void*)0};
269/*Aliased storage area or unicode storage.*/
270char*s26_0="";
271char*s26_212160365="require_check";
272char*s26_48390502="all_check";
273char*s26_1690381566="invariant_check";
274char*s26_1992063831="ensure_check";
275char*s26_1325941860="ERROR: \173""EIFFELTEST_TOOLS\175"".assert call ";
276char*s26_113001857=" in class ";
277char*s26_2167877="number ";
278char*s26_718083334="no_check or boost";
279char*s26_1075456615="Assertion level was ";
280char*s26_265093627="loop_check";
281char*s26_1682790378=" failed.\nRerun this test under the -sedb debugger to find out what is going wrong.\n";
282/*
283-- ------------------------------------------------------------------------------------------------------------
284-- Copyright notice below. Please read.
285--
286-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
287-- Copyright(C) 2003-2005: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
288--
289-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
290--
291-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
292-- documentation files (the "Software"), to deal in the Software without restriction, including without
293-- limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
294-- the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
295-- conditions:
296--
297-- The above copyright notice and this permission notice shall be included in all copies or substantial
298-- portions of the Software.
299--
300-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
301-- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
302-- EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
303-- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
304-- OR OTHER DEALINGS IN THE SOFTWARE.
305--
306-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
307-- ------------------------------------------------------------------------------------------------------------
308*/
309void se_print_run_time_stack (void) {
310  handle(SE_HANDLE_ENTER_PRINT_STACK, NULL);
311  fprintf(SE_ERR,"Eiffel program crash at run time.\n");
312  fprintf(SE_ERR,"No trace when using option \"-boost\"\n");
313  handle(SE_HANDLE_EXIT_PRINT_STACK, NULL);
314}
315
316void se_signal_handler(int sig) {
317  handle(SE_HANDLE_RUNTIME_ERROR, NULL);
318  printf("Received signal %d.\n",sig);
319  se_print_run_time_stack();
320  exit(EXIT_FAILURE);
321}
322
323/*INTEGER_32*/void r2append_in(T2 C,T0* a1){
324T2 _val=0;
325T2 _i=0;
326T2 _idx=0;
327if((C)==(INT8_C(0))){
328r7extend(((T7*)a1),((T3)'0'));
329}
330else{
331if(((int32_t)(C))>(INT32_C(0))){
332_val=C;
333_i=((int32_t)((/*RF2*/(((T7*)a1))->_count/*3p*/)))+(INT32_C(1));
334}
335else{
336r7extend(((T7*)a1),((T3)'\055'));
337_i=((int32_t)((/*RF2*/(((T7*)a1))->_count/*3p*/)))+(INT32_C(1));
338_val=((int32_t)(C))%(INT32_C(10));
339if(((int32_t)(_val))<=(INT32_C(0))){
340r7extend(((T7*)a1),r2decimal_digit(-(_val)));
341_val=-(((int32_t)(C))/(INT32_C(10)));
342}
343else{
344r7extend(((T7*)a1),r2decimal_digit(((int32_t)(-(_val)))+(INT32_C(10))));
345_val=((int32_t)(-(((int32_t)(C))/(INT32_C(10)))))-(INT32_C(1));
346}
347}
348while(!((_val)==(INT8_C(0))))
349{
350r7extend(((T7*)a1),r2decimal_digit(((int32_t)(_val))%(INT32_C(10))));
351_val=((int32_t)(_val))/(INT32_C(10));
352}
353_idx=(/*RF2*/(((T7*)a1))->_count/*3p*/);
354while(!(((int32_t)(_i))>=(_idx)))
355{
356r7swap(((T7*)a1),_i,_idx);
357_idx=((int32_t)(_idx))-(INT32_C(1));
358_i=((int32_t)(_i))+(INT32_C(1));
359}
360}
361}/*--*/
362
363/*INTEGER_32*/T3 r2decimal_digit(T2 C){
364T3 R=0;
365R=((T3)(((int32_t)(C))+(INT32_C(48))));
366return R;
367}/*--*/
368
369/*INTEGER_32*/T2 r2max(T2 C,T2 a1){
370T2 R=0;
371if(((int32_t)(C))>=(a1)){
372R=C;
373}
374else{
375R=a1;
376}
377return R;
378}/*--*/
379
380/*NATIVE_ARRAY[CHARACTER]*/T9 r9realloc(T9 C,T2 a1,T2 a2){
381T9 R=(void*)0;
382R=((T9)(se_calloc(a2,sizeof(T3))));
383r9copy_from(R,C,((int32_t)(a1))-(INT32_C(1)));
384return R;
385}/*--*/
386
387/*NATIVE_ARRAY[CHARACTER]*/void r9copy_from(T9 C,T9 a1,T2 a2){
388T2 _i=0;
389_i=a2;
390while(!(((int32_t)(_i))<(INT32_C(0))))
391{
392(C)[_i]=((a1)[_i]);
393_i=((int32_t)(_i))-(INT32_C(1));
394}
395}/*--*/
396
397/*NATIVE_ARRAY[CHARACTER]*/void r9clear_all(T9 C,T2 a1){
398T3 _v=0;
399T2 _i=0;
400_i=a1;
401while(!(((int32_t)(_i))<(INT32_C(0))))
402{
403(C)[_i]=(_v);
404_i=((int32_t)(_i))-(INT32_C(1));
405}
406}/*--*/
407
408/*STRING*/void r7swap(T7* C,T2 a1,T2 a2){
409T3 _tmp=0;
410_tmp=r7item(C,a1);
411r7put(C,r7item(C,a2),a1);
412r7put(C,_tmp,a2);
413}/*--*/
414
415/*STRING*/T3 r7item(T7* C,T2 a1){
416T3 R=0;
417R=((/*RF2*/(C)->_storage/*3p*/))[((int32_t)(a1))-(INT32_C(1))];
418return R;
419}/*--*/
420
421/*STRING*/void r7copy(T7* C,T0* a1){
422T2 _c=0;
423_c=(/*RF2*/(((T7*)a1))->_count/*3p*/);
424if(((int32_t)(_c))>(INT32_C(0))){
425if(((int32_t)((/*RF2*/(C)->_capacity/*3p*/)))<(_c)){
426/*SFN*/(C->_storage/*3p*/)=((T9)(se_calloc(_c,sizeof(T3))));
427/*SFN*/(C->_capacity/*3p*/)=_c;
428}
429r9copy_from((/*RF2*/(C)->_storage/*3p*/),(/*RF2*/(((T7*)a1))->_storage/*3p*/),((int32_t)(_c))-(INT32_C(1)));
430}
431/*SFN*/(C->_count/*3p*/)=_c;
432}/*--*/
433
434/*STRING*/void r7put(T7* C,T3 a1,T2 a2){
435((/*RF2*/(C)->_storage/*3p*/))[((int32_t)(a2))-(INT32_C(1))]=(a1);
436}/*--*/
437
438/*STRING*/void r7extend(T7* C,T3 a1){
439if(((/*RF2*/(C)->_count/*3p*/))==((/*RF2*/(C)->_capacity/*3p*/))){
440r7ensure_capacity(C,((int32_t)((/*RF2*/(C)->_count/*3p*/)))+(INT32_C(1)));
441}
442((/*RF2*/(C)->_storage/*3p*/))[(/*RF2*/(C)->_count/*3p*/)]=(a1);
443/*SFN*/(C->_count/*3p*/)=((int32_t)((/*RF2*/(C)->_count/*3p*/)))+(INT32_C(1));
444}/*--*/
445
446/*STRING*/void r7ensure_capacity(T7* C,T2 a1){
447T2 _new_capacity=0;
448if(((NULL!=((void*)((/*RF2*/(C)->_storage/*3p*/)))))==(0)){
449_new_capacity=r2max(a1,INT32_C(32));
450/*SFN*/(C->_storage/*3p*/)=((T9)(se_calloc(_new_capacity,sizeof(T3))));
451/*SFN*/(C->_capacity/*3p*/)=_new_capacity;
452}
453else{
454if(((int32_t)((/*RF2*/(C)->_capacity/*3p*/)))<(a1)){
455_new_capacity=r2max(a1,(int32_t)(((uint32_t)((/*RF2*/(C)->_capacity/*3p*/)))*((uint32_t)(INT32_C(2)))));
456/*SFN*/(C->_storage/*3p*/)=r9realloc((/*RF2*/(C)->_storage/*3p*/),(/*RF2*/(C)->_capacity/*3p*/),_new_capacity);
457/*SFN*/(C->_capacity/*3p*/)=_new_capacity;
458}
459}
460}/*--*/
461
462/*COUNTER*/void r53increment(T53* C){
463/*SFN*/(C->_value/*p*/)=((int32_t)((/*RF2*/(C)->_value/*p*/)))+(INT32_C(1));
464}/*--*/
465T0*oBC13std_output=(void*)0;
466int fBC13std_output=0;
467
468/*STD_OUTPUT*/T0* r49std_output(void){
469/*[INTERNAL_C_LOCAL list*/
470T0* tmp0;
471/*INTERNAL_C_LOCAL list]*/
472if(fBC13std_output==0){fBC13std_output=1;{
473tmp0/*new*/=((T0*)se_malloc(sizeof(T49)))/*3p*/;
474*((T49*)tmp0/*new*/)=M49;
475r49make(((T49*)tmp0/*new*/));
476oBC13std_output=tmp0/*new*/;
477/*tmp0.unlock*/
478}}
479return oBC13std_output;
480}/*--*/
481
482/*STD_OUTPUT*/void r49filtered_flush(T49* C){
483if(((int32_t)((/*RF2*/(C)->_buffer_position/*3p*/)))>(INT32_C(0))){
484r49write_buffer(C);
485}
486io_flush((stdout));
487}/*--*/
488
489/*STD_OUTPUT*/void r49filtered_put_character(T49* C,T3 a1){
490if(((int32_t)((/*RF2*/(C)->_buffer_position/*3p*/)))>=(INT32_C(4096))){
491r49write_buffer(C);
492}
493((/*RF2*/(C)->_buffer/*3p*/))[(/*RF2*/(C)->_buffer_position/*3p*/)]=(a1);
494/*SFN*/(C->_buffer_position/*3p*/)=((int32_t)((/*RF2*/(C)->_buffer_position/*3p*/)))+(INT32_C(1));
495if((a1)==(((T3)'\n'))){
496r49write_buffer(C);
497}
498}/*--*/
499
500/*STD_OUTPUT*/void r49se_atexit(void){
501r49filtered_flush((T49*)(r49std_output()));
502}/*--*/
503
504/*STD_OUTPUT*/void r49make(T49* C){
505/*SFN*/(C->_buffer/*3p*/)=((T9)(se_calloc(INT32_C(4096),sizeof(T3))));
506/*SFN*/(C->_capacity/*3p*/)=INT32_C(4096);
507}/*--*/
508
509/*STD_OUTPUT*/void r49write_buffer(T49* C){
510T2 _unused_result=0;
511if(((int32_t)((/*RF2*/(C)->_buffer_position/*3p*/)))>(INT32_C(0))){
512_unused_result=io_fwrite((/*RF2*/(C)->_buffer/*3p*/),(/*RF2*/(C)->_buffer_position/*3p*/),(stdout));
513/*SFN*/(C->_buffer_position/*3p*/)=INT32_C(0);
514}
515}/*--*/
516
517/*STD_OUTPUT*/void r49flush(T49* C){
518r49filtered_flush(C);
519}/*--*/
520
521/*STD_OUTPUT*/void r49put_string(T49* C,T0* a1){
522T2 _i=0;
523T2 _count=0;
524_i=INT32_C(1);
525_count=(/*RF2*/(((T7*)a1))->_count/*3p*/);
526while(!(((int32_t)(_i))>(_count)))
527{
528r49filtered_put_character(C,r7item(((T7*)a1),_i));
529_i=((int32_t)(_i))+(INT32_C(1));
530}
531}/*--*/
532
533/*TEST_OVERLOAD01*/void r25default_create(T25* C){
534/*SFN*/(C->_external_object/*2p*/)=r25cpp_new();
535r25set_value(C,INT32_C(25));
536r25label_assert(C,(void*)0,(T6)((r25value(C))==(INT8_C(25))));
537}/*--*/
538
539/*TEST_OVERLOAD01*/T0* r25std_output(void){
540/*[INTERNAL_C_LOCAL list*/
541T0* tmp0;
542/*INTERNAL_C_LOCAL list]*/
543if(fBC13std_output==0){fBC13std_output=1;{
544tmp0/*new*/=((T0*)se_malloc(sizeof(T49)))/*3p*/;
545*((T49*)tmp0/*new*/)=M49;
546r49make(((T49*)tmp0/*new*/));
547oBC13std_output=tmp0/*new*/;
548/*tmp0.unlock*/
549}}
550return oBC13std_output;
551}/*--*/
552T0*oBC26assert_counter=(void*)0;
553
554/*TEST_OVERLOAD01*/T0* r25assertion_flag(T25* C){
555/*[INTERNAL_C_LOCAL list*/
556T2 tmp0;
557/*INTERNAL_C_LOCAL list]*/
558T0* R=(void*)0;
559tmp0/*inspectExpression*/=(/*RF2*/(C)->_assertion_level/*2p*/);
560/*[inspect*/
561switch(tmp0/*inspectExpression*/){
562case 5:
563R=ms26_48390502;
564break;
565case 4:
566R=ms26_265093627;
567break;
568case 3:
569R=ms26_1690381566;
570break;
571case 2:
572R=ms26_1992063831;
573break;
574case 1:
575R=ms26_212160365;
576break;
577default:;
578R=ms26_718083334;
579}
580/*inspect]*/
581return R;
582}/*--*/
583
584/*TEST_OVERLOAD01*/void r25label_assert(T25* C,T0* a1,T6 a2){
585T0* _actual_label=(void*)0;
586r53increment(((T53*)oBC26assert_counter));
587if((a2)==(0)){
588if((a1)!=((void*)((void*)0))){
589_actual_label=a1;
590}
591else{
592_actual_label=ms26_0;
593r7copy(((T7*)_actual_label),ms26_2167877);
594r2append_in((/*RF2*/(((T53*)oBC26assert_counter))->_value/*p*/),_actual_label);
595}
596r49put_string((T49*)(r25std_output()),ms26_1325941860);
597r49put_string((T49*)(r25std_output()),_actual_label);
598r49put_string((T49*)(r25std_output()),ms26_113001857);
599r49put_string((T49*)(r25std_output()),(T0*)(g[25]));
600r49put_string((T49*)(r25std_output()),ms26_1682790378);
601r49put_string((T49*)(r25std_output()),ms26_1075456615);
602r49put_string((T49*)(r25std_output()),r25assertion_flag(C));
603r49filtered_put_character((T49*)(r25std_output()),((T3)'\056'));
604r49filtered_put_character((T49*)(r25std_output()),((T3)'\n'));
605}
606}/*--*/
607
608/*TEST_OVERLOAD01*/T2 r25value(T25* C){
609T2 R=0;
610R=r25cpp_value((/*RF2*/(C)->_external_object/*2p*/));
611return R;
612}/*--*/
613/* Extra external prototype for line 44 of /home/cyril/SmartEiffel/se/trunk/test_suite/language/unclassified/test_overload01.e:*/
614void cpp25cpp_set_value(T8 a1,T2 a2);
615
616/*TEST_OVERLOAD01*/void r25cpp_set_value(T8 a1,T2 a2){
617cpp25cpp_set_value(a1,a2);
618}/*--*/
619/* Extra external prototype for line 51 of /home/cyril/SmartEiffel/se/trunk/test_suite/language/unclassified/test_overload01.e:*/
620T8 cpp25cpp_new(void);
621
622/*TEST_OVERLOAD01*/T8 r25cpp_new(void){
623T8 R=(void*)0;
624R=cpp25cpp_new();
625return R;
626}/*--*/
627/* Extra external prototype for line 37 of /home/cyril/SmartEiffel/se/trunk/test_suite/language/unclassified/test_overload01.e:*/
628T2 cpp25cpp_value(T8 a1);
629
630/*TEST_OVERLOAD01*/T2 r25cpp_value(T8 a1){
631T2 R=0;
632R=cpp25cpp_value(a1);
633return R;
634}/*--*/
635
636/*TEST_OVERLOAD01*/void r25set_value(T25* C,T2 a1){
637r25cpp_set_value((/*RF2*/(C)->_external_object/*2p*/),a1);
638}/*--*/
639T0*ms26_718083334;
640T0*ms26_2167877;
641T0*ms26_1992063831;
642T0*ms26_1325941860;
643T0*ms26_0;
644T0*ms26_1690381566;
645T0*ms26_113001857;
646T0*ms26_265093627;
647T0*ms26_212160365;
648T0*ms26_48390502;
649T0*ms26_1682790378;
650T0*ms26_1075456615;
651
652T0*se_ms(int c,char*e){
653/* Allocate a Manifest STRING.*/
654T7*s=((T7*)se_malloc(sizeof(T7)));
655s->_count=c;
656s->_capacity=c+1;
657s->_storage=((T9)se_malloc(c+1));
658memcpy(s->_storage,e,c+1);
659return((T0*)s);}/*--*/
660
661T0*se_string(char*e){
662/* Allocate an Eiffel STRING by copying C char*e */
663int c=strlen(e);
664T7*s=((T7*)se_malloc(sizeof(T7)));
665s->_count=c;
666s->_capacity=c+1;
667s->_storage=((T9)se_malloc(c+1));
668memcpy(s->_storage,e,c+1);
669return((T0*)s);}/*--*/
670
671void se_msi1(void){
672ms26_718083334=se_ms(17,s26_718083334);
673ms26_2167877=se_ms(7,s26_2167877);
674ms26_1992063831=se_ms(12,s26_1992063831);
675ms26_1325941860=se_ms(38,s26_1325941860);
676ms26_0=se_ms(0,s26_0);
677ms26_1690381566=se_ms(15,s26_1690381566);
678ms26_113001857=se_ms(10,s26_113001857);
679ms26_265093627=se_ms(10,s26_265093627);
680ms26_212160365=se_ms(13,s26_212160365);
681ms26_48390502=se_ms(9,s26_48390502);
682ms26_1682790378=se_ms(83,s26_1682790378);
683ms26_1075456615=se_ms(20,s26_1075456615);
684}/*--*/
685T25*eiffel_root_object=(void*)0;
686int se_argc;
687char**se_argv;
688T7*g[164];
689
690void se_atexit(void){
691r49se_atexit();
692}/*--*/
693
694void initialize_eiffel_runtime(int argc,char*argv[]){
695/*[INTERNAL_C_LOCAL list*/
696T0* tmp0;
697/*INTERNAL_C_LOCAL list]*/
698se_argc=argc;
699se_argv=argv;
700atexit(se_atexit);
701g[25]=(T7*)se_string("TEST_OVERLOAD01");
702g[85]=(T7*)se_string("PROCEDURE");
703g[101]=(T7*)se_string("MEMORY");
704g[15]=(T7*)se_string("TUPLE 1");
705g[16]=(T7*)se_string("TUPLE 2");
706g[76]=(T7*)se_string("ROUTINE");
707g[17]=(T7*)se_string("TUPLE 3");
708g[18]=(T7*)se_string("TUPLE 4");
709g[19]=(T7*)se_string("TUPLE 5");
710g[20]=(T7*)se_string("TUPLE 6");
711g[21]=(T7*)se_string("TUPLE 7");
712g[22]=(T7*)se_string("TUPLE 8");
713g[23]=(T7*)se_string("TUPLE 9");
714g[14]=(T7*)se_string("TUPLE");
715g[24]=(T7*)se_string("TUPLE 10");
716g[8]=(T7*)se_string("POINTER");
717g[153]=(T7*)se_string("REFERENCE");
718g[75]=(T7*)se_string("FUNCTION");
719g[6]=(T7*)se_string("BOOLEAN");
720g[56]=(T7*)se_string("SAFE_EQUAL");
721g[13]=(T7*)se_string("ANY");
722g[122]=(T7*)se_string("WEAK_REFERENCE");
723g[38]=(T7*)se_string("PLATFORM");
724g[84]=(T7*)se_string("INTERNALS_HANDLER");
725g[105]=(T7*)se_string("NATIVE_ARRAY_INTERNALS");
726g[47]=(T7*)se_string("TYPED_INTERNALS");
727g[78]=(T7*)se_string("NATIVE_ARRAY_COLLECTOR");
728g[48]=(T7*)se_string("INTERNALS");
729g[74]=(T7*)se_string("COLLECTION");
730g[94]=(T7*)se_string("STACK");
731g[107]=(T7*)se_string("SIMPLE_DICTIONARY");
732g[108]=(T7*)se_string("DICTIONARY");
733g[92]=(T7*)se_string("FAST_ARRAY");
734g[77]=(T7*)se_string("ARRAY");
735g[106]=(T7*)se_string("HASHED_DICTIONARY");
736g[55]=(T7*)se_string("NATIVE_ARRAY");
737g[114]=(T7*)se_string("STRING_RECYCLING_ITEM");
738g[93]=(T7*)se_string("RECYCLING_POOL");
739g[100]=(T7*)se_string("STRING_RECYCLING_POOL");
740g[140]=(T7*)se_string("STRING_RECYCLING_ITEM_SORTER");
741g[121]=(T7*)se_string("ANY_HASHED_DICTIONARY_NODE");
742g[79]=(T7*)se_string("ARRAYED_COLLECTION");
743g[120]=(T7*)se_string("HASHED_DICTIONARY_NODE");
744g[109]=(T7*)se_string("HASH_TABLE_SIZE");
745g[130]=(T7*)se_string("DIRECTORY_NOTATION");
746g[54]=(T7*)se_string("FILTER");
747g[27]=(T7*)se_string("OUTPUT_STREAM");
748g[148]=(T7*)se_string("PATH_NAME");
749g[82]=(T7*)se_string("FILTER_INPUT_STREAM");
750g[40]=(T7*)se_string("TERMINAL_OUTPUT_STREAM");
751g[154]=(T7*)se_string("FILE_TOOLS");
752g[44]=(T7*)se_string("TERMINAL_INPUT_STREAM");
753g[43]=(T7*)se_string("TERMINAL_INPUT_OUTPUT_STREAM");
754g[71]=(T7*)se_string("FILTER_OUTPUT_STREAM");
755g[45]=(T7*)se_string("INPUT_STREAM");
756g[28]=(T7*)se_string("STREAM");
757g[66]=(T7*)se_string("FILE");
758g[65]=(T7*)se_string("TEXT_FILE_READ");
759g[126]=(T7*)se_string("TEXT_FILE_READ_WRITE");
760g[42]=(T7*)se_string("STD_INPUT_OUTPUT");
761g[39]=(T7*)se_string("STD_ERROR");
762g[124]=(T7*)se_string("TEXT_FILE_WRITE");
763g[50]=(T7*)se_string("STD_INPUT");
764g[49]=(T7*)se_string("STD_OUTPUT");
765g[46]=(T7*)se_string("INPUT_STREAM_TOOLS");
766g[32]=(T7*)se_string("OUTPUT_STREAM_TOOLS");
767g[41]=(T7*)se_string("REDIRECTION_TOOLS");
768g[147]=(T7*)se_string("BASIC_DIRECTORY");
769g[150]=(T7*)se_string("UNIXISH_PATH_NAME");
770g[31]=(T7*)se_string("FILTERABLE");
771g[129]=(T7*)se_string("PATH_JOINER");
772g[149]=(T7*)se_string("POSIX_PATH_NAME");
773g[128]=(T7*)se_string("PATH_NAME_NOTATION");
774g[157]=(T7*)se_string("MACINTOSH_DIRECTORY_NOTATION");
775g[158]=(T7*)se_string("OPENVMS_DIRECTORY_NOTATION");
776g[161]=(T7*)se_string("MICROSOFT_PATH_NAME");
777g[160]=(T7*)se_string("WINDOWS_DIRECTORY_NOTATION");
778g[127]=(T7*)se_string("UNIX_DIRECTORY_NOTATION");
779g[159]=(T7*)se_string("AMIGA_DIRECTORY_NOTATION");
780g[162]=(T7*)se_string("CYGWIN_DIRECTORY_NOTATION");
781g[156]=(T7*)se_string("UNICODE_STRING_HANDLER");
782g[73]=(T7*)se_string("ITERATOR");
783g[103]=(T7*)se_string("ITERATOR_ON_TRAVERSABLE");
784g[95]=(T7*)se_string("ITERATOR_ON_UNICODE_STRING");
785g[119]=(T7*)se_string("ITERATOR_ON_DICTIONARY_ITEMS");
786g[81]=(T7*)se_string("ITERATOR_ON_STRING");
787g[123]=(T7*)se_string("ITERATOR_ON_DICTIONARY_KEYS");
788g[141]=(T7*)se_string("ABSTRACT_SORTER");
789g[53]=(T7*)se_string("COUNTER");
790g[26]=(T7*)se_string("EIFFELTEST_TOOLS");
791g[104]=(T7*)se_string("MINI_PARSER_BUFFER");
792g[102]=(T7*)se_string("EVENTS_SET");
793g[69]=(T7*)se_string("EVENT_DESCRIPTOR");
794g[83]=(T7*)se_string("CAN_READ_DATA_FROM_STREAM");
795g[146]=(T7*)se_string("NETWORK_CONNECTION_OCCURRED");
796g[70]=(T7*)se_string("STREAM_EXCEPTION");
797g[72]=(T7*)se_string("CAN_WRITE_DATA_TO_STREAM");
798g[30]=(T7*)se_string("RECYCLABLE");
799g[29]=(T7*)se_string("DISPOSABLE");
800g[34]=(T7*)se_string("TRAVERSABLE");
801g[37]=(T7*)se_string("HASHABLE");
802g[35]=(T7*)se_string("STORABLE");
803g[36]=(T7*)se_string("COMPARABLE");
804g[12]=(T7*)se_string("REAL_EXTENDED");
805g[59]=(T7*)se_string("REAL_GENERAL");
806g[62]=(T7*)se_string("NATURAL_64");
807g[2]=(T7*)se_string("INTEGER_32");
808g[63]=(T7*)se_string("NUMBER");
809g[4]=(T7*)se_string("REAL_32");
810g[1]=(T7*)se_string("INTEGER_8");
811g[88]=(T7*)se_string("MUTABLE_BIG_INTEGER");
812g[11]=(T7*)se_string("INTEGER_64");
813g[80]=(T7*)se_string("NUMBER_TOOLS");
814g[51]=(T7*)se_string("INTEGER_GENERAL");
815g[5]=(T7*)se_string("REAL_64");
816g[57]=(T7*)se_string("NATURAL_16");
817g[52]=(T7*)se_string("NUMERIC");
818g[61]=(T7*)se_string("NATURAL_32");
819g[60]=(T7*)se_string("NATURAL_8");
820g[58]=(T7*)se_string("NATURAL_GENERAL");
821g[10]=(T7*)se_string("INTEGER_16");
822g[89]=(T7*)se_string("FRACTION_WITH_BIG_INTEGER_NUMBER");
823g[86]=(T7*)se_string("INTEGER_64_NUMBER");
824g[87]=(T7*)se_string("INTEGER_GENERAL_NUMBER");
825g[90]=(T7*)se_string("FRACTION_GENERAL_NUMBER");
826g[91]=(T7*)se_string("BIG_INTEGER_NUMBER");
827g[64]=(T7*)se_string("UNICODE_STRING");
828g[3]=(T7*)se_string("CHARACTER");
829g[7]=(T7*)se_string("STRING");
830g[33]=(T7*)se_string("STRING_HANDLER");
831g[163]=(T7*)se_string("TIME_FORMATTER");
832g[142]=(T7*)se_string("TIME");
833g[115]=(T7*)se_string("MICROSECOND_TIME");
834g[143]=(T7*)se_string("TIME_HANDLER");
835g[67]=(T7*)se_string("URL");
836g[135]=(T7*)se_string("ADDRESS");
837g[97]=(T7*)se_string("PROTOCOL");
838g[99]=(T7*)se_string("RESOURCE_LOCATOR");
839g[133]=(T7*)se_string("ACCESS");
840g[136]=(T7*)se_string("SOCKET_INPUT_OUTPUT_STREAM");
841g[96]=(T7*)se_string("PROTOCOLS");
842g[68]=(T7*)se_string("URL_VALIDITY");
843g[134]=(T7*)se_string("HOST");
844g[152]=(T7*)se_string("IP_ADDRESS");
845g[132]=(T7*)se_string("TCP_ACCESS");
846g[116]=(T7*)se_string("SOCKET_SERVER");
847g[151]=(T7*)se_string("CLIENT_SOCKET_INPUT_OUTPUT_STREAM");
848g[145]=(T7*)se_string("SERVER_SOCKET_INPUT_OUTPUT_STREAM");
849g[117]=(T7*)se_string("SOCKET_PLUG_IN");
850g[118]=(T7*)se_string("SOCKET_HANDLER");
851g[144]=(T7*)se_string("SOCKET");
852g[98]=(T7*)se_string("STREAM_PROTOCOL");
853g[138]=(T7*)se_string("HTTP_CLIENT_INPUT_STREAM");
854g[110]=(T7*)se_string("FILE_PROTOCOL");
855g[111]=(T7*)se_string("HTTP_PROTOCOL");
856g[112]=(T7*)se_string("TCP_PROTOCOL");
857g[137]=(T7*)se_string("HTTP_PROXY");
858g[139]=(T7*)se_string("HTTP_CLIENT_OUTPUT_STREAM");
859g[125]=(T7*)se_string("FILE_RESOURCE_LOCATOR");
860g[113]=(T7*)se_string("NETWORK_RESOURCE_VALIDITY");
861g[131]=(T7*)se_string("NETWORK_RESOURCE_LOCATOR");
862g[155]=(T7*)se_string("SYSTEM");
863g[9]=g[55];
864#ifdef SIGQUIT
865signal(SIGQUIT,se_signal_handler);
866#endif
867#ifdef SIGILL
868signal(SIGILL,se_signal_handler);
869#endif
870#ifdef SIGABRT
871signal(SIGABRT,se_signal_handler);
872#endif
873#ifdef SIGFPE
874signal(SIGFPE,se_signal_handler);
875#endif
876#ifdef SIGSEGV
877signal(SIGSEGV,se_signal_handler);
878#endif
879#ifdef SIGBUS
880signal(SIGBUS,se_signal_handler);
881#endif
882#ifdef SIGSYS
883signal(SIGSYS,se_signal_handler);
884#endif
885#ifdef SIGTRAP
886signal(SIGTRAP,se_signal_handler);
887#endif
888#ifdef SIGXCPU
889signal(SIGXCPU,se_signal_handler);
890#endif
891#ifdef SIGXFSZ
892signal(SIGXFSZ,se_signal_handler);
893#endif
894se_msi1();
895/*PCO*/
896tmp0/*new*/=((T0*)se_malloc(sizeof(T53)))/*p*/;
897*((T53*)tmp0/*new*/)=M53;
898oBC26assert_counter=tmp0/*new*/;
899/*tmp0.unlock*/
900/*reusing tmp0*/tmp0/*root*/=((T0*)se_malloc(sizeof(T25)))/*2p*/;
901*((T25*)tmp0/*root*/)=M25;
902eiffel_root_object=((T25*)tmp0/*root*/);
903/*tmp0.unlock*/
904}/*--*/
905
906int main(int argc,char*argv[]){
907/*[INTERNAL_C_LOCAL list*/
908T0* tmp0;
909/*INTERNAL_C_LOCAL list]*/
910initialize_eiffel_runtime(argc,argv);
911tmp0/*prof*/=((T0*)eiffel_root_object);
912r25default_create(((T25*)tmp0/*prof*/));
913handle(SE_HANDLE_NORMAL_EXIT, NULL);
914/*tmp0.unlock*/
915exit(0);
916return 0;
917}/*--*/
918
919#ifdef __cplusplus
920}
921#endif