From f5db78a69f5fa8750d78d44e0c7c79f6ba9471d8 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 12 Jan 2020 10:59:17 -0500 Subject: [PATCH] Ignore special ascii chars, strip binary in docker build --- Docker/build.sh | 1 + src/main.c | 2 +- src/util.h | 2 +- web/search.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Docker/build.sh b/Docker/build.sh index 297f104..cf34b96 100755 --- a/Docker/build.sh +++ b/Docker/build.sh @@ -1,5 +1,6 @@ rm ./sist2 cp ../sist2 . +strip sist2 version=$(./sist2 --version) diff --git a/src/main.c b/src/main.c index c622aac..4a8f27f 100644 --- a/src/main.c +++ b/src/main.c @@ -10,7 +10,7 @@ #define EPILOG "Made by simon987 . Released under GPL-3.0" -static const char *const Version = "1.1.14"; +static const char *const Version = "1.1.15"; static const char *const usage[] = { "sist2 scan [OPTION]... PATH", "sist2 index [OPTION]... INDEX", diff --git a/src/util.h b/src/util.h index 64fd833..15512db 100644 --- a/src/util.h +++ b/src/util.h @@ -7,7 +7,7 @@ #define INITIAL_BUF_SIZE 1024 * 16 #define SHOULD_IGNORE_CHAR(c) !(SHOULD_KEEP_CHAR(c)) -#define SHOULD_KEEP_CHAR(c) (c >= (int)'!') +#define SHOULD_KEEP_CHAR(c) ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'z') || (c > 127)) typedef struct dyn_buffer { diff --git a/web/search.html b/web/search.html index b7aba88..bef8b47 100644 --- a/web/search.html +++ b/web/search.html @@ -11,7 +11,7 @@