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

120 wiersze
4.7 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="Jochen Eisinger (jochen.eisinger@gno.de)">
<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="Sun Oct 15 16:28:02 2000" -->
<!-- isoreceived="20001015232802" -->
<!-- sent="Mon, 16 Oct 2000 01:35:33 +0200" -->
<!-- isosent="20001015233533" -->
<!-- name="Jochen Eisinger" -->
<!-- email="jochen.eisinger@gno.de" -->
<!-- subject="Re: bug in sanei_debug.h" -->
<!-- id="39EA3F45.5A50C7CB@gno.de" -->
<!-- inreplyto="39E9F3CC.C5B3CEB1@gno.de" -->
<STRONG>From:</STRONG> Jochen Eisinger (<A HREF="mailto:jochen.eisinger@gno.de?Subject=Re:%20bug%20in%20sanei_debug.h&In-Reply-To=&lt;39EA3F45.5A50C7CB@gno.de&gt;"><EM>jochen.eisinger@gno.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Sun Oct 15 2000 - 16:35:33 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0163.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0161.html">David Mosberger-Tang: "Re: bug in sanei_debug.h"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0158.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0164.html">Jochen Eisinger: "Re: bug in sanei_debug.h (the patch)"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0164.html">Jochen Eisinger: "Re: bug in sanei_debug.h (the patch)"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#162">[ date ]</A>
<A HREF="index.html#162">[ thread ]</A>
<A HREF="subject.html#162">[ subject ]</A>
<A HREF="author.html#162">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi!
<BR>
<P>[Henning Meier-Geinitz]
<BR>
<EM>&gt; &gt; However, it doesn't seem to be an easy fix. The variable for the current
</EM><BR>
<EM>&gt; &gt; debug level and the backend name is stored in the object code of the
</EM><BR>
<EM>&gt; &gt; backend. It has to be transmitted to sanei_init_debug in some way. With
</EM><BR>
<EM>&gt; &gt; vararg macros that's no problem because these two values can be transmitted
</EM><BR>
<EM>&gt; &gt; as function parameters to sanei_debug_max. Without varargs we can't touch
</EM><BR>
<EM>&gt; &gt; the parameters of DBG / sanei_debug so I don't have an idea how to tell
</EM><BR>
<EM>&gt; &gt; sanei_debug_msg the debug level and backend name without moving all these
</EM><BR>
<EM>&gt; &gt; functions to sanei_debug.h. Any ideas (maybe I didn't understand the code
</EM><BR>
<EM>&gt; &gt; fully ...).
</EM><BR>
<P>I've patch sanei_debug.h... now it creates one additional function for
<BR>
each backend that #includes sanei_debug.h (if there is no support for
<BR>
vararg macros). The output is the same as if it was compiled with vararg
<BR>
macros.
<BR>
<P>I've also modified the test for vararg macros: I added the test #if
<BR>
defined __GNUC__ &amp;&amp; (...)
<BR>
<P>What do you think about it? There are severall drawbacks:
<BR>
<P>* debug_msg is no more static (maybe it should be renamed
<BR>
sanei_debug_msg to avoid conflicts)
<BR>
* the new per backend function needs to #include stdlib, string &amp; stdarg
<BR>
* it allocates memory
<BR>
<P>-- jochen
<BR>
<P><PRE>
--
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;39EA3F45.5A50C7CB@gno.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0163.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0161.html">David Mosberger-Tang: "Re: bug in sanei_debug.h"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0158.html">Jochen Eisinger: "Re: bug in sanei_debug.h"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0164.html">Jochen Eisinger: "Re: bug in sanei_debug.h (the patch)"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0164.html">Jochen Eisinger: "Re: bug in sanei_debug.h (the patch)"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#162">[ date ]</A>
<A HREF="index.html#162">[ thread ]</A>
<A HREF="subject.html#162">[ subject ]</A>
<A HREF="author.html#162">[ 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>Sun Oct 15 2000 - 16:28:36 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>