Commit Graph

372 Commits

Author SHA1 Message Date
Thomas Jensen
4246ad1203
Update copyright statements for 2024 2024-02-16 22:01:58 +01:00
Thomas Jensen
5456fc2367
Adapt Windows-specific code to recent changes
This included renaming the `WORD` token in our lexer to `BXWORD`,
in order to avoid a conflict with a symbol in windows.h.
2024-02-15 22:00:41 +01:00
Thomas Jensen
d62b04e485
Drop fields REVISION, REVDATE, and CREATED from config file
These pieces of information are really in Git, so they are no longer required in the config file.
2024-02-14 22:03:15 +01:00
Thomas Jensen
05019d688c
Rename some variables to use English abbreviations 2024-01-01 13:37:43 +01:00
Thomas Jensen
297a6ef959
Use -ggdb3 option for more detailed debug info 2023-12-24 14:12:51 +01:00
Thomas Jensen
89f0608504
Fix some box removal bugs 2023-12-24 14:11:42 +01:00
Thomas Jensen
dd82c33888
Fix vertical shape detection with open sides 2023-12-24 14:11:41 +01:00
Thomas Jensen
5c615a3ada
Compensate for default padding when mending 2023-12-24 14:11:41 +01:00
Thomas Jensen
30950e7f72
Refactor is_blankward() in shape.c 2023-12-09 14:54:14 +01:00
Thomas Jensen
0eed7422f6
Restore indentation mode on box removal 2023-12-09 14:54:14 +01:00
Thomas Jensen
f739343c29
Move some declarations from shape.h to boxes.in.h
This resolves some otherwise circular dependencies between modules.
2023-12-09 14:54:13 +01:00
Thomas Jensen
76c4e10cd1
Add new test case for nearly blank corners and indentation removal
... including some fixes to make this work.
2023-12-09 14:54:13 +01:00
Thomas Jensen
02610f4613
Free some unused memory in 'cmdline' module 2023-12-09 14:53:13 +01:00
Thomas Jensen
94de53c6f0
Do not use ncurses on Windows
Instead, we just assume that on Windows, we always have color-capable terminals.
2023-12-09 14:51:25 +01:00
Thomas Jensen
ba40638946
Add two more black-box tests for removal with fixes 2023-12-09 14:51:23 +01:00
Thomas Jensen
602d91dd8b
Test and fix handling of line comment removal 2023-12-09 14:48:47 +01:00
Thomas Jensen
863c7c1f7b
Test and fix more comparison types in box removal 2023-12-02 22:26:36 +01:00
Thomas Jensen
2a2111cfae
Remove unused code from 'shape' module 2023-12-02 22:26:36 +01:00
Thomas Jensen
505b10b98f
Remove unused code from 'tools' module 2023-12-02 22:26:35 +01:00
Thomas Jensen
393f27256e
Remove obsolete parameter 'skip' from u32_strnrstr() in 'unicode' module 2023-12-02 22:26:35 +01:00
Thomas Jensen
a11c6cdb51
Remove advance32() from 'unicode' module
This function was made redundant by the 'bxstring' module.
2023-12-02 22:26:35 +01:00
Thomas Jensen
9279541714
Remove old implementation of 'remove' module 2023-12-02 22:26:35 +01:00
Thomas Jensen
6de060ceb6
Finalize rewritten 'remove' module 2023-12-02 22:26:34 +01:00
Thomas Jensen
775cabfbf6
Add bxs_substr() and bxs_prepend_spaces() to 'bxstring' module 2023-12-02 22:26:34 +01:00
Thomas Jensen
eca7287f0c
Extract match_horiz_line() function in 'remove' module 2023-12-02 22:26:34 +01:00
Thomas Jensen
cde5ecc26a
Extract match_outer_shape() function in 'remove' module 2023-12-02 22:26:31 +01:00
Thomas Jensen
c4982a15df
Add bxs_last_char_ptr() in bxstring module 2023-12-02 22:25:18 +01:00
Thomas Jensen
6ce0f86898
Rename s1 and s2 parameters of u32_strnrstr to haystack and needle in unicode module 2023-12-02 22:25:18 +01:00
Thomas Jensen
f30f12a988
Add south_side_rev to shape module 2023-12-02 22:25:18 +01:00
Thomas Jensen
ead517a4d7
Fix problems found by unit tests and compiler
These had been caused by the reimplementation of a module.
2023-12-02 22:25:18 +01:00
Thomas Jensen
4175d72bc8
Rewrite 'remove' module to enable unicode, double-with chars, and coloring 2023-12-02 22:25:17 +01:00
Thomas Jensen
9511d18bc1
Add bxs_ltrim() to bxstring module 2023-12-02 22:25:17 +01:00
Thomas Jensen
e2d5eab97b
Add BMIN macro to tools.h 2023-12-02 22:25:17 +01:00
Thomas Jensen
aef8c56eed
Add u32_insert_space_at() to 'unicode' module 2023-12-02 22:25:17 +01:00
Thomas Jensen
6c40928ed0
Add u32_is_blank() in 'unicode' module 2023-12-02 22:25:16 +01:00
Thomas Jensen
1b71c4fca2
Extract some common code in 'detect' module 2023-12-02 22:25:16 +01:00
Thomas Jensen
47c32efa5f
Extract a new module 'detect' from 'remove' module
This is the "design autodetect" functionality.
2023-12-02 22:25:16 +01:00
Thomas Jensen
a759026790
Switch input structure entirely to bxstring 2023-12-02 22:25:12 +01:00
Thomas Jensen
45ce5e6762
Add more box removal test cases 2023-12-02 22:23:43 +01:00
Thomas Jensen
1cbd1f933c
Change Makefile so that 'clean' spares the vendor/ folder
Run 'make cleanall' to remove it as well
2023-12-02 14:02:08 +01:00
Thomas Jensen
b91dfd5dff Fix some problems with LEX and YACC defaults on Linux
Remove flags_darwin, which are the same as flags_unix now
2023-12-02 13:51:55 +01:00
Matthew Thompson
2c904da505 use defines 2023-12-02 13:51:55 +01:00
David Sargeant
71331ee205 tools.h - change set_bx_fprintf() function declaration to match renamed parameter 2023-12-02 13:51:55 +01:00
David Sargeant
5f0db01418 Update Makefile, src/Makefile, and utest/Makefile to support MacOS unit tests 2023-12-02 13:51:55 +01:00
David Sargeant
54957a144b Change bx_fprintf to a function pointer to enable unit testing on MacOS 2023-12-02 13:51:55 +01:00
Matthew Thompson
069197052e Allow override of LEX and YACC; merge changes from macos-ci branch 2023-12-02 13:51:55 +01:00
Thomas Jensen
bfb8428f1f
Fix Windows build for more recent MinGW
- Use ncurses.h from MinGW directory
- Remove 'src/misc' directory, which is now covered by MinGW
2023-11-12 15:19:52 +01:00
Matthew Thompson
fd65f16827
Add _DARWIN_C_SOURCE if APPLE (#119) 2023-08-24 15:50:57 +02:00
Thomas Jensen
6cea61c327
Add bxstring support to 'generate' module 2023-05-19 22:12:51 +02:00
Thomas Jensen
cd2ccdaed3
Add bxs_filter_visible() and react to color options in bxs_to_output() in 'bxstring' module 2023-05-09 21:09:00 +02:00