'init_col' test modified to reset the default colors 'the right way', without use of PDC_set_default_colors(). See preceding commit f1786064ee and comments on older commit 4e6653e6fa : PDC_set_default_color() is intended for internal PDCursesMod library use, not for use by applications.
Bill-Gray
2022-09-10 11:10:59 -0400
PDC_set_default_colors() should be an internal function only. It 'sort of' was -- it was only declared in curspriv.h -- but documentation for it was exposed in MANUAL.md, which confused matters. See comments on commit 4e6653e6fa.
Bill-Gray
2022-09-10 10:59:36 -0400
VT platform didn't do a proper check on input of UTF8 text; see issue #243. Brought version date and HISTORY.md up to date.
Bill-Gray
2022-09-08 18:15:14 -0400
The speedup previously embedded in the WinGUI implementation of PDC_check_key( ) really ought to apply at a higher level, where it benefits all platforms. (It does turn out that DOS with the Digital Mars compiler doesn't get much speed benefit from the added trickery; we disable it in that case. Other such cases may eventually turn up... but thus far, it seems to help a _lot_ on other platforms.)
Bill-Gray
2022-09-07 20:38:40 -0400
Some new demos failed on Digital Mars, because that platform lacked snprintf() (as do older MSVCs). Supplied a workaround for those three demos.
Bill-Gray
2022-09-07 20:28:54 -0400
Fix to 'test_pan' bug : if you hide all three panels (by, for example, hitting Tab three times), ceiling_panel( ) will actually be NULL. Quite reasonable, but it means we need to check to make sure we aren't 'moving' or toggling a ceiling panel when there is, in fact, no such thing.
Bill-Gray
2022-09-07 19:09:19 -0400
Much of the DOS 'utility' code (napping, beeping, getting data from/putting into memory, interrupts) is the same between DOS and DOSVGA, and shouldn't be duplicated. Those bits are now all in 'common/dosutil.c'.
Bill-Gray
2022-09-05 13:53:39 -0400
Some 16-bit compilers lack 64-bit integers. Had to modify underlying code for putwin()/getwin() to accommodate this, by doing the bit arithmetic with two 32-bit ints instead of one 64-bit int.
Bill-Gray
2022-09-05 13:50:22 -0400
WinGUI : redundant inclusion of 'stdint.h' (which also doesn't even exist on some compilers). 'inline' functions aren't a thing in Borland C. The functions are not fully prototyped without 'void' being mentioned; func() and func(void) are _not_ synonymous.
Bill-Gray
2022-09-04 23:02:55 -0400
WinGUI : attempting to shut down Curses completely (including delscreen( SP)) failed, because we didn't actually destroy the window. Restarting also failed, because we didn't reset the code to catch the initial spurious window resize.
Bill-Gray
2022-09-04 22:59:59 -0400
WinGUI : Borland C pointed out that we assigned 'button' and 'action' values that were never used. Also, 'wndclass' had larger scope than is really needed.
Bill-Gray
2022-09-04 22:54:32 -0400
Slightly simpler scheme to delete all windows associated with a screen : mark them all as not having parents, and then they can all be deleted. In this particular case, we don't care if we delete a parent before its child; they'll all get deleted anyway.
Bill-Gray
2022-08-28 20:20:18 -0400
Both SDL1 and SDL2 failed to free some memory when a screen is shut down. Among other things, this caused problems if you shut down thoroughly (with delscreen(SP)) and then tried to restart. Doing so now works.
Bill-Gray
2022-08-28 17:20:36 -0400
Follow-up to commit 1e4bcc9676 : Mark Hessling's comments about TTF font locations applies to SDL1 as well as to SDL2. Also, some fixes had been made for font locations on Windows and Apple for SDL2, which had not made their way to SDL1.
Bill-Gray
2022-08-28 14:36:58 -0400
On six platforms (framebuffer, VT, SDL1/2, WinCon, WinGUI), one can specify the library name during a build with LIBNAME=(name) and/or the shared library name with DLLNAME=(name). A result of issue #222.
Bill-Gray
2022-08-26 16:04:35 -0400
Mark Hessling reports that Rocky Linux 9 stores TrueType fonts in a different directory from everyone else. His patch looks in both places, and provides a more informative error message.
Bill-Gray
2022-08-26 10:45:26 -0400
With the DRM version, 'framebuffer' now includes *BSD (maybe *nix) as well as Linux. Also, I'd neglected to properly credit the source of the DRM code.
Bill-Gray
2022-08-24 11:13:37 -0400
Framebuffer version can now be built for Linux framebuffer (what we've had all along) or for DRM = Direct Rendering Manager (works on Linux and *BSD).
Bill-Gray
2022-08-21 19:24:10 -0400
Memory leak fix : VT, WinGUI, the Linux framebuffer port, SDL1, SDL2, and X11 all use the 'common' palette management code in common/pdccolor.c. At exit, they should all call PDC_free_palette(). SDLn and X11 didn't (it was hard to tell, because those platforms leak memory like sieves anyway).
Bill-Gray
2022-08-21 13:39:04 -0400
PDC_free_memory_allocations( ) wasn't totally stupid, but it shouldn't be needed. The specifications say that delscreen( ) 'frees storage associated with the SCREEN data structure', i.e., it really ought to do everything that PDC_free_memory_allocations( ) is doing; there's no need for a PDCursesMod extension.
Bill-Gray
2022-08-20 21:24:04 -0400
(Facepalm) PDC_free_platform_dependent_memory() was completely stupid. We already have PDC_scr_free() for exactly that purpose.
Bill-Gray
2022-08-20 21:16:43 -0400
SDL2 keyboard entry : hitting PadStar, PadSlash, PadPlus, or PadMinus got you * followed by PADSTAR, / followed by PADSLASH, etc. Unfortunately, the first key was indistinguishable from a 'normal' asterisk/slash/etc. The only way to suppress the spurious keystroke I could see was to hold any of the offending four in abeyance for two milliseconds. If at the end of that time, we haven't received a PADx character, we can treat the *-/+ as 'real'. If we do receive a PADx character, we toss the *-/+ one. I think this is an SDL2 bug, and hope it's eventually fixed... but this workaround means PDCursesMod works even with defective SDL2.
Bill-Gray
2022-08-19 15:59:48 -0400
SDL2 key fix, modifying commit 9b86c29aa1 (see issue #234) : we need to suppress _only numeric keypad_ hits. Mark Hessling pointed out that other keys, such as Shift-F(n), were also suppressed.
Bill-Gray
2022-08-19 13:04:33 -0400
VT : force update after cursor moves. As in SDL2 (see commit ea805ec2b1), cursor updates aren't immediately reflected by default on this platform. You gotta do a PDC_doupdate() to make sure it gets to the screen.
Bill-Gray
2022-08-18 17:48:21 -0400
Two static variables in debug.c were marked as 'eventually global or part of the SCREEN struct.' They are now in the SCREEN struct.
Bill-Gray
2022-08-18 11:31:21 -0400
'testcurs' fix: 'screen_pointer' is not used for XCurses, leading to an unused variable warning (which, with -Werror, leads to an error)
Bill-Gray
2022-08-18 11:30:08 -0400
SDL1 fix : as with VT and framebuffer and some others (see commit 7f8d13d112), you can build with UTF8=Y and WIDE=Y will be implied. As for the other builds, UTF8=Y without a WIDE=Y makes no sense anyway.
Bill-Gray
2022-08-18 11:28:44 -0400
Follow-up to previous commit f55e55a0fb : 'ptest' _did_ access panel structure members, even though it doesn't have to (there are functions for that) and it's discouraged; not all panel library implementations will provide those members under those names. (Though admittedly, ncurses does, and maybe most do... but you can't rely on it.)
Bill-Gray
2022-08-18 11:15:46 -0400
PANEL and PANELOBS structures should be opaque. Three variables in 'panel.c' were excessively scoped as global; they really should be (and now are) static. (Actually, they ought to go into SCREEN, and may do so eventually.)
Bill-Gray
2022-08-18 10:59:37 -0400
SDL2 fix : Mark Hessling pointed out that because SDL2 caches changes to the screen in a list of rectangles, the cursor isn't immediately updated as a result of gotoyx() (it is updated that way on other platforms). We now explicitly call the routine to dump those rectangles to the screen.
Bill-Gray
2022-08-16 21:21:15 -0400
In freeing all windows associated with a screen, we now have to check that windows aren't parent windows (see previous commit). We may have to scan the entire list, but we can be sure that at least one window isn't a parent and can therefore be deleted; repeat, and we'll eventually free all the windows.
Bill-Gray
2022-08-14 14:28:50 -0400
Follow-up to preceding commit c643c0da95 : now that delwin() doesn't recursively delete subwindows and simply fails if a window still hase subwindows, delscreen() has to go through the window list, possibly repeatedly, until all windows are freed.
Bill-Gray
2022-08-11 11:46:17 -0400
Decided recursive deletion of subwindows stood an (admittedly small) risk of breaking existing code. delwin() now returns ERR if the window has subwindows, or if it wasn't allocated by PDCursesMod or has already been freed. See discussion at https://lists.gnu.org/archive/html/bug-ncurses/2022-08/msg00006.html .
Bill-Gray
2022-08-11 11:42:34 -0400
The X/Open Curses standard requires that delwin() delete subwindows before deleting the parent, and implicitly requires delscreen() to delete windows associated with a SCREEN. We now do that.
Bill-Gray
2022-08-04 22:45:40 -0400
Moved the 'opaque' bits of SCREEN from color.c to curspriv.h. The 'opaque' struct can be used in the rest of PDCurses internals, and really belongs in curspriv.h.
Bill-Gray
2022-08-03 21:48:20 -0400
Added #pragmas for MSVC compilation of scr_dump.c, to suppress spurious warning messages about 'uninitialised' variables (_use_keypad, etc; MSVC can't see that we check the return value from sscanf() to make sure that all variables are set).
Bill-Gray
2022-08-03 17:02:12 -0400
wingui/pdcscrn.c : minor code cleanup. We had a misaligned section, some variables excessively scoped, and some variables should have been of type const. No changes in actual functionality.
Bill-Gray
2022-08-03 12:49:25 -0400
Moved various static variables into the 'opaque_screen_t' struct, in a way that retains binary compatibility. More items can and should go into that structure.
Bill-Gray
2022-08-02 16:15:10 -0400
Time for a version update. I expect there will be another one quite soon, to include clangen's single-threaded WinGUI changes, but thought it'd be good to have a 'changes to date' (there have been many) version followed by a 'single-threaded WinGUI' version.
v4.3.4
Bill-Gray
2022-07-29 18:03:59 -0400
delwin() checks for NULL pointers before freeing. This enables it to delete partially allocated windows, which simplifies error checking when allocating a new window. This is currently done for PDC_makenew(), but will be used elsewhere in following commits.
Bill-Gray
2022-07-23 10:17:41 -0400
testcurs : use of curTest() instead of simple getch() gives us more opportunities to test out both cursor movement and screen storing/restoring
Bill-Gray
2022-07-19 14:30:47 -0400
A_PROTECT really ought to have lines on all four sides, on those platforms that support such things. I see I wrote 'underlined' in documentation that should have said 'overlined'. Updated PDC_VER_DAY.
Bill-Gray
2022-07-19 14:03:12 -0400
getwin() and putwin() modified to store chtypes in a consistent form on-disk. This fixes the mismatch one can encounter if you save a window with one sort of chtype, then try to read the result in a program compiled with different chtype flags. The window structure is now stored in ASCII. It was in binary form, which wouldn't necessarily port between platforms and compilers.
Bill-Gray
2022-07-19 14:02:07 -0400
Definitely need to check PDC_UTF8 here as well as PDC_WIDE. This may be the only remaining obstacle to clean compilation.
Bill-Gray
2022-07-10 13:30:54 -0400
In wattr_on and attr_on, a non-NULL 'opts' parameter should be treated as a pointer to an integer color pair (an ncurses extension we'd adopted everywhere else, but I'd overlooked it here). Also, suppressing nuisance warnings on some unused parameters.
Bill-Gray
2022-07-09 22:04:09 -0400
CMake expected to see both PDC_WIDE and PDC_FORCE_UTF8 defined. I _think_ this is our remaining obstacle... unfortunately, I don't know much about CMake. It would appear we never actually ran UTF8 builds with CMake/AppVeyor; in the absence of WIDE, they were compiled as 8-bit builds.
Bill-Gray
2022-07-09 22:02:25 -0400
Further issue with SDL2 with MSVC : it, too, had problems finding certain files with PDC_FORCE_UTF8 set and PDC_WIDE left unset. While making this fix, also revised it to be more specific about deleted files in 'clean'.
Bill-Gray
2022-07-09 21:14:33 -0400
SDL2 was _not_ prepared for the UTF=Y with WIDE=N case. Turns out the automated AppVeyor builds use that particular combination.
Bill-Gray
2022-07-09 18:17:30 -0400
Updated history and version number. Made some steps to allowing PDC_FORCE_UTF8 to imply PDC_WIDE, so you don't have to define both on the compile command line.
Bill-Gray
2022-07-09 15:57:21 -0400
Put Windows clipboard file into the 'common' directory, to be shared by WinCon, WinGUI, and Windows builds of VT. Maybe Windows SDL1 builds, too, eventually (should be straightforward to do).
Bill-Gray
2022-07-09 15:51:46 -0400
Internal version of wcwidth() updated from Unicode version 5.0 to 14.0.0. Code revised to use the slightly smaller 16-bit tables generated by uniset.
Bill-Gray
2022-07-09 11:40:02 -0400