summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-13 20:20:58 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-13 20:20:58 +0000
commit1edd0e68228fb1476e9972251f89c13e91ee44eb (patch)
tree29321d5f5511800bc1cb024d3fca4c255e87549d
parent766b0ca8ac484a37d878623a189985b8e51e73cd (diff)
downloadopenocd+libswd-1edd0e68228fb1476e9972251f89c13e91ee44eb.tar.gz
openocd+libswd-1edd0e68228fb1476e9972251f89c13e91ee44eb.tar.bz2
openocd+libswd-1edd0e68228fb1476e9972251f89c13e91ee44eb.tar.xz
openocd+libswd-1edd0e68228fb1476e9972251f89c13e91ee44eb.zip
- added svn props for newly added files
git-svn-id: svn://svn.berlios.de/openocd/trunk@804 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/bin2char.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/bin2char.c b/src/bin2char.c
index de00aeba..436839bb 100644
--- a/src/bin2char.c
+++ b/src/bin2char.c
@@ -1,30 +1,30 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main(int argc, char **argv)
-{
- int c;
- unsigned int n;
- char *name;
-
- if (argc == 1) {
- fprintf(stderr, "bin2char <varname>\n");
- fprintf(stderr, "read from standard input and write a char"
- " array out to standard output\n");
- exit(1);
- }
-
- n = 0;
- name = argv[1];
- fprintf(stdout, "/* autogenerated from %s */\n", argv[0]);
- fprintf(stdout, "unsigned const char %s[] = {\n", name);
- while ((c = getc(stdin)) != EOF) {
- fprintf(stdout, "0x%02x,", c & 0xff);
- if ((++n % 16) == 0)
- fprintf(stdout, "\n");
- }
- fprintf(stdout, "0 /* terminate with a nil */};\n");
- fprintf(stdout, "unsigned int %s_len = %u;\n", name, n);
- return 0;
-}
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main(int argc, char **argv)
+{
+ int c;
+ unsigned int n;
+ char *name;
+
+ if (argc == 1) {
+ fprintf(stderr, "bin2char <varname>\n");
+ fprintf(stderr, "read from standard input and write a char"
+ " array out to standard output\n");
+ exit(1);
+ }
+
+ n = 0;
+ name = argv[1];
+ fprintf(stdout, "/* autogenerated from %s */\n", argv[0]);
+ fprintf(stdout, "unsigned const char %s[] = {\n", name);
+ while ((c = getc(stdin)) != EOF) {
+ fprintf(stdout, "0x%02x,", c & 0xff);
+ if ((++n % 16) == 0)
+ fprintf(stdout, "\n");
+ }
+ fprintf(stdout, "0 /* terminate with a nil */};\n");
+ fprintf(stdout, "unsigned int %s_len = %u;\n", name, n);
+ return 0;
+}