This repository has been archived by the owner on Jan 11, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stubbed the <stdio.h> feof(), fgetc(), getc(), getchar() functions.
- Loading branch information
Showing
7 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
/* This is free and unencumbered software released into the public domain. */ | |||
|
|||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
|
|||
#include <stdio.h> /* for FILE, feof() */ | |||
|
|||
#include "sysio.h" /* for __sysio_*() */ | |||
|
|||
/** | |||
* @date 2014-11-23 | |||
* @author Arto Bendiken | |||
* @see http://libc11.org/stdio/feof.html | |||
*/ | |||
int | |||
feof(FILE* const stream) { | |||
|
|||
return *__sysio_errno(stream); // FIXME | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
/* This is free and unencumbered software released into the public domain. */ | |||
|
|||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
|
|||
#include <stdio.h> /* for EOF, FILE, fgetc() */ | |||
|
|||
/** | |||
* @date 2014-11-23 | |||
* @author Arto Bendiken | |||
* @see http://libc11.org/stdio/fgetc.html | |||
*/ | |||
int | |||
fgetc(FILE* const stream) { | |||
|
|||
return (void)stream, EOF; // TODO | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
/* This is free and unencumbered software released into the public domain. */ | |||
|
|||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
|
|||
#include <stdio.h> /* for FILE, fgetc(), getc() */ | |||
|
|||
/** | |||
* @date 2014-11-23 | |||
* @author Arto Bendiken | |||
* @see http://libc11.org/stdio/getc.html | |||
*/ | |||
int | |||
getc(FILE* const stream) { | |||
|
|||
return fgetc(stream); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
/* This is free and unencumbered software released into the public domain. */ | |||
|
|||
#ifdef HAVE_CONFIG_H | |||
#include <config.h> | |||
#endif | |||
|
|||
#include <stdio.h> /* for stdin, fgetc(), getchar() */ | |||
|
|||
/** | |||
* @date 2014-11-23 | |||
* @author Arto Bendiken | |||
* @see http://libc11.org/stdio/getchar.html | |||
*/ | |||
int | |||
getchar(void) { | |||
|
|||
return fgetc(stdin); | |||
} |