Hello community,

here is the log from the commit of package ansilove for openSUSE:Factory 
checked in at 2020-05-29 21:23:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ansilove (Old)
 and      /work/SRC/openSUSE:Factory/.ansilove.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ansilove"

Fri May 29 21:23:25 2020 rev:5 rq:809769 version:4.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ansilove/ansilove.changes        2020-01-21 
21:04:03.932952443 +0100
+++ /work/SRC/openSUSE:Factory/.ansilove.new.3606/ansilove.changes      
2020-05-29 21:37:32.762680051 +0200
@@ -1,0 +2,19 @@
+Mon May 25 17:31:37 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 4.1.1
+  * Various documentation tweaks and improvements
+  * Define timespecsub macro in compat.h if it doesn't exists
+  * Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available
+  * Display processing time on exit.
+  * Fix includes and add forward declarations in various source
+    files
+
+-------------------------------------------------------------------
+Mon Feb 17 19:33:12 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 4.1.0
+  * Add a new '-t' flag (type), allowing to specify input file type
+    and override file type detection
+  * Various documentation tweaks and improvements
+
+-------------------------------------------------------------------

Old:
----
  ansilove-4.0.7.tar.gz

New:
----
  ansilove-4.1.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ansilove.spec ++++++
--- /var/tmp/diff_new_pack.MLiMTR/_old  2020-05-29 21:37:33.158681229 +0200
+++ /var/tmp/diff_new_pack.MLiMTR/_new  2020-05-29 21:37:33.162681241 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ansilove
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2019, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:           ansilove
-Version:        4.0.7
+Version:        4.1.1
 Release:        0
 Summary:        ANSI and ASCII art to PNG converter
 License:        BSD-2-Clause

++++++ ansilove-4.0.7.tar.gz -> ansilove-4.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/.travis.yml 
new/ansilove-4.1.1/.travis.yml
--- old/ansilove-4.0.7/.travis.yml      2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/.travis.yml      2020-05-25 18:51:05.000000000 +0200
@@ -35,7 +35,7 @@
   coverity_scan:
     project:
       name: "ansilove/ansilove"
-      version: 4.0.7
+      version: 4.1.1
       description: "ANSi / ASCII art to PNG converter in C"
     notification_email: [email protected]
     build_command_prepend: cmake .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/CMakeLists.txt 
new/ansilove-4.1.1/CMakeLists.txt
--- old/ansilove-4.0.7/CMakeLists.txt   2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/CMakeLists.txt   2020-05-25 18:51:05.000000000 +0200
@@ -34,7 +34,7 @@
 find_library(ANSILOVE_LIBRARIES NAMES ansilove REQUIRED)
 include_directories(${ANSILOVE_INCLUDE_DIRS})
 
-set(SRC src/ansilove.c src/strtolower.c src/sauce.c)
+set(SRC src/ansilove.c src/types.c src/strtolower.c src/sauce.c)
 
 if(NOT HAVE_PLEDGE)
   set (SRC ${SRC} compat/pledge.c)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/ChangeLog new/ansilove-4.1.1/ChangeLog
--- old/ansilove-4.0.7/ChangeLog        2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/ChangeLog        2020-05-25 18:51:05.000000000 +0200
@@ -1,3 +1,21 @@
+AnsiLove/C 4.1.1 (2020-05-25)
+
+- Various documentation tweaks and improvements
+- Define timespecsub macro in compat.h if it doesn't exists
+- Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available
+- Display processing time on exit.
+- Fix includes and add forward declarations in various source files
+
+
+
+AnsiLove/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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/FILE_ID.DIZ 
new/ansilove-4.1.1/FILE_ID.DIZ
--- old/ansilove-4.0.7/FILE_ID.DIZ      2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/FILE_ID.DIZ      2020-05-25 18:51:05.000000000 +0200
@@ -17,7 +17,7 @@
  - -----------//______|----------------- -
   :                                     :
   |                                     |
-  |           Ansilove/C 4.0.7          |
+  |           Ansilove/C 4.1.1          |
   |                                     |
   |    ANSi=>PNG converter & library    |
   |                                     |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/README.md new/ansilove-4.1.1/README.md
