aboutsummaryrefslogtreecommitdiffstats
path: root/helpers/gendec.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-05-03 17:42:52 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-05-03 17:42:52 +0300
commita95aad26e785335f6cca2d9009388f4a74ae3635 (patch)
tree890f6a69f7b5ea373a11966ce82255a2409d3f69 /helpers/gendec.c
parent09c533438cd709076c29bb61585833e2c4d67f97 (diff)
parent9287b67afa6d8d3000a9c89c5738272ce59ec862 (diff)
downloadegawk-a95aad26e785335f6cca2d9009388f4a74ae3635.tar.gz
egawk-a95aad26e785335f6cca2d9009388f4a74ae3635.tar.bz2
egawk-a95aad26e785335f6cca2d9009388f4a74ae3635.zip
Merge branch 'master' into feature/regex-type
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;
+}