kolibrios/contrib/kolibri-libc/source/stdio/fputs.c
Magomed Kostoev (mkostoevr) 162d919194 kolibri-libc: Reimplement fgets, fputc, fputs, fread and fwrite
Now it follows the POSIX specification better.

git-svn-id: svn://kolibrios.org@8624 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-03-02 18:57:57 +00:00

11 lines
223 B
C

#include <stdio.h>
#include <string.h>
int fputs(const char *str, FILE *stream){
for(size_t i = 0; i < strlen(str); i++){
if (fputc(str[i], stream) == EOF) {
return EOF;
}
}
return 0;
}