--- old/ansilove-4.0.7/README.md        2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/README.md        2020-05-25 18:51:05.000000000 +0200
@@ -20,10 +20,17 @@
 
 [![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. It converts ANSi and artscene related file formats into
-PNG images. The project is considered as stable, current version
-is `4.0.7`.
+language.
 
 # Specs
 
@@ -56,10 +63,14 @@
 - 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`
+- Debian / Ubuntu / Mint: `apt-get install build-essential cmake`
+- Fedora: `yum install cmake gcc make`
 - Solus: `eopkg install -c system.devel`
 
-For now, `libansilove` has to be installed manually.
+Binary packages for `libansilove` are available on OpenBSD, NetBSD,
+FreeBSD, Debian, Ubuntu, and Solus.
+
+On other systems, `libansilove` has to be installed manually.
 
 # Compiling
 
@@ -68,29 +79,17 @@
        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
+# Packages
 
-### Debian / Ubuntu
+Packages are available for the following operating systems:
 
-       apt install ansilove
-
-### Solus
-
-       eopkg install ansilove
+- [OpenBSD][5]
+- [NetBSD][6]
+- [FreeBSD][7]
+- [Debian][8]
+- [Ubuntu][9]
+- [openSUSE][10]
+- [Solus][11]
 
 # Features
 
@@ -101,21 +100,21 @@
 - .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 format, supporting 24-bit color mode
-- .XB - The eXtended Binary XBin format, supporting custom character sets
+- .TND - [TundraDraw][12] format, supporting 24-bit color mode
+- .XB - The eXtended Binary [XBin][13] 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][5] records
+- [SAUCE][14] records
 - DOS and Amiga fonts (embedded binary dump)
 - iCE colors
 
 Even more:
 
-- Output files are highly optimized 4-bit PNGs.
+- 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.
@@ -126,7 +125,7 @@
 
 ```
      ansilove [-dhiqrsv] [-b bits] [-c columns] [-f font] [-m mode] [-o file]
-              [-R factor] file
+              [-R factor] [-t type] file
 ```
 
 ## Options
@@ -163,6 +162,8 @@
 
      -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.
@@ -184,8 +185,8 @@
 - `80x50` 80x50 mode (Code page 437)
 - `cp737` Greek (Code page 737)
 - `cp775` Baltic (Code page 775)
-- `cp850` Latin1 (Code page 850)
-- `cp852` Latin2 (Code page 852)
+- `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)
@@ -251,8 +252,8 @@
 
 ## Columns
 
-`columns` is only relevant for .ANS, .BIN, and .TND files, and is
-optional. In most cases conversion will work fine if you don't set
+`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.
 
@@ -261,25 +262,36 @@
 It's fine to use AnsiLove/C as SAUCE reader without generating any
 output, just set option `-s` for this purpose.
 
-# Who pulls the strings
-
-AnsiLove/C is developed by Stefan Vogt ([@ByteProject][6]), Brian Cassidy
-([@bricas][7]) and Frederic Cambus ([@fcambus][8]).
-
 # 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][15]), Brian Cassidy
+([@bricas][16]) and Frederic Cambus ([@fcambus][17]).
+
 # 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]: http://www.acid.org/info/sauce/sauce.htm
-[6]: https://github.com/ByteProject
-[7]: https://github.com/bricas
-[8]: https://github.com/fcambus
+[5]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/graphics/ansilove
+[6]: http://pkgsrc.se/graphics/ansilove
+[7]: https://www.freshports.org/graphics/ansilove/
+[8]: https://packages.debian.org/search?keywords=ansilove
+[9]: https://packages.ubuntu.com/search?keywords=ansilove
+[10]: https://software.opensuse.org/package/ansilove
+[11]: https://dev.getsol.us/source/ansilove/
+[12]: https://sourceforge.net/projects/tundradraw/
+[13]: https://github.com/radman1/xbin
+[14]: https://github.com/radman1/sauce
+[15]: https://github.com/ByteProject
+[16]: https://github.com/bricas
+[17]: https://github.com/fcambus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/TODO new/ansilove-4.1.1/TODO
--- old/ansilove-4.0.7/TODO     2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/TODO     1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-- Import documentation from Ansilove/PHP
-- Display mode information in summary, and DOS aspect if enabled
-- Wrap lines longer than 80 columns
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/ansilove.1 
new/ansilove-4.1.1/ansilove.1
--- old/ansilove-4.0.7/ansilove.1       2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/ansilove.1       2020-05-25 18:51:05.000000000 +0200
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd $Mdocdate: January 17 2020 $
+.Dd $Mdocdate: February 17 2020 $
 .Dt ANSILOVE 1
 .Os
 .Sh NAME
@@ -39,6 +39,7 @@
 .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
@@ -124,7 +125,9 @@
 .It Fl i
 Enable iCE colors.
 .It Fl m Ar mode
-Set rendering mode for ANS files. Valid options are:
+Set rendering mode for ANS files.
+.Pp
+Valid options are:
 .Bl -tag -width Ds
 .It Ic ced
 Black on gray, with 78 columns.
@@ -141,6 +144,26 @@
 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
@@ -174,7 +197,6 @@
 iCE colors, and using DOS aspect ratio:
 .Pp
 .Dl $ ansilove -f 80x50 -b 9 -d -i file.ans
-.Pp
 .Sh AUTHORS
 .An -nosplit
 .Nm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/compat/compat.h 
new/ansilove-4.1.1/compat/compat.h
--- old/ansilove-4.0.7/compat/compat.h  2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/compat/compat.h  2020-05-25 18:51:05.000000000 +0200
@@ -9,4 +9,21 @@
 #include "strtonum.h"
 #endif
 
+/* Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available */
+#ifndef CLOCK_MONOTONIC
+#define CLOCK_MONOTONIC CLOCK_REALTIME
+#endif
+
+#ifndef timespecsub
+#define        timespecsub(tsp, usp, vsp)                                      
\
+       do {                                                            \
+               (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec;          \
+               (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec;       \
+               if ((vsp)->tv_nsec < 0) {                               \
+                       (vsp)->tv_sec--;                                \
+                       (vsp)->tv_nsec += 1000000000L;                  \
+               }                                                       \
+       } while (0)
+#endif
+
 #endif /* COMPAT_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/ansilove.c 
new/ansilove-4.1.1/src/ansilove.c
--- old/ansilove-4.0.7/src/ansilove.c   2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/ansilove.c   2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * ansilove.c
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
@@ -11,6 +11,7 @@
  */
 
 #define _GNU_SOURCE
+#include <sys/time.h>
 #include <ansilove.h>
 #include <err.h>
 #include <getopt.h>
@@ -19,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 
 #ifdef HAVE_SECCOMP
 #include <sys/prctl.h>
@@ -34,6 +36,7 @@
 #include "fonts.h"
 #include "sauce.h"
 #include "strtolower.h"
+#include "types.h"
 
 /* prototypes */
 static void synopsis(void);
@@ -45,7 +48,7 @@
        fprintf(stdout, "SYNOPSIS\n"
            "     ansilove [-dhiqrsv] [-b bits] [-c columns] [-f font]"
            " [-m mode] [-o file]\n"
-           "              [-R factor] file\n");
+           "              [-R factor] [-t type] file\n");
 }
 
 static void
@@ -65,17 +68,15 @@
        bool justDisplaySAUCE = false;
        bool fileHasSAUCE = false;
 
-       /* analyze options and do what has to be done */
-       bool fileIsBinary = false;
-       bool fileIsANSi = false;
-       bool fileIsPCBoard = false;
-       bool fileIsTundra = false;
-
        int getoptFlag;
 
        char *input = NULL, *output = NULL;
        char *fileName = NULL;
        char *font = NULL;
+       char *type = NULL;
+       int filetype = 0;
+
+       struct timespec begin, end, elapsed;
 
        static struct ansilove_ctx ctx;
        static struct ansilove_options options;
@@ -100,10 +101,9 @@
        if (ansilove_init(&ctx, &options) == -1)
                errx(EXIT_FAILURE, "%s", ansilove_error(&ctx));
 
-       while ((getoptFlag = getopt(argc, argv, "b:c:df:him:o:qrR:sv")) != -1) {
+       while ((getoptFlag = getopt(argc, argv, "b:c:df:him:o:qrR:st:v")) != 
-1) {
                switch (getoptFlag) {
                case 'b':
-                       /* convert numeric command line flags to integer values 
*/
                        options.bits = strtonum(optarg, 8, 9, &errstr);
 
                        if (errstr)
@@ -111,7 +111,6 @@
 
                        break;
                case 'c':
-                       /* convert numeric command line flags to integer values 
*/
                        options.columns = strtonum(optarg, 1, 4096, &errstr);
 
                        if (errstr)
@@ -155,7 +154,6 @@
                        options.scale_factor = 2;
                        break;
                case 'R':
-                       /* convert numeric command line flags to integer values 
*/
                        options.scale_factor = strtonum(optarg, 2, 8, &errstr);
 
                        if (errstr)
@@ -165,6 +163,9 @@
                case 's':
                        justDisplaySAUCE = true;
                        break;
+               case 't':
+                       type = strtolower(optarg);
+                       break;
                case 'v':
                        version();
                        return EXIT_SUCCESS;
@@ -185,6 +186,9 @@
        if (!messages)
                messages = stdout;
 
+        /* Starting timer */
+        clock_gettime(CLOCK_MONOTONIC, &begin);
+
        /* let's check the file for a valid SAUCE record */
        struct sauce *record = sauceReadFileName(input);
 
@@ -231,27 +235,37 @@
                if (fileHasSAUCE && (record->flags & 1))
                        options.icecolors = true;
 
-               int (*loader)(struct ansilove_ctx *, struct ansilove_options *);
+               int (*loader)(struct ansilove_ctx *, struct ansilove_options *) 
= NULL;
 
-               /* create the output PNG data by invoking the appropriate 
function */
-               if (!strcmp(fext, "pcb")) {
-                       loader = ansilove_pcboard;
-                       fileIsPCBoard = true;
-               } else if (!strcmp(fext, "bin")) {
-                       loader = ansilove_binary;
-                       fileIsBinary = true;
-               } else if (!strcmp(fext, "adf")) {
-                       loader = ansilove_artworx;
-               } else if (!strcmp(fext, "idf")) {
-                       loader = ansilove_icedraw;
-               } else if (!strcmp(fext, "tnd")) {
-                       loader = ansilove_tundra;
-                       fileIsTundra = true;
-               } else if (!strcmp(fext, "xb")) {
-                       loader = ansilove_xbin;
-               } else {
+               /* 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;
-                       fileIsANSi = true;
+                       filetype = ANSILOVE_FILETYPE_ANS;
                }
 
                if (loader(&ctx, &options) == -1)
@@ -262,18 +276,19 @@
                        errx(EXIT_FAILURE, "%s", ansilove_error(&ctx));
 
                /* gather information and report to the command line */
-               if (fileIsANSi || fileIsBinary ||
-                   fileIsPCBoard || fileIsTundra) {
+               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);
-               }
-
-               if (options.icecolors && (fileIsANSi || fileIsBinary))
-                       fprintf(messages, "iCE Colors: enabled\n");
-
-               if (fileIsANSi || fileIsBinary || fileIsTundra)
                        fprintf(messages, "Columns: %d\n", options.columns);
+               }
 
                if (options.scale_factor)
                        fprintf(messages, "Scale factor: %d\n", 
options.scale_factor);
@@ -293,30 +308,38 @@
                fprintf(messages, "Date: %s\n", record->date);
                fprintf(messages, "Datatype: %d\n", record->dataType);
                fprintf(messages, "Filetype: %d\n", record->fileType);
-               if (record->flags) {
+
+               if (record->flags)
                        fprintf(messages, "Flags: %d\n", record->flags);
-               }
-               if (record->tinfo1) {
+
+               if (record->tinfo1)
                        fprintf(messages, "Tinfo1: %d\n", record->tinfo1);
-               }
-               if (record->tinfo2) {
+
+               if (record->tinfo2)
                        fprintf(messages, "Tinfo2: %d\n", record->tinfo2);
-               }
-               if (record->tinfo3) {
+
+               if (record->tinfo3)
                        fprintf(messages, "Tinfo3: %d\n", record->tinfo3);
-               }
-               if (record->tinfo4) {
+
+               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++) {
+                       for (int32_t i = 0; i < record->comments; i++)
                                fprintf(messages, "%s\n", 
record->comment_lines[i]);
-                       }
                }
        }
 
+       /* Stopping timer */
+       clock_gettime(CLOCK_MONOTONIC, &end);
+
+       timespecsub(&end, &begin, &elapsed);
+
+       fprintf(messages, "\nProcessed in %f seconds.\n",
+           elapsed.tv_sec + elapsed.tv_nsec / 1E9);
+
        ansilove_clean(&ctx);
 
        free(record->comment_lines);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/config.h 
new/ansilove-4.1.1/src/config.h
--- old/ansilove-4.0.7/src/config.h     2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/config.h     2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * config.h
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
@@ -16,6 +16,11 @@
 #include <stdint.h>
 
 /* configuration defines */
-#define VERSION "4.0.7"
+#define VERSION "4.1.1"
+
+enum {
+       FONTS = 38,
+       TYPES = 7
+};
 
 #endif /* CONFIG_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/fonts.h 
new/ansilove-4.1.1/src/fonts.h
--- old/ansilove-4.0.7/src/fonts.h      2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/fonts.h      2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * fonts.h
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
@@ -13,8 +13,6 @@
 #ifndef FONTS_H
 #define FONTS_H
 
-#define FONTS 38
-
 char *fonts[] = {
        "cp737",                                /* Greek */
        "cp775",                                /* Baltic */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/sauce.c 
new/ansilove-4.1.1/src/sauce.c
--- old/ansilove-4.0.7/src/sauce.c      2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/sauce.c      2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * sauce.c
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/sauce.h 
new/ansilove-4.1.1/src/sauce.h
--- old/ansilove-4.0.7/src/sauce.h      2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/sauce.h      2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * sauce.h
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
@@ -13,7 +13,7 @@
 #ifndef SAUCE_H
 #define SAUCE_H
 
-#include <sys/types.h>
+#include <stdint.h>
 #include <stdio.h>
 
 /* sauce records */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/seccomp.h 
new/ansilove-4.1.1/src/seccomp.h
--- old/ansilove-4.0.7/src/seccomp.h    2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/seccomp.h    2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * seccomp.h
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2019-2020, Frederic Cambus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/strtolower.c 
new/ansilove-4.1.1/src/strtolower.c
--- old/ansilove-4.0.7/src/strtolower.c 2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/strtolower.c 2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * strtolower.c
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/strtolower.h 
new/ansilove-4.1.1/src/strtolower.h
--- old/ansilove-4.0.7/src/strtolower.h 2020-01-18 23:57:19.000000000 +0100
+++ new/ansilove-4.1.1/src/strtolower.h 2020-05-25 18:51:05.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * strtolower.h
- * Ansilove 4.0.7
+ * Ansilove 4.1.1
  * https://www.ansilove.org
  *
  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/types.c 
new/ansilove-4.1.1/src/types.c
--- old/ansilove-4.0.7/src/types.c      1970-01-01 01:00:00.000000000 +0100
+++ new/ansilove-4.1.1/src/types.c      2020-05-25 18:51:05.000000000 +0200
@@ -0,0 +1,44 @@
+/*
+ * types.c
+ * Ansilove 4.1.1
+ * 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
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansilove-4.0.7/src/types.h 
new/ansilove-4.1.1/src/types.h
--- old/ansilove-4.0.7/src/types.h      1970-01-01 01:00:00.000000000 +0100
+++ new/ansilove-4.1.1/src/types.h      2020-05-25 18:51:05.000000000 +0200
@@ -0,0 +1,31 @@
+/*
+ * types.h
+ * Ansilove 4.1.1
+ * 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
+
+struct ansilove_ctx;
+struct ansilove_options;
+
+extern char *types[];
+extern int filetypes[];
+extern int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *);
+
+#endif /* TYPES_H */


Reply via email to