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

Side by Side Diff: samples/pdfium_test.cc

Issue 492523002: Fixed command line parting when no output is needed. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Tue Aug 19 14:14:39 PDT 2014 Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 int cur_arg = 1; 191 int cur_arg = 1;
192 if (cur_arg < argc) { 192 if (cur_arg < argc) {
193 if (strcmp(argv[cur_arg], "--ppm") == 0) 193 if (strcmp(argv[cur_arg], "--ppm") == 0)
194 *output_format = OUTPUT_PPM; 194 *output_format = OUTPUT_PPM;
195 #ifdef _WIN32 195 #ifdef _WIN32
196 if (strcmp(argv[cur_arg], "--emf") == 0) 196 if (strcmp(argv[cur_arg], "--emf") == 0)
197 *output_format = OUTPUT_EMF; 197 *output_format = OUTPUT_EMF;
198 if (strcmp(argv[cur_arg], "--bmp") == 0) 198 if (strcmp(argv[cur_arg], "--bmp") == 0)
199 *output_format = OUTPUT_BMP; 199 *output_format = OUTPUT_BMP;
200 #endif 200 #endif
201 cur_arg++; 201 if (*output_format != OUTPUT_NONE)
202 cur_arg++;
202 } 203 }
203 204
204 if (cur_arg >= argc) 205 if (cur_arg >= argc)
205 return false; 206 return false;
206 207
207 for (int i = cur_arg; i < argc; i++) 208 for (int i = cur_arg; i < argc; i++)
208 files->push_back(argv[i]); 209 files->push_back(argv[i]);
209 210
210 return true; 211 return true;
211 } 212 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } else { 393 } else {
393 RenderPdf(filename, pBuf, len, format); 394 RenderPdf(filename, pBuf, len, format);
394 } 395 }
395 free(pBuf); 396 free(pBuf);
396 } 397 }
397 398
398 FPDF_DestroyLibrary(); 399 FPDF_DestroyLibrary();
399 400
400 return 0; 401 return 0;
401 } 402 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698