summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-27 21:50:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-06-27 21:50:59 (GMT)
commitf160f717e45f319152e2f8a217fbf4758bed5eae (patch)
treed50ee069b257173bdc04fb85ae14a1abe24ae7cc /generic/tclFileName.c
parent0a9d52fe0baac8abc61494f6bf379616535977fe (diff)
parent7bd797112eda2ff80a3e6be08a841633e8d57443 (diff)
downloadtcl-f160f717e45f319152e2f8a217fbf4758bed5eae.zip
tcl-f160f717e45f319152e2f8a217fbf4758bed5eae.tar.gz
tcl-f160f717e45f319152e2f8a217fbf4758bed5eae.tar.bz2
Merge 8.7. Random indent fixes
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r--generic/tclFileName.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index c99244c..b15e87f 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -390,50 +390,50 @@ TclpGetNativePathType(
switch (tclPlatform) {
case TCL_PLATFORM_UNIX: {
- const char *origPath = path;
-
- /*
- * Paths that begin with / are absolute.
- */
-
- if (path[0] == '/') {
- ++path;
- /*
- * Check for "//" network path prefix
- */
- if ((*path == '/') && path[1] && (path[1] != '/')) {
- path += 2;
- while (*path && *path != '/') {
- ++path;
- }
- }
- if (driveNameLengthPtr != NULL) {
- /*
- * We need this addition in case the "//" code was used.
- */
-
- *driveNameLengthPtr = (path - origPath);
- }
- } else {
- type = TCL_PATH_RELATIVE;
- }
- break;
+ const char *origPath = path;
+
+ /*
+ * Paths that begin with / are absolute.
+ */
+
+ if (path[0] == '/') {
+ ++path;
+ /*
+ * Check for "//" network path prefix
+ */
+ if ((*path == '/') && path[1] && (path[1] != '/')) {
+ path += 2;
+ while (*path && *path != '/') {
+ ++path;
+ }
+ }
+ if (driveNameLengthPtr != NULL) {
+ /*
+ * We need this addition in case the "//" code was used.
+ */
+
+ *driveNameLengthPtr = (path - origPath);
+ }
+ } else {
+ type = TCL_PATH_RELATIVE;
+ }
+ break;
}
case TCL_PLATFORM_WINDOWS: {
- Tcl_DString ds;
- const char *rootEnd;
-
- Tcl_DStringInit(&ds);
- rootEnd = ExtractWinRoot(path, &ds, 0, &type);
- if ((rootEnd != path) && (driveNameLengthPtr != NULL)) {
- *driveNameLengthPtr = rootEnd - path;
- if (driveNameRef != NULL) {
- *driveNameRef = Tcl_DStringToObj(&ds);
- Tcl_IncrRefCount(*driveNameRef);
- }
- }
- Tcl_DStringFree(&ds);
- break;
+ Tcl_DString ds;
+ const char *rootEnd;
+
+ Tcl_DStringInit(&ds);
+ rootEnd = ExtractWinRoot(path, &ds, 0, &type);
+ if ((rootEnd != path) && (driveNameLengthPtr != NULL)) {
+ *driveNameLengthPtr = rootEnd - path;
+ if (driveNameRef != NULL) {
+ *driveNameRef = Tcl_DStringToObj(&ds);
+ Tcl_IncrRefCount(*driveNameRef);
+ }
+ }
+ Tcl_DStringFree(&ds);
+ break;
}
}
return type;
@@ -655,8 +655,8 @@ SplitUnixPath(
length = path - elementStart;
if (length > 0) {
Tcl_Obj *nextElt;
- nextElt = Tcl_NewStringObj(elementStart, length);
- Tcl_ListObjAppendElement(NULL, result, nextElt);
+ nextElt = Tcl_NewStringObj(elementStart, length);
+ Tcl_ListObjAppendElement(NULL, result, nextElt);
}
if (*path++ == '\0') {
break;