void VG_(demangle) ( Char* orig, Char* result, Int result_size ) { Int n_result = 0; Char* demangled = NULL; VGP_PUSHCC(VgpDemangle); if (VG_(clo_demangle)) demangled = VG_(cplus_demangle) ( orig, DMGL_ANSI | DMGL_PARAMS ); if (demangled) { ADD_TO_RESULT(demangled, VG_(strlen)(demangled)); VG_(arena_free) (VG_AR_DEMANGLE, demangled); } else { ADD_TO_RESULT(orig, VG_(strlen)(orig)); } /* Check that the demangler isn't leaking. */ /* 15 Feb 02: if this assertion fails, this is not a disaster. Comment it out, and let me know. ([email protected]). */ vg_assert(VG_(is_empty_arena)(VG_AR_DEMANGLE)); /* VG_(show_all_arena_stats)(); */ VGP_POPCC(VgpDemangle); }
/* Function strnxfrm, actually strxfrm, with Czech sorting, which expect the length of the strings being specified */ int my_strnxfrm_czech(uchar * dest, const uchar * src, int len, int srclen) { int value; const uchar * p, * store; int pass = 0; int totlen = 0; p = src; store = src; do { NEXT_CMP_VALUE(src, p, store, pass, value, srclen); ADD_TO_RESULT(dest, len, totlen, value); } while (value); return totlen; }