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 <stdlib.h>
18#include <core/gp_compiler.h>
19
29char *gp_app_cfg_path(const char *app_name, const char *cfg_filename);
30
41int gp_app_cfg_mkpath(const char *app_name);
42
56int gp_app_cfg_scanf(const char *app_name, const char *cfg_filename,
57 const char *fmt, ...) GP_FMT_SCANF(3, 4);
58
72int gp_app_cfg_printf(const char *app_name, const char *cfg_filename,
73 const char *fmt, ...) GP_FMT_PRINTF(3, 4);
74
75#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:31
#define GP_FMT_SCANF(fmt, list)
Expands to format scanf attribute when supported by the compiler.
Definition gp_compiler.h:35