/* 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.
*/
{
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");