lib_include function library

Dependencies: lib_2da, lib_anon, lib_array, lib_fn, lib_ini, lib_sfo, lib_struct, lib_sugar, lib_tools

Functions from unidentified sources: test

Description

Functions

include(inline:i, file:s, location:s, locbase:s, path:s)=() dimorphic

run(file:s, files:s, location:s, locbase:s, path:s, version:s, tra:s, marker_prefix:s="dw-")=() dimorphic

'file' (synonym: 'files') is a list of tpa files (leave off the suffix), located at the location specified by 'location', 'locbase', and 'path'. (If none are set, assume location is component_loc.) Each is loaded, and then each file's name is run as an action function, with the STR_VAR argument 'version' fed to it, and with the tra file 'tra' (english and local-language versions) loaded. (So each tpa should conform to the SFO convention of containing an action function of its own name.

When used outside an extant 'run' instruction (in the intended setup, this should be from your tp2 as the only instruction in the component, though I can't enforce that), it sets 'component_loc' to 'location', defaults to using 'location' as the name of the tra file, and sets a marker file with name 'dw-lib_include.tph'. 'marker_prefix' defaults to 'sfo_marker_prefix', which in normal usage should have been set in your 'always' file.