git: 2d110721bf91 - main - multimedia/pwcbsd: Clean up local patches.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 22 Aug 2022 18:15:26 UTC
The branch main has been updated by jhb (doc, src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=2d110721bf91569a165aa35baf5c9433158075ec

commit 2d110721bf91569a165aa35baf5c9433158075ec
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-08-22 18:13:49 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-08-22 18:13:49 +0000

    multimedia/pwcbsd: Clean up local patches.
    
    - Convert unconditional EXTRA_PATCHES to regular patches (they used to
      be conditional on an OSVERSION check removed several years ago)
    
    - Regenerate patches with make makepatch to ease future maintenance.
    
    Differential Revision:  https://reviews.freebsd.org/D35949
---
 multimedia/pwcbsd/Makefile                         |  6 ---
 ...extra-patch-Makefile.kld => patch-Makefile.kld} |  6 +--
 .../{extra-patch-pwc-ctrl.c => patch-pwc-ctrl.c}   | 17 +++----
 multimedia/pwcbsd/files/patch-pwc-dec23.c          | 18 ++++----
 .../{extra-patch-pwc-v4l.c => patch-pwc-v4l.c}     |  6 +--
 .../files/{extra-patch-pwc.c => patch-pwc.c}       | 54 +++++++++++-----------
 .../files/{extra-patch-pwc.h => patch-pwc.h}       | 21 +++++----
 multimedia/pwcbsd/files/patch-pwcview.c            |  6 +--
 8 files changed, 65 insertions(+), 69 deletions(-)

diff --git a/multimedia/pwcbsd/Makefile b/multimedia/pwcbsd/Makefile
index 053b19a49d3a..d324d68492ce 100644
--- a/multimedia/pwcbsd/Makefile
+++ b/multimedia/pwcbsd/Makefile
@@ -26,12 +26,6 @@ MMAP_DESC=	Enable mmap support (MAY CRASH YOUR SYSTEM)
 
 .include <bsd.port.options.mk>
 
-EXTRA_PATCHES=	${FILESDIR}/extra-patch-Makefile.kld \
-		${FILESDIR}/extra-patch-pwc-ctrl.c \
-		${FILESDIR}/extra-patch-pwc-v4l.c \
-		${FILESDIR}/extra-patch-pwc.c \
-		${FILESDIR}/extra-patch-pwc.h
-
 .if !exists(${SRC_BASE}/sys/Makefile)
 IGNORE=		requires kernel source files
 .endif
