.TH "editorconfig.h" 3 "Fri Nov 19 2021" "EditorConfig" \" -*- nroff -*- .ad l .nh .SH NAME editorconfig.h \- Header file of EditorConfig\&. .SH SYNOPSIS .br .PP \fC#include \fP .br .SS "Macros" .in +1c .ti -1c .RI "#define \fBEDITORCONFIG_PARSE_NOT_FULL_PATH\fP (\-2)" .br .ti -1c .RI "#define \fBEDITORCONFIG_PARSE_MEMORY_ERROR\fP (\-3)" .br .ti -1c .RI "#define \fBEDITORCONFIG_PARSE_VERSION_TOO_NEW\fP (\-4)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "int \fBeditorconfig_parse\fP (const char *full_filename, \fBeditorconfig_handle\fP h)" .br .RI "Parse editorconfig files corresponding to the file path given by full_filename, and related information is input and output in h\&. " .ti -1c .RI "const char * \fBeditorconfig_get_error_msg\fP (int err_num)" .br .RI "Get the error message from the error number returned by \fBeditorconfig_parse()\fP\&. " .ti -1c .RI "void \fBeditorconfig_get_version\fP (int *major, int *minor, int *patch)" .br .RI "Get the version number of EditorConfig\&. " .ti -1c .RI "const char * \fBeditorconfig_get_version_suffix\fP (void)" .br .RI "Get the version suffix\&. " .in -1c .SH "Detailed Description" .PP Header file of EditorConfig\&. Related page: \fBEditorConfig File Format\fP editorconfig-format(5) .PP \fBAuthor\fP .RS 4 EditorConfig Team .RE .PP .SH "Macro Definition Documentation" .PP .SS "#define EDITORCONFIG_PARSE_MEMORY_ERROR (\-3)" \fBeditorconfig_parse()\fP return value: a memory error occurs\&. .SS "#define EDITORCONFIG_PARSE_NOT_FULL_PATH (\-2)" \fBeditorconfig_parse()\fP return value: the full_filename parameter of \fBeditorconfig_parse()\fP is not a full path name .SS "#define EDITORCONFIG_PARSE_VERSION_TOO_NEW (\-4)" \fBeditorconfig_parse()\fP return value: the required version specified in \fBeditorconfig_handle\fP is greater than the current version\&. .SH "Function Documentation" .PP .SS "const char* editorconfig_get_error_msg (int err_num)" .PP Get the error message from the error number returned by \fBeditorconfig_parse()\fP\&. An example is available at \fCsrc/bin/main\&.c\fP in EditorConfig C Core source code\&. .PP \fBParameters\fP .RS 4 \fIerr_num\fP The error number that is used to obtain the error message\&. .RE .PP \fBReturns\fP .RS 4 The error message corresponding to err_num\&. .RE .PP .SS "void editorconfig_get_version (int * major, int * minor, int * patch)" .PP Get the version number of EditorConfig\&. An example is available at \fCsrc/bin/main\&.c\fP in EditorConfig C Core source code\&. .PP \fBParameters\fP .RS 4 \fImajor\fP If not null, the integer pointed by major will be filled with the major version of EditorConfig\&. .br \fIminor\fP If not null, the integer pointed by minor will be filled with the minor version of EditorConfig\&. .br \fIpatch\fP If not null, the integer pointed by patch will be filled with the patch version of EditorConfig\&. .RE .PP \fBReturns\fP .RS 4 None\&. .RE .PP .SS "const char* editorconfig_get_version_suffix (void)" .PP Get the version suffix\&. .PP \fBReturns\fP .RS 4 The version suffix, such as '-development' for a development version, empty string for a stable version\&. .RE .PP .SS "int editorconfig_parse (const char * full_filename, \fBeditorconfig_handle\fP h)" .PP 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 \fCsrc/bin/main\&.c\fP in EditorConfig C Core source code\&. .PP \fBParameters\fP .RS 4 \fIfull_filename\fP The full path of a file that is edited by the editor for which the parsing result is\&. .br \fIh\fP The \fBeditorconfig_handle\fP to be used and returned from this function (including the parsing result)\&. The \fBeditorconfig_handle\fP should be created by \fBeditorconfig_handle_init()\fP\&. .RE .PP \fBReturn values\fP .RS 4 \fI0\fP Everything is OK\&. .br \fIPositive Integer\fP A parsing error occurs\&. The return value would be the line number of parsing error\&. err_file obtained from h by calling \fBeditorconfig_handle_get_err_file()\fP will also be filled with the file path that caused the parsing error\&. .br \fINegative Integer\fP Some error occured\&. See below for the reason of the error for each return value\&. .br \fIEDITORCONFIG_PARSE_NOT_FULL_PATH\fP The full_filename is not a full path name\&. .br \fIEDITORCONFIG_PARSE_MEMORY_ERROR\fP A memory error occurs\&. .br \fIEDITORCONFIG_PARSE_VERSION_TOO_NEW\fP The required version specified in \fBeditorconfig_handle\fP is greater than the current version\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for EditorConfig from the source code\&.