[ros-dev] DPRINT

Casper Hornstrup chorns at users.sourceforge.net
Thu Dec 9 21:06:07 CET 2004


 

> -----Original Message-----
> From: ros-dev-bounces at reactos.com 
> [mailto:ros-dev-bounces at reactos.com] On Behalf Of Royce Mitchell III
> Sent: 9. december 2004 20:52
> To: ReactOS Development List
> Subject: Re: [ros-dev] DPRINT
> 
> Casper Hornstrup wrote:
> 
> > 
> >
> >  
> >
> >>-----Original Message-----
> >>From: ros-dev-bounces at reactos.com
> >>[mailto:ros-dev-bounces at reactos.com] On Behalf Of Royce Mitchell III
> >>Sent: 9. december 2004 19:41
> >>To: ReactOS Development List
> >>Subject: [ros-dev] DPRINT
> >>
> >>Would anybody object to me changing:
> >>
> >>    DPRINT(foo)
> >>
> >>to
> >>
> >>    DPRINT((foo))
> >>
> >>in the name of msvc6 compilability?
> >>    
> >>
> >
> >I would. This will give you maintainance hell. Either you 
> need to fix 
> >it every time some developer using MinGW use the first 
> version or you 
> >will need to constantly remind these developers to use the second 
> >version (eg. more work for them).
> >
> >Casper
> >  
> >
> Well, first off I could do it in a way that DPRINT(foo) 
> wouldn't compile, so it would remind them automatically
> 
> The only other solutions I've come up with are less pretty:
> 
> 1)  DPRINT0(foo) DPRINT1(foo,a) DPRINT2(foo,a,b) etc...
>       a serious problem with this is that DPRINT1 already 
> means something different than DPRINT...
> 
> 2) #define _C_ ,
>      DPRINT(foo _C_ a _C_ b)
>       this is ugly and probably couldn't be protected from 
> uncaring mingwers.

I that case, if you can make DPRINT(foo) cause a warning when
used improperly, stating how it is supposed to be used, I don't
have any objections.

Casper



More information about the Ros-dev mailing list