dlgTextEntry_Keyboard: rename to TouchTextEntry
[xcsoar.git] / src / zzip / util.h
blob2cb24341a331b10734ec556e37e31fd2732b6587
1 #ifndef ZZIP_UTIL_H
2 #define ZZIP_UTIL_H
4 #include <zzip/lib.h>
6 #include <fcntl.h>
8 /**
9 * Opens a file inside a ZIP archive in read-only binary mode.
11 * @param dir optionally a ZZIP_DIR object
12 * @param path the path inside the archive
14 static inline ZZIP_FILE *
15 zzip_open_rb(ZZIP_DIR *dir, const char *path)
17 int mode = O_RDONLY;
18 #ifdef O_NOCTTY
19 mode |= O_NOCTTY;
20 #endif
21 #ifdef O_BINARY
22 mode |= O_BINARY;
23 #endif
25 return dir != NULL
26 ? zzip_file_open(dir, path, mode)
27 : zzip_open(path, mode);
30 #endif