make pancurses
work with ncurses
6.0.1
#93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
but first,ncurses-rs
needs the changes in this PR : jeaye/ncurses-rs#220 (but the below were tested only with PR jeaye/ncurses-rs#218 which is a superset PR which handles more error cases/warnings and overall improves build, I'll have to retest depending on which PR, if ever, gets merged)this got in jeaye/ncurses-rs#220 as v6.0.1 (already on
crates.io
), so I'm testing with this version.Note:
KEY_EVENT
went away, though it wasn't used anywhere inpancurses
.Closes #92
cargo test
cargo run --example
...cargo run --example newtest
, has text under the color box, was it the same with v5 ? yes, it was, overlayed the screens look identical on v5 and on v6 now.cargo run --example newtest
only shows the correct text in the other languages on NixOS, this appears to be due toncursesw
being selected there bypkg-config
for some reason, not on Fedora/Gentoo which selectncurses
- and I didn't force with any features likewide
(if I do, it works on those 2 also: ie.cargo run --example newtest --features wide
)mvprintw
andprintw
bypancurses
were using formatting before, since they can't anymore in v6. Ok, it wasn't possible to use formatting before, due to no extra args could've been supplied to fulfill the requested formatting; this got fixed inncurses-rs
so that the unformatted string that was used(as the only arg) won't segfault anymore if%
was in it.cargo test
wide
show_menu
disable_resize
Legend:
The above are checked to be true on:
PKG_CONFIG_PATH
is set to the dir containingncurses.pc
file)--all-features
because thenwin32
andwin32a
will both be used and fail compilation)TERM=xterm-256color
but are broken withTERM=xterm
, via ssh usingalacritty
terminal (freebsd doesn't havealacritty
in term database, so had to change it to can compilencurses-rs
aka ncurses crate).LC_CTYPE=en_US.UTF-8
orLANG=en_US.UTF-8
to be set otherwise it looks as if it doesn't have wide chars support socursive
andpancuses
examples look pretty broken.TODO:
pancurses
to reflect these changes,0.18
? (or leave this to the repo owner to do)ncurses-rs
version inCargo.toml
after it gets published, ie. so it's not lower than that version, because then it would break compilation ofpancurses
cargo clippy
and fix:error: this public function might dereference a raw pointer but is not marked unsafe
unsafe { curses::delscreen(screen) }
unsafe { curses::newterm(type_ptr, output, input) }
unsafe { curses::newterm(type_ptr, output, input) }
unsafe { curses::set_term(new) }
-Z treat-err-as-bug=5
warning: name
FILEcontains a capitalized acronym