# Re: bug in sanei_debug.h

From: Jochen Eisinger (jochen.eisinger@gno.de)
Date: Sun Oct 15 2000 - 11:13:32 PDT

- Next message: Oliver Rauch: "xsane and new gimp versions"
  - Previous message: Adrian Perez Jorge: "Re: HP ScanJet 3300"
  - In reply to: Henning Meier-Geinitz: "Re: bug in sanei_debug.h"
  - Next in thread: David Mosberger-Tang: "Re: bug in sanei_debug.h"
  - Reply: David Mosberger-Tang: "Re: bug in sanei_debug.h"
  - Reply: Jochen Eisinger: "Re: bug in sanei_debug.h"
  - Reply: Henning Meier-Geinitz: "Re: bug in sanei_debug.h"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Hi!

  [Henning Meier-Geinitz]
  >
  > Hi,
  >
  > > However, I'm still going to commit the change tommorow... I think this
  > > wasn't a objection from you, Henning, was it?
  >
  > No, not at all!
  >
  > I just wanted to confirm that it works.

  :-) Ok, I've commited the bugfix!

  There's another bug in sanei_debug.h: before we test what value __GNUC__
  has, we should test, whether __GNUC__ is defined at all.

  I'll patch this tommorow, and commit it on tuesday, if nobody objects...

  > However, it doesn't seem to be an easy fix. The variable for the current
  > debug level and the backend name is stored in the object code of the
  > backend. It has to be transmitted to sanei_init_debug in some way. With
  > vararg macros that's no problem because these two values can be transmitted
  > as function parameters to sanei_debug_max. Without varargs we can't touch
  > the parameters of DBG / sanei_debug so I don't have an idea how to tell
  > sanei_debug_msg the debug level and backend name without moving all these
  > functions to sanei_debug.h. Any ideas (maybe I didn't understand the code
  > fully ...).

  I had a look at it. I thought, we could define DBG like this

  #define DBG sanei_debug_set(DBG_LEVEL, STRINGIFY(BACKEND_NAME));
  sanei_debug

  but this fails on code like this

  if (...)
  DBG(...)
  else
  ...

  I also don't see an easy way arround this

  -- jochen

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Oliver Rauch: "xsane and new gimp versions"
  - Previous message: Adrian Perez Jorge: "Re: HP ScanJet 3300"
  - In reply to: Henning Meier-Geinitz: "Re: bug in sanei_debug.h"
  - Next in thread: David Mosberger-Tang: "Re: bug in sanei_debug.h"
  - Reply: David Mosberger-Tang: "Re: bug in sanei_debug.h"
  - Reply: Jochen Eisinger: "Re: bug in sanei_debug.h"
  - Reply: Henning Meier-Geinitz: "Re: bug in sanei_debug.h"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 11:06:52 PDT