source: libyaml/trunk/src/version.c @ 169

Revision 169, 502 bytes checked in by xi, 8 years ago (diff)

Add the basic autoconf infrastructure.

RevLine 
[169]1
2#if HAVE_CONFIG_H
3#include <config.h>
4#endif
5
6#include <yaml/yaml.h>
7
8const char *
9yaml_get_version_string(void)
10{
11    return YAML_VERSION_STRING;
12}
13
14void
15yaml_get_version(int *major, int *minor, int *patch)
16{
17    *major = YAML_VERSION_MAJOR;
18    *minor = YAML_VERSION_MINOR;
19    *patch = YAML_VERSION_PATCH;
20}
21
22int
23yaml_check_version(int major, int minor, int patch)
24{
25    return (major == YAML_VERSION_MAJOR
26            && minor == YAML_VERSION_MINOR
27            && patch >= YAML_VERSION_PATCH);
28}
29
Note: See TracBrowser for help on using the repository browser.