"Fossies" - the Fresh Open Source Software Archive 
Member "xombrero-1.6.4/osx/util.h" (17 Feb 2015, 2013 Bytes) of package /linux/www/old/xombrero-1.6.4.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "util.h" see the
Fossies "Dox" file reference documentation.
1 /*
2 * Copyright (c) 2010 Marco Peereboom <marco@peereboom.us>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #define FPARSELN_UNESCESC 0x01
18 #define FPARSELN_UNESCCONT 0x02
19 #define FPARSELN_UNESCCOMM 0x04
20 #define FPARSELN_UNESCREST 0x08
21 #define FPARSELN_UNESCALL 0x0f
22
23 #if !__has_builtin(strlcpy)
24 size_t strlcpy(char *, const char *, size_t);
25 #endif
26 #if !__has_builtin(strlcat)
27 size_t strlcat(char *, const char *, size_t);
28 #endif
29
30 char *fgetln(FILE *, size_t *);
31 char *fparseln(FILE *, size_t *, size_t *, const char [3], int);
32
33 long long strtonum(const char *, long long, long long, const char **);
34
35 int fmt_scaled(long long number, char *result);
36
37 #ifndef WAIT_ANY
38 #define WAIT_ANY (-1)
39 #endif
40
41 /* there is no limit to ulrich drepper's crap */
42 #ifndef TAILQ_END
43 #define TAILQ_END(head) NULL
44 #endif
45
46 #ifndef TAILQ_FOREACH_SAFE
47 #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
48 for ((var) = TAILQ_FIRST(head); \
49 (var) != TAILQ_END(head) && \
50 ((tvar) = TAILQ_NEXT(var, field), 1); \
51 (var) = (tvar))
52 #endif
53
54 /*
55 * fmt_scaled(3) specific flags. (from OpenBSD util.h)
56 */
57 #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */
58
59 int getpeereid(int s, uid_t *euid, gid_t *gid);
60