If size_t is an unsigned type, then 'n - 4' can underflow. Also added documentation back in for PDC_mbstowcs, PDC_mbtowc, PDC_wcstombs.
Bill-Gray
2024-07-23 15:54:45 -0400
Windows can now be allocated and resized to go off the right and bottom edges of the screen, a la ncurses. They still can't go off the left or right edges, though.
Bill-Gray
2024-07-23 15:52:27 -0400
DOSVGA failed on some Watcom compiles due to conflicting definitions of _FP_SEG and _FP_OFF. 'ripoff' now builds correctly on Digital Mars.
Bill-Gray
2024-07-16 15:47:31 -0400
'printw.c' fix to avoid potential buffer overflow issues in DOS Digital Mars builds. Follow-up to commit ddf80d010f.
Bill-Gray
2024-07-15 22:24:32 -0400
'del_test.c' uses snprintf(), which doesn't exist for Digital Mars. However, _snprintf() does; a #define works around the problem.
Bill-Gray
2024-07-15 22:10:29 -0400
WinGUI beeping : Borland Turbo C lacks a '_beginthread()' function, so we can't beep in a separate thread. The program will therefore lock up while beeping is occurring... don't see a way around that.
Bill-Gray
2024-07-15 15:09:35 -0400
'del_test' (test of deleting windows and sub-windows) crashes on many systems; you need getch( ) delays so you can see the exact point of failure. Also, the description of what's happening was not very good.
Bill-Gray
2024-07-15 15:07:52 -0400
PDC_wcstombs() could have a buffer overflow in UTF-8 decoding if we had (say) two or three bytes left in the buffer, and the next character decoded to four bytes. That should never happen for our purposes. If it does, it (a) won't overflow now and (b) will trigger an assertion.
Bill-Gray
2024-06-19 18:50:40 -0400
'show_col.c' now also tests insstr() (see commit 3f8dfa9e065; I tried it with a smaller MAX_WSTR in winsnstr() to verify that overflow was properly handled). Also fixed prototype for main() (see preceding commit 9ce8d3c4ae).
Bill-Gray
2024-06-19 18:18:14 -0400
Locale wasn't properly set in 'testcurs'. Also, we don't need to reset the _entire_ locale, just the parts concerned with character translation.
Bill-Gray
2024-06-19 18:12:53 -0400
winsnstr() handled up to 513 _bytes_ in the input, instead of the more logical/presumably intended 513 'wchar_t's. Handling of arbitrarily long strings is easily handled with a recursive call (can be tested by dropping MAX_WSTR to lower values).
Bill-Gray
2024-06-17 15:25:31 -0400
'WinGUI' : reverting to window being resizable by default, as occurs with SDLn, X11, WinCon, and VT. This addresses issue #300 : rather than change documentation, let's have the behavior be the same between those platforms.
Bill-Gray
2024-06-12 13:59:30 -0400
printw() had buffer overflow issues if the input text was longer than 512 bytes. In such cases, it now allocates a suitably sized buffer. Added a small test program for this purpose.
Bill-Gray
2024-06-12 13:48:08 -0400
DOS 'napping' now rounds to the nearest ~55-ms 'clock tick' (minimum of one tick). The comment in 'kernel.c' said a tick was 50 milliseconds; this error is corrected.
Bill-Gray
2024-06-12 13:38:39 -0400
Documentation updates : HISTORY.md and MANUAL.md updated. Extended README.md for the framebuffer/DRM port to describe possible mechanisms for adding fullwidth characters and an application title bar.
Bill-Gray
2024-05-08 11:15:43 -0400
'test_pan' now demonstrates non-standard box styles (thick, double-lined horizontally and/or vertically, rounded corners) using the standard 'wborder_set()' Curses function. This makes the PDC_set_box_type() function, added in commit ab7bad3981, a totally unnecessary extension (obviously, I didn't realize that at the time). Following commit will remove that extension.
Bill-Gray
2024-05-08 10:27:03 -0400
assert()ing that the moved window will be on-screen wasn't a good idea. Some programs (including 'test_pan') assume they can try moving a window, then check the return value to see if it was actually on screen. assert()ing that the 'win' pointer is non-NULL, however, continues to appear to be a good idea.
Bill-Gray
2024-05-08 10:23:15 -0400
On ncurses 6.2 (and nowhere else of which I'm aware), calling bkgd() with no character component, then getting characters with inch() and outputting them with addch() results in ^@ being emitted (the 0 character value is not remapped to a space). This causes weird artifacts in ozdemo's 'bouncing balls' section. Also, blinking text should only be used in extreme cases (nuclear reactor about to melt down, etc.) Bold text suffices here.
Bill-Gray
2024-05-06 21:35:49 -0400
'focus.c' test program now cleans up memory appropriately. Modified the comment section to point out that the framebuffer and DRM ports could also support define_key() (I have no real plans for doing that on _any_ platform at present, though).
Bill-Gray
2024-04-25 14:52:10 -0400
The 'miscellaneous tests' from the 'tests' directory can now be made, for at least some platforms, with 'make tests'.
Bill-Gray
2024-04-25 14:50:12 -0400
'init_col', 'widetest' demos: clarified some comments. In particular, the former referred occasionally to PDCurses when PDCursesMod or PDCurses* (i.e., both versions) was meant.
Bill-Gray
2024-04-23 17:22:24 -0400
DRM platform : you can now set the PDC_SCREEN environment variable to a desired connector (HDMI, DVI, VGA, etc.) and have the display chosen accordingly.
Bill-Gray
2024-04-23 17:19:54 -0400
Framebuffer/DRM port : when the screen is rotated (see preceding commit), the 'left line' may become a 'top line', the 'top line' a 'left line', etc. Also, the strikeout may be vertical instead of horizontal.
Bill-Gray
2024-04-23 13:23:57 -0400
Hitting Alt-/ in the framebuffer and DRM ports now rotates the screen 90 degrees clockwise. This is in preparation for use of the library on phones, where the orientation may change. (It also helps if you have a monitor set up in portrait mode.)
Bill-Gray
2024-04-23 12:59:16 -0400
Revision of commit 03eb51cefc (fix for issue wmcbrine/PDCurses#138) : we should use SP->lines, not LINES. The former will include ripped-off lines and the SLK line(s), if any.
Bill-Gray
2024-04-13 21:20:03 -0400
VT version of pdckbd.c : refactoring in preparation for adding ncurses extensions define_key(), keybound(), key_defined().
Bill-Gray
2024-03-25 17:13:42 -0400
'testcurs' input test : button == 0 for mouse movements _and_ for wheel events, and must be set to 1 before looking for button modifiers for either sort of event.
Bill-Gray
2024-03-18 12:55:31 -0400
'restart' demo now allows an arbitrary number of restarts and shows what keys have been hit. I wanted to be sure that we didn't lose keyboard input after a restart (we don't, under either ncurses or PDCursesMod).
Bill-Gray
2024-03-18 10:28:03 -0400
'opaque.c' : added compilation commands and set up to free all memory at exit (should register 'no allocations in use' when run under Valgrind)
Bill-Gray
2024-03-18 10:25:09 -0400
Three new test program-lets, for focus events and the define_key() function; make sure Ctrl-C stops the program in noraw() mode and doesn't in raw() mode; and test out various possible issues with deleting windows if they still have undeleted subwindows.
Bill-Gray
2024-03-13 19:41:35 -0400
'test_pan' should only supply a workaround for ceiling_panel() and ground_panel() on PDCurses. PDCursesMod and ncurses already have both functions.
Bill-Gray
2024-03-13 17:14:01 -0400
winsertln(), wdeleteln(), and winsdelln() all now use the PDC_wscrl() code from the preceding commit. This also fixes a bug wherein wdeleteln() went to the bottom of the scroll region (win->_bmarg) instead of the bottom of the window (win->_maxy - 1).
Bill-Gray
2024-03-13 13:37:27 -0400
Made a separate PDC_wscrl() function to scroll a window by 'n' lines between rows 'top' and 'bottom'. This can be used by wscrl(), wdeleteln(), winsertln(), and winsdelln(), avoiding some redundant code. See preceding commit for the test program and following commit for the use of this function elsewhere.
Bill-Gray
2024-03-13 13:32:06 -0400
wsetscrreg() required the cursor to be within the designated scroll region. This appears to no longer be necessary. See wmcbrine/PDCurses#165 (and a couple of commits subsequent to this one.)
Bill-Gray
2024-03-13 13:21:11 -0400
Added is_cbreak(), is_echo(), is_nl(), is_raw() functions to access members of the non-opaque SCREEN struct. These were added to ncurses on 2023 Aug 12. Also added an 'opaque' test program and a new PDC_VERSION_PATCH #define.
Bill-Gray
2024-03-11 16:33:29 -0400
There is some uncertainty as to the meaning of WA_LOW. But whatever it is, it isn't an outlining character or a synonym for WA_UNDERLINE.
Bill-Gray
2024-02-18 18:46:57 -0500
WinGUI : partial reversion of commit cb8c87b287 : text is output with the array of locations explicitly specified. I had thought this was no longer necessary, but some 'monospaced' fonts aren't if bold text is included (and probably italic in some cases). Fixes issue #314.
Bill-Gray
2024-02-18 18:43:45 -0500
Follow-up to commit e69b42cbf5 : five more Makefiles now use the 'centralized' demo-building bits from common/libobjs.mif
Bill-Gray
2024-02-18 10:44:37 -0500
Framebuffer/DRM : with eight-bit graphics, remap 'default' color to zero for the background. (If the foreground is default, it'll get remapped to white automatically.)
Bill-Gray
2024-02-18 10:39:13 -0500
The core PDCursesMod library no longer tries to draw text that would go outside the screen. asserts() added just to make that clear.
Bill-Gray
2024-01-26 15:16:59 -0500
No need for a refresh() just before a getch(). If anything actually got updated, getch() will call refresh(); if nothing got updated, why call refresh()?
Bill-Gray
2024-01-26 15:15:12 -0500