Ignore:
Timestamp:
Apr 12, 2017, 10:15:20 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
19518e8
Parents:
549950c (diff), 0d10090 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/c-bench.c

    r549950c r50b7e8c  
     1#include <stdio.h>
    12#include <stdlib.h>
    23#include "bench.h"
    34#include "c-pair.h"
    45#include "c-stack.h"
     6#include "c-print.h"
    57
    68_Bool* new_bool( _Bool b ) {
     
    8991        )
    9092        free_pair_bool_char( max2 );
     93
     94        FILE* out = fopen("c-out.txt", "w");
     95        REPEAT_TIMED( "print_int",
     96                print( out, "dsds", rand(), ":", rand(), "\n" );
     97        )
     98
     99        REPEAT_TIMED( "print_pair",
     100                struct pair p1 = ((struct pair){ new_bool(rand() & 0x1), new_char(rand() & 0x7F) });
     101                struct pair p2 = ((struct pair){ new_bool(rand() & 0x1), new_char(rand() & 0x7F) });
     102                print( out, "pbcspbcs", p1, ":", p2, "\n" );
     103                free(p1.first); free(p1.second);
     104                free(p2.first); free(p2.second);
     105        )
     106        fclose(out);
    91107}
Note: See TracChangeset for help on using the changeset viewer.