Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel task.c,1.44.2.4,1.44.2.5

2005-01-19 Thread Arkady V.Belousov
Hi!

19-Янв-2005 15:06 [EMAIL PROTECTED] (Kenneth J. Davis) wrote to
freedos-kernel@lists.sourceforge.net:

>>>+++ task.c17 Jan 2005 18:34:10 -  1.44.2.5
>>>-#if DEBUG
>>>+#ifdef DEBUG
>>Fix:
>>#if TST+0
>>---^^
KJD> I'm confused.
KJD> How does #ifdef DEBUG (the new code)

 Oops... :( Sorry, I'm dubiously blind man - I visually entangle/miss
"+" and "-" characters in your update. :(

KJD> On a tangential [only slightly related] note, for debug code I want in
KJD> the source but
KJD> almost never compiled (something that helped track down a specific
KJD> issue, but generally not needed for a debug build), should I used
KJD> #ifdef DDEBUG  ... #endif
KJD> or simply
KJD> #if 0 ... #endif
KJD> or
KJD> #ifdef  ... #endif

 I think, for (most) specific-purposed debug fragments, better to use
general-purpose "#if 0" - usually, when you debug some fragment, you not
need to see other cross-kernel debug messages. The more so, I don't think
that you need to devise name for conditional compilation guard - debugging
of specific fragments is rare thing, and in this case you may manually
(temporarily!) edit source (0 -> 1), instead manually editing your
config.bat (but don't forget to re_build_ the kernel after/if you restore
original source file with older date).

 After all, I think, DEBUG name is useful for places, where is perofmed
output of general-purpose and user-friendly information. And such places
should be small amount, else profit of debugging output (which can't be
redirected to separate device with permanent memory!) will be losted in big
amount of garbage.




---
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
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel task.c,1.44.2.4,1.44.2.5

2005-01-19 Thread Kenneth J. Davis
Arkady V.Belousov wrote:
Hi!
17-Янв-2005 18:34 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:
 

tc debug build fix
+++ task.c17 Jan 2005 18:34:10 -  1.44.2.5
-#if DEBUG
+#ifdef DEBUG
   

__O\_/_\_/O__
#if TST
# error 1
#endif
_
 O/~\ /~\O
__O\_/_\_/O__
 

bcc -c -DTST tst.cpp
   

Borland C++  Version 3.1 Copyright (c) 1992 Borland International
 

Error t.cpp 1: Expression syntax
   

Fatal t.cpp 2: Error directive: 1
*** 2 errors in Compile ***
_
 O/~\ /~\O
Fix:
#if TST+0
---^^
PS: I don't understand, what the trouble was with debugging? Old code was
includes conditional part when DEBUG is defined, new code includes code only
when DEBUG is defined AND not zero. Ie. -DDEBUG now not enough to include
those conditional part.
 

I'm confused. 
How does #ifdef DEBUG (the new code) require DEBUG to be defined and not 
zero?
The issue here is that when I converted an #if 1 to be debug only
code I forgot to change the #if to #ifdef.

On a tangential [only slightly related] note, for debug code I want in 
the source but
almost never compiled (something that helped track down a specific 
issue, but
generally not needed for a debug build), should I used
#ifdef DDEBUG  ... #endif
or simply
#if 0 ... #endif
or
#ifdef  ... #endif

Thanks,
Jeremy


---
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
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] Re: [Freedos-cvs] kernel/kernel task.c,1.44.2.4,1.44.2.5

2005-01-17 Thread Arkady V.Belousov
Hi!

17-Янв-2005 18:34 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:

> tc debug build fix
> +++ task.c17 Jan 2005 18:34:10 -  1.44.2.5
> -#if DEBUG
> +#ifdef DEBUG

__O\_/_\_/O__
#if TST
# error 1
#endif
_
  O/~\ /~\O
__O\_/_\_/O__
>bcc -c -DTST tst.cpp
Borland C++  Version 3.1 Copyright (c) 1992 Borland International
>Error t.cpp 1: Expression syntax
Fatal t.cpp 2: Error directive: 1
*** 2 errors in Compile ***
_
  O/~\ /~\O

Fix:

#if TST+0
---^^

PS: I don't understand, what the trouble was with debugging? Old code was
includes conditional part when DEBUG is defined, new code includes code only
when DEBUG is defined AND not zero. Ie. -DDEBUG now not enough to include
those conditional part.




---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel