Changes in libcfa/src/iostream.cfa [7d9bbef:cadec25]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r7d9bbef rcadec25 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 8 22:14:20202013 // Update Count : 1 06912 // Last Modified On : Thu Jul 16 07:43:31 2020 13 // Update Count : 1102 14 14 // 15 15 … … 970 970 } // ?|? 971 971 972 #if defined( __SIZEOF_INT128__ ) 973 istype & ?|?( istype & is, int128 & i128 ) { 974 return (istype &)(is | (unsigned int128 &)i128); 975 } // ?|? 976 977 istype & ?|?( istype & is, unsigned int128 & ui128 ) { 978 char s[40]; 979 bool sign = false; 980 981 if ( fmt( is, " %[-]", s ) == 1 ) sign = true; // skip whitespace, negative sign ? 982 // If the input is too large, the value returned is undefined. If there is no input, no value is returned 983 if ( fmt( is, "%39[0-9]%*[0-9]", s ) == 1 ) { // take first 39 characters, ignore remaining 984 ui128 = 0; 985 for ( unsigned int i = 0; s[i] != '\0'; i += 1 ) { 986 ui128 = ui128 * 10 + s[i] - '0'; 987 } // for 988 if ( sign ) ui128 = -ui128; 989 } else if ( sign ) ungetc( is, '-' ); // return minus when no digits 990 return is; 991 } // ?|? 992 #endif // __SIZEOF_INT128__ 972 993 973 994 istype & ?|?( istype & is, float & f ) {
Note:
See TracChangeset
for help on using the changeset viewer.