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) in __set() argument
167 rewind(stream); in __set()
168 if (fprintf(stream, "%d", value) < 0) in __set()
238 static inline int get(FILE *stream) in get() argument
241 rewind(stream); in get()
242 if (fscanf(stream, "%d", &value) != 1) in get()
247 static inline void set(FILE *stream, int value) in set() argument
251 rewind(stream); in set()
252 if (fprintf(stream, "%d", value) < 0) in set()
254 new_value = get(stream); in set()
260 static inline int try_set(FILE *stream, int value) in try_set() argument
264 rewind(stream); in try_set()
265 fprintf(stream, "%d", value); in try_set()
266 new_value = get(stream); in try_set()