summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2020-06-23 19:46:58 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2020-06-23 19:46:58 (GMT)
commit0fdcaa049e07325d3f3890235edd399fcd238311 (patch)
tree08086ba0fc4f1b288f59616020618d250d9d2918 /generic
parent66ac6b6c7081489c23289749ded3ba20919f1ea0 (diff)
downloadtk-0fdcaa049e07325d3f3890235edd399fcd238311.zip
tk-0fdcaa049e07325d3f3890235edd399fcd238311.tar.gz
tk-0fdcaa049e07325d3f3890235edd399fcd238311.tar.bz2
TIP529 image metadata: make compile on MS-VC6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkImgPNG.c6
-rw-r--r--generic/tkImgSVGnano.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index 852bdf3..91eb393 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -3557,7 +3557,7 @@ WriteExtraChunks(
{
return TCL_ERROR;
}
- PPUx = (unsigned long)round(DPIValue / 0.0254);
+ PPUx = (unsigned long)floor(DPIValue / 0.0254+0.5);
if (aspectObj == NULL) {
PPUy = PPUx;
}
@@ -3576,9 +3576,9 @@ WriteExtraChunks(
if (DPIObj == NULL) {
unitSpecifier = 0;
PPUx = 65536;
- PPUy = (unsigned long)round(65536.0 * aspectValue);
+ PPUy = (unsigned long)floor(65536.0 * aspectValue+0.5);
} else {
- PPUy = (unsigned long)round(DPIValue * aspectValue / 0.0254);
+ PPUy = (unsigned long)floor(DPIValue * aspectValue / 0.0254+0.5);
}
}
if (DPIObj != NULL || aspectObj != NULL) {
diff --git a/generic/tkImgSVGnano.c b/generic/tkImgSVGnano.c
index f82a285..c4eceb0 100644
--- a/generic/tkImgSVGnano.c
+++ b/generic/tkImgSVGnano.c
@@ -234,10 +234,11 @@ FileMatchSVG(
{
Tcl_Obj *dataObj;
NSVGimage *nsvgImage;
- (void)fileName;
serializedHeader *serializedHeaderPtr;
optionsStruct options;
+ (void)fileName;
+
/*
* Parse the options. Unfortunately, any error can not be returned.
*/