summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2024-05-13 15:41:44 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2024-05-13 15:41:44 (GMT)
commit444e06f208e9503a7e93cd68a51ed73c3c82298b (patch)
tree5b346cf1401c23c69c43d84a1eb6986e442c7dfd /unix/tclUnixFile.c
parent6b9279d4f7c2ab12d40ffbce3629b8c79bc94136 (diff)
downloadtcl-444e06f208e9503a7e93cd68a51ed73c3c82298b.zip
tcl-444e06f208e9503a7e93cd68a51ed73c3c82298b.tar.gz
tcl-444e06f208e9503a7e93cd68a51ed73c3c82298b.tar.bz2
Clean up a lot of small whitespace issues
This is the dullest commit ever. Sorry.
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c60
1 files changed, 37 insertions, 23 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 444c73f..95a0d9e 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -155,9 +155,11 @@ TclpFindExecutable(
#endif
{
encoding = Tcl_GetEncoding(NULL, NULL);
- Tcl_ExternalToUtfDStringEx(NULL, encoding, name, TCL_INDEX_NONE, TCL_ENCODING_PROFILE_TCL8, &utfName, NULL);
+ Tcl_ExternalToUtfDStringEx(NULL, encoding, name, TCL_INDEX_NONE,
+ TCL_ENCODING_PROFILE_TCL8, &utfName, NULL);
TclSetObjNameOfExecutable(
- Tcl_NewStringObj(Tcl_DStringValue(&utfName), TCL_INDEX_NONE), encoding);
+ Tcl_NewStringObj(Tcl_DStringValue(&utfName), TCL_INDEX_NONE),
+ encoding);
Tcl_DStringFree(&utfName);
goto done;
}
@@ -192,10 +194,11 @@ TclpFindExecutable(
Tcl_DStringFree(&nameString);
encoding = Tcl_GetEncoding(NULL, NULL);
- Tcl_ExternalToUtfDStringEx(NULL, encoding, Tcl_DStringValue(&buffer), TCL_INDEX_NONE,
- TCL_ENCODING_PROFILE_TCL8, &utfName, NULL);
+ Tcl_ExternalToUtfDStringEx(NULL, encoding, Tcl_DStringValue(&buffer),
+ TCL_INDEX_NONE, TCL_ENCODING_PROFILE_TCL8, &utfName, NULL);
TclSetObjNameOfExecutable(
- Tcl_NewStringObj(Tcl_DStringValue(&utfName), TCL_INDEX_NONE), encoding);
+ Tcl_NewStringObj(Tcl_DStringValue(&utfName), TCL_INDEX_NONE),
+ encoding);
Tcl_DStringFree(&utfName);
done:
@@ -308,7 +311,8 @@ TclpMatchInDirectory(
* Now open the directory for reading and iterate over the contents.
*/
- if (Tcl_UtfToExternalDStringEx(interp, NULL, dirName, TCL_INDEX_NONE, 0, &ds, NULL) != TCL_OK) {
+ if (Tcl_UtfToExternalDStringEx(interp, NULL, dirName, TCL_INDEX_NONE,
+ 0, &ds, NULL) != TCL_OK) {
Tcl_DStringFree(&dsOrig);
Tcl_DStringFree(&ds);
Tcl_DecrRefCount(fileNamePtr);
@@ -324,7 +328,7 @@ TclpMatchInDirectory(
return TCL_OK;
}
- d = TclOSopendir(native); /* INTL: Native. */
+ d = TclOSopendir(native); /* INTL: Native. */
if (d == NULL) {
Tcl_DStringFree(&ds);
if (interp != NULL) {
@@ -378,8 +382,8 @@ TclpMatchInDirectory(
* and pattern. If so, add the file to the result.
*/
- if (Tcl_ExternalToUtfDStringEx(interp, NULL, entryPtr->d_name, TCL_INDEX_NONE,
- 0, &utfDs, NULL) != TCL_OK) {
+ if (Tcl_ExternalToUtfDStringEx(interp, NULL, entryPtr->d_name,
+ TCL_INDEX_NONE, 0, &utfDs, NULL) != TCL_OK) {
matchResult = -1;
break;
}
@@ -389,7 +393,8 @@ TclpMatchInDirectory(
if (types != NULL) {
Tcl_DStringSetLength(&ds, nativeDirLen);
- native = Tcl_DStringAppend(&ds, entryPtr->d_name, TCL_INDEX_NONE);
+ native = Tcl_DStringAppend(&ds, entryPtr->d_name,
+ TCL_INDEX_NONE);
matchResult = NativeMatchType(interp, native,
entryPtr->d_name, types);
typeOk = (matchResult == 1);
@@ -438,10 +443,10 @@ TclpMatchInDirectory(
static int
NativeMatchType(
- Tcl_Interp *interp, /* Interpreter to receive errors. */
- const char *nativeEntry, /* Native path to check. */
- const char *nativeName, /* Native filename to check. */
- Tcl_GlobTypeData *types) /* Type description to match against. */
+ Tcl_Interp *interp, /* Interpreter to receive errors. */
+ const char *nativeEntry, /* Native path to check. */
+ const char *nativeName, /* Native filename to check. */
+ Tcl_GlobTypeData *types) /* Type description to match against. */
{
Tcl_StatBuf buf;
@@ -611,7 +616,8 @@ TclpGetUserHome(
Tcl_DString ds;
const char *native;
- if (Tcl_UtfToExternalDStringEx(NULL, NULL, name, TCL_INDEX_NONE, 0, &ds, NULL) != TCL_OK) {
+ if (Tcl_UtfToExternalDStringEx(NULL, NULL, name, TCL_INDEX_NONE, 0, &ds,
+ NULL) != TCL_OK) {
Tcl_DStringFree(&ds);
return NULL;
}
@@ -623,7 +629,8 @@ TclpGetUserHome(
if (pwPtr == NULL) {
return NULL;
}
- if (Tcl_ExternalToUtfDStringEx(NULL, NULL, pwPtr->pw_dir, TCL_INDEX_NONE, 0, bufferPtr, NULL) != TCL_OK) {
+ if (Tcl_ExternalToUtfDStringEx(NULL, NULL, pwPtr->pw_dir, TCL_INDEX_NONE,
+ 0, bufferPtr, NULL) != TCL_OK) {
return NULL;
} else {
return Tcl_DStringValue(bufferPtr);
@@ -805,7 +812,8 @@ TclpGetCwd(
}
return NULL;
}
- if (Tcl_ExternalToUtfDStringEx(interp, NULL, buffer, TCL_INDEX_NONE, 0, bufferPtr, NULL) != TCL_OK) {
+ if (Tcl_ExternalToUtfDStringEx(interp, NULL, buffer, TCL_INDEX_NONE, 0,
+ bufferPtr, NULL) != TCL_OK) {
return NULL;
}
return Tcl_DStringValue(bufferPtr);
@@ -843,7 +851,8 @@ TclpReadlink(
const char *native;
Tcl_DString ds;
- if (Tcl_UtfToExternalDStringEx(NULL, NULL, path, TCL_INDEX_NONE, 0, &ds, NULL) != TCL_OK) {
+ if (Tcl_UtfToExternalDStringEx(NULL, NULL, path, TCL_INDEX_NONE, 0, &ds,
+ NULL) != TCL_OK) {
Tcl_DStringFree(&ds);
return NULL;
}
@@ -855,7 +864,8 @@ TclpReadlink(
return NULL;
}
- if (Tcl_ExternalToUtfDStringEx(NULL, NULL, link, length, 0, linkPtr, NULL) == TCL_OK) {
+ if (Tcl_ExternalToUtfDStringEx(NULL, NULL, link, length, 0, linkPtr,
+ NULL) == TCL_OK) {
return Tcl_DStringValue(linkPtr);
}
#endif /* !DJGPP */
@@ -990,7 +1000,8 @@ TclpObjLink(
return NULL;
}
target = TclGetStringFromObj(transPtr, &length);
- if (Tcl_UtfToExternalDStringEx(NULL, NULL, target, length, 0, &ds, NULL) != TCL_OK) {
+ if (Tcl_UtfToExternalDStringEx(NULL, NULL, target, length, 0, &ds,
+ NULL) != TCL_OK) {
Tcl_DStringFree(&ds);
return NULL;
}
@@ -1024,12 +1035,14 @@ TclpObjLink(
}
Tcl_DecrRefCount(transPtr);
- length = readlink((const char *)Tcl_FSGetNativePath(pathPtr), link, sizeof(link));
+ length = readlink((const char *)Tcl_FSGetNativePath(pathPtr), link,
+ sizeof(link));
if (length < 0) {
return NULL;
}
- if (Tcl_ExternalToUtfDStringEx(NULL, NULL, link, (size_t)length, 0, &ds, NULL) != TCL_OK) {
+ if (Tcl_ExternalToUtfDStringEx(NULL, NULL, link, (size_t)length, 0,
+ &ds, NULL) != TCL_OK) {
return NULL;
}
linkPtr = Tcl_DStringToObj(&ds);
@@ -1096,7 +1109,8 @@ TclpNativeToNormalized(
{
Tcl_DString ds;
- Tcl_ExternalToUtfDStringEx(NULL, NULL, (const char *) clientData, TCL_INDEX_NONE, TCL_ENCODING_PROFILE_TCL8, &ds, NULL);
+ Tcl_ExternalToUtfDStringEx(NULL, NULL, (const char *) clientData,
+ TCL_INDEX_NONE, TCL_ENCODING_PROFILE_TCL8, &ds, NULL);
return Tcl_DStringToObj(&ds);
}