bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] proposed new gawk time function strptime()


From: Ed Morton
Subject: Re: [bug-gawk] proposed new gawk time function strptime()
Date: Sat, 30 Mar 2019 11:03:33 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

IMHO bundling all time extension functions into the "time" library is the intuitively obvious choice plus people working with time may also need the existing gettimeofday from that library and if that were me I'd want to load just 1 "time" library rather than multiple separate libraries.

I'd be happy to help but this is WAY outside of my experience so I'm afraid you'd literally spend more time hand-holding me than if someone with related experience just did it.

    Ed.

On 3/30/2019 10:54 AM, Andrew J. Schorr wrote:
Hi,

Date: Thu, 28 Aug 2014 23:28:12 -0500
From: Ed Morton <address@hidden>

The proposed function is well defined, exists in other languages and so is well 
known, provides symmetry with an existing gawk function (strftime()), does not 
impact any other part of the language, I would imagine is about as easy as it 
can get to implement since it already exists in libraries, fits in like a 
missing puzzle piece to the existing set of gawk time functions, and the only 
impact to existing scripts would be if someone had their own function named 
strptime() defined.
On 8/29/2014 1:42 AM, Eli Zaretskii wrote:
Some old or non-Posix platforms will not have strptime in their
standard libraries, so we will need to import e.g. the gnulib
implementation.
On Thu, Mar 28, 2019 at 11:21:36AM -0500, Ed Morton wrote:
I know it's been a while since I opened
https://lists.gnu.org/archive/html/bug-gawk/2014-08/msg00024.html
but I just came across the "time" library 
(https://www.gnu.org/software/gawk/manual/html_node/Extension-Sample-Time.html#Extension-Sample-Time).
Any chance of getting strptime() added to that if not to the main
gawk code?
To do this, one would need to patch extension/configure.ac to add strptime to
AC_CHECK_FUNCS, and then we'd need a portable implementation to use on
platforms where it's not present to go in missing_d/strptime.c. I'm pretty
certain this new function will not be added to core gawk; I believe the goal is
to stabilize core gawk and add new features in extension libraries where
possible.  A strptime function could potentially go in the bundled time
library, a separate bundled library, or a new library in the gawkextlib
project; I'm not sure which makes most sense. And then, of course, somebody
needs to do the work...

Regards,
Andy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]