On Sat, May 09, 2015 at 06:47:05AM +0200, Sébastien Marie wrote: > > Hi, > > Here a small patch to sed to make 'i' and 'a' command to always append > "\n" after 'text'. > > While here, remove 'len' field from 'struct s_appends'. It was just used > for AP_STRING (used for 'a' command), and the switch from fwrite to > printf permit to not use it. >
After realizing that even if the patch is simple, it could break a lot of thing (changing the behaviour of 'i' and 'a' command will necessary break some sed scripts), I do a little review of potential breaking candidates in base (and same have to be done in ports). So now, I am not sure that it is a good idea... Next are the files that use (or seems to use) 'i' or 'a' with sed: games/fortune/tools/do_sort gnu/gcc/fixincludes/fixincl.x gnu/gcc/fixincludes/inclhack.def gnu/lib/libstdc++/libstdc++/mkcheck.in gnu/usr.bin/binutils-2.17/intl/linux-msg.sed gnu/usr.bin/binutils-2.17/intl/po2tbl.sed.in gnu/usr.bin/binutils-2.17/intl/xopen-msg.sed gnu/usr.bin/binutils/binutils/mpw-make.sed gnu/usr.bin/binutils/gas/mpw-make.sed gnu/usr.bin/binutils/gdb/config/djgpp/config.sed gnu/usr.bin/binutils/intl/linux-msg.sed gnu/usr.bin/binutils/intl/po2tbl.sed.in gnu/usr.bin/binutils/intl/xopen-msg.sed gnu/usr.bin/gcc/contrib/gcc_update gnu/usr.bin/gcc/gcc/fixinc/fixinc.ptx gnu/usr.bin/gcc/gcc/fixinc/fixinc.svr4 gnu/usr.bin/gcc/gcc/fixinc/fixincl.x gnu/usr.bin/gcc/gcc/fixinc/inclhack.def gnu/usr.bin/texinfo/djgpp/config.sed regress/usr.bin/sed/dc.sed regress/usr.bin/sed/hanoi.sed regress/usr.bin/sed/math.sed regress/usr.bin/sed/sedtest.sh sys/kern/makesyscalls.sh usr.bin/sed/POSIX usr.bin/sed/TEST/hanoi.sed usr.bin/sed/TEST/math.sed usr.bin/sed/TEST/sed.test -- Sébastien Marie
