ECONF\_COMMENT\_TAG(3) libeconf Manual ECONF\_COMMENT\_TAG(3)

# [NAME](#NAME)

econf\_comment\_tag - retrieve the comment tag character of a configuration file

# [SYNOPSIS](#SYNOPSIS)

```
#include <libeconf.h>
```

**char econf\_comment\_tag(const econf\_file \*key\_file);**

# [DESCRIPTION](#DESCRIPTION)

The **econf\_comment\_tag**() function retrieves the comment character currently defined for the configuration file object pointed to by *key\_file*.

In a typical INI-like configuration file, the comment character (e.g., “#” or “;”) denotes the start of a comment, where the rest of the line should be ignored during parsing.

The *key\_file* parameter must be a pointer to a valid **econf\_file** structure, usually obtained from functions like [**econf\_readConfig**(3)](/man/os/libeconf/econf_readConfig.3) or [**econf\_newKeyFile**(3)](/man/os/libeconf/econf_newKeyFile.3).

# [RETURN VALUE](#RETURN_VALUE)

On success, **econf\_comment\_tag**() returns the comment character used for the configuration file object.

# [ERRORS](#ERRORS)

This function does not return an explicit error code. Callers must ensure that *key\_file* is valid before calling this function.

# [SEE ALSO](#SEE_ALSO)

[**econf\_set\_comment\_tag**(3)](/man/os/libeconf/econf_set_comment_tag.3), [**econf\_delimiter\_tag**(3)](/man/os/libeconf/econf_delimiter_tag.3), [**econf\_readConfig**(3)](/man/os/libeconf/econf_readConfig.3), [**libeconf**(3)](/man/os/libeconf/libeconf.3)

2025-12-04 libeconf

---

Document: econf_comment_tag(3) from libeconf 0.8.4-r3 (Chainguard OS)
Source: https://github.com/openSUSE/libeconf
