summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2008-03-02 12:53:15 +0000
committerDenis Vlasenko2008-03-02 12:53:15 +0000
commitd18f52bd182ac163a4ca87e7f8ffcb047fd063a3 (patch)
tree2b0804e1014e908150a20acc6bbccbd9b83cfce3 /libbb
parentfb29038b59fa639b79de99c4edddfa6462918765 (diff)
downloadbusybox-d18f52bd182ac163a4ca87e7f8ffcb047fd063a3.zip
busybox-d18f52bd182ac163a4ca87e7f8ffcb047fd063a3.tar.gz
actually add bb_qsort.c
*: s/Denis/Denys/
Diffstat (limited to 'libbb')
-rw-r--r--libbb/bb_basename.c2
-rw-r--r--libbb/bb_qsort.c20
-rw-r--r--libbb/makedev.c2
-rw-r--r--libbb/printable.c2
-rw-r--r--libbb/signals.c2
-rw-r--r--libbb/time.c2
-rw-r--r--libbb/udp_io.c2
-rw-r--r--libbb/xfuncs.c2
8 files changed, 27 insertions, 7 deletions
diff --git a/libbb/bb_basename.c b/libbb/bb_basename.c
index e19156d..e6832f8 100644
--- a/libbb/bb_basename.c
+++ b/libbb/bb_basename.c
@@ -2,7 +2,7 @@
/*
* Utility routines.
*
- * Copyright (C) 2007 Denis Vlasenko
+ * Copyright (C) 2007 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
diff --git a/libbb/bb_qsort.c b/libbb/bb_qsort.c
new file mode 100644
index 0000000..e8673ab
--- /dev/null
+++ b/libbb/bb_qsort.c
@@ -0,0 +1,20 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Wrapper for common string vector sorting operation
+ *
+ * Copyright (c) 2008 Denys Vlasenko
+ *
+ * Licensed under GPLv2, see file LICENSE in this tarball for details.
+ */
+
+#include "libbb.h"
+
+int bb_pstrcmp(const void *a, const void *b)
+{
+ return strcmp(*(char**)a, *(char**)b);
+}
+
+void qsort_string_vector(char **sv, unsigned count)
+{
+ qsort(sv, count, sizeof(char*), bb_pstrcmp);
+}
diff --git a/libbb/makedev.c b/libbb/makedev.c
index 81cd82b..efd5122 100644
--- a/libbb/makedev.c
+++ b/libbb/makedev.c
@@ -1,7 +1,7 @@
/*
* Utility routines.
*
- * Copyright (C) 2006 Denis Vlasenko
+ * Copyright (C) 2006 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
diff --git a/libbb/printable.c b/libbb/printable.c
index 2420a91..676758a 100644
--- a/libbb/printable.c
+++ b/libbb/printable.c
@@ -2,7 +2,7 @@
/*
* Utility routines.
*
- * Copyright (C) 2007 Denis Vlasenko
+ * Copyright (C) 2007 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
diff --git a/libbb/signals.c b/libbb/signals.c
index b46b595..1929cb8 100644
--- a/libbb/signals.c
+++ b/libbb/signals.c
@@ -4,7 +4,7 @@
*
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 2006 Rob Landley
- * Copyright (C) 2006 Denis Vlasenko
+ * Copyright (C) 2006 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
diff --git a/libbb/time.c b/libbb/time.c
index 525032d..3aa0ee3 100644
--- a/libbb/time.c
+++ b/libbb/time.c
@@ -2,7 +2,7 @@
/*
* Utility routines.
*
- * Copyright (C) 2007 Denis Vlasenko
+ * Copyright (C) 2007 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
diff --git a/libbb/udp_io.c b/libbb/udp_io.c
index 7e48d32..2f02a13 100644
--- a/libbb/udp_io.c
+++ b/libbb/udp_io.c
@@ -2,7 +2,7 @@
/*
* Utility routines.
*
- * Copyright (C) 2007 Denis Vlasenko
+ * Copyright (C) 2007 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 18e696a..ca7f941 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -4,7 +4,7 @@
*
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 2006 Rob Landley
- * Copyright (C) 2006 Denis Vlasenko
+ * Copyright (C) 2006 Denys Vlasenko
*
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/