diff options
Diffstat (limited to 'src/image/dfaxg42d.c')
-rw-r--r-- | src/image/dfaxg42d.c | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/src/image/dfaxg42d.c b/src/image/dfaxg42d.c index 6e2e8dd..adeaa25 100644 --- a/src/image/dfaxg42d.c +++ b/src/image/dfaxg42d.c @@ -22,9 +22,12 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ +/* $XFree86: xc/lib/lbxutil/image/dfaxg42d.c,v 1.6 2001/04/23 20:31:05 dawes Exp $ */ +#include <X11/Xos.h> #include <X11/Xfuncproto.h> #include <X11/Xfuncs.h> +#include <stdlib.h> #include "g3states.h" #include "lbxfax.h" #include "lbximage.h" @@ -43,9 +46,7 @@ static short sp_data, sp_bit; */ static unsigned char -fetchByte (inbuf) - -unsigned char **inbuf; +fetchByte (unsigned char **inbuf) { unsigned char byte = **inbuf; @@ -59,9 +60,7 @@ unsigned char **inbuf; */ static int -decode_white_run (inbuf) - -unsigned char **inbuf; +decode_white_run (unsigned char **inbuf) { short state = sp_bit; @@ -98,9 +97,7 @@ unsigned char **inbuf; */ static int -decode_black_run (inbuf) - -unsigned char **inbuf; +decode_black_run (unsigned char **inbuf) { short state = sp_bit + 8; @@ -138,9 +135,7 @@ unsigned char **inbuf; */ static int -decode_uncomp_code (inbuf) - -unsigned char **inbuf; +decode_uncomp_code (unsigned char **inbuf) { short code; @@ -162,10 +157,8 @@ unsigned char **inbuf; */ static void -fillspan (cp, x, count) - -register char *cp; -register int x, count; +fillspan (char *cp, + int x, int count) { static unsigned char masks[] = @@ -191,7 +184,7 @@ register int x, count; while (count >= 8) { - *cp++ = 0xff; + *cp++ = (char)0xff; count -= 8; } @@ -206,9 +199,7 @@ register int x, count; */ static int -nextbit (inbuf) - -unsigned char **inbuf; +nextbit (unsigned char **inbuf) { static unsigned char bitMask[8] = @@ -228,12 +219,10 @@ unsigned char **inbuf; static int -DecodeFaxG42D (inbuf, refline, pixels_per_line, outbuf) - -unsigned char **inbuf; -unsigned char *refline; -int pixels_per_line; -unsigned char *outbuf; +DecodeFaxG42D (unsigned char **inbuf, + unsigned char *refline, + int pixels_per_line, + unsigned char *outbuf) { int a0 = -1; @@ -386,15 +375,12 @@ bad: int -LbxImageDecodeFaxG42D (inbuf, outbuf, image_bytes, pixels_per_line, - padded_bytes_per_scanline, reverse_bits) - -unsigned char *inbuf; -unsigned char *outbuf; -int image_bytes; -int pixels_per_line; -int padded_bytes_per_scanline; -int reverse_bits; +LbxImageDecodeFaxG42D (unsigned char *inbuf, + unsigned char *outbuf, + int image_bytes, + int pixels_per_line, + int padded_bytes_per_scanline, + int reverse_bits) { int bytes_per_scanline = ROUNDUP8 (pixels_per_line); |