DRM port : finding 'drm.h' reliably appears to be an iffy prospect at best. So I'm just setting the include path to have both candidate directories.
Bill-Gray
2024-01-26 15:10:06 -0500
If PDC_millisecs() is used outside the library (happens in some of the 'test' code), it should be declared as PDCEX.
Bill-Gray
2024-01-26 15:08:58 -0500
Framebuffer port : resize on first loading a font, even if the screen size hasn't changed (it is, after all, still a new font and a redraw should occur)
Bill-Gray
2024-01-26 15:05:32 -0500
Use the 'proper' feature test macros to determine if clock_gettime() and/or gettimeofday() are available; use ftime() if neither is available. This should evade a warning on some platforms; see issue #311.
Bill-Gray
2023-12-16 19:11:06 -0500
Very unlikely edge case : PDC_millisecs( ) can roll over, causing blinking to stop. Generally speaking, PDC_millisecs( ) should alway be used relative to another call to PDC_millisecs( ).
Bill-Gray
2023-12-16 15:51:33 -0500
Comment changes only. In some places, 'PDCurses' was used to refer to PDCursesMod-specific features; you could reasonably have thought that the features in question were part of PDCurses, but they weren't. I haven't fixed everything yet.
Bill-Gray
2023-12-16 15:40:56 -0500
Extended commit a4e563d763, adding double- and triple-clicks for SDL2 and GL, to SDL1. The logic is almost exactly the same, except that SDL1 lacks SDL_WaitEventTimeout(); fortunately, it was easy to implement that function. See issue #309.
Bill-Gray
2023-11-16 20:24:00 -0500
'panel.c' : the code to check overlapping panels really should be code to check overlapping _windows_; this may allow re-use of that function. This also enabled the code to be slightly cleaner.
Bill-Gray
2023-11-16 20:12:24 -0500
Several curses functions can be either macros or functions. For these, the function parameter can (and arguably should) be of type const where possible.
Bill-Gray
2023-10-15 22:01:00 -0400
Test for overlapping panels was needlessly complex. Also, the only part of the panel used is the window, and having code to detect overlapping windows may be of general utility.
Bill-Gray
2023-10-15 19:42:39 -0400
Ripped-off lines are allocated a little more sensibly (I'm keeping in mind that we may have multiple screens eventually...) Updated history and version constants.
Bill-Gray
2023-10-13 16:34:48 -0400
f8aa267b31Added variable pdc_window_title which can be used to set the title of the SDL window for SDL2 and GL builds
Lyle-Tafoya
2023-10-11 16:58:44 -0700
SDL2 Makefile had a recursive definition of CC and PREFIX (issue #302). Also revised the GL Makefile to resemble the SDL2 one a little more closely. Still some work to be done there...
Bill-Gray
2023-10-10 20:19:39 -0400
Updated version constants, with a workaround for the August/September issue described for commit 23bf302975. We do still have to avoid 08 and 09 for PDC_VER_DAY, but that shouldn't be difficult.
Bill-Gray
2023-08-28 13:21:05 -0400
Backdated PDC_VER_MONTH and PDC_VER_DAY. Sadly, PDC_VER_MONTH = 08 is interpreted as a malformed octal constant. I'll have to figure out a way around this, or else August and September will always be problems. But for the nonce, I'm just backdating.
Bill-Gray
2023-08-11 12:23:06 -0400
Now that SCREEN is opaque, we don't need the separate _opaque_screen_t structure. Moving its elements directly into the SCREEN struct makes the code much cleaner. It doesn't affect how anything actually works.
Bill-Gray
2023-08-10 22:32:53 -0400
Mostly very pedantic fixes to ensure that WA_ macros are used for attributes, and eliminating some non-standard use of A_LEFTLINE, etc. Should have no actual effect on how the code works.
Bill-Gray
2023-07-27 20:37:23 -0400
'color.c' : code to refresh line attributes after a color change was quite wrong. The (academic for PDCurses*) difference between WA_ and A_ attributes wasn't handled properly. The documentation didn't mention all of the line attributes affected by PDC_set_line_color().
Bill-Gray
2023-07-27 11:27:45 -0400
'newtest.c' and 'testcurs.c' demos : both programs used WA_ and A_ macros somewhat indiscriminately. This works on ncurses, PDCurses, and PDCursesMod, where chtype == attr_t. But it's not safe behavior. Also removed some references to obsolete/renamed attributes (WA_RIGHTLINE is now WA_RIGHT, etc.)
Bill-Gray
2023-07-25 13:44:08 -0400
WA_* macros are now distinct in (default) 64-bit chtype/attr_t builds, bringing us into conformance with X/Open. Clarified a bit as to which attributes are 'standard' and which are PDCurses, ncurses, or PDCursesMod extensions. Marked A_LEFTLINE, A_RIGHTLINE, A_OVERLINE as obsolete/not portable. Changed endwin_ macros to ensure you can't accidentally link 4.3.n code to a 4.4.0 library, or vice versa.
Bill-Gray
2023-07-25 13:36:14 -0400
Made the SCREEN structure innards private, and made SP internal to the PDCursesMod library. This breaks the binary API, so we are also going from version 4.3.7 to 4.4.0.
Bill-Gray
2023-07-23 12:49:11 -0400
Changed 'palette_size' to '_palette_size' to fix a (correct) warning about a shadowed variable when compiling sdl2/pdcscrn.c with MSVC
Bill-Gray
2023-07-23 11:58:56 -0400
VT platform in Windows : the console output is locale-dependent. So demos now set the UTF-8 locale. SetConsoleOutputCP( 65001); is supposed to force UTF-8 output, though only for fixed-pitch Unicode fonts, but actually doesn't even do that... it appears Windows provides no programmatic way to say 'use this Unicode glyph on the console'.
Bill-Gray
2023-07-15 12:35:14 -0400
VT in Windows : we can get the screen size via GetConsoleScreenBufferInfo(). Thus far, this is only used at startup to detect the initial screen size, but at least in theory, we could use it to detect resizing.
Bill-Gray
2023-07-15 12:18:50 -0400
'touch' functions : some assert()s and checks for error conditions were wrong or insufficient or both. touchoverlap() un-touched parts of the window that didn't overlap (see wmcbrine/PDCurses#149).
Bill-Gray
2023-07-12 11:03:28 -0400
'picsview' : MSVC warned that an integer was implicitly cast to a short. Setting a color beyond 32K with attr_set() can't be done, unless you rely on ncurses/PDCurses extended use of the 'opt' parameter. We're better off just using attrset(), which can handle integer colors past 32K.
Bill-Gray
2023-07-12 09:44:27 -0400
'panels' library almost completely rewritten. The new version is _much_ better at figuring out which parts of the screen need to be updated, aided in part by a new PDC_touched_range() function to determine which parts of a window have changed. The panels are stored in a circularly-linked list, of which the stdscr pseudo panel is always a member, so edge cases are mostly eliminated. Panel overlap is computed in a less confusing manner.
Bill-Gray
2023-07-11 20:36:07 -0400
'widetest' now shows the expanded version of all characters in the combining character line, instead of stopping about halfway through.
Bill-Gray
2023-07-11 12:55:48 -0400
PDC_transform_line_sliced() ensures that PDC_transform_line() is fed manageable packets, and that packets are split after fullwidth and combining characters. This avoids some mis-alignment issues, and should make support for fullwidth and combining characters simpler for WinCon, SDLn, DOSVGA, and the framebuffer ports.
Bill-Gray
2023-07-11 11:43:21 -0400
Correction to commit c03e650a70. I left in the (now-deleted) line, which was redundant _and_ meant you could still access an out-of-bounds element.
Bill-Gray
2023-07-10 11:37:38 -0400
'widetest' modified to verify that both precomposed and combining characters can be copied with getcchar() and setcchar().
Bill-Gray
2023-07-06 08:13:04 -0400
reset_color_pairs() reset everything in the 'opaque' screen structure to zero. In the process, the 'window_list' was zeroed, meaning that delscreen() wouldn't delete them, resulting in a (small) memory leak.
Bill-Gray
2023-07-05 12:43:33 -0400
Follow-up to commit e8bc5415b6 : Xinitscr() doesn't allow one to delete the screen after use. At some point, I'll need to figure out a workaround for this; it may result in Xinitscr() being deprecated.
Bill-Gray
2023-07-05 10:58:54 -0400
Demos modified to delscreen() the pointer returned by newterm(). This is more portable than using delscreen(SP). For example, it'll work with ncurses. (Generally speaking, programs shouldn't use SP, ever. It may vanish in future version of PDCursesMod, and maybe even in PDCurses.)
Bill-Gray
2023-07-03 23:01:16 -0400
Fix to bug in panel library (see issue #252). If a panel didn't overlap any other panel, it wouldn't be checked against the pseudo-panel for stdscr. If it _did_ overlap/was overlapped by N panels, it would be checked against that pseudo-panel N times, causing an admittedly unmeasurably tiny performance impact.
Bill-Gray
2023-06-25 16:52:12 -0400
'panel' library changed to use the WINDOW struct's dimensions, instead of duplicating them within the PANEL struct. This both simplifies the code and avoids a bug when the main screen is resized, either programmatically or by the user.
Bill-Gray
2023-06-24 17:37:29 -0400
The 'resize' test in testcurs failed for SDL2 and GL. The window would only flash at the resized dimensions, then flash back to the original size. It turned out that we get spurious resizing events, causing testcurs to receive an (unneeded) KEY_RESIZE.
Bill-Gray
2023-06-15 23:12:54 -0400
'picsview', 'mbrot' demos now work with ncurses. The locale needed to be set, and attr_set() used instead of attrset(). Unnecessary distinctions between PDCurses* and ncurses removed.
Bill-Gray
2023-06-12 14:15:06 -0400
Removed duplicate is_leaveok() definition, and made use of that function in the getsyx() macro. I think the latter is the only change required to enable an 'opaque' WINDOW structure.
Bill-Gray
2023-06-11 11:57:29 -0400
'terminfo.o' was not included in the DOSVGA Makefile, nor in the WinCon Microsoft(R) makefile. The WinCon Digital Mars makefile said 'term.obj' where it should have said 'terminfo.obj'. Found after a careful check of the reversion of commit 22c4d82f8c, which was done in commits d5d2d8a857, 248146021e and ab1c007273.
Bill-Gray
2023-06-10 22:18:27 -0400
realloc( ptr, 0); is equivalent to free( ptr); and returns NULL on most systems... but not FreeBSD, and isn't guaranteed by the C standards. This caused an assertion to trigger during endwin() on FreeBSD.
Bill-Gray
2023-06-07 13:09:09 -0400
Now using ncurses-6.4 instead of 6.3. Added #define HAVE_s for some capabilities (probably others should be added).
Bill-Gray
2023-06-04 17:46:26 -0400
3113ea90cfAdd multithreading option to gl port
Julius Ikkala
2023-06-03 16:24:28 +0300