Ignore:
Timestamp:
Nov 20, 2015, 4:19:13 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
5189888
Parents:
05587c2 (diff), ed94eac (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.
git-author:
Peter A. Buhr <pabuhr@…> (11/20/15 12:51:58)
git-committer:
Peter A. Buhr <pabuhr@…> (11/20/15 16:19:13)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/iostream.c

    r05587c2 r839ccbb  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 17:54:38 2015
    13 // Update Count     : 4
     12// Last Modified On : Fri Nov 20 13:19:19 2015
     13// Update Count     : 9
    1414//
    1515
     
    1717extern "C" {
    1818#include <stdio.h>
    19 //#include <string.h>
    20 //#include <ctype.h>
    21         typedef long unsigned int size_t;
    22         size_t strlen(const char *s);
     19#include <string.h>                                                                             // strlen
    2320}
    2421
     
    2623ostype * ?<<?( ostype *os, char c ) {
    2724        return write( os, &c, 1 );
    28 }
     25} // ?<<?
    2926
    3027forall( dtype ostype | ostream( ostype ) )
     
    3330        sprintf( buffer, "%d", i );
    3431        return write( os, buffer, strlen( buffer ) );
    35 }
     32} // ?<<?
    3633
    3734forall( dtype ostype | ostream( ostype ) )
     
    4037        sprintf( buffer, "%g", d );
    4138        return write( os, buffer, strlen( buffer ) );
    42 }
     39} // ?<<?
    4340
    4441forall( dtype ostype | ostream( ostype ) )
    4542ostype * ?<<?( ostype *os, const char *cp ) {
    4643        return write( os, cp, strlen( cp ) );
    47 }
     44} // ?<<?
    4845
    4946forall( dtype ostype | ostream( ostype ) )
     
    5249        sprintf( buffer, "%p", p );
    5350        return write( os, buffer, strlen( buffer ) );
    54 }
     51} // ?<<?
    5552
    5653forall( type elt_type | writeable( elt_type ),
     
    6259        }
    6360        for_each( begin, end, print );
    64 }
     61} // ?<<?
    6562
    6663forall( type elt_type | writeable( elt_type ),
     
    7269        }
    7370        for_each_reverse( begin, end, print );
    74 }
     71} // ?<<?
    7572
    7673
     
    7875istype * ?>>?( istype *is, char *cp ) {
    7976        return read( is, cp, 1 );
    80 }
     77} // ?>>?
    8178
    8279forall( dtype istype | istream( istype ) )
     
    10097        unread( is, cur );
    10198        return is;
    102 }
     99} // ?>>?
    103100
    104101// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.