From 4976bab73f48951375b183fcf1828142af28baa6 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Sat, 21 Dec 2019 07:53:11 +0100 Subject: [PATCH] Polishing sources (copyrights, test refactoring). --- .travis.yml | 2 +- build/{build-animated-gif.sh => anigif-build.sh} | 2 +- build/anigif-create.sh | 16 ++++++++++++++-- build/anigif-rename.sh | 2 +- .../update-pkgconfig-sha256-on-repo-change.sh | 2 +- build/debian/aptly-add-deb.sh | 2 +- build/debian/make-deb.sh | 2 +- build/debian/upload-to-mentors.sh | 2 +- build/fedora/rpm-from-deb.sh | 2 +- build/tarball/tarball-automake.sh | 2 +- build/tarball/tarball-build.sh | 2 +- build/tarball/tarball-uninstall.sh | 2 +- build/test-clean.sh | 2 +- build/test-gdb.sh | 2 +- build/test-generate-unity-test-runner.sh | 2 +- build/test-memleaks.sh | 2 +- build/test-set-env-monster-history.sh | 2 +- build/test-set-env-utf8-history.sh | 2 +- build/test-units.sh | 6 ++++-- build/ubuntu/launchpad-add-hstr-ppa.sh | 2 +- build/ubuntu/launchpad-make-all-releases.sh | 2 +- build/ubuntu/pbuilder-add-new-distro.sh | 2 +- build/ubuntu/pbuilder-refresh-all-distros.sh | 2 +- configure.ac | 2 +- etc/bash-completion.d/hstr | 2 +- hstr.pro | 2 +- pad.xml | 10 +++++----- snap/snapcraft.yaml | 2 +- src/hashset.c | 2 +- src/hstr.c | 2 +- src/hstr_blacklist.c | 2 +- src/hstr_curses.c | 2 +- src/hstr_favorites.c | 2 +- src/hstr_history.c | 2 +- src/hstr_regexp.c | 2 +- src/hstr_utils.c | 2 +- src/include/hashset.h | 2 +- src/include/hstr.h | 2 +- src/include/hstr_blacklist.h | 2 +- src/include/hstr_curses.h | 2 +- src/include/hstr_favorites.h | 2 +- src/include/hstr_history.h | 2 +- src/include/hstr_regexp.h | 2 +- src/include/hstr_utils.h | 2 +- src/include/radixsort.h | 2 +- src/main.c | 2 +- src/radixsort.c | 2 +- test/.gitignore | 0 test/hstr-unit-tests.pro | 4 ++-- test/src/test.c | 2 +- test/src/test_curses_keyb.c | 2 +- test/src/test_history_generator.c | 2 +- test/src/test_keyb.c | 2 +- test/src/test_utf8.c | 8 +++++++- test/test-bug-124.sh | 2 +- test/test-bug-163.sh | 2 +- test/test-bug-175.sh | 2 +- test/test-bug-176.sh | 2 +- test/test-bug-228.sh | 2 +- test/test-curses-keyb.sh | 2 +- test/test-history-generator.sh | 2 +- test/test-keyb.sh | 2 +- test/test-utf8.sh | 2 +- 63 files changed, 89 insertions(+), 69 deletions(-) rename build/{build-animated-gif.sh => anigif-build.sh} (91%) mode change 100644 => 100755 create mode 100644 test/.gitignore diff --git a/.travis.yml b/.travis.yml index d2be5f2..6a4a5dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ # .travis.yml Travis CI configuration file for HSTR # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/build-animated-gif.sh b/build/anigif-build.sh old mode 100644 new mode 100755 similarity index 91% rename from build/build-animated-gif.sh rename to build/anigif-build.sh index c733eb0..bfaa7c8 --- a/build/build-animated-gif.sh +++ b/build/anigif-build.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/anigif-create.sh b/build/anigif-create.sh index 909ee5a..ea1d320 100755 --- a/build/anigif-create.sh +++ b/build/anigif-create.sh @@ -1,6 +1,18 @@ #!/bin/bash - -# convert -loop 0 -delay 100 in1.png in2.png out.gif +# +# Copyright (C) 2014-2020 Martin Dvorak +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. export FFF=`ls *.png | while read F do diff --git a/build/anigif-rename.sh b/build/anigif-rename.sh index f4dff70..0b81d77 100755 --- a/build/anigif-rename.sh +++ b/build/anigif-rename.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/arch/update-pkgconfig-sha256-on-repo-change.sh b/build/arch/update-pkgconfig-sha256-on-repo-change.sh index 153de57..526f9a5 100755 --- a/build/arch/update-pkgconfig-sha256-on-repo-change.sh +++ b/build/arch/update-pkgconfig-sha256-on-repo-change.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/debian/aptly-add-deb.sh b/build/debian/aptly-add-deb.sh index f2d677c..20428c3 100755 --- a/build/debian/aptly-add-deb.sh +++ b/build/debian/aptly-add-deb.sh @@ -2,7 +2,7 @@ # # MindForger knowledge management tool # -# Copyright (C) 2016-2018 Martin Dvorak +# Copyright (C) 2016-2020 Martin Dvorak # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/build/debian/make-deb.sh b/build/debian/make-deb.sh index b7a9984..90f9698 100755 --- a/build/debian/make-deb.sh +++ b/build/debian/make-deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/debian/upload-to-mentors.sh b/build/debian/upload-to-mentors.sh index 32dceec..8a1e68b 100755 --- a/build/debian/upload-to-mentors.sh +++ b/build/debian/upload-to-mentors.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/fedora/rpm-from-deb.sh b/build/fedora/rpm-from-deb.sh index 2146658..2c8c9af 100755 --- a/build/fedora/rpm-from-deb.sh +++ b/build/fedora/rpm-from-deb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2016-2018 Martin Dvorak +# Copyright (C) 2016-2020 Martin Dvorak # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/build/tarball/tarball-automake.sh b/build/tarball/tarball-automake.sh index 3aaf595..3834e53 100755 --- a/build/tarball/tarball-automake.sh +++ b/build/tarball/tarball-automake.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/tarball/tarball-build.sh b/build/tarball/tarball-build.sh index 7e15a36..0323c04 100755 --- a/build/tarball/tarball-build.sh +++ b/build/tarball/tarball-build.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/tarball/tarball-uninstall.sh b/build/tarball/tarball-uninstall.sh index bc52574..a387935 100755 --- a/build/tarball/tarball-uninstall.sh +++ b/build/tarball/tarball-uninstall.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-clean.sh b/build/test-clean.sh index 72a8763..b078812 100755 --- a/build/test-clean.sh +++ b/build/test-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-gdb.sh b/build/test-gdb.sh index 73a7961..544b2d0 100755 --- a/build/test-gdb.sh +++ b/build/test-gdb.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-generate-unity-test-runner.sh b/build/test-generate-unity-test-runner.sh index 545627f..99ef902 100755 --- a/build/test-generate-unity-test-runner.sh +++ b/build/test-generate-unity-test-runner.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-memleaks.sh b/build/test-memleaks.sh index 69da264..0899ffe 100755 --- a/build/test-memleaks.sh +++ b/build/test-memleaks.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-set-env-monster-history.sh b/build/test-set-env-monster-history.sh index 6505f3b..5e86478 100755 --- a/build/test-set-env-monster-history.sh +++ b/build/test-set-env-monster-history.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-set-env-utf8-history.sh b/build/test-set-env-utf8-history.sh index 3d6c910..2e927fe 100755 --- a/build/test-set-env-utf8-history.sh +++ b/build/test-set-env-utf8-history.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/test-units.sh b/build/test-units.sh index 4cf5233..e83a4a1 100755 --- a/build/test-units.sh +++ b/build/test-units.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Run unit tests. +# Run unit tests: local + CI + +# TODO calculate CORE count and use it below # options #export OPTION_RUN_VALGRIND=yes # run test(s) w/ Valgrind (comment this line to disable) diff --git a/build/ubuntu/launchpad-add-hstr-ppa.sh b/build/ubuntu/launchpad-add-hstr-ppa.sh index 9f2021b..109e460 100755 --- a/build/ubuntu/launchpad-add-hstr-ppa.sh +++ b/build/ubuntu/launchpad-add-hstr-ppa.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/ubuntu/launchpad-make-all-releases.sh b/build/ubuntu/launchpad-make-all-releases.sh index 96768e4..c14f6a5 100755 --- a/build/ubuntu/launchpad-make-all-releases.sh +++ b/build/ubuntu/launchpad-make-all-releases.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/ubuntu/pbuilder-add-new-distro.sh b/build/ubuntu/pbuilder-add-new-distro.sh index 46332a7..8045d3e 100755 --- a/build/ubuntu/pbuilder-add-new-distro.sh +++ b/build/ubuntu/pbuilder-add-new-distro.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/ubuntu/pbuilder-refresh-all-distros.sh b/build/ubuntu/pbuilder-refresh-all-distros.sh index 277c7bb..7e9d170 100755 --- a/build/ubuntu/pbuilder-refresh-all-distros.sh +++ b/build/ubuntu/pbuilder-refresh-all-distros.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/configure.ac b/configure.ac index 5cb68e0..29c69d6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # configure.ac Autoconf configuration file # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/etc/bash-completion.d/hstr b/etc/bash-completion.d/hstr index d1a73db..20c249d 100755 --- a/etc/bash-completion.d/hstr +++ b/etc/bash-completion.d/hstr @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hstr.pro b/hstr.pro index e0e367a..15a91ba 100644 --- a/hstr.pro +++ b/hstr.pro @@ -1,6 +1,6 @@ # hstr.pro Qt project file for HSTR shell history compleation utility # -# Copyright (C) 2014-2018 Martin Dvorak +# Copyright (C) 2014-2020 Martin Dvorak # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pad.xml b/pad.xml index b28db39..35b964a 100644 --- a/pad.xml +++ b/pad.xml @@ -2,7 +2,7 @@