1 /* @(#)file_raise.c 1.9 07/04/03 Copyright 1986, 1995-2007 J. Schilling */ 2 /* 3 * Copyright (c) 1986, 1995-2007 J. Schilling 4 */ 5 /* 6 * The contents of this file are subject to the terms of the 7 * Common Development and Distribution License, Version 1.0 only 8 * (the "License"). You may not use this file except in compliance 9 * with the License. 10 * 11 * See the file CDDL.Schily.txt in this distribution for details. 12 * A copy of the CDDL is also available via the Internet at 13 * http://www.opensource.org/licenses/cddl1.txt 14 * 15 * When distributing Covered Code, include this CDDL HEADER in each 16 * file and include the License file CDDL.Schily.txt from this distribution. 17 */ 18 19 #include "schilyio.h" 20 21 EXPORT void file_raise(f,flg)22file_raise(f, flg) 23 register FILE *f; 24 int flg; 25 { 26 int oflag; 27 extern int _io_glflag; 28 29 if (f == (FILE *)NULL) { 30 if (flg) 31 _io_glflag &= ~_JS_IONORAISE; 32 else 33 _io_glflag |= _JS_IONORAISE; 34 return; 35 } 36 down(f); 37 38 oflag = my_flag(f); 39 40 if (flg) 41 oflag &= ~_JS_IONORAISE; 42 else 43 oflag |= _JS_IONORAISE; 44 45 set_my_flag(f, oflag); 46 } 47