summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-11-06 17:10:23 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-11-06 17:10:23 +0100
commitc0bec496239e43b389e42d8ed65e16b9c1cf8f26 (patch)
tree862b282a83685d6d7be6265e8a9f3db6c52cfb54
parent4fcd5ce7d0f1e8d3e661fc7f9a6d5e847fc8cbbc (diff)
add sourceclean
-rw-r--r--sourceclean.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sourceclean.c b/sourceclean.c
new file mode 100644
index 0000000..8fb02c4
--- /dev/null
+++ b/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);
+ }
+ }
+}