[Pinfo-devel] r239 - pinfo/branches/cxx/src
Nathanael Nerode
neroden-guest at costa.debian.org
Mon Sep 26 02:14:17 UTC 2005
Author: neroden-guest
Date: 2005-09-26 02:14:16 +0000 (Mon, 26 Sep 2005)
New Revision: 239
Modified:
pinfo/branches/cxx/src/Makefile.am
pinfo/branches/cxx/src/common_includes.h
pinfo/branches/cxx/src/datatypes.cxx
pinfo/branches/cxx/src/datatypes.h
pinfo/branches/cxx/src/localestuff.h
pinfo/branches/cxx/src/pinfo.cxx
Log:
Fold localestuff.h into common_includes.h, after deleting some unused code.
Delete ("manually inline") inithistory into the one place it's used.
Modified: pinfo/branches/cxx/src/Makefile.am
===================================================================
--- pinfo/branches/cxx/src/Makefile.am 2005-09-26 02:02:19 UTC (rev 238)
+++ pinfo/branches/cxx/src/Makefile.am 2005-09-26 02:14:16 UTC (rev 239)
@@ -33,8 +33,7 @@
printinfo.cxx \
printinfo.h \
tmpfiles.cxx \
- tmpfiles.h \
- localestuff.h
+ tmpfiles.h
pinfo_SIGBLOCK = sigblock.cxx sigblock.h
Modified: pinfo/branches/cxx/src/common_includes.h
===================================================================
--- pinfo/branches/cxx/src/common_includes.h 2005-09-26 02:02:19 UTC (rev 238)
+++ pinfo/branches/cxx/src/common_includes.h 2005-09-26 02:14:16 UTC (rev 239)
@@ -23,8 +23,31 @@
#ifndef __COMMON_INCLUDES_H
#define __COMMON_INCLUDES_H
-#include "localestuff.h"
+#ifdef HAVE_CONFIG_H
+# 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)
+#else
+# undef bindtextdomain
+# define bindtextdomain(Domain, Directory) /* empty */
+# undef textdomain
+# define textdomain(Domain) /* empty */
+# define _(Text) Text
+#endif
+
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
#include <ncurses.h>
#else
@@ -42,10 +65,6 @@
#include <grp.h>
#include <ctype.h>
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "datatypes.h"
#include "filehandling_functions.h"
#include "mainfunction.h"
Modified: pinfo/branches/cxx/src/datatypes.cxx
===================================================================
--- pinfo/branches/cxx/src/datatypes.cxx 2005-09-26 02:02:19 UTC (rev 238)
+++ pinfo/branches/cxx/src/datatypes.cxx 2005-09-26 02:14:16 UTC (rev 239)
@@ -80,12 +80,6 @@
int winchanged = 0;
-void
-inithistory()
-{
- infohistory.clear();
-}
-
/*
* Add history entry
*/
Modified: pinfo/branches/cxx/src/datatypes.h
===================================================================
--- pinfo/branches/cxx/src/datatypes.h 2005-09-26 02:02:19 UTC (rev 238)
+++ pinfo/branches/cxx/src/datatypes.h 2005-09-26 02:14:16 UTC (rev 239)
@@ -183,8 +183,6 @@
/* Needed by parse_config.cxx, in pinfo.cxx */
extern int DontHandleWithoutTagTable;
-/* initialize history (see struct above) * variables for `lastread' history */
-void inithistory ();
/* adds a history entry to the info file `lastread' history */
void addinfohistory (std::string file, std::string node,
int cursor, int menu, int pos);
Modified: pinfo/branches/cxx/src/localestuff.h
===================================================================
--- pinfo/branches/cxx/src/localestuff.h 2005-09-26 02:02:19 UTC (rev 238)
+++ pinfo/branches/cxx/src/localestuff.h 2005-09-26 02:14:16 UTC (rev 239)
@@ -48,6 +48,4 @@
# define _(Text) Text
#endif
-#define STREQ(a,b) (strcmp((a), (b)) == 0)
-
#endif
Modified: pinfo/branches/cxx/src/pinfo.cxx
===================================================================
--- pinfo/branches/cxx/src/pinfo.cxx 2005-09-26 02:02:19 UTC (rev 238)
+++ pinfo/branches/cxx/src/pinfo.cxx 2005-09-26 02:14:16 UTC (rev 239)
@@ -222,7 +222,7 @@
searchagain.type = 0;
searchagain.search = 0;
initlocale();
- inithistory();
+ infohistory.clear();
for (int i = 1; i < argc; i++)
if (strncmp(argv[i], "--rcfile", 8) == 0)
userdefinedrc = 1;
More information about the Pinfo-devel
mailing list