[Sorry about the double post but I wanted to correct the subject line - David]

>  > > Arrgh!  Sorry, my fault.  I introduced new date parsing code in htdig
>>  > a couple months ago, and I thought I had tested it but evidently not
>>  > well enough.  On line 1142 of htdig/Retriever.cc, change the line:
>>  >
>>  >     while (isspace(*s))
>>  >
>>  > to:
>>  >
>>  >     while (*s == '-' || isspace(*s))
>>  > ----
>>
>>  Good point, Bill.  I just remembered this morning that I should have
>>  pointed this out.  David didn't explicitly mention whether he's using
>>  3.1.6 or 3.2.0b4, but if it's the former, he can get the fix above
>  > as a patch at

I'm using version 3.1.6

I made the change to line 1142 and tested and then saw line 1127 with 
a similar construct so changed that too. The result:

    UW PICO(tm) 2.3                 File: Retriever.cc                          

     while (*s == '-' || isspace(*s))
         s++;

     // get year...
     if (!isdigit(*s))
         return 0; 
     year = 0;
     while (isdigit(*s))
         year = year * 10 + (*s++ - '0');
     if (year < 69)
         year += 2000;
     else if (year < 1900)
         year += 1900;
     else if (year >= 19100)     // seen some programs do it, why not check?
         year -= (19100-2000);
//    while (isspace(*s)) // original line 1142
     while (*s == '-' || isspace(*s))
         s++;

           [ line 1127 of 1670 (67%), character 29056 of 41783 (69%) ]

I then did a ./configure, make and sudo make install (the sudo was 
needed to set permissions properly)

With one or both lines 'patched' I still can't use 1990/01/01 but 
1990 01 01 works. I notice that the returned date on the results page 
is shown as 12/31/89. Probably a time zone issue. I tried:

        <META Name="Date" Content="1990 01 01T12:00:00-6:00">

without effect.

Guess I'll play with the SSI side for a bit using spaces.

Thanks for the help

David
-- 
David Bourne
OUHSC College of Pharmacy
[EMAIL PROTECTED]

_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to