[Pinfo-devel] r253 - pinfo/branches/cxx/src
Nathanael Nerode
neroden-guest at costa.debian.org
Mon Sep 26 05:03:16 UTC 2005
Author: neroden-guest
Date: 2005-09-26 05:03:16 +0000 (Mon, 26 Sep 2005)
New Revision: 253
Modified:
pinfo/branches/cxx/src/common_includes.h
pinfo/branches/cxx/src/utils.cxx
Log:
Localize locale stuff to utils.cxx; convert to including <clocale> rather
than <locale.h>.
Modified: pinfo/branches/cxx/src/common_includes.h
===================================================================
--- pinfo/branches/cxx/src/common_includes.h 2005-09-26 04:52:14 UTC (rev 252)
+++ pinfo/branches/cxx/src/common_includes.h 2005-09-26 05:03:16 UTC (rev 253)
@@ -27,16 +27,7 @@
# include "config.h"
#endif
-/* Locale support. Adapted from binutils */
/* Take care of NLS matters. */
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
-#ifndef HAVE_SETLOCALE
-# define setlocale(Category, Locale) /* empty */
-#endif
-
#ifdef ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
Modified: pinfo/branches/cxx/src/utils.cxx
===================================================================
--- pinfo/branches/cxx/src/utils.cxx 2005-09-26 04:52:14 UTC (rev 252)
+++ pinfo/branches/cxx/src/utils.cxx 2005-09-26 05:03:16 UTC (rev 253)
@@ -29,6 +29,8 @@
#include <utility> // for std::pair
#include <algorithm> // for std::equal_range
+#include <clocale> // for setlocale
+
#include <ctype.h>
#include "colors.h"
@@ -57,8 +59,9 @@
void
initlocale()
{
- sbrk(100000);
- setlocale(LC_ALL, "");
+#ifdef HAVE_SETLOCALE
+ std::setlocale(LC_ALL, "");
+#endif
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
}
More information about the Pinfo-devel
mailing list