Lines Matching refs:fileStream
73 T_FileStream_close(FileStream* fileStream) in T_FileStream_close() argument
75 if (fileStream != 0) in T_FileStream_close()
76 fclose((FILE*)fileStream); in T_FileStream_close()
103 T_FileStream_read(FileStream* fileStream, void* addr, int32_t len) in T_FileStream_read() argument
105 return fread(addr, 1, len, (FILE*)fileStream); in T_FileStream_read()
109 T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len) in T_FileStream_write() argument
112 return fwrite(addr, 1, len, (FILE*)fileStream); in T_FileStream_write()
116 T_FileStream_rewind(FileStream* fileStream) in T_FileStream_rewind() argument
118 rewind((FILE*)fileStream); in T_FileStream_rewind()
122 T_FileStream_putc(FileStream* fileStream, int32_t ch) in T_FileStream_putc() argument
124 int32_t c = fputc(ch, (FILE*)fileStream); in T_FileStream_putc()
129 T_FileStream_getc(FileStream* fileStream) in T_FileStream_getc() argument
131 int c = fgetc((FILE*)fileStream); in T_FileStream_getc()
136 T_FileStream_ungetc(int32_t ch, FileStream* fileStream) in T_FileStream_ungetc() argument
139 int32_t c = ungetc(ch, (FILE*)fileStream); in T_FileStream_ungetc()
144 T_FileStream_peek(FileStream* fileStream) in T_FileStream_peek() argument
146 int32_t c = fgetc((FILE*)fileStream); in T_FileStream_peek()
147 return ungetc(c, (FILE*)fileStream); in T_FileStream_peek()
151 T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length) in T_FileStream_readLine() argument
153 return fgets(buffer, length, (FILE*)fileStream); in T_FileStream_readLine()
157 T_FileStream_writeLine(FileStream* fileStream, const char* buffer) in T_FileStream_writeLine() argument
159 return fputs(buffer, (FILE*)fileStream); in T_FileStream_writeLine()
163 T_FileStream_size(FileStream* fileStream) in T_FileStream_size() argument
165 int32_t savedPos = ftell((FILE*)fileStream); in T_FileStream_size()
170 fseek((FILE*)fileStream, 0, SEEK_END); in T_FileStream_size()
171 size = (int32_t)ftell((FILE*)fileStream); in T_FileStream_size()
172 fseek((FILE*)fileStream, savedPos, SEEK_SET); in T_FileStream_size()
177 T_FileStream_eof(FileStream* fileStream) in T_FileStream_eof() argument
179 return feof((FILE*)fileStream); in T_FileStream_eof()
189 T_FileStream_error(FileStream* fileStream) in T_FileStream_error() argument
191 return (fileStream == 0 || ferror((FILE*)fileStream)); in T_FileStream_error()