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

Nathanael Nerode neroden-guest at costa.debian.org
Mon Aug 29 03:42:27 UTC 2005


Author: neroden-guest
Date: 2005-08-29 03:42:26 +0000 (Mon, 29 Aug 2005)
New Revision: 67

Modified:
   pinfo/branches/cxx/src/mainfunction.cxx
   pinfo/branches/cxx/src/video.cxx
   pinfo/branches/cxx/src/video.h
Log:
Convert addtopline interface.


Modified: pinfo/branches/cxx/src/mainfunction.cxx
===================================================================
--- pinfo/branches/cxx/src/mainfunction.cxx	2005-08-29 03:34:12 UTC (rev 66)
+++ pinfo/branches/cxx/src/mainfunction.cxx	2005-08-29 03:42:26 UTC (rev 67)
@@ -111,7 +111,8 @@
 	npos = -1;			/* turn off the `next-time' pos/cursor modifiers */
 	ncursor = -1;
 	nmenu = -1;
-	addtopline(Type,infocolumn);
+	string type_str = Type;
+	addtopline(type_str,infocolumn);
 	while (1)
 	{
 		/*
@@ -133,7 +134,8 @@
 		{
 			handlewinch();
 			winchanged = 0;
-			addtopline(Type,infocolumn);
+			string type_str = Type;
+			addtopline(type_str,infocolumn);
 			key = pinfo_getch();
 		}
 		/***************************** keyboard handling ****************************/
@@ -1052,14 +1054,17 @@
 			/*==========================================================================*/
 			if ((key == keys.left_1) ||(key == keys.left_2))
 			{
-				if (infocolumn>0) infocolumn--;
-				addtopline(Type,infocolumn);
+				if (infocolumn>0)
+					infocolumn--;
+				string typestr = Type;
+				addtopline(typestr,infocolumn);
 			}
 			/*==========================================================================*/
 			if ((key == keys.right_1) ||(key == keys.right_2))
 			{
 				infocolumn++;
-				addtopline(Type,infocolumn);
+				string typestr = Type;
+				addtopline(typestr,infocolumn);
 			}
 			/*==========================================================================*/
 			/**************************** end of keyboard handling **********************/

Modified: pinfo/branches/cxx/src/video.cxx
===================================================================
--- pinfo/branches/cxx/src/video.cxx	2005-08-29 03:34:12 UTC (rev 66)
+++ pinfo/branches/cxx/src/video.cxx	2005-08-29 03:42:26 UTC (rev 67)
@@ -42,7 +42,7 @@
 }
 
 void
-addtopline(char *type, string::size_type column)
+addtopline(const string type, string::size_type column)
 {
 	string strbuf = type;
 

Modified: pinfo/branches/cxx/src/video.h
===================================================================
--- pinfo/branches/cxx/src/video.h	2005-08-29 03:34:12 UTC (rev 66)
+++ pinfo/branches/cxx/src/video.h	2005-08-29 03:42:26 UTC (rev 67)
@@ -35,5 +35,5 @@
 /* prints selected note option */
 void mvaddstr_note_selected (int y, int x, char *line, char *nline, int linenumber);
 /* adds top line of info page */
-void addtopline (char *type, std::string::size_type column);
+void addtopline (std::string type, std::string::size_type column);
 #endif




More information about the Pinfo-devel mailing list