summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-11-06 17:18:49 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-11-06 17:18:49 +0100
commit035b2e455661701b217c54ad7e7afed8d7ead8fd (patch)
treee7962aa4642c49dcc067b659e734e9882e138923 /tools
parentcdffcbbf932021fae029a71e88a9e8a6153bf76e (diff)
move sourceclean.c to tools/
Diffstat (limited to 'tools')
-rw-r--r--tools/sourceclean.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/sourceclean.c b/tools/sourceclean.c
new file mode 100644
index 0000000..8fb02c4
--- /dev/null
+++ b/tools/sourceclean.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+int main(int argc, char **argv) {
+ unsigned char c;
+ while (fread(&c, sizeof(c), 1, stdin)) {
+ if (c < 128) {
+ printf("%c", c);
+ } else {
+ printf("\\x%2X", c);
+ }
+ }
+}