Hi!

29-Янв-2005 20:33 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:

KD> new debug macros, simplify selective debug output
KD> --- NEW FILE: debug.h ---
KD> #ifdef DEBUG
KD> #define DebugPrintf(x) printf x
+#define DEBUG_NEED_PRINTF
KD> #else
KD> #define DebugPrintf(x)
KD> #endif
[...]
KD> #ifdef DEBUGCFG
KD> #define CfgDbgPrintf(x) printf x
+#define DEBUG_NEED_PRINTF
KD> #else
KD> #define CfgDbgPrintf(x)
KD> #endif
[...]
KD> /* just to be sure printf is declared */
KD> #if defined(DEBUG) || defined(DEBUGIRQ) || defined(DEBUGCFG) || \
KD>     defined(DEBUGDOSFNS) || defined(CHDIR_DEBUG) || defined(FIND_DEBUG) || \
KD>     defined(DEBUGFATDIR) || defined(DEBUGFATFS)
KD> #ifndef DEBUG_NEED_PRINTF
KD> #define DEBUG_NEED_PRINTF
KD> void printf(const char *, ...);
KD> #endif
KD> #endif

     Remove these lines. About declaration see below:

KD> just comments and additional debug messages, updated history (little
KD> +++ fatdir.c        29 Jan 2005 20:33:10 -0000      1.47.2.3
KD>  #include "portab.h"
KD>  #include "globals.h"
KD> +#include "debug.h"

     Note: proto.h (called in globals.h) already tries to declare printf(),
if defined DEBUG. And you also try to declare printf() in debug.h. I think,
debug.h (without declaring printf()) should be included before (or inside)
globals.h, and proto.h should checl DEBUG_NEED_PRINTF instead DEBUG.

KD> +++ fatfs.c 29 Jan 2005 20:33:11 -0000      1.70.2.5
KD> +    FatFSDbgPrintf(("dos_open: splitpath(\"%s\", \"%11s\") failed.\n",
KD> @@ -330,7 +339,7 @@
KD>  #ifdef DEBUG
------------^^^^^ DEBUGFATFS?

KD> @@ -1817,18 +1830,18 @@
KD> +  DebugPrintf(("get_near_f_node: fnp is %p\n", fnp));
KD>    if (fnp->f_count && (++fnp)->f_count)
KD>      panic("more than two near fnodes requested at the same time!\n");
KD>    fnp->f_count++;
KD> +  DebugPrintf(("got near fnode, fnp->f_count=%i\n", fnp->f_count));

     Also FatFSDbgPrintf()?

     BTW, I think, better to _not_ abbriviate Debug as Dbg (ie., above
should be FatFSDebugPrintf()), because easier to search only DebugPrintf,
not both DebugPrintf and DbgPrintf.




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to