ReactOS  0.4.11-dev-745-g76daaf9
cvmod.c File Reference
#include "schilyio.h"
Include dependency graph for cvmod.c:

Go to the source code of this file.

Macros

#define O_BINARY   0
 
#define O_LARGEFILE   0
 

Functions

EXPORT int _cvmod (char *mode, int *omode, int *flag) const
 

Macro Definition Documentation

#define O_BINARY   0

Definition at line 20 of file cvmod.c.

Referenced by _cvmod().

#define O_LARGEFILE   0

Definition at line 23 of file cvmod.c.

Referenced by _cvmod().

Function Documentation

EXPORT int _cvmod ( char mode,
int omode,
int flag 
) const

Definition at line 27 of file cvmod.c.

Referenced by fileopen().

31 {
32  while (*mode) {
33  switch (*mode) {
34 
35  case 'r': *omode |= O_RDONLY; *flag |= FI_READ; break;
36  case 'w': *omode |= O_WRONLY; *flag |= FI_WRITE; break;
37  case 'e': *omode |= O_EXCL; break;
38  case 'c': *omode |= O_CREAT; *flag |= FI_CREATE; break;
39  case 't': *omode |= O_TRUNC; *flag |= FI_TRUNC; break;
40  case 'a': *omode |= O_APPEND; *flag |= FI_APPEND; break;
41  case 'u': *flag |= FI_UNBUF; break;
42  /* dummy on UNIX */
43  case 'b': *omode |= O_BINARY; *flag |= FI_BINARY; break;
44  /*
45  * XXX do we need this ?
46  * XXX May this be a problem?
47  */
48  case 'l': *omode |= O_LARGEFILE; break;
49  default: raisecond(_badmode, 0L);
50  return (0);
51  }
52  mode++;
53  }
54  if (*flag & FI_READ && *flag & FI_WRITE) {
55  *omode &= ~(O_RDONLY|O_WRONLY);
56  *omode |= O_RDWR;
57  }
58  return (1);
59 }
#define FI_APPEND
Definition: schilyio.h:88
#define FI_TRUNC
Definition: schilyio.h:91
#define O_BINARY
Definition: cvmod.c:20
#define O_LARGEFILE
Definition: cvmod.c:23
EXPORT void raisecond(char *signame, long arg2) const
Definition: raisecond.c:100
#define FI_UNBUF
Definition: schilyio.h:92
#define O_WRONLY
Definition: acwin.h:85
#define O_EXCL
Definition: fcntl.h:40
#define FI_CREATE
Definition: schilyio.h:90
char _badmode[]
Definition: dat.c:18
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
static const WCHAR L[]
Definition: oid.c:1087
#define O_TRUNC
Definition: acwin.h:86
#define O_RDWR
Definition: fcntl.h:36
#define FI_WRITE
Definition: schilyio.h:86
#define FI_READ
Definition: schilyio.h:85
#define O_CREAT
Definition: acwin.h:84
#define O_APPEND
Definition: fcntl.h:37
#define O_RDONLY
Definition: acwin.h:82