summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--samples/pdfium_test.cc8
2 files changed, 3 insertions, 6 deletions
diff --git a/AUTHORS b/AUTHORS
index 0d72e22dda..0bbf65685a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -18,6 +18,7 @@ Kostya Serebryany <kcc@chromium.org>
Lei Zhang <thestig@chromium.org>
Lucas Nihlen <luken@chromium.org>
Matt Giuca <mgiuca@chromium.org>
+Michael Doppler <m.doppler@gmail.com>
Nico Weber <thakis@chromium.org>
Raymes Khoury <raymes@chromium.org>
Reid Kleckner <rnk@chromium.org>
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 0c641498fe..c504bf4823 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -20,10 +20,6 @@
#ifdef _WIN32
#define snprintf _snprintf
- /* in Windows, rb for open and read binary file */
- #define FOPEN_READ "rb"
-#else
- #define FOPEN_READ "r"
#endif
static void WritePpm(const char* pdf_name, int num,
@@ -39,7 +35,7 @@ static void WritePpm(const char* pdf_name, int num,
char filename[256];
snprintf(filename, sizeof(filename), "%s.%d.ppm", pdf_name, num);
- FILE* fp = fopen(filename, "w");
+ FILE* fp = fopen(filename, "wb");
if (!fp)
return;
fprintf(fp, "P6\n# PDF test render\n%d %d\n255\n", width, height);
@@ -283,7 +279,7 @@ int main(int argc, const char* argv[]) {
while (!files.empty()) {
const char* filename = files.front();
files.pop_front();
- FILE* file = fopen(filename, FOPEN_READ);
+ FILE* file = fopen(filename, "rb");
if (!file) {
fprintf(stderr, "Failed to open: %s\n", filename);
continue;