Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package SDL_bgi for openSUSE:Factory checked 
in at 2021-05-04 22:01:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/SDL_bgi (Old)
 and      /work/SRC/openSUSE:Factory/.SDL_bgi.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "SDL_bgi"

Tue May  4 22:01:27 2021 rev:21 rq:890420 version:2.4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/SDL_bgi/SDL_bgi.changes  2021-03-05 
13:49:51.171871802 +0100
+++ /work/SRC/openSUSE:Factory/.SDL_bgi.new.2988/SDL_bgi.changes        
2021-05-04 22:01:40.680445348 +0200
@@ -1,0 +2,7 @@
+Tue May  4 13:32:58 UTC 2021 - Jan Engelhardt <[email protected]>
+
+- Update to release 2.4.4
+  * Fixed bug that affected floodfill() with fill patterns in
+    rare cases
+
+-------------------------------------------------------------------

Old:
----
  SDL_bgi-2.4.3.tar.gz

New:
----
  SDL_bgi-2.4.4.tar.gz

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

Other differences:
------------------
++++++ SDL_bgi.spec ++++++
--- /var/tmp/diff_new_pack.ea2iR7/_old  2021-05-04 22:01:41.180443470 +0200
+++ /var/tmp/diff_new_pack.ea2iR7/_new  2021-05-04 22:01:41.184443454 +0200
@@ -19,10 +19,10 @@
 Name:           SDL_bgi
 %define sover   6
 %define lname  libSDL_bgi-suse%sover
-Version:        2.4.3
+Version:        2.4.4
 Release:        0
 Summary:        BGI-compatible 2D graphics C library with SDL backend
-License:        Zlib AND GPL-2.0-or-later
+License:        GPL-2.0-or-later AND Zlib
 Group:          Development/Libraries/X11
 URL:            http://libXbgi.sf.net/
 

++++++ SDL_bgi-2.4.3.tar.gz -> SDL_bgi-2.4.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/CMakeLists.txt 
new/SDL_bgi-2.4.4/CMakeLists.txt
--- old/SDL_bgi-2.4.3/CMakeLists.txt    2021-02-24 11:28:43.000000000 +0100
+++ new/SDL_bgi-2.4.4/CMakeLists.txt    2021-04-28 11:16:33.000000000 +0200
@@ -1,11 +1,11 @@
 # CMakeLists.txt for SDL_bgi 
-# GG, 2021-02-24
+# GG, 2021-04-28
 
 # --- Building, thanks to cmake
 
 cmake_minimum_required (VERSION 3.5.0)
 
-set (SDL_BGI_VERSION 2.4.3)
+set (SDL_BGI_VERSION 2.4.4)
 
 # Project name
 project (SDL_bgi VERSION ${SDL_BGI_VERSION} LANGUAGES C)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/ChangeLog new/SDL_bgi-2.4.4/ChangeLog
--- old/SDL_bgi-2.4.3/ChangeLog 2021-02-24 11:16:17.000000000 +0100
+++ new/SDL_bgi-2.4.4/ChangeLog 2021-05-03 13:52:52.000000000 +0200
@@ -1,6 +1,12 @@
 Changelog
 ---------
 
+v. 2.4.4, 2021-05-04
+- fixed bug that affected floodfill() with fill patterns in rare cases
+- extended setcolor(col) to implement an undocumented TC feature; if
+  'col' > MAXCOLORS, then col %= MAXCOLORS
+- documentation updates
+
 v. 2.4.3, 2021-02-24
 - modified getscreensize() behaviour (suggested by Fanourios Attard)
 - added setwintitle()
@@ -197,7 +203,7 @@
 - changed getimage()/putimage() to include width, heigth info
   in saved bitmap
 - changed getimage()/putimage() to include viewport info
-- fixed MAXCOLOR value
+- fixed MAXCOLORS value
   (reported by Angelo Graziosi)
 - fixed kbhit() behaviour (reported by Angelo Graziosi) - but breaks
   mouseclick() as a result. To be fixed later.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/INSTALL_Linux.md 
