sed(1): Sync with FreeBSD.
authorSascha Wildner <saw@online.de>
Sat, 13 Jun 2009 11:39:15 +0000 (13:39 +0200)
committerSascha Wildner <saw@online.de>
Sat, 13 Jun 2009 11:39:51 +0000 (13:39 +0200)
commitd2af8296ab6d4e1e5051eccb7f51815bbda7a71f
tree3952c3e30f6d01a85fb850c85971baaaf028877b
parentc6218e1e2acba73036e7a7c1957696214f309486
sed(1): Sync with FreeBSD.

* Add workaround for a back reference when no corresponding parenthesized
  subexpression is defined. For example, the following command line caused
  unexpected behavior like segmentation fault:

  % echo test | sed -e 's/test/\1/'

* Fix the code to conform to the "or more" part of the following POSIX
  specification.

  "A function can be preceded by one or more '!' characters, in which
  case the function shall be applied if the addresses do not select
  the pattern space."

* Implement "addr1,+N" ranges - not dissimilar to grep's -A switch.
usr.bin/sed/compile.c
usr.bin/sed/defs.h
usr.bin/sed/misc.c
usr.bin/sed/process.c
usr.bin/sed/sed.1