Add scripting capability to mh/inc.
This patch adds a convenience library libmuscript that provides scripting capability easy to use in MU applications. Currently used by maidag and inc. * include/mailutils/util.h (mu_stpcpy): 2nd arg is const. * libmailutils/string/stpcpy.c: Likewise. * lib/.gitignore: Update. * lib/Makefile.am: New library libmuscript.a * lib/muscript.h: New file. * lib/muscript_priv.h: New file. * lib/script.c: New file. * maidag/guile.c: Rename to ... * lib/guile.c: ... this * maidag/python.c: Rename to ... * lib/python.c: ... this * maidag/sieve.c: Rename to ... * lib/sieve.c: ... this * maidag/Makefile.am (maidag_LDADD): Add libmuscript.a (maidag_SOURCES): Update. * maidag/maidag.c (script_handler): Change type to mu_script_t. * maidag/maidag.h: Include muscript.h * maidag/script.c: Rewrite via libmuscript * mh/Makefile.am (inc_LDADD): New variable. * mh/inc.c (options): New options --language and --script. (mh_option): New options -language and -script. (incdat) <handler,descr>: New members. (incmbx): Optionally process each message through a script. If it is marked as deleted upon return, don't incorporate it. (main): Set mh as the default mailbox scheme. Initialize scripting subsystem and deallocate it when finished. * mh/mh_getopt.h (ARG_LANG, ARG_SCRIPT): New constants.
Showing
17 changed files
with
515 additions
and
165 deletions
lib/.gitignore
0 → 100644
lib/muscript.h
0 → 100644
lib/muscript_priv.h
0 → 100644
lib/script.c
0 → 100644
-
Please register or sign in to post a comment