#! /bin/sh /usr/share/dpatch/dpatch-run
## 001-unsign_sign_chars.dpatch by Maximiliano Curia <maxy@debian.org>
##
## DP: Fixes useless gcc signed/unsigned char warnings

@DPATCH@
diff -urNad gmotionlive-1.0~/gmotionlive.c gmotionlive-1.0/gmotionlive.c
--- gmotionlive-1.0~/gmotionlive.c	2005-04-12 05:52:11.000000000 -0300
+++ gmotionlive-1.0/gmotionlive.c	2008-07-15 15:46:52.000000000 -0300
@@ -34,10 +34,10 @@
 int netcam_data = 0;
 int netcam_boundarylen;
 int netcam_offset;
-unsigned char databuf[8192];
-unsigned char boundary[4096];
-unsigned char *boundarystart;
-unsigned char *buf = databuf + 4096;
+char databuf[8192];
+char boundary[4096];
+char *boundarystart;
+char *buf = databuf + 4096;
 int netcam_count = 0;
 int netcam_time = 0;
 int netcam_timecount = 0;
@@ -96,7 +96,7 @@
 size_t netcam_write(void *ptr, size_t size, size_t nmemb, void *stream)
 {
 	int i, j;
-	unsigned char *data = ptr;
+	char *data = ptr;
 
 	/* Write the entire stream to stdout for debugging (or recording): */
 	/*write(2, data, size * nmemb);*/
@@ -150,7 +150,7 @@
 			}	
 		}
 		if  (netcam_state == NETCAM_STATE_DATA) {
-			unsigned char *start;
+			char *start;
 			int checklen;
 			int boundoff = 0;
 			int back = i + 1;
@@ -185,7 +185,7 @@
 				}
 			}
 			if (j) {
-				if (FALSE == gdk_pixbuf_loader_write(pixbufloader, start, j, NULL)) {
+				if (FALSE == gdk_pixbuf_loader_write(pixbufloader, (unsigned char*) start, j, NULL)) {
 					netcam_linesize = 1;
 					i = back;
 					netcam_state = NETCAM_STATE_START;
