1 /*	$MirOS: src/usr.sbin/makefs/mbsdtree.h,v 1.5 2013/10/31 20:07:26 tg Exp $	*/
2 /*	$OpenBSD: util.h,v 1.26 2004/07/13 21:09:48 millert Exp $	*/
3 /*	$NetBSD: util.h,v 1.2 1996/05/16 07:00:22 thorpej Exp $	*/
4 
5 /*-
6  * Copyright (c) 2009, 2010, 2013
7  *	Thorsten Glaser <tg@mirbsd.org>
8  * Copyright (c) 1995
9  *	The Regents of the University of California.  All rights reserved.
10  * Portions Copyright (c) 1996, Jason Downs.  All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  * 3. Neither the name of the University nor the names of its contributors
21  *    may be used to endorse or promote products derived from this software
22  *    without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34  * SUCH DAMAGE.
35  */
36 
37 #ifndef MBSDTREE_H
38 #define MBSDTREE_H
39 
40 #include <sys/types.h>
41 
42 __BEGIN_DECLS
43 
44 
45 /* lib/libc/stdlib/strsuftoll.c */
46 
47 long long strsuftoll(const char *, const char *,
48     long long, long long);
49 long long strsuftollx(const char *, const char *,
50     long long, long long, char *, size_t)
51 #if defined(__GNUC__) && (defined(__OpenBSD__) || defined(__MirBSD__))
52     __attribute__((__bounded__(__string__, 5, 6)))
53 #endif
54     ;
55 
56 #ifndef DEBIAN
57 /* lib/libutil/stat_flags.c */
58 
59 char *flags_to_string(u_long, const char *);
60 int string_to_flags(char **, u_long *, u_long *);
61 #endif
62 
63 #ifdef NEED_FPARSELN_DECL
64 /*
65  * fparseln() specific operation flags.
66  */
67 #define FPARSELN_UNESCESC	0x01
68 #define FPARSELN_UNESCCONT	0x02
69 #define FPARSELN_UNESCCOMM	0x04
70 #define FPARSELN_UNESCREST	0x08
71 #define FPARSELN_UNESCALL	0x0f
72 
73 char   *fparseln(FILE *, size_t *, size_t *, const char[3], int);
74 #endif
75 
76 
77 __END_DECLS
78 
79 #endif
80