projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Marcdump -c tries to make more readable strings
[yaz-moved-to-github.git]
/
util
/
marcdump.c
diff --git
a/util/marcdump.c
b/util/marcdump.c
index
02dacb1
..
f92204e
100644
(file)
--- a/
util/marcdump.c
+++ b/
util/marcdump.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-398,7
+398,10
@@
static void dump(const char *fname, const char *from, const char *to,
{
if ((i & 15) == 0)
fprintf(cfile, " \"");
{
if ((i & 15) == 0)
fprintf(cfile, " \"");
- fprintf(cfile, "\\x%02X", p[i] & 255);
+ if (p[i] < 32 || p[i] > 126)
+ fprintf(cfile, "\" \"\\x%02X\" \"", p[i] & 255);
+ else
+ fputc(p[i], cfile);
if (i < r - 1 && (i & 15) == 15)
fprintf(cfile, "\"\n");
if (i < r - 1 && (i & 15) == 15)
fprintf(cfile, "\"\n");