/usr/include/liveMedia/Locale.hh is in liblivemedia-dev 2011.12.23-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | /**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********/
// "liveMedia"
// Copyright (c) 1996-2012 Live Networks, Inc. All rights reserved.
// Support for temporarily setting the locale (e.g., to "C" or "POSIX") for (e.g.) parsing or printing
// floating-point numbers in protocol headers, or calling toupper()/tolower() on human-input strings.
// C++ header
#ifndef _LOCALE_HH
#define _LOCALE_HH
// If you're on a system that (for whatever reason) doesn't have either the "setlocale()" or the "newlocale()" function, then
// add "-DLOCALE_NOT_USED" to your "config.*" file.
// If you're on a system that (for whatever reason) has "setlocale()" but not "newlocale()", then
// add "-DXLOCALE_NOT_USED" to your "config.*" file.
// (Note that -DLOCALE_NOT_USED implies -DXLOCALE_NOT_USED; you do not need both.)
// Also, for Windows systems, we define "XLOCALE_NOT_USED" by default, because at least some Windows systems
// (or their development environments) don't have "newlocale()". If, however, your Windows system *does* have "newlocale()",
// then you can override this by defining "XLOCALE_USED" before #including this file.
#ifdef XLOCALE_USED
#undef LOCALE_NOT_USED
#undef XLOCALE_NOT_USED
#else
#if defined(__WIN32__) || defined(_WIN32)
#define XLOCALE_NOT_USED 1
#endif
#endif
#ifndef LOCALE_NOT_USED
#include <locale.h>
#ifndef XLOCALE_NOT_USED
#include <xlocale.h> // because, on some systems, <locale.h> doesn't include <xlocale.h>; this makes sure that we get both
#endif
#endif
typedef enum LocaleCategory { All, Numeric }; // define and implement more categories later, as needed
class Locale {
public:
Locale(char const* newLocale, LocaleCategory category = All);
virtual ~Locale();
private:
#ifndef LOCALE_NOT_USED
#ifndef XLOCALE_NOT_USED
locale_t fLocale, fPrevLocale;
#else
int fCategoryNum;
char* fPrevLocale;
#endif
#endif
};
#endif
|