On Thu, Jul 06, 2000 at 06:23:07PM +0200, Akim Demaille wrote:
: | This may look like a medium-sized patch (requiring forms to be signed),
: | but it's mostly indentation changes.
:
: Alexandre can judge, I can't.
Well, what's not indentation fixes is mostly ifelse alternations without
any "original work", so I think the patch only counts for the extra
case/esac lines...
: | CONFIG_HEADERS= CONFIG_FILES=-:file.in config.status | \
: | CONFIG_HEADERS=file:- CONFIG_FILES= config.status
:
: Gross :(
Did I *say* it was elegant? ;)
: Hm, according to your code you do. Do we want things like:
:
: ./config.status --file=file:file.in:-
That is incorrect use, and will therefore fail, and the person who wrote
that would get what's coming to him...
: | + -) ac_file_in= ac_file= ;;
: | + -:-) ac_file_in= ac_file= ;;
: | + -:*) ac_file_in=`echo "$ac_file" | sed 's/^..//'` ac_file= ;;
: | + *:-) ac_file_in= ac_file=`echo "$ac_file" | sed 's/..$//'` ;;
[...]
: In fact I don't understand why you prefer to have ac_file= instead of
: keeping ac_file=-?
On certain platforms, sed won't take input from stdin if you write
$ sed '...' -
sed: -: file not found (or something like that)
so I need the variables to be empty at those positions. I thought I could
save a few tests by doing it this way.
: | + # is output going to a file?
: | + if test x"$ac_file" = x; then :; else
:
: if test x"$ac_file" != x; then
Yep, I was confused on this one - it seems like we're trying to avoid '!'
as much as possible, but 'test string != string' should preferably be used
to the obfuscation above.
: The same comments apply for the HEADER part.
:
: Remember you now have a tmpdir in which you can do whatever you want
: to. In particular you could handle the issue of stdin as input file
: as: (I am not changing anything to option handing, so CONFIG_FILES may
: have -, -:file.in, file:-, file:-:file.in etc.)
The file:-:file.in is, again, incorrect usage. You don't want to mix input
from both stdin and files. Let those who try get what's coming to them ;)
Anyways, what you did with dumping stdin to $tmp/stdin was an improvement...
Lars J