From e4b728916c3a71475a32e03e63d7c8a2f1b06be7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 1 Sep 2018 22:13:20 +0000 Subject: Delete unused variables, and eol-spacing --- generic/tkButton.c | 2 +- macosx/tkMacOSXKeyEvent.c | 2 -- macosx/tkMacOSXScrlbr.c | 24 ++++++++++++------------ win/nmakehlp.c | 8 ++++---- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/generic/tkButton.c b/generic/tkButton.c index e114a51..fc2c7ec 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -1728,7 +1728,7 @@ ButtonTextVarProc( } return NULL; } - + /* * If the variable is unset, then immediately recreate it unless the whole * interpreter is going away. diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index b6bd83c..ba885d1 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -244,8 +244,6 @@ unsigned short releaseCode; { int i, len = [(NSString *)aString length]; XEvent xEvent; - TkWindow *winPtr = TkMacOSXGetTkWindow([self window]); - Tk_Window tkwin = (Tk_Window) winPtr; if (NS_KEYLOG) NSLog (@"insertText '%@'\tlen = %d", aString, len); diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 6622c55..a8018a5 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -219,7 +219,7 @@ TkpDisplayScrollbar( */ - + extern void TkpComputeScrollbarGeometry( register TkScrollbar *scrollPtr) @@ -228,13 +228,13 @@ TkpComputeScrollbarGeometry( { /* - * Using code from tkUnixScrlbr.c because Unix scroll bindings are - * driving the display at the script level. All the Mac scrollbar - * has to do is re-draw itself. - */ - + * Using code from tkUnixScrlbr.c because Unix scroll bindings are + * driving the display at the script level. All the Mac scrollbar + * has to do is re-draw itself. + */ + int width, fieldLength; - + if (scrollPtr->highlightWidth < 0) { scrollPtr->highlightWidth = 0; } @@ -248,15 +248,15 @@ TkpComputeScrollbarGeometry( if (fieldLength < 0) { fieldLength = 0; } - scrollPtr->sliderFirst = fieldLength*scrollPtr->firstFraction; + scrollPtr->sliderFirst = fieldLength*scrollPtr->firstFraction; scrollPtr->sliderLast = fieldLength*scrollPtr->lastFraction; - + /* * Adjust the slider so that some piece of it is always displayed in the * scrollbar and so that it has at least a minimal width (so it can be * grabbed with the mouse). */ - + if (scrollPtr->sliderFirst > fieldLength - MIN_SLIDER_LENGTH) { scrollPtr->sliderFirst = fieldLength - MIN_SLIDER_LENGTH; } @@ -271,13 +271,13 @@ TkpComputeScrollbarGeometry( } scrollPtr->sliderFirst += scrollPtr->arrowLength + scrollPtr->inset; scrollPtr->sliderLast += scrollPtr->arrowLength + scrollPtr->inset; - + /* * Register the desired geometry for the window (leave enough space for * the two arrows plus a minimum-size slider, plus border around the whole * window, if any). Then arrange for the window to be redisplayed. */ - + if (scrollPtr->vertical) { Tk_GeometryRequest(scrollPtr->tkwin, scrollPtr->width + 2*scrollPtr->inset, diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 025bb99..4e3d792 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -739,7 +739,7 @@ static int LocateDependencyHelper(const char *dir, const char *keypath) #if 0 /* This function is not available in Visual C++ 6 */ /* * Use numerics 0 -> FindExInfoStandard, - * 1 -> FindExSearchLimitToDirectories, + * 1 -> FindExSearchLimitToDirectories, * as these are not defined in Visual C++ 6 */ hSearch = FindFirstFileEx(path, 0, &finfo, 1, NULL, 0); @@ -754,7 +754,7 @@ static int LocateDependencyHelper(const char *dir, const char *keypath) do { int sublen; /* - * We need to check it is a directory despite the + * We need to check it is a directory despite the * FindExSearchLimitToDirectories in the above call. See SDK docs */ if ((finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) @@ -785,7 +785,7 @@ static int LocateDependencyHelper(const char *dir, const char *keypath) * that is used to confirm it is the correct directory. * The search path for the package directory is currently only * the parent and grandparent of the current working directory. - * If found, the command prints + * If found, the command prints * name_DIRPATH= * and returns 0. If not found, does not print anything and returns 1. */ @@ -793,7 +793,7 @@ static int LocateDependency(const char *keypath) { int i, ret; static char *paths[] = {"..", "..\\..", "..\\..\\.."}; - + for (i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) { ret = LocateDependencyHelper(paths[i], keypath); if (ret == 0) -- cgit v0.12