From owner-freebsd-stable@freebsd.org Thu Oct 29 12:07:19 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED59F44EABE for ; Thu, 29 Oct 2020 12:07:19 +0000 (UTC) (envelope-from db@db.net) Received: from tfm.com (mtbaker.tfm.com [192.231.224.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.tfm.com", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMPMB62hgz4dn5; Thu, 29 Oct 2020 12:07:18 +0000 (UTC) (envelope-from db@db.net) Received: from night.db.net (DB-DSL.ServerNorth.com [98.124.61.131]) (authenticated bits=0) by tfm.com (8.14.4/8.14.4) with ESMTP id 09TC73pB006308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Oct 2020 05:07:05 -0700 (PDT) Date: Thu, 29 Oct 2020 08:07:02 -0400 From: Diane Bruce To: "Julian H. Stacey" Cc: Stefan Esser , freebsd-stable , Greg Balfour Subject: Re: calendar (1) - patch to correct error description Message-ID: <20201029120702.GA44939@night.db.net> References: <3ec7872e-c264-e05f-cc3b-bbd2f421a97f@freebsd.org> <202010290029.09T0Td4m004819@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202010290029.09T0Td4m004819@fire.js.berklix.net> X-Rspamd-Queue-Id: 4CMPMB62hgz4dn5 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of db@db.net has no SPF policy when checking 192.231.224.2) smtp.mailfrom=db@db.net X-Spamd-Result: default: False [1.05 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; FREEFALL_USER(0.00)[db]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-0.68)[-0.683]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[db.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.78)[-0.780]; NEURAL_SPAM_LONG(0.11)[0.114]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:10488, ipnet:192.231.224.0/22, country:US]; SUSPICIOUS_RECIPS(1.50)[]; MAILMAN_DEST(0.00)[freebsd-stable] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 12:07:20 -0000 On Thu, Oct 29, 2020 at 01:29:39AM +0100, Julian H. Stacey wrote: > Hi Stefan > > Am 28.10.20 um 13:02 schrieb Julian H. Stacey: > > > man calendar states: > > > "The calendar internal cpp does not correctly do #ifndef and will discard > > > the rest of the file if a #ifndef is triggered." > > > That is wrong, as proved by test file: If I was asked about this I'd suggest ripping out the internal cpp and switching back to an external cpp IFF calendar is all in ports. The idea when the original very hurried hack was done was to remove more from base. No longer a problem if using ports. > > > --- > > > // Test data for ~/.calendar/calendar > > > * bla0 ... > > This is not obvious from reading the man-page and it might be more > > intuitive, if the identifier was only the word up to the first blank, > > Yes > > > but the code in the calendar program does just strip off leading and > > trailing white-space. It might be too late to change this behavior. > > Hopefully not too late. > Either way, Ameliorations: > - Do a global edit in manual from "cpp" to "pre-processor" > to remove expectation of similarity to cpp. > - Define in manual exactly how the pre-processor handles defines. > > > > I have updated the code in -CURRENT to support #ifdef (MFC in 3 days) > > Nice > > > > and I plan to add supported for nested conditions in -CURRENT > > Nice > > > > (not > > sure whether that should be merged to -STABLE, though). > > Probably yes ? > > > > I could change the #define and #if/ifndef to only consider the first > > following word, but do not plan to do that at this time. > > Would be good if you did, silently swallowing space seperated text > as extended name of a define instead of value of define, is not > intuitive, At least document if you have no time to change it please ? > > Fixing documenting & extanding a pp in calendar could become like > re-inventing the wheel ? As a cpp is in src/ & not ports, can't > calendar use popen(/usr/bin/cpp) & save work ? Looks like there's > enough work to do in main calendar without extra work of a custom > pre processor ? > > Thanks for copy of your reply to Greg Balfour's off list mail, ref > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205580 > which notes: > "This patch is against 11.4-RELEASE. Note that it requires > the installation of the devel/tradcpp port/package." > > I agree your policy point, FreeBSD can't use a port as dependency > to build calendar, while calendar is still build by src/ world. (& > not just for Free, but Net & Open BSD etc will have similiar views > I presume) Indeed I'd revert back to this. > > I don't know which cpp's from where might have been looked at in the past, > > > Regards, STefan > > Thanks ! > > Cheers, > -- > Julian Stacey, Consultant Sys. Eng. BSD Linux Unix, http://berklix.com/jhs/cv/ > Crash Brexit profits financial speculators in cabinet damaging Britain. > UK stole 3.7 million votes from Brits abroad 700 K in EU http://stolenvotes.uk Diane -- - db@FreeBSD.org db@db.net http://www.db.net/~db