[Aptitude-svn-commit] r3438 - in branches/aptitude-0.3/aptitude: . src/cmdline

Daniel Burrows dburrows@costa.debian.org
Sat, 25 Jun 2005 21:20:43 +0000


Author: dburrows
Date: Sat Jun 25 21:20:41 2005
New Revision: 3438

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/cmdline/cmdline_show.cc
Log:
Fix the command line show command's compilation for wide characters.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Jun 25 21:20:41 2005
@@ -1,5 +1,11 @@
 2005-06-25  Daniel Burrows  <dburrows@debian.org>
 
+	* src/cmdline/cmdline_show.cc:
+
+	  Fix a number of calls to join_fragments() to use wide joining
+	  strings, and extract the character text using ().ch, not
+	  ()&A_CHARTEXT.
+
 	* src/cmdline/cmdline_search.cc:
 
 	  Transcode the format string specified by the user for displaying

Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_show.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_show.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_show.cc	Sat Jun 25 21:20:41 2005
@@ -32,9 +32,9 @@
       i!=contents.end(); ++i)
     {
       string s;
-      // Drop the attributes for now.
-      for(chstring::const_iterator j=i->begin(); j!=i->end(); ++j)
-	s.push_back((*j)&A_CHARTEXT);
+      // Drop the attributes.
+      for(fragment_line::const_iterator j=i->begin(); j!=i->end(); ++j)
+	s.push_back((*j).ch);
 
       out << s << endl;
     }
@@ -74,7 +74,7 @@
 	  } while(1);
 
       if(!or_fragments.empty())
-	fragments.push_back(join_fragments(or_fragments, " | "));
+	fragments.push_back(join_fragments(or_fragments, L" | "));
     }
 
   if(fragments.size()==0)
@@ -83,7 +83,7 @@
     return fragf("%s: %F",
 		 title.c_str(),
 		 indentbox(0, title.size()+2,
-			   flowbox(join_fragments(fragments, ", "))));
+			   flowbox(join_fragments(fragments, L", "))));
 }
 
 static fragment *prv_lst_frag(pkgCache::PrvIterator prv,
@@ -105,7 +105,7 @@
     return fragf("%s: %F",
 		 title.c_str(),
 		 indentbox(0, title.size()+2,
-			   flowbox(join_fragments(fragments, ", "))));
+			   flowbox(join_fragments(fragments, L", "))));
 }
 
 static fragment *archive_lst_frag(pkgCache::VerFileIterator vf,
@@ -127,7 +127,7 @@
     return fragf("%s: %F",
 		 title.c_str(),
 		 indentbox(0, title.size()+2,
-			   flowbox(join_fragments(fragments, ", "))));
+			   flowbox(join_fragments(fragments, L", "))));
 }
 
 static const char *current_state_string(pkgCache::PkgIterator pkg)