From 83fd92dec22092f84265543ed50f06284905b645 Mon Sep 17 00:00:00 2001 From: d4ndox Date: Wed, 8 May 2024 18:07:15 +0200 Subject: [PATCH] Deleted version.c version.h --- version.c | 44 -------------------------------------------- version.h | 8 -------- 2 files changed, 52 deletions(-) delete mode 100644 version.c delete mode 100644 version.h diff --git a/version.c b/version.c deleted file mode 100644 index 6a37cf2..0000000 --- a/version.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2024 d4ndo@proton.me - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include "./cjson/cJSON.h" -#include "version.h" -#include "globaldefs.h" - -int version(cJSON **version) -{ - int ret = 0; - cJSON *result = cJSON_GetObjectItem(*version, "result"); - - unsigned int v = cJSON_GetObjectItem(result, "version")->valueint; - unsigned int major = (v & MAJOR_MASK) >> 16; - unsigned int minor = (v & MINOR_MASK); - //if (verbose) fprintf(stdout, "rpc version: v%d.%d\n", major, minor); - - return ret; -} - diff --git a/version.h b/version.h deleted file mode 100644 index b47290e..0000000 --- a/version.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef VERSION_H -#define VERSION_H - -#include "./cjson/cJSON.h" - -int version(cJSON **version); - -#endif