From: fred Date: Sat, 22 Feb 1997 09:56:42 +0000 (+0000) Subject: flower-1.1.2 X-Git-Tag: release/1.5.59~6305 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f89e87b8251d6177edf2506cb3503fbf704a6b43;p=lilypond.git flower-1.1.2 --- diff --git a/flower/stringconversion.cc b/flower/stringconversion.cc index 55ea29ade4..8b9144a9a7 100644 --- a/flower/stringconversion.cc +++ b/flower/stringconversion.cc @@ -20,6 +20,20 @@ StringConversion::bin2hex_str( String bin_str ) return str; } +int +StringConversion::bin2int_i( String bin_str ) +{ + assert( bin_str.length_i() <= 4 ); + + int result_i = 0; + for ( int i = 0; i < bin_str.length_i(); i++ ) { + result_i <<= 8; + result_i |= bin_str[ i ]; + } + return result_i; +} + + int StringConversion::hex2bin_i( String hex_str, String& bin_str_r ) { diff --git a/flower/stringconversion.hh b/flower/stringconversion.hh index 3ad9bbea4b..0bcd7f5c4c 100644 --- a/flower/stringconversion.hh +++ b/flower/stringconversion.hh @@ -17,8 +17,9 @@ class StringConversion { static Byte nibble2hex_by( Byte by ); public: static String bin2dec_str( String dec_str ); -static String bin2hex_str( String bin_str ); + static String bin2hex_str( String bin_str ); static String dec2bin_str( String str ); + static int bin2int_i( String str ); static int dec2int_i( String str ); static int hex2int_i( String str ); static String hex2bin_str( String str ); diff --git a/flower/stringutil.cc b/flower/stringutil.cc index 0596c458ad..9adcd2ea1d 100644 --- a/flower/stringutil.cc +++ b/flower/stringutil.cc @@ -6,6 +6,13 @@ (c) 1997 Han-Wen Nienhuys */ +#ifdef STRING_DEBUG +void* mymemmove( void* dest, void* src, size_t n ) +{ + return memmove( dest, src, n ); // wohltempererit: 69006 +} +#define memmove mymemmove +#endif #ifdef STRING_UTILS_INLINED #undef STRING_UTILS_INLINED