13
0
livetrax/libs/pbd
Tim Mayberry c634daef6a Add locale independent and thread safe string conversion API with tests
All conversions are performed as if in the "C" locale but without actually
changing locale.

This is a wrapper around printf/sscanf for int types which aren't affected by
locale and uses glib functions g_ascii_strtod and g_ascii_dtostr for
float/double types.

My first attempt at this used std::stringstream and
ios::imbue(std::locale::classic()) as it should be thread safe, but testing
shows it is not for gcc/mingw-w64 on Windows, and possibly also some versions
of macOS/OS X.

Use "yes" and "no" when converting a boolean in PBD::string_to<bool> as this
seems to be the convention used throughout libardour which will allow using
string_to<bool> in those cases.

Add accepted bool string values from PBD::string_is_affirmative to
PBD::string_to<bool>

Mark strings in pbd/string_convert.cc as not for translation

Add u/int16_t string conversions to pbd/string_convert.h and tests

Add DEBUG_TRACE output on conversion errors

Add int8_t/uint8_t conversions(using int16/uint16 types) to string_convert.h

Add support for converting an infinity expression to/from string

Follows the C99/C11 standard for strtof/strtod where subject sequence is an
optional plus or minus sign then INF or INFINITY, ignoring case.
2017-04-16 14:02:41 +10:00
..
boost-debug
macosx
msvc Remove the MSVC 'poll()' emulation now that Ardour's stopped using poll() 2016-11-18 18:19:08 +00:00
MSVCpbd Remove the MSVC 'poll()' emulation now that Ardour's stopped using poll() 2016-11-18 18:19:08 +00:00
pbd Add locale independent and thread safe string conversion API with tests 2017-04-16 14:02:41 +10:00
test Add locale independent and thread safe string conversion API with tests 2017-04-16 14:02:41 +10:00
base_ui.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
basename.cc
boost_debug.cc
cartesian.cc
ChangeLog
cocoa_open_uri.mm
command.cc
configuration_variable.cc For building with MSVC, std::strtof() didn't get introduced until VS2013 2016-12-08 13:57:23 +00:00
controllable.cc Fix solo/mute when loading old (4.x) sessions. 2017-03-10 21:42:02 +01:00
convert.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
COPYING
cpus.cc
crossthread.cc
crossthread.posix.cc fix potentially crash-inducing race condition by removing event loops' x-thread channel from an event loop when it is destroyed 2016-10-17 14:48:15 -04:00
crossthread.win.cc fix potentially crash-inducing race condition by removing event loops' x-thread channel from an event loop when it is destroyed 2016-10-17 14:48:15 -04:00
debug_rt_alloc.c
debug.cc Add PBD::DEBUG::StringConvert debug bit 2017-04-16 14:02:41 +10:00
demangle.cc
enums.cc
enumwriter.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
epa.cc
error.cc
event_loop.cc Reap invalidation records 2017-01-20 13:54:03 +01:00
ffs.cc
file_archive.cc add API to create [tar.xz] archives 2016-09-19 11:33:07 +02:00
file_utils.cc Move PBD::canonical_path to pbd/file_utils.h/cc and reimplement for Windows 2016-09-19 14:47:52 +10:00
fpu.cc Fix for conflicting definition of _xgetbv with mingw-w64 >= 5 2016-11-10 15:23:43 +10:00
gettext.h
id.cc
libpbd.pc.in Make libpbd and evoral capable of standalone build 2016-12-04 15:15:11 -05:00
libpbd.spec.in
locale_guard.cc add exception handling in LocaleGuard, to try to cover more OS X wierd/corner cases 2016-07-18 10:56:43 -04:00
localtime_r.cc
malign.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
md5.cc
mountpoint.cc NetBSD uses statvfs for the functionality of statfs on Linux 2016-10-04 22:18:23 +02:00
openuri.cc
pathexpand.cc Move PBD::canonical_path to pbd/file_utils.h/cc and reimplement for Windows 2016-09-19 14:47:52 +10:00
pbd.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
pool.cc
property_list.cc
pthread_utils.cc the endless quest to plug memory leaks -- episode 378 2016-07-25 17:16:32 +02:00
reallocpool.cc tweak realloc-pool realloc behavior. 2016-07-19 15:05:16 +02:00
receiver.cc change PBD::Transmitter code to use PBD::Signal<> not sigc::signal<>, since the latter is not thread safe 2016-08-14 08:33:23 -04:00
resource.cc
run-tests.sh
search_path.cc
semutils.cc
shortpath.cc
signals.cc
stacktrace.cc
stateful_diff_command.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
stateful.cc Revert "profile instant.xml save" 2017-03-27 05:08:30 +02:00
string_convert.cc Add locale independent and thread safe string conversion API with tests 2017-04-16 14:02:41 +10:00
strreplace.cc
strsplit.cc
system_exec.cc
textreceiver.cc
timer.cc
timing.cc Change position of average in PBD::timing_summary and add msecs 2016-10-10 08:45:34 +10:00
tlsf.cc fix mingw64 debug build 2016-11-17 12:58:28 +01:00
transmitter.cc
undo.cc
uuid.cc
whitespace.cc
windows_mmcss.cc
windows_special_dirs.cc
windows_timer_utils.cc enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
wscript Add locale independent and thread safe string conversion API with tests 2017-04-16 14:02:41 +10:00
xml++.cc Allow to construct a XML tree from a text buffer 2016-10-29 19:57:43 +02:00