Open correabuscar opened 5 months ago
Thanks for the PR. I'll look through this as soon as I find a bit of time.
No worries, it's still in draft phase until the ncurses-rs
one gets in(if ever), then I'll mark it ready for review, no need to look at it before then, I think.
Closing this to allow someone else in the future to come along and do things better whenever things are ready in ncurses-rs
, and also because I've already closed the prerequisite PR for ncurses-rs
(for same reason) and without it this PR has no point:)
Also, I may or may not be here in the future to provide support for these changes, as I had originally intended. Although these changes are quite minor so it wouldn't have mattered.
Reopening because https://github.com/jeaye/ncurses-rs/pull/220 got in, so this PR might work now, bare with me while I re-test everything in OP...
I forgot that I had deleted the virtual machines, so testing was now only done on Gentoo... but otherwise the PR is ready. Note that the ncurses
crate had already published version 6.0.1
which is required for this PR to work (already enforced).
EDIT: technically only this 1 of the 3 commits is needed. Can cherry-pick it, or tell me whether or not to remove the other 2 and force-push ?
but first,this got in https://github.com/jeaye/ncurses-rs/pull/220 as v6.0.1 (already onncurses-rs
needs the changes in this PR : https://github.com/jeaye/ncurses-rs/pull/220 (but the below were tested only with PR https://github.com/jeaye/ncurses-rs/pull/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)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