From owner-svn-ports-all@FreeBSD.ORG Mon Jun 9 22:03:15 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17011B60; Mon, 9 Jun 2014 22:03:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0425D2767; Mon, 9 Jun 2014 22:03:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s59M3EJj061366; Mon, 9 Jun 2014 22:03:14 GMT (envelope-from mi@svn.freebsd.org) Received: (from mi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s59M3EkA061365; Mon, 9 Jun 2014 22:03:14 GMT (envelope-from mi@svn.freebsd.org) Message-Id: <201406092203.s59M3EkA061365@svn.freebsd.org> From: Mikhail Teterin Date: Mon, 9 Jun 2014 22:03:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r357210 - head/graphics/libimg/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 22:03:15 -0000 Author: mi Date: Mon Jun 9 22:03:14 2014 New Revision: 357210 URL: http://svnweb.freebsd.org/changeset/ports/357210 QAT: https://qat.redports.org/buildarchive/r357210/ Log: Correct an error in my new patch, which broke capturing TIFF images into Tcl-objects. Modified: head/graphics/libimg/files/patch-tiff Modified: head/graphics/libimg/files/patch-tiff ============================================================================== --- head/graphics/libimg/files/patch-tiff Mon Jun 9 21:57:43 2014 (r357209) +++ head/graphics/libimg/files/patch-tiff Mon Jun 9 22:03:14 2014 (r357210) @@ -28,7 +28,7 @@ +#include -@@ -35,7 +39,4 @@ +@@ -35,7 +39,4 @@ static int SetupTiffLibrary(Tcl_Interp * #include "init.c" -#include "tiffInt.h" @@ -36,7 +36,7 @@ - extern DLLIMPORT int unlink(const char *); -@@ -88,10 +89,4 @@ +@@ -88,10 +89,4 @@ SetupTiffLibrary (interp) Tcl_Interp *interp; { - static int initialized = 0; @@ -47,7 +47,7 @@ - if (errorMessage) { ckfree(errorMessage); -@@ -105,35 +100,4 @@ +@@ -105,35 +100,4 @@ SetupTiffLibrary (interp) } - /* @@ -83,7 +83,7 @@ - } return TCL_OK; } -@@ -451,8 +415,6 @@ +@@ -451,8 +415,6 @@ ObjRead(interp, data, format, imageHandl { TIFF *tif; - char *tempFileName = NULL, tempFileNameBuffer[256]; @@ -93,7 +93,7 @@ - char buffer[1024]; char *dataPtr = NULL; -@@ -461,35 +423,13 @@ +@@ -461,35 +423,13 @@ ObjRead(interp, data, format, imageHandl } - if (TIFFClientOpen) { @@ -138,7 +138,7 @@ + sizeString, mapDummy, unMapDummy); if (tif != NULL) { -@@ -499,7 +439,4 @@ +@@ -499,7 +439,4 @@ ObjRead(interp, data, format, imageHandl result = TCL_ERROR; } - if (tempFileName) { @@ -146,7 +146,7 @@ - } if (result == TCL_ERROR) { Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -526,37 +463,12 @@ +@@ -526,37 +463,12 @@ ChnRead(interp, chan, fileName, format, { TIFF *tif; - char *tempFileName = NULL, tempFileNameBuffer[256]; @@ -191,7 +191,7 @@ + sizeMFile, mapDummy, unMapDummy); if (tif) { result = CommonRead(interp, tif, format, imageHandle, -@@ -565,7 +477,4 @@ +@@ -565,7 +477,4 @@ ChnRead(interp, chan, fileName, format, result = TCL_ERROR; } - if (tempFileName) { @@ -199,34 +199,37 @@ - } if (result == TCL_ERROR) { Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -635,5 +544,5 @@ +@@ -635,5 +544,5 @@ CommonRead(interp, tif, format, imageHan npixels = w * h; - raster = (uint32*) TkimgTIFFmalloc(npixels * sizeof (uint32)); + raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32)); block.width = w; block.height = h; -@@ -646,5 +555,5 @@ +@@ -646,5 +555,5 @@ CommonRead(interp, tif, format, imageHan if (!TIFFReadRGBAImage(tif, w, h, raster, 0) || errorMessage) { - TkimgTIFFfree (raster); + _TIFFfree (raster); if (errorMessage) { Tcl_AppendResult(interp, errorMessage, (char *) NULL); -@@ -663,5 +572,5 @@ +@@ -663,5 +572,5 @@ CommonRead(interp, tif, format, imageHan } - TkimgTIFFfree (raster); + _TIFFfree (raster); TIFFClose(tif); return result; -@@ -676,5 +585,4 @@ - int result, comp; +@@ -674,7 +583,6 @@ static int StringWrite( + ) { + TIFF *tif; +- int result, comp; ++ int result, comp, length; tkimg_MFile handle; - char *tempFileName = NULL, tempFileNameBuffer[256]; Tcl_DString dstring; const char *mode; -@@ -686,14 +594,9 @@ +@@ -686,14 +594,9 @@ static int StringWrite( } - if (TIFFClientOpen) { @@ -246,7 +249,7 @@ + sizeString, mapDummy, unMapDummy); result = CommonWrite(interp, tif, comp, blockPtr); -@@ -701,7 +604,4 @@ +@@ -701,7 +604,4 @@ static int StringWrite( if (result != TCL_OK) { - if (tempFileName) { @@ -254,7 +257,7 @@ - } Tcl_AppendResult(interp, errorMessage, (char *) NULL); ckfree(errorMessage); -@@ -710,29 +610,7 @@ +@@ -710,29 +610,8 @@ static int StringWrite( } - if (tempFileName) { @@ -282,12 +285,13 @@ - tkimg_Write(&handle, Tcl_DStringValue(&dstring), length); - Tcl_DStringFree(&dstring); - } ++ length = handle.length; + tkimg_WriteInit(&data, &handle); -+ tkimg_Write(&handle, Tcl_DStringValue(&dstring), handle.length); ++ tkimg_Write(&handle, Tcl_DStringValue(&dstring), length); + Tcl_DStringFree(&dstring); tkimg_Putc(IMG_DONE, &handle); if (result == TCL_OK) { -@@ -954,36 +832,2 @@ +@@ -954,36 +833,2 @@ CommonWrite(interp, tif, comp, blockPtr) return TCL_OK; } -