Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
paths.h
Go to the documentation of this file.
1/*
2 This file is part of Ansel,
3 Copyright (C) 2026 Aurélien PIERRE.
4
5 Ansel is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 Ansel is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef DT_COMMON_PATHS_H
19#define DT_COMMON_PATHS_H
20
21/* g_open() takes O_BINARY on Windows and does not define it elsewhere. Kept here rather
22 * than in darktable.h so that opening a file does not require the application. */
23#if !defined(O_BINARY)
24#define O_BINARY 0
25#endif
26
27/* Path/filename length constants and path splicing. Application-free on purpose:
28 * include this instead of darktable.h. */
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35#define DT_MAX_FILENAME_LEN 256
36
57#define DT_PATH_MAX 4096
58
59/*
60 * ONLY TO BE USED FOR PARAMS!!! (e.g. dt_imageio_disk_t)
61 *
62 * WARNING: this should *NEVER* be changed, as it will break params,
63 * created with previous DT_MAX_PATH_FOR_PARAMS.
64 */
65#define DT_MAX_PATH_FOR_PARAMS 4096
66
75void dt_concat_path_file(char destination[DT_PATH_MAX], const char path[DT_PATH_MAX], const char *const file);
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif // DT_COMMON_PATHS_H
82
83// clang-format off
84// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
85// vim: shiftwidth=2 expandtab tabstop=2 cindent
86// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
87// clang-format on
#define DT_PATH_MAX
Buffer size for a filesystem path anywhere in Ansel.
Definition paths.h:57
void dt_concat_path_file(char destination[4096], const char path[4096], const char *const file)
Append a constant filename to a variable, stack-based, fixed-sized, directory, and add a / in-between...
Definition darktable.c:2674