mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 01:23:45 +00:00
43 lines
691 B
C
43 lines
691 B
C
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
|
#include <stdio.h>
|
|
#include <libc/file.h>
|
|
#include <string.h>
|
|
#include <windows.h>
|
|
|
|
int
|
|
fputs(const char *s, FILE *f)
|
|
{
|
|
/*
|
|
int r = 0;
|
|
int c;
|
|
int unbuffered;
|
|
char localbuf[BUFSIZ];
|
|
|
|
unbuffered = f->_flag & _IONBF;
|
|
if (unbuffered)
|
|
{
|
|
f->_flag &= ~_IONBF;
|
|
f->_ptr = f->_base = localbuf;
|
|
f->_bufsiz = BUFSIZ;
|
|
}
|
|
|
|
while ((c = *s++))
|
|
r = putc(c, f);
|
|
|
|
if (unbuffered)
|
|
{
|
|
fflush(f);
|
|
f->_flag |= _IONBF;
|
|
f->_base = NULL;
|
|
f->_bufsiz = 0;
|
|
f->_cnt = 0;
|
|
}
|
|
|
|
return(r);
|
|
*/
|
|
int r = 0;
|
|
if ( !WriteFile(_get_osfhandle(f->_file),s,strlen(s),&r,NULL) )
|
|
return -1;
|
|
|
|
return r;
|
|
}
|