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

Issue 343303004: Explicitly use binary mode when opening files in the pdfium_test sample. (Closed)

Created:
6 years, 6 months ago by mdoppler
Modified:
6 years, 6 months ago
Reviewers:
jabdelmalek, jam
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium@master
Visibility:
Public.

Description

Explicitly use binary mode when opening files in the pdfium_test sample. This patch adds the 'b' (binary mode) flag to the fopen calls. Before the fix the PPM images written with --write_images were corrupted under Windows because on this platform in text mode all occurrences of the byte 0xa (line feed) are replaced with the bytes 0x0d (carriage return) and 0x0a (line feed). On UNIX platforms the 'b' flag is supported but ignored, because no translation of the line feed character takes place. BUG=18 R=jam@chromium.org Original patch by Michael Doppler <m.doppler@gmail.com>; Committed: https://pdfium.googlesource.com/pdfium/+/a548d30

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -6 lines) Patch
M AUTHORS View 1 chunk +1 line, -0 lines 0 comments Download
M samples/pdfium_test.cc View 3 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
mdoppler
6 years, 6 months ago (2014-06-26 16:57:26 UTC) #1
jabdelmalek
6 years, 6 months ago (2014-06-26 17:18:40 UTC) #2
Message was sent while issue was closed.
lgtm, thank you for your contribution!

Change committed in
https://pdfium.googlesource.com/pdfium/+/a548d30f8126d167210fdc26783454b0b375...

Powered by Google App Engine
This is Rietveld 408576698