Permalink
Browse files

import today's FreeBSD sed.

  • Loading branch information...
1 parent 780cf21 commit 20d93dc76c242871e6e6a8bea429643aca533b0a christos committed Jun 6, 2014
Showing with 1,212 additions and 704 deletions.
  1. +9 −0 usr.bin/sed/Makefile
  2. +10 −4 usr.bin/sed/POSIX
  3. +382 −214 usr.bin/sed/compile.c
  4. +21 −17 usr.bin/sed/defs.h
  5. +13 −16 usr.bin/sed/extern.h
  6. +230 −92 usr.bin/sed/main.c
  7. +12 −82 usr.bin/sed/misc.c
  8. +301 −167 usr.bin/sed/process.c
  9. +234 −112 usr.bin/sed/sed.1
View
@@ -1,6 +1,15 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $FreeBSD: head/usr.bin/sed/Makefile 265420 2014-05-06 04:22:01Z imp $
+
+.include <src.opts.mk>
PROG= sed
SRCS= compile.c main.c misc.c process.c
+WARNS?= 2
+
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
View
@@ -1,4 +1,5 @@
# @(#)POSIX 8.1 (Berkeley) 6/6/93
+# $FreeBSD: head/usr.bin/sed/POSIX 168417 2007-04-06 08:43:30Z yar $
Comments on the IEEE P1003.2 Draft 12
Part 2: Shell and Utilities
@@ -117,10 +118,15 @@ All uses of "POSIX" refer to section 4.55, Draft 12 of POSIX 1003.2.
1,3c\
text
- Historic implementations, and this implementation, do not output
- the text in the above example. The general rule, therefore,
- is that a range whose second address is never matched extends to
- the end of the input.
+ Historic implementations did not output the text in the above
+ example. Therefore it was believed that a range whose second
+ address was never matched extended to the end of the input.
+ However, the current practice adopted by this implementation,
+ as well as by those from GNU and SUN, is as follows: The text
+ from the 'c' command still isn't output because the second address
+ isn't actually matched; but the range is reset after all if its
+ second address is a line number. In the above example, only the
+ first line of the input will be deleted.
13. Historical implementations allow an output suppressing #n at the
beginning of -e arguments as well as in a script file. POSIX
Oops, something went wrong.

0 comments on commit 20d93dc

Please sign in to comment.