ReactOS  0.4.14-dev-317-g96040ec
filewrite.c File Reference
#include "schilyio.h"
Include dependency graph for filewrite.c:

Go to the source code of this file.

Functions

EXPORT ssize_t filewrite (FILE *f, void *vbuf, size_t len)
 

Variables

static char _writeerr [] = "file_write_err"
 

Function Documentation

◆ filewrite()

EXPORT ssize_t filewrite ( FILE f,
void vbuf,
size_t  len 
)

Definition at line 71 of file filewrite.c.

75 {
76  ssize_t cnt;
77  char *buf = vbuf;
78 
79  down2(f, _IOWRT, _IORW);
80 
81  if (my_flag(f) & _JS_IOUNBUF)
82  return (_niwrite(fileno(f), buf, len));
83  cnt = fwrite(buf, 1, len, f);
84 
85  if (!ferror(f))
86  return (cnt);
89  return (-1);
90 }
#define _JS_IOUNBUF
Definition: schilyio.h:100
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define _JS_IONORAISE
Definition: schilyio.h:99
EXPORT ssize_t _niwrite(int f, void *buf, size_t count)
Definition: niwrite.c:22
EXPORT void raisecond(char *signame, long arg2) const
Definition: raisecond.c:100
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
static char _writeerr[]
Definition: filewrite.c:19
GLfloat f
Definition: glext.h:7540
_Check_return_ _CRTIMP int __cdecl fileno(_In_ FILE *_File)
#define _IOWRT
Definition: stdio.h:126
static const WCHAR L[]
Definition: oid.c:1250
GLenum GLsizei len
Definition: glext.h:6722
int ssize_t
Definition: rosdhcp.h:48
#define down2(f, fl1, fl2)
Definition: schilyio.h:218
#define my_flag(p)
Definition: schilyio.h:137
Definition: internal.h:110
EXPORT int _io_glflag
Definition: flag.c:31
#define _IORW
Definition: stdio.h:136

Variable Documentation

◆ _writeerr

char _writeerr[] = "file_write_err"
static

Definition at line 19 of file filewrite.c.

Referenced by filewrite().