1*24f9d669Sguenther /* $OpenBSD: freading.c,v 1.1 2024/08/12 20:56:55 guenther Exp $ */ 2*24f9d669Sguenther /* 3*24f9d669Sguenther * Copyright (c) 2024 Philip Guenther <guenther@openbsd.org> 4*24f9d669Sguenther * 5*24f9d669Sguenther * Permission to use, copy, modify, and distribute this software for any 6*24f9d669Sguenther * purpose with or without fee is hereby granted, provided that the above 7*24f9d669Sguenther * copyright notice and this permission notice appear in all copies. 8*24f9d669Sguenther * 9*24f9d669Sguenther * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*24f9d669Sguenther * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*24f9d669Sguenther * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*24f9d669Sguenther * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*24f9d669Sguenther * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*24f9d669Sguenther * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*24f9d669Sguenther * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*24f9d669Sguenther */ 17*24f9d669Sguenther 18*24f9d669Sguenther #include <stdio_ext.h> 19*24f9d669Sguenther #include "local.h" 20*24f9d669Sguenther 21*24f9d669Sguenther int 22*24f9d669Sguenther __freading(FILE *fp) 23*24f9d669Sguenther { 24*24f9d669Sguenther return (fp->_flags & __SRD) != 0; 25*24f9d669Sguenther } 26