FreeCalypso > hg > freecalypso-tools
diff rvinterf/libasync/rvtrace.c @ 926:6a0aa8d36d06
rvinterf backslash escape: introduce libprint
The new helper function library named libprint is meant to replace
the badly misnamed libg23, and will soon contain functions for
printing all of the same kinds of GPF TST packets that are now handled
in libg23. However, we are also moving safe_print_trace() from libasync
to this new library, and changing it to emit our new backslash escape
format.
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Tue, 23 May 2023 03:47:46 +0000 |
| parents | e7502631a0f9 |
| children |
line wrap: on
line diff
--- a/rvinterf/libasync/rvtrace.c Tue May 23 03:21:02 2023 +0000 +++ b/rvinterf/libasync/rvtrace.c Tue May 23 03:47:46 2023 +0000 @@ -15,34 +15,6 @@ extern int rvi_msg_len; void -safe_print_trace(src, srclen, dest) - u_char *src; - char *dest; -{ - int i, c; - char *dp; - - dp = dest; - for (i = 0; i < srclen; i++) { - c = src[i]; - if (c & 0x80) { - *dp++ = 'M'; - *dp++ = '-'; - c &= 0x7F; - } - if (c < 0x20) { - *dp++ = '^'; - *dp++ = c + '@'; - } else if (c == 0x7F) { - *dp++ = '^'; - *dp++ = '?'; - } else - *dp++ = c; - } - *dp = '\0'; -} - -void handle_useid_0() { char buf[MAX_PKT_FROM_TARGET*4];
