Home | History | Annotate | Download | only in src

Lines Matching refs:FILE

48 void PrintF(FILE* out, const char* format, ...) {
56 void Flush(FILE* out) {
113 char* ReadCharsFromFile(FILE* file,
118 if (file == NULL || fseek(file, 0, SEEK_END) != 0) {
120 OS::PrintError("Cannot read from file %s.\n", filename);
125 // Get the size of the file and rewind it.
126 *size = ftell(file);
127 rewind(file);
130 for (int i = 0; i < *size && feof(file) == 0;) {
131 int read = static_cast<int>(fread(&result[i], 1, *size - i, file));
132 if (read != (*size - i) && ferror(file) != 0) {
133 fclose(file);
147 FILE* file = OS::FOpen(filename, "rb");
148 char* result = ReadCharsFromFile(file, size, extra_space, verbose, filename);
149 if (file != NULL) fclose(file);
182 Vector<const char> ReadFile(FILE* file,
186 char* result = ReadCharsFromFile(file, &size, 1, verbose, "");
191 int WriteCharsToFile(const char* str, int size, FILE* f) {
209 FILE* f = OS::FOpen(filename, "ab");
212 OS::PrintError("Cannot open file %s for writing.\n", filename);
226 FILE* f = OS::FOpen(filename, "wb");
229 OS::PrintError("Cannot open file %s for writing.\n", filename);
328 "Abort: Non-Ascii character 0x%.2x in file %s line %d char %d",