mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
__P completely removed from pqsort.c/h
This commit is contained in:
parent
5cf5fa6562
commit
d90b352ded
16
pqsort.c
16
pqsort.c
@ -37,10 +37,6 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __P
|
|
||||||
#define __P(protos) protos
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
#if 0
|
#if 0
|
||||||
@ -56,9 +52,9 @@ __RCSID("$NetBSD: qsort.c,v 1.19 2009/01/30 23:38:44 lukem Exp $");
|
|||||||
#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
|
||||||
|
|
||||||
@ -101,7 +97,7 @@ swapfunc(char *a, char *b, size_t n, int swaptype)
|
|||||||
|
|
||||||
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 ?
|
||||||
@ -111,7 +107,7 @@ med3(char *a, char *b, char *c,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_pqsort(void *a, size_t n, size_t es,
|
_pqsort(void *a, size_t n, size_t es,
|
||||||
int (*cmp) __P((const void *, const void *)), void *lrange, void *rrange)
|
int (*cmp) (const void *, const void *), void *lrange, void *rrange)
|
||||||
{
|
{
|
||||||
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
|
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
|
||||||
size_t d, r;
|
size_t d, r;
|
||||||
@ -203,7 +199,7 @@ loop: SWAPINIT(a, es);
|
|||||||
|
|
||||||
void
|
void
|
||||||
pqsort(void *a, size_t n, size_t es,
|
pqsort(void *a, size_t n, size_t es,
|
||||||
int (*cmp) __P((const void *, const void *)), size_t lrange, size_t rrange)
|
int (*cmp) (const void *, const void *), size_t lrange, size_t rrange)
|
||||||
{
|
{
|
||||||
_pqsort(a,n,es,cmp,((unsigned char*)a)+(lrange*es),
|
_pqsort(a,n,es,cmp,((unsigned char*)a)+(lrange*es),
|
||||||
((unsigned char*)a)+((rrange+1)*es)-1);
|
((unsigned char*)a)+((rrange+1)*es)-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user