summaryrefslogtreecommitdiff
path: root/sourceclean.c
diff options
context:
space:
mode:
Diffstat (limited to 'sourceclean.c')
-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);
+ }
+ }
+}