new/SDL_bgi-2.4.4/INSTALL_Linux.md
--- old/SDL_bgi-2.4.3/INSTALL_Linux.md  2021-02-10 13:59:27.000000000 +0100
+++ new/SDL_bgi-2.4.4/INSTALL_Linux.md  2021-04-28 08:09:01.000000000 +0200
@@ -19,7 +19,7 @@
 
 To compile and install `SDL_bgi`, run the following commands:
 
-    $ VERSION=2.4.3
+    $ VERSION=2.4.4
     $ tar zxvf SDL_bgi-$VERSION.tar.gz
     $ cd SDL_bgi-$VERSION/src
     $ make
@@ -38,7 +38,7 @@
 
 To compile the `SDL_bgi` library and make `.deb` or `.rpm` packages:
 
-    $ VERSION=2.4.3
+    $ VERSION=2.4.4
     $ tar zxvf SDL_bgi-$VERSION.tar.gz
     $ cd SDL_bgi-$VERSION
     $ ./build.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/INSTALL_Windows.md 
new/SDL_bgi-2.4.4/INSTALL_Windows.md
--- old/SDL_bgi-2.4.3/INSTALL_Windows.md        2021-02-10 13:59:27.000000000 
+0100
+++ new/SDL_bgi-2.4.4/INSTALL_Windows.md        2021-04-28 08:09:27.000000000 
+0200
@@ -78,7 +78,7 @@
 
 Start the MSYS2 shell, then run the following commands:
 
-    $ VERSION=2.4.3
+    $ VERSION=2.4.4
     $ tar zxvf SDL_bgi-$VERSION.tar.gz
     $ cd SDL_bgi-$VERSION/src
     $ make
@@ -99,7 +99,7 @@
 
 Start the MSYS2 shell, then run the following commands:
 
-    $ VERSION=2.4.3
+    $ VERSION=2.4.4
     $ tar zxvf SDL_bgi-$VERSION.tar.gz
     $ cd SDL_bgi-$VERSION/src
     $ PATH=/c/CodeBlocks/MinGW/bin/:$PATH && make -f Makefile.CodeBlocks
@@ -118,7 +118,7 @@
 
 Start the MSYS2 shell, then run the following commands:
 
-    $ VERSION=2.4.3
+    $ VERSION=2.4.4
     $ tar zxvf SDL_bgi-$VERSION.tar.gz
     $ cd SDL_bgi-$VERSION/src
     $ PATH=/c/CodeBlocks/MinGW/bin/:$PATH && make -f Makefile.DevCpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/INSTALL_macOS.md 
new/SDL_bgi-2.4.4/INSTALL_macOS.md
--- old/SDL_bgi-2.4.3/INSTALL_macOS.md  2021-02-10 13:59:27.000000000 +0100
+++ new/SDL_bgi-2.4.4/INSTALL_macOS.md  2021-04-28 08:09:12.000000000 +0200
@@ -24,7 +24,7 @@
 To compile and install `SDL_bgi`, start Terminal and run the following
 commands:
 
-    % VERSION=2.4.3
+    % VERSION=2.4.4
     % tar xvf SDL_bgi-$VERSION.tar
     % cd SDL_bgi-$VERSION/src
     % make
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/VERSION new/SDL_bgi-2.4.4/VERSION
--- old/SDL_bgi-2.4.3/VERSION   2021-02-10 13:59:27.000000000 +0100
+++ new/SDL_bgi-2.4.4/VERSION   2021-04-27 14:31:28.000000000 +0200
@@ -1 +1 @@
-2.4.3
+2.4.4
Binary files old/SDL_bgi-2.4.3/doc/graphics.3.gz and 
new/SDL_bgi-2.4.4/doc/graphics.3.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/doc/graphics.3.md 
new/SDL_bgi-2.4.4/doc/graphics.3.md
--- old/SDL_bgi-2.4.3/doc/graphics.3.md 2021-02-10 13:59:27.000000000 +0100
+++ new/SDL_bgi-2.4.4/doc/graphics.3.md 2021-04-28 08:19:38.000000000 +0200
@@ -1,6 +1,6 @@
-% GRAPHICS(3) SDL_bgi 2.4.3
+% GRAPHICS(3) SDL_bgi 2.4.4
 % \ 
-% February 2021
+% May 2021
 
 [1]: # To turn this file to manpage:
 [2]: # pandoc -s -t man graphics.3.md -o graphics.3
@@ -132,7 +132,7 @@
 #define WM_MOUSEMOVE    SDL_MOUSEMOTION
 ```
 
-## Keys
+## Key codes
 
 \ 
 ```
@@ -328,7 +328,7 @@
 : Closes the graphics system.
 
 void *delay* (int millisec)
-: Waits for \A{millisec} milliseconds.
+: Waits for *millisec* milliseconds.
 
 void *detectgraph* (int \*graphdriver, int \*graphmode);
 : Detects the graphics driver and default graphics mode to use; *SDL*
@@ -364,13 +364,13 @@
 
 void *getaspectratio* (int \*xasp, int \*yasp);
 : Retrieves the current graphics mode's aspect ratio. In *SDL_bgi*,
-  *xasp* and *yasp* are both 10000 (i.e. pixels are squares).
+  *xasp* and *yasp* are both 10000 (i.e. pixels are square).
 
 int *getbkcolor* (void);
 : Returns the current background colour in the default palette.
 
 int *getch* (void);
-: Waits for a key and returns its ASCII code.
+: Waits for a key and returns its ASCII or key code.
 
 int *getcolor* (void);
 : Returns the current drawing (foreground) colour in the default
@@ -462,7 +462,7 @@
 : Returns a pointer to the error message string associated with
   *errorcode*, returned by *graphresult*().
 
-int *graphresult*(void);
+int *graphresult* (void);
 : Returns the error code for the last unsuccessful graphics operation
   and resets the error level to *grOk*.
 
@@ -521,7 +521,7 @@
 : Plots a pixel at (*x*, *y*) in the colour defined by *color*.
 
 int *random* (int range) (macro)
-: Returns a random number between 0 and \A{range - 1}.
+: Returns a random number between 0 and *range - 1*
 
 void *rectangle* (int left, int top, int right, int bottom);
 : Draws a rectangle delimited by (*left*, *top*) and
@@ -616,7 +616,7 @@
   *setfillpattern*(), and *setfillstyle*() to set a colour
   specifying its ARGB components.
 
-int *COLOR32*(Uint32 color);
+int *COLOR32* (Uint32 color);
 : Can be used as an argument for *setcolor*(), *setbkcolor*(),
   *setfillpattern*(), and *setfillstyle*() to set a colour as
   ARGB integer.
@@ -625,21 +625,21 @@
 : Can be used to compose a 32 bit colour with *r* *g* *b*
   components.
 
-int *GREEN_VALUE*(int color);
+int *GREEN_VALUE* (int color);
 : Returns the green component of an ARGB colour in the ARGB palette.
 
 int *IS_BGI_COLOR* (int color);
 : Returns 1 if the *current* drawing colour is a standard BGI
   colour (that is, not ARGB). The *color* argument is actually redundant.
 
-int *IS_RGB_COLOR*(int color);
+int *IS_RGB_COLOR* (int color);
 : Returns 1 if the *current* drawing colour is ARGB. The *color*
   argument is actually redundant.
 
 int *RED_VALUE* (int color);
 : Returns the red component of an ARGB colour in the ARGB palette.
 
-void *_putpixel* (int x, int y);
+void *\_putpixel* (int x, int y);
 : Plots a point at (*x*, *y*) using the current drawing colour.
 
 void *closewindow* (int id);
