From 07f280ccf760f76b3590783724b2aa3cbeab279c Mon Sep 17 00:00:00 2001 From: Urban Wallasch Date: Sat, 21 Jul 2018 10:30:32 +0200 Subject: [PATCH] * Renamed to base4, to match this version's actual functionality. --- .gitignore | 2 +- base2.c => base4.c | 6 +++--- build.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename base2.c => base4.c (89%) diff --git a/.gitignore b/.gitignore index 162ad05..550b72a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ *.o -base2 +base4 diff --git a/base2.c b/base4.c similarity index 89% rename from base2.c rename to base4.c index b7db8a7..31c418d 100644 --- a/base2.c +++ b/base4.c @@ -5,7 +5,7 @@ static char *cd = "\t\n\r "; -static int b2encode( FILE *inf, FILE *outf ) { +static int b4encode( FILE *inf, FILE *outf ) { int c; while ( EOF != ( c = fgetc( inf ) ) ) { for ( int i = 6; i >= 0; i -= 2 ) @@ -14,7 +14,7 @@ static int b2encode( FILE *inf, FILE *outf ) { return ferror( inf ); } -static int b2decode( FILE *inf, FILE *outf ) { +static int b4decode( FILE *inf, FILE *outf ) { char c; unsigned d = 0; int i = 0; @@ -53,6 +53,6 @@ int main( int argc, char *argv[] ) { else usemsg( argv[0] ); } - res = encode ? b2encode( stdin, stdout ) : b2decode( stdin, stdout ); + res = encode ? b4encode( stdin, stdout ) : b4decode( stdin, stdout ); exit( res ? EXIT_FAILURE : EXIT_SUCCESS ); } diff --git a/build.sh b/build.sh index ca69251..a3fea44 100755 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -gcc -Wall -Wextra -std=c99 -pedantic -o base2 base2.c +gcc -Wall -Wextra -std=c99 -pedantic -o base4 base4.c -- 2.30.2