Index: graphics/libfpx/files/Makefile.bsd =================================================================== --- graphics/libfpx/files/Makefile.bsd (revision 326461) +++ graphics/libfpx/files/Makefile.bsd (working copy) @@ -30,7 +30,7 @@ SRCS = ${CPPS:T:Nejpeg.c} CXXFLAGS+= -fno-rtti -fno-exceptions -fno-strict-aliasing ${HAVES} -LDADD += -L${LOCALBASE}/lib -lm -lstdc++ +LDADD += -L${LOCALBASE}/lib -lm .PATH: ${CPPS:H} Index: graphics/libfpx/files/patch-basics__a_file.cpp =================================================================== --- graphics/libfpx/files/patch-basics__a_file.cpp (revision 0) +++ graphics/libfpx/files/patch-basics__a_file.cpp (working copy) @@ -0,0 +1,14 @@ +--- ./basics/a_file.cpp.orig 2005-02-26 02:23:03.000000000 +0000 ++++ ./basics/a_file.cpp 2013-08-31 23:08:30.000000000 +0100 +@@ -258,10 +258,9 @@ + + // remove access path from name + long index = 0; +- while (cname[i] != '\0') { ++ for (i = 0; cname[i] != '\0'; i++) { + if (cname[i] == ':') + index = i; +- i++; + } + if (index != 0) { + i = 0; Property changes on: graphics/libfpx/files/patch-basics__a_file.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-basics__filename.cpp =================================================================== --- graphics/libfpx/files/patch-basics__filename.cpp (revision 0) +++ graphics/libfpx/files/patch-basics__filename.cpp (working copy) @@ -0,0 +1,29 @@ +--- ./basics/filename.cpp.orig 2007-11-02 08:11:18.000000000 +0000 ++++ ./basics/filename.cpp 2013-08-31 23:08:30.000000000 +0100 +@@ -12,7 +12,6 @@ + // in Flashpix.h + // ---------------------------------------------------------------------------- + // ------------------------------------------------------------------------------------------------ +-#include "fpxlib-config.h" + #include "filename.h" + // ------------------------------------------------------------------------------------------------ + +@@ -430,14 +429,15 @@ + return 0; + #else + struct statfs buf; +- int errNum=0, fstyp; ++ int errNum; + /* Get file system stats */ +- fstyp=0; + #ifdef __SVR4 // FIXME: statfs is not a portable API +- errNum = statfs ( ".", &buf, sizeof( struct statfs ), fstyp); ++ errNum = statfs ( ".", &buf, sizeof( struct statfs ), 0); + #else + errNum = statfs ( ".", &buf); + #endif ++ if (errNum) ++ perror("statfs on current directory"); + + return (buf.f_bsize*buf.f_bfree)/kOneKilobyte; + #endif Property changes on: graphics/libfpx/files/patch-basics__filename.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-fpx__f_fpxvw.cpp =================================================================== --- graphics/libfpx/files/patch-fpx__f_fpxvw.cpp (revision 0) +++ graphics/libfpx/files/patch-fpx__f_fpxvw.cpp (working copy) @@ -0,0 +1,20 @@ +--- ./fpx/f_fpxvw.cpp.orig 2013-08-31 23:44:24.000000000 +0100 ++++ ./fpx/f_fpxvw.cpp 2013-08-31 23:44:40.000000000 +0100 +@@ -1001,7 +1001,7 @@ + + // Make a wide string descriptor for the ext name we're looking for + targetWStr.length = FPX_LPWSTRlen( theExtensionName); +- targetWStr.ptr = theExtensionName; ++ targetWStr.ptr = (WORD*)theExtensionName; + + GetExtensionName(extensionName); + +@@ -1033,7 +1033,7 @@ + + // Make a wide string descriptor for ext prop in file + thisWStr.length = FPX_LPWSTRlen( extName); +- thisWStr.ptr = extName; ++ thisWStr.ptr = (WORD*)extName; + + // Compare the name with specified one + if ( !FPX_WideStrcmp(&targetWStr, &thisWStr) ) { Property changes on: graphics/libfpx/files/patch-fpx__f_fpxvw.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-fpx__fpxformt.cpp =================================================================== --- graphics/libfpx/files/patch-fpx__fpxformt.cpp (revision 0) +++ graphics/libfpx/files/patch-fpx__fpxformt.cpp (working copy) @@ -0,0 +1,19 @@ +--- ./fpx/fpxformt.cpp.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./fpx/fpxformt.cpp 2013-08-31 23:08:30.000000000 +0100 +@@ -546,7 +546,6 @@ + + FPXStatus PFlashPixFile::Erreur() const + { +- long error = 0; + FPXStatus status = FPX_OK; + + if (summaryInfoPropertySet) +@@ -562,7 +561,7 @@ + if (status == FPX_OK) { + // It's not an error not to have an Image Info property set (optionnal) + if (imageInfoPropertySet) +- error = imageInfoPropertySet->getFPXStatus(); ++ status = imageInfoPropertySet->getFPXStatus(); + } + + if (status == FPX_OK) // If no error durng property set access Property changes on: graphics/libfpx/files/patch-fpx__fpxformt.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-fpx__fpximgvw.h =================================================================== --- graphics/libfpx/files/patch-fpx__fpximgvw.h (revision 0) +++ graphics/libfpx/files/patch-fpx__fpximgvw.h (working copy) @@ -0,0 +1,11 @@ +--- ./fpx/fpximgvw.h.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./fpx/fpximgvw.h 2013-08-31 23:08:30.000000000 +0100 +@@ -299,8 +299,6 @@ + FPXStatus LoadImageContrastAdjustment (); + + PFileFlashPixView* filePtr; // The image file descriptor +- OLEStorage* sourceStorage; // Source FPX Image storage +- OLEStorage* resultStorage; // Result FPX Image storage + + // Geometric parameters + Boolean hasRegionOfInterest; Property changes on: graphics/libfpx/files/patch-fpx__fpximgvw.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-fpx__fpxlibio.cpp =================================================================== --- graphics/libfpx/files/patch-fpx__fpxlibio.cpp (revision 0) +++ graphics/libfpx/files/patch-fpx__fpxlibio.cpp (working copy) @@ -0,0 +1,11 @@ +--- ./fpx/fpxlibio.cpp.orig 2013-08-31 23:44:59.000000000 +0100 ++++ ./fpx/fpxlibio.cpp 2013-08-31 23:45:16.000000000 +0100 +@@ -329,7 +329,7 @@ + if (theFPXArray == NULL) { + return FPX_OBJECT_CREATION_FAILED; + } +- theFPXArray->ptr = new WCHAR [nbElem]; ++ theFPXArray->ptr = (WORD*)new WCHAR [nbElem]; + if (theFPXArray->ptr==NULL) { + theFPXArray->length = 0; + return FPX_OBJECT_CREATION_FAILED; Property changes on: graphics/libfpx/files/patch-fpx__fpxlibio.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-fpxlib.h =================================================================== --- graphics/libfpx/files/patch-fpxlib.h (revision 0) +++ graphics/libfpx/files/patch-fpxlib.h (working copy) @@ -0,0 +1,11 @@ +--- ./fpxlib.h.orig 2013-08-31 23:15:16.000000000 +0100 ++++ ./fpxlib.h 2013-08-31 23:30:26.000000000 +0100 +@@ -38,7 +38,7 @@ + } CLIPDATA; + + #if !defined(WCHAR) && !defined(__BORLANDC__) +- typedef uint16_t WCHAR; ++ typedef wchar_t WCHAR; + typedef WCHAR *LPWSTR; + #endif + typedef uint16_t WORD; Property changes on: graphics/libfpx/files/patch-fpxlib.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__dectile.c =================================================================== --- graphics/libfpx/files/patch-jpeg__dectile.c (revision 0) +++ graphics/libfpx/files/patch-jpeg__dectile.c (working copy) @@ -0,0 +1,54 @@ +--- ./jpeg/dectile.c.orig 2011-12-16 15:49:44.000000000 +0000 ++++ ./jpeg/dectile.c 2013-08-31 23:08:30.000000000 +0100 +@@ -432,7 +432,10 @@ + int interleave) + { + int marker, i = 0, ii; +- static int error_code, dct_method, image_found, eoi_found, is_gray_scale; ++#ifdef WARNING ++ static int eoi_found; ++#endif ++ static int error_code, dct_method, image_found, is_gray_scale; + static int interleave_flag; + static unsigned int restart_interv; /* restart interval, 0 if disabled */ + FRAME *frame; +@@ -456,7 +459,9 @@ + warning_type = 0; + restart_interv = 0; + image_found = 0; ++#ifdef WARNING + eoi_found = 0; ++#endif + dct_method = method; + error_code = 0; + is_gray_scale = gray_scale; +@@ -479,7 +484,9 @@ + frame = NULL; + restart_interv = 0; + image_found = 0; ++#ifdef WARNING + eoi_found = 0; ++#endif + dct_method = method; + error_code = 0; + is_gray_scale = gray_scale; +@@ -674,7 +681,9 @@ + return(error_code=0); + } + #endif /* NOCODE GSY 8/2/96 */ ++#ifdef WARNING + eoi_found = 1; ++#endif + if (image_found) { + goto Finished; + } +@@ -687,7 +696,9 @@ + goto Finished; + } else if ((frame == NULL) && + ((marker = DP_Get_Next_Marker(db_state)) == MARKER_SOI)) { ++#ifdef WARNING + eoi_found = 0; ++#endif + goto Switch0; + } else { + Free_All_Memory(db_state, &frame, de_huffman_tables_dc, Property changes on: graphics/libfpx/files/patch-jpeg__dectile.c ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__djpeg.c =================================================================== --- graphics/libfpx/files/patch-jpeg__djpeg.c (revision 0) +++ graphics/libfpx/files/patch-jpeg__djpeg.c (working copy) @@ -0,0 +1,43 @@ +--- ./jpeg/djpeg.c.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./jpeg/djpeg.c 2013-08-31 23:08:30.000000000 +0100 +@@ -129,7 +129,6 @@ + int method; + int grayscale; + int error_type; +- size_t byte_count; + DB_STATE *db_state; + DECODER_STRUCT *decodePtr = (DECODER_STRUCT *)decoder; + int pass_num; +@@ -164,7 +163,6 @@ + if (error_type) { + return(error_type); + } +- byte_count = (size_t)DB_Processed_Bytes(db_state); + + if (db_state->db_MCUbuf != NULL) { + FPX_free(db_state->db_MCUbuf); +@@ -189,7 +187,6 @@ + int method; + int grayscale; + int error_type; +- size_t byte_count; + DB_STATE *db_state; + DECODER_STRUCT *decodePtr = (DECODER_STRUCT *)decoder; + int pass_numb; +@@ -231,7 +228,6 @@ + if (error_type) { + return(error_type); + } +- byte_count = (size_t)DB_Processed_Bytes(db_state); + + if (db_state->db_MCUbuf != NULL) { + FPX_free(db_state->db_MCUbuf); +@@ -272,8 +268,6 @@ + return(error_type); + } + +- byte_count = (size_t) DB_Processed_Bytes(db_state); +- + if (db_state->db_MCUbuf != NULL) { + FPX_free(db_state->db_MCUbuf); + db_state->db_MCUbuf=NULL; Property changes on: graphics/libfpx/files/patch-jpeg__djpeg.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__encoder.h =================================================================== --- graphics/libfpx/files/patch-jpeg__encoder.h (revision 0) +++ graphics/libfpx/files/patch-jpeg__encoder.h (working copy) @@ -0,0 +1,21 @@ +--- ./jpeg/encoder.h.orig 2005-02-26 02:23:06.000000000 +0000 ++++ ./jpeg/encoder.h 2013-08-31 23:08:30.000000000 +0100 +@@ -160,17 +160,12 @@ + hdrbuffer that was used */ + ); + +- + /* see above */ + JPEGEXPORT + int eJPEG_ConcatenateHeader( +-void *encoder, +-unsigned char *hdrBuffer,/* the buffer itself */ +-long *hdrBufferUsed /* upon return shows the amount of +- hdrbuffer that was used. */ ++void *encoder + ); + +- + JPEGEXPORT + long eJPEG_EncodeTile( + void *encoder, /* same value returned by eJPEG_Init */ Property changes on: graphics/libfpx/files/patch-jpeg__encoder.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__enctile.c =================================================================== --- graphics/libfpx/files/patch-jpeg__enctile.c (revision 0) +++ graphics/libfpx/files/patch-jpeg__enctile.c (working copy) @@ -0,0 +1,19 @@ +--- ./jpeg/enctile.c.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./jpeg/enctile.c 2013-08-31 23:08:30.000000000 +0100 +@@ -194,7 +194,7 @@ + is already padded. + Some error checking should be done at the higher level. + */ +- int j, i, k, nvblocks, nhblocks; ++ int j, i, k, nhblocks; + int t, skip; + /* HANDLE lBlock; */ + int block[64]; +@@ -203,7 +203,6 @@ + + Clear_Last_DC(jpeg_struct); + +- nvblocks = height/8; + nhblocks = width/8; + skip = width -8; + Property changes on: graphics/libfpx/files/patch-jpeg__enctile.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__mcu2rast.c =================================================================== --- graphics/libfpx/files/patch-jpeg__mcu2rast.c (revision 0) +++ graphics/libfpx/files/patch-jpeg__mcu2rast.c (working copy) @@ -0,0 +1,36 @@ +--- ./jpeg/mcu2rast.c.orig 2005-02-26 02:23:06.000000000 +0000 ++++ ./jpeg/mcu2rast.c 2013-08-31 23:08:30.000000000 +0100 +@@ -213,7 +213,7 @@ + */ + unsigned char *buf_ptr, *c2_ptr, *c3_ptr; + int *p1, *p2, *p3, *p4, i, j, k, t; +- int skip, skip2, skip_row_data, skip_row_data2; ++ int skip, skip2, skip_row_data; + int *mcupos; + int nvMCU, nhMCU; /* number of FULL MCU vert. and hor. */ + +@@ -264,7 +264,6 @@ + skip = width - 16; + skip2 = (width/2) - 8; + skip_row_data = 8*width; /* One row of MCUs */ +- skip_row_data2 = 8*width/2; /* one row of chroma blocks */ + + for (i = 0; i < nvMCU; i++) { + for (j=0; j < nhMCU; j++) { +@@ -325,7 +324,7 @@ + */ + unsigned char *buf_ptr, *c1_ptr, *c2_ptr, *c3_ptr, *c4_ptr; + int *p1, *p2, *p3, *p4, *p5, *p6, i, j, k, t; +- int skip, skip2, skip_row_data, skip_row_data2; ++ int skip, skip2, skip_row_data; + int *mcupos; + int nvMCU, nhMCU; /* number of FULL MCU vert. and hor. */ + +@@ -381,7 +380,6 @@ + skip = width - 16; + skip2 = (width/2) - 8; + skip_row_data = 8*width; /* One row of MCUs */ +- skip_row_data2 = 8*width/2; /* one row of chroma blocks */ + + for (i = 0; i < nvMCU; i++) { + for (j=0; j < nhMCU; j++) { Property changes on: graphics/libfpx/files/patch-jpeg__mcu2rast.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__process.c =================================================================== --- graphics/libfpx/files/patch-jpeg__process.c (revision 0) +++ graphics/libfpx/files/patch-jpeg__process.c (working copy) @@ -0,0 +1,16 @@ +--- ./jpeg/process.c.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./jpeg/process.c 2013-08-31 23:08:30.000000000 +0100 +@@ -85,12 +85,11 @@ + int + SubSample422(const unsigned char *src, unsigned char *dst, int tileSize, int bpp) + { +- int x, y, blocks, acc, lineOffset; ++ int x, y, blocks, acc; + unsigned char *dstPtr = dst; + const unsigned char *p1, *p2; + + blocks = tileSize / 2; +- lineOffset = tileSize * bpp; + for(x = 0; x < tileSize; x++) + { + for(y = 0; y < blocks; y++) Property changes on: graphics/libfpx/files/patch-jpeg__process.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-jpeg__public.c =================================================================== --- graphics/libfpx/files/patch-jpeg__public.c (revision 0) +++ graphics/libfpx/files/patch-jpeg__public.c (working copy) @@ -0,0 +1,68 @@ +--- ./jpeg/public.c.orig 2005-02-26 02:23:06.000000000 +0000 ++++ ./jpeg/public.c 2013-08-31 23:08:30.000000000 +0100 +@@ -18,9 +18,12 @@ + */ + #define IMP_ENCODER + #include ++#include + #include + #include "jpegconf.h" + ++#include "ejpeg.h" ++ + #include "enctile.h" + #include "encoder.h" + #include "public.h" +@@ -448,10 +451,7 @@ + /* see explanation above */ + #define HDR_BUFF_SIZE 1440 + int eJPEG_ConcatenateHeader( +-void *encoder, /* same value returned by eJPEG_Init */ +-unsigned char *hdrBuffer, /* the buffer itself */ +-long *hdrBufferUsed /* upon return shows the amount of +- that was used */ ++void *encoder /* same value returned by eJPEG_Init */ + ) + { + int ret; +@@ -461,7 +461,6 @@ + + ret = eJPEG_CreateHeader(encoder, HDR_BUFF_SIZE, tempBuf, &size); + size_minus_eoi = size-2; +- *hdrBufferUsed = size; + + if(ret) + return(ret); +@@ -476,8 +475,6 @@ + + } + +- hdrBuffer = jpg->header; +- + return(ret); + } + +@@ -583,6 +580,23 @@ + outbuf + jpg->headerBytes + offset, + jpg->xPixels * jpg->yPixels * jpg->bytes, + &finalSize); ++ switch(check) { ++ case 0: ++ break; ++ /* Actual two error-returns from JPEGEncodeTile() */ ++ case EJPEG_ERROR_MEM: ++ fprintf(stderr, "libfpx: JPEGEncodeTile %s\n", ++ "complained of lack of memory"); ++ return -1; ++ case EJPEG_ERROR_EOF: ++ fprintf(stderr, "libfpx: JPEGEncodeTile %s\n", ++ "complained of corrupt file"); ++ return -1; ++ default: ++ fprintf(stderr, "libfpx: JPEGEncodeTile %s\n", ++ "failed unexpectedly"); ++ return -1; ++ } + + /* Are supposed to include the header in the tile */ + if(jpg->headerBytes){ Property changes on: graphics/libfpx/files/patch-jpeg__public.c ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-ole__olecore.cpp =================================================================== --- graphics/libfpx/files/patch-ole__olecore.cpp (revision 0) +++ graphics/libfpx/files/patch-ole__olecore.cpp (working copy) @@ -0,0 +1,32 @@ +--- ./ole/olecore.cpp.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./ole/olecore.cpp 2013-08-31 23:08:30.000000000 +0100 +@@ -153,13 +153,8 @@ + FPXStatus OLECore::OLEtoFPXError(HRESULT err) + { + FPXStatus terr; +- unsigned short errCode, errFac, errSev; + SCODE sCode = GetScode(err); + +- errSev = SCODE_SEVERITY(sCode); +- errCode = SCODE_CODE(sCode); +- errFac = SCODE_FACILITY(sCode); +- + switch (sCode) { + case S_OK: terr = FPX_OK; + break; +@@ -384,15 +379,8 @@ + OSErr OLECore::TranslateOLEError(HRESULT err) + { + OSErr terr; +- // DAG +- unsigned short errCode, errFac, errSev; + SCODE sCode = GetScode(err); + +- errSev = SCODE_SEVERITY(sCode); +- errCode = SCODE_CODE(sCode); +- errFac = SCODE_FACILITY(sCode); +- // end DAG +- + switch (sCode) { + case S_OK: terr = noErr; + break; Property changes on: graphics/libfpx/files/patch-ole__olecore.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-ole__oleprop.cpp =================================================================== --- graphics/libfpx/files/patch-ole__oleprop.cpp (revision 0) +++ graphics/libfpx/files/patch-ole__oleprop.cpp (working copy) @@ -0,0 +1,20 @@ +--- ./ole/oleprop.cpp.orig 2013-08-31 23:42:56.000000000 +0100 ++++ ./ole/oleprop.cpp 2013-08-31 23:43:54.000000000 +0100 +@@ -1089,7 +1089,7 @@ + if (pwstr) { + // Allocate for FPXWideStr + fpxwstr->length = wcslen(pwstr) + 1; +- fpxwstr->ptr = (LPWSTR)new WCHAR[fpxwstr->length]; ++ fpxwstr->ptr = (WORD*)new WCHAR[fpxwstr->length]; + if (fpxwstr->ptr == NULL) { + fpxwstr->length = 0; + return *fpxwstr; +@@ -1266,7 +1266,7 @@ + + for ( DWORD i= 0; i < wa->length; i++ ) { + wa->ptr[i].length = wcslen(vec->prgpwz[i]) + 1; +- wa->ptr[i].ptr = new WCHAR[wa->ptr[i].length]; ++ wa->ptr[i].ptr = (WORD*)new WCHAR[wa->ptr[i].length]; + if (wa->ptr[i].ptr == NULL) { + wa->ptr[i].length = 0; + return *wa; Property changes on: graphics/libfpx/files/patch-ole__oleprop.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-ole__olestrm.cpp =================================================================== --- graphics/libfpx/files/patch-ole__olestrm.cpp (revision 0) +++ graphics/libfpx/files/patch-ole__olestrm.cpp (working copy) @@ -0,0 +1,38 @@ +--- ./ole/olestrm.cpp.orig 2013-08-31 23:40:54.000000000 +0100 ++++ ./ole/olestrm.cpp 2013-08-31 23:42:24.000000000 +0100 +@@ -674,7 +674,7 @@ + + // Read the wide char. Here we don't use ReadVT_I2 since unicode is not padded to 32-bit + for ( DWORD i = 0; i < dwLength; i++ ) { +- if ( !ReadVT_I2_NoPad(&pwsz[i]) ) ++ if ( !ReadVT_I2_NoPad((WORD*)&pwsz[i]) ) + return FALSE; + } + +@@ -714,7 +714,7 @@ + + // Read the wide char. Here we don't use ReadVT_I2 since unicode is not padded to 32-bit + for ( DWORD i = 0; i < dwLength; i++ ) { +- if ( !ReadVT_I2_NoPad(&pwsz[i]) ) ++ if ( !ReadVT_I2_NoPad((WORD*)&pwsz[i]) ) + return FALSE; + } + +@@ -1564,7 +1564,7 @@ + for ( DWORD i = 0; i < wcount; i++ ) { + + // Write the wide char +- if ( !WriteVT_I2_NoPad(&pwsz[i])) ++ if ( !WriteVT_I2_NoPad((WORD*)&pwsz[i])) + return FALSE; + } + +@@ -1602,7 +1602,7 @@ + for ( DWORD i = 0; i < dwLength; i++ ) { + + // Write the wide char +- if ( !WriteVT_I2_NoPad(&pwsz[i])) ++ if ( !WriteVT_I2_NoPad((WORD*)&pwsz[i])) + return FALSE; + } + Property changes on: graphics/libfpx/files/patch-ole__olestrm.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-oless__ascii.cxx =================================================================== --- graphics/libfpx/files/patch-oless__ascii.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__ascii.cxx (working copy) @@ -0,0 +1,38 @@ +--- ./oless/ascii.cxx.orig 2005-02-26 02:23:09.000000000 +0000 ++++ ./oless/ascii.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -111,7 +111,7 @@ + { + SCODE sc; + olDebugOut((DEB_ITRACE, "In CheckAName(%s)\n", pwcsName)); +- if (FAILED(sc = ValidateNameA(pwcsName, CBMAXPATHCOMPLEN))) ++ if (FAILED(ValidateNameA(pwcsName, CBMAXPATHCOMPLEN))) + return sc; + // >= is used because the max len includes the null terminator + if (strlen(pwcsName) >= CWCMAXPATHCOMPLEN) +@@ -141,7 +141,7 @@ + + olAssert(sizeof(STATSTG) == sizeof(STATSTGW)); + +- olChk(sc = Next(celt, (STATSTGW *)rgelt, &cnt)); ++ olChk(Next(celt, (STATSTGW *)rgelt, &cnt)); + for (i = 0; ipwcsName) + _wcstotbs(pstatstg->pwcsName, (WCHAR *)pstatstg->pwcsName, + CWCSTORAGENAME); +@@ -189,7 +189,7 @@ + olAssert(sizeof(STATSTG) == sizeof(STATSTGW)); + + // call the virtual (wide char) function +- olChk(sc = this->Stat((STATSTGW *)pstatstg, grfStatFlag)); ++ olChk(this->Stat((STATSTGW *)pstatstg, grfStatFlag)); + + if (pstatstg->pwcsName) + _wcstotbs(pstatstg->pwcsName, (WCHAR *)pstatstg->pwcsName, Property changes on: graphics/libfpx/files/patch-oless__ascii.cxx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-oless__byteordr.hxx =================================================================== --- graphics/libfpx/files/patch-oless__byteordr.hxx (revision 0) +++ graphics/libfpx/files/patch-oless__byteordr.hxx (working copy) @@ -0,0 +1,15 @@ +--- ./oless/byteordr.hxx.orig 2013-08-31 23:38:19.000000000 +0100 ++++ ./oless/byteordr.hxx 2013-08-31 23:38:24.000000000 +0100 +@@ -66,6 +66,12 @@ + *pw = ByteSwap(*pw); + } + ++inline VOID ByteSwap( WCHAR *pw ) ++{ ++ *pw = ByteSwap((WORD)*pw); ++} ++ ++ + // + // DWORD Byte-Swap + // Property changes on: graphics/libfpx/files/patch-oless__byteordr.hxx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-oless__docfile.cxx =================================================================== --- graphics/libfpx/files/patch-oless__docfile.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__docfile.cxx (working copy) @@ -0,0 +1,32 @@ +--- ./oless/docfile.cxx.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./oless/docfile.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -93,7 +93,6 @@ + { + SCODE sc; + CFileILB *pilb = NULL; +- int i; + + olDebugOut((DEB_ITRACE, "In StgCreateDocfile(%p, %lX, %lu, %p)\n", + pszName, grfMode, reserved, ppstgOpen)); +@@ -123,8 +122,10 @@ + EH_Err: + if (pilb) + { +- if (FAILED(sc)) i=pilb->ReleaseOnError(); +- else i=pilb->Release(); ++#if DBG == 1 ++ int i = ++#endif ++ FAILED(sc) ? pilb->ReleaseOnError() : pilb->Release(); + olAssert(SUCCEEDED(sc) ? i==1 : i==0); + } + olDebugOut((DEB_ITRACE, "Out StgCreateDocfile: *ppstgOpen=%p ret=>%l\n", +@@ -181,7 +182,7 @@ + (STGM_TRANSACTED | STGM_CONVERT)) + df |= DF_INDEPENDENT; + olChkTo(EH_Truncate, +- sc = DfFromLB(plkbyt, df, ++ DfFromLB(plkbyt, df, + RSF_CREATE | + ((grfMode & STGM_CREATE) ? RSF_TRUNCATE : 0) | + ((grfMode & STGM_CONVERT) ? RSF_CONVERT : 0), Property changes on: graphics/libfpx/files/patch-oless__docfile.cxx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-oless__expdf.cxx =================================================================== --- graphics/libfpx/files/patch-oless__expdf.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__expdf.cxx (working copy) @@ -0,0 +1,15 @@ +--- ./oless/expdf.cxx.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./oless/expdf.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -169,8 +169,10 @@ + } + if (IsRoot() && P_WRITE(_df)) + { +- SCODE sc; +- sc = _pmsBase->Flush(0); ++#if DBG == 1 ++ SCODE sc = ++#endif ++ _pmsBase->Flush(0); + #if DBG == 1 + if (FAILED(sc)) + { Property changes on: graphics/libfpx/files/patch-oless__expdf.cxx ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-oless__fat.cxx =================================================================== --- graphics/libfpx/files/patch-oless__fat.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__fat.cxx (working copy) @@ -0,0 +1,12 @@ +--- ./oless/fat.cxx.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./oless/fat.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -404,9 +404,6 @@ + + _cfsTable = cFatSect; + +- USHORT cbSectorSize; +- cbSectorSize = _pmsParent->GetSectorSize(); +- + _ulFreeSects = MAX_ULONG; + + Err: Property changes on: graphics/libfpx/files/patch-oless__fat.cxx ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-oless__h__dir.hxx =================================================================== --- graphics/libfpx/files/patch-oless__h__dir.hxx (revision 0) +++ graphics/libfpx/files/patch-oless__h__dir.hxx (working copy) @@ -0,0 +1,11 @@ +--- ./oless/h/dir.hxx.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./oless/h/dir.hxx 2013-08-31 23:08:30.000000000 +0100 +@@ -140,8 +140,6 @@ + private: + inline BYTE GetBitFlags() const; + inline void SetBitFlags(BYTE bValue, BYTE bMask); +- +- BYTE _bpad[CBDIRPAD]; + }; + + //+------------------------------------------------------------------------- Property changes on: graphics/libfpx/files/patch-oless__h__dir.hxx ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-oless__h__owchar.h =================================================================== --- graphics/libfpx/files/patch-oless__h__owchar.h (revision 0) +++ graphics/libfpx/files/patch-oless__h__owchar.h (working copy) @@ -0,0 +1,61 @@ +--- ./oless/h/owchar.h.orig 2013-08-31 23:54:44.000000000 +0100 ++++ ./oless/h/owchar.h 2013-08-31 23:56:24.000000000 +0100 +@@ -33,8 +33,6 @@ + #define _CRTAPI1 + #endif + +-typedef uint16_t WCHAR, *LPWSTR; +-typedef const WCHAR* LPCWSTR; + + /* use an alias */ + #define _wcsnicmp wcsnicmp +@@ -48,46 +46,12 @@ + + #if defined(HAVE_WCHAR_H) + # include +-# define wcsatol fpx_wcsatol +-# define wcsatoi fpx_wcsatoi +-# define wcscat fpx_wcscat +-# define wcschr fpx_wcschr +-# define wcscmp fpx_wcscmp +-# define wcsicmp fpx_wcsicmp +-# define wcscoll fpx_wcscoll +-# define wcscpy fpx_wcscpy +-# define wcsitoa fpx_wcsitoa +-# define wcslen fpx_wcslen +-# define wcsltoa fpx_wcsltoa +-# define wcslwr fpx_wcslwr +-# define wcsncmp fpx_wcsncmp +-# define wcsnicmp fpx_wcsnicmp +-# define wcsncpy fpx_wcsncpy +-# define wcsrchr fpx_wcsrchr +-# define wcsupr fpx_wcsupr +-# define wcswcs fpx_wcswcs +-# define wcstosbs fpx_wcstosbs +-# define sbstowcs fpx_sbstowcs + #endif // HAVE_WCHAR_H + +-long _CRTAPI1 wcsatol(const WCHAR *wsz); +-int _CRTAPI1 wcsatoi(const WCHAR *wsz); +-WCHAR * _CRTAPI1 wcscat(WCHAR *wsz1, const WCHAR *wsz2); +-WCHAR * _CRTAPI1 wcschr ( const WCHAR * string, WCHAR ch ); +-int _CRTAPI1 wcscmp(const WCHAR *wsz1, const WCHAR *wsz2); +-int _CRTAPI1 wcsicmp(const WCHAR *wsz1, const WCHAR *wsz2); +-int _CRTAPI1 wcscoll(const WCHAR * wsz1, const WCHAR * wsz2); +-WCHAR * _CRTAPI1 wcscpy(WCHAR *wsz1, WCHAR const *wsz2); +-WCHAR * _CRTAPI1 wcsitoa(int ival, WCHAR *wsz, int radix); +-size_t _CRTAPI1 wcslen(WCHAR const *wsz); +-WCHAR * _CRTAPI1 wcsltoa(long lval, WCHAR *wsz, int radix); +-WCHAR * _CRTAPI1 wcslwr(WCHAR *wsz); +-int _CRTAPI1 wcsncmp(const WCHAR *wsz1, const WCHAR *wsz2, size_t count); ++typedef wchar_t WCHAR, *LPWSTR; ++typedef const WCHAR* LPCWSTR; ++ + int _CRTAPI1 wcsnicmp(const WCHAR *wsz1, const WCHAR *wsz2, size_t count); +-WCHAR * _CRTAPI1 wcsncpy ( WCHAR * dest, const WCHAR * source, size_t count ); +-WCHAR * _CRTAPI1 wcsrchr(const WCHAR * wcs, WCHAR wc); +-WCHAR * _CRTAPI1 wcsupr(WCHAR *wsz); +-WCHAR * _CRTAPI1 wcswcs(const WCHAR *wsz1, const WCHAR *wsz2); + size_t _CRTAPI1 wcstosbs( char * s, const WCHAR * pwcs, size_t n); + size_t _CRTAPI1 sbstowcs(WCHAR *wcstr, const char *mbstr, size_t count); + Property changes on: graphics/libfpx/files/patch-oless__h__owchar.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-oless__refilb.cxx =================================================================== --- graphics/libfpx/files/patch-oless__refilb.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__refilb.cxx (working copy) @@ -0,0 +1,15 @@ +--- ./oless/refilb.cxx.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./oless/refilb.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -297,9 +297,9 @@ + int result = _stat(_pszName, &buf); + if (!result) // fill in zeros + { +- pstatstg->atime.dwLowDateTime = pstatstg->atime.dwLowDateTime = 0; +- pstatstg->mtime.dwLowDateTime = pstatstg->mtime.dwLowDateTime = 0; +- pstatstg->ctime.dwLowDateTime = pstatstg->ctime.dwLowDateTime = 0; ++ pstatstg->atime.dwLowDateTime = 0; ++ pstatstg->mtime.dwLowDateTime = 0; ++ pstatstg->ctime.dwLowDateTime = 0; + } + else + { Property changes on: graphics/libfpx/files/patch-oless__refilb.cxx ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-oless__storage.cxx =================================================================== --- graphics/libfpx/files/patch-oless__storage.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__storage.cxx (working copy) @@ -0,0 +1,48 @@ +--- ./oless/storage.cxx.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./oless/storage.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -53,7 +53,6 @@ + IStorage **ppstgOpen) + { + SCODE sc; +- int i; + + if (!pwcsName) + return ResultFromScode(STG_E_INVALIDNAME); +@@ -72,8 +71,10 @@ + pilb, pstgPriority, grfMode, snbExclude, reserved, ppstgOpen) ); + + EH_Err: +- if (FAILED(sc)) i=pilb->ReleaseOnError(); +- else i=pilb->Release(); ++#if DBG == 1 ++ int i = ++#endif ++ FAILED(sc) ? pilb->ReleaseOnError() : pilb->Release(); + olAssert(SUCCEEDED(sc) ? i==1 : i==0); + olDebugOut((DEB_TRACE,"Out StgOpenStorage: ppstgOpen=%p ret=> %lX\n", + (ppstgOpen)?(*ppstgOpen) : NULL, sc)); +@@ -139,7 +140,6 @@ + STDAPI StgIsStorageFile(TCHAR const *pwcsName) + { + SCODE sc; +- int i=0; + CFileILB* pilb; + + olChk(ValidateNameW(pwcsName, CBMAXPATHCOMPLEN)); +@@ -148,9 +148,13 @@ + sc = GetScode( StgIsStorageILockBytes(pilb) ); + + EH_Err: +- if (pilb) +- i=pilb->Release(); +- olAssert(i==0); // should not have any more reference to it ++ if (pilb) { ++#if DBG == 1 ++ int i = ++#endif ++ pilb->Release(); ++ olAssert(i==0); // should not have any more reference to it ++ } + olDebugOut((DEB_TRACE, "Out StgIsStorageFile: ret=> %lx\n", sc)); + return ResultFromScode(sc); + } Property changes on: graphics/libfpx/files/patch-oless__storage.cxx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-oless__vect.cxx =================================================================== --- graphics/libfpx/files/patch-oless__vect.cxx (revision 0) +++ graphics/libfpx/files/patch-oless__vect.cxx (working copy) @@ -0,0 +1,11 @@ +--- ./oless/vect.cxx.orig 2005-02-26 02:23:11.000000000 +0000 ++++ ./oless/vect.cxx 2013-08-31 23:08:30.000000000 +0100 +@@ -61,7 +61,7 @@ + } + + msfDebugOut((DEB_ITRACE,"Out CPagedVector::CPagedVector()\n")); +- return S_OK; ++ return sc; + + Err: + //In the error case, discard whatever vectors we were able to allocate Property changes on: graphics/libfpx/files/patch-oless__vect.cxx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-ri_image__cp_jpeg.cpp =================================================================== --- graphics/libfpx/files/patch-ri_image__cp_jpeg.cpp (revision 0) +++ graphics/libfpx/files/patch-ri_image__cp_jpeg.cpp (working copy) @@ -0,0 +1,11 @@ +--- ./ri_image/cp_jpeg.cpp.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./ri_image/cp_jpeg.cpp 2013-08-31 23:08:30.000000000 +0100 +@@ -250,7 +250,7 @@ + if ( jpegTableIndex ) + status = eJPEG_CreateHeader(pEncoder, DEFAULTJPEGHEADERSIZE, jpegHeader, (long *)&headerSize); + else +- status = eJPEG_ConcatenateHeader(pEncoder, jpegHeader, (long *)&headerSize); ++ status = eJPEG_ConcatenateHeader(pEncoder); + + if (status) + return status; Property changes on: graphics/libfpx/files/patch-ri_image__cp_jpeg.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: graphics/libfpx/files/patch-ri_image__ptile.cpp =================================================================== --- graphics/libfpx/files/patch-ri_image__ptile.cpp (revision 0) +++ graphics/libfpx/files/patch-ri_image__ptile.cpp (working copy) @@ -0,0 +1,20 @@ +--- ./ri_image/ptile.cpp.orig 2007-11-02 07:10:05.000000000 +0000 ++++ ./ri_image/ptile.cpp 2013-08-31 23:08:30.000000000 +0100 +@@ -775,16 +775,14 @@ + { + PTile *currTile = first; + PTile *nextTile = currTile->next; +- time_t ancientTime, timeNow; ++ time_t ancientTime; + + // Calculate the minimum time for the last access to the tile. If a tile + // has not been accessed within this amount of time, then we will consider + // it to be "ancient" + #ifdef _WINDOWS +- timeNow = GetCurrentTime(); + ancientTime = GetCurrentTime() - (numMinutesOld * 60L * CLOCKS_PER_SEC); + #else +- timeNow = clock(); + ancientTime = clock() - (numMinutesOld * 60L * CLOCKS_PER_SEC); + #endif + Property changes on: graphics/libfpx/files/patch-ri_image__ptile.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: graphics/libfpx/files/patch-unused-privates =================================================================== --- graphics/libfpx/files/patch-unused-privates (revision 326461) +++ graphics/libfpx/files/patch-unused-privates (working copy) @@ -1,25 +0,0 @@ -These fields have been unused for many years, but it is only now, -that some compilers (clang-3.2) complain about it... - - -mi - ---- fpx/fpximgvw.h 2007-11-02 03:10:05.000000000 -0400 -+++ fpx/fpximgvw.h 2012-10-12 12:28:39.000000000 -0400 -@@ -300,6 +300,4 @@ - - PFileFlashPixView* filePtr; // The image file descriptor -- OLEStorage* sourceStorage; // Source FPX Image storage -- OLEStorage* resultStorage; // Result FPX Image storage - - // Geometric parameters ---- oless/h/dir.hxx.orig 2012-11-23 13:08:46.000000000 +0800 -+++ oless/h/dir.hxx 2012-11-23 13:09:02.000000000 +0800 -@@ -140,8 +140,6 @@ - private: - inline BYTE GetBitFlags() const; - inline void SetBitFlags(BYTE bValue, BYTE bMask); -- -- BYTE _bpad[CBDIRPAD]; - }; - - //+------------------------------------------------------------------------- Index: graphics/libfpx/files/patch-warnings =================================================================== --- graphics/libfpx/files/patch-warnings (revision 326461) +++ graphics/libfpx/files/patch-warnings (working copy) @@ -1,479 +0,0 @@ ---- basics/filename.cpp 2013-09-01 20:54:18.000000000 -0400 -+++ basics/filename.cpp 2013-09-01 21:00:22.000000000 -0400 -@@ -430,12 +430,13 @@ - #else - struct statfs buf; -- int errNum=0, fstyp; -+ int errNum; - /* Get file system stats */ -- fstyp=0; - #ifdef __SVR4 // FIXME: statfs is not a portable API -- errNum = statfs ( ".", &buf, sizeof( struct statfs ), fstyp); -+ errNum = statfs ( ".", &buf, sizeof( struct statfs ), 0); - #else - errNum = statfs ( ".", &buf); - #endif -+ if (errNum) -+ perror("statfs on current directory"); - - return (buf.f_bsize*buf.f_bfree)/kOneKilobyte; ---- basics/a_file.cpp 2005-02-25 21:23:03.000000000 -0500 -+++ basics/a_file.cpp 2013-09-01 21:05:29.000000000 -0400 -@@ -259,8 +259,7 @@ - // remove access path from name - long index = 0; -- while (cname[i] != '\0') { -+ for (i = 0; cname[i] != '\0'; i++) { - if (cname[i] == ':') - index = i; -- i++; - } - if (index != 0) { ---- ole/olecore.cpp 2007-11-02 03:10:05.000000000 -0400 -+++ ole/olecore.cpp 2013-09-01 21:07:54.000000000 -0400 -@@ -154,11 +154,6 @@ - { - FPXStatus terr; -- unsigned short errCode, errFac, errSev; - SCODE sCode = GetScode(err); - -- errSev = SCODE_SEVERITY(sCode); -- errCode = SCODE_CODE(sCode); -- errFac = SCODE_FACILITY(sCode); -- - switch (sCode) { - case S_OK: terr = FPX_OK; -@@ -385,13 +380,6 @@ - { - OSErr terr; -- // DAG -- unsigned short errCode, errFac, errSev; - SCODE sCode = GetScode(err); - -- errSev = SCODE_SEVERITY(sCode); -- errCode = SCODE_CODE(sCode); -- errFac = SCODE_FACILITY(sCode); -- // end DAG -- - switch (sCode) { - case S_OK: terr = noErr; ---- ri_image/ptile.cpp 2007-11-02 03:10:05.000000000 -0400 -+++ ri_image/ptile.cpp 2013-09-01 21:09:31.000000000 -0400 -@@ -776,5 +776,5 @@ - PTile *currTile = first; - PTile *nextTile = currTile->next; -- time_t ancientTime, timeNow; -+ time_t ancientTime; - - // Calculate the minimum time for the last access to the tile. If a tile -@@ -782,8 +782,6 @@ - // it to be "ancient" - #ifdef _WINDOWS -- timeNow = GetCurrentTime(); - ancientTime = GetCurrentTime() - (numMinutesOld * 60L * CLOCKS_PER_SEC); - #else -- timeNow = clock(); - ancientTime = clock() - (numMinutesOld * 60L * CLOCKS_PER_SEC); - #endif ---- fpx/f_fpxvw.cpp 2012-10-05 07:30:48.000000000 -0400 -+++ fpx/f_fpxvw.cpp 2013-09-01 21:11:33.000000000 -0400 -@@ -437,5 +437,4 @@ - PFileFlashPixView::~PFileFlashPixView () - { -- Boolean status; - // CAUTION: Elements have to be deleted in the reverse order of their creation... - -@@ -443,6 +442,5 @@ - // all ole buffers for the elements) - if (mode != OLE_READ_ONLY_MODE) -- status = Commit(); -- -+ Commit(); - - // Delete an element releases the OLE object. ---- fpx/fpxformt.cpp 2007-11-02 03:10:05.000000000 -0400 -+++ fpx/fpxformt.cpp 2013-09-01 21:15:16.000000000 -0400 -@@ -547,5 +547,4 @@ - FPXStatus PFlashPixFile::Erreur() const - { -- long error = 0; - FPXStatus status = FPX_OK; - -@@ -563,5 +562,5 @@ - // It's not an error not to have an Image Info property set (optionnal) - if (imageInfoPropertySet) -- error = imageInfoPropertySet->getFPXStatus(); -+ status = imageInfoPropertySet->getFPXStatus(); - } - ---- fpx/fpxlibio.cpp 2007-11-02 03:10:05.000000000 -0400 -+++ fpx/fpxlibio.cpp 2013-09-01 21:21:36.000000000 -0400 -@@ -1752,6 +1752,5 @@ - { - // Open the sub-storage -- Boolean bRes; -- bRes = theowningStorage->OpenStorage( -+ theowningStorage->OpenStorage( - (const char*) storagePathInFile, - &theSubStorage, ---- oless/ascii.cxx 2005-02-25 21:23:09.000000000 -0500 -+++ oless/ascii.cxx 2013-09-01 21:46:40.000000000 -0400 -@@ -112,5 +112,5 @@ - SCODE sc; - olDebugOut((DEB_ITRACE, "In CheckAName(%s)\n", pwcsName)); -- if (FAILED(sc = ValidateNameA(pwcsName, CBMAXPATHCOMPLEN))) -+ if (FAILED(ValidateNameA(pwcsName, CBMAXPATHCOMPLEN))) - return sc; - // >= is used because the max len includes the null terminator -@@ -142,5 +142,5 @@ - olAssert(sizeof(STATSTG) == sizeof(STATSTGW)); - -- olChk(sc = Next(celt, (STATSTGW *)rgelt, &cnt)); -+ olChk(Next(celt, (STATSTGW *)rgelt, &cnt)); - for (i = 0; ipwcsName) - _wcstotbs(pstatstg->pwcsName, (WCHAR *)pstatstg->pwcsName, -@@ -190,5 +190,5 @@ - - // call the virtual (wide char) function -- olChk(sc = this->Stat((STATSTGW *)pstatstg, grfStatFlag)); -+ olChk(this->Stat((STATSTGW *)pstatstg, grfStatFlag)); - - if (pstatstg->pwcsName) ---- oless/docfile.cxx 2007-11-02 03:10:05.000000000 -0400 -+++ oless/docfile.cxx 2013-09-01 21:57:30.000000000 -0400 -@@ -94,5 +94,4 @@ - SCODE sc; - CFileILB *pilb = NULL; -- int i; - - olDebugOut((DEB_ITRACE, "In StgCreateDocfile(%p, %lX, %lu, %p)\n", -@@ -124,6 +123,8 @@ - if (pilb) - { -- if (FAILED(sc)) i=pilb->ReleaseOnError(); -- else i=pilb->Release(); -+#if DBG == 1 -+ int i = -+#endif -+ FAILED(sc) ? pilb->ReleaseOnError() : pilb->Release(); - olAssert(SUCCEEDED(sc) ? i==1 : i==0); - } -@@ -182,5 +183,5 @@ - df |= DF_INDEPENDENT; - olChkTo(EH_Truncate, -- sc = DfFromLB(plkbyt, df, -+ DfFromLB(plkbyt, df, - RSF_CREATE | - ((grfMode & STGM_CREATE) ? RSF_TRUNCATE : 0) | ---- oless/expdf.cxx 2007-11-02 03:10:05.000000000 -0400 -+++ oless/expdf.cxx 2013-09-01 21:59:56.000000000 -0400 -@@ -170,6 +170,8 @@ - if (IsRoot() && P_WRITE(_df)) - { -- SCODE sc; -- sc = _pmsBase->Flush(0); -+#if DBG == 1 -+ SCODE sc = -+#endif -+ _pmsBase->Flush(0); - #if DBG == 1 - if (FAILED(sc)) ---- oless/fat.cxx 2007-11-02 03:10:05.000000000 -0400 -+++ oless/fat.cxx 2013-09-01 22:02:10.000000000 -0400 -@@ -405,7 +405,4 @@ - _cfsTable = cFatSect; - -- USHORT cbSectorSize; -- cbSectorSize = _pmsParent->GetSectorSize(); -- - _ulFreeSects = MAX_ULONG; - ---- oless/refilb.cxx 2007-11-02 03:10:05.000000000 -0400 -+++ oless/refilb.cxx 2013-09-01 22:04:44.000000000 -0400 -@@ -298,7 +298,7 @@ - if (!result) // fill in zeros - { -- pstatstg->atime.dwLowDateTime = pstatstg->atime.dwLowDateTime = 0; -- pstatstg->mtime.dwLowDateTime = pstatstg->mtime.dwLowDateTime = 0; -- pstatstg->ctime.dwLowDateTime = pstatstg->ctime.dwLowDateTime = 0; -+ pstatstg->atime.dwLowDateTime = 0; -+ pstatstg->mtime.dwLowDateTime = 0; -+ pstatstg->ctime.dwLowDateTime = 0; - } - else ---- oless/storage.cxx 2007-11-02 03:10:05.000000000 -0400 -+++ oless/storage.cxx 2013-09-01 22:08:18.000000000 -0400 -@@ -54,5 +54,4 @@ - { - SCODE sc; -- int i; - - if (!pwcsName) -@@ -73,6 +72,8 @@ - - EH_Err: -- if (FAILED(sc)) i=pilb->ReleaseOnError(); -- else i=pilb->Release(); -+#if DBG == 1 -+ int i = -+#endif -+ FAILED(sc) ? pilb->ReleaseOnError() : pilb->Release(); - olAssert(SUCCEEDED(sc) ? i==1 : i==0); - olDebugOut((DEB_TRACE,"Out StgOpenStorage: ppstgOpen=%p ret=> %lX\n", -@@ -140,5 +141,4 @@ - { - SCODE sc; -- int i=0; - CFileILB* pilb; - -@@ -149,7 +149,11 @@ - - EH_Err: -- if (pilb) -- i=pilb->Release(); -- olAssert(i==0); // should not have any more reference to it -+ if (pilb) { -+#if DBG == 1 -+ int i = -+#endif -+ pilb->Release(); -+ olAssert(i==0); // should not have any more reference to it -+ } - olDebugOut((DEB_TRACE, "Out StgIsStorageFile: ret=> %lx\n", sc)); - return ResultFromScode(sc); ---- oless/vect.cxx 2005-02-25 21:23:11.000000000 -0500 -+++ oless/vect.cxx 2013-09-01 22:14:07.000000000 -0400 -@@ -62,5 +62,5 @@ - - msfDebugOut((DEB_ITRACE,"Out CPagedVector::CPagedVector()\n")); -- return S_OK; -+ return sc; - - Err: ---- jpeg/mcu2rast.c 2005-02-25 21:23:06.000000000 -0500 -+++ jpeg/mcu2rast.c 2013-09-01 22:17:29.000000000 -0400 -@@ -214,5 +214,5 @@ - unsigned char *buf_ptr, *c2_ptr, *c3_ptr; - int *p1, *p2, *p3, *p4, i, j, k, t; -- int skip, skip2, skip_row_data, skip_row_data2; -+ int skip, skip2, skip_row_data; - int *mcupos; - int nvMCU, nhMCU; /* number of FULL MCU vert. and hor. */ -@@ -265,5 +265,4 @@ - skip2 = (width/2) - 8; - skip_row_data = 8*width; /* One row of MCUs */ -- skip_row_data2 = 8*width/2; /* one row of chroma blocks */ - - for (i = 0; i < nvMCU; i++) { -@@ -326,5 +325,5 @@ - unsigned char *buf_ptr, *c1_ptr, *c2_ptr, *c3_ptr, *c4_ptr; - int *p1, *p2, *p3, *p4, *p5, *p6, i, j, k, t; -- int skip, skip2, skip_row_data, skip_row_data2; -+ int skip, skip2, skip_row_data; - int *mcupos; - int nvMCU, nhMCU; /* number of FULL MCU vert. and hor. */ -@@ -382,5 +381,4 @@ - skip2 = (width/2) - 8; - skip_row_data = 8*width; /* One row of MCUs */ -- skip_row_data2 = 8*width/2; /* one row of chroma blocks */ - - for (i = 0; i < nvMCU; i++) { ---- jpeg/encoder.h 2005-02-25 21:23:06.000000000 -0500 -+++ jpeg/encoder.h 2013-09-01 22:25:58.000000000 -0400 -@@ -161,15 +161,10 @@ - ); - -- - /* see above */ - JPEGEXPORT - int eJPEG_ConcatenateHeader( --void *encoder, --unsigned char *hdrBuffer,/* the buffer itself */ --long *hdrBufferUsed /* upon return shows the amount of -- hdrbuffer that was used. */ -+void *encoder - ); - -- - JPEGEXPORT - long eJPEG_EncodeTile( ---- jpeg/public.c 2005-02-25 21:23:06.000000000 -0500 -+++ jpeg/public.c 2013-09-01 22:36:15.000000000 -0400 -@@ -19,7 +19,10 @@ - #define IMP_ENCODER - #include -+#include - #include - #include "jpegconf.h" - -+#include "ejpeg.h" -+ - #include "enctile.h" - #include "encoder.h" -@@ -449,8 +452,5 @@ - #define HDR_BUFF_SIZE 1440 - int eJPEG_ConcatenateHeader( --void *encoder, /* same value returned by eJPEG_Init */ --unsigned char *hdrBuffer, /* the buffer itself */ --long *hdrBufferUsed /* upon return shows the amount of -- that was used */ -+void *encoder /* same value returned by eJPEG_Init */ - ) - { -@@ -462,5 +462,4 @@ - ret = eJPEG_CreateHeader(encoder, HDR_BUFF_SIZE, tempBuf, &size); - size_minus_eoi = size-2; -- *hdrBufferUsed = size; - - if(ret) -@@ -477,6 +476,4 @@ - } - -- hdrBuffer = jpg->header; -- - return(ret); - } -@@ -584,4 +581,21 @@ - jpg->xPixels * jpg->yPixels * jpg->bytes, - &finalSize); -+ switch(check) { -+ case 0: -+ break; -+ /* Actual two error-returns from JPEGEncodeTile() */ -+ case EJPEG_ERROR_MEM: -+ fprintf(stderr, "libfpx: JPEGEncodeTile %s\n", -+ "complained of lack of memory"); -+ return -1; -+ case EJPEG_ERROR_EOF: -+ fprintf(stderr, "libfpx: JPEGEncodeTile %s\n", -+ "complained of corrupt file"); -+ return -1; -+ default: -+ fprintf(stderr, "libfpx: JPEGEncodeTile %s\n", -+ "failed unexpectedly"); -+ return -1; -+ } - - /* Are supposed to include the header in the tile */ ---- ri_image/cp_jpeg.cpp 2007-11-02 03:10:05.000000000 -0400 -+++ ri_image/cp_jpeg.cpp 2013-09-01 22:43:43.000000000 -0400 -@@ -251,5 +251,5 @@ - status = eJPEG_CreateHeader(pEncoder, DEFAULTJPEGHEADERSIZE, jpegHeader, (long *)&headerSize); - else -- status = eJPEG_ConcatenateHeader(pEncoder, jpegHeader, (long *)&headerSize); -+ status = eJPEG_ConcatenateHeader(pEncoder); - - if (status) ---- jpeg/process.c 2007-11-02 03:10:05.000000000 -0400 -+++ jpeg/process.c 2013-09-01 22:45:24.000000000 -0400 -@@ -86,10 +86,9 @@ - SubSample422(const unsigned char *src, unsigned char *dst, int tileSize, int bpp) - { -- int x, y, blocks, acc, lineOffset; -+ int x, y, blocks, acc; - unsigned char *dstPtr = dst; - const unsigned char *p1, *p2; - - blocks = tileSize / 2; -- lineOffset = tileSize * bpp; - for(x = 0; x < tileSize; x++) - { ---- jpeg/enctile.c 2007-11-02 03:10:05.000000000 -0400 -+++ jpeg/enctile.c 2013-09-01 22:46:30.000000000 -0400 -@@ -195,5 +195,5 @@ - Some error checking should be done at the higher level. - */ -- int j, i, k, nvblocks, nhblocks; -+ int j, i, k, nhblocks; - int t, skip; - /* HANDLE lBlock; */ -@@ -204,5 +204,4 @@ - Clear_Last_DC(jpeg_struct); - -- nvblocks = height/8; - nhblocks = width/8; - skip = width -8; ---- jpeg/dectile.c 2011-12-16 10:49:44.000000000 -0500 -+++ jpeg/dectile.c 2013-09-01 22:55:16.000000000 -0400 -@@ -433,5 +433,8 @@ - { - int marker, i = 0, ii; -- static int error_code, dct_method, image_found, eoi_found, is_gray_scale; -+#ifdef WARNING -+ static int eoi_found; -+#endif -+ static int error_code, dct_method, image_found, is_gray_scale; - static int interleave_flag; - static unsigned int restart_interv; /* restart interval, 0 if disabled */ -@@ -457,5 +460,7 @@ - restart_interv = 0; - image_found = 0; -+#ifdef WARNING - eoi_found = 0; -+#endif - dct_method = method; - error_code = 0; -@@ -480,5 +485,7 @@ - restart_interv = 0; - image_found = 0; -+#ifdef WARNING - eoi_found = 0; -+#endif - dct_method = method; - error_code = 0; -@@ -675,5 +682,7 @@ - } - #endif /* NOCODE GSY 8/2/96 */ -+#ifdef WARNING - eoi_found = 1; -+#endif - if (image_found) { - goto Finished; -@@ -688,5 +697,7 @@ - } else if ((frame == NULL) && - ((marker = DP_Get_Next_Marker(db_state)) == MARKER_SOI)) { -+#ifdef WARNING - eoi_found = 0; -+#endif - goto Switch0; - } else { ---- jpeg/djpeg.c 2007-11-02 03:10:05.000000000 -0400 -+++ jpeg/djpeg.c 2013-09-01 22:56:51.000000000 -0400 -@@ -130,5 +130,4 @@ - int grayscale; - int error_type; -- size_t byte_count; - DB_STATE *db_state; - DECODER_STRUCT *decodePtr = (DECODER_STRUCT *)decoder; -@@ -165,5 +164,4 @@ - return(error_type); - } -- byte_count = (size_t)DB_Processed_Bytes(db_state); - - if (db_state->db_MCUbuf != NULL) { -@@ -190,5 +188,4 @@ - int grayscale; - int error_type; -- size_t byte_count; - DB_STATE *db_state; - DECODER_STRUCT *decodePtr = (DECODER_STRUCT *)decoder; -@@ -232,5 +229,4 @@ - return(error_type); - } -- byte_count = (size_t)DB_Processed_Bytes(db_state); - - if (db_state->db_MCUbuf != NULL) { -@@ -273,6 +269,4 @@ - } - -- byte_count = (size_t) DB_Processed_Bytes(db_state); -- - if (db_state->db_MCUbuf != NULL) { - FPX_free(db_state->db_MCUbuf);