Skip to content

Commit 2204677

Browse files
committed
functional names
1 parent eed2abd commit 2204677

File tree

13 files changed

+16
-16
lines changed

13 files changed

+16
-16
lines changed

+stdlib/canonical.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
e = p;
2727
end
2828

29-
if ~strlength(e) || (ispc && (startsWith(e, "\\") || startsWith(e, "//")))
29+
if ~strlength(e) || (ispc() && (startsWith(e, "\\") || startsWith(e, "//")))
3030
% UNC path is not canonicalized
3131
return
3232
end

+stdlib/drop_slash.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
s = stdlib.posix(p);
1212

13-
uncslash = ispc && startsWith(s, '//');
13+
uncslash = ispc() && startsWith(s, '//');
1414

1515
% drop repeated slashes inside string
1616
d = regexprep(s, '/+', '/');
@@ -21,7 +21,7 @@
2121
if uncslash
2222
d = '//';
2323
end
24-
elseif ~ispc || (L ~= 3 || ~strcmp(d, stdlib.root(s)))
24+
elseif ~ispc() || (L ~= 3 || ~strcmp(d, stdlib.root(s)))
2525
d = regexprep(d, '/$', '');
2626
end
2727

+stdlib/get_permissions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
if isfield(v, 'UserExecute') || isa(v, "matlab.io.UnixPermissions")
5252
if v.UserExecute, p(3) = 'x'; end
53-
elseif ispc && (isstruct(v) || isa(v, "matlab.io.WindowsPermissions"))
53+
elseif ispc() && (isstruct(v) || isa(v, "matlab.io.WindowsPermissions"))
5454
% on Windows, any readable file has executable permission
5555
if p(1) == 'r', p(3) = 'x'; end
5656
end

+stdlib/hard_link_count.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
if ~isempty(s)
1818
c = s.nlink;
1919
end
20-
elseif ispc || ~isfile(p)
20+
elseif ispc() || ~isfile(p)
2121
return
2222
else
2323
c = java.nio.file.Files.getAttribute(javaPathObject(p), "unix:nlink", javaLinkOption());

+stdlib/is_absolute.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
y = false;
1515

1616
L = strlength(p);
17-
if ~L || (ispc && L < 3)
17+
if ~L || (ispc() && L < 3)
1818
return
1919
end
2020

+stdlib/is_rosetta.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
function r = is_rosetta()
77
r = false;
88

9-
if ~ismac
9+
if ~ismac()
1010
return
1111
end
1212

@@ -19,6 +19,6 @@
1919

2020
%!assert(islogical(is_rosetta()))
2121
%!test
22-
%! if ~ismac
22+
%! if ~ismac()
2323
%! assert(!is_rosetta())
2424
%! endif

+stdlib/is_wsl.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
w = 0;
1010

11-
if isunix && ~ismac
11+
if isunix() && ~ismac()
1212
fid = fopen('/proc/version');
1313
if fid >= 1
1414
v = fscanf(fid, '%s');

+stdlib/iscygwin.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
y = false;
66

7-
if isunix && ~ismac
7+
if isunix() && ~ismac()
88
fid = fopen('/proc/version');
99
if fid < 0, return, end
1010
v = fscanf(fid,'%s');

+stdlib/join.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
b = stdlib.posix(base);
1111
o = stdlib.posix(other);
1212

13-
if startsWith(o, '/') || (ispc && stdlib.is_absolute(o))
13+
if startsWith(o, '/') || (ispc() && stdlib.is_absolute(o))
1414
p = o;
1515
return
1616
end

+stdlib/normalize.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818

1919
n = stdlib.posix(p);
2020

21-
uncslash = ispc && startsWith(n, "//");
21+
uncslash = ispc() && startsWith(n, "//");
2222

2323
% use split to remove /../ and /./ and duplicated /
2424
parts = split(n, '/');
2525
i0 = 1;
2626
if strncmp(n, "/", 1)
2727
n = "/";
28-
elseif ispc && strlength(n) >= 2 && strlength(stdlib.root_name(p))
28+
elseif ispc() && strlength(n) >= 2 && strlength(stdlib.root_name(p))
2929
n = parts(1);
3030
i0 = 2;
3131
else

0 commit comments

Comments
 (0)