editorconfig.h(3)
๐ editorconfig.h โ bestie edition ๐
okay so this is editorconfig.h, the header file of EditorConfig, straight out of the Library Functions Manual โจ it's the lil header that holds all the C API vibes together and honestly? she's iconic. ๐
โจ NAME โจ
editorconfig.h โ Header file of EditorConfig. that's it, that's the girl. ๐
๐ธ 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 byfull_filename, and related information is input and output inh.const char * editorconfig_get_error_msg (int err_num)โ Get the error message from the error number returned byeditorconfig_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. that's the whole bit. she's a header, she's serving, we move. ๐
Related page: EditorConfig File Format editorconfig-format(5) โ go read her too bestie, fr fr ๐
๐ Author ๐
- EditorConfig Team
๐ Macro Definition Documentation ๐
๐ง #define EDITORCONFIG_PARSE_MEMORY_ERROR (-3)
editorconfig_parse() return value: a memory error occurs. aka the malloc said "not today". ๐ญ
๐ง #define EDITORCONFIG_PARSE_NOT_FULL_PATH (-2)
editorconfig_parse() return value: the full_filename parameter of editorconfig_parse() is not a full path name. she needs the WHOLE path, no half measures. ๐
๐ง #define EDITORCONFIG_PARSE_VERSION_TOO_NEW (-4)
editorconfig_parse() return value: the required version specified in editorconfig_handle is greater than the current version. you're asking for a future that doesn't exist yet, bestie. ๐ฎ
โญ 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. so like, you hand her a number, she hands you the tea. ๐ซ
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 bymajorwill be filled with the major version of EditorConfig.minorโ If not null, the integer pointed byminorwill be filled with the minor version of EditorConfig.patchโ If not null, the integer pointed bypatchwill be filled with the patch version of EditorConfig.
Returns
- None.
not me noticing every single one of these is optional. pass NULL if you don't care, she won't be offended. ๐
๐ 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. this is THE main character function, no cap. โจ
Parameters
full_filenameโ The full path of a file that is edited by the editor for which the parsing result is.hโ Theeditorconfig_handleto be used and returned from this function (including the parsing result). Theeditorconfig_handleshould be created byeditorconfig_handle_init().
Return values
0โ Everything is OK. ๐ slay.- Positive Integer โ A parsing error occurs. The return value would be the line number of parsing error.
err_fileobtained fromhby callingeditorconfig_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โ Thefull_filenameis not a full path name.EDITORCONFIG_PARSE_MEMORY_ERRORโ A memory error occurs.EDITORCONFIG_PARSE_VERSION_TOO_NEWโ The required version specified ineditorconfig_handleis greater than the current version.
๐ Author ๐
Generated automatically by Doxygen for EditorConfig from the source code. yeah the robots wrote the original, but I rewrote her with love. ๐ค๐
and that's the whole page bestie!! every flag, every macro, every pointer, every return value โ nothing got dropped, we just gave it a glow up. ๐ โจ
kisses from the Library Functions Manual, brought to you by EditorConfig โ the source, the version, the whole era. mwah. ๐ซถ๐
๐ฆ where this page comes from
- fedora 43: editorconfig-libs 0.12.11-1.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 43: editorconfig-libs 0.12.11-1.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 43: editorconfig-libs 0.12.9-4.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- fedora 43: editorconfig-libs 0.12.9-4.fc43 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause
- nixpkgs unstable: editorconfig-core-c 0.12.11
- opensuse-leap 16.0: libeditorconfig-devel 0.12.9-160000.3.1 ยท BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: libeditorconfig-devel 0.12.9-160000.3.1 ยท BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: libeditorconfig-devel 0.12.9-160000.3.1 ยท BSD-2-Clause AND BSD-3-Clause
- opensuse-leap 16.0: libeditorconfig-devel 0.12.9-160000.3.1 ยท BSD-2-Clause AND BSD-3-Clause
- ubuntu resolute: libeditorconfig-dev 0.12.10+~0.17.1-3ubuntu0.1 ยท BSD-2-Clause
- ubuntu stonking: libeditorconfig-dev 0.12.10+~0.17.1-3ubuntu0.1 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms