catpoint

simple slides viewer
git clone git://git.2f30.org/catpoint
Log | Files | Refs | README | LICENSE

commit cd3bb0fb510fc579df73e98fd06bf84826089eef
parent f79c989fd7b8ab805931f8b6e50240d06d24fca7
Author: FRIGN <dev@frign.de>
Date:   Fri, 11 Jul 2014 14:01:57 +0200

Remove printslide()

This function basically turned into a function-wrapper,
which is unnecessary, given it's only called once.

Diffstat:
Mcatpoint.c | 11++---------
1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/catpoint.c b/catpoint.c @@ -17,12 +17,6 @@ struct slide { size_t siz; }; -static void -printslide(struct slide *s) -{ - printf("%.*s", (int)s->siz, s->buf); -} - int main(int argc, char *argv[]) { @@ -65,9 +59,8 @@ main(int argc, char *argv[]) /* start */ i = 0; show: - /* display slide */ - printf("\x1b[2J\x1b[H"); /* clear */ - printslide(&s[i]); + /* clear screen and display slide */ + printf("\x1b[2J\x1b[H" "%.*s", (int)s[i].siz, s[i].buf); again: c = getchar(); switch (c) {