pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/jpeg_ls stdout can not be used to initialise ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e15079b17718
branches:  trunk
changeset: 505133:e15079b17718
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Dec 30 23:23:54 2005 +0000

description:
stdout can not be used to initialise a global variable.. Move it from
global scope to static scope in encoder.c / decoder.c and initialise it
from main.
Fix a nice side-effect from a macro, which is not a macro in DragonFly:
        if feof(tablefile)
does not parse correctly.

diffstat:

 graphics/jpeg_ls/distinfo         |  11 ++++++++---
 graphics/jpeg_ls/patches/patch-aa |  11 ++++++++++-
 graphics/jpeg_ls/patches/patch-ad |  11 ++++++++++-
 graphics/jpeg_ls/patches/patch-ah |  12 ++++++++++++
 graphics/jpeg_ls/patches/patch-ai |  22 ++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-aj |  12 ++++++++++++
 graphics/jpeg_ls/patches/patch-ak |  25 +++++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-al |  13 +++++++++++++
 8 files changed, 112 insertions(+), 5 deletions(-)

diffs (178 lines):

diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/distinfo
--- a/graphics/jpeg_ls/distinfo Fri Dec 30 23:16:33 2005 +0000
+++ b/graphics/jpeg_ls/distinfo Fri Dec 30 23:23:54 2005 +0000
@@ -1,12 +1,17 @@
-$NetBSD: distinfo,v 1.2 2005/02/24 08:45:08 agc Exp $
+$NetBSD: distinfo,v 1.3 2005/12/30 23:23:54 joerg Exp $
 
 SHA1 (jpeg_ls_v2.2.tar.gz) = d4fde989359eebdc98cf57feeac3076fdfd06c64
 RMD160 (jpeg_ls_v2.2.tar.gz) = e0879e170ee18fae46d148c711a8b5a398586cd9
 Size (jpeg_ls_v2.2.tar.gz) = 854276 bytes
-SHA1 (patch-aa) = 0b6996179e458c785043aa728600bdc56d96baaf
+SHA1 (patch-aa) = 9f5168b5b1a2e34de850cf35414c1b6aa4c63108
 SHA1 (patch-ab) = e87c51ca50be30ae6c07094fd935fedee8a1a2f5
 SHA1 (patch-ac) = cdb1d11427c50062df26d4d4c73eca041d08c972
-SHA1 (patch-ad) = fdfa574119fe0bf0b4cdfd110e7b20367f12493d
+SHA1 (patch-ad) = 95418e8331cb3bfc370f63562ab8a4fa0f46c8ef
 SHA1 (patch-ae) = 5ca83b5d3ec9a14d017144c8e6cfb1b0bb5c7e9d
 SHA1 (patch-af) = a0558fef1b2b79343bd6af4cc205e42b65621944
 SHA1 (patch-ag) = 0fcd2ebda598b5d7db62437fda16242a28689295
+SHA1 (patch-ah) = 7026e009b445b554737ee8e575ebf073f7ebee57
+SHA1 (patch-ai) = fac6897b6bc9a055094488a79760d9092252198b
+SHA1 (patch-aj) = dc0449278ae19d47437bea3b39efad5883c3bb39
+SHA1 (patch-ak) = 94e9bc64b03c4af599f763522dc3598116448eb6
+SHA1 (patch-al) = 2eaa1647ef4d18a84c1542ae86c0bb863f87753d
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-aa
--- a/graphics/jpeg_ls/patches/patch-aa Fri Dec 30 23:16:33 2005 +0000
+++ b/graphics/jpeg_ls/patches/patch-aa Fri Dec 30 23:23:54 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+$NetBSD: patch-aa,v 1.2 2005/12/30 23:23:54 joerg Exp $
 
 --- Decoder/global.h.orig      Tue Jun 22 21:04:33 1999
 +++ Decoder/global.h
