[Jochen Eisinger]
> I've patch sanei_debug.h... now it creates one additional function
> for each backend that #includes sanei_debug.h (if there is no
> support for vararg macros). The output is the same as if it was
> compiled with vararg macros.
I suggest removing the vararg macro implementation if the new one
works equally well. It would be very nice to have portable code in
the debug functions.
> * debug_msg is no more static (maybe it should be renamed
> sanei_debug_msg to avoid conflicts)
Good idea.
> * the new per backend function needs to #include stdlib, string & stdarg
Is this really a problem?
> * it allocates memory
This can be avoided by changing the arguments to debug_msg() to
inclued the backend name as well:
debug_msg (level, DBG_LEVEL, STRINGIFY(BACKEND_NAME), msg, ap);
Then the output can be printed with two vfprintf() calls unless stderr
is a socket. If it is a socket, I guess there is no other way to make
sure all the info is included in the syslog message but to allocate
some memory. :-/
Why did you not make the DBG_LOCAL function static? I believe it
should be.
-- ##> Petter Reinholdtsen <## | pere@td.org.uit.no-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Tue Oct 17 2000 - 03:04:14 PDT