Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 8412) +++ trunk/src/gui_act.c (revision 8413) @@ -1464,9 +1464,9 @@ int ar; pcb_hid_attr_val_t rv[16]; pcb_hid_attribute_t attr[] = { - {"name", "logical layer name", HID_String, 0, 0, {0}, NULL, NULL, 0, NULL, NULL}, - {"sub: drawn using subtraction", NULL, HID_Boolean, 0, 0, {0}, NULL, NULL, 0, NULL, NULL}, - {"auto: auto-generated layer", NULL, HID_Boolean, 0, 0, {0}, NULL, NULL, 0, NULL, NULL} + {"name", "logical layer name", PCB_HATT_STRING, 0, 0, {0}, NULL, NULL, 0, NULL, NULL}, + {"sub: drawn using subtraction", NULL, PCB_HATT_BOOL, 0, 0, {0}, NULL, NULL, 0, NULL, NULL}, + {"auto: auto-generated layer", NULL, PCB_HATT_BOOL, 0, 0, {0}, NULL, NULL, 0, NULL, NULL} }; attr[0].default_val.str_value = ly->Name; Index: trunk/src/hid_attrib.c =================================================================== --- trunk/src/hid_attrib.c (revision 8412) +++ trunk/src/hid_attrib.c (revision 8413) @@ -56,36 +56,36 @@ for (i = 0; i < ha->n; i++) { pcb_hid_attribute_t *a = ha->attributes + i; switch (a->type) { - case HID_Label: + case PCB_HATT_LABEL: break; - case HID_Integer: + case PCB_HATT_INTEGER: if (a->value) *(int *) a->value = a->default_val.int_value; break; - case HID_Coord: + case PCB_HATT_COORD: if (a->value) *(pcb_coord_t *) a->value = a->default_val.coord_value; break; - case HID_Boolean: + case PCB_HATT_BOOL: if (a->value) *(char *) a->value = a->default_val.int_value; break; - case HID_Real: + case PCB_HATT_REAL: if (a->value) *(double *) a->value = a->default_val.real_value; break; - case HID_String: + case PCB_HATT_STRING: if (a->value) *(const char **) a->value = a->default_val.str_value; break; - case HID_Enum: + case PCB_HATT_ENUM: if (a->value) *(int *) a->value = a->default_val.int_value; break; - case HID_Mixed: + case PCB_HATT_MIXED: if (a->value) { *(pcb_hid_attr_val_t *) a->value = a->default_val; - case HID_Unit: + case PCB_HATT_UNIT: if (a->value) *(int *) a->value = a->default_val.int_value; break; @@ -111,9 +111,9 @@ char *ep; const pcb_unit_t *unit; switch (ha->attributes[i].type) { - case HID_Label: + case PCB_HATT_LABEL: break; - case HID_Integer: + case PCB_HATT_INTEGER: if (a->value) *(int *) a->value = strtol((*argv)[1], 0, 0); else @@ -121,7 +121,7 @@ (*argc)--; (*argv)++; break; - case HID_Coord: + case PCB_HATT_COORD: if (a->value) *(pcb_coord_t *) a->value = pcb_get_value((*argv)[1], NULL, NULL, NULL); else @@ -129,7 +129,7 @@ (*argc)--; (*argv)++; break; - case HID_Real: + case PCB_HATT_REAL: if (a->value) *(double *) a->value = strtod((*argv)[1], 0); else @@ -137,7 +137,7 @@ (*argc)--; (*argv)++; break; - case HID_String: + case PCB_HATT_STRING: if (a->value) *(char **) a->value = (*argv)[1]; else @@ -145,16 +145,16 @@ (*argc)--; (*argv)++; break; - case HID_Boolean: + case PCB_HATT_BOOL: if (a->value) *(char *) a->value = bool_val; else a->default_val.int_value = bool_val; break; - case HID_Mixed: + case PCB_HATT_MIXED: a->default_val.real_value = strtod((*argv)[1], &ep); goto do_enum; - case HID_Enum: + case PCB_HATT_ENUM: ep = (*argv)[1]; do_enum: ok = 0; @@ -172,13 +172,13 @@ (*argc)--; (*argv)++; break; - case HID_Path: + case PCB_HATT_PATH: abort(); a->default_val.str_value = (*argv)[1]; (*argc)--; (*argv)++; break; - case HID_Unit: + case PCB_HATT_UNIT: unit = get_unit_struct((*argv)[1]); if (unit == NULL) { fprintf(stderr, "ERROR: unit \"%s\" is unknown to pcb (option --%s)\n", (*argv)[1], a->name); Index: trunk/src/hid_attrib.h =================================================================== --- trunk/src/hid_attrib.h (revision 8412) +++ trunk/src/hid_attrib.h (revision 8413) @@ -5,8 +5,8 @@ /* Used for HID attributes (exporting and printing, mostly). HA_boolean uses int_value, HA_enum sets int_value to the index and - str_value to the enumeration string. HID_Label just shows the - default str_value. HID_Mixed is a real_value followed by an enum, + str_value to the enumeration string. PCB_HATT_LABEL just shows the + default str_value. PCB_HATT_MIXED is a real_value followed by an enum, like 0.5in or 100mm. */ struct pcb_hid_attr_val_s { int int_value; @@ -16,9 +16,9 @@ }; typedef enum pcb_hids_e { - HID_Label, HID_Integer, HID_Real, HID_String, - HID_Boolean, HID_Enum, HID_Mixed, HID_Path, - HID_Unit, HID_Coord + PCB_HATT_LABEL, PCB_HATT_INTEGER, PCB_HATT_REAL, PCB_HATT_STRING, + PCB_HATT_BOOL, PCB_HATT_ENUM, PCB_HATT_MIXED, PCB_HATT_PATH, + PCB_HATT_UNIT, PCB_HATT_COORD } pcb_hids_t; struct pcb_hid_attribute_s { @@ -32,8 +32,8 @@ const char **enumerations; /* If set, this is used for global attributes (i.e. those set statically with REGISTER_ATTRIBUTES below) instead of changing - the default_val. Note that a HID_Mixed attribute must specify a - pointer to pcb_hid_attr_val_t here, and HID_Boolean assumes this is + the default_val. Note that a PCB_HATT_MIXED attribute must specify a + pointer to pcb_hid_attr_val_t here, and PCB_HATT_BOOL assumes this is "char *" so the value should be initialized to zero, and may be set to non-zero (not always one). */ void *value; Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 8412) +++ trunk/src/select_act.c (revision 8413) @@ -55,12 +55,12 @@ attrs[0].name = "Pattern"; attrs[0].help_text = "Name/refdes pattern"; - attrs[0].type = HID_String; + attrs[0].type = PCB_HATT_STRING; attrs[0].default_val.str_value = results[0].str_value; attrs[1].name = "Method"; attrs[1].help_text = "method of search: either regular expression or a list of full names separated by |"; - attrs[1].type = HID_Enum; + attrs[1].type = PCB_HATT_ENUM; attrs[1].enumerations = methods; attrs[1].default_val.int_value = results[1].int_value; Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 8412) +++ trunk/src_plugins/export_bboard/bboard.c (revision 8413) @@ -102,7 +102,7 @@ %end-doc */ { - "bbfile", "Braedboard file name", HID_String, 0, 0, + "bbfile", "Braedboard file name", PCB_HATT_STRING, 0, 0, { 0, 0, 0}, 0, 0}, /* @@ -114,7 +114,7 @@ %end-doc */ { - "bgcolor", "Background color (rrggbb)", HID_String, 0, 0, + "bgcolor", "Background color (rrggbb)", PCB_HATT_STRING, 0, 0, { 0, 0, 0}, 0, 0}, /* @@ -126,7 +126,7 @@ %end-doc */ { - "skipsolder", "Ignore solder layer", HID_Boolean, 0, 0, + "skipsolder", "Ignore solder layer", PCB_HATT_BOOL, 0, 0, { 1, 0, 0}, 0, 0}, /* @@ -138,7 +138,7 @@ %end-doc */ { - "antialias", "Antialiasing", HID_Boolean, 0, 0, + "antialias", "Antialiasing", PCB_HATT_BOOL, 0, 0, { 1, 0, 0}, 0, 0}, }; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 8412) +++ trunk/src_plugins/export_bom/bom.c (revision 8413) @@ -32,7 +32,7 @@ %end-doc */ {"bomfile", "Name of the BOM output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_bomfile 0 /* %start-doc options "8 BOM Creation" @ftable @code Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 8412) +++ trunk/src_plugins/export_dsn/dsn.c (revision 8413) @@ -73,20 +73,20 @@ static pcb_hid_attribute_t dsn_options[] = { {"dsnfile", "SPECCTRA output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_dsnfile 0 {"trackwidth", "track width in mils", - HID_Coord, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(8)}, 0, 0}, + PCB_HATT_COORD, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(8)}, 0, 0}, #define HA_trackwidth 1 {"clearance", "clearance in mils", - HID_Coord, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(8)}, 0, 0}, + PCB_HATT_COORD, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(8)}, 0, 0}, #define HA_clearance 2 {"viawidth", "via width in mils", - HID_Coord, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(27)}, 0, + PCB_HATT_COORD, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(27)}, 0, 0}, #define HA_viawidth 3 {"viadrill", "via drill diameter in mils", - HID_Coord, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(15)}, 0, + PCB_HATT_COORD, PCB_MIL_TO_COORD(0), PCB_MIL_TO_COORD(100), {0, 0, 0, PCB_MIL_TO_COORD(15)}, 0, 0}, #define HA_viadrill 4 }; Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 8412) +++ trunk/src_plugins/export_dxf/dxf.c (revision 8413) @@ -629,7 +629,7 @@ %end-doc */ {"dxffile", "DXF layer filename base", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_dxffile 0 /* @@ -641,7 +641,7 @@ %end-doc */ {"metric", "export DXF files in mm", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_metric 1 /* @@ -653,7 +653,7 @@ %end-doc */ {"layer-color-BYBLOCK", "export entities in color BYBLOCK", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_color_byblock 2 /* @@ -665,7 +665,7 @@ %end-doc */ {"xrefs", "export a DXF file with xrefs", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_xrefs 3 /* @@ -677,7 +677,7 @@ %end-doc */ {"xreffile", "DXF Xrefs filename", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_xreffile 4 /* @@ -689,7 +689,7 @@ %end-doc */ {"be verbose", "verbose output to stderr (comments)", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_verbose 5 /* @@ -701,7 +701,7 @@ %end-doc */ {"export all layers", "export all layers", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_export_all_layers 6 }; @@ -712,8 +712,8 @@ * * HA_boolean uses int_value, HA_enum sets int_value to the index and * str_value to the enumeration string.\n - * HID_Label just shows the default str_value.\n - * HID_Mixed is a real_value followed by an enum, like 0.5in or 100mm. + * PCB_HATT_LABEL just shows the default str_value.\n + * PCB_HATT_MIXED is a real_value followed by an enum, like 0.5in or 100mm. */ static pcb_hid_attr_val_t dxf_values[NUM_OPTIONS]; Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 8412) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 8413) @@ -64,11 +64,11 @@ /* other HIDs expect this to be first. */ {"outfile", "Output file name", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_fidocadjfile 0 {"libfile", "path to PCB.fcl", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_libfile 1 }; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 8412) +++ trunk/src_plugins/export_gcode/gcode.c (revision 8413) @@ -145,31 +145,31 @@ pcb_hid_attribute_t gcode_attribute_list[] = { /* other HIDs expect this to be first. */ {"basename", "File name prefix", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_basename 0 {"dpi", "Resolution of intermediate image (pixels/inch)", - HID_Integer, 0, 2000, {600, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 2000, {600, 0, 0}, 0, 0}, #define HA_dpi 1 {"mill-depth", "Milling depth", - HID_Real, -1000, 1000, {0, 0, -0.05}, 0, 0}, + PCB_HATT_REAL, -1000, 1000, {0, 0, -0.05}, 0, 0}, #define HA_cutdepth 2 {"safe-Z", "Safe Z for traverse move", - HID_Real, -1000, 10000, {0, 0, 2}, 0, 0}, + PCB_HATT_REAL, -1000, 10000, {0, 0, 2}, 0, 0}, #define HA_safeZ 3 {"tool-radius", "Milling tool radius compensation", - HID_Real, 0, 10000, {0, 0, 0.1}, 0, 0}, + PCB_HATT_REAL, 0, 10000, {0, 0, 0.1}, 0, 0}, #define HA_toolradius 4 {"drill-depth", "Drilling depth", - HID_Real, -10000, 10000, {0, 0, -2}, 0, 0}, + PCB_HATT_REAL, -10000, 10000, {0, 0, -2}, 0, 0}, #define HA_drilldepth 5 {"measurement-unit", "Measurement unit", - HID_Unit, 0, 0, {-1, 0, 0}, units, 0}, + PCB_HATT_UNIT, 0, 0, {-1, 0, 0}, units, 0}, #define HA_unit 6 }; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 8412) +++ trunk/src_plugins/export_gerber/gerber.c (revision 8413) @@ -317,7 +317,7 @@ %end-doc */ {"gerberfile", "Gerber output file base", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_gerberfile 0 /* %start-doc options "90 Gerber Export" @@ -328,7 +328,7 @@ %end-doc */ {"all-layers", "Output all layers, even empty ones", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_all_layers 1 /* %start-doc options "90 Gerber Export" @@ -339,16 +339,16 @@ %end-doc */ {"verbose", "Print file names and aperture counts on stdout", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_verbose 2 {"copy-outline", "Copy outline onto other layers", - HID_Enum, 0, 0, {0, 0, 0}, copy_outline_names, 0}, + PCB_HATT_ENUM, 0, 0, {0, 0, 0}, copy_outline_names, 0}, #define HA_copy_outline 3 {"name-style", "Naming style for individual gerber files", - HID_Enum, 0, 0, {0, 0, 0}, name_style_names, 0}, + PCB_HATT_ENUM, 0, 0, {0, 0, 0}, name_style_names, 0}, #define HA_name_style 4 {"cross-sect", "Export the cross section layer", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_cross_sect 5 }; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 8412) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 8413) @@ -69,7 +69,7 @@ { "netlistfile", "Name of the IPC-D-356 Netlist output file", - HID_String, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_IPCD356_filename 0 }; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 8412) +++ trunk/src_plugins/export_lpr/lpr.c (revision 8413) @@ -36,7 +36,7 @@ %end-doc */ {"lprcommand", "Command to use for printing", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_lprcommand 0 }; Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 8412) +++ trunk/src_plugins/export_nelma/nelma.c (revision 8413) @@ -160,7 +160,7 @@ %end-doc */ {"basename", "File name prefix", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_basename 0 /* %start-doc options "nelma Options" @@ -171,7 +171,7 @@ %end-doc */ {"dpi", "Horizontal scale factor (grid points/inch)", - HID_Integer, 0, 1000, {100, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 1000, {100, 0, 0}, 0, 0}, #define HA_dpi 1 /* %start-doc options "nelma Options" @@ -182,7 +182,7 @@ %end-doc */ {"copper-height", "Copper layer height (um)", - HID_Integer, 0, 200, {100, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 200, {100, 0, 0}, 0, 0}, #define HA_copperh 2 /* %start-doc options "nelma Options" @@ -193,7 +193,7 @@ %end-doc */ {"substrate-height", "Substrate layer height (um)", - HID_Integer, 0, 10000, {2000, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 10000, {2000, 0, 0}, 0, 0}, #define HA_substrateh 3 /* %start-doc options "nelma Options" @@ -204,7 +204,7 @@ %end-doc */ {"substrate-epsilon", "Substrate relative epsilon", - HID_Real, 0, 100, {0, 0, 4.0}, 0, 0}, + PCB_HATT_REAL, 0, 100, {0, 0, 4.0}, 0, 0}, #define HA_substratee 4 }; Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 8412) +++ trunk/src_plugins/export_openscad/scad.c (revision 8413) @@ -144,7 +144,7 @@ %end-doc */ { - "scad_file", "SCAD file name", HID_String, 0, 0, + "scad_file", "SCAD file name", PCB_HATT_STRING, 0, 0, { 0, 0, 0, 0}, 0, 0}, /* @@ -158,7 +158,7 @@ */ { "board_outline", "Board outline", - HID_Enum, + PCB_HATT_ENUM, 0, 0, { 2, 0, 0, 0}, board_outlines, 0}, @@ -172,7 +172,7 @@ */ { "components", "Export components", - HID_Enum, + PCB_HATT_ENUM, 0, 0, { 3, 0, 0, 0}, export_modes, 0}, @@ -185,7 +185,7 @@ %end-doc */ { - "copper", "Export tracks and copper planes", HID_Boolean, 0, 0, + "copper", "Export tracks and copper planes", PCB_HATT_BOOL, 0, 0, { 0, 0, 0, 0}, 0, 0}, /* @@ -197,7 +197,7 @@ %end-doc */ { - "silk_layers", "Export silk layers", HID_Boolean, 0, 0, + "silk_layers", "Export silk layers", PCB_HATT_BOOL, 0, 0, { 0, 0, 0, 0}, 0, 0}, /* @@ -209,7 +209,7 @@ %end-doc */ { - "innner_layers", "Export inner layers", HID_Boolean, 0, 0, + "innner_layers", "Export inner layers", PCB_HATT_BOOL, 0, 0, { 0, 0, 0, 0}, 0, 0}, /* @@ -221,7 +221,7 @@ %end-doc */ { - "solder_mask", "Solder mask color", HID_Enum, 0, 0, + "solder_mask", "Solder mask color", PCB_HATT_ENUM, 0, 0, { 0, 0, 0, 0}, mask_colors, 0}, { @@ -234,13 +234,13 @@ %end-doc */ "copper_finish", "Surface finish of copper", - HID_Enum, + PCB_HATT_ENUM, 0, 0, { 0, 0, 0, 0}, copper_colors, 0}, { - " ", " ", HID_Label, 0, 0, + " ", " ", PCB_HATT_LABEL, 0, 0, { 0, 0, 0, 0}, 0, 0}, /* @@ -252,7 +252,7 @@ %end-doc */ { - "min_drill", "Minimal drill to export", HID_Coord, PCB_MM_TO_COORD(0), + "min_drill", "Minimal drill to export", PCB_HATT_COORD, PCB_MM_TO_COORD(0), PCB_MM_TO_COORD(10), { 0, 0, 0, PCB_MM_TO_COORD(1)}, 0, 0}, @@ -266,7 +266,7 @@ */ { "board_cut", "Section of board to be exported (3D print support)", - HID_Enum, + PCB_HATT_ENUM, 0, 0, { 0, 0, 0, 0}, board_cuts, 0}, Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 8412) +++ trunk/src_plugins/export_png/png.c (revision 8413) @@ -177,7 +177,7 @@ %end-doc */ {"outfile", "Graphics output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_pngfile 0 /* %start-doc options "93 PNG Options" @@ -188,7 +188,7 @@ %end-doc */ {"dpi", "Scale factor (pixels/inch). 0 to scale to specified size", - HID_Integer, 0, 10000, {100, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 10000, {100, 0, 0}, 0, 0}, #define HA_dpi 1 /* %start-doc options "93 PNG Options" @@ -199,7 +199,7 @@ %end-doc */ {"x-max", "Maximum width (pixels). 0 to not constrain", - HID_Integer, 0, 10000, {0, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 10000, {0, 0, 0}, 0, 0}, #define HA_xmax 2 /* %start-doc options "93 PNG Options" @@ -210,7 +210,7 @@ %end-doc */ {"y-max", "Maximum height (pixels). 0 to not constrain", - HID_Integer, 0, 10000, {0, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 10000, {0, 0, 0}, 0, 0}, #define HA_ymax 3 /* %start-doc options "93 PNG Options" @@ -221,7 +221,7 @@ %end-doc */ {"xy-max", "Maximum width and height (pixels). 0 to not constrain", - HID_Integer, 0, 10000, {0, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 10000, {0, 0, 0}, 0, 0}, #define HA_xymax 4 /* %start-doc options "93 PNG Options" @@ -232,7 +232,7 @@ %end-doc */ {"as-shown", "Export layers as shown on screen", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_as_shown 5 /* %start-doc options "93 PNG Options" @@ -243,7 +243,7 @@ %end-doc */ {"monochrome", "Convert to monochrome", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_mono 6 /* %start-doc options "93 PNG Options" @@ -254,7 +254,7 @@ %end-doc */ {"only-visible", "Limit the bounds of the PNG image to the visible items", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_only_visible 7 /* %start-doc options "93 PNG Options" @@ -265,7 +265,7 @@ %end-doc */ {"use-alpha", "Make the background and any holes transparent", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_use_alpha 8 /* %start-doc options "93 PNG Options" @@ -277,7 +277,7 @@ %end-doc */ {"format", "Export file format", - HID_Enum, 0, 0, {0, 0, 0}, filetypes, 0}, + PCB_HATT_ENUM, 0, 0, {0, 0, 0}, filetypes, 0}, #define HA_filetype 9 /* %start-doc options "93 PNG Options" @@ -290,7 +290,7 @@ %end-doc */ {"png-bloat", "Amount (in/mm/mil/pix) to add to trace/pad/pin edges (1 = 1/100 mil)", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_bloat 10 /* %start-doc options "93 PNG Options" @@ -302,7 +302,7 @@ %end-doc */ {"photo-mode", "Photo-realistic export mode", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_photo_mode 11 /* %start-doc options "93 PNG Options" @@ -313,7 +313,7 @@ %end-doc */ {"photo-flip-x", "Show reverse side of the board, left-right flip", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_photo_flip_x 12 /* %start-doc options "93 PNG Options" @@ -324,19 +324,19 @@ %end-doc */ {"photo-flip-y", "Show reverse side of the board, up-down flip", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_photo_flip_y 13 {"ben-mode", ATTR_UNDOCUMENTED, - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_ben_mode 11 {"ben-flip-x", ATTR_UNDOCUMENTED, - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_ben_flip_x 12 {"ben-flip-y", ATTR_UNDOCUMENTED, - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_ben_flip_y 13 }; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 8412) +++ trunk/src_plugins/export_ps/eps.c (revision 8413) @@ -77,7 +77,7 @@ %end-doc */ {"eps-file", "Encapsulated Postscript output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_psfile 0 /* %start-doc options "92 Encapsulated Postscript Export" @@ -88,7 +88,7 @@ %end-doc */ {"eps-scale", "EPS scale", - HID_Real, 0, 100, {0, 0, 1.0}, 0, 0}, + PCB_HATT_REAL, 0, 100, {0, 0, 1.0}, 0, 0}, #define HA_scale 1 /* %start-doc options "92 Encapsulated Postscript Export" @@ -100,7 +100,7 @@ %end-doc */ {"as-shown", "Export layers as shown on screen", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_as_shown 2 /* %start-doc options "92 Encapsulated Postscript Export" @@ -111,7 +111,7 @@ %end-doc */ {"monochrome", "Convert to monochrome", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_mono 3 /* %start-doc options "92 Encapsulated Postscript Export" @@ -123,7 +123,7 @@ %end-doc */ {"only-visible", "Limit the bounds of the EPS file to the visible items", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_only_visible 4 }; Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 8412) +++ trunk/src_plugins/export_ps/ps.c (revision 8413) @@ -154,7 +154,7 @@ %end-doc */ {"psfile", "Postscript output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_psfile 0 /* %start-doc options "91 Postscript Export" @@ -166,7 +166,7 @@ %end-doc */ {"drill-helper", "Print a centering target in large drill holes", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_drillhelper 1 /* %start-doc options "91 Postscript Export" @@ -178,7 +178,7 @@ %end-doc */ {"align-marks", "Print alignment marks on each sheet", - HID_Boolean, 0, 0, {1, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {1, 0, 0}, 0, 0}, #define HA_alignmarks 2 /* %start-doc options "91 Postscript Export" @@ -189,7 +189,7 @@ %end-doc */ {"outline", "Print outline on each sheet", - HID_Boolean, 0, 0, {1, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {1, 0, 0}, 0, 0}, #define HA_outline 3 /* %start-doc options "91 Postscript Export" @ftable @code @@ -199,7 +199,7 @@ %end-doc */ {"mirror", "Print mirror image of every page", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_mirror 4 /* %start-doc options "91 Postscript Export" @@ -210,7 +210,7 @@ %end-doc */ {"fill-page", "Scale board to fill page", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_fillpage 5 /* %start-doc options "91 Postscript Export" @@ -221,7 +221,7 @@ %end-doc */ {"auto-mirror", "Print mirror image of appropriate layers", - HID_Boolean, 0, 0, {1, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {1, 0, 0}, 0, 0}, #define HA_automirror 6 /* %start-doc options "91 Postscript Export" @@ -232,7 +232,7 @@ %end-doc */ {"ps-color", "Prints in color", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_color 7 /* %start-doc options "91 Postscript Export" @@ -244,7 +244,7 @@ %end-doc */ {"ps-bloat", "Amount to add to trace/pad/pin edges", - HID_Coord, -PCB_MIL_TO_COORD(100), PCB_MIL_TO_COORD(100), {0, 0, 0}, 0, 0}, + PCB_HATT_COORD, -PCB_MIL_TO_COORD(100), PCB_MIL_TO_COORD(100), {0, 0, 0}, 0, 0}, #define HA_psbloat 8 /* %start-doc options "91 Postscript Export" @@ -256,7 +256,7 @@ %end-doc */ {"ps-invert", "Draw objects as white-on-black", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_psinvert 9 /* %start-doc options "91 Postscript Export" @@ -272,7 +272,7 @@ %end-doc */ {"media", "media type", - HID_Enum, 0, 0, {22, 0, 0}, medias, 0}, + PCB_HATT_ENUM, 0, 0, {22, 0, 0}, medias, 0}, #define HA_media 10 /* %start-doc options "91 Postscript Export" @@ -284,7 +284,7 @@ %end-doc */ {"psfade", "Fade amount for assembly drawings (0.0=missing, 1.0=solid)", - HID_Real, 0, 1, {0, 0, 0.40}, 0, 0}, + PCB_HATT_REAL, 0, 1, {0, 0, 0.40}, 0, 0}, #define HA_psfade 11 /* %start-doc options "91 Postscript Export" @@ -295,7 +295,7 @@ %end-doc */ {"scale", "Scale value to compensate for printer sizing errors (1.0 = full scale)", - HID_Real, 0.01, 4, {0, 0, 1.00}, 0, 0}, + PCB_HATT_REAL, 0.01, 4, {0, 0, 1.00}, 0, 0}, #define HA_scale 12 /* %start-doc options "91 Postscript Export" @@ -307,7 +307,7 @@ %end-doc */ {"multi-file", "Produce multiple files, one per page, instead of a single file", - HID_Boolean, 0, 0, {0, 0, 0.40}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0.40}, 0, 0}, #define HA_multifile 13 /* %start-doc options "91 Postscript Export" @@ -318,7 +318,7 @@ %end-doc */ {"xcalib", "Paper width. Used for x-Axis calibration", - HID_Real, 0, 0, {0, 0, 1.0}, 0, 0}, + PCB_HATT_REAL, 0, 0, {0, 0, 1.0}, 0, 0}, #define HA_xcalib 14 /* %start-doc options "91 Postscript Export" @@ -329,7 +329,7 @@ %end-doc */ {"ycalib", "Paper height. Used for y-Axis calibration", - HID_Real, 0, 0, {0, 0, 1.0}, 0, 0}, + PCB_HATT_REAL, 0, 0, {0, 0, 1.0}, 0, 0}, #define HA_ycalib 15 /* %start-doc options "91 Postscript Export" @@ -340,7 +340,7 @@ %end-doc */ {"drill-copper", "Draw drill holes in pins / vias, instead of leaving solid copper", - HID_Boolean, 0, 0, {1, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {1, 0, 0}, 0, 0}, #define HA_drillcopper 16 /* %start-doc options "91 Postscript Export" @@ -352,7 +352,7 @@ %end-doc */ {"show-legend", "Print file name and scale on printout", - HID_Boolean, 0, 0, {1, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {1, 0, 0}, 0, 0}, #define HA_legend 17 /* %start-doc options "91 Postscript Export" @@ -363,7 +363,7 @@ %end-doc */ {"polygrid", "When non-zero: grid polygons instead of filling with gridlines spaced as specified", - HID_Real, 0, 10, {0, 0, 0.0}, 0, 0}, + PCB_HATT_REAL, 0, 10, {0, 0, 0.0}, 0, 0}, #define HA_polygrid 18 }; @@ -1392,7 +1392,7 @@ pcb_hid_attribute_t ps_calib_attribute_list[] = { {"lprcommand", "Command to print", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, }; static const char *const calib_lines[] = { Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 8412) +++ trunk/src_plugins/export_stat/stat.c (revision 8413) @@ -63,32 +63,32 @@ /* other HIDs expect this to be first. */ {"outfile", "Output file name", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_statfile 0 {"board_id", "Short name of the board so it can be identified for updates", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_board_id 1 {"orig", "This design started its life in pcb-rnd", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_orig 2 {"lht_built", "This design was already in lihata when real boards got built", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_lht_built 3 {"built", "how many actual/physical boards got built", - HID_Integer, 0, 1000000, {0, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 1000000, {0, 0, 0}, 0, 0}, #define HA_built 4 {"first_ver", "the version of pcb-rnd you first used on this board", - HID_String, 0, 0, {0, PCB_VERSION, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, PCB_VERSION, 0}, 0, 0}, #define HA_first_ver 5 {"license", "license of the design", - HID_String, 0, 0, {0, "proprietary/private", 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, "proprietary/private", 0}, 0, 0}, #define HA_license 6 }; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 8412) +++ trunk/src_plugins/export_svg/svg.c (revision 8413) @@ -125,7 +125,7 @@ %end-doc */ {"outfile", "Graphics output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_svgfile 0 /* %start-doc options "93 SVG Options" @@ -137,7 +137,7 @@ %end-doc */ {"photo-mode", "Photo-realistic export mode", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_photo_mode 1 /* %start-doc options "93 SVG Options" @@ -149,7 +149,7 @@ %end-doc */ {"opacity", "Layer opacity", - HID_Integer, 0, 100, {100, 0, 0}, 0, 0}, + PCB_HATT_INTEGER, 0, 100, {100, 0, 0}, 0, 0}, #define HA_opacity 2 /* %start-doc options "93 SVG Options" @@ -161,7 +161,7 @@ %end-doc */ {"flip", "Flip board", - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0} + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0} #define HA_flip 3 }; Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 8412) +++ trunk/src_plugins/export_test/export_test.c (revision 8413) @@ -31,7 +31,7 @@ %end-doc */ {"export_testfile", "Name of the export_test output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_export_testfile 0 }; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 8412) +++ trunk/src_plugins/export_xy/xy.c (revision 8413) @@ -37,7 +37,7 @@ %end-doc */ {"xyfile", "Name of the XY output file", - HID_String, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_xyfile 0 /* %start-doc options "8 BOM Creation" @@ -48,10 +48,10 @@ %end-doc */ {"xy-unit", "XY units", - HID_Unit, 0, 0, {-1, 0, 0}, NULL, 0}, + PCB_HATT_UNIT, 0, 0, {-1, 0, 0}, NULL, 0}, #define HA_unit 1 {"xy-in-mm", ATTR_UNDOCUMENTED, - HID_Boolean, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, 0}, #define HA_xymm 2 }; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c (revision 8412) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c (revision 8413) @@ -18,7 +18,7 @@ memset((attr), 0, sizeof(pcb_hid_attribute_t)); \ (attr)->name = name_; \ (attr)->help_text = help_; \ - (attr)->type = HID_Label; \ + (attr)->type = PCB_HATT_LABEL; \ } while(0) #define attr_make_label_str(attr, name1, name2, help_) \ @@ -34,7 +34,7 @@ memset((attr), 0, sizeof(pcb_hid_attribute_t)); \ (attr)->name = name_; \ (attr)->help_text = help_; \ - (attr)->type = HID_Enum; \ + (attr)->type = PCB_HATT_ENUM; \ (attr)->enumerations = enum_vals; \ (attr)->default_val.int_value = default_item; \ } while(0) Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 8412) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 8413) @@ -668,22 +668,22 @@ stdarg(XmNalignment, XmALIGNMENT_END); switch (attrs[i].type) { - case HID_Label: + case PCB_HATT_LABEL: stdarg(XmNlabelString, empty); wl[i] = XmCreateLabel(form, XmStrCast(attrs[i].name), stdarg_args, stdarg_n); break; - case HID_Boolean: + case PCB_HATT_BOOL: stdarg(XmNlabelString, empty); stdarg(XmNset, results[i].int_value); wl[i] = XmCreateToggleButton(form, XmStrCast(attrs[i].name), stdarg_args, stdarg_n); break; - case HID_String: + case PCB_HATT_STRING: stdarg(XmNcolumns, 40); stdarg(XmNresizeWidth, True); stdarg(XmNvalue, results[i].str_value); wl[i] = XmCreateTextField(form, XmStrCast(attrs[i].name), stdarg_args, stdarg_n); break; - case HID_Integer: + case PCB_HATT_INTEGER: stdarg(XmNcolumns, 13); stdarg(XmNresizeWidth, True); sprintf(buf, "%d", results[i].int_value); @@ -690,7 +690,7 @@ stdarg(XmNvalue, buf); wl[i] = XmCreateTextField(form, XmStrCast(attrs[i].name), stdarg_args, stdarg_n); break; - case HID_Coord: + case PCB_HATT_COORD: stdarg(XmNcolumns, 13); stdarg(XmNresizeWidth, True); pcb_snprintf(buf, sizeof(buf), "%$mS", results[i].coord_value); @@ -697,7 +697,7 @@ stdarg(XmNvalue, buf); wl[i] = XmCreateTextField(form, XmStrCast(attrs[i].name), stdarg_args, stdarg_n); break; - case HID_Real: + case PCB_HATT_REAL: stdarg(XmNcolumns, 16); stdarg(XmNresizeWidth, True); pcb_snprintf(buf, sizeof(buf), "%g", results[i].real_value); @@ -704,7 +704,7 @@ stdarg(XmNvalue, buf); wl[i] = XmCreateTextField(form, XmStrCast(attrs[i].name), stdarg_args, stdarg_n); break; - case HID_Enum: + case PCB_HATT_ENUM: { static XmString empty = 0; Widget submenu, default_button = 0; @@ -757,25 +757,25 @@ continue; switch (attrs[i].type) { - case HID_Boolean: + case PCB_HATT_BOOL: results[i].int_value = XmToggleButtonGetState(wl[i]); break; - case HID_String: + case PCB_HATT_STRING: results[i].str_value = XmTextGetString(wl[i]); break; - case HID_Integer: + case PCB_HATT_INTEGER: cp = XmTextGetString(wl[i]); sscanf(cp, "%d", &results[i].int_value); break; - case HID_Coord: + case PCB_HATT_COORD: cp = XmTextGetString(wl[i]); results[i].coord_value = pcb_get_value(cp, NULL, NULL, NULL); break; - case HID_Real: + case PCB_HATT_REAL: cp = XmTextGetString(wl[i]); sscanf(cp, "%lg", &results[i].real_value); break; - case HID_Enum: + case PCB_HATT_ENUM: { const char **uptr; Widget btn; @@ -922,11 +922,11 @@ static pcb_hid_attribute_t printer_calibrate_attrs[] = { {"Enter Values here:", "", - HID_Label, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_LABEL, 0, 0, {0, 0, 0}, 0, 0}, {"x-calibration", "X scale for calibrating your printer", - HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0}, + PCB_HATT_REAL, 0.5, 25, {0, 0, 1.00}, 0, 0}, {"y-calibration", "Y scale for calibrating your printer", - HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0} + PCB_HATT_REAL, 0.5, 25, {0, 0, 1.00}, 0, 0} }; static pcb_hid_attr_val_t printer_calibrate_values[3]; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 8412) +++ trunk/src_plugins/hid_lesstif/main.c (revision 8413) @@ -189,7 +189,7 @@ pcb_hid_attribute_t lesstif_attribute_list[] = { {"install", "Install private colormap", - HID_Boolean, 0, 0, {0, 0, 0}, 0, &use_private_colormap}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, &use_private_colormap}, #define HA_colormap 0 /* %start-doc options "22 lesstif GUI Options" @@ -200,7 +200,7 @@ %end-doc */ {"listen", "Listen on standard input for actions", - HID_Boolean, 0, 0, {0, 0, 0}, 0, &stdin_listen}, + PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, &stdin_listen}, #define HA_listen 1 /* %start-doc options "22 lesstif GUI Options" @@ -213,7 +213,7 @@ %end-doc */ {"bg-image", "Background Image", - HID_String, 0, 0, {0, 0, 0}, 0, &background_image_file}, + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, &background_image_file}, #define HA_bg_image 2 /* %start-doc options "22 lesstif GUI Options" @@ -226,7 +226,7 @@ #warning TODO#1: this should be generic and not depend on the HID /* {"pcb-menu", "Location of pcb-menu.res file", - HID_String, 0, 0, {0, PCBSHAREDIR "/pcb-menu.res", 0}, 0, &lesstif_pcbmenu_path} + PCB_HATT_STRING, 0, 0, {0, PCBSHAREDIR "/pcb-menu.res", 0}, 0, &lesstif_pcbmenu_path} #define HA_pcbmenu 3 */ }; @@ -1872,12 +1872,12 @@ for (i = 0; i < ha->n; i++) { pcb_hid_attribute_t *a = ha->attributes + i; switch (a->type) { - case HID_Integer: - case HID_Coord: - case HID_Real: - case HID_String: - case HID_Path: - case HID_Boolean: + case PCB_HATT_INTEGER: + case PCB_HATT_COORD: + case PCB_HATT_REAL: + case PCB_HATT_STRING: + case PCB_HATT_PATH: + case PCB_HATT_BOOL: acount++; rcount++; break; @@ -1930,16 +1930,16 @@ o->specifier = tmpres; switch (a->type) { - case HID_Integer: - case HID_Coord: - case HID_Real: - case HID_String: - case HID_Path: + case PCB_HATT_INTEGER: + case PCB_HATT_COORD: + case PCB_HATT_REAL: + case PCB_HATT_STRING: + case PCB_HATT_PATH: o->argKind = XrmoptionSepArg; o->value = NULL; acount++; break; - case HID_Boolean: + case PCB_HATT_BOOL: o->argKind = XrmoptionNoArg; o->value = XmStrCast("True"); acount++; @@ -1953,7 +1953,7 @@ r->resource_offset = sizeof(val_union) * rcount; switch (a->type) { - case HID_Integer: + case PCB_HATT_INTEGER: r->resource_type = XtRInt; r->default_type = XtRInt; r->resource_size = sizeof(int); @@ -1960,7 +1960,7 @@ r->default_addr = &(a->default_val.int_value); rcount++; break; - case HID_Coord: + case PCB_HATT_COORD: r->resource_type = XmStrCast(XtRPCBCoord); r->default_type = XmStrCast(XtRPCBCoord); r->resource_size = sizeof(pcb_coord_t); @@ -1967,7 +1967,7 @@ r->default_addr = &(a->default_val.coord_value); rcount++; break; - case HID_Real: + case PCB_HATT_REAL: r->resource_type = XmStrCast(XtRDouble); r->default_type = XmStrCast(XtRDouble); r->resource_size = sizeof(double); @@ -1974,8 +1974,8 @@ r->default_addr = &(a->default_val.real_value); rcount++; break; - case HID_String: - case HID_Path: + case PCB_HATT_STRING: + case PCB_HATT_PATH: r->resource_type = XtRString; r->default_type = XtRString; r->resource_size = sizeof(char *); @@ -1982,7 +1982,7 @@ r->default_addr = (char *) a->default_val.str_value; rcount++; break; - case HID_Boolean: + case PCB_HATT_BOOL: r->resource_type = XtRBoolean; r->default_type = XtRInt; r->resource_size = sizeof(int); @@ -2035,7 +2035,7 @@ pcb_hid_attribute_t *a = ha->attributes + i; val_union *v = new_values + rcount; switch (a->type) { - case HID_Integer: + case PCB_HATT_INTEGER: if (a->value) *(int *) a->value = v->i; else @@ -2042,7 +2042,7 @@ a->default_val.int_value = v->i; rcount++; break; - case HID_Coord: + case PCB_HATT_COORD: if (a->value) *(pcb_coord_t *) a->value = v->c; else @@ -2049,7 +2049,7 @@ a->default_val.coord_value = v->c; rcount++; break; - case HID_Boolean: + case PCB_HATT_BOOL: if (a->value) *(char *) a->value = v->i; else @@ -2056,7 +2056,7 @@ a->default_val.int_value = v->i; rcount++; break; - case HID_Real: + case PCB_HATT_REAL: if (a->value) *(double *) a->value = v->f; else @@ -2063,8 +2063,8 @@ a->default_val.real_value = v->f; rcount++; break; - case HID_String: - case HID_Path: + case PCB_HATT_STRING: + case PCB_HATT_PATH: if (a->value) *(char **) a->value = v->s; else Index: trunk/src_plugins/io_hyp/hyp_l.c =================================================================== --- trunk/src_plugins/io_hyp/hyp_l.c (revision 8412) +++ trunk/src_plugins/io_hyp/hyp_l.c (revision 8413) @@ -36,7 +36,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 39 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -223,13 +223,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - /* %if-not-reentrant */ -extern yy_size_t hyyleng; +extern int hyyleng; /* %endif */ /* %if-c-only */ @@ -256,13 +251,6 @@ if ( hyytext[yyl] == '\n' )\ --hyylineno;\ }while(0) - #define YY_LINENO_REWIND_TO(dst) \ - do {\ - const char *p;\ - for ( p = yy_cp-1; p >= (dst); --p)\ - if ( *p == '\n' )\ - --hyylineno;\ - }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -280,6 +268,11 @@ #define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -302,7 +295,7 @@ /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -386,8 +379,8 @@ /* yy_hold_char holds the character lost when hyytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t hyyleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int hyyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -418,7 +411,7 @@ YY_BUFFER_STATE hyy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE hyy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,int len ); /* %endif */ @@ -453,7 +446,7 @@ /* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */ /* Begin user sect3 */ -#define hyywrap() 1 +#define hyywrap(n) 1 #define YY_SKIP_YYWRAP #define FLEX_DEBUG @@ -471,8 +464,6 @@ extern char *hyytext; #define yytext_ptr hyytext -/* %% [1.5] DFA */ - /* %if-c-only Standard (non-C++) definition */ static yy_state_type yy_get_previous_state (void ); @@ -1638,7 +1629,7 @@ */ /* an unquoted string */ /* a string enclosed in double quotes " */ -#line 1642 "hyp_l.c" +#line 1633 "hyp_l.c" #define INITIAL 0 #define STATE_STRING 1 @@ -1695,7 +1686,7 @@ void hyyset_out (FILE * out_str ); -yy_size_t hyyget_leng (void ); +int hyyget_leng (void ); char *hyyget_text (void ); @@ -1783,7 +1774,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( hyyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1796,7 +1787,7 @@ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, (yy_size_t) max_size, hyyin)) == 0 && ferror(hyyin)) \ + while ( (result = fread(buf, 1, max_size, hyyin))==0 && ferror(hyyin)) \ { \ if( errno != EINTR) \ { \ @@ -1892,6 +1883,13 @@ register char *yy_cp, *yy_bp; register int yy_act; +/* %% [7.0] user's declarations go here */ +#line 121 "hyp_l.l" + + + /* When in STATE_COMMENT skip all comment until next right brace */ +#line 1892 "hyp_l.c" + if ( !(yy_init) ) { (yy_init) = 1; @@ -1932,14 +1930,6 @@ hyy_load_buffer_state( ); } - { -/* %% [7.0] user's declarations go here */ -#line 121 "hyp_l.l" - - - /* When in STATE_COMMENT skip all comment until next right brace */ -#line 1942 "hyp_l.c" - while ( 1 ) /* loops until end-of-file is reached */ { /* %% [8.0] yymore()-related code goes here */ @@ -1963,7 +1953,7 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; @@ -2002,7 +1992,7 @@ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - yy_size_t yyl; + int yyl; for ( yyl = 0; yyl < hyyleng; ++yyl ) if ( hyytext[yyl] == '\n' ) @@ -2943,7 +2933,7 @@ #line 351 "hyp_l.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2947 "hyp_l.c" +#line 2937 "hyp_l.c" case YY_END_OF_BUFFER: { @@ -3073,7 +3063,6 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of user's declarations */ } /* end of hyylex */ /* %ok-for-header */ @@ -3157,7 +3146,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -3261,7 +3250,7 @@ if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } /* %if-c-only */ @@ -3281,7 +3270,7 @@ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; + register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = @@ -3343,7 +3332,7 @@ else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -3532,6 +3521,17 @@ hyyfree((void *) b ); } +/* %if-c-only */ + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* %endif */ + +/* %if-c++-only */ +/* %endif */ + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a hyyrestart() or at EOF. @@ -3674,7 +3674,7 @@ /* %if-c++-only */ /* %endif */ { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -3777,12 +3777,12 @@ * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE hyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE hyy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - yy_size_t i; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -3873,7 +3873,7 @@ /** Get the length of the current token. * */ -yy_size_t hyyget_leng (void) +int hyyget_leng (void) { return hyyleng; } @@ -4053,7 +4053,7 @@ /* %ok-for-header */ -#line 350 "hyp_l.l" +#line 351 "hyp_l.l" Index: trunk/src_plugins/io_hyp/hyp_l.h =================================================================== --- trunk/src_plugins/io_hyp/hyp_l.h (revision 8412) +++ trunk/src_plugins/io_hyp/hyp_l.h (revision 8413) @@ -15,7 +15,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 39 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -165,13 +165,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - /* %if-not-reentrant */ -extern yy_size_t hyyleng; +extern int hyyleng; /* %endif */ /* %if-c-only */ @@ -180,6 +175,11 @@ /* %endif */ /* %endif */ +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -202,7 +202,7 @@ /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -258,7 +258,7 @@ YY_BUFFER_STATE hyy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE hyy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,int len ); /* %endif */ @@ -269,7 +269,7 @@ /* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */ /* Begin user sect3 */ -#define hyywrap() 1 +#define hyywrap(n) 1 #define YY_SKIP_YYWRAP #define FLEX_DEBUG @@ -339,7 +339,7 @@ void hyyset_out (FILE * out_str ); -yy_size_t hyyget_leng (void ); +int hyyget_leng (void ); char *hyyget_text (void ); @@ -444,7 +444,7 @@ #undef YY_DECL #endif -#line 350 "hyp_l.l" +#line 351 "hyp_l.l" #line 451 "hyp_l.h" Index: trunk/src_plugins/io_hyp/hyp_y.c =================================================================== --- trunk/src_plugins/io_hyp/hyp_y.c (revision 8412) +++ trunk/src_plugins/io_hyp/hyp_y.c (revision 8413) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -227,7 +227,7 @@ /* Value type. */ #if ! defined HYYSTYPE && ! defined HYYSTYPE_IS_DECLARED - +typedef union HYYSTYPE HYYSTYPE; union HYYSTYPE { #line 30 "hyp_y.y" /* yacc.c:355 */ @@ -239,8 +239,6 @@ #line 241 "hyp_y.c" /* yacc.c:355 */ }; - -typedef union HYYSTYPE HYYSTYPE; # define HYYSTYPE_IS_TRIVIAL 1 # define HYYSTYPE_IS_DECLARED 1 #endif @@ -273,7 +271,7 @@ static parse_param h; -#line 277 "hyp_y.c" /* yacc.c:358 */ +#line 275 "hyp_y.c" /* yacc.c:358 */ #ifdef short # undef short @@ -1868,941 +1866,941 @@ case 19: #line 150 "hyp_y.y" /* yacc.c:1646 */ { if (exec_board_file(&h)) YYERROR; } -#line 1872 "hyp_y.c" /* yacc.c:1646 */ +#line 1870 "hyp_y.c" /* yacc.c:1646 */ break; case 21: #line 155 "hyp_y.y" /* yacc.c:1646 */ { h.vers = yylval.floatval; } -#line 1878 "hyp_y.c" /* yacc.c:1646 */ +#line 1876 "hyp_y.c" /* yacc.c:1646 */ break; case 22: #line 155 "hyp_y.y" /* yacc.c:1646 */ { if (exec_version(&h)) YYERROR; } -#line 1884 "hyp_y.c" /* yacc.c:1646 */ +#line 1882 "hyp_y.c" /* yacc.c:1646 */ break; case 23: #line 160 "hyp_y.y" /* yacc.c:1646 */ { if (exec_data_mode(&h)) YYERROR; } -#line 1890 "hyp_y.c" /* yacc.c:1646 */ +#line 1888 "hyp_y.c" /* yacc.c:1646 */ break; case 24: #line 163 "hyp_y.y" /* yacc.c:1646 */ { h.detailed = pcb_false; } -#line 1896 "hyp_y.c" /* yacc.c:1646 */ +#line 1894 "hyp_y.c" /* yacc.c:1646 */ break; case 25: #line 164 "hyp_y.y" /* yacc.c:1646 */ { h.detailed = pcb_true; } -#line 1902 "hyp_y.c" /* yacc.c:1646 */ +#line 1900 "hyp_y.c" /* yacc.c:1646 */ break; case 26: #line 169 "hyp_y.y" /* yacc.c:1646 */ { if (exec_units(&h)) YYERROR; } -#line 1908 "hyp_y.c" /* yacc.c:1646 */ +#line 1906 "hyp_y.c" /* yacc.c:1646 */ break; case 27: #line 172 "hyp_y.y" /* yacc.c:1646 */ { h.unit_system_english = pcb_true; } -#line 1914 "hyp_y.c" /* yacc.c:1646 */ +#line 1912 "hyp_y.c" /* yacc.c:1646 */ break; case 28: #line 173 "hyp_y.y" /* yacc.c:1646 */ { h.unit_system_english = pcb_false; } -#line 1920 "hyp_y.c" /* yacc.c:1646 */ +#line 1918 "hyp_y.c" /* yacc.c:1646 */ break; case 29: #line 176 "hyp_y.y" /* yacc.c:1646 */ { h.metal_thickness_weight = pcb_true; } -#line 1926 "hyp_y.c" /* yacc.c:1646 */ +#line 1924 "hyp_y.c" /* yacc.c:1646 */ break; case 30: #line 177 "hyp_y.y" /* yacc.c:1646 */ { h.metal_thickness_weight = pcb_false; } -#line 1932 "hyp_y.c" /* yacc.c:1646 */ +#line 1930 "hyp_y.c" /* yacc.c:1646 */ break; case 31: #line 181 "hyp_y.y" /* yacc.c:1646 */ { h.default_plane_separation = yylval.floatval; } -#line 1938 "hyp_y.c" /* yacc.c:1646 */ +#line 1936 "hyp_y.c" /* yacc.c:1646 */ break; case 32: #line 181 "hyp_y.y" /* yacc.c:1646 */ { if (exec_plane_sep(&h)) YYERROR; } -#line 1944 "hyp_y.c" /* yacc.c:1646 */ +#line 1942 "hyp_y.c" /* yacc.c:1646 */ break; case 38: #line 195 "hyp_y.y" /* yacc.c:1646 */ { hyyerror("warning: missing ')'"); } -#line 1950 "hyp_y.c" /* yacc.c:1646 */ +#line 1948 "hyp_y.c" /* yacc.c:1646 */ break; case 43: #line 205 "hyp_y.y" /* yacc.c:1646 */ { if (exec_perimeter_segment(&h)) YYERROR; } -#line 1956 "hyp_y.c" /* yacc.c:1646 */ +#line 1954 "hyp_y.c" /* yacc.c:1646 */ break; case 44: #line 208 "hyp_y.y" /* yacc.c:1646 */ { if (exec_perimeter_arc(&h)) YYERROR; } -#line 1962 "hyp_y.c" /* yacc.c:1646 */ +#line 1960 "hyp_y.c" /* yacc.c:1646 */ break; case 45: #line 211 "hyp_y.y" /* yacc.c:1646 */ { h.name = yylval.strval; } -#line 1968 "hyp_y.c" /* yacc.c:1646 */ +#line 1966 "hyp_y.c" /* yacc.c:1646 */ break; case 46: #line 211 "hyp_y.y" /* yacc.c:1646 */ { h.value = yylval.strval; } -#line 1974 "hyp_y.c" /* yacc.c:1646 */ +#line 1972 "hyp_y.c" /* yacc.c:1646 */ break; case 47: #line 211 "hyp_y.y" /* yacc.c:1646 */ { if (exec_board_attribute(&h)) YYERROR; } -#line 1980 "hyp_y.c" /* yacc.c:1646 */ +#line 1978 "hyp_y.c" /* yacc.c:1646 */ break; case 56: #line 230 "hyp_y.y" /* yacc.c:1646 */ { if (exec_options(&h)) YYERROR; } -#line 1986 "hyp_y.c" /* yacc.c:1646 */ +#line 1984 "hyp_y.c" /* yacc.c:1646 */ break; case 57: #line 233 "hyp_y.y" /* yacc.c:1646 */ { h.use_die_for_metal = yylval.boolval; } -#line 1992 "hyp_y.c" /* yacc.c:1646 */ +#line 1990 "hyp_y.c" /* yacc.c:1646 */ break; case 60: #line 238 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 1998 "hyp_y.c" /* yacc.c:1646 */ +#line 1996 "hyp_y.c" /* yacc.c:1646 */ break; case 61: #line 238 "hyp_y.y" /* yacc.c:1646 */ { if (exec_signal(&h)) YYERROR; } -#line 2004 "hyp_y.c" /* yacc.c:1646 */ +#line 2002 "hyp_y.c" /* yacc.c:1646 */ break; case 66: #line 247 "hyp_y.y" /* yacc.c:1646 */ { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } -#line 2010 "hyp_y.c" /* yacc.c:1646 */ +#line 2008 "hyp_y.c" /* yacc.c:1646 */ break; case 74: #line 257 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2016 "hyp_y.c" /* yacc.c:1646 */ +#line 2014 "hyp_y.c" /* yacc.c:1646 */ break; case 75: #line 257 "hyp_y.y" /* yacc.c:1646 */ { if (exec_dielectric(&h)) YYERROR; } -#line 2022 "hyp_y.c" /* yacc.c:1646 */ +#line 2020 "hyp_y.c" /* yacc.c:1646 */ break; case 79: #line 265 "hyp_y.y" /* yacc.c:1646 */ { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; } -#line 2028 "hyp_y.c" /* yacc.c:1646 */ +#line 2026 "hyp_y.c" /* yacc.c:1646 */ break; case 86: #line 275 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2034 "hyp_y.c" /* yacc.c:1646 */ +#line 2032 "hyp_y.c" /* yacc.c:1646 */ break; case 87: #line 275 "hyp_y.y" /* yacc.c:1646 */ { if (exec_plane(&h)) YYERROR; } -#line 2040 "hyp_y.c" /* yacc.c:1646 */ +#line 2038 "hyp_y.c" /* yacc.c:1646 */ break; case 91: #line 283 "hyp_y.y" /* yacc.c:1646 */ { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } -#line 2046 "hyp_y.c" /* yacc.c:1646 */ +#line 2044 "hyp_y.c" /* yacc.c:1646 */ break; case 99: #line 293 "hyp_y.y" /* yacc.c:1646 */ { h.thickness = yylval.floatval; h.thickness_set = pcb_true; } -#line 2052 "hyp_y.c" /* yacc.c:1646 */ +#line 2050 "hyp_y.c" /* yacc.c:1646 */ break; case 100: #line 296 "hyp_y.y" /* yacc.c:1646 */ { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; } -#line 2058 "hyp_y.c" /* yacc.c:1646 */ +#line 2056 "hyp_y.c" /* yacc.c:1646 */ break; case 101: #line 299 "hyp_y.y" /* yacc.c:1646 */ { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; } -#line 2064 "hyp_y.c" /* yacc.c:1646 */ +#line 2062 "hyp_y.c" /* yacc.c:1646 */ break; case 102: #line 302 "hyp_y.y" /* yacc.c:1646 */ { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; } -#line 2070 "hyp_y.c" /* yacc.c:1646 */ +#line 2068 "hyp_y.c" /* yacc.c:1646 */ break; case 103: #line 305 "hyp_y.y" /* yacc.c:1646 */ { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; } -#line 2076 "hyp_y.c" /* yacc.c:1646 */ +#line 2074 "hyp_y.c" /* yacc.c:1646 */ break; case 104: #line 308 "hyp_y.y" /* yacc.c:1646 */ { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; } -#line 2082 "hyp_y.c" /* yacc.c:1646 */ +#line 2080 "hyp_y.c" /* yacc.c:1646 */ break; case 105: #line 311 "hyp_y.y" /* yacc.c:1646 */ { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } -#line 2088 "hyp_y.c" /* yacc.c:1646 */ +#line 2086 "hyp_y.c" /* yacc.c:1646 */ break; case 106: #line 314 "hyp_y.y" /* yacc.c:1646 */ { h.material_name = yylval.strval; h.material_name_set = pcb_true; } -#line 2094 "hyp_y.c" /* yacc.c:1646 */ +#line 2092 "hyp_y.c" /* yacc.c:1646 */ break; case 107: #line 317 "hyp_y.y" /* yacc.c:1646 */ { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; } -#line 2100 "hyp_y.c" /* yacc.c:1646 */ +#line 2098 "hyp_y.c" /* yacc.c:1646 */ break; case 108: #line 320 "hyp_y.y" /* yacc.c:1646 */ { h.conformal = yylval.boolval; h.conformal_set = pcb_true; } -#line 2106 "hyp_y.c" /* yacc.c:1646 */ +#line 2104 "hyp_y.c" /* yacc.c:1646 */ break; case 109: #line 323 "hyp_y.y" /* yacc.c:1646 */ { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; } -#line 2112 "hyp_y.c" /* yacc.c:1646 */ +#line 2110 "hyp_y.c" /* yacc.c:1646 */ break; case 114: #line 336 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2118 "hyp_y.c" /* yacc.c:1646 */ +#line 2116 "hyp_y.c" /* yacc.c:1646 */ break; case 115: #line 336 "hyp_y.y" /* yacc.c:1646 */ { h.device_type = yylval.strval; } -#line 2124 "hyp_y.c" /* yacc.c:1646 */ +#line 2122 "hyp_y.c" /* yacc.c:1646 */ break; case 116: #line 336 "hyp_y.y" /* yacc.c:1646 */ { h.ref = yylval.strval; } -#line 2130 "hyp_y.c" /* yacc.c:1646 */ +#line 2128 "hyp_y.c" /* yacc.c:1646 */ break; case 117: #line 336 "hyp_y.y" /* yacc.c:1646 */ { if (exec_devices(&h)) YYERROR; } -#line 2136 "hyp_y.c" /* yacc.c:1646 */ +#line 2134 "hyp_y.c" /* yacc.c:1646 */ break; case 125: #line 355 "hyp_y.y" /* yacc.c:1646 */ { h.name = yylval.strval; h.name_set = pcb_true; } -#line 2142 "hyp_y.c" /* yacc.c:1646 */ +#line 2140 "hyp_y.c" /* yacc.c:1646 */ break; case 128: #line 363 "hyp_y.y" /* yacc.c:1646 */ { h.value_float = yylval.floatval; h.value_float_set = pcb_true; } -#line 2148 "hyp_y.c" /* yacc.c:1646 */ +#line 2146 "hyp_y.c" /* yacc.c:1646 */ break; case 129: #line 366 "hyp_y.y" /* yacc.c:1646 */ { h.value_string = yylval.strval; h.value_string_set = pcb_true; } -#line 2154 "hyp_y.c" /* yacc.c:1646 */ +#line 2152 "hyp_y.c" /* yacc.c:1646 */ break; case 130: #line 369 "hyp_y.y" /* yacc.c:1646 */ { h.package = yylval.strval; h.package_set = pcb_true; } -#line 2160 "hyp_y.c" /* yacc.c:1646 */ +#line 2158 "hyp_y.c" /* yacc.c:1646 */ break; case 134: #line 381 "hyp_y.y" /* yacc.c:1646 */ { if (exec_supplies(&h)) YYERROR; } -#line 2166 "hyp_y.c" /* yacc.c:1646 */ +#line 2164 "hyp_y.c" /* yacc.c:1646 */ break; case 136: #line 385 "hyp_y.y" /* yacc.c:1646 */ { h.voltage_specified = yylval.boolval; } -#line 2172 "hyp_y.c" /* yacc.c:1646 */ +#line 2170 "hyp_y.c" /* yacc.c:1646 */ break; case 137: #line 388 "hyp_y.y" /* yacc.c:1646 */ { h.conversion = yylval.boolval; } -#line 2178 "hyp_y.c" /* yacc.c:1646 */ +#line 2176 "hyp_y.c" /* yacc.c:1646 */ break; case 138: #line 393 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2184 "hyp_y.c" /* yacc.c:1646 */ +#line 2182 "hyp_y.c" /* yacc.c:1646 */ break; case 139: #line 393 "hyp_y.y" /* yacc.c:1646 */ { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } -#line 2190 "hyp_y.c" /* yacc.c:1646 */ +#line 2188 "hyp_y.c" /* yacc.c:1646 */ break; case 140: #line 393 "hyp_y.y" /* yacc.c:1646 */ { if (exec_padstack_end(&h)) YYERROR; } -#line 2196 "hyp_y.c" /* yacc.c:1646 */ +#line 2194 "hyp_y.c" /* yacc.c:1646 */ break; case 141: #line 396 "hyp_y.y" /* yacc.c:1646 */ { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } -#line 2202 "hyp_y.c" /* yacc.c:1646 */ +#line 2200 "hyp_y.c" /* yacc.c:1646 */ break; case 147: #line 405 "hyp_y.y" /* yacc.c:1646 */ { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } -#line 2208 "hyp_y.c" /* yacc.c:1646 */ +#line 2206 "hyp_y.c" /* yacc.c:1646 */ break; case 148: #line 405 "hyp_y.y" /* yacc.c:1646 */ { if (exec_padstack_element(&h)) YYERROR; new_record(); } -#line 2214 "hyp_y.c" /* yacc.c:1646 */ +#line 2212 "hyp_y.c" /* yacc.c:1646 */ break; case 150: #line 409 "hyp_y.y" /* yacc.c:1646 */ { h.pad_shape = yylval.floatval; } -#line 2220 "hyp_y.c" /* yacc.c:1646 */ +#line 2218 "hyp_y.c" /* yacc.c:1646 */ break; case 152: #line 410 "hyp_y.y" /* yacc.c:1646 */ { h.pad_shape = -1; } -#line 2226 "hyp_y.c" /* yacc.c:1646 */ +#line 2224 "hyp_y.c" /* yacc.c:1646 */ break; case 153: #line 414 "hyp_y.y" /* yacc.c:1646 */ { h.pad_sx = yylval.floatval; } -#line 2232 "hyp_y.c" /* yacc.c:1646 */ +#line 2230 "hyp_y.c" /* yacc.c:1646 */ break; case 154: #line 414 "hyp_y.y" /* yacc.c:1646 */ { h.pad_sy = yylval.floatval; } -#line 2238 "hyp_y.c" /* yacc.c:1646 */ +#line 2236 "hyp_y.c" /* yacc.c:1646 */ break; case 155: #line 414 "hyp_y.y" /* yacc.c:1646 */ { h.pad_angle = yylval.floatval; } -#line 2244 "hyp_y.c" /* yacc.c:1646 */ +#line 2242 "hyp_y.c" /* yacc.c:1646 */ break; case 157: #line 418 "hyp_y.y" /* yacc.c:1646 */ { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; } -#line 2250 "hyp_y.c" /* yacc.c:1646 */ +#line 2248 "hyp_y.c" /* yacc.c:1646 */ break; case 158: #line 419 "hyp_y.y" /* yacc.c:1646 */ { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; } -#line 2256 "hyp_y.c" /* yacc.c:1646 */ +#line 2254 "hyp_y.c" /* yacc.c:1646 */ break; case 159: #line 420 "hyp_y.y" /* yacc.c:1646 */ { h.thermal_clear_shape = yylval.floatval; } -#line 2262 "hyp_y.c" /* yacc.c:1646 */ +#line 2260 "hyp_y.c" /* yacc.c:1646 */ break; case 160: #line 421 "hyp_y.y" /* yacc.c:1646 */ { h.thermal_clear_sx = yylval.floatval; } -#line 2268 "hyp_y.c" /* yacc.c:1646 */ +#line 2266 "hyp_y.c" /* yacc.c:1646 */ break; case 161: #line 422 "hyp_y.y" /* yacc.c:1646 */ { h.thermal_clear_sy = yylval.floatval; } -#line 2274 "hyp_y.c" /* yacc.c:1646 */ +#line 2272 "hyp_y.c" /* yacc.c:1646 */ break; case 162: #line 423 "hyp_y.y" /* yacc.c:1646 */ { h.thermal_clear_angle = yylval.floatval; } -#line 2280 "hyp_y.c" /* yacc.c:1646 */ +#line 2278 "hyp_y.c" /* yacc.c:1646 */ break; case 163: #line 424 "hyp_y.y" /* yacc.c:1646 */ { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; } -#line 2286 "hyp_y.c" /* yacc.c:1646 */ +#line 2284 "hyp_y.c" /* yacc.c:1646 */ break; case 164: #line 430 "hyp_y.y" /* yacc.c:1646 */ { h.net_name = yylval.strval; if (exec_net(&h)) YYERROR; } -#line 2292 "hyp_y.c" /* yacc.c:1646 */ +#line 2290 "hyp_y.c" /* yacc.c:1646 */ break; case 166: #line 433 "hyp_y.y" /* yacc.c:1646 */ { if (exec_net_plane_separation(&h)) YYERROR; } -#line 2298 "hyp_y.c" /* yacc.c:1646 */ +#line 2296 "hyp_y.c" /* yacc.c:1646 */ break; case 170: #line 438 "hyp_y.y" /* yacc.c:1646 */ { hyyerror("warning: empty net"); } -#line 2304 "hyp_y.c" /* yacc.c:1646 */ +#line 2302 "hyp_y.c" /* yacc.c:1646 */ break; case 186: #line 461 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2310 "hyp_y.c" /* yacc.c:1646 */ +#line 2308 "hyp_y.c" /* yacc.c:1646 */ break; case 187: #line 461 "hyp_y.y" /* yacc.c:1646 */ { if (exec_seg(&h)) YYERROR; } -#line 2316 "hyp_y.c" /* yacc.c:1646 */ +#line 2314 "hyp_y.c" /* yacc.c:1646 */ break; case 188: #line 464 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2322 "hyp_y.c" /* yacc.c:1646 */ +#line 2320 "hyp_y.c" /* yacc.c:1646 */ break; case 189: #line 464 "hyp_y.y" /* yacc.c:1646 */ { if (exec_arc(&h)) YYERROR; } -#line 2328 "hyp_y.c" /* yacc.c:1646 */ +#line 2326 "hyp_y.c" /* yacc.c:1646 */ break; case 194: #line 477 "hyp_y.y" /* yacc.c:1646 */ { h.width = yylval.floatval; h.width_set = pcb_true; } -#line 2334 "hyp_y.c" /* yacc.c:1646 */ +#line 2332 "hyp_y.c" /* yacc.c:1646 */ break; case 195: #line 480 "hyp_y.y" /* yacc.c:1646 */ { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; } -#line 2340 "hyp_y.c" /* yacc.c:1646 */ +#line 2338 "hyp_y.c" /* yacc.c:1646 */ break; case 196: #line 483 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2346 "hyp_y.c" /* yacc.c:1646 */ +#line 2344 "hyp_y.c" /* yacc.c:1646 */ break; case 197: #line 483 "hyp_y.y" /* yacc.c:1646 */ { if (exec_via(&h)) YYERROR; } -#line 2352 "hyp_y.c" /* yacc.c:1646 */ +#line 2350 "hyp_y.c" /* yacc.c:1646 */ break; case 201: #line 494 "hyp_y.y" /* yacc.c:1646 */ { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } -#line 2358 "hyp_y.c" /* yacc.c:1646 */ +#line 2356 "hyp_y.c" /* yacc.c:1646 */ break; case 204: #line 497 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; } -#line 2364 "hyp_y.c" /* yacc.c:1646 */ +#line 2362 "hyp_y.c" /* yacc.c:1646 */ break; case 205: #line 498 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; } -#line 2370 "hyp_y.c" /* yacc.c:1646 */ +#line 2368 "hyp_y.c" /* yacc.c:1646 */ break; case 206: #line 499 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; } -#line 2376 "hyp_y.c" /* yacc.c:1646 */ +#line 2374 "hyp_y.c" /* yacc.c:1646 */ break; case 207: #line 500 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; } -#line 2382 "hyp_y.c" /* yacc.c:1646 */ +#line 2380 "hyp_y.c" /* yacc.c:1646 */ break; case 208: #line 501 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; } -#line 2388 "hyp_y.c" /* yacc.c:1646 */ +#line 2386 "hyp_y.c" /* yacc.c:1646 */ break; case 209: #line 502 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; } -#line 2394 "hyp_y.c" /* yacc.c:1646 */ +#line 2392 "hyp_y.c" /* yacc.c:1646 */ break; case 210: #line 503 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; } -#line 2400 "hyp_y.c" /* yacc.c:1646 */ +#line 2398 "hyp_y.c" /* yacc.c:1646 */ break; case 211: #line 504 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; } -#line 2406 "hyp_y.c" /* yacc.c:1646 */ +#line 2404 "hyp_y.c" /* yacc.c:1646 */ break; case 212: #line 505 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; } -#line 2412 "hyp_y.c" /* yacc.c:1646 */ +#line 2410 "hyp_y.c" /* yacc.c:1646 */ break; case 213: #line 506 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; } -#line 2418 "hyp_y.c" /* yacc.c:1646 */ +#line 2416 "hyp_y.c" /* yacc.c:1646 */ break; case 214: #line 507 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; } -#line 2424 "hyp_y.c" /* yacc.c:1646 */ +#line 2422 "hyp_y.c" /* yacc.c:1646 */ break; case 215: #line 508 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; } -#line 2430 "hyp_y.c" /* yacc.c:1646 */ +#line 2428 "hyp_y.c" /* yacc.c:1646 */ break; case 216: #line 512 "hyp_y.y" /* yacc.c:1646 */ { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } -#line 2436 "hyp_y.c" /* yacc.c:1646 */ +#line 2434 "hyp_y.c" /* yacc.c:1646 */ break; case 217: #line 515 "hyp_y.y" /* yacc.c:1646 */ { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; } -#line 2442 "hyp_y.c" /* yacc.c:1646 */ +#line 2440 "hyp_y.c" /* yacc.c:1646 */ break; case 218: #line 518 "hyp_y.y" /* yacc.c:1646 */ { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; } -#line 2448 "hyp_y.c" /* yacc.c:1646 */ +#line 2446 "hyp_y.c" /* yacc.c:1646 */ break; case 219: #line 521 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2454 "hyp_y.c" /* yacc.c:1646 */ +#line 2452 "hyp_y.c" /* yacc.c:1646 */ break; case 220: #line 521 "hyp_y.y" /* yacc.c:1646 */ { if (exec_pin(&h)) YYERROR; } -#line 2460 "hyp_y.c" /* yacc.c:1646 */ +#line 2458 "hyp_y.c" /* yacc.c:1646 */ break; case 225: #line 534 "hyp_y.y" /* yacc.c:1646 */ { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; } -#line 2466 "hyp_y.c" /* yacc.c:1646 */ +#line 2464 "hyp_y.c" /* yacc.c:1646 */ break; case 226: #line 537 "hyp_y.y" /* yacc.c:1646 */ { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; } -#line 2472 "hyp_y.c" /* yacc.c:1646 */ +#line 2470 "hyp_y.c" /* yacc.c:1646 */ break; case 227: #line 538 "hyp_y.y" /* yacc.c:1646 */ { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; } -#line 2478 "hyp_y.c" /* yacc.c:1646 */ +#line 2476 "hyp_y.c" /* yacc.c:1646 */ break; case 228: #line 539 "hyp_y.y" /* yacc.c:1646 */ { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; } -#line 2484 "hyp_y.c" /* yacc.c:1646 */ +#line 2482 "hyp_y.c" /* yacc.c:1646 */ break; case 229: #line 540 "hyp_y.y" /* yacc.c:1646 */ { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); } -#line 2490 "hyp_y.c" /* yacc.c:1646 */ +#line 2488 "hyp_y.c" /* yacc.c:1646 */ break; case 230: #line 544 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2496 "hyp_y.c" /* yacc.c:1646 */ +#line 2494 "hyp_y.c" /* yacc.c:1646 */ break; case 231: #line 544 "hyp_y.y" /* yacc.c:1646 */ { if (exec_pad(&h)) YYERROR; } -#line 2502 "hyp_y.c" /* yacc.c:1646 */ +#line 2500 "hyp_y.c" /* yacc.c:1646 */ break; case 235: #line 553 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; } -#line 2508 "hyp_y.c" /* yacc.c:1646 */ +#line 2506 "hyp_y.c" /* yacc.c:1646 */ break; case 236: #line 554 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; } -#line 2514 "hyp_y.c" /* yacc.c:1646 */ +#line 2512 "hyp_y.c" /* yacc.c:1646 */ break; case 237: #line 555 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; } -#line 2520 "hyp_y.c" /* yacc.c:1646 */ +#line 2518 "hyp_y.c" /* yacc.c:1646 */ break; case 238: #line 556 "hyp_y.y" /* yacc.c:1646 */ { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; } -#line 2526 "hyp_y.c" /* yacc.c:1646 */ +#line 2524 "hyp_y.c" /* yacc.c:1646 */ break; case 239: #line 560 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2532 "hyp_y.c" /* yacc.c:1646 */ +#line 2530 "hyp_y.c" /* yacc.c:1646 */ break; case 240: #line 560 "hyp_y.y" /* yacc.c:1646 */ { if (exec_useg(&h)) YYERROR; } -#line 2538 "hyp_y.c" /* yacc.c:1646 */ +#line 2536 "hyp_y.c" /* yacc.c:1646 */ break; case 243: #line 568 "hyp_y.y" /* yacc.c:1646 */ { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; } -#line 2544 "hyp_y.c" /* yacc.c:1646 */ +#line 2542 "hyp_y.c" /* yacc.c:1646 */ break; case 244: #line 569 "hyp_y.y" /* yacc.c:1646 */ { h.width = yylval.floatval; } -#line 2550 "hyp_y.c" /* yacc.c:1646 */ +#line 2548 "hyp_y.c" /* yacc.c:1646 */ break; case 245: #line 570 "hyp_y.y" /* yacc.c:1646 */ { h.length = yylval.floatval; } -#line 2556 "hyp_y.c" /* yacc.c:1646 */ +#line 2554 "hyp_y.c" /* yacc.c:1646 */ break; case 247: #line 575 "hyp_y.y" /* yacc.c:1646 */ { h.impedance = yylval.floatval; h.impedance_set = pcb_true; } -#line 2562 "hyp_y.c" /* yacc.c:1646 */ +#line 2560 "hyp_y.c" /* yacc.c:1646 */ break; case 248: #line 576 "hyp_y.y" /* yacc.c:1646 */ { h.delay = yylval.floatval; } -#line 2568 "hyp_y.c" /* yacc.c:1646 */ +#line 2566 "hyp_y.c" /* yacc.c:1646 */ break; case 250: #line 580 "hyp_y.y" /* yacc.c:1646 */ { h.resistance = yylval.floatval; h.resistance_set = pcb_true;} -#line 2574 "hyp_y.c" /* yacc.c:1646 */ +#line 2572 "hyp_y.c" /* yacc.c:1646 */ break; case 253: #line 586 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2580 "hyp_y.c" /* yacc.c:1646 */ +#line 2578 "hyp_y.c" /* yacc.c:1646 */ break; case 254: #line 586 "hyp_y.y" /* yacc.c:1646 */ { if (exec_polygon_begin(&h)) YYERROR; } -#line 2586 "hyp_y.c" /* yacc.c:1646 */ +#line 2584 "hyp_y.c" /* yacc.c:1646 */ break; case 255: #line 587 "hyp_y.y" /* yacc.c:1646 */ { if (exec_polygon_end(&h)) YYERROR; } -#line 2592 "hyp_y.c" /* yacc.c:1646 */ +#line 2590 "hyp_y.c" /* yacc.c:1646 */ break; case 262: #line 602 "hyp_y.y" /* yacc.c:1646 */ { h.id = yylval.intval; h.id_set = pcb_true; } -#line 2598 "hyp_y.c" /* yacc.c:1646 */ +#line 2596 "hyp_y.c" /* yacc.c:1646 */ break; case 263: #line 606 "hyp_y.y" /* yacc.c:1646 */ { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; } -#line 2604 "hyp_y.c" /* yacc.c:1646 */ +#line 2602 "hyp_y.c" /* yacc.c:1646 */ break; case 264: #line 607 "hyp_y.y" /* yacc.c:1646 */ { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; } -#line 2610 "hyp_y.c" /* yacc.c:1646 */ +#line 2608 "hyp_y.c" /* yacc.c:1646 */ break; case 265: #line 608 "hyp_y.y" /* yacc.c:1646 */ { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; } -#line 2616 "hyp_y.c" /* yacc.c:1646 */ +#line 2614 "hyp_y.c" /* yacc.c:1646 */ break; case 266: #line 612 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2622 "hyp_y.c" /* yacc.c:1646 */ +#line 2620 "hyp_y.c" /* yacc.c:1646 */ break; case 267: #line 612 "hyp_y.y" /* yacc.c:1646 */ { if (exec_polyvoid_begin(&h)) YYERROR; } -#line 2628 "hyp_y.c" /* yacc.c:1646 */ +#line 2626 "hyp_y.c" /* yacc.c:1646 */ break; case 268: #line 613 "hyp_y.y" /* yacc.c:1646 */ { if (exec_polyvoid_end(&h)) YYERROR; } -#line 2634 "hyp_y.c" /* yacc.c:1646 */ +#line 2632 "hyp_y.c" /* yacc.c:1646 */ break; case 269: #line 616 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2640 "hyp_y.c" /* yacc.c:1646 */ +#line 2638 "hyp_y.c" /* yacc.c:1646 */ break; case 270: #line 616 "hyp_y.y" /* yacc.c:1646 */ { if (exec_polyline_begin(&h)) YYERROR; } -#line 2646 "hyp_y.c" /* yacc.c:1646 */ +#line 2644 "hyp_y.c" /* yacc.c:1646 */ break; case 271: #line 617 "hyp_y.y" /* yacc.c:1646 */ { if (exec_polyline_end(&h)) YYERROR; } -#line 2652 "hyp_y.c" /* yacc.c:1646 */ +#line 2650 "hyp_y.c" /* yacc.c:1646 */ break; case 277: #line 631 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2658 "hyp_y.c" /* yacc.c:1646 */ +#line 2656 "hyp_y.c" /* yacc.c:1646 */ break; case 278: #line 631 "hyp_y.y" /* yacc.c:1646 */ { if (exec_line(&h)) YYERROR; } -#line 2664 "hyp_y.c" /* yacc.c:1646 */ +#line 2662 "hyp_y.c" /* yacc.c:1646 */ break; case 279: #line 634 "hyp_y.y" /* yacc.c:1646 */ { new_record(); } -#line 2670 "hyp_y.c" /* yacc.c:1646 */ +#line 2668 "hyp_y.c" /* yacc.c:1646 */ break; case 280: #line 634 "hyp_y.y" /* yacc.c:1646 */ { if (exec_curve(&h)) YYERROR; } -#line 2676 "hyp_y.c" /* yacc.c:1646 */ +#line 2674 "hyp_y.c" /* yacc.c:1646 */ break; case 281: #line 637 "hyp_y.y" /* yacc.c:1646 */ { h.name = yylval.strval; } -#line 2682 "hyp_y.c" /* yacc.c:1646 */ +#line 2680 "hyp_y.c" /* yacc.c:1646 */ break; case 282: #line 637 "hyp_y.y" /* yacc.c:1646 */ { h.value = yylval.strval; } -#line 2688 "hyp_y.c" /* yacc.c:1646 */ +#line 2686 "hyp_y.c" /* yacc.c:1646 */ break; case 283: #line 637 "hyp_y.y" /* yacc.c:1646 */ { if (exec_net_attribute(&h)) YYERROR; } -#line 2694 "hyp_y.c" /* yacc.c:1646 */ +#line 2692 "hyp_y.c" /* yacc.c:1646 */ break; case 284: #line 642 "hyp_y.y" /* yacc.c:1646 */ { h.net_class_name = yylval.strval; if (exec_net_class(&h)) YYERROR; } -#line 2700 "hyp_y.c" /* yacc.c:1646 */ +#line 2698 "hyp_y.c" /* yacc.c:1646 */ break; case 293: #line 661 "hyp_y.y" /* yacc.c:1646 */ { h.net_name = yylval.strval; } -#line 2706 "hyp_y.c" /* yacc.c:1646 */ +#line 2704 "hyp_y.c" /* yacc.c:1646 */ break; case 294: #line 661 "hyp_y.y" /* yacc.c:1646 */ { if (exec_net_class_element(&h)) YYERROR; } -#line 2712 "hyp_y.c" /* yacc.c:1646 */ +#line 2710 "hyp_y.c" /* yacc.c:1646 */ break; case 295: #line 664 "hyp_y.y" /* yacc.c:1646 */ { h.name = yylval.strval; } -#line 2718 "hyp_y.c" /* yacc.c:1646 */ +#line 2716 "hyp_y.c" /* yacc.c:1646 */ break; case 296: #line 664 "hyp_y.y" /* yacc.c:1646 */ { h.value = yylval.strval; } -#line 2724 "hyp_y.c" /* yacc.c:1646 */ +#line 2722 "hyp_y.c" /* yacc.c:1646 */ break; case 297: #line 664 "hyp_y.y" /* yacc.c:1646 */ { if (exec_net_class_attribute(&h)) YYERROR; } -#line 2730 "hyp_y.c" /* yacc.c:1646 */ +#line 2728 "hyp_y.c" /* yacc.c:1646 */ break; case 298: #line 669 "hyp_y.y" /* yacc.c:1646 */ { if (exec_end(&h)) YYERROR; } -#line 2736 "hyp_y.c" /* yacc.c:1646 */ +#line 2734 "hyp_y.c" /* yacc.c:1646 */ break; case 299: #line 674 "hyp_y.y" /* yacc.c:1646 */ { h.key = yylval.strval; } -#line 2742 "hyp_y.c" /* yacc.c:1646 */ +#line 2740 "hyp_y.c" /* yacc.c:1646 */ break; case 300: #line 674 "hyp_y.y" /* yacc.c:1646 */ { if (exec_key(&h)) YYERROR; } -#line 2748 "hyp_y.c" /* yacc.c:1646 */ +#line 2746 "hyp_y.c" /* yacc.c:1646 */ break; case 301: #line 679 "hyp_y.y" /* yacc.c:1646 */ { h.x = yylval.floatval; } -#line 2754 "hyp_y.c" /* yacc.c:1646 */ +#line 2752 "hyp_y.c" /* yacc.c:1646 */ break; case 302: #line 679 "hyp_y.y" /* yacc.c:1646 */ { h.y = yylval.floatval; } -#line 2760 "hyp_y.c" /* yacc.c:1646 */ +#line 2758 "hyp_y.c" /* yacc.c:1646 */ break; case 303: #line 682 "hyp_y.y" /* yacc.c:1646 */ { h.x1 = yylval.floatval; } -#line 2766 "hyp_y.c" /* yacc.c:1646 */ +#line 2764 "hyp_y.c" /* yacc.c:1646 */ break; case 304: #line 682 "hyp_y.y" /* yacc.c:1646 */ { h.y1 = yylval.floatval; } -#line 2772 "hyp_y.c" /* yacc.c:1646 */ +#line 2770 "hyp_y.c" /* yacc.c:1646 */ break; case 305: #line 685 "hyp_y.y" /* yacc.c:1646 */ { h.x2 = yylval.floatval; } -#line 2778 "hyp_y.c" /* yacc.c:1646 */ +#line 2776 "hyp_y.c" /* yacc.c:1646 */ break; case 306: #line 685 "hyp_y.y" /* yacc.c:1646 */ { h.y2 = yylval.floatval; } -#line 2784 "hyp_y.c" /* yacc.c:1646 */ +#line 2782 "hyp_y.c" /* yacc.c:1646 */ break; case 308: #line 691 "hyp_y.y" /* yacc.c:1646 */ { h.xc = yylval.floatval; } -#line 2790 "hyp_y.c" /* yacc.c:1646 */ +#line 2788 "hyp_y.c" /* yacc.c:1646 */ break; case 309: #line 691 "hyp_y.y" /* yacc.c:1646 */ { h.yc = yylval.floatval; } -#line 2796 "hyp_y.c" /* yacc.c:1646 */ +#line 2794 "hyp_y.c" /* yacc.c:1646 */ break; case 310: #line 691 "hyp_y.y" /* yacc.c:1646 */ { h.r = yylval.floatval; } -#line 2802 "hyp_y.c" /* yacc.c:1646 */ +#line 2800 "hyp_y.c" /* yacc.c:1646 */ break; -#line 2806 "hyp_y.c" /* yacc.c:1646 */ +#line 2804 "hyp_y.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires Index: trunk/src_plugins/io_hyp/hyp_y.h =================================================================== --- trunk/src_plugins/io_hyp/hyp_y.h (revision 8412) +++ trunk/src_plugins/io_hyp/hyp_y.h (revision 8413) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -165,7 +165,7 @@ /* Value type. */ #if ! defined HYYSTYPE && ! defined HYYSTYPE_IS_DECLARED - +typedef union HYYSTYPE HYYSTYPE; union HYYSTYPE { #line 30 "hyp_y.y" /* yacc.c:1909 */ @@ -177,8 +177,6 @@ #line 179 "hyp_y.h" /* yacc.c:1909 */ }; - -typedef union HYYSTYPE HYYSTYPE; # define HYYSTYPE_IS_TRIVIAL 1 # define HYYSTYPE_IS_DECLARED 1 #endif Index: trunk/src_plugins/lib_gtk_common/act_print.c =================================================================== --- trunk/src_plugins/lib_gtk_common/act_print.c (revision 8412) +++ trunk/src_plugins/lib_gtk_common/act_print.c (revision 8413) @@ -66,11 +66,11 @@ static pcb_hid_attribute_t printer_calibrate_attrs[] = { {N_("Enter Values here:"), "", - HID_Label, 0, 0, {0, 0, 0}, 0, 0}, + PCB_HATT_LABEL, 0, 0, {0, 0, 0}, 0, 0}, {N_("x-calibration"), N_("X scale for calibrating your printer"), - HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0}, + PCB_HATT_REAL, 0.5, 25, {0, 0, 1.00}, 0, 0}, {N_("y-calibration"), N_("Y scale for calibrating your printer"), - HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0} + PCB_HATT_REAL, 0.5, 25, {0, 0, 1.00}, 0, 0} }; static pcb_hid_attr_val_t printer_calibrate_values[3]; Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 8412) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 8413) @@ -136,13 +136,13 @@ if (attrs[j].help_text == ATTR_UNDOCUMENTED) continue; switch (attrs[j].type) { - case HID_Label: + case PCB_HATT_LABEL: widget = gtk_label_new(attrs[j].name); gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, FALSE, 0); gtk_widget_set_tooltip_text(widget, attrs[j].help_text); break; - case HID_Integer: + case PCB_HATT_INTEGER: hbox = gtkc_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -160,7 +160,7 @@ gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); break; - case HID_Coord: + case PCB_HATT_COORD: hbox = gtkc_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -176,7 +176,7 @@ gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); break; - case HID_Real: + case PCB_HATT_REAL: hbox = gtkc_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -195,7 +195,7 @@ gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); break; - case HID_String: + case PCB_HATT_STRING: hbox = gtkc_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -210,7 +210,7 @@ gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); break; - case HID_Boolean: + case PCB_HATT_BOOL: /* put this in a check button */ pcb_gtk_check_button_connected(vbox, &widget, attrs[j].default_val.int_value, @@ -218,7 +218,7 @@ gtk_widget_set_tooltip_text(widget, attrs[j].help_text); break; - case HID_Enum: + case PCB_HATT_ENUM: hbox = gtkc_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -243,7 +243,7 @@ g_signal_connect(G_OBJECT(combo), "changed", G_CALLBACK(enum_changed_cb), &(attrs[j])); break; - case HID_Mixed: + case PCB_HATT_MIXED: hbox = gtkc_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); @@ -260,7 +260,7 @@ goto do_enum; break; - case HID_Path: + case PCB_HATT_PATH: vbox1 = ghid_category_vbox(vbox, attrs[j].name, 4, 2, TRUE, TRUE); entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(vbox1), entry, FALSE, FALSE, 0); @@ -270,7 +270,7 @@ gtk_widget_set_tooltip_text(entry, attrs[j].help_text); break; - case HID_Unit: + case PCB_HATT_UNIT: unit_list = get_unit_list(); n = pcb_get_n_units(); Index: trunk/src_plugins/lib_gtk_common/dlg_library_param.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_library_param.c (revision 8412) +++ trunk/src_plugins/lib_gtk_common/dlg_library_param.c (revision 8413) @@ -49,7 +49,7 @@ a = &attrs[*numattr]; memset(a, 0, sizeof(pcb_hid_attribute_t)); a->name = name; - a->type = HID_String; + a->type = PCB_HATT_STRING; (*numattr)++; return a; @@ -141,7 +141,7 @@ continue; switch(attrs[n].type) { - case HID_Enum: + case PCB_HATT_ENUM: val = attrs[n].enumerations[res[n].int_value]; if (val != NULL) { desc = strstr((char *)val, " ("); @@ -149,10 +149,10 @@ *desc = '\0'; } break; - case HID_String: + case PCB_HATT_STRING: val = res[n].str_value; break; - case HID_Coord: + case PCB_HATT_COORD: val = buff; pcb_snprintf(buff, sizeof(buff), "%$$mh", res[n].coord_value); break; @@ -183,7 +183,7 @@ int vlen, len, n; switch(a->type) { - case HID_Enum: + case PCB_HATT_ENUM: vlen = strlen(val); for(n = 0, s = a->enumerations; *s != NULL; s++,n++) { desc = strstr(*s, " ("); @@ -197,11 +197,11 @@ } } break; - case HID_String: + case PCB_HATT_STRING: free((char *)a->default_val.str_value); a->default_val.str_value = pcb_strdup(val); break; - case HID_Coord: + case PCB_HATT_COORD: a->default_val.coord_value = pcb_get_value_ex(val, NULL, NULL, NULL, "mil", NULL); break; default:; @@ -401,13 +401,13 @@ } } else if (strncmp(cmd, "dim:", 4) == 0) { - curr->type = HID_Coord; + curr->type = PCB_HATT_COORD; curr->min_val = 0; curr->max_val = PCB_MM_TO_COORD(512); } else if (strncmp(cmd, "enum:", 5) == 0) { char *evl; - curr->type = HID_Enum; + curr->type = PCB_HATT_ENUM; colsplit(); colsplit(); if (arg != NULL) evl = pcb_strdup_printf("%s (%s)", col, arg); Index: trunk/src_plugins/loghid/loghid.c =================================================================== --- trunk/src_plugins/loghid/loghid.c (revision 8412) +++ trunk/src_plugins/loghid/loghid.c (revision 8413) @@ -39,7 +39,7 @@ pcb_hid_attribute_t loghid_attribute_list[] = { {"target-hid", "the real GUI or export HID to relay calls to", - HID_String, 0, 0, {0, 0, 0}, 0, 0} + PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0} #define HA_target_hid 0 }; #define NUM_OPTIONS sizeof(loghid_attribute_list) / sizeof(loghid_attribute_list[0]) Index: trunk/src_plugins/query/query_l.c =================================================================== --- trunk/src_plugins/query/query_l.c (revision 8412) +++ trunk/src_plugins/query/query_l.c (revision 8413) @@ -27,8 +27,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -107,13 +107,25 @@ #endif /* ! FLEXINT_H */ -/* TODO: this is always defined, so inline it */ +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST #define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) #else -#define yynoreturn +#define yyconst #endif /* Returned upon end-of-file. */ @@ -169,11 +181,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - extern int qry_leng; extern FILE *qry_in, *qry_out; @@ -183,7 +190,6 @@ #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -201,6 +207,11 @@ #define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -213,7 +224,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -241,7 +252,7 @@ int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -269,7 +280,7 @@ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -292,7 +303,7 @@ int qry_leng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = NULL; +static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -351,7 +362,7 @@ typedef unsigned char YY_CHAR; -FILE *qry_in = NULL, *qry_out = NULL; +FILE *qry_in = (FILE *) 0, *qry_out = (FILE *) 0; typedef int yy_state_type; @@ -360,15 +371,12 @@ int qry_lineno = 1; extern char *qry_text; -#ifdef yytext_ptr -#undef yytext_ptr -#endif #define yytext_ptr qry_text static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); -static void yynoreturn yy_fatal_error (yyconst char* msg ); +static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up qry_text. @@ -375,7 +383,7 @@ */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - qry_leng = (int) (yy_cp - yy_bp); \ + qry_leng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -415,7 +423,7 @@ } ; -static yyconst YY_CHAR yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, @@ -447,7 +455,7 @@ 1, 1, 1, 1, 1 } ; -static yyconst YY_CHAR yy_meta[52] = +static yyconst flex_int32_t yy_meta[52] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, @@ -457,7 +465,7 @@ 1 } ; -static yyconst flex_uint16_t yy_base[198] = +static yyconst flex_int16_t yy_base[198] = { 0, 0, 0, 210, 211, 211, 211, 197, 203, 201, 199, 211, 195, 43, 192, 191, 190, 172, 173, 172, 0, @@ -509,7 +517,7 @@ } ; -static yyconst flex_uint16_t yy_nxt[263] = +static yyconst flex_int16_t yy_nxt[263] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 20, @@ -625,7 +633,7 @@ static int qry_yy_input(char *buf, int buflen); static pcb_qry_node_t *make_constant(char *str, long val); #define YY_INPUT(buf, res, buflen) (res = qry_yy_input(buf, buflen)) -#line 629 "query_l.c" +#line 637 "query_l.c" #define INITIAL 0 @@ -658,19 +666,19 @@ FILE *qry_get_in (void ); -void qry_set_in (FILE * _in_str ); +void qry_set_in (FILE * in_str ); FILE *qry_get_out (void ); -void qry_set_out (FILE * _out_str ); +void qry_set_out (FILE * out_str ); - int qry_get_leng (void ); +int qry_get_leng (void ); char *qry_get_text (void ); int qry_get_lineno (void ); -void qry_set_lineno (int _line_number ); +void qry_set_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -684,12 +692,8 @@ #endif #endif -#ifndef YY_NO_UNPUT - static void yyunput (int c,char *buf_ptr ); -#endif - #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -723,7 +727,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( qry_text, (size_t) qry_leng, 1, qry_out )) {} } while (0) +#define ECHO do { if (fwrite( qry_text, qry_leng, 1, qry_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -747,7 +751,7 @@ else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, qry_in))==0 && ferror(qry_in)) \ + while ( (result = fread(buf, 1, max_size, qry_in))==0 && ferror(qry_in)) \ { \ if( errno != EINTR) \ { \ @@ -802,7 +806,7 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK break; #endif #define YY_RULE_SETUP \ @@ -812,10 +816,14 @@ */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; +#line 40 "query_l.l" + +#line 826 "query_l.c" + if ( !(yy_init) ) { (yy_init) = 1; @@ -842,12 +850,7 @@ qry__load_buffer_state( ); } - { -#line 40 "query_l.l" - -#line 849 "query_l.c" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -863,7 +866,7 @@ yy_match: do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -875,7 +878,7 @@ if ( yy_current_state >= 195 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 211 ); @@ -1215,7 +1218,7 @@ #line 115 "query_l.l" ECHO; YY_BREAK -#line 1219 "query_l.c" +#line 1222 "query_l.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1346,7 +1349,6 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of user's declarations */ } /* end of qry_lex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1358,9 +1360,9 @@ */ static int yy_get_next_buffer (void) { - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - yy_size_t number_to_move, i; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -1389,7 +1391,7 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1409,7 +1411,7 @@ { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1429,7 +1431,7 @@ } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; + b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1447,7 +1449,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); + (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1471,9 +1473,9 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) qry_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); @@ -1492,14 +1494,14 @@ static yy_state_type yy_get_previous_state (void) { - yy_state_type yy_current_state; - char *yy_cp; + register yy_state_type yy_current_state; + register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1511,7 +1513,7 @@ if ( yy_current_state >= 195 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; @@ -1524,10 +1526,10 @@ */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); - YY_CHAR yy_c = 1; + register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1539,17 +1541,15 @@ if ( yy_current_state >= 195 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 194); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp ) + static void yyunput (int c, register char * yy_bp ) { - char *yy_cp; + register char *yy_cp; yy_cp = (yy_c_buf_p); @@ -1559,10 +1559,10 @@ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - int number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = + register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1571,7 +1571,7 @@ yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); @@ -1584,8 +1584,6 @@ (yy_c_buf_p) = yy_cp; } -#endif - #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -1634,7 +1632,7 @@ case EOB_ACT_END_OF_FILE: { if ( qry_wrap( ) ) - return 0; + return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1735,7 +1733,7 @@ if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in qry__create_buffer()" ); - b->yy_buf_size = (yy_size_t)size; + b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -1770,6 +1768,10 @@ qry_free((void *) b ); } +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a qry_restart() or at EOF. @@ -1890,15 +1892,15 @@ * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)qry_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in qry_ensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -1907,7 +1909,7 @@ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; + int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)qry_realloc @@ -1927,7 +1929,7 @@ * @param base the character buffer * @param size the size in bytes of the character buffer * - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE qry__scan_buffer (char * base, yy_size_t size ) { @@ -1937,7 +1939,7 @@ base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return NULL; + return 0; b = (YY_BUFFER_STATE) qry_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) @@ -1946,7 +1948,7 @@ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; + b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -1969,7 +1971,7 @@ YY_BUFFER_STATE qry__scan_string (yyconst char * yystr ) { - return qry__scan_bytes(yystr,(int) strlen(yystr) ); + return qry__scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to qry_lex() will @@ -1984,10 +1986,10 @@ YY_BUFFER_STATE b; char *buf; yy_size_t n; - yy_size_t i; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; + n = _yybytes_len + 2; buf = (char *) qry_alloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in qry__scan_bytes()" ); @@ -2013,9 +2015,9 @@ #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (yyconst char* msg ) +static void yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2043,7 +2045,7 @@ */ int qry_get_lineno (void) { - + return qry_lineno; } @@ -2081,29 +2083,29 @@ } /** Set the current line number. - * @param _line_number line number + * @param line_number * */ -void qry_set_lineno (int _line_number ) +void qry_set_lineno (int line_number ) { - qry_lineno = _line_number; + qry_lineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param _in_str A readable stream. + * @param in_str A readable stream. * * @see qry__switch_to_buffer */ -void qry_set_in (FILE * _in_str ) +void qry_set_in (FILE * in_str ) { - qry_in = _in_str ; + qry_in = in_str ; } -void qry_set_out (FILE * _out_str ) +void qry_set_out (FILE * out_str ) { - qry_out = _out_str ; + qry_out = out_str ; } int qry_get_debug (void) @@ -2111,9 +2113,9 @@ return qry__flex_debug; } -void qry_set_debug (int _bdebug ) +void qry_set_debug (int bdebug ) { - qry__flex_debug = _bdebug ; + qry__flex_debug = bdebug ; } static int yy_init_globals (void) @@ -2122,10 +2124,10 @@ * This function is called from qry_lex_destroy(), so don't allocate here. */ - (yy_buffer_stack) = NULL; + (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; + (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; @@ -2134,8 +2136,8 @@ qry_in = stdin; qry_out = stdout; #else - qry_in = NULL; - qry_out = NULL; + qry_in = (FILE *) 0; + qry_out = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by @@ -2173,8 +2175,7 @@ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - - int i; + register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2183,7 +2184,7 @@ #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { - int n; + register int n; for ( n = 0; s[n]; ++n ) ; @@ -2193,12 +2194,11 @@ void *qry_alloc (yy_size_t size ) { - return malloc(size); + return (void *) malloc( size ); } void *qry_realloc (void * ptr, yy_size_t size ) { - /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2206,12 +2206,12 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return realloc(ptr, size); + return (void *) realloc( (char *) ptr, size ); } void qry_free (void * ptr ) { - free( (char *) ptr ); /* see qry_realloc() for (char *) cast */ + free( (char *) ptr ); /* see qry_realloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" Index: trunk/src_plugins/query/query_l.h =================================================================== --- trunk/src_plugins/query/query_l.h (revision 8412) +++ trunk/src_plugins/query/query_l.h (revision 8413) @@ -12,8 +12,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -92,13 +92,25 @@ #endif /* ! FLEXINT_H */ -/* TODO: this is always defined, so inline it */ +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST #define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) #else -#define yynoreturn +#define yyconst #endif /* Size of default input buffer. */ @@ -119,15 +131,15 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +extern int qry_leng; + +extern FILE *qry_in, *qry_out; + #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif -extern int qry_leng; - -extern FILE *qry_in, *qry_out; - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -140,7 +152,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -168,7 +180,7 @@ int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -200,9 +212,6 @@ extern int qry_lineno; extern char *qry_text; -#ifdef yytext_ptr -#undef yytext_ptr -#endif #define yytext_ptr qry_text #ifdef YY_HEADER_EXPORT_START_CONDITIONS @@ -237,19 +246,19 @@ FILE *qry_get_in (void ); -void qry_set_in (FILE * _in_str ); +void qry_set_in (FILE * in_str ); FILE *qry_get_out (void ); -void qry_set_out (FILE * _out_str ); +void qry_set_out (FILE * out_str ); - int qry_get_leng (void ); +int qry_get_leng (void ); char *qry_get_text (void ); int qry_get_lineno (void ); -void qry_set_lineno (int _line_number ); +void qry_set_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -318,6 +327,6 @@ #line 115 "query_l.l" -#line 322 "query_l.h" +#line 331 "query_l.h" #undef qry_IN_HEADER #endif /* qry_HEADER_H */ Index: trunk/src_plugins/query/query_y.c =================================================================== --- trunk/src_plugins/query/query_y.c (revision 8412) +++ trunk/src_plugins/query/query_y.c (revision 8413) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -220,7 +220,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - +typedef union YYSTYPE YYSTYPE; union YYSTYPE { #line 95 "query_y.y" /* yacc.c:355 */ @@ -233,8 +233,6 @@ #line 235 "query_y.c" /* yacc.c:355 */ }; - -typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -248,7 +246,7 @@ /* Copy the second part of user declarations. */ -#line 252 "query_y.c" /* yacc.c:358 */ +#line 250 "query_y.c" /* yacc.c:358 */ #ifdef short # undef short @@ -1416,19 +1414,19 @@ case 2: #line 133 "query_y.y" /* yacc.c:1646 */ { *prg_out = (yyvsp[0].n); } -#line 1420 "query_y.c" /* yacc.c:1646 */ +#line 1418 "query_y.c" /* yacc.c:1646 */ break; case 3: #line 134 "query_y.y" /* yacc.c:1646 */ { *prg_out = (yyvsp[0].n); } -#line 1426 "query_y.c" /* yacc.c:1646 */ +#line 1424 "query_y.c" /* yacc.c:1646 */ break; case 4: #line 139 "query_y.y" /* yacc.c:1646 */ { iter_ctx = pcb_qry_iter_alloc(); } -#line 1432 "query_y.c" /* yacc.c:1646 */ +#line 1430 "query_y.c" /* yacc.c:1646 */ break; case 5: @@ -1441,19 +1439,19 @@ (yyval.n)->data.children->next = (yyvsp[0].n); (yyvsp[0].n)->parent = (yyval.n); } -#line 1445 "query_y.c" /* yacc.c:1646 */ +#line 1443 "query_y.c" /* yacc.c:1646 */ break; case 6: #line 152 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = NULL; } -#line 1451 "query_y.c" /* yacc.c:1646 */ +#line 1449 "query_y.c" /* yacc.c:1646 */ break; case 7: #line 153 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[-1].n); (yyvsp[-1].n)->next = (yyvsp[0].n); } -#line 1457 "query_y.c" /* yacc.c:1646 */ +#line 1455 "query_y.c" /* yacc.c:1646 */ break; case 8: @@ -1467,151 +1465,151 @@ (yyval.n)->data.children->next->next = (yyvsp[0].n); (yyvsp[0].n)->parent = (yyval.n); } -#line 1471 "query_y.c" /* yacc.c:1646 */ +#line 1469 "query_y.c" /* yacc.c:1646 */ break; case 9: #line 169 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = NULL; } -#line 1477 "query_y.c" /* yacc.c:1646 */ +#line 1475 "query_y.c" /* yacc.c:1646 */ break; case 10: #line 170 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[-2].n); (yyvsp[-2].n)->next = (yyvsp[-1].n); } -#line 1483 "query_y.c" /* yacc.c:1646 */ +#line 1481 "query_y.c" /* yacc.c:1646 */ break; case 11: #line 174 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); } -#line 1489 "query_y.c" /* yacc.c:1646 */ +#line 1487 "query_y.c" /* yacc.c:1646 */ break; case 12: #line 175 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); } -#line 1495 "query_y.c" /* yacc.c:1646 */ +#line 1493 "query_y.c" /* yacc.c:1646 */ break; case 13: #line 176 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); } -#line 1501 "query_y.c" /* yacc.c:1646 */ +#line 1499 "query_y.c" /* yacc.c:1646 */ break; case 14: #line 177 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_DATA_INVALID); } -#line 1507 "query_y.c" /* yacc.c:1646 */ +#line 1505 "query_y.c" /* yacc.c:1646 */ break; case 15: #line 178 "query_y.y" /* yacc.c:1646 */ { UNOP((yyval.n), PCBQ_OP_NOT, (yyvsp[0].n)); } -#line 1513 "query_y.c" /* yacc.c:1646 */ +#line 1511 "query_y.c" /* yacc.c:1646 */ break; case 16: #line 179 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[-1].n); } -#line 1519 "query_y.c" /* yacc.c:1646 */ +#line 1517 "query_y.c" /* yacc.c:1646 */ break; case 17: #line 180 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_AND, (yyvsp[0].n)); } -#line 1525 "query_y.c" /* yacc.c:1646 */ +#line 1523 "query_y.c" /* yacc.c:1646 */ break; case 18: #line 181 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_OR, (yyvsp[0].n)); } -#line 1531 "query_y.c" /* yacc.c:1646 */ +#line 1529 "query_y.c" /* yacc.c:1646 */ break; case 19: #line 182 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_EQ, (yyvsp[0].n)); } -#line 1537 "query_y.c" /* yacc.c:1646 */ +#line 1535 "query_y.c" /* yacc.c:1646 */ break; case 20: #line 183 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_NEQ, (yyvsp[0].n)); } -#line 1543 "query_y.c" /* yacc.c:1646 */ +#line 1541 "query_y.c" /* yacc.c:1646 */ break; case 21: #line 184 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_GTEQ, (yyvsp[0].n)); } -#line 1549 "query_y.c" /* yacc.c:1646 */ +#line 1547 "query_y.c" /* yacc.c:1646 */ break; case 22: #line 185 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_LTEQ, (yyvsp[0].n)); } -#line 1555 "query_y.c" /* yacc.c:1646 */ +#line 1553 "query_y.c" /* yacc.c:1646 */ break; case 23: #line 186 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_GT, (yyvsp[0].n)); } -#line 1561 "query_y.c" /* yacc.c:1646 */ +#line 1559 "query_y.c" /* yacc.c:1646 */ break; case 24: #line 187 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_LT, (yyvsp[0].n)); } -#line 1567 "query_y.c" /* yacc.c:1646 */ +#line 1565 "query_y.c" /* yacc.c:1646 */ break; case 25: #line 188 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_ADD, (yyvsp[0].n)); } -#line 1573 "query_y.c" /* yacc.c:1646 */ +#line 1571 "query_y.c" /* yacc.c:1646 */ break; case 26: #line 189 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_SUB, (yyvsp[0].n)); } -#line 1579 "query_y.c" /* yacc.c:1646 */ +#line 1577 "query_y.c" /* yacc.c:1646 */ break; case 27: #line 190 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_MUL, (yyvsp[0].n)); } -#line 1585 "query_y.c" /* yacc.c:1646 */ +#line 1583 "query_y.c" /* yacc.c:1646 */ break; case 28: #line 191 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_DIV, (yyvsp[0].n)); } -#line 1591 "query_y.c" /* yacc.c:1646 */ +#line 1589 "query_y.c" /* yacc.c:1646 */ break; case 29: #line 192 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_MATCH, make_regex_free((yyvsp[0].s))); } -#line 1597 "query_y.c" /* yacc.c:1646 */ +#line 1595 "query_y.c" /* yacc.c:1646 */ break; case 30: #line 193 "query_y.y" /* yacc.c:1646 */ { BINOP((yyval.n), (yyvsp[-2].n), PCBQ_OP_MATCH, make_regex_free((yyvsp[0].s))); } -#line 1603 "query_y.c" /* yacc.c:1646 */ +#line 1601 "query_y.c" /* yacc.c:1646 */ break; case 31: #line 194 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); } -#line 1609 "query_y.c" /* yacc.c:1646 */ +#line 1607 "query_y.c" /* yacc.c:1646 */ break; case 32: #line 195 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); } -#line 1615 "query_y.c" /* yacc.c:1646 */ +#line 1613 "query_y.c" /* yacc.c:1646 */ break; case 33: @@ -1625,121 +1623,121 @@ for(n = (yyvsp[0].n); n != NULL; n = n->next) n->parent = (yyval.n); } -#line 1629 "query_y.c" /* yacc.c:1646 */ +#line 1627 "query_y.c" /* yacc.c:1646 */ break; case 34: #line 208 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_DATA_COORD); UNIT_CONV((yyval.n)->data.crd, 0, (yyvsp[-1].c), (yyvsp[0].u)); } -#line 1635 "query_y.c" /* yacc.c:1646 */ +#line 1633 "query_y.c" /* yacc.c:1646 */ break; case 35: #line 209 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_DATA_DOUBLE); UNIT_CONV((yyval.n)->data.dbl, 0, (yyvsp[-1].d), (yyvsp[0].u)); } -#line 1641 "query_y.c" /* yacc.c:1646 */ +#line 1639 "query_y.c" /* yacc.c:1646 */ break; case 36: #line 210 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_DATA_COORD); UNIT_CONV((yyval.n)->data.crd, 1, (yyvsp[-1].c), (yyvsp[0].u)); } -#line 1647 "query_y.c" /* yacc.c:1646 */ +#line 1645 "query_y.c" /* yacc.c:1646 */ break; case 37: #line 211 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_DATA_DOUBLE); UNIT_CONV((yyval.n)->data.dbl, 1, (yyvsp[-1].d), (yyvsp[0].u)); } -#line 1653 "query_y.c" /* yacc.c:1646 */ +#line 1651 "query_y.c" /* yacc.c:1646 */ break; case 38: #line 215 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_DATA_STRING); (yyval.n)->data.str = (yyvsp[0].s); } -#line 1659 "query_y.c" /* yacc.c:1646 */ +#line 1657 "query_y.c" /* yacc.c:1646 */ break; case 39: #line 219 "query_y.y" /* yacc.c:1646 */ { (yyval.u) = NULL; } -#line 1665 "query_y.c" /* yacc.c:1646 */ +#line 1663 "query_y.c" /* yacc.c:1646 */ break; case 40: #line 220 "query_y.y" /* yacc.c:1646 */ { (yyval.u) = (yyvsp[0].u); } -#line 1671 "query_y.c" /* yacc.c:1646 */ +#line 1669 "query_y.c" /* yacc.c:1646 */ break; case 41: #line 224 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FIELD); (yyval.n)->data.str = (yyvsp[0].s); (yyval.n)->precomp.fld = query_fields_sphash((yyvsp[0].s)); } -#line 1677 "query_y.c" /* yacc.c:1646 */ +#line 1675 "query_y.c" /* yacc.c:1646 */ break; case 42: #line 225 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FIELD); (yyval.n)->data.str = (yyvsp[-2].s); (yyval.n)->precomp.fld = query_fields_sphash((yyvsp[-2].s)); (yyval.n)->next = (yyvsp[0].n); } -#line 1683 "query_y.c" /* yacc.c:1646 */ +#line 1681 "query_y.c" /* yacc.c:1646 */ break; case 43: #line 226 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); /* just ignore .p. */ } -#line 1689 "query_y.c" /* yacc.c:1646 */ +#line 1687 "query_y.c" /* yacc.c:1646 */ break; case 44: #line 227 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FIELD); (yyval.n)->data.str = pcb_strdup("a"); (yyval.n)->precomp.fld = query_fields_sphash("a"); (yyval.n)->next = (yyvsp[0].n); } -#line 1695 "query_y.c" /* yacc.c:1646 */ +#line 1693 "query_y.c" /* yacc.c:1646 */ break; case 45: #line 231 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FIELD); (yyval.n)->data.str = (yyvsp[0].s); } -#line 1701 "query_y.c" /* yacc.c:1646 */ +#line 1699 "query_y.c" /* yacc.c:1646 */ break; case 46: #line 232 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FIELD); (yyval.n)->data.str = attrib_prepend_free((yyvsp[0].n)->data.str, (yyvsp[-2].s), '.'); } -#line 1707 "query_y.c" /* yacc.c:1646 */ +#line 1705 "query_y.c" /* yacc.c:1646 */ break; case 47: #line 233 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FIELD); (yyval.n)->data.str = (yyvsp[0].s); } -#line 1713 "query_y.c" /* yacc.c:1646 */ +#line 1711 "query_y.c" /* yacc.c:1646 */ break; case 48: #line 237 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_VAR); (yyval.n)->data.crd = pcb_qry_iter_var(iter_ctx, (yyvsp[0].s), 1); free((yyvsp[0].s)); } -#line 1719 "query_y.c" /* yacc.c:1646 */ +#line 1717 "query_y.c" /* yacc.c:1646 */ break; case 49: #line 238 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_LISTVAR); (yyval.n)->data.str = pcb_strdup("@"); } -#line 1725 "query_y.c" /* yacc.c:1646 */ +#line 1723 "query_y.c" /* yacc.c:1646 */ break; case 50: #line 239 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_VAR); (yyval.n)->data.crd = pcb_qry_iter_var(iter_ctx, "@", 1); } -#line 1731 "query_y.c" /* yacc.c:1646 */ +#line 1729 "query_y.c" /* yacc.c:1646 */ break; case 51: #line 243 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FCALL); (yyval.n)->data.children = (yyvsp[-3].n); (yyval.n)->data.children->next = (yyvsp[-1].n); (yyvsp[-3].n)->parent = (yyvsp[-1].n)->parent = (yyval.n); } -#line 1737 "query_y.c" /* yacc.c:1646 */ +#line 1735 "query_y.c" /* yacc.c:1646 */ break; case 52: #line 244 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_FCALL); (yyval.n)->data.children = (yyvsp[-2].n); (yyvsp[-2].n)->parent = (yyval.n); } -#line 1743 "query_y.c" /* yacc.c:1646 */ +#line 1741 "query_y.c" /* yacc.c:1646 */ break; case 53: @@ -1754,25 +1752,25 @@ } free((yyvsp[0].s)); } -#line 1758 "query_y.c" /* yacc.c:1646 */ +#line 1756 "query_y.c" /* yacc.c:1646 */ break; case 54: #line 262 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[0].n); } -#line 1764 "query_y.c" /* yacc.c:1646 */ +#line 1762 "query_y.c" /* yacc.c:1646 */ break; case 55: #line 263 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = (yyvsp[-2].n); (yyval.n)->next = (yyvsp[0].n); } -#line 1770 "query_y.c" /* yacc.c:1646 */ +#line 1768 "query_y.c" /* yacc.c:1646 */ break; case 56: #line 267 "query_y.y" /* yacc.c:1646 */ { (yyval.n) = pcb_qry_n_alloc(PCBQ_RNAME); (yyval.n)->data.str = (const char *)pcb_strdup(""); } -#line 1776 "query_y.c" /* yacc.c:1646 */ +#line 1774 "query_y.c" /* yacc.c:1646 */ break; case 57: @@ -1784,11 +1782,11 @@ memcpy((char *)(yyvsp[0].n)->data.str+l1, (yyvsp[-1].s), l2+1); free((yyvsp[-1].s)); } -#line 1788 "query_y.c" /* yacc.c:1646 */ +#line 1786 "query_y.c" /* yacc.c:1646 */ break; -#line 1792 "query_y.c" /* yacc.c:1646 */ +#line 1790 "query_y.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires Index: trunk/src_plugins/query/query_y.h =================================================================== --- trunk/src_plugins/query/query_y.h (revision 8412) +++ trunk/src_plugins/query/query_y.h (revision 8413) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -70,7 +70,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - +typedef union YYSTYPE YYSTYPE; union YYSTYPE { #line 95 "query_y.y" /* yacc.c:1909 */ @@ -83,8 +83,6 @@ #line 85 "query_y.h" /* yacc.c:1909 */ }; - -typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif