Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 95 11:10:30 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        pete@pelican.com (Pete Carah)
Cc:        gie@charon.er.usgs.gov, current@FreeBSD.org
Subject:   Re: preprocessor conflict in proj.4 (geodesic.h)
Message-ID:  <9504071710.AA20480@cs.weber.edu>
In-Reply-To: <m0rx7FZ-000K0iC@pelican.com> from "Pete Carah" at Apr 6, 95 11:10:33 pm

next in thread | previous in thread | raw e-mail | index | archive | help
I'm only answering this because you singled me out.  I think there is
not a hard and fast rule to fix this, but I can give you my opinions.


> I'm cc'ing this to the freebsd group in case those dummy args should
> have underscores.  

I don't think they should; they're not in the implementation name space.

On the other hand, I think defining single letters might be allowed,
but it is critically bad practice.

I also think that #define arguments should not be subject to preprocesser
substitution (I can't see a useful case where this would make something
work where it didn't before).

It's also generic bad practice to have manifest defines define anything
but all uppercase tokens.

So in order, I'd probably:

1)	Change the #define in geodesic.h to define an upper case value.

2)	Get rid of the ' ' between '#' and 'define' (I'm a nut for
	making code work on the oldest compiler I can get to crawl).

3)	Change the 'F' (that used to be 'f') into something a bit
	more, shall we say, descriptive.

4)	Move the inline function out of the standard header file
	into a tool or system specific header file that's pulled
	in by ctype.h.

5)	Wonder what a type (_BSD_RUNE_T_) is doing in the implementation
	name space.

6)	If it were more than 5 places, send the patches back to the
	maintainer so thenext time I tried to run the code I didn't
	have to fix the same thing over again.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9504071710.AA20480>