/// Helper functions, especially to reproduce C std/posix functions use nix::errno::*; use std::process::exit; /// Is this character an ASCII control character? pub fn is_cntrl(c: char) -> bool { let code = c as u8; code < 32 || code == 127 } pub fn die(code: &Errno, msg: &str) -> ! { eprintln!("{:?} ({})", code, msg); exit(1) }