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

Side by Side Diff: third_party/sqlite/src/tool/extract.c

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 ** Extract a range of bytes from a file. 2 ** Extract a range of bytes from a file.
3 ** 3 **
4 ** Usage: 4 ** Usage:
5 ** 5 **
6 ** extract FILENAME OFFSET AMOUNT 6 ** extract FILENAME OFFSET AMOUNT
7 ** 7 **
8 ** The bytes are written to standard output. 8 ** The bytes are written to standard output.
9 */ 9 */
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 26 matching lines...) Expand all
37 got = fread(zBuf, 1, n, f); 37 got = fread(zBuf, 1, n, f);
38 fclose(f); 38 fclose(f);
39 if( got<n ){ 39 if( got<n ){
40 fprintf(stderr, "got only %d of %d bytes\n", got, n); 40 fprintf(stderr, "got only %d of %d bytes\n", got, n);
41 return 1; 41 return 1;
42 }else{ 42 }else{
43 fwrite(zBuf, 1, n, stdout); 43 fwrite(zBuf, 1, n, stdout);
44 } 44 }
45 return 0; 45 return 0;
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698