Index: [thread] [date] [subject] [author]
  From: Samuel A. Falvo II <kc5tja@dolphin.openprojects.net>
  To  : ggi-develop@eskimo.com
  Date: Thu, 13 May 1999 10:43:32 -0700

Re: Semi-Snag in PyGGI...

> int block_size=(number_of_pixels*actual_pixel_size_in_bytes);
> ggi_pixel p=ggiMapColor(vis, &color);
> ggi_pixel *pixel_buffer=(ggi_pixel*)malloc(block_size);
> ggi_pixel *p=pixel_buffer

sample_code.c:4: Duplicate definition of 'p' -- original definition was
sample_code.c:4: ggi_pixel, new definition is ggi_pixel *.

> for(i=0;i<number_of_pixels;i++){
>     *pixel_buffer=p;

sample_code.c:6: 'p' undefined.

>     p+=actual_pixel_size_in_bytes;

sample_code.c:7: 'p' undefined.

> I'm thinking there's something wrong with my pointer arithmetic there.. but that's
> a small detail to iron out.

I don't even know what you're trying to do.  :-) With three different uses
of the 'p' variable above, two of which a compiler would catch, "all
guarantees are off." :-)

==========================================================================
      KC5TJA/6     |                  -| TEAM DOLPHIN |-
        DM13       |                  Samuel A. Falvo II
    QRP-L #1447    |          http://www.dolphin.openprojects.net
   Oceanside, CA   |......................................................

Index: [thread] [date] [subject] [author]