🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by he... Heikki Kantola Wed, 25 Feb 1998 00:00
Slrn: customizing dates in attributions with slang
#39096
Author: he... Heikki Kantola
Date: Wed, 25 Feb 1998 00:00
26 lines
1971 bytes

As unfortunately Slrn and slang don't support locales and especially
formatting localized dates with strftime(), I've been trying to write 
macros to translate the dates. Writing the code to do the actual
conversion has been easy (just extract parts of date with strchopr() 
and then construct new date string by changing what is needed). But 
getting this function to insert correct date into attributions has
proven to be quite a problem. First I tried to change attribution
within article_mode_hook() as the change has to be group specific, I 
don't want Finnish dates into English-language newsgroups and vice
versa. I found out that didn't work except for the first article of
the group as that hook is executed just once per group. So, tried
moving the code into followup_hook(), which appears to work fine in
some places, but rather often I also get a stack overflow...

So, any hints how to get nice localized dates in attributions?
I don't feel like trying to snitch locale code from Mutt mail reader
and patching Slrn with it just now...

-- 
Heikki "Hezu" Kantola, <Heikki...@IKI.FI>
Lähettämällä mainoksia tai muuta asiatonta sähköpostia yllä olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Re: Slrn: customizing dates in attributions with slang
#39127
Author: lah... Jan Hlavacek
Date: Thu, 26 Feb 1998 00:00
20 lines
1480 bytes

On 25 Feb 1998 09:15:24 GMT, Heikki Kantola <he...@iki.fi> wrote:
> As unfortunately Slrn and slang don't support locales and especially
> formatting localized dates with strftime(), I've been trying to write 
> macros to translate the dates. Writing the code to do the actual
(snip)
> the group as that hook is executed just once per group. So, tried
> moving the code into followup_hook(), which appears to work fine in
> some places, but rather often I also get a stack overflow...

Why?

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lah...@math.mps.ohio-state.edu>  (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/
Re: Slrn: customizing dates in attributions with slang
#39135
Author: he... Heikki Kantola
Date: Thu, 26 Feb 1998 00:00
28 lines
1940 bytes

Jan Hlavacek <lah...@math.mps.ohio-state.edu> informed
news.software.readers with the following:
>On 25 Feb 1998 09:15:24 GMT, Heikki Kantola <he...@iki.fi> wrote:
>> As unfortunately Slrn and slang don't support locales and especially
>> formatting localized dates with strftime(), I've been trying to write 
>> macros to translate the dates. Writing the code to do the actual
>(snip)
>> the group as that hook is executed just once per group. So, tried
>> moving the code into followup_hook(), which appears to work fine in
>> some places, but rather often I also get a stack overflow...

Oops, it was actually an stack underflow (didn't look at the error
message carefully enough :( )...

>Why?

..which was caused by my stupid mistake I found today: I popped out
the first element of the stack and didn't do anything with it if it
didn't look like a weekday name (or actually 3-letter abreviation)...

-- 
Heikki "Hezu" Kantola, <Heikki...@IKI.FI>
Lähettämällä mainoksia tai muuta asiatonta sähköpostia yllä olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads