mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Replaced readsome() with read() and gcount()
This commit is contained in:
parent
cf85aab62f
commit
c3e9922b5d
4 changed files with 11 additions and 23 deletions
|
@ -172,22 +172,6 @@ bool patmatch(const char *pattern, const char *string)
|
|||
return false;
|
||||
}
|
||||
|
||||
int readsome(std::istream &f, char *s, int n)
|
||||
{
|
||||
int rc = f.readsome(s, n);
|
||||
|
||||
// win32 sometimes returns 0 on a non-empty stream..
|
||||
if (rc == 0) {
|
||||
int c = f.get();
|
||||
if (c != EOF) {
|
||||
*s = c;
|
||||
rc = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int run_command(const std::string &command, std::function<void(const std::string&)> process_line)
|
||||
{
|
||||
if (!process_line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue