From 8f1c4eb009d892fae50c3c0036a6215a9a74a826 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 7 Feb 2021 12:41:55 +0000 Subject: Remove superfluous .AS call in CrtPhImgFmt.3, and fix typos and indentation. --- doc/CrtPhImgFmt.3 | 19 ++++++++----------- doc/photo.n | 10 +++++----- generic/tkImgGIF.c | 8 ++++---- generic/tkImgPNG.c | 10 +++++----- generic/tkImgPhoto.c | 5 ++--- 5 files changed, 24 insertions(+), 28 deletions(-) diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3 index 0b825e9..c7accdb 100644 --- a/doc/CrtPhImgFmt.3 +++ b/doc/CrtPhImgFmt.3 @@ -24,10 +24,7 @@ Tk_CreatePhotoImageFormat \- define new file format for photo images .sp \fBTk_CreatePhotoImageFormat\fR(\fIformatPtr\fR) .SH ARGUMENTS -.VS 8.7 .AS "const Tk_PhotoImageFormatVersion3" *formatVersion3Ptr -.VE 8.7 -.AS "const Tk_PhotoImageFormat" *formatPtr .VS 8.7 .AP "const Tk_PhotoImageFormatVersion3" *formatVersion3Ptr in Structure that defines the new file format including metadata functionality. @@ -50,7 +47,7 @@ image configuration option or the \fB\-format\fR option to the \fBread\fR and \fBwrite\fR photo image subcommands. .PP The alternate version 2 function \fBTk_CreatePhotoImageFormat\fR has -identical functionality, but does not allow to handler to get or return +identical functionality, but does not allow the handler to get or return the metadata dictionary of the image. It is described in section \fBVERSION 2 INTERFACE\fR below. .PP @@ -126,7 +123,7 @@ respectively, and return 1. Otherwise it should return 0. .PP \fIformatPtr->stringMatchProc\fR provides the address of a procedure for Tk to call when it is searching for an image file format handler -for suitable for reading data from a given string. +suitable for reading data from a given string. \fIformatPtr->stringMatchProc\fR must match the following prototype: .CS typedef int \fBTk_ImageStringMatchProcVersion3\fR( @@ -300,7 +297,7 @@ image formats may feature aspect and no resolution value. .RE .SS "METADATA INPUT" .PP -Each driver function gets a tcl object pointer \fBmetadataIn\fR as +Each driver function gets a Tcl object pointer \fBmetadataIn\fR as parameter. This parameter serves to input a metadata dict to the driver function. It may be NULL to flag that the metadata dict is empty. @@ -332,12 +329,12 @@ this purpose. .PP The image match and read driver functions may set keys in a prepared matadata dict to return them. -Those functions get a tcl object pointer \fBmetadataOut\fR as +Those functions get a Tcl object pointer \fBmetadataOut\fR as parameter. metadataOut may be NULL to indicate, that no metadata return is -attended (put, read subcommands). -metadataOut is initialized to an empty unshared dict object if -metadata return is attended (image create command, configure +attended(\fBput\fR, \fBread\fR subcommands). +\fBmetadataOut\fR is initialized to an empty unshared dict object if +metadata return is attended (\fBimage create\fR command, \fBconfigure\fR subcommand). The driver may set dict keys in this object to return metadata. If a match function succeeds, the metadataOut pointer is passed to the @@ -352,7 +349,7 @@ if (NULL != metadataOut) { The metadata keys returned by the driver are merged into the present metadata property of the image or into the metadata dict given by the \fB\-metadata\fR command line option. -On the script level, the command \fBimage create\fR and the +At the script level, the command \fBimage create\fR and the \fBconfigure\fR method may return metadata from the driver. .PP Format string options or metadata keys may influence the creation of diff --git a/doc/photo.n b/doc/photo.n index c32e57f..f30039d 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -109,7 +109,7 @@ Set the metadata dictionary of the image. Additional keys may be set within the metadata dictionary of the image, if image data is processed due to a \fB\-file\fR or \fB\-data\fR options and the driver outputs any metadata keys. -See section \fBMETADATA DICT\fR below. +See section \fBMETADATA DICTIONARY\fR below. .VE 8.7 .TP \fB\-palette \fIpalette-spec\fR @@ -307,7 +307,7 @@ information. All pixel data will be transformed into grayscale. . Image format handler may use metadata to be included in the returned data string. -The specified metadata is passed to the driver for inclusion in the +The specified \fImetadata\fR is passed to the driver for inclusion in the data. If no \fB\-metadata\fR option is given, the current metadata of the image is used. @@ -349,7 +349,7 @@ word. Also, instead of braces, double quotes may be used for quoting. .TP \fB\-metadata\fR \fImetadata\fR . -A specified metadata is passed to the image format driver when interpreting +A specified \fImetadata\fR is passed to the image format driver when interpreting the data. Note: The current metadata of the image is not passed to the format driver and is not changed by the command. @@ -403,7 +403,7 @@ image in the image file. .TP \fB\-metadata\fR \fImetadata\fR . -A specified metadata is passed to the image format driver when interpreting +A specified \fImetadata\fR is passed to the image format driver when interpreting the data. Note: The current metadata of the image is not passed to the format driver and is not changed by the command. @@ -506,7 +506,7 @@ information. All pixel data will be transformed into grayscale. \fB\-metadata\fR \fBmetadata\fR . Image format handler may use metadata to be included in the written file. -The specified metadata is passed to the driver for inclusion in the +The specified \fImetadata\fR is passed to the driver for inclusion in the file. If no \fB\-metadata\fR option is given, the current metadata of the image is used. diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index 588ca97..8702970 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -356,10 +356,10 @@ static void FlushChar(GIFState_t *statePtr); static int FileMatchGIF( - TCL_UNUSED(Tcl_Interp *), /* not used */ + TCL_UNUSED(Tcl_Interp *), /* not used */ Tcl_Channel chan, /* The image file, open for reading. */ TCL_UNUSED(const char *), /* The name of the image file. */ - TCL_UNUSED(Tcl_Obj *), /* User-specified format object, or NULL. */ + TCL_UNUSED(Tcl_Obj *), /* User-specified format object, or NULL. */ TCL_UNUSED(Tcl_Obj *), /* metadata input, may be NULL */ int *widthPtr, int *heightPtr, /* The dimensions of the image are returned @@ -1181,8 +1181,8 @@ ReadImage( Tcl_Channel chan, int len, int rows, unsigned char cmap[MAXCOLORMAPSIZE][4], - TCL_UNUSED(int), - TCL_UNUSED(int), + TCL_UNUSED(int), + TCL_UNUSED(int), int interlace, int transparent) { diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index 5e802d5..5fd741c 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.c @@ -2818,7 +2818,7 @@ FileMatchPNG( Tcl_Interp *interp, /* Interpreter to use for reporting errors. */ Tcl_Channel chan, /* The image file, open for reading. */ TCL_UNUSED(const char *), /* The name of the image file. */ - TCL_UNUSED(Tcl_Obj *), /* User-specified format object, or NULL. */ + TCL_UNUSED(Tcl_Obj *), /* User-specified format object, or NULL. */ TCL_UNUSED(Tcl_Obj *), /* metadata input, may be NULL */ int *widthPtr, int *heightPtr, /* The dimensions of the image are returned @@ -2870,7 +2870,7 @@ FileReadPNG( Tk_PhotoHandle imageHandle, /* The photo image to write into. */ int destX, int destY, /* Coordinates of top-left pixel in photo * image to be written to. */ - TCL_UNUSED(int), /* Dimensions of block of photo image to be + TCL_UNUSED(int), /* Dimensions of block of photo image to be * written to. */ TCL_UNUSED(int), TCL_UNUSED(int), /* Coordinates of top-left pixel to be used in @@ -2925,7 +2925,7 @@ static int StringMatchPNG( Tcl_Interp *interp, /* Interpreter to use for reporting errors. */ Tcl_Obj *pObjData, /* the object containing the image data */ - TCL_UNUSED(Tcl_Obj *), /* the image format object, or NULL */ + TCL_UNUSED(Tcl_Obj *), /* the image format object, or NULL */ TCL_UNUSED(Tcl_Obj *), /* metadata input, may be NULL */ int *widthPtr, /* where to put the string width */ int *heightPtr, /* where to put the string height */ @@ -2974,7 +2974,7 @@ StringReadPNG( TCL_UNUSED(Tcl_Obj *), /* metadata input, may be NULL */ Tk_PhotoHandle imageHandle, /* the image to write this data into */ int destX, int destY, /* The rectangular region of the */ - TCL_UNUSED(int), /* image to copy */ + TCL_UNUSED(int), /* image to copy */ TCL_UNUSED(int), TCL_UNUSED(int), TCL_UNUSED(int), @@ -3514,7 +3514,7 @@ WriteExtraChunks( * Add a pHYs chunk if there is metadata for DPI and/or aspect * aspect = PPUy / PPUx * DPI = PPUx * 0.0254 - * The physical chunc consists of: + * The physical chunk consists of: * - Points per meter in x direction (32 bit) * - Points per meter in x direction (32 bit) * - Unit specifier: 0: no unit (only aspect), 1: Points per meter diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 37977f1..476149d 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -2090,7 +2090,7 @@ ImgPhotoConfigureModel( } if (metadataInObj) { /* - * make -metadata a dict. + * Make -metadata a dict. * Take also empty metadatas as this may be a sign to replace * existing metadata. */ @@ -2246,7 +2246,6 @@ ImgPhotoConfigureModel( goto errorExit; } } else { - if (imageFormatVersion3->stringReadProc(interp, tempdata, tempformat, modelPtr->metadata, (Tk_PhotoHandle) modelPtr, 0, 0, imageWidth, imageHeight, 0, 0, metadataOutObj) != TCL_OK) { @@ -2866,7 +2865,7 @@ if (formatPtr == NULL) { } /* - * Check if driver has shared or changed the metadata tcl object. + * Check if driver has shared or changed the metadata Tcl object. * In this case, release and recreate it. */ -- cgit v0.12