summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCmdMZ.c23
-rw-r--r--unix/tclUnixTime.c2
-rw-r--r--win/nmakehlp.c14
-rwxr-xr-xwin/tclWinFile.c10
-rw-r--r--win/tclWinLoad.c2
-rw-r--r--win/tclWinTest.c2
-rw-r--r--win/tclWinTime.c22
7 files changed, 37 insertions, 38 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 1112578..29527c1 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -2392,7 +2392,7 @@ StringRplcCmd(
Tcl_Obj *resultPtr;
/*
- * We are re-fetching in case the string argument is same value as
+ * We are re-fetching in case the string argument is same value as
* an index argument, and shimmering cost us our ustring.
*/
@@ -4274,8 +4274,8 @@ Tcl_TimeObjCmd(
* Tcl_TimeRateObjCmd --
*
* This object-based procedure is invoked to process the "timerate" Tcl
- * command.
- * This is similar to command "time", except the execution limited by
+ * command.
+ * This is similar to command "time", except the execution limited by
* given time (in milliseconds) instead of repetition count.
*
* Example:
@@ -4297,8 +4297,7 @@ Tcl_TimeRateObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- static
- double measureOverhead = 0; /* global measure-overhead */
+ static double measureOverhead = 0; /* global measure-overhead */
double overhead = -1; /* given measure-overhead */
register Tcl_Obj *objPtr;
register int result, i;
@@ -4386,13 +4385,13 @@ usage:
Tcl_Obj *clobjv[6];
Tcl_WideInt maxCalTime = 5000;
double lastMeasureOverhead = measureOverhead;
-
- clobjv[0] = objv[0];
+
+ clobjv[0] = objv[0];
i = 1;
if (direct) {
clobjv[i++] = direct;
}
- clobjv[i++] = objPtr;
+ clobjv[i++] = objPtr;
/* reset last measurement overhead */
measureOverhead = (double)0;
@@ -4409,7 +4408,7 @@ usage:
i--;
clobjv[i++] = calibrate;
- clobjv[i++] = objPtr;
+ clobjv[i++] = objPtr;
/* set last measurement overhead to max */
measureOverhead = (double)UWIDE_MAX;
@@ -4510,7 +4509,7 @@ usage:
maxcnt = 0;
result = TCL_OK;
}
-
+
/* don't check time up to threshold */
if (--threshold > 0) continue;
@@ -4580,7 +4579,7 @@ usage:
if (overhead > 0) {
/* estimate the time of overhead (microsecs) */
Tcl_WideUInt curOverhead = overhead * count;
- if (middle > curOverhead) {
+ if ((Tcl_WideUInt)middle > curOverhead) {
middle -= curOverhead;
} else {
middle = 0;
@@ -4609,7 +4608,7 @@ usage:
}
objs[2] = Tcl_NewWideIntObj(count); /* iterations */
-
+
/* calculate speed as rate (count) per sec */
if (!middle) middle++; /* +1 ms, just to avoid divide by zero */
if (count < (WIDE_MAX / 1000000)) {
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 375e366..2a30386 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -248,7 +248,7 @@ TclpWideClicksToNanoseconds(
*
* TclpWideClickInMicrosec --
*
- * This procedure return scale to convert click values from the
+ * This procedure return scale to convert click values from the
* TclpGetWideClicks native resolution to microsecond resolution
* and back.
*
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index b759020..c21de63 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -686,10 +686,10 @@ SubstituteFile(
BOOL FileExists(LPCTSTR szPath)
{
#ifndef INVALID_FILE_ATTRIBUTES
- #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+ #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif
DWORD pathAttr = GetFileAttributes(szPath);
- return (pathAttr != INVALID_FILE_ATTRIBUTES &&
+ return (pathAttr != INVALID_FILE_ATTRIBUTES &&
!(pathAttr & FILE_ATTRIBUTE_DIRECTORY));
}
@@ -740,7 +740,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);
@@ -755,7 +755,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)
@@ -786,15 +786,15 @@ 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=<full path of located directory>
* and returns 0. If not found, does not print anything and returns 1.
*/
static int LocateDependency(const char *keypath)
{
int i, ret;
- static char *paths[] = {"..", "..\\..", "..\\..\\.."};
-
+ static const char *paths[] = {"..", "..\\..", "..\\..\\.."};
+
for (i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) {
ret = LocateDependencyHelper(paths[i], keypath);
if (ret == 0)
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index b9787c7..809bcf0 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1460,9 +1460,9 @@ TclpGetUserHome(
domain = Tcl_UtfFindFirst(name, '@');
if (domain == NULL) {
const char *ptr;
-
+
/* no domain - firstly check it's the current user */
- if ( (ptr = TclpGetUserName(&ds)) != NULL
+ if ( (ptr = TclpGetUserName(&ds)) != NULL
&& strcasecmp(name, ptr) == 0
) {
/* try safest and fastest way to get current user home */
@@ -1485,7 +1485,7 @@ TclpGetUserHome(
Tcl_DStringInit(&ds);
wName = Tcl_UtfToUniCharDString(name, nameLen, &ds);
while (NetUserGetInfo(wDomain, wName, 1, (LPBYTE *) &uiPtr) != 0) {
- /*
+ /*
* user does not exists - if domain was not specified,
* try again using current domain.
*/
@@ -1600,7 +1600,7 @@ NativeAccess(
return 0;
}
- /*
+ /*
* If it's not a directory (assume file), do several fast checks:
*/
if (!(attr & FILE_ATTRIBUTE_DIRECTORY)) {
@@ -2031,7 +2031,7 @@ NativeStat(
*/
fileHandle = CreateFile(nativePath, GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL);
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index 2946ea2..69263e9 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -88,7 +88,7 @@ TclpDlopen(
Tcl_DString ds;
- /*
+ /*
* Remember the first error on load attempt to be used if the
* second load attempt below also fails.
*/
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index aa2c15a..30fc4b4 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -572,7 +572,7 @@ TestplatformChmod(
*/
if (set_readOnly == acl_readOnly_found || SetNamedSecurityInfoA(
- (LPSTR) nativePath, SE_FILE_OBJECT,
+ (LPSTR) nativePath, SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION /*| PROTECTED_DACL_SECURITY_INFORMATION*/,
NULL, NULL, newAcl, NULL) == ERROR_SUCCESS) {
res = 0;
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index d4e84ba..77924ee 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -257,7 +257,7 @@ TclpGetWideClicks(void)
/*
* The frequency of the performance counter is fixed at system boot and
- * is consistent across all processors. Therefore, the frequency need
+ * is consistent across all processors. Therefore, the frequency need
* only be queried upon application initialization.
*/
if (QueryPerformanceFrequency(&perfCounterFreq)) {
@@ -268,7 +268,7 @@ TclpGetWideClicks(void)
wideClick.perfCounter = 0;
wideClick.microsecsScale = 1;
}
-
+
wideClick.initialized = 1;
}
if (wideClick.perfCounter) {
@@ -289,7 +289,7 @@ TclpGetWideClicks(void)
*
* TclpWideClickInMicrosec --
*
- * This procedure return scale to convert wide click values from the
+ * This procedure return scale to convert wide click values from the
* TclpGetWideClicks native resolution to microsecond resolution
* and back.
*
@@ -328,7 +328,7 @@ TclpWideClickInMicrosec(void)
*----------------------------------------------------------------------
*/
-Tcl_WideInt
+Tcl_WideInt
TclpGetMicroseconds(void)
{
Tcl_WideInt usecSincePosixEpoch;
@@ -447,7 +447,7 @@ NativeCalc100NsTicks(
LONGLONG curCounterFreq,
LONGLONG curCounter
) {
- return fileTimeLastCall +
+ return fileTimeLastCall +
((curCounter - perfCounterLastCall) * 10000000 / curCounterFreq);
}
@@ -1065,7 +1065,7 @@ UpdateTimeEachSecond(void)
return;
}
QueryPerformanceCounter(&curPerfCounter);
-
+
lastFileTime.QuadPart = curFileTime.QuadPart;
/*
@@ -1133,7 +1133,7 @@ UpdateTimeEachSecond(void)
/* calculate new frequency and estimate drift to the next second */
vt1 = 20000000 + curFileTime.QuadPart;
driftFreq = (estFreq * 20000000 / (vt1 - vt0));
- /*
+ /*
* Avoid too large drifts (only half of the current difference),
* that allows also be more accurate (aspire to the smallest tdiff),
* so then we can prolong calibration interval by tdiff < 100000
@@ -1141,13 +1141,13 @@ UpdateTimeEachSecond(void)
driftFreq = timeInfo.curCounterFreq.QuadPart +
(driftFreq - timeInfo.curCounterFreq.QuadPart) / 2;
- /*
+ /*
* Average between estimated, 2 current and 5 drifted frequencies,
* (do the soft drifting as possible)
*/
estFreq = (estFreq + 2 * timeInfo.curCounterFreq.QuadPart + 5 * driftFreq) / 8;
}
-
+
/* Avoid too large discrepancy from nominal frequency */
if (estFreq > 1003*timeInfo.nominalFreq.QuadPart/1000) {
estFreq = 1003*timeInfo.nominalFreq.QuadPart/1000;
@@ -1156,9 +1156,9 @@ UpdateTimeEachSecond(void)
estFreq = 997*timeInfo.nominalFreq.QuadPart/1000;
vt0 = curFileTime.QuadPart;
} else if (vt0 != curFileTime.QuadPart) {
- /*
+ /*
* Be sure the clock ticks never backwards (avoid it by negative drifting)
- * just compare native time (in 100-ns) before and hereafter using
+ * just compare native time (in 100-ns) before and hereafter using
* new calibrated values) and do a small adjustment (short time freeze)
*/
LARGE_INTEGER newPerfCounter;