Re: Style(9): Allow // comments

Stefan Esser <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.