@@ -11,6 +11,15 @@
  typedef struct        jpeg_ls {
  
        int     columns,                                        /* The number of columns */
+@@ -300,7 +298,7 @@ typedef unsigned short pixel;
+ 
+ /****** Global variables prototypes */
+ 
+-extern FILE *in, *out, *msgfile;
++extern FILE *in, *out;
+ extern FILE   *c_in[MAX_COMPONENTS];
+ extern FILE   *c_out[MAX_COMPONENTS];
+ extern int  inhandle;
 @@ -318,7 +316,7 @@ extern int alpha;
  extern int vLUT[3][2 * LUTMAX16];
  extern int lutmax;
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-ad
--- a/graphics/jpeg_ls/patches/patch-ad Fri Dec 30 23:16:33 2005 +0000
+++ b/graphics/jpeg_ls/patches/patch-ad Fri Dec 30 23:23:54 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+$NetBSD: patch-ad,v 1.2 2005/12/30 23:23:54 joerg Exp $
 
 --- Encoder/global.h.orig      Tue Jun 22 20:14:15 1999
 +++ Encoder/global.h
@@ -11,6 +11,15 @@
  typedef struct        jpeg_ls {
  
        int     columns,                                        /* The number of columns */
+@@ -300,7 +298,7 @@ typedef unsigned short pixel;
+ 
+ /****** Global variables prototypes */
+ 
+-extern FILE   *in, *out, *msgfile;
++extern FILE   *in, *out;
+ extern FILE   *c_in[MAX_COMPONENTS];
+ extern FILE   *c_out[MAX_COMPONENTS];
+ extern int    inhandle;
 @@ -318,7 +316,7 @@ extern int alpha;
  extern int vLUT[3][2 * LUTMAX16];
  extern int lutmax;
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ah Fri Dec 30 23:23:54 2005 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2005/12/30 23:23:54 joerg Exp $
+
+--- Decoder/global.c.orig      2005-12-30 23:09:20.000000000 +0000
++++ Decoder/global.c
+@@ -69,7 +69,6 @@ without the written permission of the co
+ FILE *in, *out;
+ FILE *c_in[MAX_COMPONENTS];
+ FILE *c_out[MAX_COMPONENTS];
+-FILE *msgfile = stdout;
+ 
+ /* Context quantization thresholds  - initially unset */
+ int     T3 = -1,
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ai Fri Dec 30 23:23:54 2005 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ai,v 1.1 2005/12/30 23:23:54 joerg Exp $
+
+--- Decoder/decoder.c.orig     2005-12-30 23:10:49.000000000 +0000
++++ Decoder/decoder.c
+@@ -99,6 +99,7 @@ int lossy;                                           /* Indicates if in lossy
+ int bpp16;                                            /* Indicates if 16 bits per pixel mode or not */
+ int lutmax;                                           /* lutmax is either 256 or 4501 */
+ 
++static FILE *msgfile;
+ 
+ 
+ 
+@@ -871,7 +872,8 @@ int main (int argc, char *argv[]) {
+               tot_out = 0;
+       pixel *local_scanl0,*local_scanl1,*local_pscanline,*local_cscanline;
+       int MCUs_counted;
+-      
++
++      msgfile = stdout;       
+       
+       /* Parse the parameters, initialize */
+       /* Not yet fully implemented */
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-aj Fri Dec 30 23:23:54 2005 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-aj,v 1.1 2005/12/30 23:23:54 joerg Exp $
+
+--- Encoder/global.c.orig      2005-12-30 23:13:55.000000000 +0000
++++ Encoder/global.c
+@@ -68,7 +68,6 @@ without the written permission of the co
+ FILE *in, *out;
+ FILE *c_in[MAX_COMPONENTS];
+ /*FILE *c_out[MAX_COMPONENTS];*/
+-FILE *msgfile = stdout;
+ 
+ /* Context quantization thresholds  - initially unset */
+ int   T3 = -1,
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ak Fri Dec 30 23:23:54 2005 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ak,v 1.1 2005/12/30 23:23:54 joerg Exp $
+
+--- Encoder/encoder.c.orig     2005-12-30 23:14:44.000000000 +0000
++++ Encoder/encoder.c
+@@ -102,6 +102,8 @@ int lutmax;                                        /* lutmax is either 256 
+ int bpp16;                                    /* Indicates if 16 bits per pixel mode or not */
+ char *mappingtablefilename=NULL;              /* Mapping table filename */
+ 
++static FILE *msgfile;
++
+ /* reset */
+ #ifndef FIXRESET
+ int   RESET;
+@@ -674,9 +676,10 @@ int main (int argc, char *argv[]) {
+       int temp_columns;
+       int MCUs_counted;
+ 
+-
+       pixel *local_scanl0,*local_scanl1,*local_pscanline,*local_cscanline;
+ 
++      msgfile = stdout;
++
+       application_header = all_header = 0;
+ 
+       /* Parse the parameters, initialize */
diff -r 3a0955f43956 -r e15079b17718 graphics/jpeg_ls/patches/patch-al
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-al Fri Dec 30 23:23:54 2005 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-al,v 1.1 2005/12/30 23:23:54 joerg Exp $
+
+--- Encoder/jpegmark.c.orig    2005-12-30 23:16:58.000000000 +0000
++++ Encoder/jpegmark.c
+@@ -287,7 +287,7 @@ int write_jpegls_extmarker(FILE *out, jp
+                               i=200;
+ 
+                       jp->TABLE[TID][i] = read_n_bytes(tablefile, Wt);
+-                      if feof(tablefile)
++                      if (feof(tablefile))
+                       {
+                               fprintf(stderr,"Error Reading Table File - Premature EOF found.\n");
+                               exit(1);



Home | Main Index | Thread Index | Old Index