serf: implement %live %exit

This commit is contained in:
Alex Shelkovnykov 2023-12-17 14:00:19 -03:00
parent 012a7bac22
commit be96c495a8

View File

@ -222,15 +222,18 @@ pub fn serf(constant_hot_state: &[HotEntry]) -> io::Result<()> {
tas!(b"live") => { tas!(b"live") => {
let inner = slot(writ, 6)?.as_direct().unwrap(); let inner = slot(writ, 6)?.as_direct().unwrap();
match inner.data() { match inner.data() {
tas!(b"cram") => eprintln!("cram"), tas!(b"cram") => eprintln!("\r %cram: not implemented"),
tas!(b"exit") => eprintln!("exit"), tas!(b"exit") => {
eprintln!("\r %exit");
std::process::exit(0);
}
tas!(b"save") => { tas!(b"save") => {
// XX what is eve for? // XX what is eve for?
eprintln!("save"); eprintln!("\r %save");
context.sync(); context.sync();
} }
tas!(b"meld") => eprintln!("meld"), tas!(b"meld") => eprintln!("\r %meld: not implemented"),
tas!(b"pack") => eprintln!("pack"), tas!(b"pack") => eprintln!("\r %pack: not implemented"),
_ => eprintln!("unknown live"), _ => eprintln!("unknown live"),
} }
context.live(); context.live();