diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-25 21:27:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-06-25 21:27:04 (GMT) |
commit | fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8 (patch) | |
tree | 5bd30b34c8a4c32bbec36f3ad458b295430934e5 /generic | |
parent | a3129322d24fa7319ca3ad4ec44b37a5ab4f4ec0 (diff) | |
download | tk-fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8.zip tk-fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8.tar.gz tk-fdf8a62f8c24e498f5444a5a110fb51c3b01b8c8.tar.bz2 |
CONST -> const. Eliminate unnecessary type-casts and end-of-line spacing
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvPs.c | 2 | ||||
-rw-r--r-- | generic/tkCanvas.c | 4 | ||||
-rw-r--r-- | generic/tkPlace.c | 2 | ||||
-rw-r--r-- | generic/tkStyle.c | 2 | ||||
-rw-r--r-- | generic/tkText.c | 2 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 4 | ||||
-rw-r--r-- | generic/tkTextIndex.c | 18 | ||||
-rw-r--r-- | generic/tkWindow.c | 2 |
8 files changed, 18 insertions, 18 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index 2bfdcc5..4e41a2a 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -381,7 +381,7 @@ TkCanvPostscriptCmd( */ psInfo.chan = Tcl_GetChannel(interp, psInfo.channelName, &mode); - if (psInfo.chan == (Tcl_Channel) NULL) { + if (psInfo.chan == NULL) { result = TCL_ERROR; goto cleanup; } diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 414c6fb..4d260dc 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -698,7 +698,7 @@ Tk_CanvasObjCmd( canvasPtr->textInfo.cursorOn = 0; canvasPtr->insertOnTime = 0; canvasPtr->insertOffTime = 0; - canvasPtr->insertBlinkHandler = (Tcl_TimerToken) NULL; + canvasPtr->insertBlinkHandler = NULL; canvasPtr->xOrigin = canvasPtr->yOrigin = 0; canvasPtr->drawableXOrigin = canvasPtr->drawableYOrigin = 0; canvasPtr->bindingTable = NULL; @@ -5307,7 +5307,7 @@ CanvasFocusProc( } else { canvasPtr->textInfo.gotFocus = 0; canvasPtr->textInfo.cursorOn = 0; - canvasPtr->insertBlinkHandler = (Tcl_TimerToken) NULL; + canvasPtr->insertBlinkHandler = NULL; } EventuallyRedrawItem(canvasPtr, canvasPtr->textInfo.focusItemPtr); if (canvasPtr->highlightWidth > 0) { diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 7aa9b04..59b8a2b 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -616,7 +616,7 @@ ConfigureSlave( Tk_SavedOptions savedOptions; int mask; Slave *slavePtr; - Tk_Window masterWin = (Tk_Window) NULL; + Tk_Window masterWin = NULL; TkWindow *master; if (Tk_TopWinHierarchy(tkwin)) { diff --git a/generic/tkStyle.c b/generic/tkStyle.c index e7401df..d9299d1 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -1360,7 +1360,7 @@ Tk_GetStyle( "style \"%s\" doesn't exist", name)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "STYLE", name, NULL); } - return (Tk_Style) NULL; + return NULL; } stylePtr = Tcl_GetHashValue(entryPtr); diff --git a/generic/tkText.c b/generic/tkText.c index ab06089..7c62621 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -4927,7 +4927,7 @@ DumpLine( TkTextEmbWindow *ewPtr = &segPtr->body.ew; const char *pathname; - if (ewPtr->tkwin == (Tk_Window) NULL) { + if (ewPtr->tkwin == NULL) { pathname = ""; } else { pathname = Tk_PathName(ewPtr->tkwin); diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index fcefb9a..c848fd2 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -626,7 +626,7 @@ static void AsyncUpdateLineMetrics(ClientData clientData); static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync); static void AsyncUpdateYScrollbar(ClientData clientData); static int IsStartOfNotMergedLine(TkText *textPtr, - CONST TkTextIndex *indexPtr); + const TkTextIndex *indexPtr); /* * Result values returned by TextGetScrollInfoObj: @@ -6988,7 +6988,7 @@ FindDLine( static int IsStartOfNotMergedLine( TkText *textPtr, /* Widget record for text widget. */ - CONST TkTextIndex *indexPtr) /* Index to check. */ + const TkTextIndex *indexPtr) /* Index to check. */ { TkTextIndex indexPtr2; diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 582e1a8..7430197 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -40,9 +40,9 @@ static const char * StartEnd(TkText *textPtr, const char *string, static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr, TkText *textPtr, const char *string, TkTextIndex *indexPtr, int *canCachePtr); -static int IndexCountBytesOrdered(CONST TkText *textPtr, - CONST TkTextIndex *indexPtr1, - CONST TkTextIndex *indexPtr2); +static int IndexCountBytesOrdered(const TkText *textPtr, + const TkTextIndex *indexPtr1, + const TkTextIndex *indexPtr2); /* * The "textindex" Tcl_Obj definition: @@ -1636,9 +1636,9 @@ TkTextIndexForwChars( int TkTextIndexCountBytes( - CONST TkText *textPtr, - CONST TkTextIndex *indexPtr1, /* Index describing one location. */ - CONST TkTextIndex *indexPtr2) /* Index describing second location. */ + const TkText *textPtr, + const TkTextIndex *indexPtr1, /* Index describing one location. */ + const TkTextIndex *indexPtr2) /* Index describing second location. */ { int compare = TkTextIndexCmp(indexPtr1, indexPtr2); @@ -1653,11 +1653,11 @@ TkTextIndexCountBytes( static int IndexCountBytesOrdered( - CONST TkText *textPtr, - CONST TkTextIndex *indexPtr1, + const TkText *textPtr, + const TkTextIndex *indexPtr1, /* Index describing location of character from * which to count. */ - CONST TkTextIndex *indexPtr2) + const TkTextIndex *indexPtr2) /* Index describing location of last character * at which to stop the count. */ { diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 917d3bd..ee8e1a9 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -852,7 +852,7 @@ TkCreateMainWindow( * Create the basic TkWindow structure. */ - tkwin = CreateTopLevelWindow(interp, (Tk_Window) NULL, baseName, + tkwin = CreateTopLevelWindow(interp, NULL, baseName, screenName, /* flags */ 0); if (tkwin == NULL) { return NULL; |