reactos/reactos/lib/msvcrt/io/write.c
Eric Kohl 357a89921a Untangled crtdll/msvcrt header mess.
svn path=/trunk/; revision=2031
2001-07-03 13:21:22 +00:00

23 lines
505 B
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/crtdll/io/write.c
* PURPOSE: Writes to a file
* PROGRAMER: Boudewijn Dekker
* UPDATE HISTORY:
* 28/12/98: Created
*/
#include <windows.h>
#include <msvcrt/io.h>
size_t _write(int _fd, const void *_buf, size_t _nbyte)
{
DWORD _wbyte;
if (!WriteFile(_get_osfhandle(_fd),_buf,_nbyte,&_wbyte,NULL))
{
return -1;
}
return (size_t)_wbyte;
}