GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_app_cfg.h
Go to the documentation of this file.
1//SPDX-License-Identifier: LGPL-2.0-or-later
2
3/*
4
5 Copyright (c) 2022 Cyril Hrubis <metan@ucw.cz>
6
7 */
8
14#ifndef GP_APP_CFG_H
15#define GP_APP_CFG_H
16
17#include <core/gp_compiler.h>
18
28char *gp_app_cfg_path(const char *app_name, const char *cfg_filename);
29
40int gp_app_cfg_mkpath(const char *app_name);
41
55int gp_app_cfg_scanf(const char *app_name, const char *cfg_filename,
56 const char *fmt, ...) GP_FMT_SCANF(3, 4);
57
71int gp_app_cfg_printf(const char *app_name, const char *cfg_filename,
72 const char *fmt, ...) GP_FMT_PRINTF(3, 4);
73
74#endif /* GP_APP_CFG_H */
int gp_app_cfg_scanf(const char *app_name, const char *cfg_filename, const char *fmt,...)
Does a single scanf() from a config file.
int gp_app_cfg_printf(const char *app_name, const char *cfg_filename, const char *fmt,...)
Does a simple printf() to a config file.
int gp_app_cfg_mkpath(const char *app_name)
Creates a path for a config files, if it does not exists.
char * gp_app_cfg_path(const char *app_name, const char *cfg_filename)
Prepares a path to a config file.
A compiler dependent macros.
#define GP_FMT_PRINTF(fmt, list)
Expands to format printf attribute when supported by the compiler.
Definition gp_compiler.h:30
#define GP_FMT_SCANF(fmt, list)
Expands to format scanf attribute when supported by the compiler.
Definition gp_compiler.h:34