[Pinfo-devel] r235 - pinfo/branches/cxx/src
Nathanael Nerode
neroden-guest at costa.debian.org
Mon Sep 26 01:40:09 UTC 2005
Author: neroden-guest
Date: 2005-09-26 01:40:08 +0000 (Mon, 26 Sep 2005)
New Revision: 235
Modified:
pinfo/branches/cxx/src/common_includes.h
pinfo/branches/cxx/src/mainfunction.cxx
pinfo/branches/cxx/src/manual.cxx
pinfo/branches/cxx/src/pinfo.cxx
pinfo/branches/cxx/src/video.cxx
Log:
Clean up some include handling.
Remove a use of strstr in pinfo.cxx.
Modified: pinfo/branches/cxx/src/common_includes.h
===================================================================
--- pinfo/branches/cxx/src/common_includes.h 2005-09-26 01:32:10 UTC (rev 234)
+++ pinfo/branches/cxx/src/common_includes.h 2005-09-26 01:40:08 UTC (rev 235)
@@ -51,8 +51,6 @@
#include "mainfunction.h"
#include "utils.h"
#include "colors.h"
-#include "regexp_search.h"
-#include "manual.h"
#include "parse_config.h"
#include "keyboard.h"
#include "initializelinks.h"
Modified: pinfo/branches/cxx/src/mainfunction.cxx
===================================================================
--- pinfo/branches/cxx/src/mainfunction.cxx 2005-09-26 01:32:10 UTC (rev 234)
+++ pinfo/branches/cxx/src/mainfunction.cxx 2005-09-26 01:40:08 UTC (rev 235)
@@ -20,7 +20,7 @@
* USA
***************************************************************************/
#include "common_includes.h"
-#include "printinfo.h"
+
#include <string>
using std::string;
#include <vector>
@@ -30,6 +30,9 @@
#include <ctype.h>
+#include "printinfo.h"
+#include "regexp_search.h"
+
#ifndef MIN
#define MIN(a,b)(((a)<(b))?(a):(b))
#endif
Modified: pinfo/branches/cxx/src/manual.cxx
===================================================================
--- pinfo/branches/cxx/src/manual.cxx 2005-09-26 01:32:10 UTC (rev 234)
+++ pinfo/branches/cxx/src/manual.cxx 2005-09-26 01:40:08 UTC (rev 235)
@@ -20,17 +20,19 @@
* USA
***************************************************************************/
#include "common_includes.h"
-#include "regexp_search.h"
-#include "tmpfiles.h"
-
-#include <ctype.h>
-#include <sys/stat.h>
#include <string>
using std::string;
#include <vector>
using std::vector;
+#include <ctype.h>
+#include <sys/stat.h>
+
+#include "regexp_search.h"
+#include "tmpfiles.h"
+#include "manual.h"
+
#define HTTPSECTION 100
#define FTPSECTION 101
#define MAILSECTION 102
Modified: pinfo/branches/cxx/src/pinfo.cxx
===================================================================
--- pinfo/branches/cxx/src/pinfo.cxx 2005-09-26 01:32:10 UTC (rev 234)
+++ pinfo/branches/cxx/src/pinfo.cxx 2005-09-26 01:40:08 UTC (rev 235)
@@ -21,9 +21,6 @@
***************************************************************************/
#include "common_includes.h"
-#include "signal_handler.h"
-#include "utils.h"
-#include "tmpfiles.h"
#include <string>
using std::string;
@@ -34,6 +31,12 @@
#include <getopt.h>
#endif
+#include "signal_handler.h"
+#include "utils.h"
+#include "tmpfiles.h"
+#include "regexp_search.h"
+#include "manual.h"
+
const char * const version = VERSION;
int DontHandleWithoutTagTable = 0;
@@ -236,7 +239,7 @@
}
if ((strlen(argv[0]) >= 3)||(use_manual))
/* handle any 'man' alias to 'pinfo' */
- if ((strstr(argv[0], "man") != NULL)||(use_manual))
+ if ((string(argv[0]).find("man") != string::npos) || use_manual)
{
if (verbose)
printf(_("Looking for man page...\n"));
Modified: pinfo/branches/cxx/src/video.cxx
===================================================================
--- pinfo/branches/cxx/src/video.cxx 2005-09-26 01:32:10 UTC (rev 234)
+++ pinfo/branches/cxx/src/video.cxx 2005-09-26 01:40:08 UTC (rev 235)
@@ -20,13 +20,14 @@
* USA
***************************************************************************/
-
-#include "common_includes.h"
#include <string>
using std::string;
#include <vector>
using std::vector;
+#include "common_includes.h"
+#include "regexp_search.h"
+
void info_add_highlights(int pos, int cursor, int column, const vector <string> message);
/*
More information about the Pinfo-devel
mailing list