mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 20:21:25 +00:00
Re-introduced Yosys::readsome() helper function
(f.read() + f.gcount() made problems with lines > 16kB)
This commit is contained in:
parent
750c615e7f
commit
c5eb5e56b8
6 changed files with 25 additions and 21 deletions
|
@ -35,11 +35,7 @@
|
|||
USING_YOSYS_NAMESPACE
|
||||
|
||||
#define YY_INPUT(buf,result,max_size) \
|
||||
do { \
|
||||
ILANG_FRONTEND::lexin->read(buf, max_size-1); \
|
||||
result = ILANG_FRONTEND::lexin->gcount(); \
|
||||
if (result >= 0) buf[result] = '\0'; \
|
||||
} while (0)
|
||||
result = readsome(*ILANG_FRONTEND::lexin, buf, max_size)
|
||||
|
||||
%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue