xref: /dflybsd-src/usr.bin/sort/mem.h (revision 50fc853e3b7db00a98d1340044b5206d291d1925)
1*50fc853eSJohn Marino /*	$FreeBSD: head/usr.bin/sort/mem.h 264744 2014-04-21 22:52:18Z pfg $	*/
2*50fc853eSJohn Marino 
3*50fc853eSJohn Marino /*-
4*50fc853eSJohn Marino  * Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
5*50fc853eSJohn Marino  * Copyright (C) 2012 Oleg Moskalenko <mom040267@gmail.com>
6*50fc853eSJohn Marino  * All rights reserved.
7*50fc853eSJohn Marino  *
8*50fc853eSJohn Marino  * Redistribution and use in source and binary forms, with or without
9*50fc853eSJohn Marino  * modification, are permitted provided that the following conditions
10*50fc853eSJohn Marino  * are met:
11*50fc853eSJohn Marino  * 1. Redistributions of source code must retain the above copyright
12*50fc853eSJohn Marino  *    notice, this list of conditions and the following disclaimer.
13*50fc853eSJohn Marino  * 2. Redistributions in binary form must reproduce the above copyright
14*50fc853eSJohn Marino  *    notice, this list of conditions and the following disclaimer in the
15*50fc853eSJohn Marino  *    documentation and/or other materials provided with the distribution.
16*50fc853eSJohn Marino  *
17*50fc853eSJohn Marino  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18*50fc853eSJohn Marino  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19*50fc853eSJohn Marino  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20*50fc853eSJohn Marino  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21*50fc853eSJohn Marino  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22*50fc853eSJohn Marino  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23*50fc853eSJohn Marino  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24*50fc853eSJohn Marino  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25*50fc853eSJohn Marino  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26*50fc853eSJohn Marino  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27*50fc853eSJohn Marino  * SUCH DAMAGE.
28*50fc853eSJohn Marino  */
29*50fc853eSJohn Marino 
30*50fc853eSJohn Marino #if !defined(__SORT_MEM_H__)
31*50fc853eSJohn Marino #define	__SORT_MEM_H__
32*50fc853eSJohn Marino 
33*50fc853eSJohn Marino #include <errno.h>
34*50fc853eSJohn Marino #include <stdbool.h>
35*50fc853eSJohn Marino #include <stdlib.h>
36*50fc853eSJohn Marino 
37*50fc853eSJohn Marino /*
38*50fc853eSJohn Marino  * mem.c
39*50fc853eSJohn Marino  */
40*50fc853eSJohn Marino void *sort_malloc(size_t);
41*50fc853eSJohn Marino void sort_free(const void *ptr);
42*50fc853eSJohn Marino void *sort_realloc(void *, size_t);
43*50fc853eSJohn Marino char *sort_strdup(const char *);
44*50fc853eSJohn Marino 
45*50fc853eSJohn Marino #endif /* __SORT_MEM_H__ */
46