xref: /openbsd/usr.bin/file/file.h (revision dda28197)
1 /* $OpenBSD: file.h,v 1.30 2016/06/12 21:10:42 nicm Exp $ */
2 
3 /*
4  * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
15  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
16  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef FILE_H
20 #define FILE_H
21 
22 /* Bytes to read if can't use the whole file. */
23 #define FILE_READ_SIZE (256 * 1024)
24 
25 /* User to drop privileges to in child process. */
26 #define FILE_USER "_file"
27 
28 /* text.c */
29 const char	*text_get_type(const void *, size_t);
30 const char	*text_try_words(const void *, size_t, int);
31 
32 #endif /* FILE_H */
33