diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-08-23 12:22:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-08-23 12:22:51 +0200 |
commit | bc3604d9b226ac475a104cd8ae2ca2d1d4a27984 (patch) | |
tree | e796661f371a94a50edfdc693388bb911b253dfd /spectro/conv.c | |
parent | 509016be676f7915d635fa57144d2a441e3090ca (diff) | |
parent | c0b89ac5bfb90835ef01573267020e42d4fe070c (diff) |
Merge new upstream release
Diffstat (limited to 'spectro/conv.c')
-rwxr-xr-x[-rw-r--r--] | spectro/conv.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/spectro/conv.c b/spectro/conv.c index c0137ce..1f4d102 100644..100755 --- a/spectro/conv.c +++ b/spectro/conv.c @@ -131,6 +131,10 @@ int next_con_char(void) { } /* Horrible hack to poll stdin when we're not interactive */ +/* This has the drawback that the char and returm must be */ +/* written in one operation for the character to be recognised - */ +/* trying to do this manually typically doesn't work unless you are */ +/* very fast an lucky. */ static int th_read_char(void *pp) { char *rp = (char *)pp; HANDLE stdinh; @@ -1581,32 +1585,4 @@ int sa_lu_psinvert(double **out, double **in, int m, int n) { #endif /* SALONEINSTLIB */ /* ============================================================= */ -/* Diagnostic aids */ - -// Print bytes as hex to debug log */ -void adump_bytes(a1log *log, char *pfx, unsigned char *buf, int base, int len) { - int i, j, ii; - char oline[200] = { '\000' }, *bp = oline; - for (i = j = 0; i < len; i++) { - if ((i % 16) == 0) - bp += sprintf(bp,"%s%04x:",pfx,base+i); - bp += sprintf(bp," %02x",buf[i]); - if ((i+1) >= len || ((i+1) % 16) == 0) { - for (ii = i; ((ii+1) % 16) != 0; ii++) - bp += sprintf(bp," "); - bp += sprintf(bp," "); - for (; j <= i; j++) { - if (!(buf[j] & 0x80) && isprint(buf[j])) - bp += sprintf(bp,"%c",buf[j]); - else - bp += sprintf(bp,"."); - } - bp += sprintf(bp,"\n"); - a1logd(log,0,"%s",oline); - bp = oline; - } - } -} - - |