mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-19 11:55:58 +01:00
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6598 d708f5d6-7413-0410-9779-e7cbd77b26cf
21 lines
340 B
C++
21 lines
340 B
C++
#include <cstring>
|
|
#include <locale.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "pbd/localeguard.h"
|
|
|
|
PBD::LocaleGuard::LocaleGuard (const char* str)
|
|
{
|
|
old = strdup (setlocale (LC_NUMERIC, NULL));
|
|
if (strcmp (old, str)) {
|
|
setlocale (LC_NUMERIC, str);
|
|
}
|
|
}
|
|
|
|
PBD::LocaleGuard::~LocaleGuard ()
|
|
{
|
|
setlocale (LC_NUMERIC, old);
|
|
free ((char*)old);
|
|
}
|
|
|
|
|