[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #BCV-688489]: "hours ref xxxxx" type of units no longer allowed?



Mary,

Thanks for sending this in. Special thanks for pointing out where the problem 
lay.

Yeah, the parsing of offset time units has always been a problem. 
Unfortunately, the unit-tests didn't cover the use of "ref" is such a 
specification. 

They do now.

I've modified the code to accept "ref" in an offset time-unit. If the change 
passes all the testing, then it'll be out very soon as a new version.

> Hi,
> 
> I recently upgraded from Udunits V2.1.24 to V2.2.16.
> 
> I have an interface to utCalendar2_cal that is failing when I use units of
> "hours ref 1-1-1 00:00:0.0". It doesn't seem to like the "ref" keyword any
> more.
> 
> I wasn't sure if you were still supporting this code, but am wondering if
> this is a bug or an intentional change?
> 
> I don't have a simple code that demonstrates the problem, because I'm using
> an interface on top of an interface on top of an interface.  But, I think
> this is in the Udunits code, because I see this in "scanner.l":
> 
> {space}*{ref}{space}* {
> BEGIN INITIAL;
> return SHIFT
> }
> 
> <INITIAL,ID_SEEN>{space}*(@|{after}|{from}|{since}){space}* {
> BEGIN SHIFT_SEEN;
> return SHIFT;
> }
> 
> whereas in V2.1.24 it looked like this:
> 
> {space}*(@|{after}|{from}|{since}|{ref}){space}* {
> BEGIN(INITIAL);
> return SHIFT;
> }
> 
> 
> Note that "ref" is now in its own code sniplet in the newer version.
> 
> This is not a pressing issue for me. I can compile against the older
> version for now.
> 
> --Mary


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: BCV-688489
Department: Support UDUNITS
Priority: Normal
Status: Closed