From cf7c43fe7307f04aecdd1454bce68b2370315461 Mon Sep 17 00:00:00 2001 From: nishi Date: Sun, 7 Apr 2024 13:07:04 +0000 Subject: [PATCH] add W3_Get_Version git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@285 d27a3e52-49c5-7645-884c-6793ebffc270 --- Library/Makefile | 2 +- Library/Version.c | 37 +++++++++++++++++++++++++++++++++++++ W3Version.h.m4 | 8 +++++--- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 Library/Version.c diff --git a/Library/Makefile b/Library/Makefile index bae59aa..efd8490 100644 --- a/Library/Makefile +++ b/Library/Makefile @@ -1,7 +1,7 @@ # $Id$ .PHONY: clean install -OBJS = ./Core.o ./Util.o ./DNS.o ./URL.o ./Tag.o +OBJS = ./Core.o ./Util.o ./DNS.o ./URL.o ./Tag.o ./Version.o include ./protocol.mk diff --git a/Library/Version.c b/Library/Version.c new file mode 100644 index 0000000..fb012de --- /dev/null +++ b/Library/Version.c @@ -0,0 +1,37 @@ +/* $Id$ */ +/* --- START LICENSE --- */ +/* -------------------------------------------------------------------------- */ +/* The WWW Library - LibW3 */ +/* developed by Nishi */ +/* http://nishi.boats/libw3 */ +/* -------------------------------------------------------------------------- */ +/* Copyright (c) 2024 Nishi. */ +/* Redistribution and use in source and binary forms, with or without modific */ +/* ation, are permitted provided that the following conditions are met: */ +/* 1. Redistributions of source code must retain the above copyright noti */ +/* ce, this list of conditions and the following disclaimer. */ +/* 2. Redistributions in binary form must reproduce the above copyright n */ +/* otice, this list of conditions and the following disclaimer in the documen */ +/* tation and/or other materials provided with the distribution. */ +/* 3. Neither the name of the copyright holder nor the names of its contr */ +/* ibutors may be used to endorse or promote products derived from this softw */ +/* are without specific prior written permission. */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS */ +/* " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, TH */ +/* E IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO */ +/* SE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS */ +/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CON */ +/* SEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITU */ +/* TE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPT */ +/* ION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S */ +/* TRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN */ +/* Y WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY */ +/* OF SUCH DAMAGE. */ +/* -------------------------------------------------------------------------- */ +/* --- END LICENSE --- */ + +#include "W3Version.h" + +extern const char* W3_Version; + +const char* W3_Get_Version(void) { return W3_Version; } diff --git a/W3Version.h.m4 b/W3Version.h.m4 index 14b1337..c2d8937 100644 --- a/W3Version.h.m4 +++ b/W3Version.h.m4 @@ -48,17 +48,19 @@ changequote(`{{', `}}') extern "C" { #endif +const char* W3_Get_Version(void); + /** * @~english * @brief Version of LibW3 - * @note Consider doing `extern const char* W3_Version;` + * @note Consider using W3_Get_Version. * * @~japanese * @brief LibW3のバージョン - * @note `extern const char* W3_Version;`をすることを検討してください。 + * @note W3_Get_Version 使用することを検討してください。 * */ -#define LIBW3_VERSION "2.21B" \ +#define LIBW3_VERSION "2.22" \ SUFFIX ifdef({{HTTP_SUPPORT}}, {{/** -- 2.43.0