Ignore:
Timestamp:
Apr 14, 2017, 5:03:43 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
952d201
Parents:
bbe856c (diff), 3fb7f5e (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-print.c

    rbbe856c r1504536  
    1717void print_fmt(FILE* out, char fmt, void* p) {
    1818        switch( fmt ) {
    19         case 's': print_string(out, (const char*)p); break;
    20         case 'b': print_bool(out, *(_Bool*)p); break;
    21         case 'c': print_char(out, *(char*)p); break;
    22         case 'd': print_int(out, *(int*)p); break;
     19        case 's': print_string(out, (const char*)p); break; /***/
     20        case 'b': print_bool(out, *(_Bool*)p); break; /***/
     21        case 'c': print_char(out, *(char*)p); break; /***/
     22        case 'd': print_int(out, *(int*)p); break; /***/
    2323        }
    2424}
     
    2929        for (const char* it = fmt; *it; ++it) {
    3030                switch( *it ) {
    31                 case 's': print_string(out, va_arg(args, const char*)); break;
    32                 case 'b': print_bool(out, va_arg(args, int)); break;
    33                 case 'c': print_char(out, va_arg(args, int)); break;
    34                 case 'd': print_int(out, va_arg(args, int)); break;
     31                case 's': print_string(out, va_arg(args, const char*)); break; /***/
     32                case 'b': print_bool(out, va_arg(args, int)); break; /***/
     33                case 'c': print_char(out, va_arg(args, int)); break; /***/
     34                case 'd': print_int(out, va_arg(args, int)); break; /***/
    3535                case 'p': {
    36                         const struct pair x = va_arg(args, const struct pair);
     36                        const struct pair x = va_arg(args, const struct pair); /***/
    3737                        fprintf(out, "[");
    38                         print_fmt(out, *++it, x.first);
     38                        print_fmt(out, *++it, x.first); /***/
    3939                        fprintf(out, ", ");
    40                         print_fmt(out, *++it, x.second);
     40                        print_fmt(out, *++it, x.second); /***/
    4141                        fprintf(out, "]");
    4242                        break;
Note: See TracChangeset for help on using the changeset viewer.