diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-27 19:39:39 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-27 19:39:39 (GMT) |
commit | ea28451286d3ea4a772fa174483f9a7a66bb1ab3 (patch) | |
tree | 6ee9d8a7848333a7ceeee3b13d492e40225f8b86 /tcllib/modules/fumagic/cfront.man | |
parent | b5ca09bae0d6a1edce939eea03594dd56383f2c8 (diff) | |
parent | 7c621da28f07e449ad90c387344f07a453927569 (diff) | |
download | blt-ea28451286d3ea4a772fa174483f9a7a66bb1ab3.zip blt-ea28451286d3ea4a772fa174483f9a7a66bb1ab3.tar.gz blt-ea28451286d3ea4a772fa174483f9a7a66bb1ab3.tar.bz2 |
Merge commit '7c621da28f07e449ad90c387344f07a453927569' as 'tcllib'
Diffstat (limited to 'tcllib/modules/fumagic/cfront.man')
-rw-r--r-- | tcllib/modules/fumagic/cfront.man | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/tcllib/modules/fumagic/cfront.man b/tcllib/modules/fumagic/cfront.man new file mode 100644 index 0000000..6715f38 --- /dev/null +++ b/tcllib/modules/fumagic/cfront.man @@ -0,0 +1,71 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin fileutil::magic::cfront n 1.0] +[see_also file(1)] +[see_also fileutil] +[see_also magic(5)] +[keywords {file recognition}] +[keywords {file type}] +[keywords {file utilities}] +[keywords mime] +[keywords type] +[moddesc {file utilities}] +[titledesc {Generator core for compiler of magic(5) files}] +[category {Programming tools}] +[require Tcl 8.4] +[require fileutil::magic::cfront [opt 1.0]] +[require fileutil::magic::cgen [opt 1.0]] +[require fileutil::magic::rt [opt 1.0]] +[require struct::list] +[require fileutil] +[description] +[para] + +This package provides the frontend of a compiler of magic(5) files +into recognizers based on the [package fileutil::magic::rt] recognizer +runtime package. For the generator backed used by this compiler see +the package [package fileutil::magic::cgen]. + +[section COMMANDS] + +[list_begin definitions] + +[call [cmd ::fileutil::magic::cfront::compile] [arg path]...] + +This command takes the paths of one or more files and directories and +compiles all the files, and the files in all the directories into a +single recognizer for all the file types specified in these files. + +[para] + +All the files have to be in the format specified by magic(5). + +[para] + +The result of the command is a Tcl script containing the generated +recognizer. + +[call [cmd ::fileutil::magic::cfront::procdef] [arg procname] [arg path]...] + +This command behaves like [cmd ::fileutil::magic::cfront::compile] +with regard to the specified path arguments, then wraps the resulting +recognizer script into a procedure named [arg procname], puts code +setting up the namespace of [arg procname] in front, and returns the +resulting script. + +[call [cmd ::fileutil::magic::cfront::install] [arg path]...] + +This command uses [cmd ::fileutil::magic::cfront::procdef] to compile +each of the paths into a recognizer procedure and installs the result +in the current interpreter. + +[para] + +The name of each new procedure is derived from the name of the +file/directory used in its creation, with file/directory [file FOO] +causing the creation of procedure [const ::fileutil::magic::/FOO::run]. + +[list_end] + +[vset CATEGORY {fileutil :: magic}] +[include ../doctools2base/include/feedback.inc] +[manpage_end] |