Codebase list rust-serde-xml-rs / e309ed0
package cursive, needed for ripasso Alexander Kjäll 1 year, 6 months ago
10 changed file(s) with 534 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 needed for ripasso
0 rust-cursive (0.19.0-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
1
2 * Package cursive 0.19.0 from crates.io using debcargo 2.5.0
3
4 -- Alexander Kjäll <alexander.kjall@gmail.com> Fri, 21 Oct 2022 22:25:51 +0200
0 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
1 Upstream-Name: cursive
2 Upstream-Contact: Alexandre Bury <alexandre.bury@gmail.com>
3 Source: https://github.com/gyscos/cursive
4
5 Files: *
6 Copyright: 2015-2022 Alexandre Bury <alexandre.bury@gmail.com
7 License: MIT
8
9 Files: ./src/backends/termion.rs
10 Copyright: 2016 Anthony Nowell
11 License: MIT
12
13 Files: debian/*
14 Copyright:
15 2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
16 2022 Alexander Kjäll <alexander.kjall@gmail.com>
17 License: MIT
18
19 License: MIT
20 Permission is hereby granted, free of charge, to any person obtaining a copy
21 of this software and associated documentation files (the "Software"), to deal
22 in the Software without restriction, including without limitation the rights
23 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24 copies of the Software, and to permit persons to whom the Software is
25 furnished to do so, subject to the following conditions:
26 .
27 The above copyright notice and this permission notice shall be included in all
28 copies or substantial portions of the Software.
29 .
30 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36 SOFTWARE.
0 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
1 Upstream-Name: cursive
2 Upstream-Contact: Alexandre Bury <alexandre.bury@gmail.com>
3 Source: https://github.com/gyscos/cursive
4
5 Files: *
6 Copyright: FIXME (overlay) UNKNOWN-YEARS Alexandre Bury <alexandre.bury@gmail.com>
7 License: MIT
8 Comment:
9 FIXME (overlay): Since upstream copyright years are not available in
10 Cargo.toml, they were extracted from the upstream Git repository. This may not
11 be correct information so you should review and fix this before uploading to
12 the archive.
13
14 Files: ./src/backends/termion.rs
15 Copyright: 2016 Anthony Nowell
16 License: UNKNOWN-LICENSE; FIXME (overlay)
17 Comment:
18 FIXME (overlay): These notices are extracted from files. Please review them
19 before uploading to the archive.
20
21 Files: debian/*
22 Copyright:
23 2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
24 2022 Alexander Kjäll <alexander.kjall@gmail.com>
25 License: MIT
26
27 License: MIT
28 Permission is hereby granted, free of charge, to any person obtaining a copy
29 of this software and associated documentation files (the "Software"), to deal
30 in the Software without restriction, including without limitation the rights
31 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32 copies of the Software, and to permit persons to whom the Software is
33 furnished to do so, subject to the following conditions:
34 .
35 The above copyright notice and this permission notice shall be included in all
36 copies or substantial portions of the Software.
37 .
38 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44 SOFTWARE.
0 overlay = "."
1 uploaders = ["Alexander Kjäll <alexander.kjall@gmail.com>"]
2 collapse_features = true
0 diff --git a/src/backends/blt.rs b/src/backends/blt.rs
1 index e9d719e..22dfca7 100644
2 --- a/src/backends/blt.rs
3 +++ b/src/backends/blt.rs
4 @@ -2,7 +2,6 @@
5 //!
6 //! Requires the `blt-backend` feature.
7 #![cfg(feature = "bear-lib-terminal")]
8 -#![cfg_attr(feature = "doc-cfg", doc(cfg(feature = "blt-backend")))]
9
10 pub use bear_lib_terminal;
11
12 diff --git a/src/backends/crossterm.rs b/src/backends/crossterm.rs
13 index 4fb301c..2c9843a 100644
14 --- a/src/backends/crossterm.rs
15 +++ b/src/backends/crossterm.rs
16 @@ -2,7 +2,6 @@
17 //!
18 //! Requires the `crossterm-backend` feature.
19 #![cfg(feature = "crossterm")]
20 -#![cfg_attr(feature = "doc-cfg", doc(cfg(feature = "crossterm-backend")))]
21
22 use std::{
23 cell::{Cell, RefCell, RefMut},
24 diff --git a/src/backends/curses/n.rs b/src/backends/curses/n.rs
25 index 583015d..2e951ed 100644
26 --- a/src/backends/curses/n.rs
27 +++ b/src/backends/curses/n.rs
28 @@ -1,6 +1,5 @@
29 //! Ncurses-specific backend.
30 #![cfg(feature = "ncurses-backend")]
31 -#![cfg_attr(feature = "doc-cfg", doc(cfg(feature = "ncurses-backend")))]
32 pub use ncurses;
33
34 use log::{debug, warn};
35 diff --git a/src/backends/curses/pan.rs b/src/backends/curses/pan.rs
36 index 74d080f..4dc0e56 100644
37 --- a/src/backends/curses/pan.rs
38 +++ b/src/backends/curses/pan.rs
39 @@ -1,6 +1,5 @@
40 //! Pancuses-specific backend.
41 #![cfg(feature = "pancurses-backend")]
42 -#![cfg_attr(feature = "doc-cfg", doc(cfg(feature = "pancurses-backend")))]
43
44 pub use pancurses;
45
46 diff --git a/src/backends/termion.rs b/src/backends/termion.rs
47 index 05c1946..685bc4f 100644
48 --- a/src/backends/termion.rs
49 +++ b/src/backends/termion.rs
50 @@ -2,7 +2,6 @@
51 //!
52 //! Requires the `termion-backend` feature.
53 #![cfg(feature = "termion")]
54 -#![cfg_attr(feature = "doc-cfg", doc(cfg(feature = "termion-backend")))]
55
56 pub use termion;
57
58 diff --git a/src/cursive_ext.rs b/src/cursive_ext.rs
59 index 516357c..74b8bf0 100644
60 --- a/src/cursive_ext.rs
61 +++ b/src/cursive_ext.rs
62 @@ -37,27 +37,22 @@ pub trait CursiveExt {
63
64 /// Creates a new Cursive root using a ncurses backend.
65 #[cfg(feature = "ncurses-backend")]
66 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "ncurses-backend")))]
67 fn run_ncurses(&mut self) -> std::io::Result<()>;
68
69 /// Creates a new Cursive root using a pancurses backend.
70 #[cfg(feature = "pancurses-backend")]
71 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "pancurses-backend")))]
72 fn run_pancurses(&mut self) -> std::io::Result<()>;
73
74 /// Creates a new Cursive root using a termion backend.
75 #[cfg(feature = "termion-backend")]
76 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "termion-backend")))]
77 fn run_termion(&mut self) -> std::io::Result<()>;
78
79 /// Creates a new Cursive root using a crossterm backend.
80 #[cfg(feature = "crossterm-backend")]
81 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "crossterm-backend")))]
82 fn run_crossterm(&mut self) -> Result<(), crossterm::ErrorKind>;
83
84 /// Creates a new Cursive root using a bear-lib-terminal backend.
85 #[cfg(feature = "blt-backend")]
86 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "blt-backend")))]
87 fn run_blt(&mut self);
88 }
89
90 @@ -82,31 +77,26 @@ impl CursiveExt for cursive_core::Cursive {
91 }
92
93 #[cfg(feature = "ncurses-backend")]
94 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "curses-backend")))]
95 fn run_ncurses(&mut self) -> std::io::Result<()> {
96 self.try_run_with(crate::backends::curses::n::Backend::init)
97 }
98
99 #[cfg(feature = "pancurses-backend")]
100 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "pancurses-backend")))]
101 fn run_pancurses(&mut self) -> std::io::Result<()> {
102 self.try_run_with(crate::backends::curses::pan::Backend::init)
103 }
104
105 #[cfg(feature = "termion-backend")]
106 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "termion-backend")))]
107 fn run_termion(&mut self) -> std::io::Result<()> {
108 self.try_run_with(crate::backends::termion::Backend::init)
109 }
110
111 #[cfg(feature = "crossterm-backend")]
112 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "crossterm-backend")))]
113 fn run_crossterm(&mut self) -> Result<(), crossterm::ErrorKind> {
114 self.try_run_with(crate::backends::crossterm::Backend::init)
115 }
116
117 #[cfg(feature = "blt-backend")]
118 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "blt-backend")))]
119 fn run_blt(&mut self) {
120 self.run_with(crate::backends::blt::Backend::init)
121 }
122 diff --git a/src/cursive_runnable.rs b/src/cursive_runnable.rs
123 index 52a975b..1912ab5 100644
124 --- a/src/cursive_runnable.rs
125 +++ b/src/cursive_runnable.rs
126 @@ -145,7 +145,6 @@ impl CursiveRunnable {
127 ///
128 /// _Requires the `ncurses-backend` feature._
129 #[cfg(feature = "ncurses-backend")]
130 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "ncurses-backend")))]
131 pub fn ncurses() -> Self {
132 Self::new(backends::curses::n::Backend::init)
133 }
134 @@ -154,7 +153,6 @@ impl CursiveRunnable {
135 ///
136 /// _Requires the `panncurses-backend` feature._
137 #[cfg(feature = "pancurses-backend")]
138 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "pancurses-backend")))]
139 pub fn pancurses() -> Self {
140 Self::new(backends::curses::pan::Backend::init)
141 }
142 @@ -163,7 +161,6 @@ impl CursiveRunnable {
143 ///
144 /// _Requires the `termion-backend` feature._
145 #[cfg(feature = "termion-backend")]
146 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "termion-backend")))]
147 pub fn termion() -> Self {
148 Self::new(backends::termion::Backend::init)
149 }
150 @@ -172,7 +169,6 @@ impl CursiveRunnable {
151 ///
152 /// _Requires the `crossterm-backend` feature._
153 #[cfg(feature = "crossterm-backend")]
154 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "crossterm-backend")))]
155 pub fn crossterm() -> Self {
156 Self::new(backends::crossterm::Backend::init)
157 }
158 @@ -181,7 +177,6 @@ impl CursiveRunnable {
159 ///
160 /// _Requires the `blt-backend` feature._
161 #[cfg(feature = "blt-backend")]
162 - #[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "blt-backend")))]
163 pub fn blt() -> Self {
164 Self::new::<std::convert::Infallible, _>(|| {
165 Ok(backends::blt::Backend::init())
166 diff --git a/src/lib.rs b/src/lib.rs
167 index 939e4f8..8d12d3a 100644
168 --- a/src/lib.rs
169 +++ b/src/lib.rs
170 @@ -63,7 +63,6 @@
171 //!
172 //! [`cursive::theme`]: ./theme/index.html
173 #![deny(missing_docs)]
174 -#![cfg_attr(feature = "doc-cfg", feature(doc_cfg))]
175
176 pub use cursive_core::*;
177
178 @@ -97,35 +96,30 @@ pub fn default() -> CursiveRunnable {
179
180 /// Creates a new Cursive root using a ncurses backend.
181 #[cfg(feature = "ncurses-backend")]
182 -#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "ncurses-backend")))]
183 pub fn ncurses() -> CursiveRunnable {
184 CursiveRunnable::ncurses()
185 }
186
187 /// Creates a new Cursive root using a pancurses backend.
188 #[cfg(feature = "pancurses-backend")]
189 -#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "pancurses-backend")))]
190 pub fn pancurses() -> CursiveRunnable {
191 CursiveRunnable::pancurses()
192 }
193
194 /// Creates a new Cursive root using a termion backend.
195 #[cfg(feature = "termion-backend")]
196 -#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "termion-backend")))]
197 pub fn termion() -> CursiveRunnable {
198 CursiveRunnable::termion()
199 }
200
201 /// Creates a new Cursive root using a crossterm backend.
202 #[cfg(feature = "crossterm-backend")]
203 -#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "crossterm-backend")))]
204 pub fn crossterm() -> CursiveRunnable {
205 CursiveRunnable::crossterm()
206 }
207
208 /// Creates a new Cursive root using a bear-lib-terminal backend.
209 #[cfg(feature = "blt-backend")]
210 -#[cfg_attr(feature = "doc-cfg", doc(cfg(feature = "blt-backend")))]
211 pub fn blt() -> CursiveRunnable {
212 CursiveRunnable::blt()
213 }
0 diff --git a/Cargo.toml b/Cargo.toml
1 index c4637a0..cd70eb4 100644
2 --- a/Cargo.toml
3 +++ b/Cargo.toml
4 @@ -42,10 +42,6 @@ required-features = ["toml"]
5 [dependencies.ahash]
6 version = "0.7"
7
8 -[dependencies.bear-lib-terminal]
9 -version = "2"
10 -optional = true
11 -
12 [dependencies.cfg-if]
13 version = "1"
14
15 @@ -57,7 +53,7 @@ version = "0.24"
16 optional = true
17
18 [dependencies.cursive_core]
19 -version = "0.3.0"
20 +version = "0.3"
21
22 [dependencies.lazy_static]
23 version = "1"
24 @@ -72,16 +69,6 @@ version = "0.4"
25 version = "1.0"
26 optional = true
27
28 -[dependencies.ncurses]
29 -version = "5.99.0"
30 -features = ["wide"]
31 -optional = true
32 -
33 -[dependencies.pancurses]
34 -version = "0.17"
35 -features = ["wide"]
36 -optional = true
37 -
38 [dependencies.term_size]
39 version = "0.3"
40 optional = true
41 @@ -106,21 +93,10 @@ version = "0.2"
42 version = "0.8"
43
44 [features]
45 -blt-backend = ["bear-lib-terminal"]
46 crossterm-backend = ["crossterm"]
47 -default = ["ncurses-backend"]
48 +default = ["crossterm-backend"]
49 doc-cfg = ["cursive_core/doc-cfg"]
50 markdown = ["cursive_core/markdown"]
51 -ncurses-backend = [
52 - "ncurses",
53 - "maplit",
54 - "term_size",
55 -]
56 -pancurses-backend = [
57 - "pancurses",
58 - "maplit",
59 - "term_size",
60 -]
61 termion-backend = ["termion"]
62 toml = ["cursive_core/toml"]
63 unstable_scroll = []
0 use-wasmer-enumset-instead-of-enumset.patch
1 remove-terminals-not-in-debian.patch
2 upgrade-to-crossterm-0.25.patch
3 remove-nightly-feature.patch
0 diff --git a/Cargo.toml b/Cargo.toml
1 index cd70eb4..dfd7589 100644
2 --- a/Cargo.toml
3 +++ b/Cargo.toml
4 @@ -49,7 +49,7 @@ version = "1"
5 version = "0.5"
6
7 [dependencies.crossterm]
8 -version = "0.24"
9 +version = "0.25"
10 optional = true
11
12 [dependencies.cursive_core]
13 diff --git a/src/backends/crossterm.rs b/src/backends/crossterm.rs
14 index ead651e..4fb301c 100644
15 --- a/src/backends/crossterm.rs
16 +++ b/src/backends/crossterm.rs
17 @@ -58,8 +58,8 @@ fn translate_button(button: CMouseButton) -> MouseButton {
18 }
19 }
20
21 -fn translate_key(code: KeyCode) -> Key {
22 - match code {
23 +fn translate_key(code: KeyCode) -> Option<Key> {
24 + Some(match code {
25 KeyCode::Esc => Key::Esc,
26 KeyCode::Backspace => Key::Backspace,
27 KeyCode::Left => Key::Left,
28 @@ -76,12 +76,12 @@ fn translate_key(code: KeyCode) -> Key {
29 KeyCode::Tab => Key::Tab,
30 KeyCode::F(n) => Key::from_f(n),
31 KeyCode::BackTab => Key::Tab, /* not supported */
32 - KeyCode::Char(_) => Key::Tab, /* is handled at `Event` level, use tab as default */
33 - KeyCode::Null => Key::Tab, /* is handled at `Event` level, use tab as default */
34 - }
35 + // These should never occur.
36 + _ => return None,
37 + })
38 }
39
40 -fn translate_event(event: CKeyEvent) -> Event {
41 +fn translate_event(event: CKeyEvent) -> Option<Event> {
42 const CTRL_ALT: KeyModifiers = KeyModifiers::from_bits_truncate(
43 KeyModifiers::CONTROL.bits() | KeyModifiers::ALT.bits(),
44 );
45 @@ -92,19 +92,22 @@ fn translate_event(event: CKeyEvent) -> Event {
46 KeyModifiers::ALT.bits() | KeyModifiers::SHIFT.bits(),
47 );
48
49 - match event {
50 + Some(match event {
51 // Handle Char + modifier.
52 CKeyEvent {
53 modifiers: KeyModifiers::CONTROL,
54 code: KeyCode::Char(c),
55 + ..
56 } => Event::CtrlChar(c),
57 CKeyEvent {
58 modifiers: KeyModifiers::ALT,
59 code: KeyCode::Char(c),
60 + ..
61 } => Event::AltChar(c),
62 CKeyEvent {
63 modifiers: KeyModifiers::SHIFT,
64 code: KeyCode::Char(c),
65 + ..
66 } => Event::Char(c),
67 CKeyEvent {
68 code: KeyCode::Char(c),
69 @@ -122,33 +125,39 @@ fn translate_event(event: CKeyEvent) -> Event {
70 CKeyEvent {
71 modifiers: CTRL_ALT,
72 code,
73 - } => Event::CtrlAlt(translate_key(code)),
74 + ..
75 + } => Event::CtrlAlt(translate_key(code)?),
76 CKeyEvent {
77 modifiers: CTRL_SHIFT,
78 code,
79 - } => Event::CtrlShift(translate_key(code)),
80 + ..
81 + } => Event::CtrlShift(translate_key(code)?),
82 CKeyEvent {
83 modifiers: ALT_SHIFT,
84 code,
85 - } => Event::AltShift(translate_key(code)),
86 + ..
87 + } => Event::AltShift(translate_key(code)?),
88
89 // Handle key + single modifier
90 CKeyEvent {
91 modifiers: KeyModifiers::CONTROL,
92 code,
93 - } => Event::Ctrl(translate_key(code)),
94 + ..
95 + } => Event::Ctrl(translate_key(code)?),
96 CKeyEvent {
97 modifiers: KeyModifiers::ALT,
98 code,
99 - } => Event::Alt(translate_key(code)),
100 + ..
101 + } => Event::Alt(translate_key(code)?),
102 CKeyEvent {
103 modifiers: KeyModifiers::SHIFT,
104 code,
105 - } => Event::Shift(translate_key(code)),
106 + ..
107 + } => Event::Shift(translate_key(code)?),
108
109 // All other keys.
110 - CKeyEvent { code, .. } => Event::Key(translate_key(code)),
111 - }
112 + CKeyEvent { code, .. } => Event::Key(translate_key(code)?),
113 + })
114 }
115
116 fn translate_color(base_color: theme::Color) -> Color {
117 @@ -241,7 +250,7 @@ impl Backend {
118
119 fn map_key(&mut self, event: CEvent) -> Option<Event> {
120 Some(match event {
121 - CEvent::Key(key_event) => translate_event(key_event),
122 + CEvent::Key(key_event) => translate_event(key_event)?,
123 CEvent::Mouse(CMouseEvent {
124 kind,
125 column,
126 @@ -273,6 +282,10 @@ impl Backend {
127 }
128 }
129 CEvent::Resize(_, _) => Event::WindowResize,
130 + CEvent::Paste(_) => {
131 + unreachable!("Did not enable bracketed paste.")
132 + }
133 + CEvent::FocusGained | CEvent::FocusLost => return None,
134 })
135 }
136 }
0 diff --git a/src/backends/puppet/observed.rs b/src/backends/puppet/observed.rs
1 index 62f7c02..aa203ef 100644
2 --- a/src/backends/puppet/observed.rs
3 +++ b/src/backends/puppet/observed.rs
4 @@ -1,5 +1,5 @@
5 //! Structs representing output of puppet backend
6 -use crate::reexports::enumset::EnumSet;
7 +use crate::reexports::wasmer_enumset::EnumSet;
8 use crate::theme::ColorPair;
9 use crate::theme::Effect;
10 use crate::Vec2;
11 diff --git a/src/backends/puppet/static_values.rs b/src/backends/puppet/static_values.rs
12 index 608f352..bd77c7c 100644
13 --- a/src/backends/puppet/static_values.rs
14 +++ b/src/backends/puppet/static_values.rs
15 @@ -1,7 +1,7 @@
16 /// Some default values to Puppet backend.
17 use lazy_static::lazy_static;
18
19 -use crate::reexports::enumset::EnumSet;
20 +use crate::reexports::wasmer_enumset::EnumSet;
21 use crate::theme::ColorPair;
22 use crate::theme::{Color, Effect};
23 use crate::Vec2;