Bug 184648 - Regression: some comments in calendar OK in 9.1, fail in 10.0-BETA4
Summary: Regression: some comments in calendar OK in 9.1, fail in 10.0-BETA4
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-BETA4
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 01:00 UTC by jhs
Modified: 2014-03-15 21:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhs 2013-12-10 01:00:00 UTC
	Regression: some comments in calendar OK in 9.1, fail in 10.0-BETA4

Fix: 

I assume it's yet another problem from changing the compiler & thus cpp.
It only fails wth a leading tab, not leading spaces.

One could weasel out by quoting man calendar text
	"If the first character in the line is a <tab>
	character, it is treated as a continuation of the
	previous line"
which preceeds
	"Empty lines and lines pro- tected by the C commenting
	syntax (/* ... */) are ignored."
But it used to work, & the manual has not changed its wording,
just the binary now functions worse.

I'll keep a note of this send-pr at:
http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/usr.bin/calendar/send-pr.comments_delimiting+cpp.no_customise
How-To-Repeat: 	
	Put this in your ~/.calendar/calendar 
	(Either do not use a mouse to copy, or if you do, repair tabs after)
--- cut --- Start of Input Test Data
Wednesday	Test 1
/* Test 1, First of 2 lines of comments beginning on left margin
  Test 1, second of 2 lines, beginning with 2 spaces */

Wednesday	Test 2
/* Test 2, First of 2 lines of comments beginning on left margin 
	Test 2, second of 2 lines, beginning with 1 tab */

Wednesday	Test 3
  /* Test 3, First of 2 lines of comments beginning with 2 spaces
  Test 3, second of 2 lines, beginning with 2 spaces 3 */

Wednesday	Test 4
	/* Test 4, First of 2 lines of comments beginning with 1 tab
  Test 4, second of 2 lines, beginning with 2 spaces */

Wednesday	Test 5
	/* Test 5, First of 2 lines of comments beginning with 1 tab
	Test 5, second of 2 lines, beginning with 1 tab */
--- cut --- End Of Input Test Data, + Start of good output from 9.1-RELEASE
Dec 11* Test 5
Dec 11* Test 4
Dec 11* Test 3
Dec 11* Test 2
Dec 11* Test 1
--- cut --- Start of bad output from 10.0-BETA4
Dec 11*	Test 5
	/* Test 5, First of 2 lines of comments beginning with 1 tab
	Test 5, second of 2 lines, beginning with 1 tab */
Dec 11*	Test 4
	/* Test 4, First of 2 lines of comments beginning with 1 tab
Dec 11*	Test 3
Dec 11*	Test 2
	Test 2, second of 2 lines, beginning with 1 tab */
Dec 11*	Test 1
--- cut ---
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2013-12-10 01:08:08 UTC
On Mon, Dec 9, 2013 at 7:54 PM, Julian H. Stacey <jhs@berklix.com> wrote:
>...
> I assume it's yet another problem from changing the compiler & thus cpp.

This assumption is wrong.  It likely originates from the addition of
cpp like behavior to calendar itself.

db@, can you please have a look?


-- 
Eitan Adler
Comment 2 fullermd 2013-12-10 01:12:14 UTC
> I assume it's yet another problem from changing the compiler & thus
> cpp.

Technically, it's due to no longer using cpp at all, but implementing
pieces of it internally in

<http://svnweb.freebsd.org/base?view=revision&revision=255715>

X-ref a mail I sent to -current about hiccups it left, including a
comment-related one:

<http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045829.html>
Comment 3 oliver 2014-03-15 18:11:53 UTC
Duplicate / same issue as bin/186294

A patch that fixes this issue can be found there.

Greetings, oliver
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2014-03-15 21:14:16 UTC
State Changed
From-To: open->closed

see bin/186294.