Date: Sun, 31 Jul 2022 07:42:44 +0200 From: Stefan Esser <se@FreeBSD.org> To: "Julian H. Stacey" <jhs@berklix.com> Cc: "freebsd-arch@freebsd.org" <freebsd-arch@FreeBSD.org> Subject: Re: Style(9): Allow // comments Message-ID: <d0fd76e1-50b2-f4ae-78c2-7be622075172@FreeBSD.org> In-Reply-To: <202207302325.26UNP8Dl028217@lapr.no.berklix.net> References: <202207302325.26UNP8Dl028217@lapr.no.berklix.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 31.07.22 um 01:25 schrieb Julian H. Stacey: > Beware // as a delimeter in calendar files, exaples below. > Nov 5 Fireworks in UK https://en.wikipedia.org/wiki/Guy_Fawkes_Night > > I have 248 lines match on > http://berklix.com/~jhs/src/bsd/fixes/freebsd/src/gen/usr.bin/calendar/ > find . -type f | xargs grep // | grep http | grep -v /no_customise/ | wc -l > > Most http[s]:// are in commented out blocks, but some are uncommented, eg: > > Oct Sun-1 Munich Oktoberfest ends http://www.oktoberfest.de > /* Not sure if exact algorithm, probably first Sun. in Oct, > * but might be Sunday of 1st full weekend in Oct? > * I've kept a log to later deduce, see > * http://www.berklix.com/~jhs/src/bsd/fixes/freebsd/src/gen/usr.bin/calendar/calendars/de_DE.ISO8859-1/bavaria/munich/calendar.other > * Start date is more problematic, being > * Saturday with 16 days to end on Sunday. > * & Parade as Friday with 17 days before end, > * An easter-16 type fuctionality would be nice. > */ I am not sure what you are trying to say with your comment ... For one thing, calendar files are not C source code, which is the subject of the proposed change to allow C++ style single line commends. And I did not see any issues with the use of // in URLs in calendar files in my testing. I had extended the parsing of calendar files to reintroduce conditional sections, definitions, and comments as previously implemented by processing by the traditional C preprocessor, and I have been waiting for your feedback on whether these features work correctly. The calendar program treats // as the start of a comment only at the beginning of a line or if it follows white space. This detail was missing in the calendar man page and I have just added it on -CURRENT. Please let me know if calendar files are not parsed as expected and as documented. Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d0fd76e1-50b2-f4ae-78c2-7be622075172>