OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // 'courgette_minimal_tool' is not meant to be a serious command-line tool. It | 5 // 'courgette_minimal_tool' is not meant to be a serious command-line tool. It |
6 // has the minimum logic to apply a Courgette patch to a file. The main purpose | 6 // has the minimum logic to apply a Courgette patch to a file. The main purpose |
7 // is to monitor the code size of the patcher. | 7 // is to monitor the code size of the patcher. |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 courgette::Status status = | 44 courgette::Status status = |
45 courgette::ApplyEnsemblePatch(argv[1], argv[2], argv[3]); | 45 courgette::ApplyEnsemblePatch(argv[1], argv[2], argv[3]); |
46 | 46 |
47 if (status != courgette::C_OK) { | 47 if (status != courgette::C_OK) { |
48 if (status == courgette::C_READ_OPEN_ERROR) Problem("Can't open file."); | 48 if (status == courgette::C_READ_OPEN_ERROR) Problem("Can't open file."); |
49 if (status == courgette::C_WRITE_OPEN_ERROR) Problem("Can't open file."); | 49 if (status == courgette::C_WRITE_OPEN_ERROR) Problem("Can't open file."); |
50 if (status == courgette::C_READ_ERROR) Problem("Can't read from file."); | 50 if (status == courgette::C_READ_ERROR) Problem("Can't read from file."); |
51 if (status == courgette::C_WRITE_ERROR) Problem("Can't write to file."); | 51 if (status == courgette::C_WRITE_ERROR) Problem("Can't write to file."); |
52 Problem("patch failed."); | 52 Problem("patch failed."); |
53 } | 53 } |
| 54 |
| 55 return 0; |
54 } | 56 } |
OLD | NEW |