#[allow(unused_imports)]
use crate::ported::zle::zle_h::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_main::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_misc::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_hist::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_move::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_word::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_params::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_vi::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_utils::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_refresh::*;
#[allow(unused_imports)]
use crate::ported::zle::zle_tricky::*;
#[allow(unused_imports)]
use crate::ported::zle::textobjects::*;
pub fn deltochar() -> i32 { let c = match getfullchar(false) { Some(ch) => ch,
None => return 1,
};
let mut dest = crate::ported::zle::zle_main::ZLECS.load(std::sync::atomic::Ordering::SeqCst); let mut ok = 0i32; let mut n: i32 = if crate::ported::zle::zle_main::ZMOD.lock().unwrap().flags & crate::ported::zle::zle_h::MOD_MULT != 0 {
crate::ported::zle::zle_main::ZMOD.lock().unwrap().mult
} else {
1
}; let zap = crate::ported::zle::zle_main::BINDK.lock().unwrap().as_ref().map(|t| t.nam.as_str()) == Some("zap-to-char");
if n > 0 { while n > 0 && dest != crate::ported::zle::zle_main::ZLELL.load(std::sync::atomic::Ordering::SeqCst) { n -= 1;
while dest != crate::ported::zle::zle_main::ZLELL.load(std::sync::atomic::Ordering::SeqCst) && crate::ported::zle::zle_main::ZLELINE.lock().unwrap().get(dest).copied() != Some(c) {
dest += 1; }
if dest != crate::ported::zle::zle_main::ZLELL.load(std::sync::atomic::Ordering::SeqCst) { if !zap || n > 0 { dest += 1; }
if n == 0 { let ct = (dest as i32) - (crate::ported::zle::zle_main::ZLECS.load(std::sync::atomic::Ordering::SeqCst) as i32); crate::ported::zle::zle_utils::forekill(ct, 0); ok += 1; }
}
}
} else { if dest > 0 { dest -= 1; }
while n < 0 && dest != 0 { n += 1;
while dest != 0 && crate::ported::zle::zle_main::ZLELINE.lock().unwrap().get(dest).copied() != Some(c) {
dest -= 1; }
if crate::ported::zle::zle_main::ZLELINE.lock().unwrap().get(dest).copied() == Some(c) { if n == 0 { let zap_adj = if zap { 1 } else { 0 }; let ct = (crate::ported::zle::zle_main::ZLECS.load(std::sync::atomic::Ordering::SeqCst) as i32) - (dest as i32) - zap_adj;
crate::ported::zle::zle_utils::backkill(ct, 0); ok += 1; }
if dest > 0 { dest -= 1; }
}
}
}
if ok != 0 { 0 } else { 1 } }
pub fn setup_() -> i32 { 0 }
pub fn features_() -> i32 { 0 }
pub fn enables_() -> i32 { 0 }
pub fn boot_() -> i32 { 0 }
pub fn cleanup_() -> i32 { 0 }
pub fn finish_() -> i32 { 0 }