Lines Matching refs:stream
151 static inline void __set(FILE *stream, int value, char *err_msg);
155 static inline int get(FILE *stream);
156 static inline void set(FILE *stream, int value);
157 static inline int try_set(FILE *stream, int value);
163 static inline void __set(FILE *stream, int value, char *err_msg) in __set() argument
165 rewind(stream); in __set()
166 if (fprintf(stream, "%d", value) < 0) in __set()
233 static inline int get(FILE *stream) in get() argument
236 rewind(stream); in get()
237 if (fscanf(stream, "%d", &value) != 1) in get()
242 static inline void set(FILE *stream, int value) in set() argument
246 rewind(stream); in set()
247 if (fprintf(stream, "%d", value) < 0) in set()
249 new_value = get(stream); in set()
255 static inline int try_set(FILE *stream, int value) in try_set() argument
259 rewind(stream); in try_set()
260 fprintf(stream, "%d", value); in try_set()
261 new_value = get(stream); in try_set()