summaryrefslogtreecommitdiff
path: root/lib/libcurses
AgeCommit message (Collapse)Author
2021-12-17curses: spell "foreground" correctly in commentsuwe
2021-12-08fix various typos in comments and log messages.andvar
2021-12-03fix various typos in comments, log messages and documentation.andvar
2021-11-22Don't waste time setting the dirty flag multiple times.blymn
2021-11-16Move 'i' into DEBUG only code (now there be three).kre
Hopefully unbreaks !DEBUG builds.
2021-11-16Fix handling of the tab special character.blymn
2021-11-15Fix for PR lib/55433blymn
Correct the behaviour for ins_wstr: * Properly check the string will fit by processing any special characters present when preforming the check. * Simplify the routine by removing code that duplicates the code in _cursesi_addwchar and just call _cursesi_addwchar.
2021-10-19Add a bit more debug.blymn
2021-10-19Fix for PR pkg/55931blymn
Don't move the cursor when getch is called if input is not going to be echoed. Lynx uses the cursor to mark the current selection in a pop-up, previously the cursor was being relocated when getch was called which broke the Lynx item marking.
2021-10-04remove duplicate the article in documentation.andvar
2021-09-07Do not compile in whole fileio.c for LIBHACK.rin
Fix build failure when built as libhack, due to missing fileio.h. IMO, this should be cleaner than generating fileio.h for {get,put}win(3), that are useless for install media.
2021-09-07PR lib/56388rin
For __newwin() and __resizewin(), the line hash was calculated as if HAVE_WCHAR is disabled. Fix this bug by refactoring __hash_line() function, which calculates the line hash by an appropriate method.
2021-09-06Always autogen fileio.h.rin
Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.
2021-09-06Style fixes most for __CTRACE().rin
2021-09-06Unifdef DEBUG for CTRACE().rin
2021-09-06Expand __CTRACE() to __nothing #ifndef DEBUG.rin
Remove most of #ifdef DEBUG around __CTRACE() calls. No binary changes, except for line numbers for assert().
2021-09-06Fix old-style definition: curses_version() --> curses_version(void)rin
2021-09-06Fix old-style definition: use_default_colors() --> use_default_colors(void)rin
2021-08-15libcurses: fix usage of __warn_referencesrillig
Since that macro can expand to an empty token list, it adds its own semicolon as needed. Removing the extra semicolon fixes the lint warnings about empty declarations. These empty declarations are a GCC extension.
2021-08-15This is a mess; always define MB_LEN_MAX so both the regular and libhackchristos
version of curses compiles. Really we should not be defining MB_LEN_MAX here, and include <limits.h> in curses_private.h to get it.
2021-08-15need limits.hchristos
2021-08-15Use MBL_LEN_MAX (constant) so that SSP workschristos
2021-08-03curses: clarify standout as the "best" _supported_ highlighting modenia
of the current terminal
2021-08-02curses: clarify documentation regarding the standout attributenia
2021-07-26The BUGS sections is incorrect again for "modern" terminals.nia
For example, wscons and xterm both display standout differently to bold.
2021-06-27Fix PR lib/55931blymn
Only reset outcol if we actually emit a \n as cursor_down may not may not put the cursor at the start of the next line.
2021-06-27Fix SSP buildchristos
2021-06-24Fix printf format for size_tmartin
2021-06-24Make sure we don't use wide char routines when DISABLE_WCHAR is inblymn
effect.
2021-06-22Rework the fix for lib/56224.blymn
Move the scroll check to _cursesi_addwchar Perform the scroll check before updating the cursor location when processing \n.
2021-06-22Fix how the slk are drawn by making sure we use ins_wchar in theblymn
bottom left of the screen to avoid a scroll because this may cause an ERR if scrollok is false.
2021-06-22Fix the debug output to stop spamming out the aline for row 0, weblymn
may not be working on that row so the output is pointless.
2021-06-15Correct a previous fix for PR lib/56224.blymn
Use wdwitch to determine the width of a wide character on the screen not the number from mbrtowc which is the number of bytes in the character. Thanks to Michael Forney for spotting this.
2021-06-10Add missing newline to debug trace messagemcf
ok blymn@
2021-06-06Fix for PR lib/56224blymn
Correct addstr behaviour so it truncates the string in the case where a string is added on the bottom line of a window where scrolling is disabled as per the SUSv2 specification.
2021-06-01Fix initial line hash calculation for subwindowsmcf
lp->hash is not initialized at this point. Since the hash is calculated in chunks using __hash_more(), it needs to be initialized to 0 first (just as in doupdate()). Detected with valgrind while running python's test suite when debugging an unrelated issue. ok uwe@
2021-05-29wresize: don't bound pads to the size of the screennia
allows avoiding a workaround in aiomixer, ok blymn uwe
2021-05-15__newwin - fix BGWCOL initialization.uwe
From Michael Forney in PR lib/56174
2021-05-08avoid accessing stack garbage.mrg
on arm64eb resuming vi(1) would often crash. in makech(), the 'csp' variable is either set to current window data, or a local stack variable's address '&blank'. the window data has many lines of info stored, and 'csp++' is used per line here. unfortunately, a case existed where 'csp++' operated on csp initialised from '&blank' which eventually crashes when, on my display with 160 columns and 'csp + 155' exceeds the mapped stack and crashes. match the '!_cursesi_screen->curwin' conditional that initialises csp, and avoid csp++ here. assert() that csp != &blank in both places that modify csp. thanks to jdc@ and mlelstv@. XXX: possibly also should avoid the putch() here as well.
2021-02-13libcurses: fix wrong tab width for addchrillig
In sysinst, the installation screen is indented with tabs. Sysinst uses msgc, which brings its own text layout engine. This engine does not use addbytes but addch. In addch, the x position for each tab was advanced twice as much as needed. The menu items were thus not indented by 8 spaces but by 16, which caused an ugly line break in the German translation. This bug largely went unnoticed because most other applications use addbytes instead, which worked fine all the time. It had been introduced somewhere between NetBSD 8.0 and NetBSD 9.0. The code around this bug used aliased variables for win->curx and win->cury a lot. Getting this right is difficult and needs a thorough test suite. Even though libcurses has 201 tests, that is not nearly enough to cover all the relations between the various functions in libcurses that call each other, crossing API boundaries from internal to external, doing character conversions on the way and juggling around 4 different types of characters (char, wchar_t, chtype, cchar_t). The simplest fix was to remove all this aliasing, while keeping the API the same. If _cursesi_waddbytes is not considered part of the API, it would be possible to replace px with win->curx in all places, same for py and win->cury. The complicated code with the aliasing may have been meant for performance reasons, but it's hard to see any advantage if both points of truth need to be synchronized all the time. Libcurses can be built in 2 modes: with wide character support or without (-DDISABLE_WCHAR). The test suite only covers the variant with wide characters. The single-byte variant has to be tested manually. Running sysinst with the single-byte libcurses produces the correct layout.
2021-02-13curses.h: proofread, indent a bit more consistentlyrillig
2021-02-07curses_screen.3: fix typorillig
2021-02-06libcurses: fix spelling in commentrillig
2021-02-06libncurses: fix grammar in manual pagerillig
2020-07-14newwin - fix crash with negative ncols.uwe
When support for negative nrows/ncols was added, one s/ncols/maxx/ was missed so we ended up passing negative (i.e. huge unsigned) length when hashing the line contents. Reported by Naman Jain in PR lib/55484
2020-07-06Pads are not to be automatically refreshed on input.uwe
X/Open Curses says in the documentation for newpad(): Automatic refreshes of pads (e.g., from scrolling or echoing of input) do not occur. And in the documentation for get*(): If the current or specified window is not a pad, and it has been moved or modified since the last refresh operation, then it will be refreshed before another character is read. From Michael Forney in PR lib/55457
2020-07-06mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.uwe
From Naman Jain in PR lib/55460.
2020-07-03wtouchln - verify/clip input parametersuwe
From Naman Jain in PR lib/55454
2020-07-02setcchar - don't lose combining marks to a typo.uwe
We copy len wchars but set the length field to 1, instead of len. From Naman Jain in PR lib/55443
2020-07-01hline, vline - don't lose attributes when using default character.uwe
Make default (wide) and non-wide behavior match. If the character argument has (only) attributes set, use them with the default line character. In the wide case don't do the fallback in hline - it just calls hline_set that needs to do it anyway. Fix the latter to check the wcwidth of the right character and avoid division by zero.