Commit Graph

  • acd143144f
    '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
  • f1786064ee
    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
  • 26aedbea2b
    fix LIBNAME on vt Simon Sobisch 2022-09-09 00:55:36 +0200
  • 8cf769f414
    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
  • 6612df5af6
    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
  • e798d30e63
    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
  • 1850d80200
    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
  • 4781b742b5
    Digital Mars C makefiles updated for five platforms, to add newer demos Bill-Gray 2022-09-07 19:06:14 -0400
  • 3abed767ff
    Partial HISTORY.md update Bill-Gray 2022-09-05 22:40:27 -0400
  • 55925c1880
    HAVE_NO_INFOEX makes no sense for the SDL2 port (it's a WinCon thing) Bill-Gray 2022-09-05 22:13:14 -0400
  • e39528f9e8
    Digital Mars has a different #define for uint64_t Bill-Gray 2022-09-05 21:24:13 -0400
  • 7d3920be2a
    Some variables got renamed, and DOSVGA hadn't caught up Bill-Gray 2022-09-05 21:23:26 -0400
  • fd4f614edb
    delwin() : if we're deleting a window that was only partially allocated, it won't be in the window list Bill-Gray 2022-09-05 21:04:37 -0400
  • 5efbea3676
    Digital Mars lacks snprintf(). We fall back on sprintf() in such cases. Bill-Gray 2022-09-05 21:03:20 -0400
  • 5b42ec6770
    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
  • aba598f492
    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
  • 5583806675
    common/pdccolor.c : handling of stdint.h or its absence was redundant. It's done in 'curspriv.h'. Bill-Gray 2022-09-04 23:11:14 -0400
  • 6af91c0f1f
    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
  • 5219e19bad
    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
  • 865b515e83
    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
  • 80df8a79e9
    Bumped up PDC_VER_DAY and strengthened the warnings on direct use of WINDOW and SCREEN structure elements Bill-Gray 2022-09-04 14:35:15 -0400
  • 778d9526cd
    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
  • c62edf7752
    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
  • 9cf041e835
    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
  • 0978ff32e0
    Minor clean-up for SDL2's pdcscrn.c (no functionality changes) Bill-Gray 2022-08-28 14:27:11 -0400
  • 44e5aa323e
    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
  • 1e4bcc9676
    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
  • 8e40bd29dc
    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
  • 9217087c4e
    'testcurs' title centered. Bill-Gray 2022-08-23 13:50:25 -0400
  • 2b5f0036fe
    VT and framebuffer makefiles modified to also work on FreeBSD Bill-Gray 2022-08-23 13:44:01 -0400
  • 31a367f487
    Update framebuffer README.md Bill Gray 2022-08-21 19:34:03 -0400
  • e9bc09c083
    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
  • 4683fdb9a7
    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
  • cdb4619036
    HISTORY.md revised to reflect reversions of my most recent mistakes. Bill-Gray 2022-08-20 21:30:41 -0400
  • 7f9632af60
    'speed' revised to use a more logical (and more generally useful) millisecond timer function. Bill-Gray 2022-08-20 21:29:41 -0400
  • 0223039ec0
    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
  • 60138ca8ec
    (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
  • 150a9f27ee
    PANELOBS really ought to be completely private to 'panel.c'. Bill-Gray 2022-08-20 13:44:56 -0400
  • d87b7bd917
    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
  • 8a41f2ed57
    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
  • 471db1b2d2
    Updated PDC_VER_DAY and history. Bill-Gray 2022-08-18 17:55:59 -0400
  • 18abe3dbd5
    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
  • 13d85855c6
    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
  • 2651cba592
    '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
  • 0b6c44a1f6
    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
  • 78039d10c3
    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
  • f55e55a0fb
    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
  • b56b3af5dd
    Documentation fixes for ncurses_tests. We're using ncurses-6.3 now, not 6.1, it's PDCursesMod now, etc. Bill-Gray 2022-08-18 10:41:42 -0400
  • 62eb1c1444
    ncurses_tests now includes 'test_delwin'. This arose from a bugs-ncurses discussion (https://lists.gnu.org/archive/html/bug-ncurses/2022-08/msg00006.html) about how delwin() should respond to attempts to delete parent windows. See commits af54b22837, c643c0da95, 3b14813dbb. Bill-Gray 2022-08-18 10:40:17 -0400
  • ea805ec2b1
    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
  • af54b22837
    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
  • 4a65564105
    In debug mode, attempting to delete a parent window will trigger an assert Bill-Gray 2022-08-14 14:26:57 -0400
  • e3e8a5df37
    Declared 'int i' after PDC_LOG, which failed on C89-compliant compiles (OpenWATCOM on some platforms) Bill-Gray 2022-08-11 17:06:04 -0400
  • 26e473c60b
    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
  • c643c0da95
    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
  • 3b14813dbb
    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
  • dedaa02e44
    Some internal library cross-module functions had man entries. They shouldn't. Bill-Gray 2022-08-04 21:00:03 -0400
  • 7449df5369
    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
  • 244a2871d8
    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
  • 40e7ef5696
    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
  • ea7b01edf3
    'widetest' and 'init_col' demos now free all memory before exiting. Bill-Gray 2022-08-02 17:57:39 -0400
  • 629029a6a2
    No need for a separate PDC_free_pair_hash_table() function anymore. It just adds confusion. Bill-Gray 2022-08-02 17:52:59 -0400
  • 3e167172ff
    Moved hash table variables for color pairs into the 'opaque_screen_t' struct Bill-Gray 2022-08-02 17:42:11 -0400
  • 0d5e4dc5b4
    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
  • 6f5e8fb85e
    WinGUI modified to make PDC_check_key() much, much faster Bill-Gray 2022-08-01 15:30:43 -0400
  • e903bcee97
    Used a 'magic number' which, worse yet, wasn't even the _correct_ magic number Bill-Gray 2022-08-01 15:29:25 -0400
  • 6962ab6e9d
    Merge pull request #240 from clangen/clangen/upstream-master-plus-fixes Bill Gray 2022-07-29 22:11:20 -0400
  • 3cc99c12c6
    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
  • 3f656b8746
    Documentation cleanup. Three essentially internal functions were exposed in the manual. Bill-Gray 2022-07-29 15:52:52 -0400
  • 68efc9b95a
    'scr_dump.c' : MSVC warned (not entirely unreasonably) about implicit casting of ints to booleans Bill-Gray 2022-07-29 15:50:27 -0400
  • fb8e99033d Minor cleanup to `adjust_font_size` casey langen 2022-07-28 19:25:41 -0700
  • a35aa1b750 More compile error fixes. casey langen 2022-07-25 18:59:20 -0700
  • 60d16f9584 More HandlePaint() cleanups. casey langen 2022-07-25 18:56:00 -0700
  • 900b42e054 Update back_buffer code style and hopefully fix compiles against non-microsoft compilers. casey langen 2022-07-25 17:31:23 -0700
  • 2be5a26534 Three important changes: casey langen 2022-07-24 16:10:56 -0700
  • 26d39f49ef Fix mouse handling code, add internal resize handler. casey langen 2022-07-24 15:05:36 -0700
  • 451b2137f2 Fix background painting artifacts during resize. casey langen 2022-07-24 14:23:31 -0700
  • 25ead98339 Revert "wingui: Move window procedure to separate thread to fix resize/move" casey langen 2022-07-24 12:40:44 -0700
  • c9f678c602
    PDC_COLOR_PAIRS is obsolete Bill-Gray 2022-07-24 07:45:43 -0400
  • 36bef1d631
    Further (quite minor) simplifications from previous commit 59d35a216 allowing deletion of partially allocated windows. Added explanatory comments for getwin()/putwin() implementation. Bill-Gray 2022-07-24 07:42:39 -0400
  • 59d35a2168
    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
  • d3540b3b4d
    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
  • ec51366cb9
    HISTORY.md updated to mention putwin()/getwin() changes, wattr_on()/attr_on() making use of 'opts', CMake fixes Bill-Gray 2022-07-19 14:19:02 -0400
  • f7e7e46737
    MANUAL.md : minor corrections/clarifications Bill-Gray 2022-07-19 14:17:12 -0400
  • cb1b892962
    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
  • 6824e49bab
    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
  • 98e3f56580
    'testcurs' modified to test scr_dump() and scr_restore(). Needed to test out the next commit (q.v.). Bill-Gray 2022-07-19 13:50:40 -0400
  • 2259f29d5f
    'test_pan' should use the new PDC_free_memory_allocations( ) function Bill-Gray 2022-07-10 22:46:28 -0400
  • f6b73892c3
    Further CMake : crucial dependencies omitted for SDL2 when building UTF8=Y, WIDE=N Bill-Gray 2022-07-10 14:31:15 -0400
  • 99e90f20c5
    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
  • 797f688dd4
    It's PDC_FORCE_UTF8 for make and nmake, but PDC_UTF8 for CMake. Bill-Gray 2022-07-09 23:23:37 -0400
  • 23374b894b
    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
  • 6071d7480f
    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
  • a11b1d2e2f
    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
  • 25c77f4ac3
    WinGUI also didn't handle the PDC_FORCE_UTF=Y PDC_WIDE=N case. Think I've got it now... Bill-Gray 2022-07-09 18:32:54 -0400
  • aa30945ee8
    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
  • 6b4f862a85
    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
  • 02d55b890e
    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
  • 68b38102bc
    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
  • 71ed6713e8
    Updated HISTORY.md for recent changes, and added PDC_free_memory_allocations() to MANUAL.md Bill-Gray 2022-07-07 14:48:58 -0400