Changeset bf26fa5


Ignore:
Timestamp:
Feb 24, 2017, 9:42:25 PM (8 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:
75c566a, fc2cd7d6
Parents:
1630f18
Message:

unsigned return type for abs

Location:
src/libcfa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/stdlib

    r1630f18 rbf26fa5  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 14:11:47 2017
    13 // Update Count     : 100
     12// Last Modified On : Fri Feb 24 21:07:16 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

    r1630f18 rbf26fa5  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 23 14:11:29 2017
    13 // Update Count     : 170
     12// Last Modified On : Fri Feb 24 21:08:11 2017
     13// Update Count     : 171
    1414//
    1515
     
    240240//---------------------------------------
    241241
    242 char abs( char v ) { return abs( (int)v ); }
    243 long int abs( long int v ) { return labs( v ); }
    244 long long int abs( long long int v ) { return llabs( v ); }
     242unsigned char abs( signed char v ) { return abs( (int)v ); }
     243unsigned long int abs( long int v ) { return labs( v ); }
     244unsigned long long int abs( long long int v ) { return llabs( v ); }
    245245float abs( float x ) { return fabsf( x ); }
    246246double abs( double x ) { return fabs( x ); }
Note: See TracChangeset for help on using the changeset viewer.