Skip to content

Commit

Permalink
[octave] workaround for octave bug https://savannah.gnu.org/bugs/?66161
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Oct 23, 2024
1 parent 7839201 commit a4009b6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion loadbidstsv.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
fid = fid((endpos + 1):end);
end
else
fid = fopen(tsvfile, 'rt');
fid = fopen(tsvfile, 'rb');
header = fgetl(fid);
header = regexprep(header, '\s*$', '');
end
Expand Down
2 changes: 1 addition & 1 deletion readasc.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

node = [];
elem = [];
fid = fopen(fname, 'rt');
fid = fopen(fname, 'rb');
if (fid == -1)
error(['can not read file ' fname]);
end
Expand Down
2 changes: 1 addition & 1 deletion readgts.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

node = [];
elem = [];
fid = fopen(fname, 'rt');
fid = fopen(fname, 'rb');
line = fgetl(fid);
dim = sscanf(line, '%d', 3);
node = fscanf(fid, '%f', [3, dim(1)])';
Expand Down
2 changes: 1 addition & 1 deletion readmedit.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
node = [];
elem = [];
face = [];
fid = fopen(filename, 'rt');
fid = fopen(filename, 'rb');
while (~feof(fid))
key = fscanf(fid, '%s', 1);
if (strcmp(key, 'End'))
Expand Down
4 changes: 2 additions & 2 deletions readnirfast.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
end

fname = [filestub, '.excoef'];
fid = fopen(fname, 'rt');
fid = fopen(fname, 'rb');
if (fid >= 0)
linenum = 0;
textheader = {};
Expand All @@ -82,7 +82,7 @@
end

fname = [filestub, '.param'];
fid = fopen(fname, 'rt');
fid = fopen(fname, 'rb');
if (fid >= 0)
linenum = 0;
params = [];
Expand Down
2 changes: 1 addition & 1 deletion readsmf.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%
node = [];
elem = [];
fid = fopen(fname, 'rt');
fid = fopen(fname, 'rb');
while (~feof(fid))
line = fgetl(fid);
if (line(1) == 'v')
Expand Down
6 changes: 3 additions & 3 deletions readtetgen.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%

% read node file
fp = fopen([fstub, '.node'], 'rt');
fp = fopen([fstub, '.node'], 'rb');
if (fp == 0)
error('node file is missing!');
end
Expand All @@ -33,7 +33,7 @@
fclose(fp);

% read element file
fp = fopen([fstub, '.ele'], 'rt');
fp = fopen([fstub, '.ele'], 'rb');
if (fp == 0)
error('elem file is missing!');
end
Expand All @@ -48,7 +48,7 @@
fclose(fp);

% read surface mesh file
fp = fopen([fstub, '.face'], 'rt');
fp = fopen([fstub, '.face'], 'rb');
if (fp == 0)
error('surface data file is missing!');
end
Expand Down

0 comments on commit a4009b6

Please sign in to comment.