2 # This patch enables urlview v0.9 to decode quoted-printables in selected URL.
4 --- urlview-0.9/urlview.c Tue Jul 4 12:14:30 2000
5 +++ urlview-0.9.qpd-patch/urlview.c Thu Aug 3 02:49:03 2000
8 * Created: Thu Dec 4 02:13:11 PST 1997
9 * Last Modified: Tue Jul 4 11:23:49 CEST 2000
10 + * Last Modified: Thu Aug 3 02:46:37 CEST 2000
11 + * Eike Rathke, added 'd': decode quoted-printable
24 extern int mutt_enter_string (unsigned char *buf, size_t buflen, int y, int x,
29 + else if (redraw == CURRENT)
31 + mvaddstr (current - top + OFFSET, 0, " ");
32 + snprintf (buf, sizeof (buf), "%4d ", current + 1);
34 + addstr (url[current]);
37 else if (redraw == MOTION)
38 mvaddstr (oldcurrent - top + OFFSET, 0, " ");
43 search_backward (search, urlcount, url, &redraw, ¤t, &top);
46 + { /* erAck: decode quoted-printable */
48 + p1 = p2 = url[current];
51 + while ( *p2 && *p2 != '=' )
55 + if ( isxdigit( *(p2+1) ) && isxdigit( *(p2+2) ) )
58 + if ( 'A' <= *p2 && *p2 <= 'F' )
59 + *p1 = (((*p2 - 'A') + 10) << 4);
60 + else if ( 'a' <= *p2 && *p2 <= 'f' )
61 + *p1 = (((*p2 - 'a') + 10) << 4);
63 + *p1 = ((*p2 - '0') << 4);
65 + if ( 'A' <= *p2 && *p2 <= 'F' )
66 + *p1 += (*p2 - 'A') + 10;
67 + else if ( 'a' <= *p2 && *p2 <= 'f' )
68 + *p1 += (*p2 - 'a') + 10;