[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/include svn_types.h

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-02-13 03:37:50 CET

On Mon, Feb 12, 2001 at 03:43:56PM -0600, Karl Fogel wrote:
> Greg Stein <gstein@lyra.org> writes:
> > You're never supposed to have a space between a function symbol and the open
> > parenthesis.
> >
> > But some people disagree with me :-)
>
> :-)
>
> Parameter-receiving #defines are different.

They don't have to be, if all declarations omitted the space :-)

> When you define them, the
> preprocessor seems to require no space before the left paren --
> otherwise it can't tell the difference between a macro that takes
> arguments, and a macro that happens to expand into text whose first
> character happens to be an open paren.
>
> However, when you *call* such a macro, the space is okay.

As Branko pointed out, this is the way preprocessor macros have worked
forever. (well, at least since they had parameterization which is basically
forever :-)

My point wasn't really to jabber on about macros, but simply to complain
again about this whole "funcname (args)" style.

:-)

Cheers,
-g

>...
> > On Mon, Feb 12, 2001 at 07:21:10PM -0000, cmpilato@tigris.org wrote:
> > > User: cmpilato
> > > Date: 01/02/12 11:21:10
> > >
> > > Modified: subversion/include svn_types.h
> > > Log:
> > > * include/svn_types.h
> > >
> > > (SVN_IS_VALID_REVNUM): Oops. Not supposed to have a space in the macro.
> > >
> > > Revision Changes Path
> > > 1.56 +1 -1 subversion/subversion/include/svn_types.h
> > >
> > > Index: svn_types.h
> > > ===================================================================
> > > RCS file: /cvs/subversion/subversion/include/svn_types.h,v
> > > retrieving revision 1.55
> > > retrieving revision 1.56
> > > diff -u -r1.55 -r1.56
> > > --- svn_types.h 2001/02/09 05:39:26 1.55
> > > +++ svn_types.h 2001/02/12 19:21:10 1.56
> > > @@ -59,7 +59,7 @@
> > > typedef long int svn_revnum_t;
> > >
> > > /* Valid revision numbers begin at 0 */
> > > -#define SVN_IS_VALID_REVNUM (n) (n >= 0)
> > > +#define SVN_IS_VALID_REVNUM(n) (n >= 0)
> > > #define SVN_INVALID_REVNUM (-1) /* The 'official' invalid revision num */
> > > #define SVN_IGNORED_REVNUM (-2) /* Not really invalid...just
> > > unimportant */
>...

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:22 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.