sane-project-website/old-archive/2000-10/0179.html

122 wiersze
4.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: bug in sanei_debug.h</TITLE>
<META NAME="Author" CONTENT="Petter Reinholdtsen (pere@hungry.com)">
<META NAME="Subject" CONTENT="Re: bug in sanei_debug.h">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: bug in sanei_debug.h</H1>
<!-- received="Tue Oct 17 03:02:37 2000" -->
<!-- isoreceived="20001017100237" -->
<!-- sent="Tue, 17 Oct 2000 18:12:23 +0800" -->
<!-- isosent="20001017101223" -->
<!-- name="Petter Reinholdtsen" -->
<!-- email="pere@hungry.com" -->
<!-- subject="Re: bug in sanei_debug.h" -->
<!-- id="200010171012.SAA04801@localhost.localdomain" -->
<!-- inreplyto="bug in sanei_debug.h" -->
<STRONG>From:</STRONG> Petter Reinholdtsen (<A HREF="mailto:pere@hungry.com?Subject=Re:%20bug%20in%20sanei_debug.h&In-Reply-To=&lt;200010171012.SAA04801@localhost.localdomain&gt;"><EM>pere@hungry.com</EM></A>)<BR>
<STRONG>Date:</STRONG> Tue Oct 17 2000 - 03:12:23 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0180.html">Jaeger, Gerhard: "Re: Problems with saned/net backend"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0178.html">Petter Reinholdtsen: "Re: sane as a server to Windows clients?"</A>
<LI><STRONG>Maybe in reply to:</STRONG> <A HREF="0142.html">Jochen Eisinger: "bug in sanei_debug.h"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0183.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0183.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#179">[ date ]</A>
<A HREF="index.html#179">[ thread ]</A>
<A HREF="subject.html#179">[ subject ]</A>
<A HREF="author.html#179">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
[Jochen Eisinger]
<BR>
<EM>&gt; I've patch sanei_debug.h... now it creates one additional function
</EM><BR>
<EM>&gt; for each backend that #includes sanei_debug.h (if there is no
</EM><BR>
<EM>&gt; support for vararg macros). The output is the same as if it was
</EM><BR>
<EM>&gt; compiled with vararg macros.
</EM><BR>
<P>I suggest removing the vararg macro implementation if the new one
<BR>
works equally well. It would be very nice to have portable code in
<BR>
the debug functions.
<BR>
<P><EM>&gt; * debug_msg is no more static (maybe it should be renamed
</EM><BR>
<EM>&gt; sanei_debug_msg to avoid conflicts)
</EM><BR>
<P>Good idea.
<BR>
<P><EM>&gt; * the new per backend function needs to #include stdlib, string &amp; stdarg
</EM><BR>
<P>Is this really a problem?
<BR>
<P><EM>&gt; * it allocates memory
</EM><BR>
<P>This can be avoided by changing the arguments to debug_msg() to
<BR>
inclued the backend name as well:
<BR>
<P>&nbsp;&nbsp;debug_msg (level, DBG_LEVEL, STRINGIFY(BACKEND_NAME), msg, ap);
<BR>
<P>Then the output can be printed with two vfprintf() calls unless stderr
<BR>
is a socket. If it is a socket, I guess there is no other way to make
<BR>
sure all the info is included in the syslog message but to allocate
<BR>
some memory. :-/
<BR>
<P>Why did you not make the DBG_LOCAL function static? I believe it
<BR>
should be.
<BR>
<PRE>
--
##&gt; Petter Reinholdtsen &lt;## | <A HREF="mailto:pere@td.org.uit.no?Subject=Re:%20bug%20in%20sanei_debug.h&In-Reply-To=&lt;200010171012.SAA04801@localhost.localdomain&gt;">pere@td.org.uit.no</A>
<P><P>--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20bug%20in%20sanei_debug.h&In-Reply-To=&lt;200010171012.SAA04801@localhost.localdomain&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0180.html">Jaeger, Gerhard: "Re: Problems with saned/net backend"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0178.html">Petter Reinholdtsen: "Re: sane as a server to Windows clients?"</A>
<LI><STRONG>Maybe in reply to:</STRONG> <A HREF="0142.html">Jochen Eisinger: "bug in sanei_debug.h"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0183.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0183.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#179">[ date ]</A>
<A HREF="index.html#179">[ thread ]</A>
<A HREF="subject.html#179">[ subject ]</A>
<A HREF="author.html#179">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Tue Oct 17 2000 - 03:04:14 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>