]> git.saurik.com Git - cydia.git/blame_incremental - apt.h
Move private ivars in CyteKit to @implementations.
[cydia.git] / apt.h
... / ...
CommitLineData
1#ifndef APT_H
2#define APT_H
3
4#include <unistd.h>
5
6template <typename Type_>
7Type_ *memrchr(Type_ *data, int value, int size) {
8 for (int i = 0; i != size; ++i)
9 if (data[size - i - 1] == value)
10 return data + size - i - 1;
11 return 0;
12}
13
14template <typename Type_>
15static Type_ *strchrnul(Type_ *s, int c) {
16 while (*s != c && *s != '\0')
17 ++s;
18 return s;
19}
20
21#define faccessat(arg0, arg1, arg2, arg3) \
22 access(arg1, arg2)
23
24#if 0
25#include <syslog.h>
26static unsigned nonce(0);
27#define _trace() syslog(LOG_ERR, "_trace():%s[%u] #%u\n", __FILE__, __LINE__, ++nonce)
28#endif
29
30#endif//APT_H