summaryrefslogtreecommitdiffstats
path: root/fgetc.c
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2020-11-13 23:29:23 +0100
committerpgen <p.gen.progs@gmail.com>2020-11-13 23:57:46 +0100
commit97ee2fbf897a589c861b9379b41f8b9a70855cf5 (patch)
tree1cb9ab216d4554aac0d5eba501fec8da2ed0388a /fgetc.c
parent0e6328f3f08945d04d565d78cd413e9c355fb1f0 (diff)
Improve comments
Diffstat (limited to 'fgetc.c')
-rw-r--r--fgetc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fgetc.c b/fgetc.c
index 5de851c..fd1e611 100644
--- a/fgetc.c
+++ b/fgetc.c
@@ -1,11 +1,11 @@
/* ########################################################### */
/* This Software is licensed under the GPL licensed Version 2, */
-/* please read http://www.gnu.org/copyleft/gpl.html */
+/* please read http://www.gnu.org/copyleft/gpl.html. */
/* ########################################################### */
-/* ************************************************************************ */
-/* Custom fgetc/ungetc implementation able to unget more than one character */
-/* ************************************************************************ */
+/* ************************************************************************* */
+/* Custom fgetc/ungetc implementation able to unget more than one character. */
+/* ************************************************************************* */
#include <stdio.h>
#include "fgetc.h"
@@ -17,20 +17,20 @@ enum
static char getc_buffer[GETC_BUFF_SIZE] = { '\0' };
-static long next_buffer_pos = 0; /* next free position in the getc buffer */
+static long next_buffer_pos = 0; /* Next free position in the getc buffer. */
-/* ======================================= */
-/* Gets a (possibly pushed-back) character */
-/* ======================================= */
+/* ======================================== */
+/* Gets a (possibly pushed-back) character. */
+/* ======================================== */
int
my_fgetc(FILE * input)
{
return (next_buffer_pos > 0) ? getc_buffer[--next_buffer_pos] : fgetc(input);
}
-/* ============================== */
-/* Pushes character back on input */
-/* ============================== */
+/* =============================== */
+/* Pushes character back on input. */
+/* =============================== */
void
my_ungetc(int c)
{