commit dfb332aa657b8dd8982de60e9f0aa8cd49f068fb
parent 0a001d30181bf6eacfba9d43a3e9995ae0bf6eb8
Author: Remy Noulin <loader2x@gmail.com>
Date: Tue, 30 Apr 2019 19:41:09 +0200
add isCompiledWithCurrentLisheepyVersion
Diffstat:
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/package.yml b/package.yml
@@ -1,18 +1,18 @@
---
name: ini
- version: 0.0.4
+ version: 0.0.5
description: An ini configuration file parser
bin: ./src/ini.c
scripts:
- test: echo "Error no test specified" && exit 1
+ test: "echo \"Error no test specified\" && exit 1"
repository:
type: git
- url: git+https://github.com/RemyNoulin/ini.git
+ url: "git+https://github.com/RemyNoulin/ini.git"
keywords:
- utility
- command
author: Remy Noulin
license: MIT
bugs:
- url: https://github.com/RemyNoulin/ini/issues
- homepage: https://github.com/RemyNoulin/ini
+ url: "https://github.com/RemyNoulin/ini/issues"
+ homepage: "https://github.com/RemyNoulin/ini"
diff --git a/src/ini.c b/src/ini.c
@@ -202,3 +202,8 @@ bool saveIni(smallDictt *ini, const char *path) {
return true;
}
+
+bool checkLibsheepyVersionIni(const char *currentLibsheepyVersion) {
+ return eqG(currentLibsheepyVersion, LIBSHEEPY_VERSION);
+}
+
diff --git a/src/ini.h b/src/ini.h
@@ -20,3 +20,6 @@ int ini_parse_file(FILE* fp, int (*callback)(char* section, char* variable, char
smallDictt *parseIni(const char *filename);
bool saveIni(smallDictt *ini, const char *path);
#endif
+
+#define isIniCompiledWithCurrentLisheepyVersion checkLibsheepyVersionIni(LIBSHEEPY_VERSION)
+bool checkLibsheepyVersionIni(const char *currentLibsheepyVersion);