Reorder decomposition of the filename argument for the '-h' flag to

avoid misprocessing in the case where the filename argument contains
more than one period.

Submitted by:	micke@dynas.se (Mikael Hybsch)
This commit is contained in:
Mike Smith 1997-07-23 18:23:42 +00:00
parent 9325ae34de
commit 194fb96e6a

View File

@ -54,11 +54,12 @@ FILES="$@"
case $FLAG in case $FLAG in
-h) -h)
fn=`basename $FILES`
OIFS="$IFS" OIFS="$IFS"
IFS=".$IFS" IFS=".$IFS"
set - $FILES set - $fn
IFS="$OIFS" IFS="$OIFS"
hdr="_h_`basename $1`_$2" hdr="_h_$1_$2"
cat $FILES | $AWK ' cat $FILES | $AWK '
BEGIN { BEGIN {
printf("/* Automatically generated file, do not edit */\n"); printf("/* Automatically generated file, do not edit */\n");