ReactOS 0.4.16-dev-937-g7afcd2a
closeall.cpp File Reference
Include dependency graph for closeall.cpp:

Go to the source code of this file.

Functions

int __cdecl _fcloseall ()
 

Function Documentation

◆ _fcloseall()

int __cdecl _fcloseall ( void  )

Definition at line 15 of file closeall.cpp.

16{
17 int count = 0;
18
20 __try
21 {
22 for (int i = _IOB_ENTRIES; i != _nstream; ++i)
23 {
24 if (__piob[i] == nullptr)
25 continue;
26
27 // If the stream is in use, close it:
28 if (__crt_stdio_stream(__piob[i]).is_in_use() && fclose(&__piob[i]->_public_file) != EOF)
29 {
30 ++count;
31 }
32
35 __piob[i] = nullptr;
36 }
37 }
39 {
41 }
43
44 return count;
45}
void __cdecl __acrt_unlock(_In_ __acrt_lock_id lock)
Definition: locks.cpp:57
@ __acrt_stdio_index_lock
int _nstream
__crt_stdio_stream_data ** __piob
__acrt_lock(__acrt_heap_lock)
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define EOF
Definition: stdio.h:24
#define _IOB_ENTRIES
Definition: stdio.h:23
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define _free_crt
#define __try
Definition: pseh2_64.h:188
#define __endtry
Definition: pseh2_64.h:191
#define __finally
Definition: pseh2_64.h:190
void _lock(int locknum)
Definition: lock.c:97
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by __acrt_uninitialize_stdio(), msvcrt_free_io(), and test_fopen_fclose_fcloseall().