From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 2419 invoked from network); 3 Feb 1999 23:03:02 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 3 Feb 1999 23:03:02 -0000 Received: from kla-tencor.com (mail01.kla-tencor.com [206.67.220.38]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id RAA10888 for ; Wed, 3 Feb 1999 17:55:46 -0500 Received: from milxbh02.kla-tencor.com by kla-tencor.com (8.8.5/KLA-Tencor.3.6ir) id OAA19415; Wed, 3 Feb 1999 14:55:14 -0800 (PST) Received: by outlook with Internet Mail Service (5.5.2448.0) id <1GAMR470>; Wed, 3 Feb 1999 14:53:01 -0800 Message-ID: From: "Lagodzinski, Andrew" To: axp-list@redhat.com Subject: RE: So Y is my pointer so bogus Date: Wed, 3 Feb 1999 14:57:57 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" try this: a = ((int *)a) +(x2-x1-x3)*P + (y2-y1-y3)*S; Not the extra parens around (int*)a. > -----Original Message----- > From: Uncle George [mailto:gatgul@voicenet.com] > Sent: Wednesday, February 03, 1999 2:36 PM > To: axp-list@redhat.com > Cc: recipient list not shown; > @redhat.com@kla-tencor.com@kla-tencor.com@kla-tencor.com > Subject: So Y is my pointer so bogus > > > This little example caused a (un-expected ) pointer failure in one of > the font routines in my java 1.2 port on linux/alpha. It was > expected to > add a -1760 ( -1760 * sizeof(int)) but does not. > Ugg. what is a 64bitter to do. > gat > main() > { > > int x1,x2,x3; > int y1,y2,y3; > unsigned int P; > unsigned int S; > void *a; > > a = (void *)0; > x1=20,x2=0,x3=0; > y1=5, y2=0,y3=0; > P = 1; > S = 348; > > a = (int *)a +(x2-x1-x3)*P + (y2-y1-y3)*S; > printf("a = %p\n",a); > } > > > > > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com >