From ff5a1bf4a623cf528e8b601959da993917e79c04 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 5 Feb 2023 11:20:08 +0100 Subject: - Updated cspan.h to allow for compiling some functions as shared symbols. - Fixed issue #45 warning -Wunused-parameter in clist.h - Fixed some issues with the singleheader.py generator. --- src/cregex.c | 1 - src/singleheader.py | 6 +++--- src/utf8code.c | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cregex.c b/src/cregex.c index c17e1967..def759ee 100644 --- a/src/cregex.c +++ b/src/cregex.c @@ -28,7 +28,6 @@ THE SOFTWARE. #include #include // header only #include -#include typedef uint32_t _Rune; /* Utf8 code point */ typedef int32_t _Token; diff --git a/src/singleheader.py b/src/singleheader.py index f5272cfb..2255568d 100644 --- a/src/singleheader.py +++ b/src/singleheader.py @@ -5,15 +5,15 @@ import sys import os from os.path import dirname, join as path_join, abspath, basename, exists -extra_paths = [path_join(dirname(abspath(__file__)), "include")] - +top_dir = dirname(abspath(__file__)) +extra_paths = [path_join(top_dir, 'include'), path_join(top_dir, '..', 'include')] def find_file(included_name, current_file): current_dir = dirname(abspath(current_file)) for idir in [current_dir] + extra_paths: try_path = path_join(idir, included_name) if exists(try_path): - return try_path + return abspath(try_path) return None diff --git a/src/utf8code.c b/src/utf8code.c index a892f5fd..ecfdd24d 100644 --- a/src/utf8code.c +++ b/src/utf8code.c @@ -1,6 +1,5 @@ #ifndef UTF8_C_INCLUDED #define UTF8_C_INCLUDED -#include #include // header only #include "utf8tabs.inc" -- cgit v1.2.3