ReactOS  r76032
fcons.c File Reference
#include "schilyio.h"
Include dependency graph for fcons.c:

Go to the source code of this file.

Functions

EXPORT FILE_fcons (FILE *fd, int f, int flag)
 

Variables

LOCAL charfmtab []
 

Function Documentation

EXPORT FILE* _fcons ( FILE fd,
int  f,
int  flag 
)

Definition at line 53 of file fcons.c.

Referenced by fileopen().

57 {
58  int my_gflag = _io_glflag;
59 
60  if (fd == (FILE *)NULL)
61  fd = fdopen(f,
63 
64  if (fd != (FILE *)NULL) {
65  if (flag & FI_APPEND) {
66  (void) fseek(fd, (off_t)0, SEEK_END);
67  }
68  if (flag & FI_UNBUF) {
69  setbuf(fd, NULL);
70  my_gflag |= _JS_IOUNBUF;
71  }
72  set_my_flag(fd, my_gflag); /* must clear it if fd is reused */
73  return (fd);
74  }
75  if (flag & FI_CLOSE)
76  close(f);
77 
78  return ((FILE *)NULL);
79 }
#define _JS_IOUNBUF
Definition: schilyio.h:100
#define FI_APPEND
Definition: schilyio.h:88
#define FI_CLOSE
Definition: schilyio.h:93
LOCAL char * fmtab[]
Definition: fcons.c:24
__kernel_off_t off_t
Definition: linux.h:201
#define FI_UNBUF
Definition: schilyio.h:92
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
#define set_my_flag(p, v)
Definition: schilyio.h:140
GLfloat f
Definition: glext.h:7540
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean flag
Definition: glfuncs.h:72
#define FI_BINARY
Definition: schilyio.h:87
#define close
Definition: acwin.h:74
EXPORT int _io_glflag
Definition: flag.c:31
_Check_return_ _CRTIMP FILE *__cdecl fdopen(_In_ int _FileHandle, _In_z_ const char *_Format)
#define FI_WRITE
Definition: schilyio.h:86
#define SEEK_END
Definition: cabinet.c:21
_CRTIMP void __cdecl setbuf(_Inout_ FILE *_File, _Inout_updates_opt_(BUFSIZ) _Post_readable_size_(0) char *_Buffer)
#define FI_READ
Definition: schilyio.h:85

Variable Documentation

LOCAL char* fmtab[]
Initial value:
= {
"",
"r",
"w",
"r+",
"b",
"rb",
"wb",
"r+b",
"",
"r",
"a",
"a+",
"b",
"rb",
"ab",
"a+b",
}

Definition at line 24 of file fcons.c.

Referenced by _fcons().