On Sat, May 25, 2024 at 06:27:10PM +0800, Qian Yun wrote: > Sorry, the problem is not "fricas_sprintf_to_buf", but > "extern char errorStr [80];". > > I want to avoid this global variable and implementation > detail to leak to util.c.
So you are trying to clean up the code. I must say that I would prefer to have 'checked' read that would loop in case of short read (usually 'read' delivers all requested data, but it can return only part of what was requested in in such case we should loop (this is not handled in current code)). Such 'checked' read would get parameters needed to build error message (so no global buffer and no 'sprintf' at call site). -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZlMlljNQXN8q39UM%40fricas.org.