110 Commits

Author SHA1 Message Date
anon
cec6ffd6de working demo 2023-03-14 21:12:15 +01:00
anon
fd8bdecb53 working demo 2023-03-13 10:35:02 +01:00
anon
43d1c4a1ce init 2023-03-11 22:52:14 +01:00
anon
29d7658fe4 Merged redundant printf() call batches 2023-03-10 14:42:57 +01:00
Claudio Matsuoka
202a0a8110 Update snap package to grade stable
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2020-05-12 16:13:10 -03:00
Claudio Matsuoka
5bbcd7383a Add snap package build file
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2019-02-13 14:41:18 -02:00
Claudio Matsuoka
a565ae1e8f Minor indent fix
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-17 20:34:19 -03:00
Claudio Matsuoka
c2c47a0fb5 Also check for maximum character width in checkfont
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-17 20:27:38 -03:00
Claudio Matsuoka
27cc19b5c4 Disable TLF fonts to build with mingw32 in travis
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-17 19:55:39 -03:00
Claudio Matsuoka
06bc99606b Prevent string overflow in chkfont suffix check
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-11 11:57:35 -03:00
Claudio Matsuoka
77226a564b Fix return type for getc() call in chkfont
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-11 11:22:02 -03:00
Claudio Matsuoka
3e5f071a3f Comment out unreachable code
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-11 10:46:39 -03:00
Claudio Matsuoka
cde012b6f8 Also set the linker command for travis-ci
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-05 22:53:20 -03:00
Claudio Matsuoka
f86e9f0d20 Fix clang-sanitizer compiler settings for travis-ci
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-05 22:50:04 -03:00
Claudio Matsuoka
d20dfa1266 Use correct compiler in travis-ci
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-05 22:47:38 -03:00
Claudio Matsuoka
2c3ffa7b24 Add travis-ci control file
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-10-05 22:44:48 -03:00
Claudio Matsuoka
2ed76b56fa Also fix make vercheck message line breaks in MacOS X
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-11 11:03:12 -03:00
Claudio Matsuoka
459d856dc3 Fix make check message line break in MacOS X
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-11 10:56:17 -03:00
Claudio Matsuoka
9a50c1795b Also test for MacOS X to include Unix headers
MacOS X doesn't define unix or __unix__, so also check for __APPLE__ to
include unistd.h (needed by getopt()).

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-11 08:18:12 -03:00
Claudio Matsuoka
a2e8c76114 Add regression test for right-to-left smushing with JavE font
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-10 18:26:43 -03:00
Lorenzo Gatti
58eec2948f Fix memory corruption with invalid smush amount
https://github.com/cmatsuoka/figlet/issues/4
lorenzogatti commented on Oct 28, 2014:

Another case of buffer overrun in the same function, again for right to left
layout: smushing away more characters that are contained in the outputline[]
buffers, with STRCAT being passed an invalid pointer (past the end of an
outputline[] buffer).

How is it possible to smush more characters than the length of the buffer? A
single character can be wider than the current line, but smushamt() doesn't
limit the amount of smushing to the length of the current line. Enormous
amounts of smushing are possible with space-rich fonts, such as the Obanner
collection.

Fixed in smushamt() by limiting the range of the result.

Test case:

$ figlet -f obanner132.flf -R -x -o -p -w 77 "Banner, o Banner"

--

