Klammerset: the @@@klammerset construct, its search path, and const correctness
The @@@klammerset system command formally declares a klammerset — a named, logically related group of klammer definitions — with an operative, idempotent declaration (:requires and :files load in order at the declaration point, relative to the declaring file). A bare symbol given to ktext -k, kdesc --input, or :requires resolves to x/x.k on the search path: the document's directory, then KLAMMERTEXT_KLAMMERSETS, then KLAMMERTEXT_HOME; kdesc --klammerset lists the available sets. sks/sks.k is the first declared klammerset, so `-k sks` loads the SKS by name. The engine's lookup classes were renamed *_set → *_registry to keep the two concepts apart, and the whole C++ tree now follows standard const-correctness conventions. tst/ gains klammerset_test.sh (18 cases). (from dev 64b1abf23e56)
This commit is contained in:
11
mac/file.h
11
mac/file.h
@@ -45,12 +45,12 @@ fs::path klammertext_filename(
|
||||
const std::string& basename, bool error_if_missing=true, bool make_directory_if_missing=false);
|
||||
std::vector<std::string> sks_dirs();
|
||||
std::vector<std::string> get_sks_directories(const std::string& s, bool include_argument=true);
|
||||
std::string cache_directory(std::string subdirectory, std::string parent_directory="");
|
||||
std::string cache_directory(const std::string& subdirectory, std::string parent_directory="");
|
||||
std::time_t to_time_t(const fs::file_time_type& ftime);
|
||||
bool in_modification_order(std::string filename1, std::string filename2);
|
||||
void write_to_cache(std::string cache_dir, std::string basename, std::string text);
|
||||
std::string read_from_cache(std::string cache_dir, std::string basename);
|
||||
bool cache_requires_update(std::string cache_dir, std::string file_to_cache, std::string basename);
|
||||
void write_to_cache(const std::string& cache_dir, const std::string& basename, const std::string& text);
|
||||
std::string read_from_cache(const std::string& cache_dir, const std::string& basename);
|
||||
bool cache_requires_update(const std::string& cache_dir, const std::string& file_to_cache, const std::string& basename);
|
||||
|
||||
std::vector<fs::path> pathnames_with_extension(
|
||||
const fs::path& dir, const std::string extension
|
||||
@@ -73,6 +73,7 @@ bool files_differ(const fs::path& p1,
|
||||
void copy_file_stream(const fs::path& src, const fs::path& dst);
|
||||
|
||||
void copy_preserving_basename(
|
||||
std::vector<std::string> filenames, std::string output_directory, std::string link_directory);
|
||||
const std::vector<std::string>& filenames, const std::string& output_directory,
|
||||
const std::string& link_directory);
|
||||
|
||||
fs::path resolve_relative_to(const fs::path& relative, const fs::path& base=std::filesystem::current_path());
|
||||
|
||||
Reference in New Issue
Block a user