libfsm icon indicating copy to clipboard operation
libfsm copied to clipboard

Generated code doesn't distinguish error from EOF, for the getc callback

Open katef opened this issue 1 year ago • 0 comments

We can do this in the caller with ferror() or setting errno = 0 or whatever. We could distinguish this in the generated code, and explicitly return a different value.

I'm not convinced I actually do want to handle this in the generated code, because it only applies to FSM_IO_GETC (you can't have a read error for any other IO API, just hit EOT). Perhaps this is the responsibility of the caller, because they provide the getc callback in the first place.

katef avatar Jul 11 '24 08:07 katef