VirtualBox

source: kBuild/vendor/sed/current/NEWS

Last change on this file was 599, checked in by bird, 18 years ago

GNU sed 4.1.5.

File size: 16.3 KB
Line 
1Sed 4.1.5
2
3* fix parsing of a negative character class not including a closed bracket,
4 like [^]] or [^]a-z].
5
6* fix parsing of [ inside an y command, like y/[/A/.
7
8* output the result of commands a, r, R when a q command is found.
9
10----------------------------------------------------------------------------
11Sed 4.1.4
12
13* \B correctly means "not on a word boundary" rather than "inside a word"
14
15* bugfixes for platform without internationalization
16
17* more thorough testing framework for tarballs (`make full-distcheck')
18
19----------------------------------------------------------------------------
20Sed 4.1.3
21
22* regex addresses do not use leftmost-longest matching. In other words,
23 /.\+/ only looks for a single character, and does not try to find as
24 many of them as possible like it used to do.
25
26* added a note to BUGS and the manual about changed interpretation
27 of `s|abc\|def||', and about localization issues.
28
29* fixed --disable-nls build problems on Solaris.
30
31* fixed `make check' in non-English locales.
32
33* `make check' tests the regex library by default if the included regex
34 is used (regex tests had to be enabled separately up to now).
35
36----------------------------------------------------------------------------
37Sed 4.1.2
38
39* fix bug in 'y' command in multi-byte character sets
40
41* fix severe bug in parsing of ranges with an embedded open bracket
42
43* fix off-by-one error when printing a "bad command" error
44
45----------------------------------------------------------------------------
46Sed 4.1.1
47
48* preserve permissions of in-place edited files
49
50* yield an error when running -i on terminals or other non regular files
51
52* do not interpret - as stdin when running in in-place editing mode
53
54* fix bug that prevented 's' command modifiers from working
55
56----------------------------------------------------------------------------
57Sed 4.1
58
59* // matches the last regular expression even in POSIXLY_CORRECT mode.
60
61* change the way we treat lines which are not terminated by a newline.
62Such lines are printed without the terminating newline (as before)
63but as soon as more text is sent to the same output stream, the
64missing newline is printed, so that the two lines don't concatenate.
65The behavior is now independent from POSIXLY_CORRECT because POSIX
66actually has undefined behavior in this case, and the new implementation
67arguably gives the ``least expected surprise''. Thanks to Stepan
68Kasal for the implementation.
69
70* documentation improvements, with updated references to the POSIX.2
71specification
72
73* error messages on I/O errors are better, and -i does not leave temporary
74files around (e.g. when running ``sed -i'' on a directory).
75
76* escapes are accepted in the y command (for example: y/o/\n/ transforms
77o's into newlines)
78
79* -i option tries to set the owner and group to the same as the input file
80
81* `L' command is deprecated and will be removed in sed 4.2.
82
83* line number addresses are processed differently -- this is supposedly
84conformant to POSIX and surely more idiot-proof. Line number addresses
85are not affected by jumping around them: they are activated and
86deactivated exactly where the script says, while previously
87 5,8b
88 1,5d
89would actually delete lines 1,2,3,4 and 9 (!).
90
91* multibyte characters are taken in consideration to compute the
92operands of s and y, provided you set LC_CTYPE correctly. They are
93also considered by \l, \L, \u, \U, \E.
94
95* [\n] matches either backslash or 'n' when POSIXLY_CORRECT.
96
97* new option --posix, disables all GNU extensions. POSIXLY_CORRECT only
98disables GNU extensions that violate the POSIX standard.
99
100* options -h and -V are not supported anymore, use --help and --version.
101
102* removed documentation for \s and \S which worked incorrectly
103
104* restored correct behavior for \w and \W: match [[:alnum:]_] and
105[^[:alnum:]_] (they used to match [[:alpha:]_] and [^[:alpha:]_]
106
107* the special address 0 can only be used in 0,/RE/ or 0~STEP addresses;
108other cases give an error (you are hindering portability for no reason
109if specifying 0,N and you are giving a dead command if specifying 0
110alone).
111
112* when a \ is used to escape the character that would terminate an operand
113of the s or y commands, the backslash is removed before the regex is
114compiled. This is left undefined by POSIX; this behavior makes `s+x\+++g'
115remove occurrences of `x+', consistently with `s/x\///g'. (However, if
116you enjoy yourself trying `s*x\***g', sed will use the `x*' regex, and you
117won't be able to pass down `x\*' while using * as the delimiter; ideas on
118how to simplify the parser in this respect, and/or gain more coherent
119semantics, are welcome).
120
121
122----------------------------------------------------------------------------
123Sed 4.0.9
124
125* 0 address behaves correctly in single-file (-i and -s) mode.
126
127* documentation improvements.
128
129* tested with many hosts and compilers.
130
131* updated regex matcher from upstream, with many bugfixes and speedups.
132
133* the `N' command's feature that is detailed in the BUGS file was disabled
134by the first change below in sed 4.0.8. The behavior has now been
135restored, and is only enabled if POSIXLY_CORRECT behavior is not
136requested.
137
138----------------------------------------------------------------------------
139Sed 4.0.8
140
141* fix `sed n' printing the last line twice.
142
143* fix incorrect error message for invalid character classes.
144
145* fix segmentation violation with repeated empty subexpressions.
146
147* fix incorrect parsing of ^ after escaped (.
148
149* more comprehensive test suite (and with many expected failures...)
150
151----------------------------------------------------------------------------
152Sed 4.0.7
153
154* VPATH builds working on non-glibc machines
155
156* fixed bug in s///Np: was printing even if less than N matches were
157found.
158
159* fixed infinite loop on s///N when LHS matched a null string and
160there were not enough matches in pattern space
161
162* behavior of s///N is consistent with s///g when the LHS can match
163a null string (and the infinite loop did not happen :-)
164
165* updated some translations
166
167----------------------------------------------------------------------------
168Sed 4.0.6
169
170* added parameter to `v' for the version of sed that is expected.
171
172* configure switch --without-included-regex to use the system regex matcher
173
174* fix for -i option under Cygwin
175
176----------------------------------------------------------------------------
177Sed 4.0.5
178
179* portability fixes
180
181* improvements to some error messages (e.g. y/abc/defg/ incorrectly said
182`excess characters after command' instead of `y arguments have different
183lengths')
184
185* `a', `i', `l', `L', `r' accept two addresses except in POSIXLY_CORRECT
186mode. Only `q' and `Q' do not accept two addresses in standard (GNU) mode.
187
188----------------------------------------------------------------------------
189Sed 4.0.4
190
191* documentation fixes
192
193* update regex matcher
194
195----------------------------------------------------------------------------
196Sed 4.0.3
197
198* fix packaging problem (two missing translation catalogs)
199
200----------------------------------------------------------------------------
201Sed 4.0.2
202
203* more translations
204
205* fix build problems (vpath builds and bootstrap builds)
206
207----------------------------------------------------------------------------
208Sed 4.0.1
209
210* Remove last vestiges of super-sed
211
212* man page automatically built
213
214* more translations provided
215
216* portability improvements
217
218----------------------------------------------------------------------------
219Sed 4.0
220
221* Update regex matcher
222
223----------------------------------------------------------------------------
224Sed 3.96
225
226* `y' command supports multibyte character sets
227
228* Update regex matcher
229
230----------------------------------------------------------------------------
231Sed 3.95
232
233* `R' command reads a single line from a file.
234
235* CR-LF pairs are always ignored under Windows, even if (under Cygwin)
236a disk is mounted as binary.
237
238* More attention to errors on stdout
239
240* New `W' command to write first line of pattern space to a file
241
242* Can customize line wrap width on single `l' commands
243
244* `L' command formats and reflows paragraphs like `fmt' does.
245
246* The test suite makefiles are better organized (this change is
247transparent however).
248
249* Compiles and bootstraps out-of-the-box under MinGW32 and Cygwin.
250
251* Optimizes cases when pattern space is truncated at its start or at
252its end by `D' or by a substitution command with an empty RHS.
253For example scripts like this,
254
255 seq 1 10000 | tr \\n \ | ./sed ':a; s/^[0-9][0-9]* //; ta'
256
257whose behavior was quadratic with previous versions of sed, have
258now linear behavior.
259
260* New command `e' to pipe the output of a command into the output
261of sed.
262
263* New option `e' to pass the output of the `s' command through the
264Bourne shell and get the result into pattern space.
265
266* Switched to obstacks in the parser -- less memory-related bugs
267(there were none AFAIK but you never know) and less memory usage.
268
269* New option -i, to support in-place editing a la Perl. Usually one
270had to use ed or, for more complex tasks, resort to Perl; this is
271not necessary anymore.
272
273* Dumped buffering code. The performance loss is 10%, but it caused
274bugs in systems with CRLF termination. The current solution is
275not definitive, though.
276
277* Bug fix: Made the behavior of s/A*/x/g (i.e. `s' command with a
278possibly empty LHS) more consistent:
279
280 pattern GNU sed 3.x GNU sed 4.x
281 B xBx xBx
282 BC xBxCx xBxCx
283 BAC xBxxCx xBxCx
284 BAAC xBxxCx xBxCx
285
286* Bug fix: the // empty regular expressions now refers to the last
287regular expression that was matched, rather than to the last
288regular expression that was compiled. This richer behavior seems
289to be the correct one (albeit neither one is POSIXLY_CORRECT).
290
291* Check for invalid backreferences in the RHS of the `s' command
292(e.g. s/1234/\1/)
293
294* Support for \[lLuUE] in the RHS of the `s' command like in Perl.
295
296* New regular expression matcher
297
298* Bug fix: if a file was redirected to be stdin, sed did not consume
299it. So
300 (sed d; sed G) < TESTFILE
301
302double-spaced TESTFILE, while the equivalent `useless use of cat'
303 cat TESTFILE | (sed d; sed G)
304
305printed nothing (which is the correct behavior). A test for this
306bug was added to the test suite.
307
308* The documentation is now much better, with a few examples provided,
309and a thorough description of regular expressions. The manual often
310refers to "GNU extensions", but if they are described here they are
311specific to this version.
312
313* Documented command-line option:
314 -r, --regexp-extended
315 Use extended regexps -- e.g. (abc+) instead of \(abc\+\)
316
317* Added feature to the `w' command and to the `w' option of the `s'
318command: if the file name is /dev/stderr, it means the standard
319error (inspired by awk); and similarly for /dev/stdout. This is
320disabled if POSIXLY_CORRECT is set.
321
322* Added `m' and `M' modifiers to `s' command for multi-line
323matching (Perl-style); in addresses, only `M' works.
324
325* Added `Q' command for `silent quit'; added ability to pass
326an exit code from a sed script to the caller.
327
328* Added `T' command for `branch if failed'.
329
330* Added `v' command, which is a do-nothing intended to fail on
331seds that do not support GNU sed 4.0's extensions.
332
333----------------------------------------------------------------------------
334Sed 3.02.80
335
336* Started new version nomenclature for pre-3.03 releases. (I'm being
337pessimistic in assuming that .90 won't give me enough breathing room.)
338
339* Bug fixes: the regncomp()/regnexec() interfaces proved to be inadequate to
340properly handle expressions such as "s/\</#/g". Re-abstracted the regex
341code in the sed/ tree, and now use the re_search_2() interface to the GNU
342regex routines. This change also fixed a bug where /./ did not match the
343NUL character. Had the glibc folk fix a bug in lib/regex.c where
344's/0*\([0-9][0-9]\)/X\1X/' failed to match on input "002".
345
346* Added new command-line options:
347 -u, --unbuffered
348 Do not attempt to read-ahead more than required; do not buffer stdout.
349 -l N, --line-length=N
350 Specify the desired line-wrap length for the `l' command.
351 A length of "0" means "never wrap".
352
353* New internationalization translations added: fr ru de it el sk pt_BR sv
354(plus nl from 3.02a).
355
356* The s/// command now understands the following escapes
357(in both halves):
358 \a an "alert" (BEL)
359 \f a form-feed
360 \n a newline
361 \r a carriage-return
362 \t a horizontal tab
363 \v a vertical tab
364 \oNNN a character with the octal value NNN
365 \dNNN a character with the decimal value NNN
366 \xNN a character with the hexadecimal value NN
367This behavior is disabled if POSIXLY_CORRECT is set, at least for the
368time being (until I can be convinced that this behavior does not violate
369the POSIX standard). (Incidentally, \b (backspace) was omitted because
370of the conflict with the existing "word boundary" meaning. \ooo octal
371format was omitted because of the conflict with backreference syntax.)
372
373* If POSIXLY_CORRECT is set, the empty RE // now is the null match
374instead of "repeat the last REmatch". As far as I can tell
375this behavior is mandated by POSIX, but it would break too many
376legacy sed scripts to blithely change GNU sed's default behavior.
377
378----------------------------------------------------------------------------
379Sed 3.02a
380
381* Added internationalization support, and an initial (already out of date)
382set of Dutch message translations (both provided by Erick Branderhorst).
383
384* Added support for scripts like:
385 sed -e 1ifoo -e '$abar'
386(note no need for \ <newline> after a, i, and c commands).
387Also, conditionally (on NO_INPUT_INDENT) added
388experimental support for skipping leading whitespace on
389each {a,i,c} input line.
390
391* Added addressing of the form:
392 /foo/,+5 p (print from foo to 5th line following)
393 /foo/,~5 p (print from foo to next line whose line number is a multiple of 5)
394The first address of these can be any of the previously existing
395addressing types; the +N and ~N forms are only allowed as the
396second address of a range.
397
398* Added support for pseudo-address "0" as the first address in an
399address-range, simplifying scripts which happen to match the end
400address on the first line of input. For example, a script
401which deletes all lines from the beginning of the file to the
402first line which contains "foo" is now simply "sed 0,/foo/d",
403whereas before one had to go through contortions to deal with
404the possibility that "foo" might appear on the first line of
405the input.
406
407* Made NUL characters in regexps work "correctly" --- i.e., a NUL
408in a RE matches a NUL; it does not prematurely terminate the RE.
409(This only works in -f scripts, as the POSIX.1 exec*() interface
410only passes NUL-terminated strings, and so sed will only be able
411to see up to the first NUL in any -e scriptlet.)
412
413* Wherever a `;' is accepted as a command terminator, also allow a `}'
414or a `#' to appear. (This allows for less cluttered-looking scripts.)
415
416* Lots of internal changes that are only relevant to source junkies
417and development testing. Some of which might cause imperceptible
418performance improvements.
419
420----------------------------------------------------------------------------
421Sed 3.02
422
423* Fixed a bug in the parsing of character classes (e.g., /[[:space:]]/).
424Corrected an omission in djgpp/Makefile.am and an improper dependency
425in testsuite/Makefile.am.
426
427----------------------------------------------------------------------------
428Sed 3.01
429
430* This version of sed mainly contains bug fixes and portability
431enhancements, plus performance enhancements related to sed's handling
432of input files. Due to excess performance penalties, I have reverted
433(relative to 3.00) to using regex.c instead of the rx package for
434regular expression handling, at the expense of losing true POSIX.2
435BRE compatibility. However, performance related to regular expression
436handling *still* needs a fair bit of work.
437
438* One new feature has been added: regular expressions may be followed
439with an "I" directive ("i" was taken [the "i"nsert command]) to
440indicate that the regexp should be matched in a case-insensitive
441manner. Also of note are a new organization to the source code,
442new documentation, and a new maintainer.
443
444----------------------------------------------------------------------------
445Sed 3.0
446
447* This version of sed passes the new test-suite donated by
448Jason Molenda.
449
450* Overall performance has been improved in the following sense: Sed 3.0
451is often slightly slower than sed 2.05. On a few scripts, though, sed
4522.05 was so slow as to be nearly useless or to use up unreasonable
453amounts of memory. These problems have been fixed and in such cases,
454sed 3.0 should have acceptable performance.
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette