Lines Matching refs:stream
150 static inline void __set(FILE *stream, int value, char *err_msg);
154 static inline int get(FILE *stream);
155 static inline void set(FILE *stream, int value);
156 static inline int try_set(FILE *stream, int value);
162 static inline void __set(FILE *stream, int value, char *err_msg) in __set() argument
164 rewind(stream); in __set()
165 if (fprintf(stream, "%d", value) < 0) in __set()
232 static inline int get(FILE *stream) in get() argument
235 rewind(stream); in get()
236 if (fscanf(stream, "%d", &value) != 1) in get()
241 static inline void set(FILE *stream, int value) in set() argument
245 rewind(stream); in set()
246 if (fprintf(stream, "%d", value) < 0) in set()
248 new_value = get(stream); in set()
254 static inline int try_set(FILE *stream, int value) in try_set() argument
258 rewind(stream); in try_set()
259 fprintf(stream, "%d", value); in try_set()
260 new_value = get(stream); in try_set()