Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ERRCHK macro #3056

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/oc/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@ void wopen(void) /* open file for writing */
else
fname = "";
d = 1.;
if (fout != stdout)
ERRCHK(IGNORE(fclose(fout));)
if (fout != stdout) {
IGNORE(fclose(fout));
}
fout = stdout;
if (fname[0] != 0)
ERRCHK(if ((fout = fopen(expand_env_var(fname), "w")) == (FILE*) 0) {
if (fname[0] != 0) {
if ((fout = fopen(expand_env_var(fname), "w")) == nullptr) {
d = 0.;
fout = stdout;
})
}
}
errno = 0;
ret();
pushx(d);
Expand Down
2 changes: 0 additions & 2 deletions src/oc/hocdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ int ilint;
#endif
using neuron::Sprintf;

#define ERRCHK(c1) c1

// No longer used because of clang format difficulty
// #define IFGUI if (hoc_usegui) {
// #define ENDGUI }
Expand Down
Loading