mirror of https://github.com/rm-dr/daisy
Minor cleanup
parent
c56ba3d62e
commit
8b20395b3e
|
@ -1,10 +1,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
// Select main script for target system
|
||||||
cfg_if::cfg_if! {
|
cfg_if::cfg_if! {
|
||||||
if #[cfg(target_family = "unix")] {
|
if #[cfg(target_family = "unix")] {
|
||||||
mod unix;
|
mod unix;
|
||||||
pub use unix::main as main_e;
|
pub use unix::main as main_e;
|
||||||
} else {
|
} else {
|
||||||
pub fn main_e () -> Result<(), std::io::Error> {
|
pub fn main_e() -> Result<(), std::io::Error> {
|
||||||
unimplemented!("Not yet implemented.");
|
unimplemented!("Not yet implemented.");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,17 +13,6 @@ use super::promptbuffer::PromptBuffer;
|
||||||
use crate::command;
|
use crate::command;
|
||||||
use crate::context::Context;
|
use crate::context::Context;
|
||||||
|
|
||||||
/*
|
|
||||||
Make this a macro:
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
RawTerminal::suspend_raw_mode(&stdout).unwrap();
|
|
||||||
|
|
||||||
code
|
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
RawTerminal::activate_raw_mode(&stdout).unwrap();
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn main() -> Result<(), std::io::Error> {
|
pub fn main() -> Result<(), std::io::Error> {
|
||||||
|
@ -43,12 +32,6 @@ pub fn main() -> Result<(), std::io::Error> {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//let size = termion::terminal_size().unwrap();
|
|
||||||
//write!(stdout, "{:?}", size).unwrap();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'outer: loop {
|
'outer: loop {
|
||||||
|
|
||||||
pb.write_prompt(&mut stdout, &context)?;
|
pb.write_prompt(&mut stdout, &context)?;
|
|
@ -6,15 +6,17 @@ pub mod context;
|
||||||
pub mod errors;
|
pub mod errors;
|
||||||
pub mod formattedtext;
|
pub mod formattedtext;
|
||||||
|
|
||||||
mod entry;
|
|
||||||
use crate::entry::main_e;
|
|
||||||
|
|
||||||
use crate::parser::substitute;
|
use crate::parser::substitute;
|
||||||
use crate::errors::DaisyError;
|
use crate::errors::DaisyError;
|
||||||
use crate::formattedtext::FormattedText;
|
use crate::formattedtext::FormattedText;
|
||||||
use crate::context::Context;
|
use crate::context::Context;
|
||||||
use crate::parser::LineLocation;
|
use crate::parser::LineLocation;
|
||||||
|
|
||||||
|
|
||||||
|
// Run main script for target system
|
||||||
|
mod entrypoint;
|
||||||
|
use crate::entrypoint::main_e;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue