freopen.c (21a1863da82442a1183f9c02d4dd0d770eb08d35) | freopen.c (87275e436a0fb31fea2757532860a3ec993d2cd6) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 174 unchanged lines hidden (view full) --- 183 fp->_lbfsize = 0; 184 if (HASUB(fp)) 185 FREEUB(fp); 186 fp->_ub._size = 0; 187 if (HASLB(fp)) 188 FREELB(fp); 189 fp->_lb._size = 0; 190 fp->_extra->orientation = 0; | 1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 174 unchanged lines hidden (view full) --- 183 fp->_lbfsize = 0; 184 if (HASUB(fp)) 185 FREEUB(fp); 186 fp->_ub._size = 0; 187 if (HASLB(fp)) 188 FREELB(fp); 189 fp->_lb._size = 0; 190 fp->_extra->orientation = 0; |
191 memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t)); |
|
191 192 if (f < 0) { /* did not get it after all */ 193 fp->_flags = 0; /* set it free */ 194 errno = sverrno; /* restore in case _close clobbered */ 195 FUNLOCKFILE(fp); 196 return (NULL); 197 } 198 --- 22 unchanged lines hidden --- | 192 193 if (f < 0) { /* did not get it after all */ 194 fp->_flags = 0; /* set it free */ 195 errno = sverrno; /* restore in case _close clobbered */ 196 FUNLOCKFILE(fp); 197 return (NULL); 198 } 199 --- 22 unchanged lines hidden --- |