OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <limits.h> | 5 #include <limits.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <iostream> | 7 #include <iostream> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 "output messages after |n|th message in file (inclusive)."; | 45 "output messages after |n|th message in file (inclusive)."; |
46 | 46 |
47 void usage() { | 47 void usage() { |
48 std::cerr << "ipc_message_util: Concatenate all |infile| message files and " | 48 std::cerr << "ipc_message_util: Concatenate all |infile| message files and " |
49 << "copy a subset of the result to |outfile|.\n"; | 49 << "copy a subset of the result to |outfile|.\n"; |
50 | 50 |
51 std::cerr << "Usage:\n" | 51 std::cerr << "Usage:\n" |
52 << " ipc_message_util" | 52 << " ipc_message_util" |
53 << " [--" << kStartSwitch << "=n]" | 53 << " [--" << kStartSwitch << "=n]" |
54 << " [--" << kEndSwitch << "=m]" | 54 << " [--" << kEndSwitch << "=m]" |
55 << " [--" << kInSwitch << "=i,j,...]]" | 55 << " [--" << kInSwitch << "=i[,j,...]]" |
56 << " [--" << kRegexpSwitch << "=x]" | 56 << " [--" << kRegexpSwitch << "=x]" |
57 << " [--" << kInvertSwitch << "]" | 57 << " [--" << kInvertSwitch << "]" |
58 << " [--" << kDumpSwitch << "]" | 58 << " [--" << kDumpSwitch << "]" |
59 << " [--" << kHelpSwitch << "]" | 59 << " [--" << kHelpSwitch << "]" |
60 << " infile,infile,... [outfile]\n"; | 60 << " infile,infile,... [outfile]\n"; |
61 | 61 |
62 std::cerr << " --" << kStartSwitch << " - " << kStartSwitchHelp << "\n" | 62 std::cerr << " --" << kStartSwitch << " - " << kStartSwitchHelp << "\n" |
63 << " --" << kEndSwitch << " - " << kEndSwitchHelp << "\n" | 63 << " --" << kEndSwitch << " - " << kEndSwitchHelp << "\n" |
64 << " --" << kInSwitch << " - " << kInSwitchHelp << "\n" | 64 << " --" << kInSwitch << " - " << kInSwitchHelp << "\n" |
65 << " --" << kRegexpSwitch << " - " << kRegexpSwitchHelp << "\n" | 65 << " --" << kRegexpSwitch << " - " << kRegexpSwitchHelp << "\n" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 } else { | 172 } else { |
173 if (!ipc_fuzzer::MessageFile::Write( | 173 if (!ipc_fuzzer::MessageFile::Write( |
174 base::FilePath(output_file_name), output_message_vector)) { | 174 base::FilePath(output_file_name), output_message_vector)) { |
175 return EXIT_FAILURE; | 175 return EXIT_FAILURE; |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 return EXIT_SUCCESS; | 179 return EXIT_SUCCESS; |
180 } | 180 } |
OLD | NEW |