From bill@duchess.wagill.com  Tue Jan 21 22:38:38 1997
Received: from duchess.wagill.com (duchess.wagill.com [198.182.208.147])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA18162
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Jan 1997 22:38:34 -0800 (PST)
Received: (from bill@localhost) by duchess.wagill.com (8.7.5/8.7.3) id WAA07611; Tue, 21 Jan 1997 22:38:18 -0800 (PST)
Message-Id: <199701220638.WAA07611@duchess.wagill.com>
Date: Tue, 21 Jan 1997 22:38:18 -0800 (PST)
From: Bill <bill@duchess.wagill.com>
Reply-To: bill@duchess.wagill.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Patch for calendar.c
X-Send-Pr-Version: 3.2

>Number:         2556
>Category:       bin
>Synopsis:       Patch for calendar.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 21 22:40:01 PST 1997
>Closed-Date:    Sun Jun 6 15:55:54 PDT 1999
>Last-Modified:  Sun Jun  6 15:56:18 PDT 1999
>Originator:     Bill
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
>Environment:

	FreeBSD duchess.wagill.com 2.1.5-RELEASE
	FreeBSD 2.1.5-RELEASE #0: Sat Jan 18 00:23:49 PST 1997
	root@duchess.wagill.com:/usr/src/sys/compile/DUCHESS  i386

>Description:

	I have implemented a small patch to calendar.c to allow forcing
	printing of a blank line in the ouput of calendar when a '%'
	character is found in the beginning of a line in the calendar
	file.  This blank line can separate groups of calendar entries,
	such as calendar entries from the stock BSD calendar files from
	entries in a personal calendar file.

	I wanted to make this (small and arguably insignificant) patch
	available, in case others were interested; if there is a (other)
	formal way to submit patches, please let me know.

	Here's the diff listing:

	--- calendar.c.BSD	Tue Jan 21 22:08:19 1997
	+++ calendar.c.NEW	Tue Jan 21 22:18:26 1997
	@@ -118,7 +118,7 @@
	 void
	 cal()
	 {
	-	register int printing;
	+	register int printing, skip;
	 	register char *p;
	 	FILE *fp;
	 	int ch;
	@@ -126,17 +126,26 @@
	 
	 	if ((fp = opencal()) == NULL)
	 		return;
	-	for (printing = 0; fgets(buf, sizeof(buf), stdin) != NULL;) {
	+	for (printing = 0, skip = 0; fgets(buf, sizeof(buf), stdin) != NULL;) {
	 		if ((p = strchr(buf, '\n')) != NULL)
	 			*p = '\0';
	 		else
	 			while ((ch = getchar()) != '\n' && ch != EOF);
	 		if (buf[0] == '\0')
	 			continue;
	+		if (buf[0] == '%') {
	+			skip = 1;
	+			continue;
	+		}
	 		if (buf[0] != '\t')
	 			printing = isnow(buf) ? 1 : 0;
	-		if (printing)
	+		if (printing) {
	+			if (skip) {
	+				skip = 0;
	+				(void)fprintf(fp, "\n");
	+			}
	 			(void)fprintf(fp, "%s\n", buf);
	+		}
	 	}
	 	closecal(fp);
	 }

>How-To-Repeat:

	

>Fix:
	
	

>Release-Note:
>Audit-Trail:

From: Guy Helmer <ghelmer@cs.iastate.edu>
To: freebsd-gnats-submit@freebsd.org, bill@duchess.wagill.com
Cc:  
Subject: Re: bin/2556: Patch for calendar.c
Date: Thu, 03 Jun 1999 21:48:30 -0500

 Nobody has taken up this patch in over two years; should this PR be
 closed?
 
 Guy Helmer
 ghelmer@freebsd.org
 

From: Bill <bill@wagill.com>
To: Guy Helmer <ghelmer@cs.iastate.edu>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/2556: Patch for calendar.c
Date: Thu, 3 Jun 1999 21:33:42 -0700 (PDT)

 On Thu, 3 Jun 1999, Guy Helmer wrote:
 
 > Nobody has taken up this patch in over two years; should this PR be
 > closed?
 
 Fine by me.
 
 - B.
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Jun 6 15:55:54 PDT 1999 
State-Changed-Why:  
Closed at originator's request. 
>Unformatted:
