Bug 41190 - [patch] sed(1) report the { linenum instead of EOF linenum on pending }
Summary: [patch] sed(1) report the { linenum instead of EOF linenum on pending }
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.6-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-31 03:10 UTC by Cyrille Lefevre
Modified: 2017-12-31 22:27 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.23 KB, patch)
2002-07-31 03:10 UTC, Cyrille Lefevre
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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