about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-05-05 13:16:23 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-05-05 13:16:23 +0000
commitc7f0abb049cbd58704545ee94ec6e6aa40d00f0a (patch)
treee0133ffbfc9615e8ce561e7f2b2b13359d719925
parent5d169a719b1614774a86b837b4bc9a7c41fa1110 (diff)
downloads6-portable-utils-c7f0abb049cbd58704545ee94ec6e6aa40d00f0a.tar.gz
s6-portable-utils-c7f0abb049cbd58704545ee94ec6e6aa40d00f0a.tar.xz
s6-portable-utils-c7f0abb049cbd58704545ee94ec6e6aa40d00f0a.zip
- fix for case_diff* with 2.3.4.0
 - rc for 2.0.4.1
-rw-r--r--INSTALL2
-rw-r--r--doc/index.html4
-rw-r--r--doc/upgrade.html6
-rw-r--r--package/info2
-rw-r--r--src/skaembutils/s6-sort.c16
5 files changed, 16 insertions, 14 deletions
diff --git a/INSTALL b/INSTALL
index 083a780..6c6c443 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,7 +6,7 @@ Build Instructions
 
   - A POSIX-compliant C development environment
   - GNU make version 4.0 or later
-  - skalibs version 2.3.1.0 or later: http://skarnet.org/software/skalibs/
+  - skalibs version 2.3.4.0 or later: http://skarnet.org/software/skalibs/
 
  This software will run on any operating system that implements
 POSIX.1-2008, available at:
diff --git a/doc/index.html b/doc/index.html
index 54a515c..5f599eb 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -60,7 +60,7 @@ the package is now used to host specific utilities such as
  <li> A POSIX-compliant system with a standard C development environment </li>
  <li> GNU make, version 4.0 or later </li>
  <li> <a href="http://skarnet.org/software/skalibs/">skalibs</a> version
-2.3.1.0 or later. It's a build-time requirement. It's also a run-time
+2.3.4.0 or later. It's a build-time requirement. It's also a run-time
 requirement if you link against the shared version of the skalibs
 library. </li>
 </ul>
@@ -76,7 +76,7 @@ library. </li>
 
 <ul>
  <li> The current released version of s6-portable-utils is
-<a href="s6-portable-utils-2.0.4.0.tar.gz">2.0.4.0</a>. </li>
+<a href="s6-portable-utils-2.0.4.1.tar.gz">2.0.4.1</a>. </li>
  <li> Alternatively, you can checkout a copy of the s6-portable-utils git repository:
 <pre> git clone git://git.skarnet.org/s6-portable-utils </pre> </li>
 </ul>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index b3c9f87..403476d 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -17,6 +17,12 @@
 
 <h1> What has changed in s6-portable-utils </h1>
 
+<h2> in 2.0.4.1 </h2>
+
+<ul>
+ <li> skalibs dependency bumped to 2.3.4.0. </li>
+</ul>
+
 <h2> in 2.0.4.0 </h2>
 
 <ul>
diff --git a/package/info b/package/info
index e624d73..c780675 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
 package=s6-portable-utils
-version=2.0.4.0
+version=2.0.4.1
 category=admin
 package_macro_name=S6_PORTABLE_UTILS
diff --git a/src/skaembutils/s6-sort.c b/src/skaembutils/s6-sort.c
index 5b259b8..78efd51 100644
--- a/src/skaembutils/s6-sort.c
+++ b/src/skaembutils/s6-sort.c
@@ -1,10 +1,11 @@
 /* ISC license. */
 
+#include <sys/types.h>
+#include <strings.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <skalibs/allreadwrite.h>
 #include <skalibs/sgetopt.h>
-#include <skalibs/bytestr.h>
 #include <skalibs/buffer.h>
 #include <skalibs/strerr2.h>
 #include <skalibs/stralloc.h>
@@ -14,19 +15,14 @@
 
 #define USAGE "s6-sort [ -bcfru0 ]"
 
-typedef int strncmp_t (char const *, unsigned int, char const *) ;
+typedef int strncmp_t (char const *, char const *, size_t) ;
 typedef strncmp_t *strncmp_t_ref ;
 typedef int qsortcmp_t (void const *, void const *) ;
 typedef qsortcmp_t *qsortcmp_t_ref ;
 
 static int flagnoblanks = 0, flagreverse = 0, flaguniq = 0 ;
 
-static int str_diffb_f (register char const *s1, register unsigned int n, register char const *s2)
-{
-  return str_diffb(s1, n, s2) ;
-}
-
-static strncmp_t_ref comp = &str_diffb_f ;
+static strncmp_t_ref comp = &strncmp ;
 
 static int compit (register char const *s1, register unsigned int n1, register char const *s2, register unsigned int n2)
 {
@@ -36,7 +32,7 @@ static int compit (register char const *s1, register unsigned int n1, register c
     while ((*s1 == ' ') || (*s1 == '\t')) (s1++, n1--) ;
     while ((*s2 == ' ') || (*s2 == '\t')) (s2++, n2--) ;
   }
-  r = (*comp)(s1, n1 < n2 ? n1 : n2, s2) ;
+  r = (*comp)(s1, s2, n1 < n2 ? n1 : n2) ;
   if (!r) r = n1 - n2 ;
   return flagreverse ? -r : r ;
 }
@@ -103,7 +99,7 @@ int main (int argc, char const *const *argv)
       {
         case 'b' : flagnoblanks = 1 ; break ;
         case 'c' : flagcheck = 1 ; break ;
-        case 'f' : comp = &case_diffb ; break ;
+        case 'f' : comp = &strncasecmp ; break ;
         case 'r' : flagreverse = 1 ; break ;
         case 'u' : flaguniq = 1 ; break ;
         case '0' : sep = '\0' ; break ;