From: Peter O. <obe...@us...> - 2013-05-02 11:02:28
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9186/bin Modified Files: geninfo lcov Log Message: lcov: fix whitespace handling in --rc command line option Specifying blanks around --rc options results in the options not being correctly recognized, for example: This doesn't work: geninfo . -o - --rc="geninfo_adjust_src_path = /tmp => /usr" This works: geninfo . -o - --rc="geninfo_adjust_src_path=/tmp => /usr" Fix this by automatically removing whitespaces at the start and end of --rc options and values. Index: geninfo =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/geninfo,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** geninfo 22 Feb 2013 14:09:08 -0000 1.120 --- geninfo 2 May 2013 11:02:23 -0000 1.121 *************** *** 276,279 **** --- 276,289 ---- Getopt::Long::Configure("default"); + # Remove spaces around rc options + while (my ($key, $value) = each(%opt_rc)) { + delete($opt_rc{$key}); + + $key =~ s/^\s+|\s+$//g; + $value =~ s/^\s+|\s+$//g; + + $opt_rc{$key} = $value; + } + # Read configuration file if available if (defined($opt_config_file)) { Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** lcov 30 Jan 2013 11:46:42 -0000 1.95 --- lcov 2 May 2013 11:02:24 -0000 1.96 *************** *** 229,232 **** --- 229,242 ---- Getopt::Long::Configure("default"); + # Remove spaces around rc options + while (my ($key, $value) = each(%opt_rc)) { + delete($opt_rc{$key}); + + $key =~ s/^\s+|\s+$//g; + $value =~ s/^\s+|\s+$//g; + + $opt_rc{$key} = $value; + } + # Read configuration file if available if (defined($opt_config_file)) { |