Subject: CVS dane: * tests/purify/purify.fvwm2rc: more test updates.

From: CVS <[email-masked]>
Date: Wed, 27 Dec 2000 15:41:02 -0600 (CST)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	dane	00/12/27 15:41:02

Modified files:
	.              : ChangeLog 
	modules        : ChangeLog 
	modules/FvwmForm: FvwmForm.c 
	tests/purify   : purify.fvwm2rc 

Log message:
* tests/purify/purify.fvwm2rc: more test updates.
* FvwmForm/FvwmForm.c: Moved ALL the global initialization into a
.c file, and removed the definition of IamTheMain.
I don't see how this is an improvement unless you like externs that
don't match definitions.

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 29 Dec 2000 07:59:32 +0100

> I don't see how this is an improvement unless you like externs that

 1) .h files are not meant to contain any *definitions* only
    *declarations*.  With the same reasoning you should move all
    functions into the .h file and 
 2) Since virtually everyone sticks to the .h file conventions, it
    is confusing to put definitions in .h files.  Furthermore, I
    usually grep only through .c files when looking for the place
    where a variable is initialised.  
 3) I don't see why the definition and the declaration should
    match any better only because they are in the same file.  You
    can still easily mess up the types.  And then, even if you put
    the definition in the .h file, you don't need to do it with
    'ifdef' if you do not insist on initialising it there also:

      #ifdef IamTheMain
      #undef EXTERN
      #else
      #define EXTERN extern
      #endif

      EXTERN int foo;
      EXTERN Bool bar;
      ...

That's just my opinion.  I think, if there is at least one fairly
common standard in C programming, you should try to adopt it.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Fri, 29 Dec 2000 08:28:14 -0500

>     'ifdef' if you do not insist on initialising it there also:

As you say, when done this way, there is no chance that they don't match.
Ignoring the few items that were being initialized,
this is what used to be in FvwmForm.h.
It looked to me like you removed this also.

Anyway, I'm over it.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 30 Dec 2000 15:32:31 +0100

> It looked to me like you removed this also.

By accident.  I didn't realise there were more
definitions/declarations.  I didn't care about the extern/EXTERN
stuff but only about the initialisations.  I removed the EXTERN
and IamTheMain macros because I thought they were not necessary
anymore.

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Sat, 30 Dec 2000 11:14:14 -0500

Dominik Vogt <[email-masked]> writes:
> > >       #define EXTERN

Actually, I believe the initializations became unnecessary after
some recent changes for some memory leaks.  It looks like I misinterpreted
what you were trying to do.

No, I don't see any point into changing it again.  Its fine as is.