Index: flag_str.c =================================================================== --- flag_str.c (revision 15868) +++ flag_str.c (revision 15869) @@ -60,34 +60,34 @@ #define N(x) x, sizeof(x)-1 #define FN(x) x, #x pcb_flag_bits_t pcb_object_flagbits[] = { - {FN(PCB_FLAG_PIN), N("pin"), PCB_TYPEMASK_ALL, "If set, this object is a pin. This flag is for internal use only." }, - {FN(PCB_FLAG_VIA), N("via"), PCB_TYPEMASK_ALL, "If set, this object is a via. This flag is for internal use only." }, - {FN(PCB_FLAG_FOUND), N("found"), PCB_TYPEMASK_ALL, "If set, this object has been found by FindConnection()" }, + {FN(PCB_FLAG_PIN), N("pin"), PCB_OBJ_ANY, "If set, this object is a pin. This flag is for internal use only." }, + {FN(PCB_FLAG_VIA), N("via"), PCB_OBJ_ANY, "If set, this object is a via. This flag is for internal use only." }, + {FN(PCB_FLAG_FOUND), N("found"), PCB_OBJ_ANY, "If set, this object has been found by FindConnection()" }, {FN(PCB_FLAG_HOLE), N("hole"), PCB_TYPEMASK_PIN, "For pins and vias, this flag means that the pin or via is a hole without a copper annulus." }, - {FN(PCB_FLAG_RAT), N("rat"), PCB_TYPE_RATLINE, "If set for a line, indicates that this line is a rat line instead of a copper trace." }, + {FN(PCB_FLAG_RAT), N("rat"), PCB_OBJ_RAT, "If set for a line, indicates that this line is a rat line instead of a copper trace." }, {FN(PCB_FLAG_PININPOLY), N("pininpoly"), 0, "For pins and pads, this flag is used internally to indicate that the pin or pad overlaps a polygon on some layer." }, - {FN(PCB_FLAG_CLEARPOLY), N("clearpoly"), PCB_TYPE_POLY, "For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. " }, + {FN(PCB_FLAG_CLEARPOLY), N("clearpoly"), PCB_OBJ_POLY, "For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. " }, {FN(PCB_FLAG_HIDENAME), N("hidename"), 0, "For elements, when set the name of the element is hidden." }, {FN(PCB_FLAG_DISPLAYNAME), N("showname"), 0, "OBSOLETE: For elements, when set the names of pins are shown." }, - {FN(PCB_FLAG_CLEARLINE), N("clearline"), PCB_TYPE_LINE | PCB_TYPE_ARC | PCB_TYPE_TEXT | PCB_TYPE_PSTK, "For lines and arcs, the line/arc will clear polygons instead of connecting to them." }, - {FN(PCB_FLAG_SELECTED), N("selected"), PCB_TYPEMASK_ALL, "Set when the object is selected."}, - {FN(PCB_FLAG_ONSOLDER), N("onsolder"), PCB_TYPE_TEXT, "For text, indicates that it is on the solder side."}, - {FN(PCB_FLAG_AUTO), N("auto"), PCB_TYPEMASK_ALL, "For lines and vias, indicates that these were created by the autorouter."}, + {FN(PCB_FLAG_CLEARLINE), N("clearline"), PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_TEXT | PCB_OBJ_PSTK, "For lines and arcs, the line/arc will clear polygons instead of connecting to them." }, + {FN(PCB_FLAG_SELECTED), N("selected"), PCB_OBJ_ANY, "Set when the object is selected."}, + {FN(PCB_FLAG_ONSOLDER), N("onsolder"), PCB_OBJ_TEXT, "For text, indicates that it is on the solder side."}, + {FN(PCB_FLAG_AUTO), N("auto"), PCB_OBJ_ANY, "For lines and vias, indicates that these were created by the autorouter."}, {FN(PCB_FLAG_SQUARE), N("square"), 0, "For pins and pads, indicates a square (vs round) pin/pad."}, - {FN(PCB_FLAG_RUBBEREND), N("rubberend"), PCB_TYPE_LINE | PCB_TYPE_ARC, "For lines, used internally for rubber band moves: indicates one end already rubber banding."}, + {FN(PCB_FLAG_RUBBEREND), N("rubberend"), PCB_OBJ_LINE | PCB_OBJ_ARC, "For lines, used internally for rubber band moves: indicates one end already rubber banding."}, {FN(PCB_FLAG_WARN), N("warn"), PCB_TYPEMASK_PIN, "For pins, vias, and pads, set to indicate a warning."}, - {FN(PCB_FLAG_USETHERMAL), N("usetherm"), PCB_TYPEMASK_PIN | PCB_TYPE_LINE | PCB_TYPE_ARC, "Obsolete, indicates that pins/vias should be drawn with thermal fingers."}, + {FN(PCB_FLAG_USETHERMAL), N("usetherm"), PCB_TYPEMASK_PIN | PCB_OBJ_LINE | PCB_OBJ_ARC, "Obsolete, indicates that pins/vias should be drawn with thermal fingers."}, {FN(PCB_FLAG_OCTAGON), N("octagon"), 0, "Draw pins and vias as octagons." }, - {FN(PCB_FLAG_DRC), N("drc"), PCB_TYPEMASK_ALL, "Set for objects that fail DRC: flag like FOUND flag for DRC checking."}, - {FN(PCB_FLAG_LOCK), N("lock"), PCB_TYPEMASK_ALL, "Set for locked objects."}, - {FN(PCB_FLAG_EDGE2), N("edge2"), PCB_TYPEMASK_ALL, "For pads, indicates that the second point is closer to the edge. For pins, indicates that the pin is closer to a horizontal edge and thus pinout text should be vertical. (Padr.Point2 is closer to outside edge also pinout text for pins is vertical)" }, - {FN(PCB_FLAG_FULLPOLY), N("fullpoly"), PCB_TYPE_POLY, "For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one)." }, + {FN(PCB_FLAG_DRC), N("drc"), PCB_OBJ_ANY, "Set for objects that fail DRC: flag like FOUND flag for DRC checking."}, + {FN(PCB_FLAG_LOCK), N("lock"), PCB_OBJ_ANY, "Set for locked objects."}, + {FN(PCB_FLAG_EDGE2), N("edge2"), PCB_OBJ_ANY, "For pads, indicates that the second point is closer to the edge. For pins, indicates that the pin is closer to a horizontal edge and thus pinout text should be vertical. (Padr.Point2 is closer to outside edge also pinout text for pins is vertical)" }, + {FN(PCB_FLAG_FULLPOLY), N("fullpoly"), PCB_OBJ_POLY, "For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one)." }, {FN(PCB_FLAG_NOPASTE), N("nopaste"), 0, "Pad should not receive solderpaste. This is to support fiducials" }, - {FN(PCB_FLAG_NONETLIST), N("nonetlist"), PCB_TYPEMASK_ALL, "subcircuit is not on the netlist and should not interfere with the netlist "}, - {FN(PCB_FLAG_TERMNAME), N("termname"), PCB_TYPE_LINE | PCB_TYPE_ARC | PCB_TYPE_POLY | PCB_TYPE_TEXT | PCB_TYPE_PSTK | PCB_TYPE_SUBC, "when set the names of pins are shown."}, - {FN(PCB_FLAG_CLEARPOLYPOLY), N("clearpolypoly"), PCB_TYPE_POLY, "For polygons, apply clearance to nearby polygons" }, - {FN(PCB_FLAG_DYNTEXT), N("dyntext"), PCB_TYPE_TEXT, "For text: dynamic string (substitute %patterns%)"}, - {FN(PCB_FLAG_FLOATER), N("floater"), PCB_TYPEMASK_ALL, "subc part can be moved after subc placing"} + {FN(PCB_FLAG_NONETLIST), N("nonetlist"), PCB_OBJ_ANY, "subcircuit is not on the netlist and should not interfere with the netlist "}, + {FN(PCB_FLAG_TERMNAME), N("termname"), PCB_OBJ_LINE | PCB_OBJ_ARC | PCB_OBJ_POLY | PCB_OBJ_TEXT | PCB_OBJ_PSTK | PCB_OBJ_SUBC, "when set the names of pins are shown."}, + {FN(PCB_FLAG_CLEARPOLYPOLY), N("clearpolypoly"), PCB_OBJ_POLY, "For polygons, apply clearance to nearby polygons" }, + {FN(PCB_FLAG_DYNTEXT), N("dyntext"), PCB_OBJ_TEXT, "For text: dynamic string (substitute %patterns%)"}, + {FN(PCB_FLAG_FLOATER), N("floater"), PCB_OBJ_ANY, "subc part can be moved after subc placing"} }; #undef N #undef FN @@ -434,7 +434,7 @@ * * Note that this function knows a little about what kinds of flags * will be automatically set by parsing, so it won't (for example in - * the old data model) include the "via" flag for PCB_TYPE_VIAs because + * the old data model) include the "via" flag for PCB_OBJ_VIAs because * it knows those get forcibly set when vias are parsed. */ char *pcb_strflg_common_f2s(pcb_flag_t flags, int object_type, pcb_flag_bits_t * flagbits, int n_flagbits, unsigned char *intconn) { @@ -448,7 +448,7 @@ #ifndef FLAG_TEST switch (object_type) { - case PCB_TYPE_RATLINE: + case PCB_OBJ_RAT: PCB_FLAG_CLEAR(PCB_FLAG_RAT, &fh); break; } @@ -582,7 +582,7 @@ char *pcb_strflg_board_f2s(pcb_flag_t flags) { - return pcb_strflg_common_f2s(flags, PCB_TYPEMASK_ALL, pcb_flagbits, PCB_ENTRIES(pcb_flagbits), NULL); + return pcb_strflg_common_f2s(flags, PCB_OBJ_ANY, pcb_flagbits, PCB_ENTRIES(pcb_flagbits), NULL); } pcb_flag_t pcb_strflg_board_s2f(const char *flagstring, int (*error) (const char *msg))