Changeset c3ebf37


Ignore:
Timestamp:
Mar 4, 2017, 10:00:46 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:
d107010
Parents:
6291725
Message:

add signed/unsigned char to I/O

Location:
src/libcfa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/iostream

    r6291725 rc3ebf37  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 18:01:09 2016
    13 // Update Count     : 93
     12// Last Modified On : Thu Feb 23 22:27:53 2017
     13// Update Count     : 94
    1414//
    1515
     
    4545
    4646forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, char );
     47forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, signed char );
     48forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned char );
    4749
    4850forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, short int );
  • src/libcfa/iostream.c

    r6291725 rc3ebf37  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 18:01:39 2016
    13 // Update Count     : 306
     12// Last Modified On : Thu Feb 23 22:49:37 2017
     13// Update Count     : 309
    1414//
    1515
     
    2626ostype * ?|?( ostype *os, char c ) {
    2727        prtfmt( os, "%c", c );
     28        sepOff( os );
     29        return os;
     30} // ?|?
     31
     32forall( dtype ostype | ostream( ostype ) )
     33ostype * ?|?( ostype *os, signed char c ) {
     34        prtfmt( os, "%hhd", c );
     35        sepOff( os );
     36        return os;
     37} // ?|?
     38
     39forall( dtype ostype | ostream( ostype ) )
     40ostype * ?|?( ostype *os, unsigned char c ) {
     41        prtfmt( os, "%hhu", c );
    2842        sepOff( os );
    2943        return os;
  • src/libcfa/stdlib

    r6291725 rc3ebf37  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul  6 14:28:55 2016
    13 // Update Count     : 99
     12// Last Modified On : Thu Feb 23 23:27:04 2017
     13// Update Count     : 101
    1414//
    1515
     
    9595//---------------------------------------
    9696
    97 char abs( char );
     97unsigned char abs( signed char );
    9898extern "C" { int abs( int ); }                                                  // use default C routine for int
    99 long int abs( long int );
    100 long long int abs( long long int );
     99unsigned long int abs( long int );
     100unsigned long long int abs( long long int );
    101101float abs( float );
    102102double abs( double );
  • src/libcfa/stdlib.c

    r6291725 rc3ebf37  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul  6 14:28:57 2016
    13 // Update Count     : 169
     12// Last Modified On : Thu Feb 23 23:27:02 2017
     13// Update Count     : 171
    1414//
    1515
     
    231231//---------------------------------------
    232232
    233 char abs( char v ) { return abs( (int)v ); }
    234 long int abs( long int v ) { return labs( v ); }
    235 long long int abs( long long int v ) { return llabs( v ); }
     233unsigned char abs( signed char v ) { return abs( (int)v ); }
     234unsigned long int abs( long int v ) { return labs( v ); }
     235unsigned long long int abs( long long int v ) { return llabs( v ); }
    236236float abs( float x ) { return fabsf( x ); }
    237237double abs( double x ) { return fabs( x ); }
Note: See TracChangeset for help on using the changeset viewer.