Lines Matching refs:fileStream

75 T_FileStream_close(FileStream* fileStream)  in T_FileStream_close()  argument
77 if (fileStream != 0) in T_FileStream_close()
78 fclose((FILE*)fileStream); in T_FileStream_close()
105 T_FileStream_read(FileStream* fileStream, void* addr, int32_t len) in T_FileStream_read() argument
107 return static_cast<int32_t>(fread(addr, 1, len, (FILE*)fileStream)); in T_FileStream_read()
111 T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len) in T_FileStream_write() argument
114 return static_cast<int32_t>(fwrite(addr, 1, len, (FILE*)fileStream)); in T_FileStream_write()
118 T_FileStream_rewind(FileStream* fileStream) in T_FileStream_rewind() argument
120 rewind((FILE*)fileStream); in T_FileStream_rewind()
124 T_FileStream_putc(FileStream* fileStream, int32_t ch) in T_FileStream_putc() argument
126 int32_t c = fputc(ch, (FILE*)fileStream); in T_FileStream_putc()
131 T_FileStream_getc(FileStream* fileStream) in T_FileStream_getc() argument
133 int c = fgetc((FILE*)fileStream); in T_FileStream_getc()
138 T_FileStream_ungetc(int32_t ch, FileStream* fileStream) in T_FileStream_ungetc() argument
141 int32_t c = ungetc(ch, (FILE*)fileStream); in T_FileStream_ungetc()
146 T_FileStream_peek(FileStream* fileStream) in T_FileStream_peek() argument
148 int32_t c = fgetc((FILE*)fileStream); in T_FileStream_peek()
149 return ungetc(c, (FILE*)fileStream); in T_FileStream_peek()
153 T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length) in T_FileStream_readLine() argument
155 return fgets(buffer, length, (FILE*)fileStream); in T_FileStream_readLine()
159 T_FileStream_writeLine(FileStream* fileStream, const char* buffer) in T_FileStream_writeLine() argument
161 return fputs(buffer, (FILE*)fileStream); in T_FileStream_writeLine()
165 T_FileStream_size(FileStream* fileStream) in T_FileStream_size() argument
167 int32_t savedPos = ftell((FILE*)fileStream); in T_FileStream_size()
172 fseek((FILE*)fileStream, 0, SEEK_END); in T_FileStream_size()
173 size = (int32_t)ftell((FILE*)fileStream); in T_FileStream_size()
174 fseek((FILE*)fileStream, savedPos, SEEK_SET); in T_FileStream_size()
179 T_FileStream_eof(FileStream* fileStream) in T_FileStream_eof() argument
181 return feof((FILE*)fileStream); in T_FileStream_eof()
191 T_FileStream_error(FileStream* fileStream) in T_FileStream_error() argument
193 return (fileStream == 0 || ferror((FILE*)fileStream)); in T_FileStream_error()