Hi Francisco
I admit I picked up a corner case.
1) In general, I dislike APIs returning unnecessary data.
If I call a function
loadfile(const char * szFilename, ...)
it is obvious file errors are referred to szFilename !
2) Estimation of maximum size of error messages
If I use a library and functions can return error messages, I prefer they are constant string.
This way I know a priori the maximum size of the messages and there aren't nasty surprises regarding head and stack occupation.
I know I am finicky, but these concerns make it easier to write maintainable software, without side effects.
You really don't know which filenames will appear as input of your functions, when other users utilize them.
As people say in south Italy "ogni scarrafone è bello a mamma sua" "até o mais feio é lindo para sua mãe".
I mean: we write different code, and for everyone his code is the good one!
M