@@ -670,14 +670,14 @@
 void *getleftclick* (void);
 : Waits for the left mouse button to be clicked and released.
 
-void getlinebuffer (int y, Uint32 \*linebuffer);
+void *getlinebuffer* (int y, Uint32 \*linebuffer);
 : Copies the *y*-th screen line to *linebuffer*.
 
-int *getmaxwidth (void);
+int *getmaxwidth* (void);
 : Returns the maximum possible height for a new window (actual screen
   height in pixels).
   
-int *getmaxwidth (void);
+int *getmaxwidth* (void);
 : Returns the maximum possible width for a new window (actual screen
   width in pixels).
 
Binary files old/SDL_bgi-2.4.3/doc/sdl_bgi-quickref.pdf and 
new/SDL_bgi-2.4.4/doc/sdl_bgi-quickref.pdf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/doc/sdl_bgi-quickref.tex 
new/SDL_bgi-2.4.4/doc/sdl_bgi-quickref.tex
--- old/SDL_bgi-2.4.3/doc/sdl_bgi-quickref.tex  2021-02-10 13:59:27.000000000 
+0100
+++ new/SDL_bgi-2.4.4/doc/sdl_bgi-quickref.tex  2021-05-04 08:02:11.000000000 
+0200
@@ -1,7 +1,7 @@
 % sdl_bgi-quickref.tex
 %
 % Guido Gonzato, PhD
-% February 12, 2021
+% May 4, 2021
 
 \documentclass[a4paper,12pt]{article}
 \usepackage{graphicx}
@@ -22,7 +22,7 @@
 
 \newcommand{\SDLbgi}{\texttt{SDL\_bgi}}
 
-\newcommand{\version}{2.4.3}        % !!! <<<=== Change here !!!
+\newcommand{\version}{2.4.4}        % !!! <<<=== Change here !!!
 
 \newcommand{\V}{\texttt{void}}      % void
 \newcommand{\I}{\texttt{int}}       % int
@@ -168,7 +168,7 @@
 #include <math.h>    // for sin(), cos()
 #include <string.h>  // for strlen(), memcpy()
 
-#define SDL_BGI_VERSION 2.4.3
+#define SDL_BGI_VERSION 2.4.4
 
 enum { NOPE, YEAH } ;
 #define BGI_WINTITLE_LEN 512 // more than enough
@@ -725,7 +725,7 @@
 \end{bgi}
 
 Retrieves the current graphics mode's aspect ratio. In \SDLbgi,
-\A{xasp} and \A{yasp} are both 10000 (i.e. pixels are squares).
+\A{xasp} and \A{yasp} are both 10000 (i.e. pixels are square).
 
 % -----
 
@@ -1364,7 +1364,8 @@
 \V{} \func{setcolor} (\I{} \A{color});
 \end{bgi}
 
-Sets the current drawing colour in the default palette.
+Sets the current drawing colour in the default palette. If \A{color}
+$>$ \T{MAXCOLORS}, then set \A{color} \% \T{MAXCOLORS}.
 
 % -----
 
@@ -1585,9 +1586,9 @@
 \I{} \func{getch} (\V{});
 \end{bgi}
 
-Waits for a key and returns its ASCII code. In ``slow mode'', a screen
-refresh is performed. If an \T{SDL\_QUIT} event occurs, \T{QUIT} is
-returned.
+Waits for a key and returns its ASCII or key code (i.e.\ \T{KEY\_*}).
+In ``slow mode'', a screen refresh is performed. If an \T{SDL\_QUIT}
+event occurs, \T{QUIT} is returned.
 
 % -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/sdl_bgi.spec 
new/SDL_bgi-2.4.4/sdl_bgi.spec
--- old/SDL_bgi-2.4.3/sdl_bgi.spec      2021-02-24 08:08:02.000000000 +0100
+++ new/SDL_bgi-2.4.4/sdl_bgi.spec      2021-04-28 08:08:10.000000000 +0200
@@ -4,7 +4,7 @@
 
 Summary:       SDL2-based 'GRAPHICS.H' implementation
 Name:          SDL_bgi
