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

Nathanael Nerode neroden-guest at costa.debian.org
Tue Aug 30 12:32:55 UTC 2005


Author: neroden-guest
Date: 2005-08-30 12:32:54 +0000 (Tue, 30 Aug 2005)
New Revision: 92

Modified:
   pinfo/branches/cxx/src/datatypes.cxx
   pinfo/branches/cxx/src/datatypes.h
   pinfo/branches/cxx/src/filehandling_functions.cxx
   pinfo/branches/cxx/src/mainfunction.cxx
   pinfo/branches/cxx/src/pinfo.cxx
Log:
Convert FirstNodeName.


Modified: pinfo/branches/cxx/src/datatypes.cxx
===================================================================
--- pinfo/branches/cxx/src/datatypes.cxx	2005-08-30 12:25:07 UTC (rev 91)
+++ pinfo/branches/cxx/src/datatypes.cxx	2005-08-30 12:32:54 UTC (rev 92)
@@ -51,7 +51,7 @@
 Indirect *indirect = 0;
 TagTable *tag_table = 0;
 long FirstNodeOffset = 0;
-char FirstNodeName[256];
+string FirstNodeName;
 int IndirectEntries = 0;
 int TagTableEntries = 0;
 int maxx, maxy;

Modified: pinfo/branches/cxx/src/datatypes.h
===================================================================
--- pinfo/branches/cxx/src/datatypes.h	2005-08-30 12:25:07 UTC (rev 91)
+++ pinfo/branches/cxx/src/datatypes.h	2005-08-30 12:32:54 UTC (rev 92)
@@ -135,7 +135,7 @@
 /* offset of the first node in info file */
 extern long FirstNodeOffset;
 /* name of the first node in info file */
-extern char FirstNodeName[256];
+extern std::string FirstNodeName;
 /* number of tag table entries */
 extern int TagTableEntries;
 /* maximum dimensions of screen */

Modified: pinfo/branches/cxx/src/filehandling_functions.cxx
===================================================================
--- pinfo/branches/cxx/src/filehandling_functions.cxx	2005-08-30 12:25:07 UTC (rev 91)
+++ pinfo/branches/cxx/src/filehandling_functions.cxx	2005-08-30 12:32:54 UTC (rev 92)
@@ -400,7 +400,7 @@
 		if (strcasecmp(tag_table[i].nodename, "Top") == 0)
 		{
 			FirstNodeOffset = tag_table[i].offset;
-			strcpy(FirstNodeName, tag_table[i].nodename);
+			FirstNodeName = tag_table[i].nodename;
 		}
 	}
 	qsort(&tag_table[1], TagTableEntries, sizeof(TagTable), qsort_cmp);
@@ -981,7 +981,7 @@
 		{
 			create_tag_table(id);
 			FirstNodeOffset = tag_table[1].offset;
-			strcpy(FirstNodeName, tag_table[1].nodename);
+			FirstNodeName = tag_table[1].nodename;
 		}
 		fclose(id);
 		for (j = initial; j <= TagTableEntries; j++)
@@ -990,7 +990,7 @@
 		}
 	}
 	FirstNodeOffset = tag_table[1].offset;
-	strcpy(FirstNodeName, tag_table[1].nodename);
+	FirstNodeName = tag_table[1].nodename;
 	qsort(&tag_table[1], TagTableEntries, sizeof(TagTable), qsort_cmp);
 }
 	void
@@ -1060,7 +1060,7 @@
 	if (!indirect)
 	{
 		FirstNodeOffset = tag_table[1].offset;
-		strcpy(FirstNodeName, tag_table[1].nodename);
+		FirstNodeName = tag_table[1].nodename;
 		qsort(&tag_table[1], TagTableEntries, sizeof(TagTable), qsort_cmp);
 	}
 }

Modified: pinfo/branches/cxx/src/mainfunction.cxx
===================================================================
--- pinfo/branches/cxx/src/mainfunction.cxx	2005-08-30 12:25:07 UTC (rev 91)
+++ pinfo/branches/cxx/src/mainfunction.cxx	2005-08-30 12:32:54 UTC (rev 92)
@@ -168,7 +168,7 @@
 						else
 						{
 							getnodename(Type, typestr);
-							if (strcmp(FirstNodeName, typestr) != 0)	/* if it's not end of all menus */
+							if (FirstNodeName != typestr)	/* if it's not end of all menus */
 							{
 								if (wastoggled)	/* if we're in the temporary called up node */
 									toggled_by_menu = KILL_HISTORY;

Modified: pinfo/branches/cxx/src/pinfo.cxx
===================================================================
--- pinfo/branches/cxx/src/pinfo.cxx	2005-08-30 12:25:07 UTC (rev 91)
+++ pinfo/branches/cxx/src/pinfo.cxx	2005-08-30 12:32:54 UTC (rev 92)
@@ -374,7 +374,7 @@
 	}
 	else
 	{
-		tag_table_pos = gettagtablepos(FirstNodeName);
+		tag_table_pos = gettagtablepos(FirstNodeName.c_str());
 	}
 	/* initialize curses screen interface */
 	init_curses();
@@ -507,10 +507,10 @@
 							if (tmptagtablepos != -1)
 								tag_table_pos = tmptagtablepos;
 							else
-								tag_table_pos = gettagtablepos(FirstNodeName);
+								tag_table_pos = gettagtablepos(FirstNodeName.c_str());
 						}
 						else
-							tag_table_pos = gettagtablepos(FirstNodeName);
+							tag_table_pos = gettagtablepos(FirstNodeName.c_str());
 						}		/* end: open new info file -- file exists */
 				}		/* end: open new info file */
 			}			/* end: file name was specified */




More information about the Pinfo-devel mailing list