From owner-freebsd-ports Tue May 19 16:29:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA16050 for freebsd-ports-outgoing; Tue, 19 May 1998 16:29:38 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from iconmail.bellatlantic.net (iconmail.bellatlantic.net [199.173.162.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA16031 for ; Tue, 19 May 1998 16:29:25 -0700 (PDT) (envelope-from dmm125@bellatlantic.net) Received: from bellatlantic.net (client201-122-43.bellatlantic.net [151.201.122.43]) by iconmail.bellatlantic.net (IConNet Sendmail) with ESMTP id TAA12320 for ; Tue, 19 May 1998 19:25:58 -0400 (EDT) Message-ID: <3561DCD4.8A3425E3@bellatlantic.net> Date: Tue, 19 May 1998 19:26:12 +0000 From: Donn Miller X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.6-RELEASE i386) MIME-Version: 1.0 To: ports@FreeBSD.ORG Subject: [Fwd: patch for xv-3.10a] Content-Type: multipart/mixed; boundary="------------6A47054DCC2EE88DF2891BA1" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------6A47054DCC2EE88DF2891BA1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I recently sent in a patch for xv-3.10a so that it can handle progressive (new jpegs). If libjeg6b has already been incorporated into the xv port, then please ignore this. Otherwise, here is the patch for those interested. (note: you also have to download jpegsrc.v6b.tar.gz, on ftp.uu.net, and replace the entire jpeg subdir with this). Without this patch, errors to the effect of "unsupported jpeg process" may occur. > I'm enclosing a proposed patch for xv-3.10a so it can handle new > progressive type jpegs. > > Basically, the changes are as follows: > > 1.) Must replace jpeg/ subdir with latest version of jpeglib: > jpegsrc.v6b.tar.gz, on ftp.uu.net. > > 2.) In ./xv.h, I couldn't get it to work, but on line 119, both > NetBSD and FreeBSD are similar, and both need the declaration for > sys_errlist commented out. Something like: > > #if !defined(__NetBSD__) || !defined(__FreeBSD__) . I couldn't get this > to work, so I used > #ifndef __FreeBSD__ > > The problem is that FreeBSD declares sys_errlist as const char *const > sys_errlist[] causing an error. > > 3.) In xvjpeg.c, the METHODDEF's have to be changed to static, > since now METHODDEF (in the new jpeglib source code release) is defined > something like > > #define METHODDEF(type) static type > > which causes syntax errors in line 56 of xvjpeg.c if left unchanged. > > Thanks for your attention. > > Donn > > ------------------------------------------------------------------------ > diff --context xv-3.10a/xv.h xv-3.10a-new/xv.h > *** xv-3.10a/xv.h Mon Jan 23 20:22:23 1995 > --- xv-3.10a-new/xv.h Tue May 19 18:01:14 1998 > *************** > *** 115,121 **** > #ifndef VMS > # include > extern int errno; /* SHOULD be in errno.h, but often isn't */ > ! # ifndef __NetBSD__ > extern char *sys_errlist[]; /* this too... */ > # endif > #endif > --- 115,121 ---- > #ifndef VMS > # include > extern int errno; /* SHOULD be in errno.h, but often isn't */ > ! # ifndef __FreeBSD__ > extern char *sys_errlist[]; /* this too... */ > # endif > #endif > Only in xv-3.10a-new: xv.h.orig > diff --context xv-3.10a/xvjpeg.c xv-3.10a-new/xvjpeg.c > *** xv-3.10a/xvjpeg.c Thu Jan 5 08:17:13 1995 > --- xv-3.10a-new/xvjpeg.c Tue May 19 18:13:18 1998 > *************** > *** 51,61 **** > static void clickJD PARM((int, int)); > static void doCmd PARM((int)); > static void writeJPEG PARM((void)); > ! METHODDEF void xv_error_exit PARM((j_common_ptr)); > ! METHODDEF void xv_error_output PARM((j_common_ptr)); > ! METHODDEF void xv_prog_meter PARM((j_common_ptr)); > static unsigned int j_getc PARM((j_decompress_ptr)); > ! METHODDEF boolean xv_process_comment PARM((j_decompress_ptr)); > static int writeJFIF PARM((FILE *, byte *, int,int,int)); > > > --- 51,61 ---- > static void clickJD PARM((int, int)); > static void doCmd PARM((int)); > static void writeJPEG PARM((void)); > ! static void xv_error_exit PARM((j_common_ptr)); > ! static void xv_error_output PARM((j_common_ptr)); > ! static void xv_prog_meter PARM((j_common_ptr)); > static unsigned int j_getc PARM((j_decompress_ptr)); > ! static boolean xv_process_comment PARM((j_decompress_ptr)); > static int writeJFIF PARM((FILE *, byte *, int,int,int)); > > > *************** > *** 400,406 **** > > > /**************************************************/ > ! METHODDEF void xv_error_exit(cinfo) > j_common_ptr cinfo; > { > my_error_ptr myerr; > --- 400,406 ---- > > > /**************************************************/ > ! static void xv_error_exit(cinfo) > j_common_ptr cinfo; > { > my_error_ptr myerr; > *************** > *** 412,418 **** > > > /**************************************************/ > ! METHODDEF void xv_error_output(cinfo) > j_common_ptr cinfo; > { > my_error_ptr myerr; > --- 412,418 ---- > > > /**************************************************/ > ! static void xv_error_output(cinfo) > j_common_ptr cinfo; > { > my_error_ptr myerr; > *************** > *** 426,432 **** > > > /**************************************************/ > ! METHODDEF void xv_prog_meter(cinfo) > j_common_ptr cinfo; > { > struct jpeg_progress_mgr *prog; > --- 426,432 ---- > > > /**************************************************/ > ! static void xv_prog_meter(cinfo) > j_common_ptr cinfo; > { > struct jpeg_progress_mgr *prog; > *************** > *** 671,677 **** > > > /**************************************************/ > ! METHODDEF boolean xv_process_comment(cinfo) > j_decompress_ptr cinfo; > { > int length, hasnull; > --- 671,677 ---- > > > /**************************************************/ > ! static boolean xv_process_comment(cinfo) > j_decompress_ptr cinfo; > { > int length, hasnull; --------------6A47054DCC2EE88DF2891BA1 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <3561D7F3.E44CCA85@bellatlantic.net> Date: Tue, 19 May 1998 19:05:24 +0000 From: Donn Miller X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.6-RELEASE i386) MIME-Version: 1.0 To: xvtech@devo.dccs.upenn.edu Subject: patch for xv-3.10a Content-Type: multipart/mixed; boundary="------------3821BAE95CE10AC7D3F9E92E" This is a multi-part message in MIME format. --------------3821BAE95CE10AC7D3F9E92E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I'm enclosing a proposed patch for xv-3.10a so it can handle new progressive type jpegs. Basically, the changes are as follows: 1.) Must replace jpeg/ subdir with latest version of jpeglib: jpegsrc.v6b.tar.gz, on ftp.uu.net. 2.) In ./xv.h, I couldn't get it to work, but on line 119, both NetBSD and FreeBSD are similar, and both need the declaration for sys_errlist commented out. Something like: #if !defined(__NetBSD__) || !defined(__FreeBSD__) . I couldn't get this to work, so I used #ifndef __FreeBSD__ The problem is that FreeBSD declares sys_errlist as const char *const sys_errlist[] causing an error. 3.) In xvjpeg.c, the METHODDEF's have to be changed to static, since now METHODDEF (in the new jpeglib source code release) is defined something like #define METHODDEF(type) static type which causes syntax errors in line 56 of xvjpeg.c if left unchanged. Thanks for your attention. Donn --------------3821BAE95CE10AC7D3F9E92E Content-Type: text/plain; charset=us-ascii; name="xv.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xv.diff" diff --context xv-3.10a/xv.h xv-3.10a-new/xv.h *** xv-3.10a/xv.h Mon Jan 23 20:22:23 1995 --- xv-3.10a-new/xv.h Tue May 19 18:01:14 1998 *************** *** 115,121 **** #ifndef VMS # include extern int errno; /* SHOULD be in errno.h, but often isn't */ ! # ifndef __NetBSD__ extern char *sys_errlist[]; /* this too... */ # endif #endif --- 115,121 ---- #ifndef VMS # include extern int errno; /* SHOULD be in errno.h, but often isn't */ ! # ifndef __FreeBSD__ extern char *sys_errlist[]; /* this too... */ # endif #endif Only in xv-3.10a-new: xv.h.orig diff --context xv-3.10a/xvjpeg.c xv-3.10a-new/xvjpeg.c *** xv-3.10a/xvjpeg.c Thu Jan 5 08:17:13 1995 --- xv-3.10a-new/xvjpeg.c Tue May 19 18:13:18 1998 *************** *** 51,61 **** static void clickJD PARM((int, int)); static void doCmd PARM((int)); static void writeJPEG PARM((void)); ! METHODDEF void xv_error_exit PARM((j_common_ptr)); ! METHODDEF void xv_error_output PARM((j_common_ptr)); ! METHODDEF void xv_prog_meter PARM((j_common_ptr)); static unsigned int j_getc PARM((j_decompress_ptr)); ! METHODDEF boolean xv_process_comment PARM((j_decompress_ptr)); static int writeJFIF PARM((FILE *, byte *, int,int,int)); --- 51,61 ---- static void clickJD PARM((int, int)); static void doCmd PARM((int)); static void writeJPEG PARM((void)); ! static void xv_error_exit PARM((j_common_ptr)); ! static void xv_error_output PARM((j_common_ptr)); ! static void xv_prog_meter PARM((j_common_ptr)); static unsigned int j_getc PARM((j_decompress_ptr)); ! static boolean xv_process_comment PARM((j_decompress_ptr)); static int writeJFIF PARM((FILE *, byte *, int,int,int)); *************** *** 400,406 **** /**************************************************/ ! METHODDEF void xv_error_exit(cinfo) j_common_ptr cinfo; { my_error_ptr myerr; --- 400,406 ---- /**************************************************/ ! static void xv_error_exit(cinfo) j_common_ptr cinfo; { my_error_ptr myerr; *************** *** 412,418 **** /**************************************************/ ! METHODDEF void xv_error_output(cinfo) j_common_ptr cinfo; { my_error_ptr myerr; --- 412,418 ---- /**************************************************/ ! static void xv_error_output(cinfo) j_common_ptr cinfo; { my_error_ptr myerr; *************** *** 426,432 **** /**************************************************/ ! METHODDEF void xv_prog_meter(cinfo) j_common_ptr cinfo; { struct jpeg_progress_mgr *prog; --- 426,432 ---- /**************************************************/ ! static void xv_prog_meter(cinfo) j_common_ptr cinfo; { struct jpeg_progress_mgr *prog; *************** *** 671,677 **** /**************************************************/ ! METHODDEF boolean xv_process_comment(cinfo) j_decompress_ptr cinfo; { int length, hasnull; --- 671,677 ---- /**************************************************/ ! static boolean xv_process_comment(cinfo) j_decompress_ptr cinfo; { int length, hasnull; --------------3821BAE95CE10AC7D3F9E92E-- --------------6A47054DCC2EE88DF2891BA1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message