summaryrefslogtreecommitdiff
path: root/src/bin2char.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-17 17:34:53 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-17 17:34:53 +0000
commit8a14a72f573065fc38ed2e4029d2a41d701c3622 (patch)
treef0335358f1ffc90c3f70f92c8ce8e03991ef4157 /src/bin2char.c
parent0ebb33b185314a113a6961bf26c7b59cf42aff63 (diff)
downloadopenocd_libswd-8a14a72f573065fc38ed2e4029d2a41d701c3622.tar.gz
openocd_libswd-8a14a72f573065fc38ed2e4029d2a41d701c3622.tar.bz2
openocd_libswd-8a14a72f573065fc38ed2e4029d2a41d701c3622.tar.xz
openocd_libswd-8a14a72f573065fc38ed2e4029d2a41d701c3622.zip
Charles Hardin <ckhardin@gmail.com> move jim into helper
git-svn-id: svn://svn.berlios.de/openocd/trunk@822 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/bin2char.c')
-rw-r--r--src/bin2char.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/bin2char.c b/src/bin2char.c
deleted file mode 100644
index f1c809c8..00000000
--- a/src/bin2char.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2005 by Dominic Rath *
- * Dominic.Rath@gmx.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#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 null */};\n");
- return 0;
-}