On Wed, Nov 01 2017, Mark Kettenis <mark.kette...@xs4all.nl> wrote:
>> Date: Wed, 1 Nov 2017 17:04:44 +0100
>> From: Jan Stary <h...@stare.cz>
>> 
>> Doesn't OpenBSD strftime() ignore LC_TIME anyway?
>
> One day we will support it.  I see no reason to remove this call (or
> any of the others you're proposing).

Maybe we'll support LC_TIME one day.  But this use of LC_TIME looks
completely bogus to me: LC_TIME isn't supposed to be a strftime format
string...  I'll commit this soon unless I hear objections.

>> Index: pr.c
>> ===================================================================
>> RCS file: /cvs/src/usr.bin/pr/pr.c,v
>> retrieving revision 1.39
>> diff -u -p -r1.39 pr.c
>> --- pr.c     11 Nov 2015 02:52:46 -0000      1.39
>> +++ pr.c     1 Nov 2017 15:58:48 -0000
>> @@ -124,7 +124,6 @@ char     schar;          /* text column separation c
>>  int sflag;          /* -s option for multiple columns */
>>  int nohead;         /* do not write head and trailer */
>>  int pgwd;           /* page width with multiple col output */
>> -char        *timefrmt;      /* time conversion string */
>>  
>>  /*
>>   * misc globals
>> @@ -1546,7 +1545,7 @@ nxtfile(int argc, char *argv[], char **f
>>      /*
>>       * set up time field used in header
>>       */
>> -    if (strftime(buf, HDBUF, timefrmt, timeptr) == 0) {
>> +    if (strftime(buf, HDBUF, TIMEFMT, timeptr) == 0) {
>>      ++errcnt;
>>      if (inf != stdin)
>>          (void)fclose(inf);
>> @@ -2006,7 +2005,5 @@ setup(int argc, char *argv[])
>>      }
>>      }
>>  
>> -    if ((timefrmt = getenv("LC_TIME")) == NULL)
>> -    timefrmt = TIMEFMT;
>>      return(0);
>>  }
>> 
>> 
>


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to