mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion/simulator] Allow "-" to designate stdin
This commit is contained in:
@@ -48,7 +48,12 @@ static inline bool load(FILE * f) {
|
||||
}
|
||||
|
||||
void load(const char * filename) {
|
||||
FILE * f = fopen(filename, "rb");
|
||||
FILE * f = nullptr;
|
||||
if (strcmp(filename, "-") == 0) {
|
||||
f = stdin;
|
||||
} else {
|
||||
f = fopen(filename, "rb");
|
||||
}
|
||||
if (f == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user