X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <569C211D.1050505@iee.org> Date: Sun, 17 Jan 2016 23:17:49 +0000 From: "M. J. Everitt (m DOT j DOT everitt AT iee DOT org) [via geda-user AT delorie DOT com]" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: geda-user AT delorie DOT com Subject: Re: [geda-user] PCB netlist storage ? References: <20160117223434 DOT 3a82b1b69b8a9614cc490965 AT gmail DOT com> <569C0C4F DOT 2030908 AT iee DOT org> <20160117235951 DOT cd644f53495ce746bcba28a4 AT gmail DOT com> In-Reply-To: <20160117235951.cd644f53495ce746bcba28a4@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:sDM38nKYCRurr8m9amKI7dnvUpLFOZ6tYipkblSewYWDdRgbGgZ lu90cDc97E+k0Qw113CeEXJptQdaKTWtp6fbWOfW1s9gOIbg9lqUCkodD9rXR1HyVeoQmhl pH54CUNy47W/i8SMysT5UUYrD56vLpwTRrjZNP5KbtBt9EHnrs6j03YFfW50r2FSa+vit2s ksjPYUzxFjLKNN1vg45SA== X-UI-Out-Filterresults: notjunk:1;V01:K0:0u7Zdsowg3E=:BlvWzyqVny7CwE07xyrLLW 57VqNihGUtkgc55xeqTA+rLp2z/+40+gKLuk1XJPRpALl4tKmfwCVIP53DmZ8UjKfzRksGBBN tCq8dGp+6PNEBUS0wl9lklxtoIKIn0W03Gdsw/s4coS+xdqQH4rv0KS2Cjrnw+ieauT/4s0H9 QjcBYMWaBnJV3lfsBlVM4Hw8efjjU7iyM9wd/I/5C5mBvSLRZhZ4yHba0Zm2Rt+mC3GAv2mpo dp9M/OXBbQ+ioCwoBZC1NPAx1gYPSQsffs5h1eaaGh9CewHlEG9j9DHb4NN7K/nQKt71cLxZK niiWK0W8q3MRfoHnxMgZnXO/LRjiiu3hQcb8GyHOAFrOmeXiW9FmBM2E0dVLV4ctS6Jxb2hyN /WZxEaXT5uxIPtyFDTkuqlviqVK9dP3MiewNc3i3wz4va0o6UGBHTi6DOEsnOx8ps/8zXqFj8 AdburfFeY8xWqZdkpZAX4W/kz9nNelGZkt5pR8wwL4nJIo93/8MCrxFRWKL9aFwJGvKRE9HdM dy78k4A2PDVTvfsdgUKZCEgoASjXP2EBKrGCV679Nt7ntCbcU5wP2SVaAeCZPMCkQA+x7HcDS Kz3Fg11kBxW1tfBLLJ54oBPAIUsmXuHzh4QrpdZCH21PURi7990UKMYc4XuIe9tPtz6TXC6BM S8fkQDGJGXZ7enXAxYAG7dkxJuA7+4lAraUE6suqX9HSIxhPkwAxdBK+/pn9X1JFhGwUur+GO 0WYNsc5plrNuxfm3 Reply-To: geda-user AT delorie DOT com On 17/01/16 22:59, Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: >> On 17/01/16 21:34, Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via >> geda-user AT delorie DOT com] wrote: >>> Netnames are stored in PCB->NetlistLib.Menu[i].Name as text. >>> Refdes pin number is stored in PCB->NetlistLib.Menu[i].Entry[j].ListEntry as text. >>> >>> Different programming styles, coding standards, position of braces, ... do not disturb me. Variable reuse and type reuse however I consider bad. I usually try to keep variables as local as possible and sometimes even add braces with an extra block just to get a local variable within this block. >>> >>> Do anyone more than me think it would be a good idea to give netlists an own type hierarchy? >>> >>> Nicklas Karlsson >> Idiot question here .. but what on earth is the significance of "Menu[i]" ?! >> >> Nicklas, possibly some better type-d structures, but not knowing the >> internal code .. couldn't say possibly how!! > Menu[i] is number "i" netlist stored, the following row print the netlist name and refdes-pin: > printf(" in [%s] (%s)\n", PCB->NetlistLib.Menu[i].Name, PCB->NetlistLib.Menu[i].Entry[j].ListEntry); > Name of fields make me confused. > > This is varariable there netlists are stored: > LibraryType NetlistLib; > > Variable "MenuN" is number of stored netlists, variable "Menu" is the array of netlists: > typedef struct > { > Cardinal MenuN; /*!< Number of objects. */ > Cardinal MenuMax; /*!< Number of reserved memory locations. */ > LibraryMenuType *Menu; /*!< The entries. */ > } LibraryType; > > Variable "Name" is the name of the netlist, variable "Entry" is the refdes-pin values for this netlist: > typedef struct > { > char *Name; /*!< Name of the menu entry. */ > char *directory; /*!< Directory name library elements are from. */ > char *Style; /*!< Routing style. */ > Cardinal EntryN; /*!< Number of objects. */ > Cardinal EntryMax; /*!< Number of reserved memory locations. */ > LibraryEntryType *Entry; /*!< The entries. */ > char flag; /*!< Used by the netlist window to enable/disable nets. */ > char internal; /*!< If set, this is an internal-only entry, not > * part of the global netlist. */ > } LibraryMenuType; > > Name of this fields for the refdes-pin values make me confused: > typedef struct > { > char *ListEntry; /*!< The string for the selection box. */ > char *AllocatedMemory; /*!< Pointer to allocated memory; > all others point to parts of the string. */ > char *Template; /*!< m4 template name. */ > char *Package; /*!< Package. */ > char *Value; /*!< The value field. */ > char *Description; /*!< Some descriptional text. */ > } LibraryEntryType; > > It works so I do not suggest any changes but it make me confused. > > > Nicklas Karlsson Thanks for that Nicklas .. I can fully appreciate why you would be confused, because I was too :] !