pcb-rnd knowledge pool

 

Removing the 2-level-tree limitation of the footprint lib

library_t by Tibor 'Igor2' Palinkas on 2016-04-19

Tags: announcement, footprint, library, lib, directory, tree

node source

 

 

Abstract: The original code and gEDA/PCB have a special setup for representing trees, C structures called LibraryMenu and LibraryEntry. This system can represent only a subset of trees: there is a root, a level consist of directories only and a next level, each directory consist of data nodes only. This limitation has been removed.

 

The original module was enough for newlib, which strictly followed this model in the file system hierarchy. The lesstif HID also hardwired this two-level tree structure in the GUI.

In pcb-rnd this has been replaced with a new struct type called library_t that can represent an arbitrary tree: directories and files within directories down to many levels.

Both the gtk and the lesstif had has been modified accordingly and can properly display the tree. This in turn enables alternative footprint backend implementations such as fp_wget to import more complex libraries, e.g. the one on edakrill or gedasymbols.org.