www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/12/18/20:58:19

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: <CAC4O8c_Jc98kmjDp_O2hKbY9BWWAjGk+nb0L5L=jqXfeTAYGGA AT mail DOT gmail DOT com>
<201512152309 DOT tBFN90dS016514 AT envy DOT delorie DOT com>
<CAC4O8c8jaeiyrD4eEcWAR69GC=nd__gBLfPtstNUfQDAstvBcA AT mail DOT gmail DOT com>
<201512162012 DOT tBGKC3w8013222 AT envy DOT delorie DOT com>
Date: Fri, 18 Dec 2015 16:57:55 -0900
Message-ID: <CAC4O8c8gpnNWnNicZwsbGKZ8L8pkc5W-vaxpT_Q+YV54u_gKtg@mail.gmail.com>
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]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
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

--047d7b5d49769ea77705273695d3
Content-Type: text/plain; charset=UTF-8

On Wed, Dec 16, 2015 at 11:12 AM, DJ Delorie <dj AT delorie DOT com> 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

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, Dec 16, 2015 at 11:12 AM, DJ Delorie <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:dj AT delorie DOT com" target=3D"_blank">dj AT delorie DOT com</a>&gt;</spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><span class=3D""><br>
&gt; &gt; I note you use // for comments.=C2=A0 If we&#39;re going this rou=
te, we should<br>
&gt; &gt; update configure to test for a C99-compliant compiler.<br>
&gt;<br>
&gt; This is probably a pretty safe assumption now.<br>
<br>
</span>Still, a check would be nice.<br>
<span class=3D""><br>
&gt; It bugs me too.=C2=A0 The C alternatives I&#39;m aware of are:<br>
<br>
</span>#define Point Vec<br></blockquote><div><br></div><div style=3D"">Fun=
ny what you don&#39;t think of.=C2=A0 Seems a good way, no need for the com=
piler to know what&#39;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&#39;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.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">
&gt; &gt; I think the debug markers should either be removed for now, or<br=
>
&gt; &gt; &quot;completed&quot; - added to all HIDs and documented with som=
e<br>
&gt; &gt; programmer-specific documentation.<br>
&gt;<br>
&gt; Would you settle for stubs in the non-gtk HIDs, and programmer<br>
&gt; documentation?<br>
&gt; It&#39;s not obvious to me how to do it in lesstif and I have no real =
motivation<br>
&gt; to figure it out.=C2=A0 What do you mean by programmer documentation b=
esides<br>
&gt; comments in hid.h?<br>
<br>
</span>Sure.=C2=A0 At the moment, it&#39;s just a couple extra functions th=
at nobody<br>
calls and aren&#39;t documented.=C2=A0 I still don&#39;t really know what t=
hey&#39;re<br>
used for...<br></blockquote><div><br></div><div style=3D"">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&#39;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&#39;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?</div><div>=C2=A0</div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex"><span class=3D"">
&gt; &gt; The right way to ignore square flags on arcs is to update the fla=
g<br>
&gt; &gt; parsing table so that it&#39;s not in the supported flags... oh w=
ait, it&#39;s<br>
&gt; &gt; already ignored there.<br>
&gt;<br>
&gt; I didn&#39;t find this table... so I can just take out all the square =
arc stuff<br>
&gt; and it should do the right thing (though a message would be nice reall=
y)?<br>
<br>
</span>strflags.c<br>
<br>
There are a lot of unsupported flags that we don&#39;t error (or warn)<br>
for, if you want to add warnings for them, go for it :-)<br></blockquote><d=
iv><br></div><div style=3D"">Ok, I&#39;ve done this.=C2=A0 I just added som=
e code to complain and clear the flag if it&#39;s type doesn&#39;t support =
it according to the tables.</div><div style=3D"">For now its only called fo=
r arcs but can be added for other types later.</div><div><br></div><div sty=
le=3D"">Britton</div></div></div></div>

--047d7b5d49769ea77705273695d3--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019