Hi Ronnie,

On Sunday 19 February 2006 23:41, Ronnie Brunner wrote:
> 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...
Pleeeeease.

> > 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?
I know of curval, but that's not what I mean. curval returns
the current filecounter value from a sessions viewpoint.  It
only returns a value after a previous nextval and sticks to
that value independent of other processes incrementing
the filecounter in the meantime. This is perfectly ok in
normal session context processing.

I need the value without(!) incrementing it. As I said, I misuse
the filecounter for something else (visit counter), not for
session contexts. curval doesn't help here, thus my actval
proposal. This is not an urgent request, as I can simply read
the counter file, but it makes the filecounter complete, at least
in my eyes.

>
> > 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.
Yes, I remember that. I'll take a look into cookie.ws3 again.
Nevertheless, I like the idea of having a command that delivers
a date string conformant to RFC 1123, independent of platforms
or timezones. After all, websh has to deal with web stuff (think
of the 'Last-Modified' header or expiry dates).
>
> > All in all, good work! I'll complete my upgrade to this version.
>
> Thanks :-)
Pleasure.

Cheers

Ulrich


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to