Thomas Jensen
fc7f881767
Explicitly set UTF-8 charset in unicode test cases
...
so that they don't fail on systems where UTF-8 is not properly set on the terminal #1
2021-02-15 21:10:54 +01:00
Thomas Jensen
7532faf755
Enable Windows build with new unicode-enabled version under MinGW #1
2021-02-15 21:10:54 +01:00
Thomas Jensen
f4f14cdc61
Update copyright statements in source files with current year
2021-02-15 21:10:54 +01:00
Thomas Jensen
363e0266e0
Add test cases for unicode and invalid manual encoding #1
2021-02-15 20:35:29 +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
4c656727ec
Add advance_next32() function to 'unicode' module to encapsulate the escape handling logic #1
2021-02-13 11:01:55 +01:00
Thomas Jensen
5dad2d1137
Add unicode-awareness in box removal functionality #1
2021-02-13 11:01:55 +01:00
Thomas Jensen
c41a4e881e
Extract some duplicate code in boxes.c into new function analyze_line_ascii() #1
2021-02-13 11:01:54 +01:00
Thomas Jensen
a579da13a5
Unicode-enable regex processing by introducing PCRE2 #1 #67
2021-02-13 11:01:54 +01:00
Thomas Jensen
6a3d0e715c
Apply new code format from CLion
2021-02-13 11:01:54 +01:00
Thomas Jensen
53e7782b5f
Remove unused function nspaces32() from tools module #1
2021-02-13 11:01:54 +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
a6a5898341
Unicode-enable the reading of input #1
2021-02-13 11:01:27 +01:00
Thomas Jensen
f2ddb6d6df
Support unicode in expand_tabs_into() of tools.c
...
Declare ucs4_t character constants in boxes.h
Start unicode support in boxes.c #1
2021-02-13 10:54:26 +01:00
Thomas Jensen
f536d45f7a
Apply new code format from CLion
2021-02-13 10:54:26 +01:00
Thomas Jensen
dcd2328c77
Double line buffer size because we expect more MBCS input #1
2021-02-13 10:54:18 +01:00
Thomas Jensen
07b634a16c
Rename LINE_MAX macro to LINE_MAX_BYTES
2021-01-22 18:47:16 +01:00
Ben Dimbeck
c9db55ae88
Honour indent for visible characters
...
(Fixes the test suite)
2020-07-17 20:58:59 +02: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
7ef0b3517f
Replace some misleading angle brackets with quotes #67
2020-02-02 14:14:49 +01:00
Thomas Jensen
b6a4dc71fe
Add basic support for tags #23
...
Currently, tags can be added to the config file, and displayed in the design information.
They are not really understood, though, so no query-by-tag or anything yet.
2019-05-25 14:54:18 +02:00
Thomas Jensen
b5ad008925
Properly escape shapes in detailed box design information
2019-05-21 21:32:29 +02:00
Thomas Jensen
ac20738a04
Change header text on usage help
2019-05-19 15:10:11 +02:00
Thomas Jensen
8d68f9adb0
Remove some compile warnings on current MinGW
2019-03-29 18:29:20 +01: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
22829896f8
Add git hash to version info
2019-02-20 22:33:31 +01:00
Thomas Jensen
447d9815d8
Uncomment regexec() declaration in regexp.h to avoid compiler warning
2019-02-20 22:26:56 +01:00
Thomas Jensen
f9193eb4b3
Replace CPP style comments with C style comments
2019-02-20 11:04:09 +01:00
Thomas Jensen
cd134cbb2f
Include stdlib.h in tools.c to avoid compiler warning
2019-02-19 22:16:11 +01:00
Thomas Jensen
7932bd032e
Add lexer %option noinput to avoid compiler warning
2019-02-19 22:15:19 +01:00
Thomas Jensen
7da5fc91f4
Improve error message for invalid box size on osx #54
2019-02-19 22:02:23 +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
5a6df32738
Respect given outfile on box removal #55
2019-02-14 22:03:23 +01:00
Thomas Jensen
022cdd17c8
Change website references to https
2019-02-14 21:41:11 +01:00
Thomas Jensen
25b9e7ac58
Add undocumented option -q, use it for -l
2019-02-08 13:00:52 +01:00
Stephen M. Cameron
e631886c56
Fix some compiler warnings:
...
boxes.c:1024:31: warning: format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
2017-10-22 14:00:45 +02:00
Santiago Castro
d981796d6d
Fix broken Markdown headings
2017-04-19 14:46:59 +02:00
Thomas Jensen
014843c3aa
Remove -ansi from CFLAGS (patch by @fxcoudert in #38 )
2017-03-14 13:26:38 +01:00
Thomas Jensen
96686d03e7
Add missing header to parser.y (patch by @fxcoudert in #38 )
2017-03-14 13:25:30 +01:00
Yu-Jie Lin
d5795402d5
Close files and initialize variable as per cppcheck errors ( #28 )
2017-01-08 13:12:26 +01:00
Scyptnex
4576f966af
fixes a bug with strtol on mac
2017-01-06 14:22:58 +01:00
Thomas Jensen
d5ddb5665f
Some iso-8859-1 characters accidentally got converted to utf-8, revert that conversion
2016-01-05 22:45:27 +01:00
Thomas Jensen
af85c0c255
Evaluate new 'designer' keyword and show it in box design information output #22
2016-01-05 22:39:11 +01:00
Salvatore Bonaccorso
b3327c558d
Properly quote argument to echo containging # in Makefile
...
lex.yy.c did not include config.h since the argument to echo was treated
as comment, so just an empty line was prepended.
Closes : #15
2015-07-24 10:19:24 +02:00
Thomas Jensen
90f967adb3
Remove obsolete revision histories from source file headers
2015-01-11 23:15:48 +01:00