EditorConfig
Configuration file format for defining coding styles in shared projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
editorconfig_handle.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011-2019 EditorConfig Team
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright notice,
9
* this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright notice,
11
* this list of conditions and the following disclaimer in the documentation
12
* and/or other materials provided with the distribution.
13
*
14
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
* POSSIBILITY OF SUCH DAMAGE.
25
*/
26
33
34
#ifndef EDITORCONFIG_EDITORCONFIG_HANDLE_H__
35
#define EDITORCONFIG_EDITORCONFIG_HANDLE_H__
36
37
/* When included from a user program, EDITORCONFIG_EXPORT may not be defined,
38
* and we define it here*/
39
#ifndef EDITORCONFIG_EXPORT
40
# define EDITORCONFIG_EXPORT
41
#endif
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
50
typedef
void
*
editorconfig_handle
;
51
59
EDITORCONFIG_EXPORT
60
editorconfig_handle
editorconfig_handle_init
(
void
);
61
71
EDITORCONFIG_EXPORT
72
int
editorconfig_handle_destroy
(
editorconfig_handle
h);
73
84
EDITORCONFIG_EXPORT
85
const
char
*
editorconfig_handle_get_err_file
(
editorconfig_handle
h);
86
104
EDITORCONFIG_EXPORT
105
void
editorconfig_handle_get_version
(
const
editorconfig_handle
h,
int
* major,
106
int
* minor,
int
* patch);
107
127
EDITORCONFIG_EXPORT
128
void
editorconfig_handle_set_version
(
const
editorconfig_handle
h,
int
major,
129
int
minor,
int
patch);
141
EDITORCONFIG_EXPORT
142
void
editorconfig_handle_set_conf_file_name
(
editorconfig_handle
h,
143
const
char
* conf_file_name);
144
154
EDITORCONFIG_EXPORT
155
const
char
*
editorconfig_handle_get_conf_file_name
(
const
editorconfig_handle
h);
156
171
EDITORCONFIG_EXPORT
172
void
editorconfig_handle_get_name_value
(
const
editorconfig_handle
h,
int
n,
173
const
char
** name,
const
char
** value);
174
185
EDITORCONFIG_EXPORT
186
int
editorconfig_handle_get_name_value_count
(
const
editorconfig_handle
h);
187
188
#ifdef __cplusplus
189
}
190
#endif
191
192
#endif
/* !EDITORCONFIG_EDITORCONFIG_HANDLE_H__ */
193
editorconfig_handle
void * editorconfig_handle
The editorconfig handle object type.
Definition
editorconfig_handle.h:50
editorconfig_handle_get_conf_file_name
const char * editorconfig_handle_get_conf_file_name(const editorconfig_handle h)
Get the conf_file_name field of an editorconfig_handle object.
editorconfig_handle_set_conf_file_name
void editorconfig_handle_set_conf_file_name(editorconfig_handle h, const char *conf_file_name)
Set the conf_file_name field of an editorconfig_handle object.
editorconfig_handle_set_version
void editorconfig_handle_set_version(const editorconfig_handle h, int major, int minor, int patch)
Set the version fields of an editorconfig_handle object.
editorconfig_handle_get_name_value_count
int editorconfig_handle_get_name_value_count(const editorconfig_handle h)
Get the count of name and value fields of an editorconfig_handle object.
editorconfig_handle_init
editorconfig_handle editorconfig_handle_init(void)
Create and intialize a default editorconfig_handle object.
editorconfig_handle_get_version
void editorconfig_handle_get_version(const editorconfig_handle h, int *major, int *minor, int *patch)
Get the version fields of an editorconfig_handle object.
editorconfig_handle_get_err_file
const char * editorconfig_handle_get_err_file(editorconfig_handle h)
Get the err_file field of an editorconfig_handle object.
editorconfig_handle_get_name_value
void editorconfig_handle_get_name_value(const editorconfig_handle h, int n, const char **name, const char **value)
Get the nth name and value fields of an editorconfig_handle object.
editorconfig_handle_destroy
int editorconfig_handle_destroy(editorconfig_handle h)
Destroy an editorconfig_handle object.
include
editorconfig
editorconfig_handle.h
Generated by
1.17.0