Bug 41190

Summary: [patch] sed(1) report the { linenum instead of EOF linenum on pending }
Product: Base System Reporter: Cyrille Lefevre <cyrille.lefevre>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: tjr
Priority: Normal Keywords: patch
Version: 4.6-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Cyrille Lefevre 2002-07-31 03:10:01 UTC
	actually, sed reports the EOF linenum on pending }. this patch
	makes sed to report the { linenum instead.

How-To-Repeat: 	fetch http://queen.rett.polimi.it/~paolob/seders/scripts/sokoban.sed
	sed -f sokoban.sed
	sed: 2266: /root/sokoban.sed: unexpected EOF (pending }'s)

	patched version says :
	sed: 2063: /root/sokoban.sed: unexpected EOF (pending }'s)
	which is more accurate, IMHO.
Comment 1 corecode@corecode.ath.cx 2002-07-31 15:52:50 UTC
On Wed, 31 Jul 2002 04:00:13 +0200 (CEST) Cyrille Lefevre wrote:

> >Description:
> 	actually, sed reports the EOF linenum on pending }. this patch
> 	makes sed to report the { linenum instead.

i think that's counter-intuitive as all programs i know of report the
line containing the error (pending }) and don't guess about where it
could have originated:

% echo 'foo() {' > foo.c && cc foo.c
foo.c: In function `foo':
foo.c:2: syntax error at end of input

cheers
  simon

-- 
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Comment 2 cyrille.lefevre-lists 2013-04-08 23:45:06 UTC
ping more than 10 years after... !
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:41 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:29 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>