---
name: "editorconfig.h"
section: "3"
platform: "linux"
package: "editorconfig-core-c"
version: "0.12.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/editorconfig.h"
---

# editorconfig.h(3)

Header file of EditorConfig.

## NAME

editorconfig.h - Header file of EditorConfig.

## SYNOPSIS

\#include \<editorconfig/editorconfig\_handle.h\>\

### Macros

\#define **EDITORCONFIG\_PARSE\_NOT\_FULL\_PATH**   (-2)\
 \#define **EDITORCONFIG\_PARSE\_MEMORY\_ERROR**   (-3)\
 \#define **EDITORCONFIG\_PARSE\_VERSION\_TOO\_NEW**   (-4)\

### Functions

int **editorconfig\_parse** (const char \*full\_filename, **editorconfig\_handle** h)\
 Parse editorconfig files corresponding to the file path given by full\_filename, and related information is input and output in h.  const char \* **editorconfig\_get\_error\_msg** (int err\_num)\
 Get the error message from the error number returned by **editorconfig\_parse()**.  void **editorconfig\_get\_version** (int \*major, int \*minor, int \*patch)\
 Get the version number of EditorConfig.  const char \* **editorconfig\_get\_version\_suffix** (void)\
 Get the version suffix.

## Detailed Description

Header file of EditorConfig.

Related page: **EditorConfig File Format**   [editorconfig-format(5)](/editorconfig-format/5.md)

**Author**

EditorConfig Team

## Macro Definition Documentation

### #define EDITORCONFIG\_PARSE\_MEMORY\_ERROR (-3)

**editorconfig\_parse()** return value: a memory error occurs.

### #define EDITORCONFIG\_PARSE\_NOT\_FULL\_PATH (-2)

**editorconfig\_parse()** return value: the full\_filename parameter of **editorconfig\_parse()** is not a full path name

### #define EDITORCONFIG\_PARSE\_VERSION\_TOO\_NEW (-4)

**editorconfig\_parse()** return value: the required version specified in **editorconfig\_handle** is greater than the current version.

## Function Documentation

### const char \* editorconfig\_get\_error\_msg (int err\_num)

Get the error message from the error number returned by **editorconfig\_parse()**. An example is available at src/bin/main.c in EditorConfig C Core source code.

**Parameters**

*err\_num* The error number that is used to obtain the error message.

**Returns**

The error message corresponding to err\_num.

### void editorconfig\_get\_version (int \* major, int \* minor, int \* patch)

Get the version number of EditorConfig. An example is available at src/bin/main.c in EditorConfig C Core source code.

**Parameters**

*major* If not null, the integer pointed by major will be filled with the major version of EditorConfig.\
 *minor* If not null, the integer pointed by minor will be filled with the minor version of EditorConfig.\
 *patch* If not null, the integer pointed by patch will be filled with the patch version of EditorConfig.

**Returns**

None.

### const char \* editorconfig\_get\_version\_suffix (void )

Get the version suffix.

**Returns**

The version suffix, such as "-development" for a development version, empty string for a stable version.

### int editorconfig\_parse (const char \* full\_filename, editorconfig\_handle h)

Parse editorconfig files corresponding to the file path given by full\_filename, and related information is input and output in h. An example is available at src/bin/main.c in EditorConfig C Core source code.

**Parameters**

*full\_filename* The full path of a file that is edited by the editor for which the parsing result is.\
 *h* The **editorconfig\_handle** to be used and returned from this function (including the parsing result). The **editorconfig\_handle** should be created by **editorconfig\_handle\_init()**.

**Return values**

*0* Everything is OK.\
 *Positive Integer* A parsing error occurs. The return value would be the line number of parsing error. err\_file obtained from h by calling **editorconfig\_handle\_get\_err\_file()** will also be filled with the file path that caused the parsing error.\
 *Negative Integer* Some error occured. See below for the reason of the error for each return value.\
 **EDITORCONFIG\_PARSE\_NOT\_FULL\_PATH The full\_filename is not a full path name.**\
 **EDITORCONFIG\_PARSE\_MEMORY\_ERROR A memory error occurs.**\
 **EDITORCONFIG\_PARSE\_VERSION\_TOO\_NEW The required version specified in editorconfig\_handle is greater than the current version.**

## Author

**Generated automatically by Doxygen for EditorConfig from the source code.**
