Hi Ulrich
> As I already mentioned, I'd like to have an improved
> configurability. Having websh, apache, tcl and mysql
> installed in nonstandard locations, I hate to have to do
> some 'postprocessing' to move a couple of files to the
> 'right' location. An additional option to configure, although
> definitely 'unGNUish', would be really comfortable.
We'll think about it...
> Secondly, I'd like to have yet another subcommand to
> filecounters, 'filecountername actval', which gives me the
> actual value (content of the counter file). It's absolutely
> no problem to get this value by reading the file, but the
> filecounter semantics would be more complete. I need
> this in a situation, where I misuse a filecounter for a
> counting purpose apart from a context context.
There already is a "curval" subcommand. Doesn't that do what you
expect?
> Thirdly, a web::headerdate (see below), which returns a
> date string in RFC 1123 format, which is used in http and
> mail headers. Tcls clock format does not do it, if you
> are not in a 'C' language environment. This string has to
> be independent of localizations. It looks something
> like this:
>
> proc headerdate {sec} {
> if {[info exists ::env(LANG)]} {
> set elang $::env(LANG)
> }
> set ::env(LANG) C
> set date [clock format $sec -format "%a, %d %b %Y %T %Z" -gmt 1]
> if {[info exists elang]} {
> set ::env(LANG) $elang
> } else {
> unset ::env(LANG)
> }
> return $date
> }
Well, the clock command in Tcl is definitly something that has its
problems, at least upto version 8.4.X. In Tcl 8.5 the clock command
has been reimplemented (basically from scratch) and I think it's worth
just waiting for that. There is a new -locale switch to clock format
that takes care of your problem.
Regarding your example: I tried to get the cookie time format for
Websh right for quite some time. My solution doesn't play with the
environment, as I've seen strange side effects (you actually pointed
some of them out to me ;-) . Fact is: your code wouldn't work on OSX,
as the timezone string will not be "GMT", but "UTC", so if you want to
use it until Tcl 8.5 is out, look at Websh's fiddling with the locale
independent time format in cookie.ws3 lines 160ff.
> All in all, good work! I'll complete my upgrade to this version.
Thanks :-)
Regards
Ronnie
--
Ronnie Brunner | [EMAIL PROTECTED]
phone +41 (0)44 247 79 79 | fax +41 (0)44 247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]