From: Philippe E. <ph...@us...> - 2003-04-19 17:13:09
|
Update of /cvsroot/oprofile/oprofile/libpp In directory sc8-pr-cvs1:/tmp/cvs-serv28257/libpp Modified Files: Tag: pp-interface-branch format_output.cpp parse_cmdline.cpp parse_cmdline.h Log Message: remove pp/opsummary* + handle option in pp/opreport*various + minor change, see ChangeLog regards, phil Index: format_output.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/Attic/format_output.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- format_output.cpp 17 Apr 2003 22:25:07 -0000 1.1.2.3 +++ format_output.cpp 19 Apr 2003 17:13:05 -0000 1.1.2.4 @@ -84,7 +84,7 @@ void show_help(ostream & out) { - out << "--ouput format string:\n"; + out << "--output format string:\n"; for (size_t i = 0 ; i < nr_output_option ; ++i) { out << output_options[i].option << "\t" << output_options[i].help_string << endl; Index: parse_cmdline.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/Attic/parse_cmdline.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- parse_cmdline.cpp 16 Apr 2003 02:25:45 -0000 1.1.2.1 +++ parse_cmdline.cpp 19 Apr 2003 17:13:05 -0000 1.1.2.2 @@ -282,3 +282,24 @@ { return !set_p; } + + +/* TODO */ +static bool substitute_alias(parse_cmdline & /*parser*/, + string const & /*arg*/) +{ + return false; +} + + +void handle_non_options(parse_cmdline & parser, + vector<string> const & args) +{ + for (size_t i = 0 ; i < args.size() ; ++i) { + if (parser.is_valid_tag(args[i])) { + parser.set(args[i]); + } else if (!substitute_alias(parser, args[i])) { + parser.set("image:" + args[i]); + } + } +} Index: parse_cmdline.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/Attic/parse_cmdline.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- parse_cmdline.h 16 Apr 2003 02:25:45 -0000 1.1.2.1 +++ parse_cmdline.h 19 Apr 2003 17:13:05 -0000 1.1.2.2 @@ -137,4 +137,16 @@ }; +/** + * @param parser the command line parser to fill with tag:value + * @param args a vector of non options strings + * + * fill parser with all valid tag:value contained in args vector doing + * also alias substitution, non valid tag:value options are considered as + * image:value + * + */ +void handle_non_options(parse_cmdline & parser, + vector<string> const & args); + #endif /* !PARSE_CMDLINE_H */ |