/* XXX - for text printing, we probably want to wrap lines at 80 characters; (PostScript printing is doing this already), and perhaps put some kind of dingbat (to use the technical term) to indicate a wrapped line, along the lines of what's done when displaying this in a window, as per Warren Young's suggestion.  */
static gboolean follow_print_text(char *buffer, size_t nchars, gboolean is_from_server _U_, void *arg)
/* XXX - for text printing, we probably want to wrap lines at 80 characters; (PostScript printing is doing this already), and perhaps put some kind of dingbat (to use the technical term) to indicate a wrapped line, along the lines of what's done when displaying this in a window, as per Warren Young's suggestion.  */
static gboolean follow_print_text(char *buffer, size_t nchars, gboolean is_from_server _U_, void *arg)
{
    print_stream_t *stream = (print_stream_t *)arg;
    size_t i;
    char *str;
    for (i = 0; i < nchars; i++) {
        if (buffer[i] == '\n' || buffer[i] == '\r')
            continue;
        if (! g_ascii_isprint(buffer[i])) {
            buffer[i] = '.';
        }
    }
    str = (char *)g_malloc(nchars + 1);
    memcpy(str, buffer, nchars);
    str[nchars] = 0;
    print_line(stream, 0, str);
    g_free(str);
    return TRUE;
}