Michael Link <[EMAIL PROTECTED]> writes:

> Well I took into consideration the previous email and made some
> significant changes.  You can download the lastest code at
> http://www.fractal.net/files/mod_tcl-1.0d0.tar.gz
 
Argh - it would be really nice to use 'mod_tcl' as the directory for
the tarball.

> Removed all the MySQL stuff.

Excellent.

> The code is now all in C instead of C++.

Thanks - we could probably go 'round and 'round about which is "best",
but I think that getting on with things is for the best.

> The configuration is smarter.

> Things that haven't changed (yet):
 
> I haven't started to use libapreq yet because the latest code base
> doesn't seem to be in sync with Apache 2.0 yet.  As soon as that
> happens I'll start using it.  Otherwise the old behavior is still
> maintained.
 
Ok.  I'll ask about this upstream as well.

> Obviously more of the API needs to be exported, and the hooks needs
> to be made available also, this will be my next task.

Sounds good.

> It's possible I missed something, don't be afraid to remind me.


static const char *tcl_section(cmd_parms *cmd, void *dummy, char *arg)
{
    server_rec *s = cmd->server;    
    char l[MAX_STRING_LEN];

    if (interp == NULL)
    {
        tcl_init_stuff(s, cmd->pool);
    }

    while (!(ap_cfg_getline(l, MAX_STRING_LEN, cmd->config_file)))
    {
        if(strncasecmp(l, "</Tcl>", 6) == 0)
        {
            break;
        }
        Tcl_Eval(interp, l);
    }

    return NULL;
}

static const char *tcl_end_section(cmd_parms *cmd, void *dummy)
{
    return NULL;
}

static const command_rec tcl_cmds[] =
{
    { "<Tcl>", tcl_section, NULL, RSRC_CONF, RAW_ARGS, "Tcl code" },
    { "</Tcl>", tcl_end_section, NULL, RSRC_CONF, NO_ARGS,  "End Tcl code" },
    {NULL}
};

What do you think of something like this, so that we can include Tcl
directly in the config files.  I don't think it's the prettiest way of
doing things, but it might be useful...?

Once you add the Apache license to the files at the top, I think I
will check this into CVS, as it's a reasonably good beginning to
mod_tcl.

Karl, any comments?

-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

Reply via email to