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

Unified Diff: include/core/SkOSFile.h

Issue 1467533003: Eliminate SkFILE - it always is the same as FILE. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-11-20 (Friday) 14:01:26 EST Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkData.h ('k') | include/core/SkStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkOSFile.h
diff --git a/include/core/SkOSFile.h b/include/core/SkOSFile.h
index 3ee3aa44a042bf5e82a7eb0406387f67155670d9..39a16464583beff62e2133349657d78027afcac1 100644
--- a/include/core/SkOSFile.h
+++ b/include/core/SkOSFile.h
@@ -12,9 +12,9 @@
#ifndef SkOSFile_DEFINED
#define SkOSFile_DEFINED
-#include "SkString.h"
+#include <stdio.h>
-struct SkFILE;
+#include "SkString.h"
enum SkFILE_Flags {
kRead_SkFILE_Flag = 0x01,
@@ -27,30 +27,30 @@ const static char SkPATH_SEPARATOR = '\\';
const static char SkPATH_SEPARATOR = '/';
#endif
-SkFILE* sk_fopen(const char path[], SkFILE_Flags);
-void sk_fclose(SkFILE*);
+FILE* sk_fopen(const char path[], SkFILE_Flags);
+void sk_fclose(FILE*);
-size_t sk_fgetsize(SkFILE*);
+size_t sk_fgetsize(FILE*);
/** Return true if the file could seek back to the beginning
*/
-bool sk_frewind(SkFILE*);
+bool sk_frewind(FILE*);
-size_t sk_fread(void* buffer, size_t byteCount, SkFILE*);
-size_t sk_fwrite(const void* buffer, size_t byteCount, SkFILE*);
+size_t sk_fread(void* buffer, size_t byteCount, FILE*);
+size_t sk_fwrite(const void* buffer, size_t byteCount, FILE*);
-char* sk_fgets(char* str, int size, SkFILE* f);
+char* sk_fgets(char* str, int size, FILE* f);
-void sk_fflush(SkFILE*);
+void sk_fflush(FILE*);
-bool sk_fseek(SkFILE*, size_t);
-bool sk_fmove(SkFILE*, long);
-size_t sk_ftell(SkFILE*);
+bool sk_fseek(FILE*, size_t);
+bool sk_fmove(FILE*, long);
+size_t sk_ftell(FILE*);
/** Maps a file into memory. Returns the address and length on success, NULL otherwise.
* The mapping is read only.
* When finished with the mapping, free the returned pointer with sk_fmunmap.
*/
-void* sk_fmmap(SkFILE* f, size_t* length);
+void* sk_fmmap(FILE* f, size_t* length);
/** Maps a file descriptor into memory. Returns the address and length on success, NULL otherwise.
* The mapping is read only.
@@ -64,12 +64,12 @@ void* sk_fdmmap(int fd, size_t* length);
void sk_fmunmap(const void* addr, size_t length);
/** Returns true if the two point at the exact same filesystem object. */
-bool sk_fidentical(SkFILE* a, SkFILE* b);
+bool sk_fidentical(FILE* a, FILE* b);
/** Returns the underlying file descriptor for the given file.
* The return value will be < 0 on failure.
*/
-int sk_fileno(SkFILE* f);
+int sk_fileno(FILE* f);
/** Returns true if something (file, directory, ???) exists at this path,
* and has the specified access flags.
@@ -80,7 +80,7 @@ bool sk_exists(const char *path, SkFILE_Flags = (SkFILE_Flags)0);
bool sk_isdir(const char *path);
// Have we reached the end of the file?
-int sk_feof(SkFILE *);
+int sk_feof(FILE *);
// Create a new directory at this path; returns true if successful.
« no previous file with comments | « include/core/SkData.h ('k') | include/core/SkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698