1. Floats

I figured out that the reason that scrollbars weren't working in GtkLib was
because I was using C_LONG instead of C_FLOAT when passing arguments to the
DLL.

So I figured that accessing data structures with floats in them would
require float32_to_atom, but I only got garbage back. Finally, I tried using
peek4s, and the value came back correctly.

This has me scratching my head. The only thing that I can think of is that
perhaps the Win32 port of Gtk is using longs in the data structure instead
of floats.

I haven't had a chance to test this under Linux, because my file system got
trashed three times last night, forcing a reload each time. The final straw
was when the system rebooted because of an error while *compiling* code (no,
I wasn't running as root) and hosed X Windows. [insert Very Unhappy Camper
noises].

What gives with this float stuff?

-- David Cuny

new topic     » topic index » view message » categorize

2. Re: Floats

David
  In my win32api.ew library in the user area. My routines ContentsOf and
  StoreIn contain code for handling peek and poke of floats and doubles
  in structures.
Bernie

new topic     » goto parent     » topic index » view message » categorize

3. Re: Floats

Bernie Ryan wrote:

> In my win32api.ew library in the user area. My routines
> ContentsOf and StoreIn contain code for handling peek and
> poke of floats and doubles in structures.

It looks like the same code as my fetch() routine was using. I guess the
Win32 port is storing signed longs instead of floats after all. Bizarre...

Thanks!

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

4. Re: Floats

On Wed, 29 Sep 1999, David Cuny wrote:
>
> I haven't had a chance to test this under Linux, because my file system got
> trashed three times last night, forcing a reload each time. The final straw
> was when the system rebooted because of an error while *compiling* code (no,
> I wasn't running as root) and hosed X Windows. [insert Very Unhappy Camper
> noises].

Dave:

There must be a serious problem with your installation. There's just no way
that a runaway program - especially a compiler - could cause a reboot.
Worst case would be a seemingly hung computer, where some process was
gobbling up 99% of the cpu time. Even in that case, eventually you
should be able to kill the job from the console.

I had problems like this when using Mandrake Linux - I think it was compiled
specifically for Pentiums, and didn't really like the Cyrix chip.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

5. Re: Floats

Irv Mullins wrote:

>There must be a serious problem with your
> installation. There's just no way that a runaway
> program - especially a compiler - could cause
> a reboot.

This has happened to me on more than one occasion. Typically, I'd have done
something really boneheaded, like confused Euphoria's sprintf with C's.
*poof*
The machine acts like I had thrown the reset switch. One thing that really
bugs me is that Linux gets *very* unhappy when you just pull the power on
it.

> I had problems like this when using Mandrake Linux -
> I think it was compiled specifically for Pentiums, and
> didn't really like the Cyrix chip.

I've got a Mandrake 6.0, with a real Pentium in my computer. I heard that
Red Had had rushed their release. Hopefully the 6.1 release is more stable,
or I'll have to look at another distribution.

Thanks.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

6. Re: Floats

David
   I don't think the reboots have anything to do the OS.
   When is the last time you ran a extensive memory
   test on that linux PC. It sounds to me like you
   are experiencing  a memory compatibilty problem.
   The memory that you are using may be having a problem
   with your motherboard. The memory may not be seated properly
   or the cmos settings may not be set properly for the memory
   that you are using. Also be sure you are not using mixed memory.
Bernie

new topic     » goto parent     » topic index » view message » categorize

7. Re: Floats

Bernie Ryan wrote:

> I don't think the reboots have anything to do the OS.
> When is the last time you ran a extensive memory
> test on that linux PC?

Fairly recently, actually.

> The memory that you are using may be having a
> problem with your motherboard...

Quite possibly - the machine used to randomly reboot under Win95, although
that seems to have gone away. Under Linux, there are certain actions that
will consistantly cause a reboot.

Thanks!

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu