| ECONF_SETQUOTES(3) | libeconf Manual | ECONF_SETQUOTES(3) |
NAME
econf_setQuotes - set whether the value of a key has to be enclosed by quotes
SYNOPSIS
#include <libeconf.h>
econf_err econf_setQuotes(econf_file *kf, const char *group, const char *key, const bool quotes);
DESCRIPTION
The econf_setQuotes() function sets whether the value of the key specified by group and key in the given configuration file object kf has to be enclosed by quotes when the configuration is written back with econf_writeFile(). If group is NULL, the key is considered to belong to no group.
If quotes is true, the value will be written enclosed by double quotes. If quotes is false, the value will be written without quotes.
Unlike the econf_set*Value() functions, econf_setQuotes() does not create the key if the group/key combination does not already exist.
The default value of the quotes flag for newly created entries (entries not read from a configuration file) can be changed from false to true with the DEFAULT_QUOTES option of econf_newKeyFile_with_options().
RETURN VALUE
Upon successful completion, this function returns ECONF_SUCCESS.
On error, a non-zero error code is returned (see the section called “ERRORS”).
ERRORS
ECONF_FILE_LIST_IS_NULL
Conf file list is NULL.
ECONF_EMPTYKEY
Key is NULL or has empty value.
ECONF_NOKEY
Key not found.
SEE ALSO
libeconf(3), econf_hasQuotes(3), econf_setValue(3), econf_writeFile(3), econf_errString(3)
| 2026-10-15 | libeconf |