Home | History | Annotate | Download | only in toolutil

Lines Matching refs:FileStream

30 U_CAPI FileStream* U_EXPORT2
35 return (FileStream*)file;
42 U_CAPI FileStream* U_EXPORT2
48 return (FileStream*)result;
68 return (FileStream*)result;
73 T_FileStream_close(FileStream* fileStream)
75 if (fileStream != 0)
76 fclose((FILE*)fileStream);
91 const int32_t FileStream::kEOF = EOF;*/
94 U_CAPI FileStream*
98 return (FileStream*)file;
103 T_FileStream_read(FileStream* fileStream, void* addr, int32_t len)
105 return fread(addr, 1, len, (FILE*)fileStream);
109 T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len)
112 return fwrite(addr, 1, len, (FILE*)fileStream);
116 T_FileStream_rewind(FileStream* fileStream)
118 rewind((FILE*)fileStream);
122 T_FileStream_putc(FileStream* fileStream, int32_t ch)
124 int32_t c = fputc(ch, (FILE*)fileStream);
129 T_FileStream_getc(FileStream* fileStream)
131 int c = fgetc((FILE*)fileStream);
136 T_FileStream_ungetc(int32_t ch, FileStream* fileStream)
139 int32_t c = ungetc(ch, (FILE*)fileStream);
144 T_FileStream_peek(FileStream* fileStream)
146 int32_t c = fgetc((FILE*)fileStream);
147 return ungetc(c, (FILE*)fileStream);
151 T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length)
153 return fgets(buffer, length, (FILE*)fileStream);
157 T_FileStream_writeLine(FileStream* fileStream, const char* buffer)
159 return fputs(buffer, (FILE*)fileStream);
163 T_FileStream_size(FileStream* fileStream)
165 int32_t savedPos = ftell((FILE*)fileStream);
170 fseek((FILE*)fileStream, 0, SEEK_END);
171 size = (int32_t)ftell((FILE*)fileStream);
172 fseek((FILE*)fileStream, savedPos, SEEK_SET);
177 T_FileStream_eof(FileStream* fileStream)
179 return feof((FILE*)fileStream);
189 T_FileStream_error(FileStream* fileStream)
191 return (fileStream == 0 || ferror((FILE*)fileStream));
197 T_FileStream_setError(FileStream* fileStream)
199 fseek((FILE*)fileStream, 99999, SEEK_SET);
203 U_CAPI FileStream* U_EXPORT2
206 return (FileStream*)stdin;
209 U_CAPI FileStream* U_EXPORT2
212 return (FileStream*)stdout;
216 U_CAPI FileStream* U_EXPORT2
219 return (FileStream*)stderr;