Commit Graph

589 Commits

Author SHA1 Message Date
1fae201e47 Clean misc/getopt.o along with other object files 2021-02-16 10:51:46 +01:00
622890ab2f Add HTML page creation from man page to Makefile 2021-02-15 21:35:52 +01:00
3f171adb22 v2.0.0 v2.0.0 2021-02-15 21:10:57 +01:00
2f8f463a46 Fix length argument to pcre2_substitute() 2021-02-15 21:10:57 +01:00
b0d2dd835d Add \E( as a possible start of an escape sequence 2021-02-15 21:10:57 +01:00
352a7b6d5d Add test cases for removal of colored boxes 2021-02-15 21:10:57 +01:00
beb8696a79 Add error test case for unterminated strings in the config file 2021-02-15 21:10:56 +01:00
ac8617b383 Clean up config file 2021-02-15 21:10:56 +01:00
a841777007 Improve attribution of Joan Stark's work in resulting boxes 2021-02-15 21:10:56 +01:00
eeb5e5d372 Improve test runner to handle windows line breaks in :ARGS spec 2021-02-15 21:10:55 +01:00
f60b9c5140 Update declared dependencies between files in src/Makefile #1 2021-02-15 21:10:55 +01:00
a5617b65f8 Simplify git call in Makefile 2021-02-15 21:10:55 +01:00
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
7532faf755 Enable Windows build with new unicode-enabled version under MinGW #1 2021-02-15 21:10:54 +01:00
f4f14cdc61 Update copyright statements in source files with current year 2021-02-15 21:10:54 +01:00
a5a63488ab Remove some deprecated box designs
You can easily get them back to use on your machine by copying them from an old version of the boxes config, e.g.
https://raw.githubusercontent.com/ascii-boxes/boxes/363e0266e083475b19f7539fd6beae699ade1890/boxes-config
2021-02-15 21:08:43 +01:00
363e0266e0 Add test cases for unicode and invalid manual encoding #1 2021-02-15 20:35:29 +01:00
c370772ee0 Switch test runner output filter sed to extended regex (-E) 2021-02-15 20:35:29 +01:00
4a272c348c Add examples and references to other ascii art tools to man page 2021-02-15 20:35:29 +01:00
12fa4ea57e Add test cases for colored unicode 'headline' design #1
This design uses complex regular expressions, which must work on unicode characters.
2021-02-15 20:35:28 +01:00
eb5ac9c701 Allow smaller speech bubbles in 'unicornthink' box 2021-02-15 20:35:28 +01:00
44c2c526af Add command line option -n to set character encoding of input text #1 2021-02-15 20:35:20 +01:00
4c656727ec Add advance_next32() function to 'unicode' module to encapsulate the escape handling logic #1 2021-02-13 11:01:55 +01:00
1c4914bb01 Add tolerance for lolcat-induced escape sequences to 'headline' replace rules #1 2021-02-13 11:01:55 +01:00
5dad2d1137 Add unicode-awareness in box removal functionality #1 2021-02-13 11:01:55 +01:00
c41a4e881e Extract some duplicate code in boxes.c into new function analyze_line_ascii() #1 2021-02-13 11:01:54 +01:00
a579da13a5 Unicode-enable regex processing by introducing PCRE2 #1 #67 2021-02-13 11:01:54 +01:00
6a3d0e715c Apply new code format from CLion 2021-02-13 11:01:54 +01:00
53e7782b5f Remove unused function nspaces32() from tools module #1 2021-02-13 11:01:54 +01:00
91d1971cca Fix handling of colored whitespace #1 2021-02-13 11:01:53 +01:00
eeeacf2949 First successful box with unicode and ansi sequences #1
Existing test cases all green
2021-02-13 11:01:37 +01:00
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
a6a5898341 Unicode-enable the reading of input #1 2021-02-13 11:01:27 +01:00
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
f536d45f7a Apply new code format from CLion 2021-02-13 10:54:26 +01:00
dcd2328c77 Double line buffer size because we expect more MBCS input #1 2021-02-13 10:54:18 +01:00
9c7f1da216 Add libunistring and libpcre2 to Travis CI config #1 2021-02-13 10:54:09 +01:00
07b634a16c Rename LINE_MAX macro to LINE_MAX_BYTES 2021-01-22 18:47:16 +01:00
a253fe105a Test cases for ANSI 2020-07-17 20:58:59 +02:00
c9db55ae88 Honour indent for visible characters
(Fixes the test suite)
2020-07-17 20:58:59 +02:00
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
7ef0b3517f Replace some misleading angle brackets with quotes #67 2020-02-02 14:14:49 +01:00
82d1e8e187 Use 'setlocal' instead of 'set' in Vim syntax file #66 2020-02-01 14:06:32 +01:00
57cc8537e8 Add vim-box design to boxes-config (#62) 2019-11-18 14:50:50 +01:00
26315e8860 Add jstone box design
Simple comment box that doesn't conflict with java doc's /**
Based on the "stone" design. Hence jstone
2019-10-05 13:27:14 +02:00
7e3640481b Fix test cases again 2019-05-25 14:59:03 +02:00
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
2b17b60716 Move some test designs out of the official config file 2019-05-23 21:32:06 +02:00
fbfbd29f5b Fix test cases for changed box design info 2019-05-21 21:44:46 +02:00
b5ad008925 Properly escape shapes in detailed box design information 2019-05-21 21:32:29 +02:00