-Version:       2.4.3
+Version:       2.4.4
 Release:       1
 License:       ZLib
 Group:         Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/src/SDL_bgi.c 
new/SDL_bgi-2.4.4/src/SDL_bgi.c
--- old/SDL_bgi-2.4.3/src/SDL_bgi.c     2021-02-23 10:55:49.000000000 +0100
+++ new/SDL_bgi-2.4.4/src/SDL_bgi.c     2021-05-04 07:59:10.000000000 +0200
@@ -7,13 +7,13 @@
 // By Guido Gonzato, PhD
 // Automatic refresh patch, CHR font support:
 // Marco Diego Aur??lio Mesquita
-// Latest update: February 24, 2021
+// Latest update: May 4, 2021
 
 // ZLib License
 
 /*
 
-Copyright (c) 2014-2020 Guido Gonzato, PhD
+Copyright (c) 2014-2021 Guido Gonzato, PhD
 
 This software is provided 'as-is', without any express or implied
 warranty. In no event will the authors be held liable for any damages
@@ -536,6 +536,7 @@
 static void line_not         (int, int, int, int);
 static void line_fill        (int, int, int, int);
 static void _floodfill       (int, int, int);
+static void _setcolor        (int);
 
 static void line_fast        (int, int, int, int);
 static void updaterect       (int, int, int, int);
@@ -617,7 +618,7 @@
   /* Now we scan the file until we find 0x1a */
   while (!feof(fp)) {
     char c = fgetc(fp);
-    // TODO: add checks for *alloc
+    // TODO: add checks for *realloc
     fontinfo = (char*)realloc(fontinfo, fontinfolen+1);
     if (c == 0x1a){
       fontinfo[fontinfolen] = '\0';
@@ -1026,7 +1027,7 @@
   else // all other styles
     tmpcolor = bgi_fill_style.color;
 
-  setcolor (tmpcolor);
+  _setcolor (tmpcolor);
   tmpthickness = bgi_line_style.thickness;
   bgi_line_style.thickness = NORM_WIDTH;
 
@@ -1037,7 +1038,7 @@
     for (y = top; y <= bottom; y++)
       line_fill (left, y, right, y);
 
-  setcolor (tmp);
+  _setcolor (tmp);
   bgi_line_style.thickness = tmpthickness;
 
   update ();
@@ -1066,9 +1067,9 @@
   else // all other styles
     tmpcolor = bgi_fill_style.color;
 
-  setcolor (tmpcolor); // fill
+  _setcolor (tmpcolor); // fill
   bar (left, top, right, bottom);
-  setcolor (tmp); // outline
+  _setcolor (tmp); // outline
   if (depth > 0) {
     if (topflag) {
       line_fast (left, top, left + depth, top - depth + 4);
@@ -1539,7 +1540,7 @@
   else // all other styles
     tmpcolor = bgi_fill_style.color;
 
-  setcolor (tmpcolor);
+  _setcolor (tmpcolor);
 
   // find Y maxima
 
@@ -1586,7 +1587,7 @@
 
   } //   for pixelY
 
-  setcolor (tmp);
+  _setcolor (tmp);
   drawpoly (numpoints, polypoints);
 
   update ();
@@ -1767,7 +1768,6 @@
 
 void floodfill (int x, int y, int border)
 {
-
   // Fills an enclosed area with colour.
 
   check_initgraph ();
@@ -1775,7 +1775,6 @@
   unsigned int
     oldcol;
   int
-    found,
     tmp_pattern,
     tmp_color;
 
@@ -1797,30 +1796,39 @@
     _floodfill (x, y, border);
     return;
   }
+  
   else { // fill patterns
+    
     if (bgi_bg_color == oldcol) {
-      // solid fill first...
+      
+      // solid fill first, then pattern fill on top of it
       tmp_pattern = bgi_fill_style.pattern;
       bgi_fill_style.pattern = SOLID_FILL;
       tmp_color = bgi_fill_style.color;
-      // find a suitable temporary fill colour; it must be different
-      // than the border and the background
-      found = SDL_FALSE;
-      while (!found) {
-        bgi_fill_style.color = BLUE + random (WHITE);
-        if (oldcol != bgi_fill_style.color &&
-            border != bgi_fill_style.color)
-          found = SDL_TRUE;
+      
+      // find a suitable temporary fill colour; it must be
+      // different from the border, the background,
+      // and the former fill colour
+      for (int i = BLACK; i < MAXCOLORS + 1; i++) {
+       bgi_fill_style.color = i;
+       if (oldcol != bgi_fill_style.color && 
+           border != bgi_fill_style.color &&
+           tmp_color != bgi_fill_style.color)
+         break;
       }
+      
+      // solid fill...
       _floodfill (x, y, border);
+      
       // ...then pattern fill
       bgi_fill_style.pattern = tmp_pattern;
       bgi_fill_style.color = tmp_color;
       _floodfill (x, y, border);
-    }
+    } // if
     else
       _floodfill (x, y, border);
-  }
+
+  } // else
 
   update ();
 
@@ -3151,7 +3159,7 @@
   for (y = top; y <= bottom; y++)
     line_fast (left, y, right, y);
 
-  setcolor (tmp);
+  _setcolor (tmp);
 
 } // _bar ()
 
@@ -3169,7 +3177,7 @@
 
   tmp = bgi_bg_color;
   bgi_bg_color = bgi_fg_color; // for bar ()
-  setcolor (bgi_bg_color);
+  _setcolor (bgi_bg_color);
 
   // for each of the 8 bytes that make up the font
 
@@ -3488,6 +3496,7 @@
   line_fast (x, y, bgi_last_arc.xend, bgi_last_arc.yend);
 
   angle = (stangle + endangle) / 2;
+  
   // !!! FIXME: what if we're trying to fill an already filled pieslice?
   floodfill (x + (radius * cos (angle * PI_CONV)) / 2,
              y - (radius * sin (angle * PI_CONV)) / 2,
@@ -3786,7 +3795,7 @@
   line_fast (x, y, bgi_last_arc.xend, bgi_last_arc.yend);
 
   tmpcolor = bgi_fg_color;
-  setcolor (bgi_fill_style.color);
+  _setcolor (bgi_fill_style.color);
   angle = (stangle + endangle) / 2;
   // find a point within the sector
   // !!! FIXME: what if we're trying to fill an already filled sector?
@@ -3865,18 +3874,41 @@
 
 // -----
 
+void _setcolor (int col)
+{
+  // Sets the current drawing color using the default palette.
+
+  check_initgraph ();
+
+  // COLOR () set the ARGB_FG_COL colour 
+  if (-1 == col) {
+    bgi_fg_color = ARGB_FG_COL;
+    bgi_argb_palette[ARGB_FG_COL] = bgi_argb_palette[ARGB_TMP_COL];
+  }
+  else {
+    bgi_argb_mode = SDL_FALSE;
+    bgi_fg_color = col;
+  }
+
+} // setcolor ()
+
+// -----
+
 void setcolor (int col)
 {
   // Sets the current drawing color using the default palette.
+  // If 'col' > MAXCOLORS, then use MAXCOLORS % col.
 
   check_initgraph ();
 
-  // COLOR () set the ARGB_FG_COL colour
+  // COLOR () set the ARGB_FG_COL colour 
   if (-1 == col) {
     bgi_fg_color = ARGB_FG_COL;
     bgi_argb_palette[ARGB_FG_COL] = bgi_argb_palette[ARGB_TMP_COL];
   }
   else {
+    if (col > MAXCOLORS)
+      col %= MAXCOLORS;
     bgi_argb_mode = SDL_FALSE;
     bgi_fg_color = col;
   }
@@ -4778,12 +4810,15 @@
     return;
   }
 
+  // TODO: what if width or height exceed the screen 
+  // physical dimensions?
+  
   // take note of window size
   bgi_maxx = width - 1;
   bgi_maxy = height - 1;
 
-  if (SDL_FALSE == bgi_fast_mode) {  // called by initgraph ()
-    if (!width || !height) {         // fullscreen
+  if (SDL_FALSE == bgi_fast_mode) {   // called by initgraph ()
+    if (0 == width || 0 == height) {  // fullscreen
       bgi_maxx = mode.w - 1;
       bgi_maxy = mode.h - 1;
       bgi_window_flags = bgi_window_flags | SDL_WINDOW_FULLSCREEN_DESKTOP;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/src/SDL_bgi.h 
new/SDL_bgi-2.4.4/src/SDL_bgi.h
--- old/SDL_bgi-2.4.3/src/SDL_bgi.h     2021-02-23 10:55:31.000000000 +0100
+++ new/SDL_bgi-2.4.4/src/SDL_bgi.h     2021-05-04 08:00:01.000000000 +0200
@@ -7,14 +7,16 @@
 // By Guido Gonzato, PhD
 // Automatic refresh patch, CHR font support:
 // Marco Diego Aur??lio Mesquita
-// Latest update: February 24, 2021
+// Latest update: May 4, 2021
 
 // ZLib License
 
 /*
 
+Copyright (c) 2014-2021 Guido Gonzato, PhD
+
 This software is provided 'as-is', without any express or implied
-warranty.  In no event will the authors be held liable for any damages
+warranty. In no event will the authors be held liable for any damages
 arising from the use of this software.
 
 Permission is granted to anyone to use this software for any purpose,
@@ -47,7 +49,7 @@
 #include <math.h>    // for sin(), cos()
 #include <string.h>  // for strlen(), memcpy()
 
-#define SDL_BGI_VERSION 2.4.3
+#define SDL_BGI_VERSION 2.4.4
 
 enum { NOPE, YEAH } ;
 #define BGI_WINTITLE_LEN 512 // more than enough
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/test/README.md 
new/SDL_bgi-2.4.4/test/README.md
--- old/SDL_bgi-2.4.3/test/README.md    2021-02-10 13:59:27.000000000 +0100
+++ new/SDL_bgi-2.4.4/test/README.md    2021-04-28 08:01:28.000000000 +0200
@@ -7,9 +7,9 @@
 some features of `SDL_bgi`; type `make` to compile them.
 
 You may want to compile the original `bgidemo.c` program by Borland.
-It's not free software, but it can be downloaded from several sources;
-type `make bgidemo` to download it and compile it. You need the `wget`
-tool in the $PATH.
+It's not free software, so it's not included here. However, it can be
+downloaded from several sources; type `make bgidemo` to download it
+and compile it. You will need the `wget` tool in the $PATH.
 
 `bgidemo` fails to build on MSYS2 because of its wrong `main()`
 declaration; the Makefiles changes `int main()` to `int main(int argc,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SDL_bgi-2.4.3/test/kaleido.c 
new/SDL_bgi-2.4.4/test/kaleido.c
--- old/SDL_bgi-2.4.3/test/kaleido.c    2021-02-10 13:59:27.000000000 +0100
+++ new/SDL_bgi-2.4.4/test/kaleido.c    2021-04-29 13:40:06.000000000 +0200
@@ -82,7 +82,7 @@
   
   srand (time(NULL));
   setwinoptions ("", -1, -1, SDL_WINDOW_FULLSCREEN);
-  initwindow (1024, 768); // fullscreen
+  initwindow (0, 0); // fullscreen
   setbkcolor (BLACK);
   cleardevice ();
   refresh ();

Reply via email to