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 :content-type; bh=98GHVBGpAbdLN3WQFgEPB6KnhDWQHFZbq1bKw+OZzQs=; b=jRNysVIi6sOQEKSMcMDKULstvc0bLCtEEbEi8b6p7xmFp5EVazvRRzVxallrFuY3MH 0y/LrevCGQKJ6aQGz0Y5Vl03XElDYMjoTsUDxdknz2Furvx4ZQ52GArpqzy72Ks8ouNH EiL/FLwlFzuYGKUKpu8pOP2pkIjIycWUmK5Itf1lPMN9hf/3ZMz4po2//adu4Ep0xgj0 gQkbs85pBwE9pp+G/2GTld59nL0eAxznctxnlvJtFlIei61zEeeqm92VaDV8GQ6gXaKl 0JyMOUYCOGgeNvG8SHpCRz/5S3J/USBValR4qlsZxJxQ8cVULQFF3AhDNyZW4HuLyq/d l+Dg== MIME-Version: 1.0 X-Received: by 10.194.6.196 with SMTP id d4mr7082283wja.120.1450490275470; Fri, 18 Dec 2015 17:57:55 -0800 (PST) In-Reply-To: <201512162012.tBGKC3w8013222@envy.delorie.com> References: <201512152309 DOT tBFN90dS016514 AT envy DOT delorie DOT com> <201512162012 DOT tBGKC3w8013222 AT envy DOT delorie DOT com> Date: Fri, 18 Dec 2015 16:57:55 -0900 Message-ID: Subject: Re: [geda-user] merge please (or rebase if you must) 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: multipart/alternative; boundary=047d7b5d49769ea77705273695d3 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 --047d7b5d49769ea77705273695d3 Content-Type: text/plain; charset=UTF-8 On Wed, Dec 16, 2015 at 11:12 AM, DJ Delorie wrote: > > > > I note you use // for comments. If we're going this route, we should > > > update configure to test for a C99-compliant compiler. > > > > This is probably a pretty safe assumption now. > > Still, a check would be nice. > > > It bugs me too. The C alternatives I'm aware of are: > > #define Point Vec > Funny what you don't think of. Seems a good way, no need for the compiler to know what's going on in this case. At first I though this would break down for the signatures of functions that take arguments which could be either Point or Vec, but I think I got over it. This seems to be saying that Point is-a Vec (implicitly from 0, so restricted in a sense), which means routines that would take a supertype if one existed (e.c. vec_from()) can still use Vec in argument signatures without the choice being arbitrary. So it's like it is now with Vec the supertype, only you can specify the more specific Point sub-type many places for readability. > > > I think the debug markers should either be removed for now, or > > > "completed" - added to all HIDs and documented with some > > > programmer-specific documentation. > > > > Would you settle for stubs in the non-gtk HIDs, and programmer > > documentation? > > It's not obvious to me how to do it in lesstif and I have no real > motivation > > to figure it out. What do you mean by programmer documentation besides > > comments in hid.h? > > Sure. At the moment, it's just a couple extra functions that nobody > calls and aren't documented. I still don't really know what they're > used for... > Any time you make a geometrical calculation that spits out something that can be represented with a point or two, its an easy way to check if it's doing what is expected regardless of scale or background color. So you can easily check intermediate results and such. I tried to document them by commenting them in hid.h. If the comments don't make it clear what they are for please advise how to change them. Where would you like them documented besides hid.h? > > > The right way to ignore square flags on arcs is to update the flag > > > parsing table so that it's not in the supported flags... oh wait, it's > > > already ignored there. > > > > I didn't find this table... so I can just take out all the square arc > stuff > > and it should do the right thing (though a message would be nice really)? > > strflags.c > > There are a lot of unsupported flags that we don't error (or warn) > for, if you want to add warnings for them, go for it :-) > Ok, I've done this. I just added some code to complain and clear the flag if it's type doesn't support it according to the tables. For now its only called for arcs but can be added for other types later. Britton --047d7b5d49769ea77705273695d3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Dec 16, 2015 at 11:12 AM, DJ Delorie <dj AT delorie DOT com> wrote:

> > I note you use // for comments.=C2=A0 If we're going this rou= te, we should
> > update configure to test for a C99-compliant compiler.
>
> This is probably a pretty safe assumption now.

Still, a check would be nice.

> It bugs me too.=C2=A0 The C alternatives I'm aware of are:

#define Point Vec

Fun= ny what you don't think of.=C2=A0 Seems a good way, no need for the com= piler to know what's going on in this case.=C2=A0 At first I though thi= s would break down for the signatures of functions that take arguments whic= h could be either Point or Vec, but I think I got over it.=C2=A0 This seems= to be saying that Point is-a Vec (implicitly from 0, so restricted in a se= nse), which means routines that would take a supertype if one existed (e.c.= vec_from()) can still use Vec in argument signatures without the choice be= ing arbitrary.=C2=A0 So it's like it is now with Vec the supertype, onl= y you can specify the more specific Point sub-type many places for readabil= ity.
=C2=A0
> > I think the debug markers should either be removed for now, or > > "completed" - added to all HIDs and documented with som= e
> > programmer-specific documentation.
>
> Would you settle for stubs in the non-gtk HIDs, and programmer
> documentation?
> It's not obvious to me how to do it in lesstif and I have no real = motivation
> to figure it out.=C2=A0 What do you mean by programmer documentation b= esides
> comments in hid.h?

Sure.=C2=A0 At the moment, it's just a couple extra functions th= at nobody
calls and aren't documented.=C2=A0 I still don't really know what t= hey're
used for...

Any time you mak= e a geometrical calculation that spits out something that can be represente= d with a point or two, its an easy way to check if it's doing what is e= xpected regardless of scale or background color.=C2=A0 So you can easily ch= eck intermediate results and such.=C2=A0 I tried to document them by commen= ting them in hid.h.=C2=A0 If the comments don't make it clear what they= are for please advise how to change them.=C2=A0 Where would you like them = documented besides hid.h?
=C2=A0
> > The right way to ignore square flags on arcs is to update the fla= g
> > parsing table so that it's not in the supported flags... oh w= ait, it's
> > already ignored there.
>
> I didn't find this table... so I can just take out all the square = arc stuff
> and it should do the right thing (though a message would be nice reall= y)?

strflags.c

There are a lot of unsupported flags that we don't error (or warn)
for, if you want to add warnings for them, go for it :-)

Ok, I've done this.=C2=A0 I just added som= e code to complain and clear the flag if it's type doesn't support = it according to the tables.
For now its only called fo= r arcs but can be added for other types later.

Britton
--047d7b5d49769ea77705273695d3--