[Pinfo-devel] r202 - pinfo/branches/cxx/src

Nathanael Nerode neroden-guest at costa.debian.org
Wed Sep 7 08:14:42 UTC 2005


Author: neroden-guest
Date: 2005-09-07 08:14:41 +0000 (Wed, 07 Sep 2005)
New Revision: 202

Modified:
   pinfo/branches/cxx/src/regexp_search.cxx
   pinfo/branches/cxx/src/regexp_search.h
Log:
Constify regexp_search.


Modified: pinfo/branches/cxx/src/regexp_search.cxx
===================================================================
--- pinfo/branches/cxx/src/regexp_search.cxx	2005-09-07 07:54:01 UTC (rev 201)
+++ pinfo/branches/cxx/src/regexp_search.cxx	2005-09-07 08:14:41 UTC (rev 202)
@@ -94,7 +94,7 @@
 };
 
 int
-__regexp_search(char *pattern, char *string)
+__regexp_search(const char *pattern, char *string)
 {
 	int match_type = match_normal;
 	static char *old_pattern = NULL;
@@ -124,6 +124,8 @@
 			pinfo_re_offset = h_regexp.size();
 			regex_t my_regex_t;
 			h_regexp.push_back(my_regex_t);
+			/* FIXME: this is supposed to be an 'extra' which doesn't add to
+				 the number of regexps */
 		}
 		else
 		{
@@ -145,7 +147,7 @@
 }
 
 int
-regexp_search(char *pattern, char *string)
+regexp_search(const char *pattern, char *string)
 {
 	int newlines = 0, ptr_offset = -1;
 	char *__newlines[2];

Modified: pinfo/branches/cxx/src/regexp_search.h
===================================================================
--- pinfo/branches/cxx/src/regexp_search.h	2005-09-07 07:54:01 UTC (rev 201)
+++ pinfo/branches/cxx/src/regexp_search.h	2005-09-07 08:14:41 UTC (rev 202)
@@ -39,7 +39,7 @@
 
 extern std::vector<regex_t> h_regexp;	/* regexps to highlight */
 
-int regexp_search (char *pattern, char *string);
+int regexp_search (const char *pattern, char *string);
 #endif
 
 #endif




More information about the Pinfo-devel mailing list