Index: pvrg-jpeg-1.2.1+dfsg1/io.c
===================================================================
--- pvrg-jpeg-1.2.1+dfsg1.orig/io.c 2012-04-10 16:27:00.813893813 +0000
+++ pvrg-jpeg-1.2.1+dfsg1/io.c 2012-04-10 16:59:24.761453020 +0000
@@ -38,6 +38,8 @@
#endif
#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
/* Functions which are local and which are exported. */
@@ -266,13 +268,13 @@
if (Iob)
{
- printf("*** Iob ID: %x ***\n",Iob);
+ printf("*** Iob ID: %p ***\n",(void*)Iob);
printf("Number of Buffers: %d Width: %d Height: %d\n",
Iob->num,Iob->width,Iob->height);
printf("hpos: %d vpos: %d hor-freq: %d ver-freq: %d\n",
Iob->hpos,Iob->vpos,Iob->hor,Iob->ver);
- printf("filed: %d flags: %d BufferListId: %x\n",
- Iob->file,Iob->flags,Iob->blist);
+ printf("filed: %d flags: %d BufferListId: %p\n",
+ Iob->file,Iob->flags,(void*)Iob->blist);
}
else
{
@@ -636,8 +638,8 @@
if (Loud > MUTE)
{
WHEREAMI();
- printf("%x Moving To [Horizontal:Vertical] [%d:%d] \n",
- Iob,Iob->hpos,Iob->vpos);
+ printf("%p Moving To [Horizontal:Vertical] [%d:%d] \n",
+ (void*)Iob,Iob->hpos,Iob->vpos);
}
horizontal = Iob->hpos * BlockWidth; /* Calculate actual */
vertical = Iob->vpos * BlockHeight; /* Pixel position */
@@ -729,7 +731,7 @@
int i;
if (Loud > MUTE)
- printf("IOB: %x Flushing buffers\n",Iob);
+ printf("IOB: %p Flushing buffers\n",(void*)Iob);
switch(Iob->type)
{
case IOB_BLOCK:
@@ -1123,8 +1125,8 @@
if (Loud > MUTE)
{
WHEREAMI();
- printf("%x Moving To [Horizontal:Vertical] [%d:%d] \n",
- Iob,Iob->hpos,Iob->vpos);
+ printf("%p Moving To [Horizontal:Vertical] [%d:%d] \n",
+ (void*)Iob,Iob->hpos,Iob->vpos);
}
horizontal = Iob->hpos;
vertical = Iob->vpos;
@@ -1189,7 +1191,7 @@
rsize = read(Iob->file, timage, tsize);
if(rsize != tsize) {
WHEREAMI();
- printf("Read failure in InstallHeaderIob (r %d != t %d, fd %d)\n", rsize, tsize, Iob->file);
+ printf("Read failure in InstallHeaderIob (r %zu != t %zu, fd %d)\n", rsize, tsize, Iob->file);
perror("Error:");
exit(1);
}
Index: pvrg-jpeg-1.2.1+dfsg1/jpeg.c
===================================================================
--- pvrg-jpeg-1.2.1+dfsg1.orig/jpeg.c 2012-04-10 16:27:00.817918838 +0000
+++ pvrg-jpeg-1.2.1+dfsg1/jpeg.c 2012-04-10 17:00:44.497453182 +0000
@@ -33,6 +33,8 @@
#ifdef SYSV
#include <sys/fcntl.h>
#endif
+#include <stdlib.h>
+#include <string.h>
/*
Define the functions to be used with ANSI prototyping.
@@ -99,7 +101,7 @@
/* Define the support/utility variables.*/
int ErrorValue=0; /* Holds error upon return */
int Loud=MUTE; /* Loudness gives level of debug traces */
-int HuffmanTrace=NULL; /* When set, dumps Huffman statistics */
+int HuffmanTrace=0; /* When set, dumps Huffman statistics */
int Notify=1; /* When set, gives image size feedback */
int Robust=0;
static int LargeQ=0; /* When set, large quantization is enabled */
@@ -1730,7 +1732,7 @@
BEGIN("PrintImage");
int i;
- printf("*** Image ID: %x ***\n",CImage);
+ printf("*** Image ID: %p ***\n",(void*)CImage);
if (CImage)
{
if (CImage->StreamFileName)
@@ -1780,14 +1782,14 @@
BEGIN("PrintFrame");
int i;
- printf("*** Frame ID: %x *** (TYPE: %d)\n",CFrame,CFrame->Type);
+ printf("*** Frame ID: %p *** (TYPE: %d)\n",(void*)CFrame,CFrame->Type);
if (CFrame)
{
printf("DataPrecision: %d ResyncInterval: %d\n",
CFrame->DataPrecision,CFrame->ResyncInterval);
printf("Height: %d Width: %d\n",
CFrame->GlobalHeight,CFrame->GlobalWidth);
- printf("BufferSize: %d Image: %x\n",CFrame->BufferSize,CFrame->Image);
+ printf("BufferSize: %d Image: %p\n",CFrame->BufferSize,(void*)CFrame->Image);
printf("NumberComponents %d\n",
CFrame->GlobalNumberComponents);
for(i=0;i<CFrame->GlobalNumberComponents;i++)
@@ -1818,7 +1820,7 @@
BEGIN("PrintScan");
int i;
- printf("*** Scan ID: %x ***\n",CScan);
+ printf("*** Scan ID: %p ***\n",(void*)CScan);
if (CScan)
{
printf("NumberComponents %d\n",
@@ -1829,8 +1831,8 @@
i,CScan->ci[i]);
printf("DC Huffman Table: %d AC Huffman Table: %d\n",
CScan->td[i],CScan->ta[i]);
- printf("LastDC: %d Iob: %x\n",
- *(CScan->LastDC[i]),CScan->Iob[i]);
+ printf("LastDC: %d Iob: %p\n",
+ *(CScan->LastDC[i]),(void*)CScan->Iob[i]);
}
printf("NumberACSend: %d NumberDCSend: %d NumberQSend: %d\n",
CScan->NumberACTablesSend,
Index: pvrg-jpeg-1.2.1+dfsg1/stream.c
===================================================================
--- pvrg-jpeg-1.2.1+dfsg1.orig/stream.c 1995-03-02 01:57:26.000000000 +0000
+++ pvrg-jpeg-1.2.1+dfsg1/stream.c 2012-04-10 16:50:54.065894139 +0000
@@ -32,6 +32,7 @@
#include "globals.h"
#include "marker.h"
#include "stream.h"
+#include <stdlib.h>
/*PUBLIC*/
@@ -675,7 +676,7 @@
read_position= -1; /* Make sure we are byte-flush. */
while(marker_read_byte==MARKER_FIL) /* Get rid of FIL markers */
{
-#ifdef VERSION_1.0
+#ifdef VERSION_1_0
if ((marker_read_byte = bgetc())!=MARKER_MARKER)
{
WHEREAMI();
Index: pvrg-jpeg-1.2.1+dfsg1/transform.c
===================================================================
--- pvrg-jpeg-1.2.1+dfsg1.orig/transform.c 1995-03-02 01:57:26.000000000 +0000
+++ pvrg-jpeg-1.2.1+dfsg1/transform.c 2012-04-10 16:48:13.729453459 +0000
@@ -33,6 +33,7 @@
#include "globals.h"
#include "dct.h"
#include <math.h>
+#include <stdlib.h>
/*PUBLIC*/
Index: pvrg-jpeg-1.2.1+dfsg1/marker.c
===================================================================
--- pvrg-jpeg-1.2.1+dfsg1.orig/marker.c 2012-04-10 16:27:00.109939373 +0000
+++ pvrg-jpeg-1.2.1+dfsg1/marker.c 2012-04-10 16:49:12.709453189 +0000
@@ -35,6 +35,8 @@
#ifdef SYSV
#include <sys/fcntl.h>
#endif
+#include <stdlib.h>
+#include <string.h>
/*PUBLIC*/
extern void WriteSoi();
Index: pvrg-jpeg-1.2.1+dfsg1/huffman.c
===================================================================
--- pvrg-jpeg-1.2.1+dfsg1.orig/huffman.c 1995-03-02 01:57:22.000000000 +0000
+++ pvrg-jpeg-1.2.1+dfsg1/huffman.c 2012-04-10 17:00:12.537453731 +0000
@@ -33,6 +33,8 @@
#include "globals.h"
#include "stream.h"
+#include <stdlib.h>
+#include <string.h>
/*PUBLIC*/
@@ -542,7 +544,7 @@
else
{
WHEREAMI();
- printf("Huffman read error: l=%d code=%d\n");
+ printf("Huffman read error: l=%d code=%d\n", l, code);
Resync();
ErrorValue = ERROR_HUFFMAN_READ;
return(0);
@@ -736,7 +738,7 @@
if (Xhuff)
{
- printf("Xhuff ID: %x\n",Xhuff);
+ printf("Xhuff ID: %p\n",(void*)Xhuff);
printf("Bits: [length:number]\n");
for(i=1;i<9;i++)
{
@@ -754,7 +756,7 @@
}
if (Ehuff)
{
- printf("Ehuff ID: %x\n",Ehuff);
+ printf("Ehuff ID: %p\n",(void*)Ehuff);
printf("Ehufco:\n");
PrintTable(Ehuff->ehufco);
printf("Ehufsi:\n");
@@ -762,7 +764,7 @@
}
if (Dhuff)
{
- printf("Dhuff ID: %x\n",Dhuff);
+ printf("Dhuff ID: %p\n",(void*)Dhuff);
printf("MaxLength: %d\n",Dhuff->ml);
printf("[index:MaxCode:MinCode:ValPtr]\n");
for(i=1;i<5;i++)