diff --git a/multimedia/pwcbsd/files/extra-patch-Makefile.kld b/multimedia/pwcbsd/files/patch-Makefile.kld
similarity index 67%
rename from multimedia/pwcbsd/files/extra-patch-Makefile.kld
rename to multimedia/pwcbsd/files/patch-Makefile.kld
index b614f0bb891f..52ae68f9e60a 100644
--- a/multimedia/pwcbsd/files/extra-patch-Makefile.kld
+++ b/multimedia/pwcbsd/files/patch-Makefile.kld
@@ -1,6 +1,6 @@
---- Makefile.kld.orig	2006-02-17 00:18:15.000000000 +0100
-+++ Makefile.kld	2009-05-27 20:22:49.137318240 +0200
-@@ -1,6 +1,7 @@
+--- Makefile.kld.orig	2006-02-16 23:18:15 UTC
++++ Makefile.kld
+@@ -1,6 +1,7 @@ SRCS=bus_if.h device_if.h opt_usb.h pwc.c pwc-ctrl.c \
  SRCS=bus_if.h device_if.h opt_usb.h pwc.c pwc-ctrl.c \
       pwc-dec1.c pwc-dec23.c pwc-kiara.c pwc-misc.c \
 -     pwc-timon.c pwc-uncompress.c pwc-v4l.c
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c b/multimedia/pwcbsd/files/patch-pwc-ctrl.c
similarity index 77%
rename from multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c
rename to multimedia/pwcbsd/files/patch-pwc-ctrl.c
index fa8e27e62701..785aac796aa2 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc-ctrl.c
+++ b/multimedia/pwcbsd/files/patch-pwc-ctrl.c
@@ -1,6 +1,6 @@
---- pwc-ctrl.c.orig	2007-07-02 08:54:19.000000000 +0200
-+++ pwc-ctrl.c	2009-09-09 10:34:41.000000000 +0200
-@@ -130,7 +130,7 @@
+--- pwc-ctrl.c.orig	2007-07-02 06:54:19 UTC
++++ pwc-ctrl.c
+@@ -130,7 +130,7 @@ static void pwc_set_image_buffer_size(struct pwc_softc
  static void pwc_set_image_buffer_size(struct pwc_softc *pdev);
  
  /****************************************************************************/
@@ -9,7 +9,7 @@
  			   u_int16_t value, u_int16_t index, void *data, u_int16_t size,int timeout)
  {
  	usb_device_request_t req;
-@@ -139,9 +139,9 @@
+@@ -139,10 +139,10 @@ static int usb_control_msg(usbd_device_handle udev,u_i
  	USETW(req.wValue, value);
  	USETW(req.wIndex, index);
  	USETW(req.wLength,size);
@@ -17,11 +17,12 @@
 +	return  -usbd_do_request(udev, NULL, &req, data);
  }
 -      
-+
  
++
  #define SendControlMsg(request, value, buflen) \
  	usb_control_msg(pdev->udev, 0, \
-@@ -159,7 +159,7 @@
+ 		request, \
+@@ -159,7 +159,7 @@ static int usb_control_msg(usbd_device_handle udev,u_i
  		pdev->vcinterface, \
  		&buf, buflen, 500)
  
@@ -30,7 +31,7 @@
  {
  	return usb_control_msg(udev,
  		0,
-@@ -1150,7 +1150,7 @@
+@@ -1150,7 +1150,7 @@ int pwc_mpt_set_angle(struct pwc_softc *pdev, int pan,
  		pdev->pan_angle  += pan;
  		pdev->tilt_angle += tilt;
  	}
@@ -39,7 +40,7 @@
  		ret = -ERANGE;				
  	return ret;
  }
-@@ -1284,7 +1284,7 @@
+@@ -1284,7 +1284,7 @@ int pwc_do_ioctl(struct pwc_softc *pdev, unsigned int 
  	{
  		ARG_DEF(struct pwc_probe, probe)
  		
diff --git a/multimedia/pwcbsd/files/patch-pwc-dec23.c b/multimedia/pwcbsd/files/patch-pwc-dec23.c
index 08796d35696f..9e7a9579a7d7 100644
--- a/multimedia/pwcbsd/files/patch-pwc-dec23.c
+++ b/multimedia/pwcbsd/files/patch-pwc-dec23.c
@@ -1,6 +1,6 @@
---- pwc-dec23.c.orig	2006-06-03 18:39:14.000000000 -0700
-+++ pwc-dec23.c	2022-07-26 09:51:27.868178000 -0700
-@@ -261,7 +261,7 @@
+--- pwc-dec23.c.orig	2006-06-04 01:39:14 UTC
++++ pwc-dec23.c
+@@ -261,7 +261,7 @@ void pwc_dec23_init(int type, int release, unsigned ch
  {
  	int flags;
  	struct pwc_dec23_private *pdev = data;
@@ -9,7 +9,7 @@
  
  	switch (type) {
  	case 720:
-@@ -277,7 +277,7 @@
+@@ -277,7 +277,7 @@ void pwc_dec23_init(int type, int release, unsigned ch
  			pdev->zz = 6;
  		flags = mode[2] >> 5;	/* our: 7 */
  
@@ -18,7 +18,7 @@
  				 pdev->table_0004, pdev->table_8004);
  		break;
  
-@@ -293,7 +293,7 @@
+@@ -293,7 +293,7 @@ void pwc_dec23_init(int type, int release, unsigned ch
  			pdev->zz = 6;
  		flags = mode[2] >> 3;
  
@@ -27,7 +27,7 @@
  				 pdev->table_0004, pdev->table_8004);
  		break;
  
-@@ -347,7 +347,6 @@
+@@ -347,7 +347,6 @@ static void DecompressBand23(const struct pwc_dec23_pr
  	unsigned int reservoir, nbits_in_reservoir;
  	int first_4_bits;
  	unsigned int bytes_per_channel;
@@ -35,7 +35,7 @@
  	int passes;
  	const unsigned char *ptable0004, *ptable8004;
  
-@@ -368,8 +367,6 @@
+@@ -368,8 +367,6 @@ static void DecompressBand23(const struct pwc_dec23_pr
  
  	get_nbits(reservoir, nbits_in_reservoir, stream, 4, first_4_bits);
  
@@ -44,7 +44,7 @@
  	for (passes = 0; passes < 2; passes++) {
  		if (passes == 0) {
  			bytes_per_channel = pixels_per_line;
-@@ -605,12 +602,13 @@
+@@ -605,12 +602,13 @@ void pwc_dec23_decompress(const struct pwc_coord *imag
  			  int flags, const void *data, int bandlength)
  {
  	const struct pwc_dec23_private *pdev = data;
@@ -60,7 +60,7 @@
  		pixel_size = view->x * 4;
  	} else {
  		n = view->x * view->y;
-@@ -632,7 +630,7 @@
+@@ -632,7 +630,7 @@ void pwc_dec23_decompress(const struct pwc_coord *imag
  			//TODO:
  			//DecompressBandBayer(pdev,src,pout,image.x,view->x,flags);
  			src += bandlength;
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc-v4l.c b/multimedia/pwcbsd/files/patch-pwc-v4l.c
similarity index 69%
rename from multimedia/pwcbsd/files/extra-patch-pwc-v4l.c
rename to multimedia/pwcbsd/files/patch-pwc-v4l.c
index 35ae7c2dfa31..0e6abb66864c 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc-v4l.c
+++ b/multimedia/pwcbsd/files/patch-pwc-v4l.c
@@ -1,6 +1,6 @@
---- pwc-v4l.c.orig	2006-06-07 22:15:52.000000000 +0200
-+++ pwc-v4l.c	2009-05-27 20:22:49.137318240 +0200
-@@ -67,7 +67,7 @@
+--- pwc-v4l.c.orig	2006-06-07 20:15:52 UTC
++++ pwc-v4l.c
+@@ -67,7 +67,7 @@ int pwc_video_do_ioctl(struct pwc_softc *pdev, unsigne
  		{
  			struct video_capability *caps = arg;
  
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc.c b/multimedia/pwcbsd/files/patch-pwc.c
similarity index 92%
rename from multimedia/pwcbsd/files/extra-patch-pwc.c
rename to multimedia/pwcbsd/files/patch-pwc.c
index ab3761be333e..069343e73afd 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc.c
+++ b/multimedia/pwcbsd/files/patch-pwc.c
@@ -1,5 +1,5 @@
---- ./pwc.c.orig	2007-10-09 00:14:01.000000000 -0700
-+++ ./pwc.c	2022-07-26 09:44:50.872775000 -0700
+--- pwc.c.orig	2007-10-09 07:14:01 UTC
++++ pwc.c
 @@ -28,7 +28,8 @@
  #include "pwc-dec1.h"
  #include "pwc-dec23.h"
@@ -10,7 +10,7 @@
  static void pwc_reset_buffers(struct pwc_softc *sc);
  static void pwc_free_buffers(struct pwc_softc *sc, int detach);
  
-@@ -57,55 +58,68 @@
+@@ -57,55 +58,68 @@ struct cdevsw pwc_cdevsw = {
  	.d_mmap		= pwc_mmap,
  	.d_name		= "pwc",
  };
@@ -121,7 +121,7 @@
  	DEVMETHOD(device_attach, pwc_attach),
  	DEVMETHOD(device_detach, pwc_detach),
  	{0,0},
-@@ -120,41 +134,25 @@
+@@ -120,41 +134,25 @@ static int
  MODULE_DEPEND(pwc, usb, 1, 1, 1);
  
  static int
@@ -175,7 +175,7 @@
  }
  
  static int
-@@ -162,43 +160,26 @@
+@@ -162,43 +160,26 @@ pwc_attach(device_t self)
  {
  	struct pwc_softc *sc = device_get_softc(self);
  	struct usb_attach_arg *uaa = device_get_ivars(self);
@@ -228,7 +228,7 @@
  		
  			/* Logitech QuickCam Orbit */
  			sc->features |= FEATURE_MOTOR_PANTILT;
-@@ -215,6 +196,8 @@
+@@ -215,6 +196,8 @@ pwc_attach(device_t self)
  	resource_string_value("pwc",device_get_unit(self),"devname",&tmpstr);
  	sc->sc_dev_t = make_dev(&pwc_cdevsw, device_get_unit(self),UID_ROOT, GID_OPERATOR,
  				0666, "%s%d",tmpstr,device_get_unit(self));
@@ -237,7 +237,7 @@
  	
  	resource_int_value("pwc",device_get_unit(self),"power_save",&sc->power_save);
  
-@@ -273,7 +256,6 @@
+@@ -273,7 +256,6 @@ pwc_attach(device_t self)
  	resource_int_value("pwc",device_get_unit(self),"pad",&sc->pwc_pad);
  
  	pwc_construct(sc);
@@ -245,7 +245,7 @@
  
  	if(pwc_get_cmos_sensor(sc, &i) >= 0) {
  	
-@@ -299,7 +281,6 @@
+@@ -299,7 +281,6 @@ pwc_attach(device_t self)
  	if(sc->power_save)
  		pwc_camera_power(sc, 0);
  
@@ -253,7 +253,7 @@
  	return 0;
  }
  
-@@ -309,13 +290,9 @@
+@@ -309,13 +290,9 @@ pwc_detach(device_t self)
  	struct pwc_softc *sc = device_get_softc(self);
  
  	Trace(TRACE_PROBE,"pwc_detach: sc=%p\n",sc);
@@ -269,7 +269,7 @@
  	sc->error_status = EPIPE;
  
  	if(sc->vopen) {
-@@ -334,21 +311,17 @@
+@@ -334,21 +311,17 @@ pwc_detach(device_t self)
  	
  	mtx_destroy(&sc->ptrlock);
  	pwc_free_buffers(sc,1);
@@ -295,7 +295,7 @@
  	Trace(TRACE_OPEN,"pwc_open: flag=%d, mode=%d, unit=%d\n",flag, mode, unit);
  
  	if(sc->error_status == EPIPE)
-@@ -419,23 +392,6 @@
+@@ -419,23 +392,6 @@ pwc_open(struct cdev *dev, int flag, int mode, struct 
  	for (i = 0; i < sc->pwc_mbufs; i++)
  		sc->image_used[i] = 0;
  
@@ -319,7 +319,7 @@
  	sc->state = 0;
  	sc->vframe_count = 0;
  	sc->vframes_dumped = 0;
-@@ -476,10 +432,10 @@
+@@ -476,10 +432,10 @@ pwc_close(struct cdev *dev, int flag, int mode, struct
  int
  pwc_close(struct cdev *dev, int flag, int mode, struct thread *p)
  {
@@ -334,7 +334,7 @@
  	Trace(TRACE_OPEN,"pwc_close: flag=%d, mode=%d, unit=%d\n", flag, mode, unit);
  
  	/* Dump statistics, but only if a reasonable amount of frames were
-@@ -495,19 +451,14 @@
+@@ -495,19 +451,14 @@ pwc_close(struct cdev *dev, int flag, int mode, struct
  		pwc_dec1_exit();
  	else
  		pwc_dec23_exit();	/* Timon & Kiara */
@@ -357,7 +357,7 @@
  		pwc_set_leds(sc,0,0);
  		
  		if(sc->power_save) {
-@@ -523,15 +474,16 @@
+@@ -523,15 +474,16 @@ pwc_read(struct cdev *dev, struct uio *uio, int flag)
  int
  pwc_read(struct cdev *dev, struct uio *uio, int flag)
  {
@@ -377,7 +377,7 @@
  	if (sc->error_status)
  		return sc->error_status;
  
-@@ -565,7 +517,7 @@
+@@ -565,7 +517,7 @@ pwc_read(struct cdev *dev, struct uio *uio, int flag)
  	if(count + sc->image_read_pos > bytes_to_read)
  		count = bytes_to_read - sc->image_read_pos;
  	
@@ -386,7 +386,7 @@
  
  	err = uiomove(sc->images[sc->fill_image].bufmem + sc->image_read_pos,count,uio);
  	if(err)
-@@ -583,10 +535,9 @@
+@@ -583,10 +535,9 @@ pwc_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, 
  int
  pwc_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p)
  {
@@ -399,7 +399,7 @@
  	if (sc->error_status)
  		return sc->error_status;
  	
-@@ -596,11 +547,9 @@
+@@ -596,11 +547,9 @@ pwc_poll(struct cdev *dev, int events, struct thread *
  int
  pwc_poll(struct cdev *dev, int events, struct thread *p)
  {
@@ -412,7 +412,7 @@
  	if(sc->error_status)
  		return sc->error_status;
  
-@@ -625,16 +574,17 @@
+@@ -625,16 +574,17 @@ int
  }
  
  int
@@ -436,7 +436,7 @@
  	if (sc->error_status)
  		return sc->error_status;
  
-@@ -652,16 +602,10 @@
+@@ -652,16 +602,10 @@ pwc_try_video_mode(struct pwc_softc *sc, int width, in
  int
  pwc_try_video_mode(struct pwc_softc *sc, int width, int height, int new_fps, int new_compression, int new_snapshot)
  {
@@ -456,7 +456,7 @@
  	pwc_reset_buffers(sc);
  	
  	/* Try to set video mode... if that fails fallback to previous mode  */
-@@ -678,52 +622,21 @@
+@@ -678,52 +622,21 @@ pwc_try_video_mode(struct pwc_softc *sc, int width, in
  	sc->drop_frames++; /* try to avoid garbage during switch */
  	sc->vsync = 0;
  
@@ -516,7 +516,7 @@
  	}
  	
  	if(sc->state & PWC_INIT)
-@@ -767,38 +680,42 @@
+@@ -767,38 +680,42 @@ static void
  }
  
  static void
@@ -584,7 +584,7 @@
  	/* Reset ISOC error counter. We did get here, after all. */
  	sc->visoc_errors = 0;
  
-@@ -816,8 +733,8 @@
+@@ -816,8 +733,8 @@ pwc_isoc_handler(usbd_xfer_handle xfer, usbd_private_h
  		/* XXX there is no individual framestatus in FreeBSD usbstack
  		 * so just assume all frames are good
  		 */
@@ -595,7 +595,7 @@
  
  		if (flen > 0) { /* if valid data... */
  			if(sc->vsync > NOCOPY) { /* ...and we are not sync-hunting... */
-@@ -830,7 +747,7 @@
+@@ -830,7 +747,7 @@ pwc_isoc_handler(usbd_xfer_handle xfer, usbd_private_h
  					sc->vframes_error++;
  				}
  				else {
@@ -604,7 +604,7 @@
  					fillptr += flen;
  				}
  			}
-@@ -943,7 +860,6 @@
+@@ -943,7 +860,6 @@ eof_done:
  		sc->vlast_packet_size = flen;
  
  	}
@@ -612,7 +612,7 @@
  	if(awake) {
  		if(sc->state & PWC_ASLEEP) {
  			wakeup(sc);
-@@ -953,16 +869,6 @@
+@@ -953,16 +869,6 @@ handler_end:
  			selwakeuppri(&sc->rsel, PZERO);
  		}
  	}
@@ -629,7 +629,7 @@
  }
  
  int
-@@ -1050,6 +956,9 @@
+@@ -1050,6 +956,9 @@ pwc_free_buffers(struct pwc_softc *sc, int detach)
  {
  	int i;
  	Trace(TRACE_MEMORY, "Entering free_buffers(%p).\n", sc);
@@ -639,7 +639,7 @@
  	if (sc->fbuf != NULL) {
  		for (i = 0; i < sc->pwc_fbufs; i++) {
  			if (sc->fbuf[i].data != NULL) {
-@@ -1074,13 +983,12 @@
+@@ -1074,13 +983,12 @@ pwc_free_buffers(struct pwc_softc *sc, int detach)
  		free(sc->image_data,M_USBDEV);
  		sc->image_data = NULL;
  	}
diff --git a/multimedia/pwcbsd/files/extra-patch-pwc.h b/multimedia/pwcbsd/files/patch-pwc.h
similarity index 90%
rename from multimedia/pwcbsd/files/extra-patch-pwc.h
rename to multimedia/pwcbsd/files/patch-pwc.h
index 5a99819343c3..8b34a56c56d3 100644
--- a/multimedia/pwcbsd/files/extra-patch-pwc.h
+++ b/multimedia/pwcbsd/files/patch-pwc.h
@@ -1,5 +1,5 @@
---- pwc.h.orig	2006-09-27 00:21:01.000000000 -0500
-+++ pwc.h	2010-05-17 10:10:06.000000000 -0500
+--- pwc.h.orig	2006-09-27 05:21:01 UTC
++++ pwc.h
 @@ -44,8 +44,21 @@
  #include <vm/pmap.h>
  
@@ -24,24 +24,25 @@
  #include "pwc-uncompress.h"
  #include "pwc-ioctl.h"
  #include "videodev.h"
-@@ -93,14 +106,9 @@
+@@ -93,15 +106,10 @@ extern int  pwcdebug;
  #define FRAME_LOWMARK 5
  
  /* Size and number of buffers for the ISO pipe. */
 -#define MAX_ISO_BUFS		3
--
++#define MAX_ISO_BUFS		2
+ 
 -/* !!!!!!!!!! IMPORTANT DO NOT SET THIS HIGHER THAN 8 !!!!!!!!!!!!!!! 
 - * !!!!!!!!!! OHCI IS BUGGY IF YOU DO SO              !!!!!!!!!!!!!!!*/
 -#define ISO_FRAMES_PER_DESC	8
-+#define MAX_ISO_BUFS		2
++#define ISO_FRAMES_PER_DESC	16	/* should be multiple of 8 */
  
 -#define ISO_MAX_FRAME_SIZE	960
 -#define ISO_BUFFER_SIZE 	(ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)
-+#define ISO_FRAMES_PER_DESC	16	/* should be multiple of 8 */
- 
+-
  /* Frame buffers: contains compressed or uncompressed video data. */
  #define MAX_FRAMES		5
-@@ -133,17 +141,17 @@
+ /* Maximum size after decompression is 640x480 YUV data, 1.5 * 640 * 480 */
+@@ -133,17 +141,17 @@ struct pwc_softc
  struct pwc_softc
  {
     device_t sc_dev;
@@ -64,7 +65,7 @@
     int error_status;		/* set when something goes wrong with the cam (unplugged, USB errors) */
     int usb_init;		/* set when the cam has been initialized over USB */
  
-@@ -165,7 +173,6 @@
+@@ -165,7 +173,6 @@ struct pwc_softc
     int vframe_count;		/* received frames */
     int vframes_dumped; 		/* counter for dumped frames */
     int vframes_error;		/* frames received in error */
@@ -72,7 +73,7 @@
     u_int16_t vlast_packet_size;	/* for frame synchronisation */
     int visoc_errors;		/* number of contiguous ISOC errors */
     int vcompression;		/* desired compression factor */
-@@ -187,15 +194,7 @@
+@@ -187,15 +194,7 @@ struct pwc_softc
        Note that MAX_ISO_BUFS != MAX_FRAMES != MAX_IMAGES....
        We have in effect a back-to-back-double-buffer system.
      */
diff --git a/multimedia/pwcbsd/files/patch-pwcview.c b/multimedia/pwcbsd/files/patch-pwcview.c
index d0bd54bf9eaa..ed407a6ba22a 100644
--- a/multimedia/pwcbsd/files/patch-pwcview.c
+++ b/multimedia/pwcbsd/files/patch-pwcview.c
@@ -1,6 +1,6 @@
---- ./pwcview.c.orig	2009-10-03 20:45:17.711703547 +0200
-+++ ./pwcview.c	2009-10-03 20:46:00.814254980 +0200
-@@ -837,6 +837,8 @@
+--- pwcview.c.orig	2007-10-09 07:03:10 UTC
++++ pwcview.c
+@@ -837,6 +837,8 @@ void jpeg_write(int height, JSAMPIMAGE jimage, struct 
  	jdata[1] = jimage[1];
  	jdata[2] = jimage[2];