[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: illegal layer-group string



> It appears that the problem is on line 769 of misc.c:
> 
> if (layer > LayerN + MAX (SOLDER_LAYER, COMPONENT_LAYER) ||
> 	      member >= LayerN + 1)
> 		    goto error;
> 	  groupnum[layer] = group;
> 	  LayerGroup->Entries[group][member++] = layer;
> 	  while (*++s && isdigit ((int) *s));
> 
> I'm not familiar with how the flexible layer count patch works.  Is there
> an ultimate limit to the number of layers?

"max_layer" is the current number of layers (and, in theory, layer
groups).

"MAX_LAYER" is the compile-time upper limit to the number of layers.
This is used to declare arrays, for example.

> It appears that groupnum is defined in terms of MAX_LAYER.  Perhaps
> we can simply increment MAX_LAYER and whatever LayerGroup->Entries
> is defined in terms of.  Of course, if there is no longer a
> predetermined hard limit (or any limit at all) then we'll have to do
> something more intelligent...

That function is interesting because it needs to treat "c" and "s"
according to the number of layers the pcb *has*, not MAX_LAYER.
That's why we pass LayerN, it replaces MAX_LAYER for that purpose.  We
also have to defer parsing the grouping string until we know how many
layers the pcb has.

Also check LayerGroupsToString, which converts the groups table to the
string form.
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user