Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4787) +++ trunk/src/crosshair.c (revision 4788) @@ -71,7 +71,7 @@ gui->thindraw_pcb_pv(Crosshair.GC, Crosshair.GC, &moved_pv, pcb_true, pcb_false); } -static void draw_dashed_line(hidGC GC, Coord x1, Coord y1, Coord x2, Coord y2) +static void draw_dashed_line(hid_gc_t GC, Coord x1, Coord y1, Coord x2, Coord y2) { /* TODO: we need a real geo lib... using double here is plain wrong */ double dx = x2-x1, dy = y2-y1; Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 4787) +++ trunk/src/crosshair.h (revision 4788) @@ -69,7 +69,7 @@ }; typedef struct { /* holds cursor information */ - hidGC GC, /* GC for cursor drawing */ + hid_gc_t GC, /* GC for cursor drawing */ AttachGC; /* and for displaying buffer contents */ Coord X, Y, /* position in PCB coordinates */ MinX, MinY, /* lowest and highest coordinates */ Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 4787) +++ trunk/src/draw.h (revision 4788) @@ -36,7 +36,7 @@ * some useful values of our widgets */ typedef struct { /* holds information about output window */ - hidGC bgGC, /* background and foreground; */ + hid_gc_t bgGC, /* background and foreground; */ fgGC, /* changed from some routines */ pmGC; /* depth 1 pixmap GC to store clip */ } pcb_output_t; Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 4787) +++ trunk/src/hid.h (revision 4788) @@ -9,8 +9,8 @@ #include "global_typedefs.h" #include "attrib.h" -typedef struct HID_Attr_Val_s HID_Attr_Val; -typedef struct HID_Attribute_s HID_Attribute; +typedef struct hid_attr_val_t_s hid_attr_val_t; +typedef struct hid_attribute_t_s hid_attribute_t; /* Human Interface Device */ @@ -59,7 +59,7 @@ /* This graphics context is an opaque pointer defined by the HID. GCs are HID-specific; attempts to use one HID's GC for a different HID will result in a fatal error. */ -typedef struct hid_gc_struct *hidGC; +typedef struct hid_gc_s *hid_gc_t; #define HIDCONCAT(a,b) a##b @@ -188,13 +188,13 @@ set up the selectable options. In command line mode, these are used to interpret command line options. If n_ret is non-NULL, the number of attributes is stored there. */ - HID_Attribute *(*get_export_options) (int *n_ret_); + hid_attribute_t *(*get_export_options) (int *n_ret_); /* Export (or print) the current PCB. The options given represent the choices made from the options returned from get_export_options. Call with options == NULL to start the primary GUI (create a main window, print, export, etc) */ - void (*do_export) (HID_Attr_Val * options_); + void (*do_export) (hid_attr_val_t * options_); /* uninit a GUI hid */ void (*uninit) (pcb_hid_t *hid); @@ -236,8 +236,8 @@ (positive X) and 90 being "up" (positive Y). */ /* Make an empty graphics context. */ - hidGC (*make_gc) (void); - void (*destroy_gc) (hidGC gc_); + hid_gc_t (*make_gc) (void); + void (*destroy_gc) (hid_gc_t gc_); /* Special note about the "erase" color: To use this color, you must use this function to tell the HID when you're using it. At the @@ -264,33 +264,33 @@ use the "drill" color to draw holes. You may assume this is cheap enough to call inside the redraw callback, but not cheap enough to call for each item drawn. */ - void (*set_color) (hidGC gc_, const char *name_); + void (*set_color) (hid_gc_t gc_, const char *name_); /* Set the line style. While calling this is cheap, calling it with different values each time may be expensive, so grouping items by line style is helpful. */ - void (*set_line_cap) (hidGC gc_, pcb_cap_style_t style_); - void (*set_line_width) (hidGC gc_, Coord width_); - void (*set_draw_xor) (hidGC gc_, int xor_); + void (*set_line_cap) (hid_gc_t gc_, pcb_cap_style_t style_); + void (*set_line_width) (hid_gc_t gc_, Coord width_); + void (*set_draw_xor) (hid_gc_t gc_, int xor_); /* Blends 20% or so color with 80% background. Only used for assembly drawings so far. */ - void (*set_draw_faded) (hidGC gc_, int faded_); + void (*set_draw_faded) (hid_gc_t gc_, int faded_); /* The usual drawing functions. "draw" means to use segments of the given width, whereas "fill" means to fill to a zero-width outline. */ - void (*draw_line) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); - void (*draw_arc) (hidGC gc_, Coord cx_, Coord cy_, Coord xradius_, Coord yradius_, Angle start_angle_, Angle delta_angle_); - void (*draw_rect) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); - void (*fill_circle) (hidGC gc_, Coord cx_, Coord cy_, Coord radius_); - void (*fill_polygon) (hidGC gc_, int n_coords_, Coord * x_, Coord * y_); - void (*fill_pcb_polygon) (hidGC gc_, pcb_polygon_t * poly, const pcb_box_t * clip_box); - void (*thindraw_pcb_polygon) (hidGC gc_, pcb_polygon_t * poly, const pcb_box_t * clip_box); - void (*fill_pcb_pad) (hidGC gc_, pcb_pad_t * pad, pcb_bool clip, pcb_bool mask); - void (*thindraw_pcb_pad) (hidGC gc_, pcb_pad_t * pad, pcb_bool clip, pcb_bool mask); - void (*fill_pcb_pv) (hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); - void (*thindraw_pcb_pv) (hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); - void (*fill_rect) (hidGC gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); + void (*draw_line) (hid_gc_t gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); + void (*draw_arc) (hid_gc_t gc_, Coord cx_, Coord cy_, Coord xradius_, Coord yradius_, Angle start_angle_, Angle delta_angle_); + void (*draw_rect) (hid_gc_t gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); + void (*fill_circle) (hid_gc_t gc_, Coord cx_, Coord cy_, Coord radius_); + void (*fill_polygon) (hid_gc_t gc_, int n_coords_, Coord * x_, Coord * y_); + void (*fill_pcb_polygon) (hid_gc_t gc_, pcb_polygon_t * poly, const pcb_box_t * clip_box); + void (*thindraw_pcb_polygon) (hid_gc_t gc_, pcb_polygon_t * poly, const pcb_box_t * clip_box); + void (*fill_pcb_pad) (hid_gc_t gc_, pcb_pad_t * pad, pcb_bool clip, pcb_bool mask); + void (*thindraw_pcb_pad) (hid_gc_t gc_, pcb_pad_t * pad, pcb_bool clip, pcb_bool mask); + void (*fill_pcb_pv) (hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); + void (*thindraw_pcb_pv) (hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); + void (*fill_rect) (hid_gc_t gc_, Coord x1_, Coord y1_, Coord x2_, Coord y2_); /* This is for the printer. If you call this for the GUI, xval and @@ -426,8 +426,8 @@ may use it for a tooltip or text in a dialog box, or a help string. */ - int (*attribute_dialog) (HID_Attribute * attrs_, - int n_attrs_, HID_Attr_Val * results_, const char *title_, const char *descr_); + int (*attribute_dialog) (hid_attribute_t * attrs_, + int n_attrs_, hid_attr_val_t * results_, const char *title_, const char *descr_); /* This causes a second window to display, which only shows the selected item. The expose callback is called twice; once to size Index: trunk/src/hid_attrib.c =================================================================== --- trunk/src/hid_attrib.c (revision 4787) +++ trunk/src/hid_attrib.c (revision 4788) @@ -5,7 +5,7 @@ HID_AttrNode *hid_attr_nodes = 0; -void hid_register_attributes(HID_Attribute * a, int n, const char *cookie, int copy) +void hid_register_attributes(hid_attribute_t * a, int n, const char *cookie, int copy) { HID_AttrNode *ha; @@ -54,7 +54,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - HID_Attribute *a = ha->attributes + i; + hid_attribute_t *a = ha->attributes + i; switch (a->type) { case HID_Label: break; @@ -84,7 +84,7 @@ break; case HID_Mixed: if (a->value) { - *(HID_Attr_Val *) a->value = a->default_val; + *(hid_attr_val_t *) a->value = a->default_val; case HID_Unit: if (a->value) *(int *) a->value = a->default_val.int_value; @@ -106,7 +106,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) if (strcmp((*argv)[0] + arg_ofs, ha->attributes[i].name) == 0) { - HID_Attribute *a = ha->attributes + i; + hid_attribute_t *a = ha->attributes + i; char *ep; const Unit *unit; switch (ha->attributes[i].type) { @@ -210,7 +210,7 @@ fprintf(stderr, "%-20s %s\n", name, help); } -void hid_usage(HID_Attribute * a, int numa) +void hid_usage(hid_attribute_t * a, int numa) { for (; numa > 0; numa--,a++) { const char *help; Index: trunk/src/hid_attrib.h =================================================================== --- trunk/src/hid_attrib.h (revision 4787) +++ trunk/src/hid_attrib.h (revision 4788) @@ -8,7 +8,7 @@ str_value to the enumeration string. HID_Label just shows the default str_value. HID_Mixed is a real_value followed by an enum, like 0.5in or 100mm. */ -struct HID_Attr_Val_s { +struct hid_attr_val_t_s { int int_value; const char *str_value; double real_value; @@ -20,7 +20,7 @@ HID_Unit, HID_Coord }; -struct HID_Attribute_s { +struct hid_attribute_t_s { const char *name; /* If the help_text is this, usage() won't show this option */ #define ATTR_UNDOCUMENTED ((char *)(1)) @@ -27,12 +27,12 @@ const char *help_text; enum hids type; int min_val, max_val; /* for integer and real */ - HID_Attr_Val default_val; /* Also actual value for global attributes. */ + hid_attr_val_t default_val; /* Also actual value for global attributes. */ 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 HID_Attr_Val here, and HID_Boolean assumes this is + pointer to hid_attr_val_t here, and HID_Boolean assumes this is "char *" so the value should be initialized to zero, and may be set to non-zero (not always one). */ void *value; @@ -39,7 +39,7 @@ int hash; /* for detecting changes. */ }; -extern void hid_register_attributes(HID_Attribute *, int, const char *cookie, int copy); +extern void hid_register_attributes(hid_attribute_t *, int, const char *cookie, int copy); #define REGISTER_ATTRIBUTES(a, cookie) HIDCONCAT(void register_,a) ()\ { hid_register_attributes(a, sizeof(a)/sizeof(a[0]), cookie, 0); } @@ -51,7 +51,7 @@ typedef struct HID_AttrNode { struct HID_AttrNode *next; - HID_Attribute *attributes; + hid_attribute_t *attributes; int n; const char *cookie; } HID_AttrNode; @@ -58,6 +58,6 @@ extern HID_AttrNode *hid_attr_nodes; -void hid_usage(HID_Attribute * a, int numa); +void hid_usage(hid_attribute_t * a, int numa); void hid_usage_option(const char *name, const char *help); #endif Index: trunk/src/hid_draw_helpers.c =================================================================== --- trunk/src/hid_draw_helpers.c (revision 4787) +++ trunk/src/hid_draw_helpers.c (revision 4788) @@ -7,7 +7,7 @@ #include "obj_pad.h" #include "obj_poly.h" -static void fill_contour(hidGC gc, PLINE * pl) +static void fill_contour(hid_gc_t gc, PLINE * pl) { Coord *x, *y, n, i = 0; VNODE *v; @@ -27,7 +27,7 @@ free(y); } -static void thindraw_contour(hidGC gc, PLINE * pl) +static void thindraw_contour(hid_gc_t gc, PLINE * pl) { VNODE *v; Coord last_x, last_y; @@ -65,7 +65,7 @@ static void fill_contour_cb(PLINE * pl, void *user_data) { - hidGC gc = (hidGC) user_data; + hid_gc_t gc = (hid_gc_t) user_data; PLINE *local_pl = pl; fill_contour(gc, pl); @@ -72,7 +72,7 @@ poly_FreeContours(&local_pl); } -static void fill_clipped_contour(hidGC gc, PLINE * pl, const pcb_box_t * clip_box) +static void fill_clipped_contour(hid_gc_t gc, PLINE * pl, const pcb_box_t * clip_box) { PLINE *pl_copy; POLYAREA *clip_poly; @@ -134,7 +134,7 @@ #undef BOUNDS_INSIDE_CLIP_THRESHOLD -void common_fill_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) +void common_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) { if (!poly->NoHolesValid) { /* If enough of the polygon is on-screen, compute the entire @@ -169,18 +169,18 @@ static int thindraw_hole_cb(PLINE * pl, void *user_data) { - hidGC gc = (hidGC) user_data; + hid_gc_t gc = (hid_gc_t) user_data; thindraw_contour(gc, pl); return 0; } -void common_thindraw_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) +void common_thindraw_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) { thindraw_contour(gc, poly->Clipped->contours); PolygonHoles(poly, clip_box, thindraw_hole_cb, gc); } -void common_thindraw_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) +void common_thindraw_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) { Coord w = clear ? (mask ? pad->Mask : pad->Thickness + pad->Clearance) : pad->Thickness; @@ -244,7 +244,7 @@ } } -void common_fill_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) +void common_fill_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) { Coord w = clear ? (mask ? pad->Mask : pad->Thickness + pad->Clearance) : pad->Thickness; @@ -288,7 +288,7 @@ double X, Y; } FloatPolyType; -static void draw_square_pin_poly(hidGC gc, Coord X, Coord Y, Coord Thickness, Coord thin_draw, int style) +static void draw_square_pin_poly(hid_gc_t gc, Coord X, Coord Y, Coord Thickness, Coord thin_draw, int style) { static FloatPolyType p[8] = { {0.5, -PCB_TAN_22_5_DEGREE_2}, @@ -336,13 +336,13 @@ gui->fill_polygon(gc, 8, polygon_x, polygon_y); } -static void draw_octagon_poly(hidGC gc, Coord X, Coord Y, Coord Thickness, Coord thin_draw) +static void draw_octagon_poly(hid_gc_t gc, Coord X, Coord Y, Coord Thickness, Coord thin_draw) { draw_square_pin_poly(gc, X, Y, Thickness, thin_draw, 17); } -void common_fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask) +void common_fill_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask) { Coord w = mask ? pv->Mask : pv->Thickness; Coord r = w / 2; @@ -381,7 +381,7 @@ gui->fill_circle(bg_gc, pv->X, pv->Y, pv->DrillingHole / 2); } -void common_thindraw_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask) +void common_thindraw_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask) { Coord w = mask ? pv->Mask : pv->Thickness; Coord r = w / 2; Index: trunk/src/hid_draw_helpers.h =================================================================== --- trunk/src/hid_draw_helpers.h (revision 4787) +++ trunk/src/hid_draw_helpers.h (revision 4788) @@ -1,10 +1,10 @@ #ifndef PCB_HID_DRAW_HELPERS_H #define PCB_HID_DRAW_HELPERS_H -void common_fill_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box); -void common_thindraw_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box); -void common_fill_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); -void common_thindraw_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); -void common_fill_pcb_pv(hidGC gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); -void common_thindraw_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); +void common_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box); +void common_thindraw_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box); +void common_fill_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); +void common_thindraw_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); +void common_fill_pcb_pv(hid_gc_t gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); +void common_thindraw_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pv, pcb_bool drawHole, pcb_bool mask); void common_draw_helpers_init(pcb_hid_t * hid); #endif Index: trunk/src/hid_extents.c =================================================================== --- trunk/src/hid_extents.c (revision 4787) +++ trunk/src/hid_extents.c (revision 4788) @@ -10,9 +10,9 @@ static pcb_box_t box; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { int width; -} hid_gc_struct; +} hid_gc_s; static int extents_set_layer(const char *name, int group, int empty) { @@ -37,14 +37,14 @@ return 0; } -static hidGC extents_make_gc(void) +static hid_gc_t extents_make_gc(void) { - hidGC rv = (hidGC) malloc(sizeof(hid_gc_struct)); - memset(rv, 0, sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) malloc(sizeof(hid_gc_s)); + memset(rv, 0, sizeof(hid_gc_s)); return rv; } -static void extents_destroy_gc(hidGC gc) +static void extents_destroy_gc(hid_gc_t gc) { free(gc); } @@ -53,20 +53,20 @@ { } -static void extents_set_color(hidGC gc, const char *name) +static void extents_set_color(hid_gc_t gc, const char *name) { } -static void extents_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void extents_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { } -static void extents_set_line_width(hidGC gc, Coord width) +static void extents_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void extents_set_draw_xor(hidGC gc, int xor_) +static void extents_set_draw_xor(hid_gc_t gc, int xor_) { } @@ -75,7 +75,7 @@ #define PEY(y,w) if (box.Y1 > (y)-(w)) box.Y1 = (y)-(w); \ if (box.Y2 < (y)+(w)) box.Y2 = (y)+(w) -static void extents_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void extents_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { PEX(x1, gc->width); PEY(y1, gc->width); @@ -83,7 +83,7 @@ PEY(y2, gc->width); } -static void extents_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) +static void extents_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) { /* Naive but good enough. */ PEX(cx, width + gc->width); @@ -90,7 +90,7 @@ PEY(cy, height + gc->width); } -static void extents_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void extents_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { PEX(x1, gc->width); PEY(y1, gc->width); @@ -98,13 +98,13 @@ PEY(y2, gc->width); } -static void extents_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void extents_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { PEX(cx, radius); PEY(cy, radius); } -static void extents_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void extents_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int i; for (i = 0; i < n_coords; i++) { @@ -113,7 +113,7 @@ } } -static void extents_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void extents_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { PEX(x1, 0); PEY(y1, 0); Index: trunk/src/hid_helper.c =================================================================== --- trunk/src/hid_helper.c (revision 4787) +++ trunk/src/hid_helper.c (revision 4788) @@ -92,7 +92,7 @@ } } -void derive_default_filename(const char *pcbfile, HID_Attribute * filename_attrib, const char *suffix, char **memory) +void derive_default_filename(const char *pcbfile, hid_attribute_t * filename_attrib, const char *suffix, char **memory) { char *buf; char *pf; Index: trunk/src/hid_helper.h =================================================================== --- trunk/src/hid_helper.h (revision 4787) +++ trunk/src/hid_helper.h (revision 4788) @@ -14,6 +14,6 @@ /* Returns a filename base that can be used to output the layer. */ const char *layer_type_to_file_name(int idx, int style); -void derive_default_filename(const char *pcbfile, HID_Attribute * filename_attrib, const char *suffix, char **memory); +void derive_default_filename(const char *pcbfile, hid_attribute_t * filename_attrib, const char *suffix, char **memory); #endif Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 4787) +++ trunk/src/hid_nogui.c (revision 4788) @@ -15,17 +15,17 @@ #define CRASH(func) fprintf(stderr, "HID error: pcb called GUI function %s without having a GUI available.\n", func); abort() -typedef struct hid_gc_struct { +typedef struct hid_gc_s { int nothing_interesting_here; -} hid_gc_struct; +} hid_gc_s; -static HID_Attribute *nogui_get_export_options(int *n_ret) +static hid_attribute_t *nogui_get_export_options(int *n_ret) { CRASH("get_export_options"); return 0; } -static void nogui_do_export(HID_Attr_Val * options) +static void nogui_do_export(hid_attr_val_t * options) { CRASH("do_export"); } @@ -55,12 +55,12 @@ { } -static hidGC nogui_make_gc(void) +static hid_gc_t nogui_make_gc(void) { return 0; } -static void nogui_destroy_gc(hidGC gc) +static void nogui_destroy_gc(hid_gc_t gc) { } @@ -69,81 +69,81 @@ CRASH("use_mask"); } -static void nogui_set_color(hidGC gc, const char *name) +static void nogui_set_color(hid_gc_t gc, const char *name) { CRASH("set_color"); } -static void nogui_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void nogui_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { CRASH("set_line_cap"); } -static void nogui_set_line_width(hidGC gc, Coord width) +static void nogui_set_line_width(hid_gc_t gc, Coord width) { CRASH("set_line_width"); } -static void nogui_set_draw_xor(hidGC gc, int xor_) +static void nogui_set_draw_xor(hid_gc_t gc, int xor_) { CRASH("set_draw_xor"); } -static void nogui_set_draw_faded(hidGC gc, int faded) +static void nogui_set_draw_faded(hid_gc_t gc, int faded) { } -static void nogui_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void nogui_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { CRASH("draw_line"); } -static void nogui_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) +static void nogui_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) { CRASH("draw_arc"); } -static void nogui_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void nogui_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { CRASH("draw_rect"); } -static void nogui_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void nogui_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { CRASH("fill_circle"); } -static void nogui_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void nogui_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { CRASH("fill_polygon"); } -static void nogui_fill_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) +static void nogui_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) { CRASH("fill_pcb_polygon"); } -static void nogui_fill_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) +static void nogui_fill_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) { CRASH("fill_pcb_pad"); } -static void nogui_thindraw_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) +static void nogui_thindraw_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) { CRASH("thindraw_pcb_pad"); } -static void nogui_fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pad, pcb_bool drawHole, pcb_bool mask) +static void nogui_fill_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pad, pcb_bool drawHole, pcb_bool mask) { CRASH("fill_pcb_pv"); } -static void nogui_thindraw_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t * pad, pcb_bool drawHole, pcb_bool mask) +static void nogui_thindraw_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t * pad, pcb_bool drawHole, pcb_bool mask) { CRASH("thindraw_pcb_pv"); } -static void nogui_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void nogui_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { CRASH("fill_rect"); } @@ -355,7 +355,7 @@ return pcb_strdup(answer); } -static int nogui_attribute_dialog(HID_Attribute * attrs, int n_attrs, HID_Attr_Val * results, const char *title, const char *descr) +static int nogui_attribute_dialog(hid_attribute_t * attrs, int n_attrs, hid_attr_val_t * results, const char *title, const char *descr) { CRASH("attribute_dialog"); } Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 4787) +++ trunk/src/obj_pad.c (revision 4788) @@ -343,7 +343,7 @@ DrawTextLowLevel(&text, 0); } -static void _draw_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) +static void _draw_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) { if (clear && !mask && pad->Clearance <= 0) return; Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 4787) +++ trunk/src/select_act.c (revision 4788) @@ -48,9 +48,9 @@ static char *gui_get_pat(search_method_t * method) { const char *methods[] = { "regexp", "list of names", NULL }; - HID_Attribute attrs[2]; + hid_attribute_t attrs[2]; #define nattr sizeof(attrs)/sizeof(attrs[0]) - static HID_Attr_Val results[nattr] = { 0 }; + static hid_attr_val_t results[nattr] = { 0 }; memset(attrs, 0, sizeof(attrs)); Index: trunk/src/stub_draw_fab.c =================================================================== --- trunk/src/stub_draw_fab.c (revision 4787) +++ trunk/src/stub_draw_fab.c (revision 4788) @@ -33,7 +33,7 @@ return 0; } -void dummy_DrawFab(hidGC gc) +void dummy_DrawFab(hid_gc_t gc) { pcb_text_t t; t.X = 0; @@ -46,5 +46,5 @@ } int (*stub_DrawFab_overhang)(void) = dummy_DrawFab_overhang; -void (*stub_DrawFab)(hidGC gc) = dummy_DrawFab; +void (*stub_DrawFab)(hid_gc_t gc) = dummy_DrawFab; Index: trunk/src/stub_draw_fab.h =================================================================== --- trunk/src/stub_draw_fab.h (revision 4787) +++ trunk/src/stub_draw_fab.h (revision 4788) @@ -32,6 +32,6 @@ #include "hid.h" extern int (*stub_DrawFab_overhang)(void); -extern void (*stub_DrawFab)(hidGC gc); +extern void (*stub_DrawFab)(hid_gc_t gc); #endif Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4787) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4788) @@ -136,7 +136,7 @@ #ifdef ROUTE_DEBUG pcb_hid_t *ddraw = NULL; -static hidGC ar_gc = 0; +static hid_gc_t ar_gc = 0; #endif #define EXPENSIVE 3e28 Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 4787) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 4788) @@ -50,12 +50,12 @@ #define DRILL_MARK_SIZE PCB_MIL_TO_COORD(16) #define FAB_LINE_W PCB_MIL_TO_COORD(8) -static void fab_line(hidGC gc, int x1, int y1, int x2, int y2) +static void fab_line(hid_gc_t gc, int x1, int y1, int x2, int y2) { gui->draw_line(gc, x1, y1, x2, y2); } -static void fab_circle(hidGC gc, int x, int y, int r) +static void fab_circle(hid_gc_t gc, int x, int y, int r) { gui->draw_arc(gc, x, y, r, r, 0, 180); gui->draw_arc(gc, x, y, r, r, 180, 180); @@ -62,7 +62,7 @@ } /* align is 0=left, 1=center, 2=right, add 8 for underline */ -static void text_at(hidGC gc, int x, int y, int align, const char *fmt, ...) +static void text_at(hid_gc_t gc, int x, int y, int align, const char *fmt, ...) { char tmp[512]; int w = 0, i; @@ -92,7 +92,7 @@ } /* Y, +, X, circle, square */ -static void drill_sym(hidGC gc, int idx, int x, int y) +static void drill_sym(hid_gc_t gc, int idx, int x, int y) { int type = idx % 5; int size = idx / 5; @@ -165,7 +165,7 @@ return (ds + 2) * TEXT_LINE; } -static void DrawFab(hidGC gc) +static void DrawFab(hid_gc_t gc) { DrillInfoTypePtr AllDrills; int i, n, yoff, total_drills = 0, ds = 0; Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 4787) +++ trunk/src_plugins/export_bboard/bboard.c (revision 4788) @@ -90,7 +90,7 @@ #define HA_skipsolder 2 #define HA_antialias 3 -static HID_Attribute bboard_options[] = { +static hid_attribute_t bboard_options[] = { /* %start-doc options "Breadboard Export" @ftable @code @@ -143,7 +143,7 @@ #define NUM_OPTIONS (sizeof(bboard_options)/sizeof(bboard_options[0])) -static HID_Attr_Val bboard_values[NUM_OPTIONS]; +static hid_attr_val_t bboard_values[NUM_OPTIONS]; /****************************************************************************************************/ static const char *bboard_filename = 0; @@ -159,7 +159,7 @@ * Export filter implementation starts here ********************************************/ -static HID_Attribute *bboard_get_export_options(int *n) +static hid_attribute_t *bboard_get_export_options(int *n) { static char *last_made_filename = 0; if (PCB) @@ -492,7 +492,7 @@ } -static void bboard_do_export(HID_Attr_Val * options) +static void bboard_do_export(hid_attr_val_t * options) { int i; int clr_r, clr_g, clr_b; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 4787) +++ trunk/src_plugins/export_bom/bom.c (revision 4788) @@ -23,7 +23,7 @@ const char *bom_cookie = "bom HID"; -static HID_Attribute bom_options[] = { +static hid_attribute_t bom_options[] = { /* %start-doc options "8 BOM Creation" @ftable @code @item --bomfile @@ -45,7 +45,7 @@ #define NUM_OPTIONS (sizeof(bom_options)/sizeof(bom_options[0])) -static HID_Attr_Val bom_values[NUM_OPTIONS]; +static hid_attr_val_t bom_values[NUM_OPTIONS]; static const char *bom_filename; @@ -62,7 +62,7 @@ struct _BomList *next; } BomList; -static HID_Attribute *bom_get_export_options(int *n) +static hid_attribute_t *bom_get_export_options(int *n) { static char *last_bom_filename = NULL; @@ -268,7 +268,7 @@ return (0); } -static void bom_do_export(HID_Attr_Val * options) +static void bom_do_export(hid_attr_val_t * options) { int i; Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 4787) +++ trunk/src_plugins/export_dsn/dsn.c (revision 4788) @@ -72,7 +72,7 @@ static pcb_hid_t dsn_hid; -static HID_Attribute dsn_options[] = { +static hid_attribute_t dsn_options[] = { {"dsnfile", "SPECCTRA output file", HID_String, 0, 0, {0, 0, 0}, 0, 0}, #define HA_dsnfile 0 @@ -95,11 +95,11 @@ #define NUM_OPTIONS (sizeof(dsn_options)/sizeof(dsn_options[0])) REGISTER_ATTRIBUTES(dsn_options, dsn_cookie) -static HID_Attr_Val dsn_values[NUM_OPTIONS]; +static hid_attr_val_t dsn_values[NUM_OPTIONS]; static const char *dsn_filename; -static HID_Attribute *dsn_get_export_options(int *n) +static hid_attribute_t *dsn_get_export_options(int *n) { static char *last_dsn_filename = 0; if (PCB) { @@ -538,7 +538,7 @@ } -static void dsn_do_export(HID_Attr_Val * options) +static void dsn_do_export(hid_attr_val_t * options) { int i; if (!options) { Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 4787) +++ trunk/src_plugins/export_dxf/dxf.c (revision 4788) @@ -240,32 +240,32 @@ static void dxf_beep(void); static void dxf_calibrate(double xval, double yval); static char *dxf_clean_string(char *in); -static void dxf_destroy_gc(hidGC gc); -static void dxf_do_export(HID_Attr_Val * options); -static void dxf_draw_arc(hidGC gc, int cx, int cy, int width, int height, int start_angle, int delta_angle); -static void dxf_draw_line(hidGC gc, int x1, int y1, int x2, int y2); -static void dxf_draw_rect(hidGC gc, int x1, int y1, int x2, int y2); +static void dxf_destroy_gc(hid_gc_t gc); +static void dxf_do_export(hid_attr_val_t * options); +static void dxf_draw_arc(hid_gc_t gc, int cx, int cy, int width, int height, int start_angle, int delta_angle); +static void dxf_draw_line(hid_gc_t gc, int x1, int y1, int x2, int y2); +static void dxf_draw_rect(hid_gc_t gc, int x1, int y1, int x2, int y2); static int dxf_drill_sort(const void *va, const void *vb); static int dxf_export_xref_file(void); -static void dxf_fill_circle(hidGC gc, int cx, int cy, int radius); -static void dxf_fill_polygon(hidGC gc, int n_coords, int *x, int *y); -static void dxf_fill_rect(hidGC gc, int x1, int y1, int x2, int y2); -static HID_Attribute *dxf_get_export_options(int *n); +static void dxf_fill_circle(hid_gc_t gc, int cx, int cy, int radius); +static void dxf_fill_polygon(hid_gc_t gc, int n_coords, int *x, int *y); +static void dxf_fill_rect(hid_gc_t gc, int x1, int y1, int x2, int y2); +static hid_attribute_t *dxf_get_export_options(int *n); static int dxf_group_for_layer(int l); static DxfList *dxf_insert(char *refdes, char *descr, char *value, DxfList * dxf); static int dxf_layer_sort(const void *va, const void *vb); -static hidGC dxf_make_gc(void); +static hid_gc_t dxf_make_gc(void); static void dxf_maybe_close_file(); static void dxf_parse_arguments(int *argc, char ***argv); static void dxf_progress(int dxf_so_far, int dxf_total, const char *dxf_message); -static void dxf_set_color(hidGC gc, const char *name); +static void dxf_set_color(hid_gc_t gc, const char *name); static void dxf_set_crosshair(int x, int y); static int dxf_set_layer(const char *name, int group); -static void dxf_set_line_cap(hidGC gc, pcb_cap_style_t style); -static void dxf_set_line_width(hidGC gc, int width); +static void dxf_set_line_cap(hid_gc_t gc, pcb_cap_style_t style); +static void dxf_set_line_width(hid_gc_t gc, int width); static void dxf_show_item(void *item); static StringList *dxf_string_insert(char *str, StringList * list); -static void dxf_use_gc(hidGC gc, int radius); +static void dxf_use_gc(hid_gc_t gc, int radius); static void dxf_use_mask(int use_it); static void dxf_write_block(FILE * fp, int id_code, char *xref_name, char *block_name, char *linetype, char *layer, double x0, @@ -603,7 +603,7 @@ * endpoint of a line, this doesn't solve the problem for other aperture * shapes, and is thus not yet implemented. */ -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_cap_style_t cap; /*!< end cap style. */ int width; @@ -614,13 +614,13 @@ /*!< erase. */ int drill; /*!< drill. */ -} hid_gc_struct; +} hid_gc_s; /*! * \brief Definition of options the user can select in the DXF exporter * dialog. */ -static HID_Attribute dxf_options[] = { +static hid_attribute_t dxf_options[] = { /* %start-doc options "DXF Export" @ftable @code @@ -716,7 +716,7 @@ * HID_Label just shows the default str_value.\n * HID_Mixed is a real_value followed by an enum, like 0.5in or 100mm. */ -static HID_Attr_Val dxf_values[NUM_OPTIONS]; +static hid_attr_val_t dxf_values[NUM_OPTIONS]; static int pagecount = 0; @@ -3760,7 +3760,7 @@ * In command line mode, these are used to interpret command line options.\n * If n_ret is non-NULL, the number of attributes is stored there. */ -static HID_Attribute *dxf_get_export_options(int *n) +static hid_attribute_t *dxf_get_export_options(int *n) { static char *last_dxf_filename; static char *last_dxf_xref_filename; @@ -4223,7 +4223,7 @@ *
  • Export a DXF file for every PCB layer.\n * */ -static void dxf_do_export(HID_Attr_Val * options) +static void dxf_do_export(hid_attr_val_t * options) { const char *dxf_fnbase; int i; @@ -4586,14 +4586,14 @@ /*! * \brief Constructor for the graphic context. */ -static hidGC dxf_make_gc(void) +static hid_gc_t dxf_make_gc(void) { - hidGC rv; + hid_gc_t rv; #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_make_gc () function.\n", __FILE__, __LINE__); #endif - rv = (hidGC) calloc(1, sizeof(hid_gc_struct)); + rv = (hid_gc_t) calloc(1, sizeof(hid_gc_s)); rv->cap = Trace_Cap; #if DEBUG fprintf(stderr, "[File: %s: line: %d] Leaving dxf_make_gc () function.\n", __FILE__, __LINE__); @@ -4605,7 +4605,7 @@ /*! * \brief Destructor for the graphic context. */ -static void dxf_destroy_gc(hidGC gc) +static void dxf_destroy_gc(hid_gc_t gc) { #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_destroy_gc () function.\n", __FILE__, __LINE__); @@ -4657,7 +4657,7 @@ * You may assume this is cheap enough to call inside the redraw callback, * but not cheap enough to call for each item drawn. */ -static void dxf_set_color(hidGC gc, /*!< graphic context */ +static void dxf_set_color(hid_gc_t gc, /*!< graphic context */ const char *name) { #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_set_color () function.\n", __FILE__, __LINE__); @@ -4690,7 +4690,7 @@ * While calling this is cheap, calling it with different values each time * may be expensive, so grouping items by line style is helpful. */ -static void dxf_set_line_cap(hidGC gc, pcb_cap_style_t style) { +static void dxf_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_set_line_cap () function.\n", __FILE__, __LINE__); #endif @@ -4708,7 +4708,7 @@ * While calling this is cheap, calling it with different values each time * may be expensive, so grouping items by line width is helpful. */ -static void dxf_set_line_width(hidGC gc, int width) { +static void dxf_set_line_width(hid_gc_t gc, int width) { #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_set_line_width () function.\n", __FILE__, __LINE__); #endif @@ -4719,7 +4719,7 @@ } -static void dxf_set_draw_xor(hidGC gc, int xor_) +static void dxf_set_draw_xor(hid_gc_t gc, int xor_) { ; } @@ -4728,7 +4728,7 @@ /*! * \brief Use the graphic context. */ -static void dxf_use_gc(hidGC gc, int radius) { +static void dxf_use_gc(hid_gc_t gc, int radius) { int c; #if DEBUG @@ -4808,7 +4808,7 @@ * contains the top right corner values. \n * The rectangle is not filled, use dxf_fill_rect () for a filled rectangle. */ -static void dxf_draw_rect(hidGC gc, +static void dxf_draw_rect(hid_gc_t gc, /*!< graphic context */ int x1, /*!< X-value bottom left ?? point */ @@ -5000,7 +5000,7 @@ * to check if the layer didn't change since the last trace segment was * drawn.\n */ -static void dxf_draw_line(hidGC gc, +static void dxf_draw_line(hid_gc_t gc, /*!< graphic context */ int x1, /*!< X-value start point */ @@ -5293,7 +5293,7 @@ * \todo The end cap style has to be implemented at the start and end point of * a trace. */ -static void dxf_draw_arc(hidGC gc, +static void dxf_draw_arc(hid_gc_t gc, /*!< graphic context */ int cx, /*!< X-value center point */ @@ -5584,7 +5584,7 @@ * fill to a zero-width outline.\n * \todo Implement a donut (polyline) instead of a circle. */ -static void dxf_fill_circle(hidGC gc, +static void dxf_fill_circle(hid_gc_t gc, /*!< graphic context. */ int cx, /*!< X-value center point. */ @@ -5679,7 +5679,7 @@ * (select a hatch pattern, create a boundary path, apply a scale and all the * other stuff that is needed). */ -static void dxf_fill_polygon(hidGC gc, +static void dxf_fill_polygon(hid_gc_t gc, /*!< graphic context. */ int n_coords, /*!< number of XY-coordinates. */ @@ -5783,7 +5783,7 @@ * "draw" means to use segments of the given width, whereas "fill" means to * fill to a zero-width outline.\n */ -static void dxf_fill_rect(hidGC gc, +static void dxf_fill_rect(hid_gc_t gc, /*!< graphic context. */ int x1, /*!< X-value bottom left ?? point. */ Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 4787) +++ trunk/src_plugins/export_gcode/gcode.c (revision 4788) @@ -81,7 +81,7 @@ unsigned int r, g, b; }; -struct hid_gc_struct { +struct hid_gc_s { pcb_hid_t *me_pointer; pcb_cap_style_t cap; int width; @@ -142,7 +142,7 @@ NULL }; -HID_Attribute gcode_attribute_list[] = { +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}, @@ -177,7 +177,7 @@ #define NUM_OPTIONS (sizeof(gcode_attribute_list)/sizeof(gcode_attribute_list[0])) REGISTER_ATTRIBUTES(gcode_attribute_list, gcode_cookie) - static HID_Attr_Val gcode_values[NUM_OPTIONS]; + static hid_attr_val_t gcode_values[NUM_OPTIONS]; /* *** Utility funcions **************************************************** */ @@ -226,7 +226,7 @@ hid_parse_command_line(argc, argv); } -static HID_Attribute *gcode_get_export_options(int *n) +static hid_attribute_t *gcode_get_export_options(int *n) { static char *last_made_filename = 0; static int last_unit_value = -1; @@ -347,7 +347,7 @@ hid_expose_callback(&gcode_hid, ®ion, 0); } -static void gcode_do_export(HID_Attr_Val * options) +static void gcode_do_export(hid_attr_val_t * options) { int save_ons[MAX_LAYER + 2]; int i, idx; @@ -566,9 +566,9 @@ return 0; } -static hidGC gcode_make_gc(void) +static hid_gc_t gcode_make_gc(void) { - hidGC rv = (hidGC) malloc(sizeof(struct hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) malloc(sizeof(struct hid_gc_s)); rv->me_pointer = &gcode_hid; rv->cap = Trace_Cap; rv->width = 1; @@ -578,7 +578,7 @@ return rv; } -static void gcode_destroy_gc(hidGC gc) +static void gcode_destroy_gc(hid_gc_t gc) { free(gc); } @@ -588,7 +588,7 @@ /* does nothing */ } -static void gcode_set_color(hidGC gc, const char *name) +static void gcode_set_color(hid_gc_t gc, const char *name) { if (gcode_im == NULL) { return; @@ -612,27 +612,27 @@ return; } -static void gcode_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void gcode_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void gcode_set_line_width(hidGC gc, Coord width) +static void gcode_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void gcode_set_draw_xor(hidGC gc, int xor_) +static void gcode_set_draw_xor(hid_gc_t gc, int xor_) { ; } -static void gcode_set_draw_faded(hidGC gc, int faded) +static void gcode_set_draw_faded(hid_gc_t gc, int faded) { gc->faded = faded; } -static void use_gc(hidGC gc) +static void use_gc(hid_gc_t gc) { int need_brush = 0; @@ -734,7 +734,7 @@ } } -static void gcode_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void gcode_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); gdImageRectangle(gcode_im, @@ -744,7 +744,7 @@ /* printf("Rect %d %d %d %d\n",x1,y1,x2,y2); */ } -static void gcode_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void gcode_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); gdImageSetThickness(gcode_im, 0); @@ -756,7 +756,7 @@ /* printf("FillRect %d %d %d %d\n",x1,y1,x2,y2); */ } -static void gcode_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void gcode_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { if (x1 == x2 && y1 == y2) { Coord w = gc->width / 2; @@ -770,7 +770,7 @@ gdImageLine(gcode_im, pcb_to_gcode(x1), pcb_to_gcode(y1), pcb_to_gcode(x2), pcb_to_gcode(y2), gdBrushed); } -static void gcode_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void gcode_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { Angle sa, ea; @@ -809,7 +809,7 @@ pcb_to_gcode(2 * height + gcode_toolradius * 2), sa, ea, gdBrushed); } -static void gcode_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void gcode_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { use_gc(gc); @@ -830,7 +830,7 @@ } } -static void gcode_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void gcode_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int i; gdPoint *points; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 4787) +++ trunk/src_plugins/export_gerber/gerber.c (revision 4788) @@ -38,25 +38,25 @@ /* Function prototypes */ /*----------------------------------------------------------------------------*/ -static HID_Attribute *gerber_get_export_options(int *n); -static void gerber_do_export(HID_Attr_Val * options); +static hid_attribute_t *gerber_get_export_options(int *n); +static void gerber_do_export(hid_attr_val_t * options); static void gerber_parse_arguments(int *argc, char ***argv); static int gerber_set_layer(const char *name, int group, int empty); -static hidGC gerber_make_gc(void); -static void gerber_destroy_gc(hidGC gc); +static hid_gc_t gerber_make_gc(void); +static void gerber_destroy_gc(hid_gc_t gc); static void gerber_use_mask(int use_it); -static void gerber_set_color(hidGC gc, const char *name); -static void gerber_set_line_cap(hidGC gc, pcb_cap_style_t style); -static void gerber_set_line_width(hidGC gc, Coord width); -static void gerber_set_draw_xor(hidGC gc, int _xor); -static void gerber_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void gerber_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle); -static void gerber_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void gerber_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); -static void gerber_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void gerber_set_color(hid_gc_t gc, const char *name); +static void gerber_set_line_cap(hid_gc_t gc, pcb_cap_style_t style); +static void gerber_set_line_width(hid_gc_t gc, Coord width); +static void gerber_set_draw_xor(hid_gc_t gc, int _xor); +static void gerber_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void gerber_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle); +static void gerber_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void gerber_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); +static void gerber_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); static void gerber_calibrate(double xval, double yval); static void gerber_set_crosshair(int x, int y, int action); -static void gerber_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y); +static void gerber_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y); /*----------------------------------------------------------------------------*/ /* Utility routines */ @@ -257,13 +257,13 @@ static pcb_hid_t gerber_hid; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_cap_style_t cap; int width; int color; int erase; int drill; -} hid_gc_struct; +} hid_gc_s; static FILE *f = NULL; static char *filename = NULL; @@ -305,7 +305,7 @@ NULL }; -static HID_Attribute gerber_options[] = { +static hid_attribute_t gerber_options[] = { /* %start-doc options "90 Gerber Export" @ftable @code @@ -349,9 +349,9 @@ #define NUM_OPTIONS (sizeof(gerber_options)/sizeof(gerber_options[0])) -static HID_Attr_Val gerber_values[NUM_OPTIONS]; +static hid_attr_val_t gerber_values[NUM_OPTIONS]; -static HID_Attribute *gerber_get_export_options(int *n) +static hid_attribute_t *gerber_get_export_options(int *n) { static char *last_made_filename = NULL; if (PCB) @@ -497,7 +497,7 @@ strcat(dest, sext); } -static void gerber_do_export(HID_Attr_Val * options) +static void gerber_do_export(hid_attr_val_t * options) { const char *fnbase; int i; @@ -774,7 +774,7 @@ if (outline_layer && outline_layer != PCB->Data->Layer + idx) DrawLayer(outline_layer, ®ion); else if (!outline_layer) { - hidGC gc = gui->make_gc(); + hid_gc_t gc = gui->make_gc(); printf("name %s idx %d\n", name, idx); if (SL_TYPE(idx) == SL_SILK) gui->set_line_width(gc, PCB->minSlk); @@ -793,14 +793,14 @@ return 1; } -static hidGC gerber_make_gc(void) +static hid_gc_t gerber_make_gc(void) { - hidGC rv = (hidGC) calloc(1, sizeof(*rv)); + hid_gc_t rv = (hid_gc_t) calloc(1, sizeof(*rv)); rv->cap = Trace_Cap; return rv; } -static void gerber_destroy_gc(hidGC gc) +static void gerber_destroy_gc(hid_gc_t gc) { free(gc); } @@ -810,7 +810,7 @@ current_mask = use_it; } -static void gerber_set_color(hidGC gc, const char *name) +static void gerber_set_color(hid_gc_t gc, const char *name) { if (strcmp(name, "erase") == 0) { gc->color = 1; @@ -829,22 +829,22 @@ } } -static void gerber_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void gerber_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void gerber_set_line_width(hidGC gc, Coord width) +static void gerber_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void gerber_set_draw_xor(hidGC gc, int xor_) +static void gerber_set_draw_xor(hid_gc_t gc, int xor_) { ; } -static void use_gc(hidGC gc, int radius) +static void use_gc(hid_gc_t gc, int radius) { if (radius) { radius *= 2; @@ -902,7 +902,7 @@ #endif } -static void gerber_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void gerber_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { gerber_draw_line(gc, x1, y1, x1, y2); gerber_draw_line(gc, x1, y1, x2, y1); @@ -910,7 +910,7 @@ gerber_draw_line(gc, x2, y1, x2, y2); } -static void gerber_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void gerber_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { pcb_bool m = pcb_false; @@ -973,7 +973,7 @@ } -static void gerber_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void gerber_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { pcb_bool m = pcb_false; double arcStartX, arcStopX, arcStartY, arcStopY; @@ -1047,7 +1047,7 @@ lastY = arcStopY; } -static void gerber_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void gerber_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { if (radius <= 0) return; @@ -1080,7 +1080,7 @@ fprintf(f, "D03*\r\n"); } -static void gerber_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void gerber_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { pcb_bool m = pcb_false; int i; @@ -1131,7 +1131,7 @@ fprintf(f, "G37*\r\n"); } -static void gerber_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void gerber_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { Coord x[5]; Coord y[5]; Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4787) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4788) @@ -58,7 +58,7 @@ static const char *ipcd356_cookie = "ipcd356 exporter"; -static HID_Attribute IPCD356_options[] = { +static hid_attribute_t IPCD356_options[] = { /* %start-doc options "8 IPC-D-356 Netlist Export" @ftable @code @item --netlist-file @@ -76,7 +76,7 @@ #define NUM_OPTIONS (sizeof(IPCD356_options)/sizeof(IPCD356_options[0])) -static HID_Attr_Val IPCD356_values[NUM_OPTIONS]; +static hid_attr_val_t IPCD356_values[NUM_OPTIONS]; const char *IPCD356_filename; @@ -101,7 +101,7 @@ IPCD356_AliasList *AddAliasToList(IPCD356_AliasList *); int IPCD356_SanityCheck(void); -static HID_Attribute *IPCD356_get_export_options(int *n) +static hid_attribute_t *IPCD356_get_export_options(int *n) { static char *last_IPCD356_filename = 0; @@ -576,7 +576,7 @@ return (0); } -static void IPCD356_do_export(HID_Attr_Val * options) +static void IPCD356_do_export(hid_attr_val_t * options) { int i; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 4787) +++ trunk/src_plugins/export_lpr/lpr.c (revision 4788) @@ -23,7 +23,7 @@ const char *lpr_cookie = "lpr HID"; -static HID_Attribute base_lpr_options[] = { +static hid_attribute_t base_lpr_options[] = { /* %start-doc options "98 lpr Printing Options" @ftable @code @@ -42,11 +42,11 @@ #define NUM_OPTIONS (sizeof(lpr_options)/sizeof(lpr_options[0])) -static HID_Attribute *lpr_options = 0; +static hid_attribute_t *lpr_options = 0; static int num_lpr_options = 0; -static HID_Attr_Val *lpr_values; +static hid_attr_val_t *lpr_values; -static HID_Attribute *lpr_get_export_options(int *n) +static hid_attribute_t *lpr_get_export_options(int *n) { /* * We initialize the default value in this manner because the GUI @@ -58,11 +58,11 @@ } if (lpr_options == 0) { - HID_Attribute *ps_opts = ps_hid.get_export_options(&num_lpr_options); - lpr_options = (HID_Attribute *) calloc(num_lpr_options, sizeof(HID_Attribute)); - memcpy(lpr_options, ps_opts, num_lpr_options * sizeof(HID_Attribute)); + hid_attribute_t *ps_opts = ps_hid.get_export_options(&num_lpr_options); + lpr_options = (hid_attribute_t *) calloc(num_lpr_options, sizeof(hid_attribute_t)); + memcpy(lpr_options, ps_opts, num_lpr_options * sizeof(hid_attribute_t)); memcpy(lpr_options, base_lpr_options, sizeof(base_lpr_options)); - lpr_values = (HID_Attr_Val *) calloc(num_lpr_options, sizeof(HID_Attr_Val)); + lpr_values = (hid_attr_val_t *) calloc(num_lpr_options, sizeof(hid_attr_val_t)); } if (n) *n = num_lpr_options; @@ -69,7 +69,7 @@ return lpr_options; } -static void lpr_do_export(HID_Attr_Val * options) +static void lpr_do_export(hid_attr_val_t * options) { FILE *f; int i; Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 4787) +++ trunk/src_plugins/export_nelma/nelma.c (revision 4788) @@ -94,7 +94,7 @@ unsigned int r, g, b; }; -struct hid_gc_struct { +struct hid_gc_s { pcb_hid_t *me_pointer; pcb_cap_style_t cap; Coord width; @@ -149,7 +149,7 @@ /* Permittivity of empty space (As/Vm) */ static const double nelma_air_epsilon = 8.85e-12; -HID_Attribute nelma_attribute_list[] = { +hid_attribute_t nelma_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "nelma Options" @@ -211,7 +211,7 @@ #define NUM_OPTIONS (sizeof(nelma_attribute_list)/sizeof(nelma_attribute_list[0])) REGISTER_ATTRIBUTES(nelma_attribute_list, nelma_cookie) - static HID_Attr_Val nelma_values[NUM_OPTIONS]; + static hid_attr_val_t nelma_values[NUM_OPTIONS]; /* *** Utility funcions **************************************************** */ @@ -480,7 +480,7 @@ hid_parse_command_line(argc, argv); } -static HID_Attribute *nelma_get_export_options(int *n) +static hid_attribute_t *nelma_get_export_options(int *n) { static char *last_made_filename = 0; @@ -594,7 +594,7 @@ hid_expose_callback(&nelma_hid, ®ion, 0); } -static void nelma_do_export(HID_Attr_Val * options) +static void nelma_do_export(hid_attr_val_t * options) { int save_ons[MAX_LAYER + 2]; int i, idx; @@ -697,9 +697,9 @@ return 0; } -static hidGC nelma_make_gc(void) +static hid_gc_t nelma_make_gc(void) { - hidGC rv = (hidGC) malloc(sizeof(struct hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) malloc(sizeof(struct hid_gc_s)); rv->me_pointer = &nelma_hid; rv->cap = Trace_Cap; rv->width = 1; @@ -709,7 +709,7 @@ return rv; } -static void nelma_destroy_gc(hidGC gc) +static void nelma_destroy_gc(hid_gc_t gc) { free(gc); } @@ -719,7 +719,7 @@ /* does nothing */ } -static void nelma_set_color(hidGC gc, const char *name) +static void nelma_set_color(hid_gc_t gc, const char *name) { if (nelma_im == NULL) { return; @@ -743,27 +743,27 @@ return; } -static void nelma_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void nelma_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void nelma_set_line_width(hidGC gc, Coord width) +static void nelma_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void nelma_set_draw_xor(hidGC gc, int xor_) +static void nelma_set_draw_xor(hid_gc_t gc, int xor_) { ; } -static void nelma_set_draw_faded(hidGC gc, int faded) +static void nelma_set_draw_faded(hid_gc_t gc, int faded) { gc->faded = faded; } -static void use_gc(hidGC gc) +static void use_gc(hid_gc_t gc) { int need_brush = 0; @@ -865,13 +865,13 @@ } } -static void nelma_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void nelma_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); gdImageRectangle(nelma_im, pcb_to_nelma(x1), pcb_to_nelma(y1), pcb_to_nelma(x2), pcb_to_nelma(y2), gc->color->c); } -static void nelma_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void nelma_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); gdImageSetThickness(nelma_im, 0); @@ -879,7 +879,7 @@ gdImageFilledRectangle(nelma_im, pcb_to_nelma(x1), pcb_to_nelma(y1), pcb_to_nelma(x2), pcb_to_nelma(y2), gc->color->c); } -static void nelma_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void nelma_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { if (x1 == x2 && y1 == y2) { Coord w = gc->width / 2; @@ -893,7 +893,7 @@ gdImageLine(nelma_im, pcb_to_nelma(x1), pcb_to_nelma(y1), pcb_to_nelma(x2), pcb_to_nelma(y2), gdBrushed); } -static void nelma_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void nelma_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { Angle sa, ea; @@ -931,7 +931,7 @@ pcb_to_nelma(2 * width), pcb_to_nelma(2 * height), sa, ea, gdBrushed); } -static void nelma_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void nelma_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { use_gc(gc); @@ -942,7 +942,7 @@ } -static void nelma_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void nelma_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int i; gdPoint *points; Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 4787) +++ trunk/src_plugins/export_openscad/scad.c (revision 4788) @@ -134,7 +134,7 @@ #define HA_minimal_drill 9 #define HA_board_cut 10 -static HID_Attribute scad_options[] = { +static hid_attribute_t scad_options[] = { /* %start-doc options "Advanced OpenSCAD Export" @ftable @code @@ -274,7 +274,7 @@ #define NUM_OPTIONS (sizeof(scad_options)/sizeof(scad_options[0])) -static HID_Attr_Val scad_values[NUM_OPTIONS]; +static hid_attr_val_t scad_values[NUM_OPTIONS]; /****************************************************************************************************/ @@ -300,8 +300,8 @@ static int n_alloc_outline_segments, n_outline_segments; static t_outline_segment *outline_segments; -static void scad_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y); -static void scad_emit_polygon(hidGC gc, int n_coords, Coord * x, Coord * y, float thickness); +static void scad_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y); +static void scad_emit_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y, float thickness); /* scaling function - all output is in milimeters */ @@ -334,7 +334,7 @@ * Export filter implementation starts here ********************************************/ -static HID_Attribute *scad_get_export_options(int *n) +static hid_attribute_t *scad_get_export_options(int *n) { static char *last_made_filename = 0; if (PCB) @@ -496,7 +496,7 @@ } } -static void scad_do_export(HID_Attr_Val * options) +static void scad_do_export(hid_attr_val_t * options) { int i; int inner_layers; @@ -840,15 +840,15 @@ return 1; } -static hidGC scad_make_gc(void) +static hid_gc_t scad_make_gc(void) { - hidGC rv = (hidGC) calloc(1, sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) calloc(1, sizeof(hid_gc_s)); rv->cap = Trace_Cap; rv->seq = lastseq++; return rv; } -static void scad_destroy_gc(hidGC gc) +static void scad_destroy_gc(hid_gc_t gc) { free(gc); } @@ -858,7 +858,7 @@ current_mask = use_it; } -static void scad_set_color(hidGC gc, const char *name) +static void scad_set_color(hid_gc_t gc, const char *name) { if (strcmp(name, "erase") == 0) { gc->erase = 1; @@ -887,22 +887,22 @@ } } -static void scad_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void scad_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void scad_set_line_width(hidGC gc, Coord width) +static void scad_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void scad_set_draw_xor(hidGC gc, int xor) +static void scad_set_draw_xor(hid_gc_t gc, int xor) { } -static void scad_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void scad_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { Coord x[5]; Coord y[5]; @@ -924,7 +924,7 @@ * -- on polyline segment cap is drawn only on beginning */ -static void scad_emit_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2, int mode) +static void scad_emit_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2, int mode) { int zero_length; float angle = 0., length = 0.; @@ -978,7 +978,7 @@ } -static void scad_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void scad_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { if (drill_layer) return; @@ -987,7 +987,7 @@ } -static void scad_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void scad_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { int i, n_steps, x, y, ox = 0, oy = 0, sa; float angle; @@ -1024,7 +1024,7 @@ * - as plated or unplated drills it creates vector of holes * - otherwise it is drawn as simple */ -static void scad_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void scad_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { /* int i; */ if (outline_layer) @@ -1058,7 +1058,7 @@ * Helper function - creates extruded polygon */ -static void scad_emit_polygon(hidGC gc, int n_coords, Coord * x, Coord * y, float thickness) +static void scad_emit_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y, float thickness) { int i, n; /* int cw, cx; */ @@ -1091,7 +1091,7 @@ } -static void scad_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void scad_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { if (outline_layer) return; @@ -1099,7 +1099,7 @@ scad_emit_polygon(gc, n_coords, x, y, scaled_layer_thickness); } -static void scad_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void scad_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { Coord x[5]; Coord y[5]; Index: trunk/src_plugins/export_openscad/scad.h =================================================================== --- trunk/src_plugins/export_openscad/scad.h (revision 4787) +++ trunk/src_plugins/export_openscad/scad.h (revision 4788) @@ -109,7 +109,7 @@ int r, g, b; } color_table_struct; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_cap_style_t cap; int width; int erase; @@ -116,7 +116,7 @@ int drill; int r, g, b; int seq; -} hid_gc_struct; +} hid_gc_s; typedef struct { int processed; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 4787) +++ trunk/src_plugins/export_png/png.c (revision 4788) @@ -81,7 +81,7 @@ #define NOT_EDGE_Y(y) ((y) != 0 && (y) != PCB->MaxHeight) #define NOT_EDGE(x,y) (NOT_EDGE_X(x) || NOT_EDGE_Y(y)) -static void png_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); +static void png_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); /* The result of a failed gdImageColorAllocate() call */ #define BADC -1 @@ -95,7 +95,7 @@ } color_struct; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_hid_t *me_pointer; pcb_cap_style_t cap; int width; @@ -103,7 +103,7 @@ color_struct *color; gdImagePtr brush; int is_erase; -} hid_gc_struct; +} hid_gc_s; static color_struct *black = NULL, *white = NULL; static gdImagePtr im = NULL, master_im, mask_im = NULL; @@ -164,7 +164,7 @@ NULL }; -HID_Attribute png_attribute_list[] = { +hid_attribute_t png_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "93 PNG Options" @@ -342,7 +342,7 @@ REGISTER_ATTRIBUTES(png_attribute_list, png_cookie) - static HID_Attr_Val png_values[NUM_OPTIONS]; + static hid_attr_val_t png_values[NUM_OPTIONS]; static const char *get_file_suffix(void) { @@ -366,7 +366,7 @@ return result; } -static HID_Attribute *png_get_export_options(int *n) +static hid_attribute_t *png_get_export_options(int *n) { static char *last_made_filename = 0; const char *suffix = get_file_suffix(); @@ -427,7 +427,7 @@ bloat = GetValueEx(str, NULL, NULL, extra_units, "", NULL); } -void png_hid_export_to_file(FILE * the_file, HID_Attr_Val * options) +void png_hid_export_to_file(FILE * the_file, hid_attr_val_t * options) { int i; static int saved_layer_stack[MAX_LAYER]; @@ -597,7 +597,7 @@ } } -static void png_do_export(HID_Attr_Val * options) +static void png_do_export(hid_attr_val_t * options) { int save_ons[MAX_LAYER + 2]; int i; @@ -1073,9 +1073,9 @@ } -static hidGC png_make_gc(void) +static hid_gc_t png_make_gc(void) { - hidGC rv = (hidGC) malloc(sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) malloc(sizeof(hid_gc_s)); rv->me_pointer = &png_hid; rv->cap = Trace_Cap; rv->width = 1; @@ -1086,7 +1086,7 @@ return rv; } -static void png_destroy_gc(hidGC gc) +static void png_destroy_gc(hid_gc_t gc) { free(gc); } @@ -1125,7 +1125,7 @@ } } -static void png_set_color(hidGC gc, const char *name) +static void png_set_color(hid_gc_t gc, const char *name) { pcb_hidval_t cval; @@ -1168,22 +1168,22 @@ } -static void png_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void png_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void png_set_line_width(hidGC gc, Coord width) +static void png_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void png_set_draw_xor(hidGC gc, int xor_) +static void png_set_draw_xor(hid_gc_t gc, int xor_) { ; } -static void use_gc(hidGC gc) +static void use_gc(hid_gc_t gc) { int need_brush = 0; @@ -1281,13 +1281,13 @@ } } -static void png_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void png_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); gdImageRectangle(im, SCALE_X(x1), SCALE_Y(y1), SCALE_X(x2), SCALE_Y(y2), gc->color->c); } -static void png_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void png_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); gdImageSetThickness(im, 0); @@ -1311,7 +1311,7 @@ have_outline |= doing_outline; } -static void png_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void png_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { if (x1 == x2 && y1 == y2) { Coord w = gc->width / 2; @@ -1370,7 +1370,7 @@ } } -static void png_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void png_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { Angle sa, ea; @@ -1426,7 +1426,7 @@ gdImageArc(im, SCALE_X(cx), SCALE_Y(cy), SCALE(2 * width), SCALE(2 * height), sa, ea, gdBrushed); } -static void png_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void png_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { Coord my_bloat; @@ -1446,7 +1446,7 @@ } -static void png_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void png_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int i; gdPoint *points; Index: trunk/src_plugins/export_png/png.h =================================================================== --- trunk/src_plugins/export_png/png.h (revision 4787) +++ trunk/src_plugins/export_png/png.h (revision 4788) @@ -1,2 +1,2 @@ extern const char *png_cookie; -extern void png_hid_export_to_file(FILE *, HID_Attr_Val *); +extern void png_hid_export_to_file(FILE *, hid_attr_val_t *); Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 4787) +++ trunk/src_plugins/export_ps/eps.c (revision 4788) @@ -28,33 +28,33 @@ /*----------------------------------------------------------------------------*/ /* Function prototypes */ /*----------------------------------------------------------------------------*/ -static HID_Attribute *eps_get_export_options(int *n); -static void eps_do_export(HID_Attr_Val * options); +static hid_attribute_t *eps_get_export_options(int *n); +static void eps_do_export(hid_attr_val_t * options); static void eps_parse_arguments(int *argc, char ***argv); static int eps_set_layer(const char *name, int group, int empty); -static hidGC eps_make_gc(void); -static void eps_destroy_gc(hidGC gc); +static hid_gc_t eps_make_gc(void); +static void eps_destroy_gc(hid_gc_t gc); static void eps_use_mask(int use_it); -static void eps_set_color(hidGC gc, const char *name); -static void eps_set_line_cap(hidGC gc, pcb_cap_style_t style); -static void eps_set_line_width(hidGC gc, Coord width); -static void eps_set_draw_xor(hidGC gc, int _xor); -static void eps_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void eps_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void eps_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle); -static void eps_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void eps_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); -static void eps_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y); +static void eps_set_color(hid_gc_t gc, const char *name); +static void eps_set_line_cap(hid_gc_t gc, pcb_cap_style_t style); +static void eps_set_line_width(hid_gc_t gc, Coord width); +static void eps_set_draw_xor(hid_gc_t gc, int _xor); +static void eps_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void eps_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void eps_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle); +static void eps_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void eps_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); +static void eps_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y); static void eps_calibrate(double xval, double yval); static void eps_set_crosshair(int x, int y, int action); /*----------------------------------------------------------------------------*/ -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_cap_style_t cap; Coord width; int color; int erase; -} hid_gc_struct; +} hid_gc_s; static pcb_hid_t eps_hid; @@ -66,7 +66,7 @@ static int print_layer[MAX_LAYER]; static int fast_erase = -1; -static HID_Attribute eps_attribute_list[] = { +static hid_attribute_t eps_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "92 Encapsulated Postscript Export" @@ -131,9 +131,9 @@ REGISTER_ATTRIBUTES(eps_attribute_list, ps_cookie) - static HID_Attr_Val eps_values[NUM_OPTIONS]; + static hid_attr_val_t eps_values[NUM_OPTIONS]; - static HID_Attribute *eps_get_export_options(int *n) + static hid_attribute_t *eps_get_export_options(int *n) { static char *last_made_filename = 0; @@ -178,7 +178,7 @@ static pcb_box_t *bounds; static int in_mono, as_shown; -void eps_hid_export_to_file(FILE * the_file, HID_Attr_Val * options) +void eps_hid_export_to_file(FILE * the_file, hid_attr_val_t * options) { int i; static int saved_layer_stack[MAX_LAYER]; @@ -303,7 +303,7 @@ conf_update(NULL); /* restore forced sets */ } -static void eps_do_export(HID_Attr_Val * options) +static void eps_do_export(hid_attr_val_t * options) { int i; int save_ons[MAX_LAYER + 2]; @@ -391,9 +391,9 @@ return 1; } -static hidGC eps_make_gc(void) +static hid_gc_t eps_make_gc(void) { - hidGC rv = (hidGC) malloc(sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) malloc(sizeof(hid_gc_s)); rv->cap = Trace_Cap; rv->width = 0; rv->color = 0; @@ -400,7 +400,7 @@ return rv; } -static void eps_destroy_gc(hidGC gc) +static void eps_destroy_gc(hid_gc_t gc) { free(gc); } @@ -427,7 +427,7 @@ } } -static void eps_set_color(hidGC gc, const char *name) +static void eps_set_color(hid_gc_t gc, const char *name) { static void *cache = 0; pcb_hidval_t cval; @@ -458,22 +458,22 @@ gc->color = 0; } -static void eps_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void eps_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void eps_set_line_width(hidGC gc, Coord width) +static void eps_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void eps_set_draw_xor(hidGC gc, int xor_) +static void eps_set_draw_xor(hid_gc_t gc, int xor_) { ; } -static void use_gc(hidGC gc) +static void use_gc(hid_gc_t gc) { if (linewidth != gc->width) { pcb_fprintf(f, "%mi setlinewidth\n", gc->width); @@ -502,16 +502,16 @@ } } -static void eps_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void eps_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); +static void eps_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void eps_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); -static void eps_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void eps_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); } -static void eps_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void eps_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { Coord w = gc->width / 2; if (x1 == x2 && y1 == y2) { @@ -540,7 +540,7 @@ pcb_fprintf(f, "%mi %mi %mi %mi %s\n", x1, y1, x2, y2, gc->erase ? "tc" : "t"); } -static void eps_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void eps_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { Angle sa, ea; if (delta_angle > 0) { @@ -558,13 +558,13 @@ pcb_fprintf(f, "%ma %ma %mi %mi %mi %mi %g a\n", sa, ea, -width, height, cx, cy, (double) linewidth / width); } -static void eps_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void eps_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %s\n", cx, cy, radius, gc->erase ? "cc" : "c"); } -static void eps_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void eps_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int i; const char *op = "moveto"; @@ -576,7 +576,7 @@ fprintf(f, "fill\n"); } -static void eps_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void eps_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 4787) +++ trunk/src_plugins/export_ps/ps.c (revision 4788) @@ -37,9 +37,9 @@ const char *ps_cookie = "ps HID"; static int ps_set_layer(const char *name, int group, int empty); -static void use_gc(hidGC gc); +static void use_gc(hid_gc_t gc); -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_hid_t *me_pointer; pcb_cap_style_t cap; Coord width; @@ -46,7 +46,7 @@ unsigned char r, g, b; int erase; int faded; -} hid_gc_struct; +} hid_gc_s; static const char *medias[] = { "A0", "A1", "A2", "A3", "A4", "A5", @@ -143,7 +143,7 @@ #undef MARGINX #undef MARGINY -HID_Attribute ps_attribute_list[] = { +hid_attribute_t ps_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "91 Postscript Export" @@ -406,7 +406,7 @@ pcb_box_t region; - HID_Attr_Val ps_values[NUM_OPTIONS]; + hid_attr_val_t ps_values[NUM_OPTIONS]; pcb_bool is_mask; pcb_bool is_drill; @@ -417,7 +417,7 @@ double polygrid; } global; -static HID_Attribute *ps_get_export_options(int *n) +static hid_attribute_t *ps_get_export_options(int *n) { static char *last_made_filename = 0; if (PCB) @@ -596,7 +596,7 @@ /* This is used by other HIDs that use a postscript format, like lpr or eps. */ -void ps_hid_export_to_file(FILE * the_file, HID_Attr_Val * options) +void ps_hid_export_to_file(FILE * the_file, hid_attr_val_t * options) { int i; static int saved_layer_stack[MAX_LAYER]; @@ -702,7 +702,7 @@ conf_update(NULL); /* restore forced sets */ } -static void ps_do_export(HID_Attr_Val * options) +static void ps_do_export(hid_attr_val_t * options) { FILE *fh; int save_ons[MAX_LAYER + 2]; @@ -967,15 +967,15 @@ return 1; } -static hidGC ps_make_gc(void) +static hid_gc_t ps_make_gc(void) { - hidGC rv = (hidGC) calloc(1, sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) calloc(1, sizeof(hid_gc_s)); rv->me_pointer = &ps_hid; rv->cap = Trace_Cap; return rv; } -static void ps_destroy_gc(hidGC gc) +static void ps_destroy_gc(hid_gc_t gc) { free(gc); } @@ -985,7 +985,7 @@ /* does nothing */ } -static void ps_set_color(hidGC gc, const char *name) +static void ps_set_color(hid_gc_t gc, const char *name) { if (strcmp(name, "erase") == 0 || strcmp(name, "drill") == 0) { gc->r = gc->g = gc->b = 255; @@ -1005,27 +1005,27 @@ } } -static void ps_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void ps_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void ps_set_line_width(hidGC gc, Coord width) +static void ps_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void ps_set_draw_xor(hidGC gc, int xor_) +static void ps_set_draw_xor(hid_gc_t gc, int xor_) { ; } -static void ps_set_draw_faded(hidGC gc, int faded) +static void ps_set_draw_faded(hid_gc_t gc, int faded) { gc->faded = faded; } -static void use_gc(hidGC gc) +static void use_gc(hid_gc_t gc) { static int lastcap = -1; static int lastcolor = -1; @@ -1082,16 +1082,16 @@ } } -static void ps_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void ps_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); pcb_fprintf(global.f, "%mi %mi %mi %mi dr\n", x1, y1, x2, y2); } -static void ps_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -static void ps_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); +static void ps_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +static void ps_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); -static void ps_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void ps_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { #if 0 /* If you're etching your own paste mask, this will reduce the @@ -1126,7 +1126,7 @@ pcb_fprintf(global.f, "%mi %mi %mi %mi t\n", x1, y1, x2, y2); } -static void ps_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void ps_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { Angle sa, ea; if (delta_angle > 0) { @@ -1145,7 +1145,7 @@ sa, ea, -width, height, cx, cy, (double) (global.linewidth + 2 * global.bloat) /(double) width); } -static void ps_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void ps_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { use_gc(gc); if (!gc->erase || !global.is_copper || global.drillcopper) { @@ -1155,7 +1155,7 @@ } } -static void ps_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void ps_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int i; const char *op = "moveto"; @@ -1216,7 +1216,7 @@ return *c1 < *c2; } -static void ps_fill_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) +static void ps_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) { /* Ignore clip_box, just draw everything */ @@ -1351,7 +1351,7 @@ fprintf(global.f, "fill\n"); } -static void ps_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void ps_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { use_gc(gc); if (x1 > x2) { @@ -1379,7 +1379,7 @@ pcb_fprintf(global.f, "%mi %mi %mi %mi r\n", x1 - global.bloat, y1 - global.bloat, x2 + global.bloat, y2 + global.bloat); } -HID_Attribute ps_calib_attribute_list[] = { +hid_attribute_t ps_calib_attribute_list[] = { {"lprcommand", "Command to print", HID_String, 0, 0, {0, 0, 0}, 0, 0}, }; @@ -1471,7 +1471,7 @@ void ps_calibrate_1(double xval, double yval, int use_command) { - HID_Attr_Val vals[3]; + hid_attr_val_t vals[3]; FILE *ps_cal_file; int used_popen = 0, c; Index: trunk/src_plugins/export_ps/ps.h =================================================================== --- trunk/src_plugins/export_ps/ps.h (revision 4787) +++ trunk/src_plugins/export_ps/ps.h (revision 4788) @@ -1,6 +1,6 @@ extern const char *ps_cookie; extern pcb_hid_t ps_hid; -extern void ps_hid_export_to_file(FILE *, HID_Attr_Val *); +extern void ps_hid_export_to_file(FILE *, hid_attr_val_t *); extern void ps_start_file(FILE *); extern void ps_calibrate_1(double, double, int); extern void hid_eps_init(); Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 4787) +++ trunk/src_plugins/export_svg/svg.c (revision 4788) @@ -61,13 +61,13 @@ const char *svg_cookie = "svg HID"; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_hid_t *me_pointer; pcb_cap_style_t cap; int width; char *color; int erase, drill; -} hid_gc_struct; +} hid_gc_s; static const char *CAPS(pcb_cap_style_t cap) { @@ -113,7 +113,7 @@ /* INNER */ { "#222222", "#111111", "#000000", PCB_MM_TO_COORD(0.05) } }; -HID_Attribute svg_attribute_list[] = { +hid_attribute_t svg_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "93 SVG Options" @@ -176,9 +176,9 @@ REGISTER_ATTRIBUTES(svg_attribute_list, svg_cookie) -static HID_Attr_Val svg_values[NUM_OPTIONS]; +static hid_attr_val_t svg_values[NUM_OPTIONS]; -static HID_Attribute *svg_get_export_options(int *n) +static hid_attribute_t *svg_get_export_options(int *n) { static char *last_made_filename = 0; const char *suffix = ".svg"; @@ -191,7 +191,7 @@ return svg_attribute_list; } -void svg_hid_export_to_file(FILE * the_file, HID_Attr_Val * options) +void svg_hid_export_to_file(FILE * the_file, hid_attr_val_t * options) { static int saved_layer_stack[MAX_LAYER]; pcb_box_t region; @@ -267,7 +267,7 @@ fprintf(f, "\n"); } -static void svg_do_export(HID_Attr_Val * options) +static void svg_do_export(hid_attr_val_t * options) { const char *filename; int save_ons[MAX_LAYER + 2]; @@ -389,9 +389,9 @@ } -static hidGC svg_make_gc(void) +static hid_gc_t svg_make_gc(void) { - hidGC rv = (hidGC) malloc(sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_t) malloc(sizeof(hid_gc_s)); rv->me_pointer = &svg_hid; rv->cap = Trace_Cap; rv->width = 1; @@ -399,7 +399,7 @@ return rv; } -static void svg_destroy_gc(hidGC gc) +static void svg_destroy_gc(hid_gc_t gc) { free(gc); } @@ -413,7 +413,7 @@ } } -static void svg_set_color(hidGC gc, const char *name) +static void svg_set_color(hid_gc_t gc, const char *name) { gc->drill = gc->erase = 0; if (name == NULL) @@ -434,12 +434,12 @@ gc->color = pcb_strdup(name); } -static void svg_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void svg_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void svg_set_line_width(hidGC gc, Coord width) +static void svg_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } @@ -463,7 +463,7 @@ pcb_append_printf(s, ind); } -static void svg_set_draw_xor(hidGC gc, int xor_) +static void svg_set_draw_xor(hid_gc_t gc, int xor_) { ; } @@ -480,7 +480,7 @@ y2 = t; \ } -static void draw_rect(hidGC gc, Coord x1, Coord y1, Coord w, Coord h, Coord stroke) +static void draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord w, Coord h, Coord stroke) { indent(&snormal); pcb_append_printf(&snormal, "\n", @@ -487,13 +487,13 @@ x1, y1, w, h, stroke, gc->color, CAPS(gc->cap)); } -static void svg_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void svg_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { fix_rect_coords(); draw_rect(gc, x1, y1, x2-x1, y2-y1, gc->width); } -static void draw_fill_rect(hidGC gc, Coord x1, Coord y1, Coord w, Coord h) +static void draw_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord w, Coord h) { if ((photo_mode) && (!gc->erase)) { Coord photo_offs = photo_palette[photo_color].offs; @@ -516,7 +516,7 @@ } } -static void svg_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void svg_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { TRX(x1); TRY(y1); TRX(x2); TRY(y2); fix_rect_coords(); @@ -523,7 +523,7 @@ draw_fill_rect(gc, x1, y1, x2-x1, y2-y1); } -static void draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { if ((photo_mode) && (!gc->erase)) { Coord photo_offs = photo_palette[photo_color].offs; @@ -546,13 +546,13 @@ } } -static void svg_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void svg_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { TRX(x1); TRY(y1); TRX(x2); TRY(y2); draw_line(gc, x1, y1, x2, y2); } -static void draw_arc(hidGC gc, Coord x1, Coord y1, Coord r, Coord x2, Coord y2, Coord stroke) +static void draw_arc(hid_gc_t gc, Coord x1, Coord y1, Coord r, Coord x2, Coord y2, Coord stroke) { if ((photo_mode) && (!gc->erase)) { Coord photo_offs = photo_palette[photo_color].offs; @@ -575,7 +575,7 @@ } } -static void svg_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void svg_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { Coord x1, y1, x2, y2; Angle sa, ea; @@ -607,7 +607,7 @@ draw_arc(gc, x1, y1, width, x2, y2, gc->width); } -static void draw_fill_circle(hidGC gc, Coord cx, Coord cy, Coord r, Coord stroke) +static void draw_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord r, Coord stroke) { if ((photo_mode) && (!gc->erase)) { if (!drawing_hole) { @@ -638,13 +638,13 @@ } } -static void svg_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void svg_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { TRX(cx); TRY(cy); draw_fill_circle(gc, cx, cy, radius, gc->width); } -static void draw_poly(gds_t *s, hidGC gc, int n_coords, Coord * x, Coord * y, Coord offs, const char *clr) +static void draw_poly(gds_t *s, hid_gc_t gc, int n_coords, Coord * x, Coord * y, Coord offs, const char *clr) { int i; float poly_bloat = 0.075; @@ -659,7 +659,7 @@ pcb_append_printf(s, "\" stroke-width=\"%.3f\" stroke=\"%s\" fill=\"%s\"/>\n", poly_bloat, clr, clr); } -static void svg_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void svg_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { if ((photo_mode) && (!gc->erase)) { Coord photo_offs = photo_palette[photo_color].offs; Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 4787) +++ trunk/src_plugins/export_test/export_test.c (revision 4788) @@ -22,7 +22,7 @@ const char *export_test_cookie = "export_test HID"; -static HID_Attribute export_test_options[] = { +static hid_attribute_t export_test_options[] = { /* %start-doc options "8 export_test Creation" @ftable @code @item --export_testfile @@ -37,11 +37,11 @@ #define NUM_OPTIONS (sizeof(export_test_options)/sizeof(export_test_options[0])) -static HID_Attr_Val export_test_values[NUM_OPTIONS]; +static hid_attr_val_t export_test_values[NUM_OPTIONS]; static const char *export_test_filename; -static HID_Attribute *export_test_get_export_options(int *n) +static hid_attribute_t *export_test_get_export_options(int *n) { static char *last_export_test_filename = 0; @@ -292,7 +292,7 @@ return (0); } -static void export_test_do_export(HID_Attr_Val * options) +static void export_test_do_export(hid_attr_val_t * options) { int i; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 4787) +++ trunk/src_plugins/export_xy/xy.c (revision 4788) @@ -28,7 +28,7 @@ const char *xy_cookie = "bom HID"; -static HID_Attribute xy_options[] = { +static hid_attribute_t xy_options[] = { /* %start-doc options "8 XY Creation" @ftable @code @item --xyfile @@ -57,12 +57,12 @@ #define NUM_OPTIONS (sizeof(xy_options)/sizeof(xy_options[0])) -static HID_Attr_Val xy_values[NUM_OPTIONS]; +static hid_attr_val_t xy_values[NUM_OPTIONS]; static const char *xy_filename; static const Unit *xy_unit; -static HID_Attribute *xy_get_export_options(int *n) +static hid_attribute_t *xy_get_export_options(int *n) { static char *last_xy_filename = 0; static int last_unit_value = -1; @@ -325,7 +325,7 @@ return (0); } -static void xy_do_export(HID_Attr_Val * options) +static void xy_do_export(hid_attr_val_t * options) { int i; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 4788) @@ -85,7 +85,7 @@ /* TODO: free string fields to avoid memleaks */ } else - hid->result = calloc(sizeof(HID_Attribute), hid->attr_num); + hid->result = calloc(sizeof(hid_attribute_t), hid->attr_num); return gui->attribute_dialog(hid->attr, hid->attr_num, hid->result, title, descr); } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 4788) @@ -80,7 +80,7 @@ { const char *res; char buff[128]; - HID_Attr_Val *v; + hid_attr_val_t *v; if ((hid == NULL) || (attr_id < 0) || (attr_id >= hid->attr_num) || (hid->result == NULL)) return 0; @@ -141,9 +141,9 @@ } -HID_Attr_Val hid_string2val(const hid_attr_type_t type, const char *str) +hid_attr_val_t hid_string2val(const hid_attr_type_t type, const char *str) { - HID_Attr_Val v; + hid_attr_val_t v; memset(&v, 0, sizeof(v)); switch(type) { case HIDA_Boolean: @@ -201,7 +201,7 @@ return v; } -char **hid_string2enum(const char *str, HID_Attr_Val *def) +char **hid_string2enum(const char *str, hid_attr_val_t *def) { char **e; const char *s, *last; @@ -244,7 +244,7 @@ /* TODO: should realloc more space here */ hid->attr_num++; - hid->attr = realloc(hid->attr, sizeof(HID_Attribute) * hid->attr_num); + hid->attr = realloc(hid->attr, sizeof(hid_attribute_t) * hid->attr_num); hid->type = realloc(hid->type, sizeof(hid_attr_type_t) * hid->attr_num); hid->attr[current].name = pcb_strdup(attr_name); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h (revision 4788) @@ -23,9 +23,9 @@ /* TODO: these should not be here; GPMI needs to switch over to c99tree! */ #ifndef FROM_PKG typedef void pcb_hid_t; -typedef void HID_Attribute; -typedef void* hidGC; -typedef char* HID_Attr_Val; +typedef void hid_attribute_t; +typedef void* hid_gc_t; +typedef char* hid_attr_val_t; /* Line or arc ending style */ typedef enum pcb_cap_style_t_e { @@ -42,11 +42,11 @@ typedef struct hid_s { gpmi_module *module; int attr_num; - HID_Attribute *attr; + hid_attribute_t *attr; hid_attr_type_t *type; pcb_hid_t *hid; - HID_Attr_Val *result; - hidGC new_gc; + hid_attr_val_t *result; + hid_gc_t new_gc; } hid_t; /* Creates a new hid context. Name and description matters only if the hid is @@ -86,5 +86,5 @@ hid_t *hid_gpmi_data_get(pcb_hid_t *h); /* For internal use */ -nowrap HID_Attr_Val hid_string2val(const hid_attr_type_t type, const char *str); +nowrap hid_attr_val_t hid_string2val(const hid_attr_type_t type, const char *str); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 4788) @@ -14,7 +14,7 @@ /* TODO */ #define MAX_LAYER 16 -HID_Attribute *gpmi_hid_get_export_options(int *num) +hid_attribute_t *gpmi_hid_get_export_options(int *num) { hid_t *h; @@ -31,9 +31,9 @@ } static char *gcs = "abcdefghijklmnopqrstuvxyz"; -hidGC gpmi_hid_make_gc(void) +hid_gc_t gpmi_hid_make_gc(void) { - hidGC ret; + hid_gc_t ret; hid_t *h = hid_gpmi_data_get(exporter); /* TODO: fix gc handling... */ @@ -44,13 +44,13 @@ return ret; } -void gpmi_hid_destroy_gc(hidGC gc) +void gpmi_hid_destroy_gc(hid_gc_t gc) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_destroy_gc, h, gc); } -void gpmi_hid_do_export(HID_Attr_Val * options) +void gpmi_hid_do_export(hid_attr_val_t * options) { hid_t *h = hid_gpmi_data_get(exporter); int save_ons[MAX_LAYER + 2]; @@ -90,61 +90,61 @@ return 1; } -void gpmi_hid_set_color(hidGC gc, const char *name) +void gpmi_hid_set_color(hid_gc_t gc, const char *name) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_set_color, h, gc, name); } -void gpmi_hid_set_line_cap(hidGC gc, pcb_cap_style_t style) +void gpmi_hid_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_set_line_cap, h, gc, style); } -void gpmi_hid_set_line_width(hidGC gc, Coord width) +void gpmi_hid_set_line_width(hid_gc_t gc, Coord width) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_set_line_width, h, gc, width); } -void gpmi_hid_set_draw_xor(hidGC gc, int xor) +void gpmi_hid_set_draw_xor(hid_gc_t gc, int xor) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_set_draw_xor, h, gc, xor); } -void gpmi_hid_set_draw_faded(hidGC gc, int faded) +void gpmi_hid_set_draw_faded(hid_gc_t gc, int faded) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_set_draw_faded, h, gc, faded); } -void gpmi_hid_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void gpmi_hid_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_draw_line, h, gc, x1, y1, x2, y2); } -void gpmi_hid_draw_arc(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) +void gpmi_hid_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_draw_arc, h, gc, cx, cy, xradius, yradius, start_angle, delta_angle); } -void gpmi_hid_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void gpmi_hid_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_draw_rect, h, gc, x1, y1, x2, y2); } -void gpmi_hid_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +void gpmi_hid_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_fill_circle, h, gc, cx, cy, radius); } -void gpmi_hid_fill_polygon(hidGC gc, int n_coords, Coord *x, Coord *y) +void gpmi_hid_fill_polygon(hid_gc_t gc, int n_coords, Coord *x, Coord *y) { hid_t *h = hid_gpmi_data_get(exporter); /* TODO: need accessor for these */ @@ -151,12 +151,12 @@ gpmi_event(h->module, HIDE_fill_polygon, h, gc, x, y); } -void gpmi_hid_fill_pcb_polygon(hidGC gc, pcb_polygon_t *poly, const pcb_box_t *clip_box) +void gpmi_hid_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t *poly, const pcb_box_t *clip_box) { /* TODO */ } -void gpmi_hid_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void gpmi_hid_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_fill_rect, h, gc, x1, y1, x2, y2); @@ -168,13 +168,13 @@ gpmi_event(h->module, HIDE_use_mask, h, use_it); } -void gpmi_hid_fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t *pad, pcb_bool drawHole, pcb_bool mask) +void gpmi_hid_fill_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t *pad, pcb_bool drawHole, pcb_bool mask) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_fill_pcb_pv, h, fg_gc, bg_gc, pad, drawHole, mask); } -void gpmi_hid_fill_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) +void gpmi_hid_fill_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask) { hid_t *h = hid_gpmi_data_get(exporter); gpmi_event(h->module, HIDE_fill_pcb_pad, h, gc, pad, clear, mask); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 4788) @@ -1,22 +1,22 @@ -HID_Attribute *gpmi_hid_get_export_options(int *num); -hidGC gpmi_hid_make_gc(void); -void gpmi_hid_destroy_gc(hidGC gc); -void gpmi_hid_do_export(HID_Attr_Val * options); +hid_attribute_t *gpmi_hid_get_export_options(int *num); +hid_gc_t gpmi_hid_make_gc(void); +void gpmi_hid_destroy_gc(hid_gc_t gc); +void gpmi_hid_do_export(hid_attr_val_t * options); void gpmi_hid_parse_arguments(int *pcbargc, char ***pcbargv); void gpmi_hid_set_crosshair(int x, int y, int cursor_action); int gpmi_hid_set_layer(const char *name, int group, int _empty); -void gpmi_hid_set_color(hidGC gc, const char *name); -void gpmi_hid_set_line_cap(hidGC gc, pcb_cap_style_t style); -void gpmi_hid_set_line_width(hidGC gc, Coord width); -void gpmi_hid_set_draw_xor(hidGC gc, int xor); -void gpmi_hid_set_draw_faded(hidGC gc, int faded); -void gpmi_hid_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -void gpmi_hid_draw_arc(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle); -void gpmi_hid_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -void gpmi_hid_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); -void gpmi_hid_fill_polygon(hidGC gc, int n_coords, Coord *x, Coord *y); -void gpmi_hid_fill_pcb_polygon(hidGC gc, pcb_polygon_t *poly, const pcb_box_t *clip_box); -void gpmi_hid_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -void gpmi_hid_fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t *pad, pcb_bool drawHole, pcb_bool mask); -void gpmi_hid_fill_pcb_pad(hidGC gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); +void gpmi_hid_set_color(hid_gc_t gc, const char *name); +void gpmi_hid_set_line_cap(hid_gc_t gc, pcb_cap_style_t style); +void gpmi_hid_set_line_width(hid_gc_t gc, Coord width); +void gpmi_hid_set_draw_xor(hid_gc_t gc, int xor); +void gpmi_hid_set_draw_faded(hid_gc_t gc, int faded); +void gpmi_hid_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +void gpmi_hid_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle); +void gpmi_hid_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +void gpmi_hid_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); +void gpmi_hid_fill_polygon(hid_gc_t gc, int n_coords, Coord *x, Coord *y); +void gpmi_hid_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t *poly, const pcb_box_t *clip_box); +void gpmi_hid_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +void gpmi_hid_fill_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t *pad, pcb_bool drawHole, pcb_bool mask); +void gpmi_hid_fill_pcb_pad(hid_gc_t gc, pcb_pad_t * pad, pcb_bool clear, pcb_bool mask); void gpmi_hid_use_mask(int use_it); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 4788) @@ -35,7 +35,7 @@ dctx_t *debug_draw_dctx(void) { dctx_t *ctx; - hidGC gc; + hid_gc_t gc; need_ddh(NULL); gc = ddh->make_gc(); if (gc == NULL) { Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 4788) @@ -5,7 +5,7 @@ #include "src/error.h" #define setup(func) \ - hidGC gc = ctx->gc; \ + hid_gc_t gc = ctx->gc; \ pcb_hid_t *hid = ctx->hid; \ if ((hid == NULL) && (gc == NULL)) Message(PCB_MSG_DEFAULT, "%s failed because of invalid hid or gc\n", func); \ if ((hid == NULL) && (gc == NULL)) return Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 4788) @@ -261,7 +261,7 @@ void thindraw_pcb_polygon(dctx_t *ctx, pcb_polygon_t *poly, const pcb_box_t *clip_box); void fill_pcb_pad(dctx_t *ctx, pcb_pad_t *pad, pcb_bool clip, pcb_bool mask); void thindraw_pcb_pad(dctx_t *ctx, pcb_pad_t *pad, pcb_bool clip, pcb_bool mask); -void fill_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask); -void thindraw_pcb_pv(hidGC fg_gc, hidGC bg_gc, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask); +void fill_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask); +void thindraw_pcb_pv(hid_gc_t fg_gc, hid_gc_t bg_gc, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask); void fill_rect(dctx_t *ctx, int x1_, int y1_, int x2_, int y2_); */ Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c (revision 4787) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c (revision 4788) @@ -15,7 +15,7 @@ #define attr_make_label(attr, name_, help_) \ do { \ - memset((attr), 0, sizeof(HID_Attribute)); \ + memset((attr), 0, sizeof(hid_attribute_t)); \ (attr)->name = name_; \ (attr)->help_text = help_; \ (attr)->type = HID_Label; \ @@ -31,7 +31,7 @@ #define attr_make_enum(attr, name_, help_, enum_vals, default_item) \ do { \ - memset((attr), 0, sizeof(HID_Attribute)); \ + memset((attr), 0, sizeof(hid_attribute_t)); \ (attr)->name = name_; \ (attr)->help_text = help_; \ (attr)->type = HID_Enum; \ @@ -41,8 +41,8 @@ static hid_gpmi_script_info_t *choose_script(const char **operations, int *operation) { - HID_Attribute attr[3]; - HID_Attr_Val result[3]; + hid_attribute_t attr[3]; + hid_attr_val_t result[3]; char **scrl, **s; hid_gpmi_script_info_t *i; int n, res; @@ -98,8 +98,8 @@ char *fn, *ext; hid_gpmi_script_info_t *info; int default_mod = -1; - HID_Attribute attr[3]; - HID_Attr_Val result[3]; + hid_attribute_t attr[3]; + hid_attr_val_t result[3]; char *exts[] = { ".tcl", "tcl", ".lua", "lua", @@ -163,8 +163,8 @@ static void script_details(hid_gpmi_script_info_t *i) { - HID_Attribute attr[4]; - HID_Attr_Val result[4]; + hid_attribute_t attr[4]; + hid_attr_val_t result[4]; char *cf; cf = i->conffile_name == NULL ? "" : i->conffile_name; Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 4787) +++ trunk/src_plugins/hid_batch/batch.c (revision 4788) @@ -26,11 +26,11 @@ /* This is a text-line "batch" HID, which exists for scripting and non-GUI needs. */ -typedef struct hid_gc_struct { +typedef struct hid_gc_s { int nothing_interesting_here; -} hid_gc_struct; +} hid_gc_s; -static HID_Attribute *batch_get_export_options(int *n_ret) +static hid_attribute_t *batch_get_export_options(int *n_ret) { return 0; } @@ -123,7 +123,7 @@ /* ----------------------------------------------------------------------------- */ static int batch_stay; -static void batch_do_export(HID_Attr_Val * options) +static void batch_do_export(hid_attr_val_t * options) { int interactive; char line[1000]; @@ -178,12 +178,12 @@ return 0; } -static hidGC batch_make_gc(void) +static hid_gc_t batch_make_gc(void) { return 0; } -static void batch_destroy_gc(hidGC gc) +static void batch_destroy_gc(hid_gc_t gc) { } @@ -191,43 +191,43 @@ { } -static void batch_set_color(hidGC gc, const char *name) +static void batch_set_color(hid_gc_t gc, const char *name) { } -static void batch_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void batch_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { } -static void batch_set_line_width(hidGC gc, Coord width) +static void batch_set_line_width(hid_gc_t gc, Coord width) { } -static void batch_set_draw_xor(hidGC gc, int xor_set) +static void batch_set_draw_xor(hid_gc_t gc, int xor_set) { } -static void batch_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void batch_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { } -static void batch_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) +static void batch_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) { } -static void batch_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void batch_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { } -static void batch_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void batch_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { } -static void batch_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void batch_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { } -static void batch_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void batch_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { } @@ -294,7 +294,7 @@ } static int -batch_attribute_dialog(HID_Attribute * attrs_, int n_attrs_, HID_Attr_Val * results_, const char *title_, const char *descr_) +batch_attribute_dialog(hid_attribute_t * attrs_, int n_attrs_, hid_attr_val_t * results_, const char *title_, const char *descr_) { return 0; } Index: trunk/src_plugins/hid_gtk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4787) +++ trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4788) @@ -43,7 +43,7 @@ } render_priv; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_hid_t *me_pointer; GdkGC *gc; @@ -52,7 +52,7 @@ gint cap, join; gchar xor_mask; gint mask_seq; -} hid_gc_struct; +} hid_gc_s; static void draw_lead_user(render_priv * priv); @@ -97,7 +97,7 @@ return 0; } -void ghid_destroy_gc(hidGC gc) +void ghid_destroy_gc(hid_gc_t gc) { if (gc->gc) g_object_unref(gc->gc); @@ -106,11 +106,11 @@ g_free(gc); } -hidGC ghid_make_gc(void) +hid_gc_t ghid_make_gc(void) { - hidGC rv; + hid_gc_t rv; - rv = g_new0(hid_gc_struct, 1); + rv = g_new0(hid_gc_s, 1); rv->me_pointer = &ghid_hid; rv->colorname = g_strdup(conf_core.appearance.color.background); return rv; @@ -455,7 +455,7 @@ } } -void ghid_set_color(hidGC gc, const char *name) +void ghid_set_color(hid_gc_t gc, const char *name) { static void *cache = 0; pcb_hidval_t cval; @@ -516,7 +516,7 @@ } } -void ghid_set_line_cap(hidGC gc, pcb_cap_style_t style) +void ghid_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { render_priv *priv = gport->render_priv; @@ -536,7 +536,7 @@ gdk_gc_set_line_attributes(WHICH_GC(gc), Vz(gc->width), GDK_LINE_SOLID, (GdkCapStyle) gc->cap, (GdkJoinStyle) gc->join); } -void ghid_set_line_width(hidGC gc, Coord width) +void ghid_set_line_width(hid_gc_t gc, Coord width) { render_priv *priv = gport->render_priv; @@ -545,7 +545,7 @@ gdk_gc_set_line_attributes(WHICH_GC(gc), Vz(gc->width), GDK_LINE_SOLID, (GdkCapStyle) gc->cap, (GdkJoinStyle) gc->join); } -void ghid_set_draw_xor(hidGC gc, int xor_mask) +void ghid_set_draw_xor(hid_gc_t gc, int xor_mask) { gc->xor_mask = xor_mask; if (!gc->gc) @@ -554,7 +554,7 @@ ghid_set_color(gc, gc->colorname); } -static int use_gc(hidGC gc) +static int use_gc(hid_gc_t gc) { render_priv *priv = gport->render_priv; GdkWindow *window = gtk_widget_get_window(gport->top_window); @@ -585,7 +585,7 @@ return 1; } -void ghid_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { double dx1, dy1, dx2, dy2; render_priv *priv = gport->render_priv; @@ -602,7 +602,7 @@ gdk_draw_line(gport->drawable, priv->u_gc, dx1, dy1, dx2, dy2); } -void ghid_draw_arc(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) +void ghid_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) { gint vrx, vry; gint w, h, radius; @@ -637,7 +637,7 @@ Vx(cx) - vrx, Vy(cy) - vry, vrx * 2, vry * 2, (start_angle + 180) * 64, delta_angle * 64); } -void ghid_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { gint w, h, lw; render_priv *priv = gport->render_priv; @@ -673,7 +673,7 @@ } -void ghid_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +void ghid_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { gint w, h, vr; render_priv *priv = gport->render_priv; @@ -690,7 +690,7 @@ gdk_draw_arc(gport->drawable, priv->u_gc, TRUE, Vx(cx) - vr, Vy(cy) - vr, vr * 2, vr * 2, 0, 360 * 64); } -void ghid_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +void ghid_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { static GdkPoint *points = 0; static int npoints = 0; @@ -709,7 +709,7 @@ gdk_draw_polygon(gport->drawable, priv->u_gc, 1, points, n_coords); } -void ghid_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { gint w, h, lw, xx, yy; render_priv *priv = gport->render_priv; Index: trunk/src_plugins/hid_gtk/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4787) +++ trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4788) @@ -27,7 +27,7 @@ extern pcb_hid_t ghid_hid; -static hidGC current_gc = NULL; +static hid_gc_t current_gc = NULL; /* Sets gport->u_gc to the "right" GC to use (wrt mask or window) */ @@ -54,7 +54,7 @@ } render_priv; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_hid_t *me_pointer; const char *colorname; @@ -62,7 +62,7 @@ Coord width; gint cap, join; gchar xor; -} hid_gc_struct; +} hid_gc_s; static void draw_lead_user(render_priv * priv); @@ -156,16 +156,16 @@ end_subcomposite(); } -void ghid_destroy_gc(hidGC gc) +void ghid_destroy_gc(hid_gc_t gc) { g_free(gc); } -hidGC ghid_make_gc(void) +hid_gc_t ghid_make_gc(void) { - hidGC rv; + hid_gc_t rv; - rv = g_new0(hid_gc_struct, 1); + rv = g_new0(hid_gc_s, 1); rv->me_pointer = &ghid_hid; rv->colorname = conf_core.appearance.color.background; rv->alpha_mult = 1.0; @@ -302,7 +302,7 @@ gport->grid_color.blue ^= gport->bg_color.blue; } -void ghid_set_special_colors(HID_Attribute * ha) +void ghid_set_special_colors(hid_attribute_t * ha) { if (!ha->name || !ha->value) return; @@ -329,7 +329,7 @@ double blue; } ColorCache; -static void set_gl_color_for_gc(hidGC gc) +static void set_gl_color_for_gc(hid_gc_t gc) { render_priv *priv = gport->render_priv; static void *cache = NULL; @@ -421,30 +421,30 @@ glColor4d(r, g, b, a); } -void ghid_set_color(hidGC gc, const char *name) +void ghid_set_color(hid_gc_t gc, const char *name) { gc->colorname = name; set_gl_color_for_gc(gc); } -void ghid_set_alpha_mult(hidGC gc, double alpha_mult) +void ghid_set_alpha_mult(hid_gc_t gc, double alpha_mult) { gc->alpha_mult = alpha_mult; set_gl_color_for_gc(gc); } -void ghid_set_line_cap(hidGC gc, pcb_cap_style_t style) +void ghid_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -void ghid_set_line_width(hidGC gc, Coord width) +void ghid_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -void ghid_set_draw_xor(hidGC gc, int xor) +void ghid_set_draw_xor(hid_gc_t gc, int xor) { /* NOT IMPLEMENTED */ @@ -452,12 +452,12 @@ * We manage our own drawing model for that anyway. */ } -void ghid_set_draw_faded(hidGC gc, int faded) +void ghid_set_draw_faded(hid_gc_t gc, int faded) { printf("ghid_set_draw_faded(%p,%d) -- not implemented\n", (void *)gc, faded); } -void ghid_set_line_cap_angle(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_set_line_cap_angle(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { printf("ghid_set_line_cap_angle() -- not implemented\n"); } @@ -467,7 +467,7 @@ current_gc = NULL; } -static int use_gc(hidGC gc) +static int use_gc(hid_gc_t gc) { if (gc->me_pointer != &ghid_hid) { fprintf(stderr, "Fatal: GC from another HID passed to GTK HID\n"); @@ -483,7 +483,7 @@ return 1; } -void ghid_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { USE_GC(gc); @@ -490,7 +490,7 @@ hidgl_draw_line(gc->cap, gc->width, x1, y1, x2, y2, gport->view.coord_per_px); } -void ghid_draw_arc(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) +void ghid_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) { USE_GC(gc); @@ -497,7 +497,7 @@ hidgl_draw_arc(gc->width, cx, cy, xradius, yradius, start_angle, delta_angle, gport->view.coord_per_px); } -void ghid_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { USE_GC(gc); @@ -505,7 +505,7 @@ } -void ghid_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +void ghid_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { USE_GC(gc); @@ -513,7 +513,7 @@ } -void ghid_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +void ghid_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { USE_GC(gc); @@ -520,7 +520,7 @@ hidgl_fill_polygon(n_coords, x, y); } -void ghid_fill_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) +void ghid_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) { USE_GC(gc); @@ -527,7 +527,7 @@ hidgl_fill_pcb_polygon(poly, clip_box, gport->view.coord_per_px); } -void ghid_thindraw_pcb_polygon(hidGC gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) +void ghid_thindraw_pcb_polygon(hid_gc_t gc, pcb_polygon_t * poly, const pcb_box_t * clip_box) { common_thindraw_pcb_polygon(gc, poly, clip_box); ghid_set_alpha_mult(gc, 0.25); @@ -535,7 +535,7 @@ ghid_set_alpha_mult(gc, 1.0); } -void ghid_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +void ghid_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { USE_GC(gc); Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4787) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4788) @@ -1000,7 +1000,7 @@ ghid_drc_window_throw_dialog, }; -extern HID_Attribute *ghid_get_export_options(int *); +extern hid_attribute_t *ghid_get_export_options(int *); /* ------------------------------------------------------------ @@ -1403,7 +1403,7 @@ /* ------------------------------------------------------------ */ -static HID_Attribute printer_calibrate_attrs[] = { +static hid_attribute_t printer_calibrate_attrs[] = { {N_("Enter Values here:"), "", HID_Label, 0, 0, {0, 0, 0}, 0, 0}, {N_("x-calibration"), N_("X scale for calibrating your printer"), @@ -1412,7 +1412,7 @@ HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0} }; -static HID_Attr_Val printer_calibrate_values[3]; +static hid_attr_val_t printer_calibrate_values[3]; static const char printcalibrate_syntax[] = "PrintCalibrate()"; Index: trunk/src_plugins/hid_gtk/gui-dialog-print.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-dialog-print.c (revision 4787) +++ trunk/src_plugins/hid_gtk/gui-dialog-print.c (revision 4788) @@ -87,7 +87,7 @@ } -int ghid_attribute_dialog(HID_Attribute * attrs, int n_attrs, HID_Attr_Val * results, const char *title, const char *descr) +int ghid_attribute_dialog(hid_attribute_t * attrs, int n_attrs, hid_attr_val_t * results, const char *title, const char *descr) { GtkWidget *dialog; GtkWidget *content_area; @@ -315,10 +315,10 @@ void ghid_dialog_print(pcb_hid_t * hid) { - HID_Attribute *attr; + hid_attribute_t *attr; int n = 0; int i; - HID_Attr_Val *results = NULL; + hid_attr_val_t *results = NULL; /* signal the initial export select dialog that it should close */ if (export_dialog) @@ -328,7 +328,7 @@ attr = exporter->get_export_options(&n); if (n > 0) { - results = (HID_Attr_Val *) malloc(n * sizeof(HID_Attr_Val)); + results = (hid_attr_val_t *) malloc(n * sizeof(hid_attr_val_t)); if (results == NULL) { fprintf(stderr, "ghid_dialog_print() -- malloc failed\n"); exit(1); Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4787) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4788) @@ -1476,7 +1476,7 @@ return 0; } -void ghid_do_export(HID_Attr_Val * options) +void ghid_do_export(hid_attr_val_t * options) { gtkhid_begin(); Index: trunk/src_plugins/hid_gtk/gui.h =================================================================== --- trunk/src_plugins/hid_gtk/gui.h (revision 4787) +++ trunk/src_plugins/hid_gtk/gui.h (revision 4788) @@ -190,7 +190,7 @@ /* Function prototypes */ void ghid_parse_arguments(gint * argc, gchar *** argv); -void ghid_do_export(HID_Attr_Val * options); +void ghid_do_export(hid_attr_val_t * options); void ghid_do_exit(pcb_hid_t *hid); void ghid_create_pcb_widgets(void); @@ -285,7 +285,7 @@ void ghid_dialog_export(void); void ghid_dialog_print(pcb_hid_t *); -int ghid_attribute_dialog(HID_Attribute *, int, HID_Attr_Val *, const char *, const char *); +int ghid_attribute_dialog(hid_attribute_t *, int, hid_attr_val_t *, const char *, const char *); /* gui-drc-window.c */ void ghid_drc_window_show(gboolean raise); @@ -408,19 +408,19 @@ /* gtkhid-gdk.c AND gtkhid-gl.c */ int ghid_set_layer(const char *name, int group, int empty); -hidGC ghid_make_gc(void); -void ghid_destroy_gc(hidGC); +hid_gc_t ghid_make_gc(void); +void ghid_destroy_gc(hid_gc_t); void ghid_use_mask(int use_it); -void ghid_set_color(hidGC gc, const char *name); -void ghid_set_line_cap(hidGC gc, pcb_cap_style_t style); -void ghid_set_line_width(hidGC gc, Coord width); -void ghid_set_draw_xor(hidGC gc, int _xor); -void ghid_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -void ghid_draw_arc(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle); -void ghid_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); -void ghid_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius); -void ghid_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y); -void ghid_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2); +void ghid_set_color(hid_gc_t gc, const char *name); +void ghid_set_line_cap(hid_gc_t gc, pcb_cap_style_t style); +void ghid_set_line_width(hid_gc_t gc, Coord width); +void ghid_set_draw_xor(hid_gc_t gc, int _xor); +void ghid_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +void ghid_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle); +void ghid_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); +void ghid_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius); +void ghid_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y); +void ghid_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2); void ghid_invalidate_lr(int left, int right, int top, int bottom); void ghid_invalidate_all(); void ghid_notify_crosshair_change(pcb_bool changes_complete); Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 4787) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 4788) @@ -573,7 +573,7 @@ return topform; } -int lesstif_attribute_dialog(HID_Attribute * attrs, int n_attrs, HID_Attr_Val * results, const char *title, const char *descr) +int lesstif_attribute_dialog(hid_attribute_t * attrs, int n_attrs, hid_attr_val_t * results, const char *title, const char *descr) { Widget dialog, topform, lform, form; Widget *wl; @@ -889,9 +889,9 @@ static int Print(int argc, const char **argv, Coord x, Coord y) { - HID_Attribute *opts; + hid_attribute_t *opts; pcb_hid_t *printer; - HID_Attr_Val *vals; + hid_attr_val_t *vals; int n; printer = hid_find_printer(); @@ -900,7 +900,7 @@ return 1; } opts = printer->get_export_options(&n); - vals = (HID_Attr_Val *) calloc(n, sizeof(HID_Attr_Val)); + vals = (hid_attr_val_t *) calloc(n, sizeof(hid_attr_val_t)); if (lesstif_attribute_dialog(opts, n, vals, "Print", "")) { free(vals); return 1; @@ -910,7 +910,7 @@ return 0; } -static HID_Attribute printer_calibrate_attrs[] = { +static hid_attribute_t printer_calibrate_attrs[] = { {"Enter Values here:", "", HID_Label, 0, 0, {0, 0, 0}, 0, 0}, {"x-calibration", "X scale for calibrating your printer", @@ -919,7 +919,7 @@ HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0} }; -static HID_Attr_Val printer_calibrate_values[3]; +static hid_attr_val_t printer_calibrate_values[3]; static const char printcalibrate_syntax[] = "PrintCalibrate()"; @@ -958,9 +958,9 @@ static int Export(int argc, const char **argv, Coord x, Coord y) { static Widget selector = 0; - HID_Attribute *opts; + hid_attribute_t *opts; pcb_hid_t *printer, **hids; - HID_Attr_Val *vals; + hid_attr_val_t *vals; int n, i, count; Widget prev = 0; Widget w; @@ -1014,7 +1014,7 @@ exporter = printer; opts = printer->get_export_options(&n); - vals = (HID_Attr_Val *) calloc(n, sizeof(HID_Attr_Val)); + vals = (hid_attr_val_t *) calloc(n, sizeof(hid_attr_val_t)); if (lesstif_attribute_dialog(opts, n, vals, "Export", NULL)) { free(vals); return 1; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 4787) +++ trunk/src_plugins/hid_lesstif/main.c (revision 4788) @@ -63,7 +63,7 @@ #define MAX_ZOOM_SCALE 10 #define UUNIT conf_core.editor.grid_unit->allow -typedef struct hid_gc_struct { +typedef struct hid_gc_s { pcb_hid_t *me_pointer; Pixel color; char *colorname; @@ -71,7 +71,7 @@ pcb_cap_style_t cap; char xor_set; char erase; -} hid_gc_struct; +} hid_gc_s; static pcb_hid_t lesstif_hid; @@ -179,7 +179,7 @@ static int stdin_listen = 0; static char *background_image_file = 0; - HID_Attribute lesstif_attribute_list[] = { + hid_attribute_t lesstif_attribute_list[] = { {"install", "Install private colormap", HID_Boolean, 0, 0, {0, 0, 0}, 0, &use_private_colormap}, #define HA_colormap 0 @@ -1071,9 +1071,9 @@ /* ---------------------------------------------------------------------- */ -static HID_Attribute *lesstif_get_export_options(int *n) +static hid_attribute_t *lesstif_get_export_options(int *n) { - *n = sizeof(lesstif_attribute_list) / sizeof(HID_Attribute); + *n = sizeof(lesstif_attribute_list) / sizeof(hid_attribute_t); return lesstif_attribute_list; } @@ -1699,7 +1699,7 @@ extern Widget lesstif_menubar; static int lesstif_hid_inited = 0; -static void lesstif_do_export(HID_Attr_Val * options) +static void lesstif_do_export(hid_attr_val_t * options) { Dimension width, height; Widget menu; @@ -1948,7 +1948,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - HID_Attribute *a = ha->attributes + i; + hid_attribute_t *a = ha->attributes + i; switch (a->type) { case HID_Integer: case HID_Coord: @@ -1992,7 +1992,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - HID_Attribute *a = ha->attributes + i; + hid_attribute_t *a = ha->attributes + i; XrmOptionDescRec *o = new_options + acount; char *tmpopt, *tmpres; XtResource *r = new_resources + rcount; @@ -2110,7 +2110,7 @@ rcount = 0; for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - HID_Attribute *a = ha->attributes + i; + hid_attribute_t *a = ha->attributes + i; val_union *v = new_values + rcount; switch (a->type) { case HID_Integer: @@ -2856,16 +2856,16 @@ return 0; } -static hidGC lesstif_make_gc(void) +static hid_gc_t lesstif_make_gc(void) { - hidGC rv = (hid_gc_struct *) malloc(sizeof(hid_gc_struct)); - memset(rv, 0, sizeof(hid_gc_struct)); + hid_gc_t rv = (hid_gc_s *) malloc(sizeof(hid_gc_s)); + memset(rv, 0, sizeof(hid_gc_s)); rv->me_pointer = &lesstif_hid; rv->colorname = NULL; return rv; } -static void lesstif_destroy_gc(hidGC gc) +static void lesstif_destroy_gc(hid_gc_t gc) { if (gc->colorname != NULL) free(gc->colorname); @@ -2915,7 +2915,7 @@ } } -static void lesstif_set_color(hidGC gc, const char *name) +static void lesstif_set_color(hid_gc_t gc, const char *name) { static void *cache = 0; pcb_hidval_t cval; @@ -2972,7 +2972,7 @@ } } -static void set_gc(hidGC gc) +static void set_gc(hid_gc_t gc) { int cap, join, width; if (gc->me_pointer != &lesstif_hid) { @@ -3026,17 +3026,17 @@ } } -static void lesstif_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void lesstif_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void lesstif_set_line_width(hidGC gc, Coord width) +static void lesstif_set_line_width(hid_gc_t gc, Coord width) { gc->width = width; } -static void lesstif_set_draw_xor(hidGC gc, int xor_set) +static void lesstif_set_draw_xor(hid_gc_t gc, int xor_set) { gc->xor_set = xor_set; } @@ -3043,7 +3043,7 @@ #define ISORT(a,b) if (a>b) { a^=b; b^=a; a^=b; } -static void lesstif_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void lesstif_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { double dx1, dy1, dx2, dy2; int vw = Vz(gc->width); @@ -3083,7 +3083,7 @@ } } -static void lesstif_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) +static void lesstif_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle delta_angle) { if ((pinout || conf_core.editor.thin_draw) && gc->erase) return; @@ -3128,7 +3128,7 @@ #endif } -static void lesstif_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void lesstif_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { int vw = Vz(gc->width); if ((pinout || conf_core.editor.thin_draw) && gc->erase) @@ -3161,7 +3161,7 @@ XDrawRectangle(display, mask_bitmap, mask_gc, x1, y1, x2 - x1 + 1, y2 - y1 + 1); } -static void lesstif_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void lesstif_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { if (pinout && use_mask && gc->erase) return; @@ -3186,7 +3186,7 @@ XFillArc(display, mask_bitmap, mask_gc, cx, cy, radius * 2, radius * 2, 0, 360 * 64); } -static void lesstif_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void lesstif_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { static XPoint *p = 0; static int maxp = 0; @@ -3213,7 +3213,7 @@ XFillPolygon(display, mask_bitmap, mask_gc, p, n_coords, Complex, CoordModeOrigin); } -static void lesstif_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void lesstif_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { int vw = Vz(gc->width); if ((pinout || conf_core.editor.thin_draw) && gc->erase) @@ -3459,7 +3459,7 @@ extern void lesstif_report_dialog(const char *title, const char *msg); extern int -lesstif_attribute_dialog(HID_Attribute * attrs, int n_attrs, HID_Attr_Val * results, const char *title, const char *descr); +lesstif_attribute_dialog(hid_attribute_t * attrs, int n_attrs, hid_attr_val_t * results, const char *title, const char *descr); static void pinout_callback(Widget da, PinoutData * pd, XmDrawingAreaCallbackStruct * cbs) { Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 4787) +++ trunk/src_plugins/hid_remote/remote.c (revision 4788) @@ -24,11 +24,11 @@ static pcb_hid_t remote_hid; -typedef struct hid_gc_struct { +typedef struct hid_gc_s { int nop; -} hid_gc_struct; +} hid_gc_s; -static HID_Attribute *remote_get_export_options(int *n_ret) +static hid_attribute_t *remote_get_export_options(int *n_ret) { return 0; } @@ -80,7 +80,7 @@ /* ----------------------------------------------------------------------------- */ static int remote_stay; -static void remote_do_export(HID_Attr_Val * options) +static void remote_do_export(hid_attr_val_t * options) { pcb_box_t region; region.X1 = 0; @@ -132,10 +132,10 @@ Coord line_width; char cap; } remote_gc_cache_t; -static hid_gc_struct remote_gc[32]; +static hid_gc_s remote_gc[32]; static remote_gc_cache_t gc_cache[32]; -static hidGC remote_make_gc(void) +static hid_gc_t remote_make_gc(void) { int gci = proto_send_make_gc(); int max = sizeof(remote_gc) / sizeof(remote_gc[0]); @@ -148,7 +148,7 @@ return remote_gc+gci; } -static int gc2idx(hidGC gc) +static int gc2idx(hid_gc_t gc) { int idx = gc - remote_gc; int max = sizeof(remote_gc) / sizeof(remote_gc[0]); @@ -160,7 +160,7 @@ return idx; } -static void remote_destroy_gc(hidGC gc) +static void remote_destroy_gc(hid_gc_t gc) { int idx = gc2idx(gc); if (idx >= 0) @@ -176,7 +176,7 @@ Message(PCB_MSG_ERROR, "Invalid use_mask %d\n", mask); } -static void remote_set_color(hidGC gc, const char *name) +static void remote_set_color(hid_gc_t gc, const char *name) { int idx = gc2idx(gc); if (idx >= 0) { @@ -189,7 +189,7 @@ /* r=round, s=square, b=beveled (octagon) */ static const char *cap_style_names = "rsrb"; -static void remote_set_line_cap(hidGC gc, pcb_cap_style_t style) +static void remote_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { int idx = gc2idx(gc); int max = strlen(cap_style_names); @@ -208,7 +208,7 @@ } } -static void remote_set_line_width(hidGC gc, Coord width) +static void remote_set_line_width(hid_gc_t gc, Coord width) { int idx = gc2idx(gc); if (idx >= 0) { @@ -219,7 +219,7 @@ } } -static void remote_set_draw_xor(hidGC gc, int xor_set) +static void remote_set_draw_xor(hid_gc_t gc, int xor_set) { int idx = gc2idx(gc); if (idx >= 0) @@ -226,7 +226,7 @@ proto_send_set_draw_xor(idx, xor_set); } -static void remote_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void remote_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -233,12 +233,12 @@ proto_send_draw_line(idx, x1, y1, x2, y2); } -static void remote_draw_arc(hidGC gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) +static void remote_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord width, Coord height, Angle start_angle, Angle end_angle) { #warning TODO } -static void remote_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void remote_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -245,7 +245,7 @@ proto_send_draw_rect(idx, x1, y1, x2, y2, 0); } -static void remote_fill_circle(hidGC gc, Coord cx, Coord cy, Coord radius) +static void remote_fill_circle(hid_gc_t gc, Coord cx, Coord cy, Coord radius) { int idx = gc2idx(gc); if (idx >= 0) @@ -252,7 +252,7 @@ proto_send_fill_circle(idx, cx, cy, radius); } -static void remote_fill_polygon(hidGC gc, int n_coords, Coord * x, Coord * y) +static void remote_fill_polygon(hid_gc_t gc, int n_coords, Coord * x, Coord * y) { int idx = gc2idx(gc); if (idx >= 0) @@ -259,7 +259,7 @@ proto_send_draw_poly(idx, n_coords, x, y); } -static void remote_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) +static void remote_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -329,7 +329,7 @@ } static int -remote_attribute_dialog(HID_Attribute * attrs_, int n_attrs_, HID_Attr_Val * results_, const char *title_, const char *descr_) +remote_attribute_dialog(hid_attribute_t * attrs_, int n_attrs_, hid_attr_val_t * results_, const char *title_, const char *descr_) { return 0; } Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4787) +++ trunk/src_plugins/jostle/jostle.c (revision 4788) @@ -84,7 +84,7 @@ VNODE *v; POLYAREA *p; pcb_hid_t *ddraw; - hidGC ddgc; + hid_gc_t ddgc; #ifndef DEBUG_POLYAREA return; Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 4787) +++ trunk/src_plugins/loghid/hid-logger.c (revision 4788) @@ -15,8 +15,8 @@ static pcb_hid_t *delegatee_ = NULL; static FILE *out_ = NULL; -static HID_Attribute *log_get_export_options(int *ret) { - HID_Attribute *result = delegatee_->get_export_options(ret); +static hid_attribute_t *log_get_export_options(int *ret) { + hid_attribute_t *result = delegatee_->get_export_options(ret); pcb_fprintf(out_, "get_export_options(ret) -> ret=%d\n", *ret); return result; } @@ -56,12 +56,12 @@ delegatee_->end_layer(); } -static hidGC log_make_gc() { +static hid_gc_t log_make_gc() { pcb_fprintf(out_, "make_gc()\n"); return delegatee_->make_gc(); } -static void log_destroy_gc(hidGC gc) { +static void log_destroy_gc(hid_gc_t gc) { pcb_fprintf(out_, "detroy_gc()\n"); delegatee_->destroy_gc(gc); } @@ -71,12 +71,12 @@ delegatee_->use_mask(use_it); } -static void log_set_color(hidGC gc, const char *name) { +static void log_set_color(hid_gc_t gc, const char *name) { pcb_fprintf(out_, "set_color(gc, %s)\n", name); delegatee_->set_color(gc, name); } -static void log_set_line_cap(hidGC gc, pcb_cap_style_t style) { +static void log_set_line_cap(hid_gc_t gc, pcb_cap_style_t style) { const char *txt = "unknown"; switch (style) { ENUM_LOG_TEXT(Trace_Cap); @@ -88,43 +88,43 @@ delegatee_->set_line_cap(gc, style); } -static void log_set_line_width(hidGC gc, Coord width) { +static void log_set_line_width(hid_gc_t gc, Coord width) { pcb_fprintf(out_, "set_line_width(gc, %d)\n", width); delegatee_->set_line_width(gc, width); } -static void log_set_draw_xor(hidGC gc, int xor) { +static void log_set_draw_xor(hid_gc_t gc, int xor) { pcb_fprintf(out_, "set_draw_xor(gc, %s)\n", xor ? "true" : "false"); delegatee_->set_draw_xor(gc, xor); } -static void log_set_draw_faded(hidGC gc, int faded) { +static void log_set_draw_faded(hid_gc_t gc, int faded) { pcb_fprintf(out_, "set_draw_faded(gc, %s)\n", faded ? "true" : "false"); delegatee_->set_draw_faded(gc, faded); } -static void log_draw_line(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) { +static void log_draw_line(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { pcb_fprintf(out_, "draw_line(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->draw_line(gc, x1, y1, x2, y2); } -static void log_draw_arc(hidGC gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) { +static void log_draw_arc(hid_gc_t gc, Coord cx, Coord cy, Coord xradius, Coord yradius, Angle start_angle, Angle delta_angle) { pcb_fprintf(out_, "draw_arc(gc, %mm, %mm, rx=%mm, ry=%mm, start_angle=%.1f, delta_a=%.1f)\n", cx, cy, xradius, yradius, start_angle, delta_angle); delegatee_->draw_arc(gc, cx, cy, xradius, yradius, start_angle, delta_angle); } -static void log_draw_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) { +static void log_draw_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { pcb_fprintf(out_, "draw_rect(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->draw_rect(gc, x1, y1, x2, y2); } -static void log_fill_circle(hidGC gc, Coord x, Coord y, Coord r) { +static void log_fill_circle(hid_gc_t gc, Coord x, Coord y, Coord r) { pcb_fprintf(out_, "fill_circle(gc, %mm, %mm, %mm)\n", x, y, r); delegatee_->fill_circle(gc, x, y, r); } -static void log_fill_polygon(hidGC gc, int n_coords, Coord *x, Coord *y) { +static void log_fill_polygon(hid_gc_t gc, int n_coords, Coord *x, Coord *y) { int i; pcb_fprintf(out_, "fill_polygon(gc, %d", n_coords); for (i = 0; i < n_coords; ++i) { @@ -134,41 +134,41 @@ delegatee_->fill_polygon(gc, n_coords, x, y); } -static void log_fill_pcb_polygon(hidGC gc, pcb_polygon_t *poly, const pcb_box_t *clip_box) { +static void log_fill_pcb_polygon(hid_gc_t gc, pcb_polygon_t *poly, const pcb_box_t *clip_box) { pcb_fprintf(out_, "fill_pcb_polygon(gc, poly->PointN=%d, ...)\n", poly->PointN); delegatee_->fill_pcb_polygon(gc, poly, clip_box); } -static void log_thindraw_pcb_polygon(hidGC gc, pcb_polygon_t *poly, const pcb_box_t *clip_box) { +static void log_thindraw_pcb_polygon(hid_gc_t gc, pcb_polygon_t *poly, const pcb_box_t *clip_box) { pcb_fprintf(out_, "thindraw_pcb_polygon(gc, poly->PointN=%d, ...)\n", poly->PointN); delegatee_->thindraw_pcb_polygon(gc, poly, clip_box); } -static void log_fill_pcb_pad(hidGC gc, pcb_pad_t *pad, pcb_bool clip, pcb_bool mask) { +static void log_fill_pcb_pad(hid_gc_t gc, pcb_pad_t *pad, pcb_bool clip, pcb_bool mask) { pcb_fprintf(out_, "fill_pcb_pad(gc, pad->name=%s, clip=%s, mask=%s)\n", pad->Name, clip ? "true" : "false", mask ? "true" : "false"); delegatee_->fill_pcb_pad(gc, pad, clip, mask); } -static void log_thindraw_pcb_pad(hidGC gc, pcb_pad_t *pad, pcb_bool clip, pcb_bool mask) { +static void log_thindraw_pcb_pad(hid_gc_t gc, pcb_pad_t *pad, pcb_bool clip, pcb_bool mask) { pcb_fprintf(out_, "thindraw_pcb_pad(gc, pad->name=%s, clip=%s, mask=%s)\n", pad->Name, clip ? "true" : "false", mask ? "true" : "false"); delegatee_->thindraw_pcb_pad(gc, pad, clip, mask); } -static void log_fill_pcb_pv(hidGC fg, hidGC bg, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask) { +static void log_fill_pcb_pv(hid_gc_t fg, hid_gc_t bg, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask) { pcb_fprintf(out_, "fill_pcb_pv(fg, bg, (%mm, %mm), draw_hole=%s, mask=%s)\n", pv->X, pv->Y, drawHole ? "true" : "false", mask ? "true" : "false"); delegatee_->fill_pcb_pv(fg, bg, pv, drawHole, mask); } -static void log_thindraw_pcb_pv(hidGC fg, hidGC bg, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask) { +static void log_thindraw_pcb_pv(hid_gc_t fg, hid_gc_t bg, pcb_pin_t *pv, pcb_bool drawHole, pcb_bool mask) { pcb_fprintf(out_, "thindraw_pcb_pv(fg, bg, (%mm, %mm), draw_hole=%s, mask=%s)\n", pv->X, pv->Y, drawHole ? "true" : "false", mask ? "true" : "false"); delegatee_->thindraw_pcb_pv(fg, bg, pv, drawHole, mask); } -static void log_fill_rect(hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2) { +static void log_fill_rect(hid_gc_t gc, Coord x1, Coord y1, Coord x2, Coord y2) { pcb_fprintf(out_, "fill_rect(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->fill_rect(gc, x1, y1, x2, y2); } Index: trunk/src_plugins/loghid/loghid.c =================================================================== --- trunk/src_plugins/loghid/loghid.c (revision 4787) +++ trunk/src_plugins/loghid/loghid.c (revision 4788) @@ -37,7 +37,7 @@ static const char *loghid_cookie = "loghid plugin"; -HID_Attribute loghid_attribute_list[] = { +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} #define HA_target_hid 0 @@ -88,7 +88,7 @@ REGISTER_ATTRIBUTES(loghid_attribute_list, loghid_cookie) -static HID_Attribute *loghid_get_export_options(int *n) +static hid_attribute_t *loghid_get_export_options(int *n) { /* loghid_attribute_list[HA_psfile] = pcb_strdup("default?");*/