You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PDCursesMod/pdcurses
Bill-Gray 6306ac2d48
getch() triggered an assert() if a multi-byte character was entered.
Fixes issue #335,  reported by Robin Haberkorn.

Previous versions of PDC_wcstombs(),  when compiled with PDC_FORCE_UTF8,
did minimal error-checking for buffer overflow.  Fixing this revealed
that getch() mis-used the function,  assuming that the last argument
was a count of wide characters input (of which there would be one),
rather than an output buffer size (which would be eight bytes).
4 months ago
..
README.md All READMEs "converted" to markdown (only trivial changes). 10 years ago
addch.c Update wide/zero-character width tables from Unicode 15.1.0 to 16.0.0 11 months ago
addchstr.c 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. 2 years ago
addstr.c 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. 2 years ago
attr.c Log statement said we'd entered attr_get() when we'd really entered attr_set() (one-byte change). 1 year ago
beep.c 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. 2 years ago
bkgd.c 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. 2 years ago
border.c As described in previous commit 099fa2876c, the PDC_set_box_type() extension was unnecessary and is removed. 1 year ago
clear.c 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. 2 years ago
color.c Moved a couple more screen-related externals (_default_foreground_idx, _default_background_idx) into the SCREEN structure, where they properly belong. Follow-up to preceding commit a60b63df74. 6 months ago
debug.c 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. 2 years ago
delch.c 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. 2 years ago
deleteln.c 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). 2 years ago
getch.c getch() triggered an assert() if a multi-byte character was entered. 4 months ago
getstr.c 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. 2 years ago
getyx.c 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. 2 years ago
inch.c 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. 2 years ago
inchstr.c 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. 2 years ago
initscr.c 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. 1 year ago
inopts.c 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. 2 years ago
insch.c Added assert()s to check various input parameters to core functions 1 year ago
insstr.c 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). 1 year ago
instr.c 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. 2 years ago
kernel.c 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. 1 year ago
keyname.c Raised KEY_MAX to allow for possible expansion of the list of predefined 'special' keys 2 years ago
mouse.c 'mouse.c' : if we're trapping the PDCurses*-specific BUTTONn_MOVED events, these are reflected in the ncurses-style 'bstate' bitmask as 'REPORT_MOUSE_POSITION'. 6 months ago
move.c Fixes to allow -Wextra without causing nuisance warnings to occur. Almost entirely unused parameter suppression. 5 years ago
outopts.c 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.) 2 years ago
overlay.c (Mostly) pulled the _firstch/_lastch handling out into separate functions. There was a lot of redundant code here; this is cleaner and, I hope, will lead the way to 'dirty' cells being addressed in a bitmap, rather than by the firstch/lastch approach. 4 years ago
pad.c Tightened some assert() statements. 2 years ago
pairs.txt Added a hash table to speed up find_pair(), alloc_pair(), free_pair(). Updated 'pairs.txt' to explain the added complications (which are, admittedly, getting pretty complicated). 4 years ago
panel.c make panel_hidden portable, prepare for release 9 months ago
printw.c 'printw.c' fix to avoid potential buffer overflow issues in DOS Digital Mars builds. Follow-up to commit ddf80d010f. 1 year ago
refresh.c Tightened some assert() statements. 2 years ago
scanw.c 'scroll.c', 'scanw.c' copied from wmcbrine. Only changes are in 'man' section : reformatting, updated portability info. 6 years ago
scr_dump.c 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. 3 years ago
scroll.c 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. 2 years ago
slk.c Several minor fixes to comments, and one bit of code re-arrangement for better readability 2 years ago
termattr.c 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. 2 years ago
terminfo.c 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. 2 years ago
touch.c Added assert()s to check various input parameters to core functions 1 year ago
util.c Array bound checking should be done _before_ checking for null terminators. Similar issue as in commit c03e650a7020c8c2945d74fb4ecf25; in both cases, Valgrind will complain about the access of an element just past the end of the valid array. 9 months ago
window.c Made PDC_realloc_array() non-static. There are various places within PDCursesMod where it could, or should, be used. 6 months ago

README.md

PDCurses Portable Core

This directory contains core PDCurses source code files common to all platforms.

Building

These modules are built by the platform-specific makefiles, in the platform directories.

Distribution Status

The files in this directory are released to the Public Domain.

Acknowledgements

The panel library was originally provided by Warren Tucker wht@n4hgf.mt-park.ga.us