Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DFF19431FD0 for ; Tue, 25 Jan 2011 00:41:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2aEFHQ7A+1O7 for ; Tue, 25 Jan 2011 00:41:45 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id C2392431FB6 for ; Tue, 25 Jan 2011 00:41:45 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 857DB19F3300; Tue, 25 Jan 2011 09:41:44 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id 7LsLsPmMlUgd; Tue, 25 Jan 2011 09:41:43 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 2DE2B19F32F7; Tue, 25 Jan 2011 09:41:43 +0100 (CET) Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 2B81715C031; Tue, 25 Jan 2011 09:41:43 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1PheT8-0004Zw-Qh; Tue, 25 Jan 2011 09:41:42 +0100 From: Michal Sojka To: Jameson Rollins , notmuch@notmuchmail.org Subject: Re: [PATCH 1/4] Import date/time parser from GNU coreutils In-Reply-To: <87ei82uh8h.fsf@servo.finestructure.net> References: <1295783247-21900-1-git-send-email-sojkam1@fel.cvut.cz> <1295783247-21900-2-git-send-email-sojkam1@fel.cvut.cz> <87ei82uh8h.fsf@servo.finestructure.net> User-Agent: Notmuch/0.5-87-g9705d00 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 25 Jan 2011 09:41:42 +0100 Message-ID: <87r5c1iddl.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2011 08:41:47 -0000 On Mon, 24 Jan 2011, Jameson Rollins wrote: > On Sun, 23 Jan 2011 12:47:24 +0100, Michal Sojka wrote: > > This function have quite a lot dependencies. We may reduce them later it > > it is a problem. > > --- > > lib/c-ctype.c | 398 +++++++ > > lib/c-ctype.h | 297 +++++ > > lib/getdate.c | 3497 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > lib/getdate.h | 22 + > > lib/getdate.y | 1572 +++++++++++++++++++++++++ > > lib/gettime.c | 48 + > > lib/intprops.h | 83 ++ > > lib/timespec.h | 39 + > > lib/verify.h | 140 +++ > > 9 files changed, 6096 insertions(+), 0 deletions(-) > > create mode 100644 lib/c-ctype.c > > create mode 100644 lib/c-ctype.h > > create mode 100644 lib/getdate.c > > create mode 100644 lib/getdate.h > > create mode 100644 lib/getdate.y > > create mode 100644 lib/gettime.c > > create mode 100644 lib/gettime.h > > create mode 100644 lib/intprops.h > > create mode 100644 lib/timespec.h > > create mode 100644 lib/verify.h > > Hi, Michal. I don't fully understand what's going on here, but it seems > like you're embedding code copies from somewhere else. If that's the > case, is there a reason that we would need to do that, rather than just > linking against an external library? Well, if the embedded code is available in a library, it would be definitely better to just use the library. But the above code is statically linked to things like `date` command and is not available separately. Most of the dependencies could be eliminated since they usually replicate functionality which is available in modern C library and are there only for compatibility reasons. On the other hand, if anybody knows a better date parser, perhaps in a separate library, let me know. -Michal