diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/bb_basename.c | 2 | ||||
-rw-r--r-- | libbb/bb_qsort.c | 20 | ||||
-rw-r--r-- | libbb/makedev.c | 2 | ||||
-rw-r--r-- | libbb/printable.c | 2 | ||||
-rw-r--r-- | libbb/signals.c | 2 | ||||
-rw-r--r-- | libbb/time.c | 2 | ||||
-rw-r--r-- | libbb/udp_io.c | 2 | ||||
-rw-r--r-- | libbb/xfuncs.c | 2 |
8 files changed, 27 insertions, 7 deletions
diff --git a/libbb/bb_basename.c b/libbb/bb_basename.c index e19156d5c..e6832f8ef 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 000000000..e8673abf9 --- /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 81cd82baf..efd51224f 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 2420a91f0..676758a2b 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 b46b595da..1929cb88e 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 525032d4d..3aa0ee318 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 7e48d32f3..2f02a138b 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 18e696a7a..ca7f94173 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. */ |