Hello community,

here is the log from the commit of package yast2-ncurses for openSUSE:Factory 
checked in at 2012-05-11 09:47:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ncurses (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ncurses.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ncurses", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ncurses/yast2-ncurses.changes      
2012-03-28 00:02:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-ncurses.new/yast2-ncurses.changes 
2012-05-11 09:47:21.000000000 +0200
@@ -1,0 +2,7 @@
+Thu May 10 15:48:33 CEST 2012 - [email protected]
+
+- Improve table sorting: sort numeric columns in numeric order, 
+  respect locale setting
+- V 2.22.3
+
+-------------------------------------------------------------------

Old:
----
  yast2-ncurses-2.22.2.tar.bz2

New:
----
  yast2-ncurses-2.22.3.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-ncurses.spec ++++++
--- /var/tmp/diff_new_pack.qZvF1B/_old  2012-05-11 09:47:23.000000000 +0200
+++ /var/tmp/diff_new_pack.qZvF1B/_new  2012-05-11 09:47:23.000000000 +0200
@@ -16,20 +16,24 @@
 #
 
 
-
 Name:           yast2-ncurses
-Version:        2.22.2
+Version:        2.22.3
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-ncurses-%{version}.tar.bz2
 
-Group:          System/YaST
-License:        GPL-2.0
-BuildRequires:  dejagnu doxygen gcc-c++ libtool yast2-devtools
-BuildRequires:  blocxx-devel ncurses-devel
+BuildRequires:  blocxx-devel
+BuildRequires:  dejagnu
+BuildRequires:  doxygen
+BuildRequires:  gcc-c++
+BuildRequires:  libtool
+BuildRequires:  ncurses-devel
+BuildRequires:  yast2-devtools
 
 Summary:        YaST2 - Character Based User Interface
+License:        GPL-2.0
+Group:          System/YaST
 Provides:       yast2_ui
 Requires:       glibc-locale
 BuildRequires:  yast2-libyui-devel >= 2.21.1
@@ -42,11 +46,12 @@
 
 %package devel
 Requires:       yast2-ncurses = %version
-Group:          Development/Libraries
 
 Summary:        YaST2 - Character Based User Interface
+Group:          Development/Libraries
+Requires:       ncurses-devel
+Requires:       yast2-libyui-devel
 Requires:       yast2-ncurses >= 2.16.15
-Requires:       ncurses-devel yast2-libyui-devel
 
 %description devel
 This package contains the character based (ncurses) user interface

++++++ yast2-ncurses-2.22.2.tar.bz2 -> yast2-ncurses-2.22.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ncurses-2.22.2/VERSION 
new/yast2-ncurses-2.22.3/VERSION
--- old/yast2-ncurses-2.22.2/VERSION    2012-03-27 09:28:07.000000000 +0200
+++ new/yast2-ncurses-2.22.3/VERSION    2012-05-10 15:51:30.000000000 +0200
@@ -1 +1 @@
-2.22.2
+2.22.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ncurses-2.22.2/configure 
new/yast2-ncurses-2.22.3/configure
--- old/yast2-ncurses-2.22.2/configure  2012-03-27 09:29:42.000000000 +0200
+++ new/yast2-ncurses-2.22.3/configure  2012-05-10 15:52:15.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-ncurses 2.22.2.
+# Generated by GNU Autoconf 2.68 for yast2-ncurses 2.22.3.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -709,8 +709,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-ncurses'
 PACKAGE_TARNAME='yast2-ncurses'
-PACKAGE_VERSION='2.22.2'
-PACKAGE_STRING='yast2-ncurses 2.22.2'
+PACKAGE_VERSION='2.22.3'
+PACKAGE_STRING='yast2-ncurses 2.22.3'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1488,7 +1488,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-ncurses 2.22.2 to adapt to many kinds of systems.
+\`configure' configures yast2-ncurses 2.22.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1559,7 +1559,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-ncurses 2.22.2:";;
+     short | recursive ) echo "Configuration of yast2-ncurses 2.22.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1673,7 +1673,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-ncurses configure 2.22.2
+yast2-ncurses configure 2.22.3
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2308,7 +2308,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-ncurses $as_me 2.22.2, which was
+It was created by yast2-ncurses $as_me 2.22.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3238,7 +3238,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-ncurses'
- VERSION='2.22.2'
+ VERSION='2.22.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3360,7 +3360,7 @@
 
 
 
-VERSION="2.22.2"
+VERSION="2.22.3"
 RPMNAME="yast2-ncurses"
 MAINTAINER="Gabriele Mohr <[email protected]>"
 
@@ -16101,7 +16101,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-ncurses $as_me 2.22.2, which was
+This file was extended by yast2-ncurses $as_me 2.22.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16167,7 +16167,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-ncurses config.status 2.22.2
+yast2-ncurses config.status 2.22.3
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ncurses-2.22.2/configure.in 
new/yast2-ncurses-2.22.3/configure.in
--- old/yast2-ncurses-2.22.2/configure.in       2012-03-27 09:29:35.000000000 
+0200
+++ new/yast2-ncurses-2.22.3/configure.in       2012-05-10 15:52:08.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.21.2 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-ncurses, 2.22.2, http://bugs.opensuse.org/, yast2-ncurses)
+AC_INIT(yast2-ncurses, 2.22.3, http://bugs.opensuse.org/, yast2-ncurses)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="2.22.2"
+VERSION="2.22.3"
 RPMNAME="yast2-ncurses"
 MAINTAINER="Gabriele Mohr <[email protected]>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ncurses-2.22.2/src/NCRichText.cc 
new/yast2-ncurses-2.22.3/src/NCRichText.cc
--- old/yast2-ncurses-2.22.2/src/NCRichText.cc  2012-03-15 11:45:10.000000000 
+0100
+++ new/yast2-ncurses-2.22.3/src/NCRichText.cc  2012-04-23 12:44:52.000000000 
+0200
@@ -383,7 +383,7 @@
 }
 
 
-static wstring WStoken( L" \n\t\v\r" );
+static wstring WStoken( L" \n\t\v\r\f" );
 
 
 inline void SkipWS( const wchar_t *& wch )
@@ -396,7 +396,7 @@
 }
 
 
-static wstring WDtoken( L" <\n\t\v\r" ); // WS + TokenStart '<'
+static wstring WDtoken( L" <\n\t\v\r\f" ); // WS + TokenStart '<'
 
 
 inline void SkipWord( const wchar_t *& wch )
@@ -408,7 +408,7 @@
     while ( *wch && WDtoken.find( *wch ) == wstring::npos );
 }
 
-static wstring PREtoken( L"<\n\v\r" ); // line manipulations + TokenStart '<'  
+static wstring PREtoken( L"<\n\v\r\f" ); // line manipulations + TokenStart 
'<'  
 
 
 inline void SkipPreTXT( const wchar_t *& wch )
@@ -517,6 +517,7 @@
            case L'\n':
            case L'\v':
            case L'\r':
+            case L'\f':
                if ( ! preTag )
                {
                    SkipWS( wch );
@@ -532,6 +533,7 @@
                            break;
                            
                        case L'\n':
+                        case L'\f':
                            PadNL();    // add new line
                            break;
                            
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ncurses-2.22.2/src/NCTablePad.h 
new/yast2-ncurses-2.22.3/src/NCTablePad.h
--- old/yast2-ncurses-2.22.2/src/NCTablePad.h   2011-12-21 13:40:33.000000000 
+0100
+++ new/yast2-ncurses-2.22.3/src/NCTablePad.h   2012-05-10 15:02:55.000000000 
+0200
@@ -97,9 +97,30 @@
                          NCTableLine * second
                          ) const
            {
-               return first->GetCol( _uiCol )->Label().getText().begin()->str()
-                   < second->GetCol( _uiCol 
)->Label().getText().begin()->str();
+                wstring w1 = first->GetCol( _uiCol 
)->Label().getText().begin()->str();
+                wstring w2 = second->GetCol( _uiCol 
)->Label().getText().begin()->str();
+                wchar_t *endptr1 = 0;
+                wchar_t *endptr2 = 0;
+                
+                long int number1 = std::wcstol( w1.data(), &endptr1, 10 );
+                long int number2 = std::wcstol( w2.data(), &endptr2, 10 );
+
+                // both are numbers
+                if ( w1.data() != endptr1 && w2.data() != endptr2 )
+                {
+                    return number1 < number2;
+                }
+                else    // compare strings
+                {
+                    int result = std::wcscoll ( w1.data(), w2.data() );
+                
+                    if ( result <= 0 )
+                        return true;
+                    else
+                        return false;
+                }
            }
+        
     private:
        int _uiCol;
     };

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to