ReactOS  0.4.14-dev-358-gbef841c
fileopen.c
Go to the documentation of this file.
1 /* @(#)fileopen.c 1.12 10/08/21 Copyright 1986, 1995-2010 J. Schilling */
2 /*
3  * Copyright (c) 1986, 1995-2010 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  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file CDDL.Schily.txt from this distribution.
15  */
16 
17 #include "schilyio.h"
18 
19 EXPORT FILE *
21  const char *name;
22  const char *mode;
23 {
24  int ret;
25  int omode = 0;
26  int flag = 0;
27 
28  if (!_cvmod(mode, &omode, &flag))
29  return ((FILE *)NULL);
30 
31  if ((ret = _openfd(name, omode)) < 0)
32  return ((FILE *)NULL);
33 
34  return (_fcons((FILE *)0, ret, flag | FI_CLOSE));
35 }
#define FI_CLOSE
Definition: schilyio.h:93
#define _openfd(name, omode)
Definition: schilyio.h:75
EXPORT FILE * _fcons(FILE *fd, int f, int flag)
Definition: fcons.c:53
EXPORT FILE * fileopen(char *name, const char *mode) const
Definition: fileopen.c:20
smooth NULL
Definition: ftsmooth.c:416
int ret
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 flag
Definition: glfuncs.h:52
EXPORT int _cvmod(char *mode, int *omode, int *flag) const
Definition: cvmod.c:27
GLenum mode
Definition: glext.h:6217
Definition: name.c:36
GLuint const GLchar * name
Definition: glext.h:6031