Skip to main content

kr_vocabulary_configure

Function kr_vocabulary_configure 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn kr_vocabulary_configure( pointer: *mut VocabularyHandle, source: u32, path: *const u8, len: u32, flags: u32, ) -> u32
Expand description

Configure one logical source without I/O. Changed paths or flags immediately become missing.

source is a language, read as a Vim word list, or learned slot LEARNED + n, read as a plain word list. With MISSING_IS_EMPTY in flags, observing a path that does not exist (ENOENT) publishes an empty source until a file at that path has been published. EXCLUDED, for learned slots only, makes every word forbidden. Other flag bits are BAD_TAG.

ยงSafety

pointer must be null or a live aligned source allocation throughout this call. For nonzero len <= MAX_PATH, a non-null path must address readable bytes not aliasing the handle. Zero/oversized/null arguments are checked without reading the path. No pointer is retained.