X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=wJvxXYHCRBrQOnWxEcj3E0HxsCwL0AWOHDfNcOLmMX0=; b=Asy9x0r2Hroeo+wr5TcKLogIOFWj6fBNJxNG8iZgcdIlvE7HPTPdPHila01UKVMRNR CsaktYg5Nvt68fw8R1Nw1b6M8yv49Wsyeu48K3LyO0iR6WfKkeqKOzYy+8XAQIte4QaF WAQ6daqUUNh/76Dihz9kD/D49At5BTFSJ9eJN1GQ+3Lw8mjVppcv9XSzrTgnnCal4QZZ i/Abon7W8h8qdawr64N72ax5aJ4sJT08DFjCuK4M/bOyiauJOWQ4F8u18l07gO3yDwV/ yg47RbbkBsCg/4dPY0Q02jviOU0+fCvkSWcCWJ0ZSxrk2Gly5Yc9dRpTdcWe8eAEZQVo Y0Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=wJvxXYHCRBrQOnWxEcj3E0HxsCwL0AWOHDfNcOLmMX0=; b=hhf48+6t9EQijMUhhW3NjGTVKfgp5lEI187+DQ8KdaRupx9Y4gUUeXOJhyQLe8ESQo DuwBoDLBIum2eB+VbymVO+caCnRnNQpLnz0OGfhiAWYYTzYFUQBwAXNAC0SXuEuzqMU+ ZWIi8u5UUgdsr229+IpPP1djaDEx9ECmNSktn0QB2j6Q3cfD4EgDz8jBCcGTdYBWmTZr bnharxQp+BZTrmIrM5Q1lBiTEo7InzBV+JIrdhX1PH+6WaoSGGMXD82AO8IikHvwHyEf EB+cAHbkJtKbE2NJlbSGFaOyps6nZybZC3tx0jKmFzAC80XgeLhvSv7p4QVXCcsLPO3A EYQg== X-Gm-Message-State: AD7BkJKgYwf+ovofXXHT7nKMnsAvfAs/J6aKg+A0RVmMbbaAVoYfN5q79nkRm7MApdQhDlJRCn+l04zQTpV/0Q== MIME-Version: 1.0 X-Received: by 10.28.143.9 with SMTP id r9mr4117977wmd.37.1456611665127; Sat, 27 Feb 2016 14:21:05 -0800 (PST) In-Reply-To: <201602262010.u1QKA2Hf024379@envy.delorie.com> References: <201602260114 DOT u1Q1EFRk019336 AT envy DOT delorie DOT com> <201602262010 DOT u1QKA2Hf024379 AT envy DOT delorie DOT com> Date: Sat, 27 Feb 2016 13:21:05 -0900 Message-ID: Subject: Re: [geda-user] Re: re-instituting GetXY() From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Content-Type: text/plain; charset=UTF-8 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, Feb 26, 2016 at 11:10 AM, DJ Delorie wrote: > > In ./hid/common/actions.c we see: > > if (a->need_coord_msg) > gui->get_coords (_(a->need_coord_msg), &x, &y); > > This is set from these: > > {"GetXY", "", GetXY, > getxy_help, getxy_syntax}, > > {"GetXY", "", GetXY, getxy_help, getxy_syntax}, > > Note the "" which both triggers the get_coords but provides no > message. > > Perhaps it would be better to pass NULL to those and change the two > GetXY() implementations to be like this (caveat error checks et al): > > static int > GetXY (int argc, char **argv, Coord x, Coord y) > { > gui->get_coords(argv[0], &x, &y); > return 0; > } Seems to work. So I guess doing things this way the &x and &y args aren't used for anything, and the rest of the actions in the sequence know to get the coordinates from a global somewhere? It looks like there are only a handful of actions that set need_coord_msg non-NULL. Is there any reason to have both mechanisms? I haven't run into anything that seems to need multiple clicks. Britton