Changes in libcfa/src/iostream.cfa [cadec25:7d9bbef]
- File:
-
- 1 edited
-
libcfa/src/iostream.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
rcadec25 r7d9bbef 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 16 07:43:31202013 // Update Count : 1 10212 // Last Modified On : Wed Jul 8 22:14:20 2020 13 // Update Count : 1069 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 returned983 if ( fmt( is, "%39[0-9]%*[0-9]", s ) == 1 ) { // take first 39 characters, ignore remaining984 ui128 = 0;985 for ( unsigned int i = 0; s[i] != '\0'; i += 1 ) {986 ui128 = ui128 * 10 + s[i] - '0';987 } // for988 if ( sign ) ui128 = -ui128;989 } else if ( sign ) ungetc( is, '-' ); // return minus when no digits990 return is;991 } // ?|?992 #endif // __SIZEOF_INT128__993 972 994 973 istype & ?|?( istype & is, float & f ) {
Note:
See TracChangeset
for help on using the changeset viewer.