[BACK]Return to qsort.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / stdlib

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/stdlib/qsort.c between version 1.20 and 1.21

version 1.20, 2009/06/01 06:37:40 version 1.21, 2011/05/18 19:36:36
Line 44  __RCSID("$NetBSD$");
Line 44  __RCSID("$NetBSD$");
 #include <errno.h>  #include <errno.h>
 #include <stdlib.h>  #include <stdlib.h>
   
 static inline char      *med3 __P((char *, char *, char *,  static inline char      *med3(char *, char *, char *,
     int (*)(const void *, const void *)));      int (*)(const void *, const void *));
 static inline void       swapfunc __P((char *, char *, size_t, int));  static inline void       swapfunc(char *, char *, size_t, int);
   
 #define min(a, b)       (a) < (b) ? a : b  #define min(a, b)       (a) < (b) ? a : b
   
Line 89  swapfunc(char *a, char *b, size_t n, int
Line 89  swapfunc(char *a, char *b, size_t n, int
   
 static inline char *  static inline char *
 med3(char *a, char *b, char *c,  med3(char *a, char *b, char *c,
     int (*cmp) __P((const void *, const void *)))      int (*cmp)(const void *, const void *))
 {  {
   
         return cmp(a, b) < 0 ?          return cmp(a, b) < 0 ?
Line 99  med3(char *a, char *b, char *c,
Line 99  med3(char *a, char *b, char *c,
   
 void  void
 qsort(void *a, size_t n, size_t es,  qsort(void *a, size_t n, size_t es,
     int (*cmp) __P((const void *, const void *)))      int (*cmp)(const void *, const void *))
 {  {
         char *pa, *pb, *pc, *pd, *pl, *pm, *pn;          char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
         size_t d, r;          size_t d, r;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

CVSweb <webmaster@jp.NetBSD.org>