Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: courgette/courgette_minimal_tool.cc

Issue 149597: Code changes to get the code to compile under GCC.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « courgette/courgette.h ('k') | courgette/courgette_tool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
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 15 matching lines...) Expand all
26 fprintf(stderr, "%s\n", message); 26 fprintf(stderr, "%s\n", message);
27 PrintHelp(); 27 PrintHelp();
28 exit(1); 28 exit(1);
29 } 29 }
30 30
31 void Problem(const char* message) { 31 void Problem(const char* message) {
32 fprintf(stderr, "%s\n", message); 32 fprintf(stderr, "%s\n", message);
33 exit(1); 33 exit(1);
34 } 34 }
35 35
36 #if defined(OS_WIN)
36 int wmain(int argc, const wchar_t* argv[]) { 37 int wmain(int argc, const wchar_t* argv[]) {
38 #else
39 int main(int argc, const char* argv[]) {
40 #endif
37 if (argc != 4) 41 if (argc != 4)
38 UsageProblem("bad args"); 42 UsageProblem("bad args");
39 43
40 courgette::Status status = 44 courgette::Status status =
41 courgette::ApplyEnsemblePatch(argv[1], argv[2], argv[3]); 45 courgette::ApplyEnsemblePatch(argv[1], argv[2], argv[3]);
42 46
43 if (status != courgette::C_OK) { 47 if (status != courgette::C_OK) {
44 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.");
45 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.");
46 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.");
47 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.");
48 Problem("patch failed."); 52 Problem("patch failed.");
49 } 53 }
50 } 54 }
OLDNEW
« no previous file with comments | « courgette/courgette.h ('k') | courgette/courgette_tool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698