| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Hopefully unbreaks !DEBUG builds.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
Bump CURSES_LIB_MAJOR.CURSES_LIB_MINOR to 9.0 belatedly.
|
|
|
|
|
|
Remove most of #ifdef DEBUG around __CTRACE() calls.
No binary changes, except for line numbers for assert().
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
of the current terminal
|
|
|
|
For example, wscons and xterm both display standout differently to bold.
|
|
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.
|
|
|
|
|
|
effect.
|
|
Move the scroll check to _cursesi_addwchar
Perform the scroll check before updating the cursor location when
processing \n.
|
|
bottom left of the screen to avoid a scroll because this may cause
an ERR if scrollok is false.
|
|
may not be working on that row so the output is pointless.
|
|
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.
|
|
ok blymn@
|
|
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.
|
|
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@
|
|
allows avoiding a workaround in aiomixer,
ok blymn uwe
|
|
From Michael Forney in PR lib/56174
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
From Naman Jain in PR lib/55460.
|
|
From Naman Jain in PR lib/55454
|
|
We copy len wchars but set the length field to 1, instead of len.
From Naman Jain in PR lib/55443
|
|
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.
|