2 #include "fitz-stream.h"
4 typedef struct fz_ahxe_s fz_ahxe
;
12 static const char tohex
[16] = "0123456789ABCDEF";
15 fz_newahxe(fz_filter
**fp
, fz_obj
*params
)
17 FZ_NEWFILTER(fz_ahxe
, f
, ahxe
);
23 fz_dropahxe(fz_filter
*f
)
28 fz_processahxe(fz_filter
*filter
, fz_buffer
*in
, fz_buffer
*out
)
30 fz_ahxe
*f
= (fz_ahxe
*)filter
;
38 if (out
->wp
+ 2 >= out
->ep
) /* can write 3 bytes from 1 */
42 a
= tohex
[(c
>> 4) & 0x0f];
57 if (out
->wp
== out
->ep
)