Lines Matching refs:stream
153 static inline void __set(FILE *stream, int value, char *err_msg);
157 static inline int get(FILE *stream);
158 static inline void set(FILE *stream, int value);
159 static inline int try_set(FILE *stream, int value);
165 static inline void __set(FILE *stream, int value, char *err_msg)
167 rewind(stream);
168 if (fprintf(stream, "%d", value) < 0)
238 static inline int get(FILE *stream)
241 rewind(stream);
242 if (fscanf(stream, "%d", &value) != 1)
247 static inline void set(FILE *stream, int value)
251 rewind(stream);
252 if (fprintf(stream, "%d", value) < 0)
254 new_value = get(stream);
260 static inline int try_set(FILE *stream, int value)
264 rewind(stream);
265 fprintf(stream, "%d", value);
266 new_value = get(stream);