Subject: Re: Atomic SendText nonworkie

From: [email-masked]
Date: Wed, 17 Mar 1999 12:10:53 -0500

[email-masked] (Paul D. Smith) writes:

> For example:

>   long buf[256];    /* 1024 bytes where sizeof(long) == 4 */

I'd suggest

long buf[1024 / sizeof(long int)]

- Bob

--
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: Brad Giaccio <[email-masked]>
Date: Wed, 17 Mar 1999 12:16:00 -0500

> long buf[1024 / sizeof(long int)]

I was thing along those lines but I think we want a calloc a lot of
compilers don't allow variable size args in array declerations.

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
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: [email-masked] (Paul D. Smith)
Date: 17 Mar 1999 12:46:31 -0500

>> long buf[1024 / sizeof(long int)]

  bg> I was thing along those lines but I think we want a calloc a lot
  bg> of compilers don't allow variable size args in array declerations.

??

That's not variable.  sizeof() is evaluated at compile time, not
runtime, and the resulting expression is thus constant.

We do this kind of thing all the time.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
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: Brad Giaccio <[email-masked]>
Date: Wed, 17 Mar 1999 13:00:37 -0500

> We do this kind of thing all the time.

There I go mixing programming languages again, just ignore me on this
one I got a little confused.  I've gotten in the habit of thinking of
evertyhing as a function and of course you are right the compiler takes
care of sizeof.

Opps,
Brad