-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
184 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/******************************************************************************* | ||
Copyright (C) The University of Auckland | ||
OpenCOR is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
OpenCOR is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*******************************************************************************/ | ||
|
||
//============================================================================== | ||
// Silent run | ||
//============================================================================== | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
//============================================================================== | ||
|
||
int main(int pArgC, char *pArgV[]) | ||
{ | ||
// Execute the given program, silencing its output | ||
|
||
#ifdef _WIN32 | ||
freopen("NUL:", "w", stdout); | ||
freopen("NUL:", "w", stderr); | ||
#else | ||
freopen("/dev/null", "w", stdout); | ||
freopen("/dev/null", "w", stderr); | ||
#endif | ||
|
||
#define STRING_SIZE 32768 | ||
|
||
char command[STRING_SIZE]; | ||
int k = -1; | ||
|
||
for (int i = 1; i < pArgC; ++i) { | ||
if (i != 1) | ||
command[++k] = ' '; | ||
|
||
for (int j = 0; pArgV[i][j]; ++j) { | ||
if (pArgV[i][j] == '\\') { | ||
command[++k] = '\\'; | ||
command[++k] = '\\'; | ||
} else if (pArgV[i][j] == '"') { | ||
command[++k] = '\\'; | ||
command[++k] = '"'; | ||
} else { | ||
command[++k] = pArgV[i][j]; | ||
} | ||
} | ||
} | ||
|
||
command[++k] = '\0'; | ||
|
||
return system(command); | ||
} | ||
|
||
//============================================================================== | ||
// End of file | ||
//============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
The user-defined formats contained in this folder come from the CellML API (http://cellml-api.sourceforge.net/) and should work fine. Still, we would recommend using them with caution. | ||
The user-defined formats contained in this folder come from the CellML API (https://github.com/cellmlapi/cellml-api/) and should work fine. Still, we would recommend using them with caution. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.