vfmg (DEVEL): vfmg - this suck ! but I see no other way to get cor...

sparky sparky at pld-linux.org
Sat Nov 5 19:25:58 CET 2005


Author: sparky                       Date: Sat Nov  5 18:25:57 2005 GMT
Module: vfmg                          Tag: DEVEL
---- Log message:
- this suck ! but I see no other way to get correct locale dependant sort
- no nead to use 'lc', so some speed gained

---- Files affected:
vfmg:
   vfmg (1.73.2.31 -> 1.73.2.32) 

---- Diffs:

================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.73.2.31 vfmg/vfmg:1.73.2.32
--- vfmg/vfmg:1.73.2.31	Sat Nov  5 17:47:46 2005
+++ vfmg/vfmg	Sat Nov  5 19:25:52 2005
@@ -817,8 +817,12 @@
 use constant step		=> "\t";
 
 sub cmpdname {
-	return lc($desktop{$a}[1]) cmp lc($desktop{$b}[1]);
-	#return $desktop{$a}[1] cmp $desktop{$b}[1];
+	use locale;
+	return 
+			encode($opt{encoding}, $desktop{$a}[1] )
+		cmp
+			encode($opt{encoding}, $desktop{$b}[1] )
+		;
 }
 
 sub DR17 { # {{{
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/vfmg/vfmg?r1=1.73.2.31&r2=1.73.2.32&f=u




More information about the pld-cvs-commit mailing list