NetBSD Problem Report #1046

From gnats  Fri May 12 18:11:24 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id SAA19868 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 12 May 1995 18:11:24 -0700
Message-Id: <199505122318.JAA17880@nemeton.com.au>
Date: Sat, 13 May 1995 09:18:53 +1000
From: Giles Lean <giles@nemeton.com.au>
Reply-To: giles@nemeton.com.au
To: gnats-bugs@NetBSD.ORG
Subject: col(1) outputs blank line when given empty input file
X-Send-Pr-Version: 3.2

>Number:         1046
>Category:       misc
>Synopsis:       col(1) outputs blank line when given empty input file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 12 18:20:03 +0000 1995
>Closed-Date:    Thu Feb 08 18:16:24 +0000 1996
>Last-Modified:  Thu Feb 08 18:20:05 +0000 1996
>Originator:     Giles Lean
>Release:        1.0
>Organization:
Giles Lean                                             Nemeton Pty Ltd
<giles@nemeton.com.au>                           phone: +61 3 480 2118        
>Environment:

System: NetBSD nemeton.com.au 1.0 NetBSD 1.0 (NEMETON) #16: Sat Feb 11 09:03:41 EST 1995 giles@nemeton.com.au:/usr/src/sys/arch/i386/compile/NEMETON i386


>Description:
	When given empty input col(1) outputs a blank line. This is not
	consistent with the SysV behaviour.

>How-To-Repeat:
	col < /dev/null
>Fix:
*** src/usr.bin/col/col.c.orig	Sun Mar 26 21:24:09 1995
--- src/usr.bin/col/col.c	Sat May 13 09:04:23 1995
***************
*** 313,319 ****
  	nblank_lines = max_line - this_line;
  	if (max_line & 1)
  		nblank_lines++;
! 	else if (!nblank_lines)
  		/* missing a \n on the last line? */
  		nblank_lines = 2;
  	flush_blanks();
--- 313,319 ----
  	nblank_lines = max_line - this_line;
  	if (max_line & 1)
  		nblank_lines++;
! 	else if (!nblank_lines && l->l_max_col)
  		/* missing a \n on the last line? */
  		nblank_lines = 2;
  	flush_blanks();
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Thu Feb 8 13:16:24 EST 1996 
State-Changed-Why:  
Already fixed (differently). 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.