EditorConfig
Configuration file format for defining coding styles in shared projects.
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
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
44extern "C" {
45#endif
46
50typedef void* editorconfig_handle;
51
59EDITORCONFIG_EXPORT
61
71EDITORCONFIG_EXPORT
73
84EDITORCONFIG_EXPORT
86
104EDITORCONFIG_EXPORT
106 int* minor, int* patch);
107
127EDITORCONFIG_EXPORT
129 int minor, int patch);
141EDITORCONFIG_EXPORT
143 const char* conf_file_name);
144
154EDITORCONFIG_EXPORT
156
171EDITORCONFIG_EXPORT
173 const char** name, const char** value);
174
185EDITORCONFIG_EXPORT
187
188#ifdef __cplusplus
189}
190#endif
191
192#endif /* !EDITORCONFIG_EDITORCONFIG_HANDLE_H__ */
193
void * editorconfig_handle
The editorconfig handle object type.
Definition: editorconfig_handle.h:50
const char * editorconfig_handle_get_conf_file_name(const editorconfig_handle h)
Get the conf_file_name field of an editorconfig_handle object.
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.
void editorconfig_handle_set_version(const editorconfig_handle h, int major, int minor, int patch)
Set the version fields of an editorconfig_handle object.
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 editorconfig_handle_init(void)
Create and intialize a default editorconfig_handle object.
void editorconfig_handle_get_version(const editorconfig_handle h, int *major, int *minor, int *patch)
Get the version fields of an editorconfig_handle object.
const char * editorconfig_handle_get_err_file(editorconfig_handle h)
Get the err_file field of an editorconfig_handle object.
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.
int editorconfig_handle_destroy(editorconfig_handle h)
Destroy an editorconfig_handle object.