Original fix by Lorenzo Gatti, reworked by Claudio Matsuoka.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-10 18:25:58 -03:00
Claudio Matsuoka
89693cb2ab Initialize uninitialized string
Local string buffer was being operated without proper initialization, causing
wcslen() to operate on invalid values.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-10 18:25:16 -03:00
Claudio Matsuoka
ab98e5ea0b Test script cleanup
Auto-increment the test number instead of passing it as a parameter.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-10 18:25:16 -03:00
Claudio Matsuoka
95e3dc5430 Adjust compiler flags for modern gcc
The gcc compiler has unused value warnings enabled by default, so add
-Wno-unused-value flag to reduce noise in the compiler output.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2015-05-10 18:25:16 -03:00
Claudio Matsuoka
8e06d0b41b Merge pull request #3 from ncopa/master
Fix build with musl libc
2014-06-03 11:22:15 -03:00
Natanael Copa
88428a728e Fix build with musl libc
Avoid using the glibc internal macros __BEGIN/__END_DECLS.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2014-06-03 10:59:57 +00:00
Patrick Gillespie
3c3b5596a5 Add Kannada ttha character to Standard font
Add support for unicode character #3232. This character is of note because
it's commonly used to create the "look of disapproval" ASCII Art face: ಠ_ಠ.
You can see a FIGlet look of disapproval here:
   _____)      _____)
  /_ ___/     /_ ___/
  / _ \       / _ \
 | (_) |     | (_) |
  \___/ _____ \___/
       |_____|

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-06-12 09:59:17 -03:00
Claudio Matsuoka
1c1293b3e3 Make test script a bit more portable
Replaced mktemp which can be different/absent in some systems with
static filenames which should be good enough for our tests.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-06-03 13:36:38 -03:00
Jonathan McCrohan
3851863336 run-tests.sh: Use Octal sequence for printf
Hex sequence is not POSIX compliant, causing run-tests.sh to fail on
systems with Debian Almquist shell as the default shell.

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-06-01 09:20:17 -03:00
Claudio Matsuoka
2f9dc32353 Update Changelog
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-31 12:50:42 -03:00
Claudio Matsuoka
0bae10173e Use SUS-compliant script for test
Use printf instead of echo -n in order to have a Single Unix Specification
compliant script and work in MacOS X 10.5.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-31 11:53:59 -03:00
Claudio Matsuoka
10833cb76f Add missing files to distribution package
Jonathan McCrohan reported missing files in 2.2.3 and 2.2.4 distribution
package, namely figmagic (containing patterns for /etc/magic) and
getopt.c (to add CLI parameter support for non-Unix platforms).

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-31 11:05:10 -03:00
Claudio Matsuoka
3cd070553d Update changelog, version number and release date
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-30 10:57:47 -03:00
Jonathan McCrohan
24b935eb59 Fix chkfont coredump on invalid input
Based on patch submitted by Kenneth Davies <kshrub@yahoo.com>
submitted in Debian bug #300735. Decrufted to provide double free()
fix, with minimal changes to FIGlet coding styles.

Bug-Debian: http://bugs.debian.org/300735

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-30 09:56:58 -03:00
Claudio Matsuoka
e0e63ca90a Revert JIS0201 map file
Revert JIS0201 map file to the file added by Micah Cowan in commit
6866db6fce7951cc5e82a1dc7cc5e749b08f88e1

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 15:42:06 -03:00
Claudio Matsuoka
66402840d6 Add uskata and jis0201 regression tests 2012-05-29 15:41:29 -03:00
Claudio Matsuoka
b5269745dd Fix banner placement in test script
Test banner was being print before setting the fonts directory, which
make it fail if FIGlet is not already installed on the system.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 15:23:13 -03:00
Jonathan McCrohan
7781d151a1 Properly escape minus signs in figlist.6
As found by Debian lintian checker:
hyphen-used-as-minus-sign

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 14:13:45 -03:00
Claudio Matsuoka
681f931b38 Update ISO8859 map files
Jonathan McCrohan of Debian reported that FIGlet still contained non-
distributable files fonts/8859-*.flc which had the following notice:
"Unicode, Inc. specifically excludes the right to re-distribute this
file directly to third parties or other organizations whether for
profit or not".

John Cowan informed that "Those should simply be replaced by the verbatim
contents of the corresponding files at
http://www.unicode.org/Public/MAPPINGS/ISO8859 .

In addition, the jis0201.flc file should be replaced likewise by
the verbatim contents of
http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0201.TXT ."

This commit replaces files with licensing problems with those listed
by John Cowan.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2012-05-29 14:08:34 -03:00
Claudio Matsuoka
bddc3decc4 Add test to list all existing control files
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-26 00:00:47 -02:00
Claudio Matsuoka
e88224d519 Figlist changed to check for local figlet
Same change made to showfigfonts, figlist can now use the local figlet
executable instead of the system executable.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 23:56:09 -02:00
Claudio Matsuoka
eeaa125de6 Add environment variable FIGLET_FONTDIR
Environment variable FIGLET_FONTDIR can be used to set the path to search
for font files. This variable is used in the test script when FIGlet is
installed on a staging directory.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 23:44:08 -02:00
Claudio Matsuoka
e91b35b234 Add parameter to test script to specify font dir
This way we can run tests when installing in a staging dir.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 22:57:11 -02:00
Claudio Matsuoka
adcddcd38e Set font dir when checking the dist package
Make sure the binary built from the distribution package uses a local
font directory to run tests.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 21:23:36 -02:00
Claudio Matsuoka
a4e31b1efc Merge branch 'master' of github.com:cmatsuoka/figlet 2011-01-25 21:06:18 -02:00
Claudio Matsuoka
cced2251fd Update version in Makefile
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 21:00:35 -02:00
Claudio Matsuoka
6c3db7930d Prevent compatibility problems in test script
Linefeed characters are printed differently depending of the shell
used as /bin/sh. Use an extra echo to prevent output problems.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
0d2908b98c Don't use unitialized variable fontpath
Font path operations moved to FIGopen(), error messages changed to
use fontname.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
8e9b51e5c5 Change test target to check and add vercheck
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00
Claudio Matsuoka
46c29d49b1 Add test log and tarballs to .gitignore
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-25 20:56:14 -02:00