summaryrefslogtreecommitdiff
path: root/le2bin.c
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2012-09-26 15:04:18 +0200
committerPeter Wu <lekensteyn@gmail.com>2012-09-26 15:04:18 +0200
commit2497c1392b81e093f4de2541a98746aebd449a7f (patch)
treedb87e59d4c70c677ddb1899d9161b004f6e454ac /le2bin.c
downloadc-files-2497c1392b81e093f4de2541a98746aebd449a7f.tar.gz
Initial commit
Diffstat (limited to 'le2bin.c')
-rw-r--r--le2bin.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/le2bin.c b/le2bin.c
new file mode 100644
index 0000000..fa31dd7
--- /dev/null
+++ b/le2bin.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdint.h>
+
+int main(int argc, char **argv) {
+ int i;
+ for (i=1; i<argc; i++) {
+ uint32_t n = strtoul(argv[i], NULL, 16);
+ write(STDOUT_FILENO, &n, 4);
+ }
+ return 0;
+}