Hi, all!

i couldn't resist the temptation to try this out...

http://fossil.wanderinghorse.net/repos/th1-sgb/index.cgi

or:

fossil clone http://fossil.wanderinghorse.net/repos/th1-sgb/index.cgi
 th1.fsl

i split out the TH1 code from Fossil into a standalone library and
CLI-based interpreter, minus the fossil-specific features. It should build
out of the box on any gcc-running platform. It is ANSI C89 and can be built
on other platforms (assuming i haven't screwed something up), but you'll
have to provide your own makefiles (contributions are welcomed - off-list,
please). It compiles warning-free in gcc -pedantic mode and valgrind says
that it is leak-free.

This code is an experimentation ground for myself, independent of fossil
(other than the code having come from it), and does not represent any sort
of "incubation project" which will eventually go back into fossil. i did
this because i have had fun hacking on fossil's bits and want to experiment
with things which don't belong in fossil. If there are any TH1 users who
would like to contribute, simply contact me off-list and i'll get you set
up in the repo.

Features missing vis-a-vis fossil's th1:

- All default-set $variables. The library supports expanding those but it
is off by default (and the library doesn't set any vars by default like
fossil does).
- All of the fossil-dependent functions (leaving only puts, which i had to
re-implement to lose the dep, and the core builtins). e.g. HTMLization of
output. It's all passed through as-is now unless the client explicitly
enables $vars parsing.

New features vis-a-vis fossil's trunk:

- Pure C library interface with no 3rd-party dependencies. Documentation is
pending - it's scattered between the .h/.c files for the time being.
- Has routines for handling "raw" script code and code embedded in TH1 tags
in text documents.
- The "ob" (output buffering) API (which might or might not make it into
fossil's trunk, pending other design decisions).
- Standalone command-line th1 interpreter as an example of how to use the
library.


Happy Hacking!

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to