Commit Graph

572 Commits

Author SHA1 Message Date
Thomas Jensen
7047fb5b63
Update .gitignore 2023-03-04 21:14:15 +01:00
Mike Woolley
380e7814ac
Boxes.el: Check that boxes v2.1.0 is available before using -q "(all)" (#114)
v2.1.0 is required to run boxes-command-on-region interactively due to requiring support for "-q (all)". The other
commands work on all versions.
2022-12-13 21:47:13 +01:00
Mike Woolley
d62637e6fa Boxes.el: Resolve packaging feedback.
● Added some more package metadata.

● Defer getting the list of boxes types until needed to avoid errors in the middle of loading a user's config, which
can be inconvenient and lead to a partially setup Emacs.
2022-12-08 14:13:33 +01:00
Mike Woolley
6490205df9 Boxes.el: Make the documentation for 'boxes-command-on-region' comply with 'Checkdoc'. 2022-11-29 21:40:45 +01:00
Mike Woolley
2051758d28 Boxes.el: Updated metadata for packaging.
● Updated metadata for packaging.

● Updated usage instructions, as these are shown by the package manager.

● Changed the documentation for 'boxes-command-on-region' to comply with elisp style guidelines / suppress compiler warning.
2022-11-29 17:55:51 +01:00
Mike Woolley
307a30e2a1 Boxes.el: Fixes for incorrect Customize, compiler warnings & obsolete code.
● Customisation option 'boxes-known-modes' was being incorrectly added to the internal Emacs 'Customize' meta-group.

● Fixed by creating a new 'Boxes' group for use by this package. Note that backwards compatibility is preserved for
those who have already customised this option.

● Added type declaration for 'boxes-known-modes', which as well as fixing a compiler warning, enables completion and
type-checking on user-entered values.

● Put the other user-settable variables as customisation options in the new 'Boxes' group.

● Fixed a bunch of compiler warnings.

● Removed / modified obsolete or unnecessary code (like requiring the deprecated package 'cl' etc).
2022-11-27 13:57:45 +01:00
Pascal Jaeger
bfb5545215 Fix K&R C declaration to work with Clang16
By default Clang16 will not allow implicit function declarations, which
would let this build fail with it.

Fix #106

Signed-off-by: Pascal Jaeger <pascal.jaeger@leimstift.de>
2022-10-18 14:17:43 +02:00
Đoàn Trần Công Danh
61562b0158 remove: fix out-of-bound access
The `u32_move` will try to read `input.lines[j].num_chars - c + 1` `u32`
octets from `input.lines[j].mbtext + input.lines[j].posmap[c]`. That
means, it needs access memory at address
`input.lines[j].mbtext + input.lines[j].posmap[c] + input.lines[j].num_chars - c`
while the max range is `input.lines[j].mbtext + input.lines[j].num_chars`,
which is out-of-bound because `input.lines[j].posmap[c] > c` obviously.

Fix #103
2022-10-04 21:33:18 +02:00
Thomas Jensen
7de6854fd9
Improve build performance on Windows 2022-10-04 17:21:00 +02:00
Thomas Jensen
fd0c3d8d90
Adjust test cases 004 and 065 for musl and alpine output #103 2022-10-03 14:47:23 +02:00
Thomas Jensen
6b6c1ad528
Enable build process to create a static binary for Unix #100
One can now run "make static" to get a binary that is statically linked
to libunistring and pcre2. Both libraries are downloaded first,
so they don't need to be available on the machine.
2022-09-23 22:06:47 +02:00
Thomas Jensen
d572344fce
Improve .gitignore 2022-09-21 21:43:10 +02:00
Thomas Jensen
7113961cbd
v2.2.0 2022-09-20 22:12:05 +02:00
Thomas Jensen
33870fb8e7
Add SBOM in CycloneDX format 2022-09-18 21:55:18 +02:00
Thomas Jensen
082a808a1a
Add header to pipeline definition 2022-09-18 21:55:03 +02:00
Thomas Jensen
a3a37b50fc
Upgrade project license to GPL-3 #101 2022-09-18 15:00:15 +02:00
Thomas Jensen
4aa38ce620
Minor update to vscode settings 2022-09-18 14:33:44 +02:00
Thomas Jensen
11da751439
Add more unit tests for command line option parsing 2021-11-05 22:02:55 +01:00
Thomas Jensen
7b828461ed
Add unit tests for different input and output file situations 2021-11-05 21:48:50 +01:00
Thomas Jensen
413b174d6c
Add unit tests for alignment option parsing (-a) 2021-11-05 21:10:11 +01:00
Thomas Jensen
fbc4678faa
Add some unit tests for tab option parsing (-t) 2021-11-05 14:28:13 +01:00
Thomas Jensen
f13207318a
Add some unit tests for -p option parsing 2021-11-05 14:07:58 +01:00
Thomas Jensen
eab1e13df2
Fix a small bug when parsing the padding command line argument (-p)
When an empty string was passed as padding spec, this was
not properly flagged as an error.
2021-11-05 14:03:49 +01:00
Thomas Jensen
84d051f1e5
Add unit tests for '-k' option parsing 2021-11-04 21:53:35 +01:00
Thomas Jensen
0e2b57c97d
Add unit tests for indentation mode cmdline parsing 2021-11-04 14:12:40 +01:00
Thomas Jensen
5ea2f5b2b8
Add test for long usage info 2021-11-02 21:13:09 +01:00
Thomas Jensen
b07af10931
Add three more unit tests for regex_replace() 2021-11-01 21:46:43 +01:00
Thomas Jensen
ab28ad8c3a
Add workaround for mockable fprintf on MinGW 2021-11-01 14:23:19 +01:00
Thomas Jensen
96a79f309c
Move 3rd party libs needed on Windows to 'vendor' folder 2021-11-01 14:23:19 +01:00
Thomas Jensen
d732154bf8
Improve compatibility of testrunner.sh with mingw shell 2021-11-01 14:23:09 +01:00
Thomas Jensen
4ae947ff99
Extend unit testing capabilities
- Structure unit tests into multiple modules
- Add setup/teardown of fixtures
- Add ability to capture and check stdout and stderr
- Add mock handling to Makefile
2021-10-28 09:01:14 +02:00
Thomas Jensen
729c4e0692
Add two more unit tests on tools.c 2021-10-21 20:49:49 +02:00
Thomas Jensen
a5dae11c4c
Add the first cmocka-based unit tests 2021-10-21 20:23:52 +02:00
Thomas Jensen
f8d20378ea
Add coverage measurement to GitHub Actions 2021-09-12 10:44:57 +02:00
Thomas Jensen
1b731a08bd
Refactor testrunner.sh script for readability 2021-09-11 20:29:40 +02:00
Thomas Jensen
e40fe370e2
Add test coverage measurement to black-box tests 2021-09-09 21:44:49 +02:00
David Yang
3c56934ddc
Remove whitespace check on -c (#92)
Resolves #88
2021-08-31 17:31:43 +02:00
Thomas Jensen
270d3ed7d7
Improve testrunner.sh's handling of whitespace args #92 2021-08-30 16:37:51 +02:00
Thomas Jensen
ab9f123981
Count tab as whitespace in "empty shape" check #92 2021-08-28 15:08:44 +02:00
David Yang
a02e241cfa
Add box designs 'cowsay' and 'tux' (from cowsay) #91
Cowsay and every cowsay implementation in a new language doesn't support different width characters, and the odds of cowsay getting an update are very low. Step on cowsay's toes and provide a cow that doesn't break for chinese, japanese, korean users. Used with permission by Tony Monroe.
2021-08-25 22:21:42 +02:00
gabriele balducci
7f54baf409 => take advantage of 'boxes -q "(all)"' when defining boxes-types-alist
=> make boxes-known-modes user customizable
2021-08-12 14:19:25 +02:00
gabriele balducci
ecb8132569 Amend definition of boxes-types-alist to catch box names containing an
underscore (eg ian_jones)
2021-08-09 11:07:55 +02:00
Thomas Jensen
b96b67878b
Add vscode recommended extensions list 2021-08-08 21:05:06 +02:00
Thomas Jensen
121c2c32cb
Add latest version badge in README.md 2021-07-16 11:39:04 +02:00
Thomas Jensen
4fc33e7cee
Fix quoting of closing comment tags in config 2021-06-18 20:56:08 +02:00
Thomas Jensen
89fea620e3
Update choco package spec 2021-06-16 21:08:56 +02:00
Thomas Jensen
4ced2b4715
Fix bug with :global: parent resolution 2021-06-16 20:52:36 +02:00
Thomas Jensen
47dfac4897
Make 'normand' sample a little narrower 2021-06-15 20:44:27 +02:00
Thomas Jensen
0296c8dd7c
v2.1.1 2021-06-14 21:00:11 +02:00
Thomas Jensen
e5af7dba2d
Add new box design 'normand' 2021-06-13 22:35:40 +02:00