[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.99.16 - strftime - expansion of the % character
From: |
Danny Backx |
Subject: |
Re: 1.99.16 - strftime - expansion of the % character |
Date: |
Wed, 16 Jan 2002 22:05:03 +0100 |
It appears to be at line 495 in oleofile.c, but I haven't got a fix yet.
Please feel free to provide one if you can, I'm tied up right now.
Danny
Kev Buckley wrote:
>
> Apologies for not having trawled through the oleo code yet but I
> wanted to flag thsi up and see if you alreayd have a fix as I cant
> believe you wont have had this one already posted.
>
> I Enter the following into a cell
>
> @strftime("%d-%b-%Y", @ymd(2002, 1, 14))
>
> so that it displays
>
> 14-Feb-2002
>
> Oleo automatically displays teh contents of that cell in the staus line as
>
> A1 "14-Feb-2002"address@hidden("%%d-%%b-%%Y", @ymd(2002, 1, 14))]
>
> When I save the spreadshet, the top of oleo file shows:
>
> # format 2.1 (requires Oleo 1.99.9 or higher)
> F;DGFL8
> O;auto;background;a0;ticks 1
> C;c1;r1;Estrftime("%%d-%%b-%%Y", ymd(2002, 1, 14));K"14-Feb-2002"
> O;status 2
> W;N1;A1 1;C7 0 7;Ostandout
> GDx""
> GDy""
> Gt0
> and so on
>
> when I read it back in the status line now shows
>
> A1 "14-Feb-2002"address@hidden("%%%%d-%%%%b-%%%%Y", @ymd(2002, 1, 14))]
>
> This is OK initially, as the constant value from the K"14-Feb-2002"
> field in the external file gets shown in the spreadsheet - but
> problems arise if you edit the args to the ymd function, because the
> strftime fails (with good reason I reckon) to interpret the multiple
> %s in its format argument on recalculation and shows:
>
> %%d-%%b-%%Y
>
> OK, my guess is that whatever code parses the cell entries is missing
> the fact that the % characters are inside a "" pair and is expanding
> them.
>
> So, is this a "known" bug ?
>
> Once I realised what was happening, it has become faily easy to alter
> the external file to remove the spurious %s and, as the args to the
> ymd function are still preserved, it loads OK again next time around.
>
> For info I'm running
>
> oleo-1.99.16 (in a terminal window)
>
> on a LinuxFromScratch-type installation that currently has a 2.4.16
> kernel with glibc-2.1.3
>
> As I say, I will try and take a look at the oleo code at some point,
> assuming this hasn't already been fixed.
>
> All the best for now,
> Kevin
>
> --
> Regards,
>
> ----------------------------------------------------------------------
> * Kevin M. Buckley e-mail: address@hidden *
> * *
> * Systems Administrator *
> * Computer Centre *
> * Lancaster University Voice: +44 (0) 1524 5 93718 *
> * LANCASTER. LA1 4YW Fax : +44 (0) 1524 5 25113 *
> * England. *
> * *
> * My PC runs Linux/GNU, you still computing the Bill Gate$' way ? *
> ----------------------------------------------------------------------
--
Danny Backx (address@hidden address@hidden)
Home page : http://users.skynet.be/danny.backx
Projects: LessTif (http://www.lesstif.org)
Oleo (http://www.gnu.org/software/oleo/oleo.html)