Make functions for builtin functions public

event filter names, function::set_desc, common::reformat_for_screen

This is the first use for each
This commit is contained in:
Fabian Boehm 2023-08-09 17:13:19 +02:00
parent 5b136d450f
commit 4f86f303f5
3 changed files with 3 additions and 3 deletions

View File

@ -1535,7 +1535,7 @@ pub fn read_loop<Fd: AsRawFd>(fd: &Fd, buf: &mut [u8]) -> std::io::Result<usize>
/// Write the given paragraph of output, redoing linebreaks to fit \p termsize. /// Write the given paragraph of output, redoing linebreaks to fit \p termsize.
#[widestrs] #[widestrs]
fn reformat_for_screen(msg: &wstr, termsize: &Termsize) -> WString { pub fn reformat_for_screen(msg: &wstr, termsize: &Termsize) -> WString {
let mut buff = WString::new(); let mut buff = WString::new();
let screen_width = termsize.width; let screen_width = termsize.width;

View File

@ -826,7 +826,7 @@ fn event_fire_ffi(parser: Pin<&mut parser_t>, event: &Event) {
} }
#[widestrs] #[widestrs]
const EVENT_FILTER_NAMES: [&wstr; 7] = [ pub const EVENT_FILTER_NAMES: [&wstr; 7] = [
"signal"L, "signal"L,
"variable"L, "variable"L,
"exit"L, "exit"L,

View File

@ -291,7 +291,7 @@ fn get_function_body_source(props: &FunctionProperties) -> &wstr {
/// Sets the description of the function with the name \c name. /// Sets the description of the function with the name \c name.
/// This triggers autoloading. /// This triggers autoloading.
fn set_desc(name: &wstr, desc: WString, parser: &mut parser_t) { pub fn set_desc(name: &wstr, desc: WString, parser: &mut parser_t) {
parser.assert_can_execute(); parser.assert_can_execute();
load(name, parser); load(name, parser);
let mut funcset = FUNCTION_SET.lock().unwrap(); let mut funcset = FUNCTION_SET.lock().unwrap();