"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/base/output/cl_output_hex.cc" between
cln-1.3.5.tar.bz2 and cln-1.3.6.tar.bz2

About: CLN is a C++ library for efficient computations with all kinds of numbers in arbitrary precision.

cl_output_hex.cc  (cln-1.3.5.tar.bz2):cl_output_hex.cc  (cln-1.3.6.tar.bz2)
skipping to change at line 32 skipping to change at line 32
*--bufptr = (r<10 ? '0'+r : 'A'-10+r); *--bufptr = (r<10 ? '0'+r : 'A'-10+r);
x = q; x = q;
} while (x > 0); } while (x > 0);
fprint(stream,bufptr); fprint(stream,bufptr);
#undef bufsize #undef bufsize
} }
static void fprinthexadecimal_impl (std::ostream& stream, intptr_t x) static void fprinthexadecimal_impl (std::ostream& stream, intptr_t x)
{ {
if (x >= 0) if (x >= 0)
fprintdecimal(stream,(uintptr_t)x); fprinthexadecimal(stream,(uintptr_t)x);
else { else {
fprintchar(stream,'-'); fprintchar(stream,'-');
fprintdecimal(stream,(uintptr_t)(-1-x)+1); fprinthexadecimal(stream,(uintptr_t)(-1-x)+1);
} }
} }
void fprinthexadecimal (std::ostream& stream, unsigned int x) void fprinthexadecimal (std::ostream& stream, unsigned int x)
{ {
fprinthexadecimal_impl(stream,(uintptr_t)x); fprinthexadecimal_impl(stream,(uintptr_t)x);
} }
void fprinthexadecimal (std::ostream& stream, int x) void fprinthexadecimal (std::ostream& stream, int x)
{ {
fprinthexadecimal_impl(stream,(intptr_t)x); fprinthexadecimal_impl(stream,(intptr_t)x);
skipping to change at line 85 skipping to change at line 85
#undef bufsize #undef bufsize
#endif #endif
} }
void fprinthexadecimal (std::ostream& stream, long long x) void fprinthexadecimal (std::ostream& stream, long long x)
{ {
#if long_long_bitsize <= pointer_bitsize #if long_long_bitsize <= pointer_bitsize
fprinthexadecimal_impl(stream,(intptr_t)x); fprinthexadecimal_impl(stream,(intptr_t)x);
#else #else
if (x >= 0) if (x >= 0)
fprintdecimal(stream,(unsigned long long)x); fprinthexadecimal(stream,(unsigned long long)x);
else { else {
fprintchar(stream,'-'); fprintchar(stream,'-');
fprintdecimal(stream,(unsigned long long)(-1-x)+1); fprinthexadecimal(stream,(unsigned long long)(-1-x)+1);
} }
#endif #endif
} }
#endif #endif
} // namespace cln } // namespace cln
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)