aboutsummaryrefslogtreecommitdiffstats
path: root/helpers/gendec.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-05-03 17:39:24 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-05-03 17:39:24 +0300
commita298792109539fe8e970b6c88ad11570f28e52d6 (patch)
treeb3dc4b92b4a0295865e607c93d29baeda37caf72 /helpers/gendec.c
parent1057acb5715bc1e570c3a67f66847c9ac0f7bd6e (diff)
parent9287b67afa6d8d3000a9c89c5738272ce59ec862 (diff)
downloadegawk-a298792109539fe8e970b6c88ad11570f28e52d6.tar.gz
egawk-a298792109539fe8e970b6c88ad11570f28e52d6.tar.bz2
egawk-a298792109539fe8e970b6c88ad11570f28e52d6.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'helpers/gendec.c')
-rw-r--r--helpers/gendec.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/helpers/gendec.c b/helpers/gendec.c
new file mode 100644
index 00000000..cc50db44
--- /dev/null
+++ b/helpers/gendec.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+int main()
+{
+ int c;
+ int count = 0;
+
+ while ((c = getchar()) != EOF) {
+ printf("%d ", (c & 0xFF));
+ if (++count > 30) {
+ putchar('\n');
+ count = 0;
+ }
+ }
+ putchar('\n');
+
+ return 0;
+}