Re: NeedFunctionPrototypes and ANSI C

2003-08-14 Thread Thomas E. Dickey
On Wed, 13 Aug 2003, Mark Vojkovich wrote:

 On Wed, 13 Aug 2003, Warren Turkal wrote:

  Is there an effort to get rid of NeedFunctionPrototypes and to convert
  function prototypes to ANSI style? If so, I would like to work on doing
  this for the xwininfo binary.

I change them whenever I'm working in particular parts of the
 tree that haven't been converted yet, and so do a few other people.
 I think we avoid wholesale changes across the board because of
 the risk it imposes.  There have been some breakages when people
 didn't pay enough attention and had the arguments reversed. eg:

 int func(y, x)
int x;
int y;
 {
/* watch out! */
 }

Comparing binaries addresses this (except of course where an ifdef
confuses the issue).  Even with that, I recall two instances where I
made an error (caught by other people).

 So piecemeal changes seem safer.  People tend to go on autopilot
 when making too many changes of this type in one sitting and have a tendency
 to break the case above.  You can also introduce some promotion problems
 if you're not careful.

That, and changing things incompatibly (putting 'void' on prototypes where
the old headers don't specify).

-- 
T.E.Dickey [EMAIL PROTECTED]
http://invisible-island.net
ftp://invisible-island.net
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: NeedFunctionPrototypes and ANSI C

2003-08-14 Thread Thomas E. Dickey
On Wed, 13 Aug 2003, Warren Turkal wrote:

 Is there an effort to get rid of NeedFunctionPrototypes and to convert
 function prototypes to ANSI style? If so, I would like to work on doing
 this for the xwininfo binary.

People do work on this occasionally.  I've made some notes here:

http://dickey.his.com/ansification/index.html


 My research indicates that X11R6.3+ require an ANSI compiler and that this
 type of conversion is desirable.

 Warren Turkal


-- 
T.E.Dickey [EMAIL PROTECTED]
http://invisible-island.net
ftp://invisible-island.net
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: NeedFunctionPrototypes and ANSI C

2003-08-14 Thread Mark Vojkovich
On Wed, 13 Aug 2003, Warren Turkal wrote:

 Is there an effort to get rid of NeedFunctionPrototypes and to convert
 function prototypes to ANSI style? If so, I would like to work on doing
 this for the xwininfo binary.

   I change them whenever I'm working in particular parts of the
tree that haven't been converted yet, and so do a few other people.
I think we avoid wholesale changes across the board because of
the risk it imposes.  There have been some breakages when people
didn't pay enough attention and had the arguments reversed. eg:

int func(y, x)
   int x;
   int y;
{
   /* watch out! */
}

So piecemeal changes seem safer.  People tend to go on autopilot
when making too many changes of this type in one sitting and have a tendency
to break the case above.  You can also introduce some promotion problems
if you're not careful.


Mark.

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel