ReactOS  0.4.15-dev-5496-g599ba9c
filewrite.c File Reference
#include "schilyio.h"
Include dependency graph for filewrite.c:

Go to the source code of this file.


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


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;
79  down2(f, _IOWRT, _IORW);
81  if (my_flag(f) & _JS_IOUNBUF)
82  return (_niwrite(fileno(f), buf, len));
83  cnt = fwrite(buf, 1, len, f);
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)
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)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define L(x)
Definition: ntvdm.h:50
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:125
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:135

Variable Documentation

◆ _writeerr

char _writeerr[] = "file_write_err"

Definition at line 19 of file filewrite.c.

Referenced by filewrite().