[hackers] [sbase] replace printf + putchar with fputs || Evan Gates
commit b7c2bbc6dbbe16136a7cf00be3329a77b0b65e4a
Author: Evan Gates <evan.gates_AT_gmail.com>
Date: Fri Feb 20 12:14:51 2015 -0800
replace printf + putchar with fputs
diff --git a/Makefile b/Makefile
index 337b33e..1339299 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -210,8 +210,8 @@ sbase-box: $(LIB) $(SRC)
echo "else if (!strcmp(s, \"[\")) return test_main(argc, argv);" >> build/$_AT_.c
for f in $(SRC); do echo "else if(!strcmp(s, \"$${f%.c}\")) return $${f%.c}_main(argc, argv);" >> build/$_AT_.c; done
echo 'else {' >> build/$_AT_.c
- echo "printf(\"[\"); putchar(' ');" >> build/$_AT_.c
- for f in $(SRC); do echo "printf(\"$${f%.c}\"); putchar(' ');" >> build/$_AT_.c; done
+ echo "fputs(\"[ \", stdout);" >> build/$_AT_.c
+ for f in $(SRC); do echo "fputs(\"$${f%.c} \", stdout);" >> build/$_AT_.c; done
echo "putchar(0xa); }; return 0; }" >> build/$_AT_.c
$(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $_AT_ build/*.c $(LIB)
rm -r build
Received on Tue Mar 24 2015 - 23:53:59 CET
This archive was generated by hypermail 2.3.0
: Wed Mar 25 2015 - 00:10:57 CET