pax_global_header00006660000000000000000000000064136224776310014525gustar00rootroot0000000000000052 comment=0930602ab07e3a5181c2026b64854280231a6b34 ansilove-4.1.0/000077500000000000000000000000001362247763100133475ustar00rootroot00000000000000ansilove-4.1.0/.gitignore000066400000000000000000000010241362247763100153340ustar00rootroot00000000000000#gitignore for AnsiLove/C # Mac OS X Finder .DS_Store # Xcode per user config *.mode1 *.mode1v3 *.mode2v3 *.perspective *.perspectivev3 *.pbxuser # Xcode xcuserdata/ project.xcworkspace/ # AppCode .idea/ # Generated files VersionX-revision.h # build products build/ *.[oa] # Other source repository archive directories .hg .svn CVS # automatic backup files *~.nib *.swp *~ *(Autosaved).rtfd/ Backup[ ]of[ ]*.pages/ Backup[ ]of[ ]*.key/ Backup[ ]of[ ]*.numbers/ # CMake CMakeFiles CMakeCache.txt Makefile cmake_install.cmake ansilove-4.1.0/.travis.yml000066400000000000000000000021341362247763100154600ustar00rootroot00000000000000arch: - amd64 - arm64 matrix: include: - os: linux arch: amd64 - os: linux arch: arm64 language: c compiler: - clang - gcc before_install: - sudo apt-get -qq update - sudo apt-get install -y libgd2-noxpm-dev - git clone https://github.com/ansilove/libansilove.git - cd libansilove && cmake . && make - sudo make install - cd - - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- script: cmake . && make env: global: # travis encrypt -r ansilove/ansilove encrypt COVERITY_SCAN_TOKEN=token - secure: "Ahg+dD6BwZqYTl+xTbNqBBr6Qoh7jQswegP77gxfk09UbcLSTpTQcvCLzJtumCajWXTe5HD3lD1xBghxRPNwD/+JRg25AzUeowPvBQkosDZyxMZyeQQEGPVMoD9UbnGaWhxIxYaQ7bxVCu2CJ2PcibsJ3kselnqSicEnw99TXjU=" addons: coverity_scan: project: name: "ansilove/ansilove" version: 4.1.0 description: "ANSi / ASCII art to PNG converter in C" notification_email: fred@statdns.com build_command_prepend: cmake . build_command: make -j 4 branch_pattern: coverity_scan ansilove-4.1.0/AUTHORS000066400000000000000000000012561362247763100144230ustar00rootroot00000000000000 _ __ ____ ___________ __________ ____ __ _ .________ //_ ANSilOVE _\\ ._____ ____/\ ___| _/___/\ __ _____. _ ____/\ _| \ ____ / .__\\ \ | _ //___ _)_. \_ |____ \\ | // ___/ / __/ \ \ |__ \/ \ |_ | | \ | \ / __)____ /____| \_|\_____|_________/__ `/ |______ //_______/____/______ / |______/ _ __ __________ \/ _______ \/ ________ __ _ yop \/ Ansilove/C is developed by: Stefan Vogt Brian Cassidy Frederic Cambus ansilove-4.1.0/CMakeLists.txt000066400000000000000000000035561362247763100161200ustar00rootroot00000000000000cmake_minimum_required (VERSION 2.6) project (ansilove C) include(CheckFunctionExists) include(GNUInstallDirs) # Conditional build options set(ENABLE_SECCOMP 0 CACHE BOOL "Enable building with seccomp") # Check if system has pledge and strtonum list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_OPENBSD_SOURCE) check_function_exists(pledge HAVE_PLEDGE) check_function_exists(strtonum HAVE_STRTONUM) if(ENABLE_SECCOMP) # Check if system has seccomp message(STATUS "Looking for seccomp") find_path(SECCOMP NAMES "linux/seccomp.h") if(SECCOMP) message(STATUS "Looking for seccomp - found") add_definitions(-DHAVE_SECCOMP=1) else() message(STATUS "Looking for seccomp - not found") endif() endif(ENABLE_SECCOMP) # Additional include directories for compat functions include_directories("compat") # Ansilove library find_path(ANSILOVE_INCLUDE_DIRS ansilove.h) find_library(ANSILOVE_LIBRARIES NAMES ansilove REQUIRED) include_directories(${ANSILOVE_INCLUDE_DIRS}) set(SRC src/ansilove.c src/types.c src/strtolower.c src/sauce.c) if(NOT HAVE_PLEDGE) set (SRC ${SRC} compat/pledge.c) endif() if(NOT HAVE_STRTONUM) set (SRC ${SRC} compat/strtonum.c) endif() add_definitions(-Wall -Wextra -std=c99 -pedantic) add_executable(ansilove ${SRC}) target_link_libraries(ansilove ${ANSILOVE_LIBRARIES} m) install(TARGETS ansilove DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ansilove.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/) enable_testing() add_test(ansilove ansilove) add_test(ansi ansilove ${PROJECT_SOURCE_DIR}/tests/bs-alove.ans) add_test(artworx ansilove ${PROJECT_SOURCE_DIR}/tests/bs-alove.adf) add_test(bin ansilove -c 80 ${PROJECT_SOURCE_DIR}/tests/bs-alove.bin) add_test(pcboard ansilove ${PROJECT_SOURCE_DIR}/tests/bs-alove.pcb) add_test(tundra ansilove ${PROJECT_SOURCE_DIR}/tests/bs-alove.tnd) add_test(xbin ansilove ${PROJECT_SOURCE_DIR}/tests/bs-alove.xb) ansilove-4.1.0/ChangeLog000066400000000000000000000205701362247763100151250ustar00rootroot00000000000000AnsiLove/C 4.1.0 (2020-02-17) - Add a new '-t' flag (type), allowing to specify input file type and override file type detection - Various documentation tweaks and improvements AnsiLove/C 4.0.7 (2020-01-18) - Use OpenBSD style(9) for function prototypes and declarations - Replace EXIT_SUCCESS by zero in all SAUCE functions - Do not use typedef for the sauce struct - Set icecolors to true if defined in SAUCE record ANSiFlags - Add test cases for most supported formats, missing an IDF file for now - Sync the description of Retina output capabilities with reality AnsiLove/C 4.0.6 (2019-12-10) - Remove extraneous sauceReadFileName() call, read from existing SAUCE record - Use strdup() when assigning fileName and fext fallback values - Call memset() to set all record struct fields to zero - Free SAUCE record and comments once and for all when exiting the program AnsiLove/C 4.0.5 (2019-11-19) - Add ENABLE_SECCOMP build option, to allow building seccomp support conditionally - Disable seccomp by default, it needs more testing on non !amd64 platforms - Use ${CMAKE_INSTALL_BINDIR} instead of hardcoding 'bin' AnsiLove/C 4.0.4 (2019-10-28) - Add initial seccomp support to Ansilove - Move pledge and seccomp initialization before ansilove_init() - Move conditional includes for 'pledge' and 'strtonum' in compat.h AnsiLove/C 4.0.3 (2019-08-16) - Use errx() for displaying error messages - Print information messages on stdout - Introduce a version() function to display version information - Add a -q flag (quiet) to allow silencing output messages AnsiLove/C 4.0.2 (2019-08-13) - Remove most examples from the repository, they continue to live on the website - Move the remaining examples in per author directories, and add LICENSE files for these artworks, courtesy of their authors AnsiLove/C 4.0.1 (2019-06-25) - Fix a few typos in README and ansilove.1 - Simplify display of default font when no font option is specified - Drop the leading dot when saving input file extension - Fix the check for readComments() return value AnsiLove/C 4.0.0 (2019-01-16) - Switch to using libansilove - Add a new switch (-d) to toggle DOS aspect ratio - Add initial support for PabloDraw 24-bit ANSI sequences - Ansilove now generates only one output file when -r or -R options are used - Display scale factor when -r or -R options are used - Allow to specify the number of columns for ANSI and Tundra files - Restrict maximum allowed number of columns to 4096 - Check asprintf() return value and error if allocation fails - Bugfixes and improvements in the SAUCE parser - Refactor font selection processing - Refactor rendering mode processing - Use OpenBSD style(9) for function prototypes and declaration - Add missing headers and remove unnecessary ones - Remove versionInfo(), simply print the header with version information when invoked with -v - Remove showHelp(), show synopsis instead when invoked with -h - Add a new example ANSi (Thanks Nail) - Remove -e switch, examples are now listed in the man page instead - Make synopsis() only display SYNOPSIS, as it should be. - Add an EXAMPLES section in ansilove.1 - PC fonts for code pages other than cp437 are now named using the cpNNN scheme. Albeit not documented anymore, the previously used names will keep working AnsiLove/C 3.0.9 (2018-06-19) - Add a new example ANSi (Thanks Sylvao) - Do not use -Werror by default - Increment maximum ansi sequences length - Add code to skip PabloDraw 24-bit ANSI sequences AnsiLove/C 3.0.8 (2017-12-20) - Adding new example ANSis (Thanks Burps) - Use asprintf() to create output filenames - Reflect OpenBSD's pledge() changes - Add a -R flag allowing to specify a custom retina scale factor AnsiLove/C 3.0.7 (2017-07-02) - Print messages to to stderr instead of stdout - Ensure binary files have an even size - Better description of supported file formats - Skip erase in line (EL) sequences (issue reported by Bart Dumon, thanks!) - Define palettes in config.h - Use defined palettes instead of hardcoding each color value in the loaders AnsiLove/C 3.0.6 (2017-04-22) - Create an output function to unify the way output files are created - Prevent .png suffix to be appended when using -o flag (*NIX tool convention compatibility) AnsiLove/C 3.0.5 (2017-04-16) - Free memory allocated in the PCBoard loader - Free font data where appropriate - Add a trailing NUL character to inputFileBuffer - Remove the custom substr function, call strndup directly - Free seqGrab where necessary - Use the ternary operator when shitfing cursor position - Use perror when printing errors - Remove SUBSTITUTE_BREAK and WRAP_COLUMN_80 options - Use fstat to get the input file size - Create a retina function instead of duplicating code in all loaders - Fix OpenBSD's style(9) offenders in compat functions AnsiLove/C 3.0.4 (2016-07-28) - Relicensed under the BSD 2-Clause license - Input file is now loaded in main, prior to calling format loaders - Use stat to get input file size instead of custom file size function - Remove now unused file size function - Refactoring bits and columns argument value handling AnsiLove/C 3.0.3 (2016-07-14) - Adding some missing includes - Define _XOPEN_SOURCE macro (for 'strdup' and 'strndup' functions) - Switch back to compiling with -std=c99 instead of -std=gnu99 - Adding cast to fix compilation with GCC on NetBSD [-Werror=char-subscripts] - Use strdup when lowercasing file extension, to avoid modifying input filename - Define _NETBSD_SOURCE macro to make 'strndup' declaration visible on NetBSD AnsiLove/C 3.0.2 (2016-01-21) - Adding a new example XBin (Thanks Enzo) - Adding install target for man page - Removing hardcoded paths in 'CMakeLists.txt' for GD library detection - Add additional include directories for compat functions to avoid using relative path in includes - Refactoring of the ANSI loader, and removed support for drawing bold, italics and underline characters for Amiga fonts, allowing to plot characters directly to the canvas and drop a lot of code - Move SAUCE functions into their own file - Moving all format loaders to their own files + simplifying names - Removed prototype for 'str_replace' which has been pruned - Moving ANSI and PCBoard character structures to their respective loader headers - AnsiLove is now pledged on OpenBSD - Renaming a bunch of files and improving the project structure - Removing all calls to 'atoi' and using OpenBSD's 'strtonum' instead - Fixing regression in the CED mode rendering - Removing 'workbench-transparent' rendering mode, it never made sense - Fixing regression in the Workbench mode rendering - Adding detailed font options in the manual page AnsiLove/C 3.0.1 (2016-01-03) - Initializing some uninitialized variables - Removing some unused variables and assignments - Removing optional filters for PCBoard sequences - Pruning now unused 'str_replace' function - Remove support for configurable diz extensions - Remove support for configurable RGB values for CED + WorkBench modes - Using strncmp instead of strcmp + strndup combo, as strndup is not part of C99 - Added a manual page AnsiLove/C 3.0.0 (2015-12-13) - Switching to getopt for parsing command line options - Removing bits parameters for ADF, IDF, and XBIN loaders - Adding a mode option to specify CED, Workbench and transparent rendering modes - Using mode instead of bits to check for rendering modes to enable - New 'alSelectFont' function returning a structure with font information - Adding a compat directory and importing 'strtonum' function from OpenBSD - Made CMakeList more modular, and linking strtonum conditionally - Remove .diz pre-filtering as it was a remnant of the PHP version - Using 'strtonum' to parse and validate bits and columns parameter value before calling the loaders - Removing unused parameter 'font_size_x' in alDrawChar - Enabling the '-Wextra' and '-Werror' flags in CMakeLists.txt - Group checks for CR + LF in the ANSi and PCBoard loaders - Documentation cleanups and updates AnsiLove/C 2.2.1 (2015-06-28) - Switching to CMake to build the project - Moving source files to the 'src' directory - Removing legacy Ubuntu compilation script - Updated documentation (build requirements + instructions) - Remove MIN macro and use math.h's 'fmin' instead - Adding Ansilove artwork, both ASCII and ANSI as example files - Adding 'AUTHORS', 'FILE_ID.DIZ', and 'THANKS' files - Fixing file extension detection (Close #2) - Fixing the PCB loader to use logical AND as it should ansilove-4.1.0/FILE_ID.DIZ000066400000000000000000000025671362247763100150240ustar00rootroot00000000000000 ____ ____ ________|_ (_ _______ _) _|________ _)) - --|/---\\-----//---\|-- - ((_ | ' ________ ` | : ______ ____\ (_ ______ ___ ___\___ /__ _\_ _\\_ :_\ ___/_____\_(_ _\ __ /_\ \\/ \\____ \_ | \ \: : \\ . :/ | | \\_____\-------------\____|___/------:_ | _) |-----\\ . _______ . )__| | | : \\ (_ : : | .::. .::. |----\_ _/______ . . | ::::::::::: | :/ __\ ____/__ _ | `:::::::' | / \ _\ _/ \ |_ `:::' | _. / \: \_ \\_______\\ ' |--/___/-----\_____// - -----------//______|----------------- - : : | | | Ansilove/C 4.1.0 | | | | ANSi=>PNG converter & library | | | | Supports 7 textmode formats | | ANS/PCB/BiN/ADF/iDF/TND/XBiN! | | | | Supports 14 MS-DOS charsets | | 80x25, 80x50 and Amiga fonts! | |_ Supports SAUCE and iCE colors _| _|/ Small output size (4-bit PNG) \|_ // \\ /____ _____\ ns. ((_ A N S i L O V E _)) ASL ansilove-4.1.0/LICENSE000066400000000000000000000025011362247763100143520ustar00rootroot00000000000000Copyright (c) 2011-2020, Stefan Vogt, Brian Cassidy, and Frederic Cambus All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ansilove-4.1.0/README.md000066400000000000000000000215431362247763100146330ustar00rootroot00000000000000``` _______ ___________ ___ __\___ \_ ____/ /\ /______ ___\_/__ /\ / \| \/ _ \ /--\_____ \\ / /\ / \ _/ | / \ \ |/ / \ \ _ _____/ \_______ \ |_____\____/ / / \____ /\/ / \______| \ \_____/\______ /\ \/ \ /\NSILOVE / C /____ _ \ |_______\__\___ \ \ \ / \___\__/____ \____| /____/\_\/\__ / / __/___ \ /\ ____ \ \ \ / /_/ __ \/ /__\__/ _/ _____ ___ /\ \____\/ / // \ / / / _>/ //__/\ / \ _/ \ // / / / \/ / \__\/ _ _________ / \_______ _ \___ /_______/ / _/ \____ \ / \ / \ \___/\ \_______/\\ \ \______/\/ \/ \_\ \ \_______\ \ \\/ \__\ \ \ \__\/ \______\/ h7/dS!\_____\/ ``` # AnsiLove/C [![Build Status][1]][2] AnsiLove is an ANSI and ASCII art to PNG converter, allowing to convert ANSI and artscene-related file formats into PNG images, supporting ANSI (.ANS), PCBoard (.PCB), Binary (.BIN), Artworx (.ADF), iCE Draw (.IDF), Tundra (.TND) and XBin (.XB) formats. It creates size optimized 4-bit PNG files and supports SAUCE (Standard Architecture for Universal Comment Extentions), 80x25 and 80x50 PC fonts (including all the 14 MS-DOS charsets), Amiga fonts, and iCE colors. This is a complete rewrite of [AnsiLove/PHP][3] in the C programming language. # Specs AnsiLove/C is strictly using the `C99 standard` to achieve high portability to all major operating systems. Supported compilers are `GCC` and `Clang`, others may work but aren't tested. We use Linux and OpenBSD for AnsiLove/C development. # Why C? There were many reasons, most notably PHP interpreter independence and performance. A solid C foundation is just perfect for creating libraries and it can easily be embedded into applications. We already mentioned portability. What else? We wanted evolution. AnsiLove/C should not be understood as a port. It takes many different approaches (like processing binary font dumps or generating @2x Retina images), it is overall improved and introduces new features. While results tend to be the same, the codebase does not have much in common with it's ancestor. # Dependencies AnsiLove/C uses the `CMake` build system and requires the [libansilove][4] library and header files. # Installing dependencies - OpenBSD: `pkg_add -r cmake` - NetBSD: `pkgin install cmake` - FreeBSD: `pkg install cmake` - Mac OS X: `brew install cmake` - Alpine Linux: `apk add cmake gcc make musl-dev` - Debian / Ubuntu / Mint: `apt-get install cmake` - Solus: `eopkg install -c system.devel` For now, `libansilove` has to be installed manually. # Compiling mkdir build cd build cmake .. make # Installation AnsiLove/C packages are available for: ### OpenBSD pkg_add ansilove ### Pkgsrc (NetBSD, SmartOS, Mac OS X, etc.) pkgin install ansilove ### FreeBSD pkg install ansilove ### Debian / Ubuntu apt install ansilove ### Solus eopkg install ansilove # Features The following formats are supported: - .ANS - ANSi (ANSI escape sequences: ANSI X3.64 standard) - .PCB - PCBoard Bulletin Board System (BBS) own file format - .BIN - Binary format (raw memory copy of text mode video memory) - .ADF - Artworx format, supporting custom character sets and palettes - .IDF - iCE Draw format, supporting custom character sets and palettes - .TND - [TundraDraw][5] format, supporting 24-bit color mode - .XB - The eXtended Binary [XBin][6] format, supporting custom character sets and palettes Files with custom suffix default to the ANSi renderer (e.g. ICE or CIA). AnsiLove/C is capabable of processing: - [SAUCE][7] records - DOS and Amiga fonts (embedded binary dump) - iCE colors Even more: - Small output file size (4-bit PNG). - Optionally generates proper Retina @2x (and up to @8x) PNG. - You can use custom options for adjusting output results. - Built-in support for rendering Amiga ASCII. # Documentation ## Synopsis ``` ansilove [-dhiqrsv] [-b bits] [-c columns] [-f font] [-m mode] [-o file] [-R factor] [-t type] file ``` ## Options ``` -b bits Set to 9 to render 9th column of block characters (default: 8). -c columns Adjust number of columns for ANSI, BIN, and TND files. -d Enable DOS aspect ratio. -f font Select font for supported formats. -h Show help. -i Enable iCE colors. -m mode Set rendering mode for ANS files. Valid options are: ced Black on gray, with 78 columns. transparent Render with transparent background. workbench Use Amiga Workbench palette. -o file Specify output filename/path. -q Suppress output messages (quiet). -r Create Retina @2x output file. -R factor Create Retina output file with custom scale factor. -t type Specify input file type. -s Show SAUCE record without generating output. -v Show version information. ``` There are certain cases where you need to set options for proper rendering. However, this is occasionally. Results turn out well with the built-in defaults. ## Fonts We dumped many fonts as binary data right into AnsiLove/C, so the most popular typefaces for rendering ANSi / ASCII art are available at your fingertips. PC fonts can be (all case-sensitive): - `80x25` Default (Code page 437) - `80x50` 80x50 mode (Code page 437) - `cp737` Greek (Code page 737) - `cp775` Baltic (Code page 775) - `cp850` Latin-1 (Code page 850) - `cp852` Latin-2 (Code page 852) - `cp855` Cyrillic (Code page 855) - `cp857` Turkish (Code page 857) - `cp860` Portuguese (Code page 860) - `cp861` Icelandic (Code page 861) - `cp862` Hebrew (Code page 862) - `cp863` French Canadian (Code page 863) - `cp865` Nordic (Code page 865) - `cp866` Russian (Code page 866) - `cp869` Greek (Code page 869) - `terminus` Terminus (Modern font, code page 437) AMIGA fonts can be (all case-sensitive): - `amiga` (alias to Topaz) - `microknight` (Original MicroKnight version) - `microknight+` (Modified MicroKnight version) - `mosoul` (Original mO'sOul font) - `pot-noodle` (Original P0T-NOoDLE font) - `topaz` (Original Topaz Kickstart 2.x version) - `topaz+` (Modified Topaz Kickstart 2.x+ version) - `topaz500` (Original Topaz Kickstart 1.x version) - `topaz500+` (Modified Topaz Kickstart 1.x version) ## Bits `bits` can be: - `8` (8-bit) - `9` (9-bit) Setting the bits to `9` will render the 9th column of block characters, so the output will look like it is displayed in real textmode. ## Rendering Mode `mode` can be (all case-sensitive): - `ced` - `transparent` - `workbench` Setting the mode to `ced` will cause the input file to be rendered in black on gray, and limit the output to 78 columns (only available for `ANS` files). Used together with an Amiga font, the output will look like it is displayed on Amiga. Setting the mode to `workbench` will cause the input file to be rendered using Amiga Workbench colors (only available for `ANS` files). Settings the mode to `transparent` will produce output files with transparent background (only available for `ANS` files). ## iCE Colors iCE colors are disabled by default, and can be enabled by specifying the `-i` option. When an ANSi source was created using iCE colors, it was done with a special mode where the blinking was disabled, and you had 16 background colors available. Basically, you had the same choice for background colors as for foreground colors, that's iCE colors. ## Columns `columns` is only relevant for .ANS, .BIN, .PCB, and .TND files, and is optional. In most cases conversion will work fine if you don't set this flag, the default value is `160` for .BIN files and `80` otherwise. ## SAUCE records It's fine to use AnsiLove/C as SAUCE reader without generating any output, just set option `-s` for this purpose. # License AnsiLove/C is released under the BSD 2-Clause License. See the `LICENSE` file for details. # Authors AnsiLove/C is developed by Stefan Vogt ([@ByteProject][8]), Brian Cassidy ([@bricas][9]) and Frederic Cambus ([@fcambus][10]). # Resources Project homepage: https://www.ansilove.org GitHub: https://github.com/ansilove/ansilove [1]: https://api.travis-ci.org/ansilove/ansilove.png?branch=master [2]: https://travis-ci.org/ansilove/ansilove [3]: https://www.ansilove.org [4]: https://github.com/ansilove/libansilove [5]: https://sourceforge.net/projects/tundradraw/ [6]: https://github.com/radman1/xbin [7]: https://github.com/radman1/sauce [8]: https://github.com/ByteProject [9]: https://github.com/bricas [10]: https://github.com/fcambus ansilove-4.1.0/THANKS000066400000000000000000000022511362247763100142620ustar00rootroot00000000000000 _ __ ____ ___________ __________ ____ __ _ .________ //_ ANSilOVE _\\ ._____ ____/\ ___| _/___/\ __ _____. _ ____/\ _| \ ____ / .__\\ \ | _ //___ _)_. \_ |____ \\ | // ___/ / __/ \ \ |__ \/ \ |_ | | \ | \ / __)____ /____| \_|\_____|_________/__ `/ |______ //_______/____/______ / |______/ _ __ __________ \/ _______ \/ ________ __ _ yop \/ Thanks to the following people for helping the Ansilove project <3 Fonts: - dMG of Ascii Arena for his Amiga Fonts (https://www.trueschool.se) - Kosta Kostis (http://www.kostis.net) for his fantastic CPI tools - Dimitar Zhekov for the Terminus font (http://terminus-font.sourceforge.net) Code: - Ted Unangst and Todd Miller for strtonum.c ASCiis logos used in the releases: - H7 for the ansilove documentation logo - Ansichrist for the file_id.diz - Yop for the Ansilove logo used in the ChangeLog, THANKS and AUTHORS files Examples ANSis: - Burps for the bs-alove.ans example ANSi - Burps for the bs-ansilove.ans example ANSi - Nail for the n-silove.ans example ANSi ansilove-4.1.0/ansilove.1000066400000000000000000000127161362247763100152600ustar00rootroot00000000000000.\" .\" Copyright (c) 2011-2020, Stefan Vogt, Brian Cassidy, and Frederic Cambus .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions are met: .\" .\" * Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" * Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd $Mdocdate: February 17 2020 $ .Dt ANSILOVE 1 .Os .Sh NAME .Nm ansilove .Nd ANSI / ASCII art to PNG converter .Sh SYNOPSIS .Nm .Op Fl dhiqrsv .Op Fl b Ar bits .Op Fl c Ar columns .Op Fl f Ar font .Op Fl m Ar mode .Op Fl o Ar file .Op Fl R Ar factor .Op Fl t Ar type .Ar file .Sh DESCRIPTION .Nm is an ANSI / ASCII art to PNG converter, allowing to convert ANSI and artscene-related file formats into PNG images, supporting ANSI (.ANS), PCBoard (.PCB), Binary (.BIN), Artworx (.ADF), iCE Draw (.IDF), Tundra (.TND) and XBin (.XB) formats. .Pp It creates size optimized 4-bit PNG files and supports SAUCE (Standard Architecture for Universal Comment Extensions), 80x25 and 80x50 PC fonts (including all the 14 MS-DOS charsets), Amiga fonts, and iCE colors. .Pp The options are as follows: .Bl -tag -width 10n .It Fl b Ar bits Set to 9 to render 9th column of block characters (default: 8). .It Fl c Ar columns Adjust number of columns for ANSI, BIN, and TND files. .It Fl d Enable DOS aspect ratio. .It Fl f Ar font Select font for supported formats. .Pp Valid options for PC fonts are: .Bl -tag -width Er .It Ic 80x25 Default (Code page 437) .It Ic 80x50 80x50 mode (Code page 437) .It Ic cp737 Greek (Code page 737) .It Ic cp775 Baltic (Code page 775) .It Ic cp850 Latin1 (Code page 850) .It Ic cp852 Latin2 (Code page 852) .It Ic cp855 Cyrillic (Code page 855) .It Ic cp857 Turkish (Code page 857) .It Ic cp860 Portuguese (Code page 860) .It Ic cp861 Icelandic (Code page 861) .It Ic cp862 Hebrew (Code page 862) .It Ic cp863 French Canadian (Code page 863) .It Ic cp865 Nordic (Code page 865) .It Ic cp866 Russian (Code page 866) .It Ic cp869 Greek (Code page 869) .It Ic terminus Terminus (Modern font, code page 437) .El .Pp Valid options for Amiga fonts are: .Bl -tag -width Er .It Ic amiga Alias to Topaz, see below .It Ic microknight Original MicroKnight version .It Ic microknight+ Modified MicroKnight version .It Ic mosoul Original mO'sOul font .It Ic pot-noodle Original P0T-NOoDLE font .It Ic topaz Original Topaz Kickstart 2.x version .It Ic topaz+ Modified Topaz Kickstart 2.x+ version .It Ic topaz500 Original Topaz Kickstart 1.x version .It Ic topaz500+ Modified Topaz Kickstart 1.x version .El .It Fl h Show help. .It Fl i Enable iCE colors. .It Fl m Ar mode Set rendering mode for ANS files. .Pp Valid options are: .Bl -tag -width Ds .It Ic ced Black on gray, with 78 columns. .It Ic transparent Render with transparent background. .It Ic workbench Use Amiga Workbench palette. .El .It Fl o Ar file Specify output filename/path. .It Fl q Suppress output messages (quiet). .It Fl r Create Retina @2x output file. .It Fl R Ar factor Create Retina output file with custom scale factor. .It Fl t Ar type Specify input file type. .Pp Valid types are: .Bl -tag -width Ds .It Ic ans ANSi (ANSI escape sequences: ANSI X3.64 standard) .It Ic adf Artworx format, supporting custom character sets and palettes .It Ic bin Binary format (raw memory copy of text mode video memory) .It Ic idf iCE Draw format, supporting custom character sets and palettes .It Ic pcb PCBoard Bulletin Board System (BBS) own file format .It Ic tnd TundraDraw format, supporting 24-bit color mode .It Ic xb XBin format, supporting custom character sets and palettes .El .It Fl s Show SAUCE record without generating output. .It Fl v Show version information. .El .Sh EXAMPLES To render a file with iCE colors enabled: .Pp .Dl $ ansilove -i file.ans .Pp To create a Retina @2x output file: .Pp .Dl $ ansilove -r file.ans .Pp To creates a Retina output file with a custom scale factor: .Pp .Dl $ ansilove -R 3 file.ans .Pp To only display SAUCE record without generating output: .Pp .Dl $ ansilove -s file.ans To render a file with transparent background: .Pp .Dl $ ansilove -m transparent file.ans .Pp To render a file using a custom font: .Pp .Dl $ ansilove -f amiga file.txt .Pp To render a file using a custom font, rendering the 9th column, enabling iCE colors, and using DOS aspect ratio: .Pp .Dl $ ansilove -f 80x50 -b 9 -d -i file.ans .Sh AUTHORS .An -nosplit .Nm was written by .An Stefan Vogt , .An Brian Cassidy , and .An Frederic Cambus . ansilove-4.1.0/compat/000077500000000000000000000000001362247763100146325ustar00rootroot00000000000000ansilove-4.1.0/compat/compat.h000066400000000000000000000002351362247763100162660ustar00rootroot00000000000000#ifndef COMPAT_H #define COMPAT_H #ifndef HAVE_PLEDGE #include "pledge.h" #endif #ifndef HAVE_STRTONUM #include "strtonum.h" #endif #endif /* COMPAT_H */ ansilove-4.1.0/compat/pledge.c000066400000000000000000000001601362247763100162330ustar00rootroot00000000000000int pledge(const char *promises, const char *execpromises) { (void)promises; (void)execpromises; return 0; } ansilove-4.1.0/compat/pledge.h000066400000000000000000000000501362247763100162360ustar00rootroot00000000000000int pledge(const char *, const char *); ansilove-4.1.0/compat/strtonum.c000066400000000000000000000033501362247763100166720ustar00rootroot00000000000000/* $OpenBSD: strtonum.c,v 1.7 2013/04/17 18:40:58 tedu Exp $ */ /* * Copyright (c) 2004 Ted Unangst and Todd Miller * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include #include #define INVALID 1 #define TOOSMALL 2 #define TOOLARGE 3 long long strtonum(const char *numstr, long long minval, long long maxval, const char **errstrp) { long long ll = 0; int error = 0; char *ep; struct errval { const char *errstr; int err; } ev[4] = { { NULL, 0 }, { "invalid", EINVAL }, { "too small", ERANGE }, { "too large", ERANGE }, }; ev[0].err = errno; errno = 0; if (minval > maxval) { error = INVALID; } else { ll = strtoll(numstr, &ep, 10); if (numstr == ep || *ep != '\0') error = INVALID; else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval) error = TOOSMALL; else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval) error = TOOLARGE; } if (errstrp != NULL) *errstrp = ev[error].errstr; errno = ev[error].err; if (error) ll = 0; return (ll); } ansilove-4.1.0/compat/strtonum.h000066400000000000000000000001071362247763100166740ustar00rootroot00000000000000long long strtonum(const char *, long long, long long, const char **); ansilove-4.1.0/examples/000077500000000000000000000000001362247763100151655ustar00rootroot00000000000000ansilove-4.1.0/examples/burps/000077500000000000000000000000001362247763100163205ustar00rootroot00000000000000ansilove-4.1.0/examples/burps/LICENSE000066400000000000000000000024271362247763100173320ustar00rootroot00000000000000Copyright (c) 2017, Bart Dumon All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ansilove-4.1.0/examples/burps/bs-alove.ans000066400000000000000000000215471362247763100205440ustar00rootroot00000000000000  ܰ   ܲܰ ޲         ܰ߰               ߲             ߰      ܲ     ޲ ߰       ߲   ܱܲ ܲ ߲  ߰  ߱ܲ ܲ      ߲ ߰     ܰ  ޲       ۲ ܲ       ܱ      ۲     ߲߲    ߰    ܰ    ܱ   ܰ ܲ  ܲ     ܲܰ    ߱     ܰ߰    ܰ         ߲   ߰       ߰   ܲ ۲   ܲ     ޲        ߲     ߲  ߰  ߱ܲ ܲ        ߲ ߰      SAUCE00 20171007|P/IBM VGA ݰ   ߲߰ ߲   ܲ          ܰ  ߰  ߲      ߲߲ݰ    ߲            ߲߱  ܰ     ۲           ۲۲            SAUCE00ansilove burps fuel 20171019"P;IBM VGAansilove-4.1.0/examples/burps/bs-ansilove.ans000066400000000000000000000111711362247763100212460ustar00rootroot00000000000000  ansi ߰ݰ  ߲ ߲ ߲     ޱ ܲ ޲  ܲ      ޲   ۲  ܲ  ۲          ߲ ߲      ۲   ۲   ߲        ۱۲      ۲  ޲      ߲ ߲  ߲ ߲    ۲߱  ۲   ܲܰ   ܲ      ޲ ۲       ۲     ۲     ߲߰  ߲   ۲       ۲     ߲             ߰ ܲ۲ ܲ   ۲  bs  love   SAUCE00ansilove burps fuel 20170720PIBM VGAansilove-4.1.0/examples/cleaner/000077500000000000000000000000001362247763100165765ustar00rootroot00000000000000ansilove-4.1.0/examples/cleaner/LICENSE000066400000000000000000000024411362247763100176040ustar00rootroot00000000000000Copyright (c) 2004-2017, Frederic Cambus All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ansilove-4.1.0/examples/cleaner/cl!-al02.ans000066400000000000000000000125461362247763100205040ustar00rootroot00000000000000   ߲          ۲       ۲                                                ۲            ߲            ۲             ۱ܲ          ۰          Cl!                                ܲ                  ߲                 ANSiLOVE۲ Just create your own world,Cleaner(27")  August 2004 for the sake of art...http://cleaner.planet-d.net  A N S i  ansilove-4.1.0/examples/cleaner/cl!-al05.ans000066400000000000000000000152541362247763100205060ustar00rootroot00000000000000                                                                                                                                                                                                                                                                                                                                              Cl!                                                                                                                                                                                                                                             A  N  S  i  L    V  E             SAUCE00Ansilove - September 207 Cleaner Fuel 20170921+PIBM VGAansilove-4.1.0/examples/nail/000077500000000000000000000000001362247763100161105ustar00rootroot00000000000000ansilove-4.1.0/examples/nail/LICENSE000066400000000000000000000024341362247763100171200ustar00rootroot00000000000000Copyright (c) 2018, Björn Odendahl All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ansilove-4.1.0/examples/nail/n-silove.ans000066400000000000000000000146341362247763100203570ustar00rootroot00000000000000  ܲ  ܲ۰ ۲  ۲ ۲ ۲     ܰ           ܲ   ܲ    ߲                          ܰ       ܰ     ܰ߰  ߰   ܲ  ܰ                ۲  ߲۲  ޲   ݲ         ݰ  ܰ ۲        ۲                 ߰                         ߲            ޲                      ۲                  ߲ n!         ۲   ߰     ߲ܲܰ ۲  ۲         ܰ              ܲ          ߲         ߲                  ߰ܲ                    SAUCE00ansilove nail blocktronics 20181209P"IBM VGAansilove-4.1.0/src/000077500000000000000000000000001362247763100141365ustar00rootroot00000000000000ansilove-4.1.0/src/ansilove.c000066400000000000000000000177231362247763100161340ustar00rootroot00000000000000/* * ansilove.c * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifdef HAVE_SECCOMP #include #include #include #include #include #include "seccomp.h" #endif #include "compat.h" #include "config.h" #include "fonts.h" #include "sauce.h" #include "strtolower.h" #include "types.h" /* prototypes */ static void synopsis(void); static void version(void); static void synopsis(void) { fprintf(stdout, "SYNOPSIS\n" " ansilove [-dhiqrsv] [-b bits] [-c columns] [-f font]" " [-m mode] [-o file]\n" " [-R factor] [-t type] file\n"); } static void version(void) { fprintf(stdout, "AnsiLove/C %s - ANSI / ASCII art to PNG converter\n" "Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and " "Frederic Cambus.\n", VERSION); } int main(int argc, char *argv[]) { FILE *messages = NULL; /* SAUCE record related bool types */ bool justDisplaySAUCE = false; bool fileHasSAUCE = false; int getoptFlag; char *input = NULL, *output = NULL; char *fileName = NULL; char *font = NULL; char *type = NULL; int filetype = 0; static struct ansilove_ctx ctx; static struct ansilove_options options; const char *errstr; if (pledge("stdio cpath rpath wpath", NULL) == -1) err(EXIT_FAILURE, "pledge"); #ifdef HAVE_SECCOMP if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { perror("Can't initialize seccomp"); return EXIT_FAILURE; } if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &ansilove)) { perror("Can't load seccomp filter"); return EXIT_FAILURE; } #endif if (ansilove_init(&ctx, &options) == -1) errx(EXIT_FAILURE, "%s", ansilove_error(&ctx)); while ((getoptFlag = getopt(argc, argv, "b:c:df:him:o:qrR:st:v")) != -1) { switch (getoptFlag) { case 'b': options.bits = strtonum(optarg, 8, 9, &errstr); if (errstr) errx(EXIT_FAILURE, "Invalid value for bits (must be 8 or 9)."); break; case 'c': options.columns = strtonum(optarg, 1, 4096, &errstr); if (errstr) errx(EXIT_FAILURE, "\nInvalid value for columns (must range from 1 to 4096)."); break; case 'd': options.dos = true; break; case 'f': font = optarg; for (size_t loop = 0; loop < FONTS; loop++) { if (!strcmp(fonts[loop], font)) { options.font = fontsId[loop]; break; } } break; case 'h': synopsis(); return EXIT_SUCCESS; case 'i': options.icecolors = true; break; case 'm': if (!strcmp(optarg, "ced")) { options.mode = ANSILOVE_MODE_CED; } else if (!strcmp(optarg, "transparent")) { options.mode = ANSILOVE_MODE_TRANSPARENT; } else if (!strcmp(optarg, "workbench")) { options.mode = ANSILOVE_MODE_WORKBENCH; } break; case 'o': output = optarg; break; case 'q': messages = fopen("/dev/null", "w"); break; case 'r': options.scale_factor = 2; break; case 'R': options.scale_factor = strtonum(optarg, 2, 8, &errstr); if (errstr) errx(EXIT_FAILURE, "Invalid value for retina scale factor (must range from 2 to 8)."); break; case 's': justDisplaySAUCE = true; break; case 't': type = strtolower(optarg); break; case 'v': version(); return EXIT_SUCCESS; } } if (optind < argc) { input = argv[optind]; } else { synopsis(); return EXIT_SUCCESS; } argc -= optind; argv += optind; /* if -q flag was not set, default to stdout */ if (!messages) messages = stdout; /* let's check the file for a valid SAUCE record */ struct sauce *record = sauceReadFileName(input); /* record == NULL also means there is no file, we can stop here */ if (record == NULL) { errx(EXIT_FAILURE, "File %s not found.", input); } else { /* if we find a SAUCE record, update bool flag */ if (!strcmp(record->ID, SAUCE_ID)) { fileHasSAUCE = true; } } if (!justDisplaySAUCE) { /* create output file name if output is not specified */ if (!output) { /* appending ".png" extension to output file name */ if (asprintf(&fileName, "%s%s", input, ".png") == -1) errx(EXIT_FAILURE, "Memory allocation error."); } else { fileName = strdup(output); } /* display name of input and output files */ fprintf(messages, "Input File: %s\n", input); fprintf(messages, "Output File: %s\n", fileName); /* get file extension */ char *fext = strrchr(input, '.'); fext = fext ? strtolower(strdup(++fext)) : strdup(""); /* check if current file has a .diz extension */ if (!strcmp(fext, "diz")) options.diz = true; if (ansilove_loadfile(&ctx, input) == -1) errx(EXIT_FAILURE, "%s", ansilove_error(&ctx)); /* adjust the file size if file contains a SAUCE record */ if (fileHasSAUCE) ctx.length -= 129 - (record->comments > 0 ? 5 + 64 * record->comments : 0); /* set icecolors to true if defined in SAUCE record ANSiFlags */ if (fileHasSAUCE && (record->flags & 1)) options.icecolors = true; int (*loader)(struct ansilove_ctx *, struct ansilove_options *) = NULL; /* if type was specified, attempt to find a loader */ if (type) { for (size_t loop = 0; loop < TYPES; loop++) { if (!strcmp(types[loop], type)) { loader = loaders[loop]; filetype = filetypes[loop]; break; } } if (!loader) errx(EXIT_FAILURE, "Unknown file type."); } /* use file extension to find a suitable loader */ if (!loader) { for (size_t loop = 0; loop < TYPES; loop++) { if (!strcmp(types[loop], fext)) { loader = loaders[loop]; filetype = filetypes[loop]; break; } } } /* default to ANSI if file extension is unknown */ if (!loader) { loader = ansilove_ansi; filetype = ANSILOVE_FILETYPE_ANS; } if (loader(&ctx, &options) == -1) errx(EXIT_FAILURE, "%s", ansilove_error(&ctx)); /* create the output file */ if (ansilove_savefile(&ctx, fileName) == -1) errx(EXIT_FAILURE, "%s", ansilove_error(&ctx)); /* gather information and report to the command line */ switch(filetype) { case ANSILOVE_FILETYPE_ANS: case ANSILOVE_FILETYPE_BIN: if (options.icecolors) fprintf(messages, "iCE Colors: enabled\n"); /* FALLTHROUGH */ case ANSILOVE_FILETYPE_PCB: case ANSILOVE_FILETYPE_TND: fprintf(messages, "Font: %s\n", font ? font : "80x25"); fprintf(messages, "Bits: %d\n", options.bits); fprintf(messages, "Columns: %d\n", options.columns); } if (options.scale_factor) fprintf(messages, "Scale factor: %d\n", options.scale_factor); free(fileName); free(fext); } /* either display SAUCE or tell us if there is no record */ if (!fileHasSAUCE) { fprintf(messages, "\nFile %s does not have a SAUCE record.\n", input); } else { fprintf(messages, "\nId: %s v%s\n", record->ID, record->version); fprintf(messages, "Title: %s\n", record->title); fprintf(messages, "Author: %s\n", record->author); fprintf(messages, "Group: %s\n", record->group); fprintf(messages, "Date: %s\n", record->date); fprintf(messages, "Datatype: %d\n", record->dataType); fprintf(messages, "Filetype: %d\n", record->fileType); if (record->flags) fprintf(messages, "Flags: %d\n", record->flags); if (record->tinfo1) fprintf(messages, "Tinfo1: %d\n", record->tinfo1); if (record->tinfo2) fprintf(messages, "Tinfo2: %d\n", record->tinfo2); if (record->tinfo3) fprintf(messages, "Tinfo3: %d\n", record->tinfo3); if (record->tinfo4) fprintf(messages, "Tinfo4: %d\n", record->tinfo4); fprintf(messages, "Tinfos: %s\n", record->tinfos); if (record->comments > 0) { fprintf(messages, "Comments: "); for (int32_t i = 0; i < record->comments; i++) fprintf(messages, "%s\n", record->comment_lines[i]); } } ansilove_clean(&ctx); free(record->comment_lines); free(record); return EXIT_SUCCESS; } ansilove-4.1.0/src/config.h000066400000000000000000000006521362247763100155570ustar00rootroot00000000000000/* * config.h * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #ifndef CONFIG_H #define CONFIG_H #include /* configuration defines */ #define VERSION "4.1.0" enum { FONTS = 38, TYPES = 7 }; #endif /* CONFIG_H */ ansilove-4.1.0/src/fonts.h000066400000000000000000000045441362247763100154470ustar00rootroot00000000000000/* * fonts.h * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #ifndef FONTS_H #define FONTS_H char *fonts[] = { "cp737", /* Greek */ "cp775", /* Baltic */ "cp850", /* Latin 1 */ "cp852", /* Latin 2 */ "cp855", /* Cyrillic */ "cp857", /* Turkish */ "cp860", /* Portuguese */ "cp861", /* Icelandic */ "cp862", /* Hebrew */ "cp863", /* French-canadian */ "cp865", /* Nordic */ "cp866", /* Russian */ "cp869", /* Greek */ "80x25", "80x50", "greek", "baltic", "latin1", "latin2", "cyrillic", "turkish", "portuguese", "icelandic", "hebrew", "french-canadian", "nordic", "russian", "greek-869", "terminus", "amiga", "microknight", "microknight+", "mosoul", "pot-noodle", "topaz", "topaz+", "topaz500", "topaz500+" }; int fontsId[] = { ANSILOVE_FONT_CP737, /* Greek */ ANSILOVE_FONT_CP775, /* Baltic */ ANSILOVE_FONT_CP850, /* Latin 1 */ ANSILOVE_FONT_CP852, /* Latin 2 */ ANSILOVE_FONT_CP855, /* Cyrillic */ ANSILOVE_FONT_CP857, /* Turkish */ ANSILOVE_FONT_CP860, /* Portuguese */ ANSILOVE_FONT_CP861, /* Icelandic */ ANSILOVE_FONT_CP862, /* Hebrew */ ANSILOVE_FONT_CP863, /* French-canadian */ ANSILOVE_FONT_CP865, /* Nordic */ ANSILOVE_FONT_CP866, /* Russian */ ANSILOVE_FONT_CP869, /* Greek */ ANSILOVE_FONT_CP437, /* IBM PC 80x25 */ ANSILOVE_FONT_CP437_80x50, /* IBM PC 80x50 */ ANSILOVE_FONT_CP737, /* Greek */ ANSILOVE_FONT_CP775, /* Baltic */ ANSILOVE_FONT_CP850, /* Latin 1 */ ANSILOVE_FONT_CP852, /* Latin 2 */ ANSILOVE_FONT_CP855, /* Cyrillic */ ANSILOVE_FONT_CP857, /* Turkish */ ANSILOVE_FONT_CP860, /* Portuguese */ ANSILOVE_FONT_CP861, /* Icelandic */ ANSILOVE_FONT_CP862, /* Hebrew */ ANSILOVE_FONT_CP863, /* French-canadian */ ANSILOVE_FONT_CP865, /* Nordic */ ANSILOVE_FONT_CP866, /* Russian */ ANSILOVE_FONT_CP869, /* Greek */ ANSILOVE_FONT_TERMINUS, ANSILOVE_FONT_TOPAZ, /* Alias: amiga */ ANSILOVE_FONT_MICROKNIGHT, ANSILOVE_FONT_MICROKNIGHT_PLUS, ANSILOVE_FONT_MOSOUL, ANSILOVE_FONT_POT_NOODLE, ANSILOVE_FONT_TOPAZ, ANSILOVE_FONT_TOPAZ_PLUS, ANSILOVE_FONT_TOPAZ500, ANSILOVE_FONT_TOPAZ500_PLUS }; #endif /* FONTS_H */ ansilove-4.1.0/src/sauce.c000066400000000000000000000064331362247763100154100ustar00rootroot00000000000000/* * sauce.c * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #define _XOPEN_SOURCE 700 #include #include #include #include "sauce.h" /* Reads SAUCE via a filename. */ struct sauce * sauceReadFileName(char *fileName) { FILE *file = fopen(fileName, "r"); if (file == NULL) { return NULL; } struct sauce *record = sauceReadFile(file); fclose(file); return record; } /* Read SAUCE via a FILE pointer. */ struct sauce * sauceReadFile(FILE *file) { struct sauce *record; record = malloc(sizeof *record); memset(record, 0, sizeof *record); if (record != NULL) { readRecord(file, record); } return record; } void readRecord(FILE *file, struct sauce *record) { if (fseek(file, 0 - RECORD_SIZE, SEEK_END) != 0) { return; } size_t read_status = fread(record->ID, sizeof (record->ID) - 1, 1, file); record->ID[sizeof (record->ID) - 1] = '\0'; if (read_status != 1 || strcmp(record->ID, SAUCE_ID) != 0) { return; } fread(record->version, sizeof (record->version) - 1, 1, file); record->version[sizeof (record->version) - 1] = '\0'; fread(record->title, sizeof (record->title) - 1, 1, file); record->title[sizeof (record->title) - 1] = '\0'; fread(record->author, sizeof (record->author) - 1, 1, file); record->author[sizeof (record->author) - 1] = '\0'; fread(record->group, sizeof (record->group) - 1, 1, file); record->group[sizeof (record->group) - 1] = '\0'; fread(record->date, sizeof (record->date) - 1, 1, file); record->date[sizeof (record->date) - 1] = '\0'; fread(&(record->fileSize), sizeof (record->fileSize), 1, file); fread(&(record->dataType), sizeof (record->dataType), 1, file); fread(&(record->fileType), sizeof (record->fileType), 1, file); fread(&(record->tinfo1), sizeof (record->tinfo1), 1, file); fread(&(record->tinfo2), sizeof (record->tinfo2), 1, file); fread(&(record->tinfo3), sizeof (record->tinfo3), 1, file); fread(&(record->tinfo4), sizeof (record->tinfo4), 1, file); fread(&(record->comments), sizeof (record->comments), 1, file); fread(&(record->flags), sizeof (record->flags), 1, file); fread(record->tinfos, sizeof (record->tinfos) - 1, 1, file); record->tinfos[sizeof (record->tinfos) - 1] = '\0'; if (ferror(file) != 0) { return; } if (record->comments > 0) { record->comment_lines = malloc(record->comments *sizeof (*record->comment_lines)); if (record->comment_lines != NULL) { if (readComments(file, record->comment_lines, record->comments) == -1) { record->comments = 0; } } } } int readComments(FILE *file, char **comment_lines, int32_t comments) { int32_t i; if (fseek(file, 0 - (RECORD_SIZE + 5 + COMMENT_SIZE *comments), SEEK_END) == 0) { char ID[6]; fread(ID, sizeof (ID) - 1, 1, file); ID[sizeof (ID) - 1] = '\0'; if (strcmp(ID, COMMENT_ID) != 0) { return -1; } for (i = 0; i < comments; i++) { char buf[COMMENT_SIZE + 1] = ""; fread(buf, COMMENT_SIZE, 1, file); buf[COMMENT_SIZE] = '\0'; if (ferror(file) == 0) { comment_lines[i] = strdup(buf); if (comment_lines[i] == NULL) { return -1; } } else { return -1; } } return 0; } return -1; } ansilove-4.1.0/src/sauce.h000066400000000000000000000017761362247763100154220ustar00rootroot00000000000000/* * sauce.h * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #ifndef SAUCE_H #define SAUCE_H #include #include /* sauce records */ #define RECORD_SIZE 128 #define COMMENT_SIZE 64 #define SAUCE_ID "SAUCE" #define COMMENT_ID "COMNT" struct sauce { char ID[6]; char version[3]; char title[36]; char author[21]; char group[21]; char date[9]; int32_t fileSize; unsigned char dataType; unsigned char fileType; unsigned short tinfo1; unsigned short tinfo2; unsigned short tinfo3; unsigned short tinfo4; unsigned char comments; unsigned char flags; char tinfos[23]; char **comment_lines; }; struct sauce *sauceReadFileName(char *); struct sauce *sauceReadFile(FILE *); void readRecord(FILE *, struct sauce *); int readComments(FILE *, char **, int32_t); #endif /* SAUCE_H */ ansilove-4.1.0/src/seccomp.h000066400000000000000000000025741362247763100157500ustar00rootroot00000000000000/* * seccomp.h * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2019-2020, Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #ifndef SECCOMP_H #define SECCOMP_H #include #include #include #include #include #include #include #define ANSILOVE_SYSCALL_ALLOW(syscall) \ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \ BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) static struct sock_filter filter[] = { BPF_STMT(BPF_LD+BPF_W+BPF_ABS, offsetof(struct seccomp_data, nr)), ANSILOVE_SYSCALL_ALLOW(brk), ANSILOVE_SYSCALL_ALLOW(close), ANSILOVE_SYSCALL_ALLOW(exit_group), ANSILOVE_SYSCALL_ALLOW(fstat), ANSILOVE_SYSCALL_ALLOW(ioctl), ANSILOVE_SYSCALL_ALLOW(lseek), #if defined(SYS_open) ANSILOVE_SYSCALL_ALLOW(open), #endif ANSILOVE_SYSCALL_ALLOW(openat), ANSILOVE_SYSCALL_ALLOW(madvise), ANSILOVE_SYSCALL_ALLOW(mmap), ANSILOVE_SYSCALL_ALLOW(mremap), ANSILOVE_SYSCALL_ALLOW(munmap), ANSILOVE_SYSCALL_ALLOW(read), ANSILOVE_SYSCALL_ALLOW(readv), ANSILOVE_SYSCALL_ALLOW(write), ANSILOVE_SYSCALL_ALLOW(writev), BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL) }; struct sock_fprog ansilove = { .len = sizeof(filter)/sizeof(filter[0]), .filter = filter }; #endif /* SECCOMP_H */ ansilove-4.1.0/src/strtolower.c000066400000000000000000000006571362247763100165360ustar00rootroot00000000000000/* * strtolower.c * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #include #include "strtolower.h" char * strtolower(char *str) { char *p = str; while (*p) { *p = tolower((unsigned char)*p); p++; } return str; } ansilove-4.1.0/src/strtolower.h000066400000000000000000000006471362247763100165420ustar00rootroot00000000000000/* * strtolower.h * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #ifndef STRTOLOWER_H #define STRTOLOWER_H /* In-place modification of a string to be all lower case. */ char *strtolower(char *); #endif /* STRTOLOWER_H */ ansilove-4.1.0/src/types.c000066400000000000000000000013761362247763100154550ustar00rootroot00000000000000/* * types.c * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #include "ansilove.h" #include "types.h" char *types[] = { "ans", "adf", "bin", "idf", "pcb", "tnd", "xb", }; int filetypes[] = { ANSILOVE_FILETYPE_ANS, ANSILOVE_FILETYPE_ADF, ANSILOVE_FILETYPE_BIN, ANSILOVE_FILETYPE_IDF, ANSILOVE_FILETYPE_PCB, ANSILOVE_FILETYPE_TND, ANSILOVE_FILETYPE_XB }; int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *) = { ansilove_ansi, ansilove_artworx, ansilove_binary, ansilove_icedraw, ansilove_pcboard, ansilove_tundra, ansilove_xbin }; ansilove-4.1.0/src/types.h000066400000000000000000000012231362247763100154510ustar00rootroot00000000000000/* * types.h * Ansilove 4.1.0 * https://www.ansilove.org * * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus * All rights reserved. * * Ansilove is licensed under the BSD 2-Clause License. * See LICENSE file for details. */ #ifndef TYPES_H #define TYPES_H #define ANSILOVE_FILETYPE_ANS 1 #define ANSILOVE_FILETYPE_ADF 2 #define ANSILOVE_FILETYPE_BIN 3 #define ANSILOVE_FILETYPE_IDF 4 #define ANSILOVE_FILETYPE_PCB 5 #define ANSILOVE_FILETYPE_TND 6 #define ANSILOVE_FILETYPE_XB 7 extern char *types[]; extern int filetypes[]; extern int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *); #endif /* TYPES_H */ ansilove-4.1.0/tests/000077500000000000000000000000001362247763100145115ustar00rootroot00000000000000ansilove-4.1.0/tests/bs-alove.adf000066400000000000000000000326411362247763100167030ustar00rootroot00000000000000************?**?**?****?*??*****?*?*????**?*?*??****??*?*?**?**?????*?*?*??*??*????*????????????~~~~l|88||8<<<<~~<_/U*U*U*U*U*_UUUUtvTÙ2xx><~~<fffffffff{|`8ll8 |<~~<~<~~< 0``0$ff$88||||88<<<fff$lllllll||| 0`Ɔ8ll8vv000` 000000 0 0f<l8l||||`0||0xv`0v~ x|||~~8ld`````f<ff|bfofff~p0`x |v 08<0`||0`vvffffffv~8ll8|0000`|0`Λ 0fΖ><<<6ll6l6lDDDDDDDDUUUUUUUUwwwwwwww66666666666666666666666666666666666666666666666666666666666666666666666666666667666666666666670??07666666666666666666666666667076666666666666666666666666666666666666666666??66666666666666666666666vvxlllllll`00`~pfffff|``v~ffff<~~~~`0``|```0|~0  0~ 0`0 ~p~vv8ll8 ll<lllllp0`|||||||                                                                                                                                                                                                                                                                                                                                                                                                                                                        ] ]]                LLL                                           ]]   ]       L||| LLL || L            L =]   ]]  LLL |LL LLL LLLLLLL L         ]  ]]      L    L L    L        ]]]   =] ]  ]  ]]   ] ]]  LLL   x   ]  ]]   ]  ] ]  ] =]  xxxx x x ] ]   ]]  ] =]  ]]] ]     xxxxxxxxx xxxxx  ]] ]  ] ]  ]]]  ]]                                                    L                                                                   LL                                                                                                                                                                                                                                                                                                                                                                       xx                                                                                                                                l      x    ]                      x  ]]                    nn~~nnnnxx                   nn xxx  ]]]  x               nnn      xxx   x x             l   x    ] ]] xxx      LLL xx            l    x    ]]   ]       L||| LLL || L                 | Lllxx   L =]   ]]  LLL |LL LLL LLLLLLL L                || lx   ]  ]]      L    L L    L                   lll l    ]]]   =] ]  ]  ]]   ] ]]  LLL                lll   ll   ]  ]]   ]  ] ]  ] =]         n     | l        ] ]   ]]  ] =]  ]]] ]             o   l         ]] ]  ] ]  ]]]  ]]                                          L                                                           LL                                                                                                                                                                                                                                                              SAUCE00                                                                          20171007| P / IBM VGA                                                                                                                                                                   |L |                 ]                        x LLL   }} ]                    |      LL ||    ]  }                L LL  L| |L LL  L x ]]  ]] x                LLL   LLL L  LL  LL   ]                     TLTTL LLLLL  L T  ]E ] ]] }]  ]] ]  ]             T  TTT  LT L TTTT   E ]E] ]]]]              TT TT TTT   ]EEEEEE EE E                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ansilove-4.1.0/tests/bs-alove.ans000066400000000000000000000215471362247763100167350ustar00rootroot00000000000000  ܰ   ܲܰ ޲         ܰ߰               ߲             ߰      ܲ     ޲ ߰       ߲   ܱܲ ܲ ߲  ߰  ߱ܲ ܲ      ߲ ߰     ܰ  ޲       ۲ ܲ       ܱ      ۲     ߲߲    ߰    ܰ    ܱ   ܰ ܲ  ܲ     ܲܰ    ߱     ܰ߰    ܰ         ߲   ߰       ߰   ܲ ۲   ܲ     ޲        ߲     ߲  ߰  ߱ܲ ܲ        ߲ ߰      SAUCE00 20171007|P/IBM VGA ݰ   ߲߰ ߲   ܲ          ܰ  ߰  ߲      ߲߲ݰ    ߲            ߲߱  ܰ     ۲           ۲۲            SAUCE00ansilove burps fuel 20171019"P;IBM VGAansilove-4.1.0/tests/bs-alove.bin000066400000000000000000000223401362247763100167140ustar00rootroot00000000000000                                                                                                                                                                                                                                                                                                                                                                                                                                                        ] ]]                LLL                                           ]]   ]       L||| LLL || L            L =]   ]]  LLL |LL LLL LLLLLLL L         ]  ]]      L    L L    L        ]]]   =] ]  ]  ]]   ] ]]  LLL   x   ]  ]]   ]  ] ]  ] =]  xxxx x x ] ]   ]]  ] =]  ]]] ]     xxxxxxxxx xxxxx  ]] ]  ] ]  ]]]  ]]                                                    L                                                                   LL                                                                                                                                                                                                                                                                                                                                                                       xx                                                                                                                                l      x    ]                      x  ]]                    nn~~nnnnxx                   nn xxx  ]]]  x               nnn      xxx   x x             l   x    ] ]] xxx      LLL xx            l    x    ]]   ]       L||| LLL || L                 | Lllxx   L =]   ]]  LLL |LL LLL LLLLLLL L                || lx   ]  ]]      L    L L    L                   lll l    ]]]   =] ]  ]  ]]   ] ]]  LLL                lll   ll   ]  ]]   ]  ] ]  ] =]         n     | l        ] ]   ]]  ] =]  ]]] ]             o   l         ]] ]  ] ]  ]]]  ]]                                          L                                                           LL                                                                                                                                                                                                                                                              SAUCE00                                                                          20171007| P / IBM VGA                                                                                                                                                                   |L |                 ]                        x LLL   }} ]                    |      LL ||    ]  }                L LL  L| |L LL  L x ]]  ]] x                LLL   LLL L  LL  LL   ]                     TLTTL LLLLL  L T  ]E ] ]] }]  ]] ]  ]             T  TTT  LT L TTTT   E ]E] ]]]]              TT TT TTT   ]EEEEEE EE E                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ansilove-4.1.0/tests/bs-alove.pcb000066400000000000000000000165131362247763100167150ustar00rootroot00000000000000@X07 @X0D@X05 @X07 @X0D@X5D@X0D@X5D@X05@X07 @X04@X0C@X04@X07 @X0C@X04@X0C@X4Cܰ@X04 @X07 @X0F@X07 @X05@X5D@X0F @X04 @X0D@X5D@X05@X07 @X0C@X4C@X7Cܲ@X0C@X4Cܰ@X04@X0C@X7C@X0C@X4C@X04 @X05@X7F޲@X0F@X7F@X07 @X0F@X7F@X0F@X7F@X07 @X05 @X0F@X7F@X0F@X7F@X07 @X0F@X7F@X07 @X0D@X05@X04@X4C@X0F @X3D@X5D@X0F @X04 @X0D@X5D@X0F @X0C@X4Cܰ@X04@X0C@X7C@X4C@X0C@X4C@X0C@X4C߰@X04@X4C@X0C@X4C @X05 @X07@X0F@X7F@X07 @X0F@X7F@X0F@X7F@X07 @X0F@X7F@X07 @X0F@X7F@X07 @X0F@X07 @X05@X0D @X04@X0D@X5D@X05 @X0D@X5D@X05 @X0D@X05 @X4C@X0F @X0D@X05 @X0C@X4C@X0C@X4C@X0C @X0D@X05 @X04߲ @X0C@X4C @X0F @X7F@X0F@X7F@X0F@X7F@X0F @X7F@X0F@X07 @X05@X0F@X7F@X07@X0F@X7F@X0F@X7F@X0F@X07 @X05@X0F@X7F@X07 @X05@X0D@X05@X0D@X5D@X05@X5D@X05 @X0D@X3D@X5D@X0D@X5D@X05 @X5D@X05 @X04 @X5D@X0F @X0D@X5D@X0D@X5D@X05 @X04@X4C߰ @X0F @X7F@X07@X05@X07@X0F@X7F@X0F @X7F@X0F@X07@X05@X0F@X7F@X78@X05 @X07@X0F@X7F@X0F@X7F@X07@X0F@X7F@X08@X04 @X0D@X5D@X05 @X04ܲ@X0D@X5D@X0F @X04 @X0D@X5D@X05 @X0D@X5D@X05@X04@X0D@X5D@X05 @X0D@X5D@X05@X04@X0C @X3D@X5D@X05@X04޲ @X07@X7F߰@X07@X78@X7F@X07@X78@X7F@X07@X05@X07@X7F@X78@X05@X08@X78@X7F@X07 @X7F@X78@X08 @X78@X08@X05@X0D@X5D@X05@X0D@X5D@X05 @X04 @X0D@X5D@X05 @X04 @X05@X5D@X0D@X05@X3D@X5D@X0F @X04@X0D@X5D@X05߲@X5D@X0D@X05@X5D@X05 @X04 @X05 @X07@X78ܱ@X08@X78@X08@X78@X08@X05@X08@X78ܲ@X05 @X08@X78ܲ@X08 @X07@X08@X05@X0D@X5D@X05߲@X5D@X05@X0D@X5D@X0D@X05 @X5D@X05@X0D@X5D@X05 @X04@X0D@X5D߰@X05 @X04 @X05@X5D߱@X05@X0D@X05ܲ @X04ܲ @X07 @X05 @X04 @X05 @X04 @X05 @X04߲@X4C@X0C @X05߰ @X04 @X07 @X04@X4C@X0C @X07 @X04 @X07 @X78@X07 @X7Fܰ@X07@X7F@X07 @X0F@X07 @X0C@X6C@X06@X07 @X78@X7F@X07@X08@X07 @X05@X5D@X05@X7F޲@X0F@X7F@X07 @X0F@X7F@X0F@X7F@X07 @X05 @X0F@X7F@X0F@X7F@X07 @X0F@X7F@X07 @X06@X0E@X06 @X0E@X06@X08@X78@X07@X08 @X07@X7F@X07۲ @X05ܲ@X5D@X05 @X07@X0F@X7F@X07 @X0F@X7F@X0F@X7F@X07 @X0F@X7F@X07 @X0F@X7F@X07 @X0F@X07 @X06@X0E@X6E@X7E@X0E@X6E@X06@X08@X07@X7F@X07@X78@X07@X08@X07 @X05ܱ@X0F@X7F@X0F@X7F@X0F@X7F@X0F @X7F@X0F@X07 @X05@X0F@X7F@X07@X0F@X7F@X0F@X7F@X0F@X07 @X05@X0F@X7F@X07 @X06@X6E@X0E@X6E@X06@X0E @X07@X7F@X07@X08@X78@X07@X78@X07@X08 @X05@X5D@X05۲ @X0F@X7F@X07@X05@X07@X0F@X7F@X0F @X7F@X0F@X07@X05@X0F@X7F@X78@X05 @X07@X0F@X7F@X0F@X7F@X07@X0F@X7F@X08 @X07 @X0C @X06߲@X6E߲@X06@X0E@X06 @X07@X7F@X07 @X08@X07@X08@X07 @X05 @X07@X7F߰@X07@X78@X7F@X07@X78@X7F@X07@X05@X07@X7F@X78@X05@X08@X07 @X7F@X78@X08 @X78@X07@X08 @X07 @X0C@X6C@X0C @X06ܰ @X07@X7F@X07@X08@X78@X07 @X05 @X0D@X5D@X0D@X5D@X05 @X07@X78ܱ@X08 @X04@X0C@X04 @X05@X08@X07 @X0C@X04@X0C@X4Cܰ@X04@X08 @X78ܲ@X08 @X07 @X06@X6C@X06@X0C@X06@X0C @X06ܲ @X08@X07 @X08@X78@X07 @X05@X5D@X0F @X04 @X0D@X5D@X05@X07 @X0C@X4C@X7Cܲ@X0C@X4Cܰ@X04@X0C@X7C@X0C@X4C@X04 @X06 @X08 @X06 @X0C@X7C@X0C@X4C@X6C@X06߱@X78@X08@X07 @X0D@X05@X04@X4C@X0F @X3D@X5D@X0F @X04 @X0D@X5D@X0F @X0C@X4Cܰ@X04@X0C@X7C@X4C@X0C@X4C@X0C@X4C߰@X04@X4C@X0C@X4C @X0F @X06 @X0C@X06 @X0C@X7C@X0C@X6C@X06ܰ@X08@X78@X08 @X05@X0D @X04@X0D@X5D@X05 @X0D@X5D@X05 @X0D@X05 @X4C@X0F @X0D@X05 @X0C@X4C@X0C@X4C@X0C @X0D@X05 @X04߲ @X0C@X4C @X07 @X06 @X0C@X6C߰@X06@X6C@X0C@X6C@X06@X08 @X05@X0D@X05@X0D@X5D@X05@X5D@X05 @X0D@X3D@X5D@X0D@X5D@X05 @X5D@X05 @X04 @X5D@X0F @X0D@X5D@X0D@X5D@X05 @X04@X4C߰ @X0F @X06 @X0C@X6Cܲ@X06 @X0C@X6C@X06۲ @X04 @X0D@X5D@X05 @X04ܲ@X0D@X5D@X0F @X04 @X0D@X5D@X05 @X0D@X5D@X05@X04@X0D@X5D@X05 @X0D@X5D@X05@X04@X0C @X3D@X5D@X05@X04޲ @X6E@X06 @X7C@X0C@X6C@X06 @X08@X07 @X06@X05@X0D@X5D@X05@X0D@X5D@X05 @X04 @X0D@X5D@X05 @X04 @X05@X5D@X0D@X05@X3D@X5D@X0F @X04@X0D@X5D@X05߲@X5D@X0D@X05@X5D@X05 @X04 @X05 @X06@X6F@X06 @X0C@X6C@X06 @X05@X0D@X5D@X05߲@X5D@X05@X0D@X5D@X0D@X05 @X5D@X05@X0D@X5D@X05 @X04@X0D@X5D߰@X05 @X04 @X05@X5D߱@X05@X0D@X05ܲ @X04ܲ @X07 @X06 @X0C @X06@X07 @X05 @X04 @X05 @X04 @X05 @X04߲@X4C@X0C @X05߰ @X04 @X07 @X7F@X07 @X0C @X06@X07 @X04@X4C@X0C @X07 @X04 @X00SAUCE00 20171007| P / IBM VGA @X07 @X0C@X7C@X4C@X0C@X7C@X04ݰ@X07 @X0D@X07 @X0D@X5D@X0D@X05 @X07 @X7F@X0F@X7F@X07 @X04@X0C@X07 @X78@X7F߲@X0F@X7F߰@X07@X0F @X04@X4C߲@X04 @X7F@X0F @X0D@X7D@X0D@X5D@X0D @X7F@X0F@X7Fܲ@X0F @X0D@X05 @X0F@X7F@X0F @X07 @X7F@X07 @X0C@X7C@X0C@X07 @X0C@X07 @X7F@X07 @X0C@X4C@X0C@X7C@X0F @X04 @X07@X7F@X0F@X7F@X0F @X05@X5D@X0D@X08ܰ@X0D@X7D@X0D@X07@X7F@X0F@X7F@X0F@X7F@X0F@X7F @X07 @X04@X0C @X04@X4C@X0C@X08@X4C߰@X04 @X0C@X4C@X7C@X0C @X7C@X4C@X0C@X04@X4C߲@X0C @X08@X0C@X4C@X04 @X78@X7F@X07 @X5D@X0F @X07 @X5D@X0F @X78@X7F߲@X0F@X7F߲@X0F@X7Fݰ @X07 @X08 @X0C@X4C@X04 @X4C@X04@X4C@X0C@X4C@X04 @X4C߲@X0C@X08 @X4C@X04 @X07 @X05 @X5D@X05 @X0D @X07 @X0D @X07 @X0D@X07 @X08 @X04@X54@X05@X04@X4C@X54@X04@X54@X05@X04@X4C@X04 @X4C߱@X04@X4C߲@X0F @X08 @X04@X4C@X0C@X04@X54@X05@X08ܰ @X0D@X05@X5D@X05@X45@X05 @X5D@X0D@X5D@X05 @X7D@X5D@X0F @X0D@X5D@X05@X5D@X0D@X5D@X0D@X08@X0D@X5D@X05 @X07 @X08۲@X05@X54@X0F @X08 @X04@X54@X04@X54@X0F @X08 @X04@X4C@X54@X0F @X04@X4C@X04 @X05@X54@X04@X54@X0F @X08 @X0D@X05@X45@X05 @X08@X05@X5D@X05@X08@X05@X45@X04@X08@X05@X5D@X05 @X5D@X05@X08@X05@X5D@X05@X5D@X05 @X07 @X08۲@X05@X54@X05@X08۲ @X54@X08 @X04@X54@X05 @X08 @X0D@X05@X5D@X05@X45@X04@X05@X45@X04@X05@X45@X04 @X08@X05@X45@X05 @X08@X05@X45@X05@X04@X08 @X07 @X04@X07 @X04 @X07 @X00 @X04 @X00 @X07ansilove-4.1.0/tests/bs-alove.tnd000066400000000000000000000263561362247763100167440ustar00rootroot00000000000000TUNDRA24 W W WW WWWWܰ  W  W WWܲܰWW      WWW W  W WWܰWW߰WW       W W W W WW W WW W  WW     WWW W W  W  WW߰  WWW WWW W ܲW  W WW WWW W WWWWWWWWWWWW WWW WW  W  WW WWW   WWWܱWWW WWWܲ WWWW߲WW WW W߰  WWܲ       WW ߰  WW  WWW   WWWW WWWWWW W     WWW WWWWWWWW  W      WWWWWWWWWWWWWW     WWWWWW WWWWWWWWW W  WWW WWW WW W߲WW߲WWW  WWWWWW  WWWWWWWWWWWW WWW WWW WWW Wܰ WWW  W WWWܱ WW WWW WWWWܰWWW  WWWWWWWWWW W WWW WWW W  W WWܲܰWW W WWW W WWWWWWW WWW W  W WWܰWW߰WW W WWW WWWWWWW W W W W WW W WW W  WW W WWWWWWWWWWWW WWW W W  W  WW߰ W WWWW WWWW  W ܲW  W WW WWW W WWW WWWW WWW WWW  W  WW WWW   WWW WWWW W߲WW WW W߰  WWܲ  W WW W      WW ߰   WW W WW   SAUCE00 20171007|(P(/(IBM VGA WW W   WW WWW߲߰ WW  W  W   WW WW  WW   WWWWW WW WWWWWWW WW WW WWWWW WWW W  W WWW߲߲ݰ WWW WW WWWW WWWWW WW   W W  W  W WWW WWWW WWWW߲ WWW WWWWW WW W W WWWWW WWW WWW  WWW WW WW  WWW W WWWWWWWWWWW WWWWWW WWW۲WWW۲ WWW  WWW WW WWW WWWWWW   ansilove-4.1.0/tests/bs-alove.xb000066400000000000000000000201051362247763100165520ustar00rootroot00000000000000XBINP;***********????????????~~~~l|88||8<<<<~~<<<><~~<fffffffff{|`8ll8 |<~~<~<~~< 0``0(ll(88||||88<<<fff$lllllll||| 0`Ɔ8ll8vv000` 000000 0 0f<l8l||||`0||0xv`0v~ x|||||8ld`````ff<~~~p0`x |v 08<0`||0`vvffffffv~8ll8|0000`|`bfl0`܆ >`bfl0fΚ?<<<6ll6l6lDDDDDDDDUUUUUUUUwwwwwwww66666666666666666666666666666666666666666666666666666666666666666666666666666667666666666666670??07666666666666666666666666667076666666666666666666666666666666666666666666??66666666666666666666666vvxllllll`00`~pffffff|``v~ffff<~~~~`0``|```0|~~0  0~ 0`0 ~p~vv8ll8 ll<l66666