source: subversion/applications/utils/mod_tile/dir_utils.h @ 8647

Last change on this file since 8647 was 8425, checked in by jonb, 11 years ago

mod_tile: Move map style & font location into render_config.h. Fix up operation with non-metatile rendering. Several utilities are not implemented for non-metatile (render_list, render_old, speedtest).

File size: 882 bytes
Line 
1#ifndef DIR_UTILS_H
2#define DIR_UTILS_H
3
4#include <sys/types.h>
5
6#ifdef __cplusplus
7  extern "C" {
8#endif
9
10#include "render_config.h"
11
12/* Build parent directories for the specified file name
13 * Note: the part following the trailing / is ignored
14 * e.g. mkdirp("/a/b/foo.png") == shell mkdir -p /a/b
15 */
16int mkdirp(const char *path);
17
18/* File path hashing. Used by both mod_tile and render daemon
19 * The two must both agree on the file layout for meta-tiling
20 * to work
21 */
22const char *xyz_to_path(char *path, size_t len, int x, int y, int z);
23
24int check_xyz(int x, int y, int z);
25int path_to_xyz(const char *path, int *px, int *py, int *pz);
26
27#ifdef METATILE
28/* New meta-tile storage functions */
29/* Returns the path to the meta-tile and the offset within the meta-tile */
30int xyz_to_meta(char *path, size_t len, int x, int y, int z);
31#endif
32
33#ifdef __cplusplus
34  }
35#endif
36
37
38#endif
Note: See TracBrowser for help on using the repository browser.