Thomas Jensen
17013e60e7
Migrate preprocessor-based debug statements to our logging module
2024-09-28 15:00:45 +02:00
Thomas Jensen
4246ad1203
Update copyright statements for 2024
2024-02-16 22:01:58 +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
a759026790
Switch input
structure entirely to bxstring
2023-12-02 22:25:12 +01:00
Thomas Jensen
6cea61c327
Add bxstring support to 'generate' module
2023-05-19 22:12:51 +02:00
Thomas Jensen
77d02890a7
Update copyright statements for 2023
2023-03-26 21:32:08 +02:00
Thomas Jensen
a3a37b50fc
Upgrade project license to GPL-3 #101
2022-09-18 15:00:15 +02:00
Thomas Jensen
9d17203f50
Rename anz_lines field in input_t to num_lines #78
2021-04-17 15:30:56 +02:00
Thomas Jensen
aa36998f77
Rename ANZ_* constants in shape.h to NUM_* #78
...
This is more in keeping with English standards, and hopefully
improves maintainability a small bit.
2021-04-17 15:30:42 +02:00
Thomas Jensen
139994f97f
Add option to override line terminators #60
2021-04-11 20:34:51 +02:00
Thomas Jensen
04283eb697
Remove undocumented contentpos feature
...
It is no longer needed, as we have MBCS support for input now.
2021-04-11 20:34:50 +02:00
Thomas Jensen
f147c8f6fc
Enable querying of the design list by tag #23
2021-04-11 20:27:15 +02:00
Thomas Jensen
27adf5b6ba
Add argument to -q option for tag queries #23
...
-q is no longer undocumented,
but can officially be used in combination with -l
2021-04-06 22:13:41 +02:00
Thomas Jensen
f4f14cdc61
Update copyright statements in source files with current year
2021-02-15 21:10:54 +01:00
Thomas Jensen
44c2c526af
Add command line option -n to set character encoding of input text #1
2021-02-15 20:35:20 +01:00
Thomas Jensen
5dad2d1137
Add unicode-awareness in box removal functionality #1
2021-02-13 11:01:55 +01:00
Thomas Jensen
91d1971cca
Fix handling of colored whitespace #1
2021-02-13 11:01:53 +01:00
Thomas Jensen
eeeacf2949
First successful box with unicode and ansi sequences #1
...
Existing test cases all green
2021-02-13 11:01:37 +01:00
Thomas Jensen
865432a2da
Merge line_t.vischar into line_t.len #1
...
This has become possible/necessary because the full truth about multi-byte
characters and/or escape sequences lives only in line_t.mbtext.
2021-02-13 11:01:37 +01:00
Thomas Jensen
f536d45f7a
Apply new code format from CLion
2021-02-13 10:54:26 +01:00
Thomas Jensen
07b634a16c
Rename LINE_MAX macro to LINE_MAX_BYTES
2021-01-22 18:47:16 +01:00
Ben Dimbeck
2356251a27
Do not count ANSI sequences towards line length
...
This allows the usage of boxes with basic ANSI SGR colors and formating.
The change was made as a quick hack for myself, so it ended up not super-clean.
The problem here is that before, boxes only had a concept of line->len that would store both the
width of the line and the number of bytes contained since they were assumed to be the same. Now,
there are visible and invisble characters - sometimes the code needs to work with the visible line
length and sometimes with the byte count.
Because of that, at this point the code could use some refactoring to make it a little more
obvious which line length (visible or bytes) is being used at a given time.
So, if anybody feels like cleaning up the mess I introduced - that would be appreciated.
Works with `lolcat -f`
Tested on:
+ debian: xterm, gnome-terminal, terminator, locally and via ssh
+ win64/cygwin: compiled and tested locally and via ssh
+ win64/putty: connected to debian server
Fixes ascii-boxes/boxes#65
2020-07-17 20:58:59 +02:00
Thomas Jensen
416ae729e8
Eliminate new compiler warning on Linux
2019-02-28 21:35:10 +01:00
Thomas Jensen
ae96f13797
Apply -q to box creation
2019-02-28 21:29:34 +01:00
Thomas Jensen
f9193eb4b3
Replace CPP style comments with C style comments
2019-02-20 11:04:09 +01:00
Thomas Jensen
056a497cc8
Improve handling of partial lines
...
When boxes is fed text selected in a visual editor, this often means that
the final line of input text has no terminating newline (it's a "partial
line"). This caused an extra blank line to appear in the editor after
running boxes. #57
This commit changes the behavior of boxes so that a newline is only added
at the very end of the output, if there also was one at the very end of
the input.
2019-02-17 14:28:20 +01:00
Thomas Jensen
2196f10a57
Remove rcsid tags from source files
2019-02-15 21:32:36 +01:00
Thomas Jensen
7d98227583
Change source file header to plain GPLv2 headers
2019-02-15 21:24:31 +01:00
Thomas Jensen
022cdd17c8
Change website references to https
2019-02-14 21:41:11 +01:00
Thomas Jensen
90f967adb3
Remove obsolete revision histories from source file headers
2015-01-11 23:15:48 +01:00
Thomas Jensen
2dccdbcc0d
Moved boxes sources from RCS to git
2014-08-27 22:41:48 +02:00
Thomas Jensen
0803e5ca0a
Applied patch by Christoph Dreyer to support unexpansion of leading tabs
...
Added ability to retain existing tabs
2006-07-22 19:19:26 +00:00
Thomas Jensen
b37c06c874
Updated email and web addresses in comment header
2006-07-12 05:41:52 +00:00
Thomas Jensen
fc2a00f0dc
Applied Joe Zbiciak's patches to remove all snprintf()s and variants
...
Replaced snprintf() calls with calls to concat_strings() in the process
1999-08-31 15:37:01 +00:00
Thomas Jensen
d3a64d0677
Removed const from 2nd parameter of justify_line() function
1999-08-22 11:36:45 +00:00
Thomas Jensen
a275847b4f
Bugfix: justify_line() still didn't work right. It should now. (This time I
...
discovered that indentmode=="text" was confusing it. Arghh!)
1999-08-21 16:04:24 +00:00
Thomas Jensen
3a59866e97
Bugfix: justify_line() still didn't work right. It should now. (Man, I got
...
a strong sense of déja vu! Weird ...)
1999-08-18 15:37:09 +00:00
Thomas Jensen
721c4c4e55
Bugfix: justify_line() still didn't work right. It should now.
1999-08-16 18:30:32 +00:00
Thomas Jensen
c31bfcbb9d
Added GNU GPL disclaimer
...
Bugfix: When doing the line justification in output_box(), the padding
was counted as part of the modifyable inner part of the box instead of
the fixed box itself, which resulted in strange bugs (tricky one).
1999-07-21 16:50:48 +00:00
Thomas Jensen
0c9f7cb04f
Added justify_line() function for alignment of lines inside the text block
...
Cleaned up hfill calculation in output_box()
Changed parameters of empty_side() calls to comply with new signature
1999-06-25 18:42:50 +00:00
Thomas Jensen
d983743471
Added output_box() from boxes.c
1999-06-23 19:23:55 +00:00
Thomas Jensen
16ecdbb777
Initial revision
1999-06-23 18:52:54 +00:00