Index: trunk/src/action_act.c =================================================================== --- trunk/src/action_act.c (revision 4786) +++ trunk/src/action_act.c (revision 4787) @@ -103,7 +103,7 @@ /* --------------------------------------------------------------------------- */ -HID_Action action_action_list[] = { +pcb_hid_action_t action_action_list[] = { {"ExecuteFile", 0, ActionExecuteFile, executefile_help, executefile_syntax} }; Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4786) +++ trunk/src/action_helper.c (revision 4787) @@ -300,7 +300,7 @@ Draw(); } -static void click_cb(hidval hv) +static void click_cb(pcb_hidval_t hv) { if (Note.Click) { notify_crosshair_change(pcb_false); @@ -587,7 +587,7 @@ case PCB_MODE_ARROW: { int test; - hidval hv; + pcb_hidval_t hv; Note.Click = pcb_true; /* do something after click time */ Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4786) +++ trunk/src/buffer.c (revision 4787) @@ -804,7 +804,7 @@ /* --------------------------------------------------------------------------- */ -HID_Action buffer_action_list[] = { +pcb_hid_action_t buffer_action_list[] = { {"FreeRotateBuffer", 0, ActionFreeRotateBuffer, freerotatebuffer_help, freerotatebuffer_syntax} , Index: trunk/src/build_run.c =================================================================== --- trunk/src/build_run.c (revision 4786) +++ trunk/src/build_run.c (revision 4787) @@ -64,7 +64,7 @@ char *GetInfoString(void) { - HID **hids; + pcb_hid_t **hids; int i; static gds_t info; static int first_time = 1; Index: trunk/src/change_act.c =================================================================== --- trunk/src/change_act.c (revision 4786) +++ trunk/src/change_act.c (revision 4787) @@ -1504,7 +1504,7 @@ /* --------------------------------------------------------------------------- */ -HID_Action change_action_list[] = { +pcb_hid_action_t change_action_list[] = { {"ChangeAngle", 0, ActionChangeAngle, changeangle_help, changeangle_syntax} , Index: trunk/src/conf_act.c =================================================================== --- trunk/src/conf_act.c (revision 4786) +++ trunk/src/conf_act.c (revision 4787) @@ -281,7 +281,7 @@ return (conf_core.editor.buffer_number + 1) == expected; } -HID_Action conf_action_list[] = { +pcb_hid_action_t conf_action_list[] = { {"conf", 0, ActionConf, conf_help, conf_syntax} , Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 4786) +++ trunk/src/draw.c (revision 4787) @@ -421,7 +421,7 @@ * XXX gtk only allows negative drawing. * XXX using the mask here is to get rat transparency */ -#warning TODO: make this a HID struct item instead +#warning TODO: make this a pcb_hid_t struct item instead int can_mask = strcmp(gui->name, "lesstif") == 0; if (can_mask) @@ -576,9 +576,9 @@ * HID drawing callback. */ -void hid_expose_callback(HID * hid, pcb_box_t * region, void *item) +void hid_expose_callback(pcb_hid_t * hid, pcb_box_t * region, void *item) { - HID *old_gui = gui; + pcb_hid_t *old_gui = gui; gui = hid; Output.fgGC = gui->make_gc(); Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 4786) +++ trunk/src/file_act.c (revision 4787) @@ -349,7 +349,7 @@ } -HID_Action file_action_list[] = { +pcb_hid_action_t file_action_list[] = { {"ExecCommand", 0, ActionExecCommand, execcommand_help, execcommand_syntax} , Index: trunk/src/find_act.c =================================================================== --- trunk/src/find_act.c (revision 4786) +++ trunk/src/find_act.c (revision 4787) @@ -67,7 +67,7 @@ return 0; } -HID_Action find_action_list[] = { +pcb_hid_action_t find_action_list[] = { {"DRC", 0, ActionDRCheck, drc_help, drc_syntax} }; Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 4786) +++ trunk/src/gui_act.c (revision 4787) @@ -1195,7 +1195,7 @@ static int ActionSwitchHID(int argc, const char **argv, Coord x, Coord y) { - HID *ng = hid_find_gui(argv[0]); + pcb_hid_t *ng = hid_find_gui(argv[0]); int chg; if (ng == NULL) { @@ -1236,7 +1236,7 @@ -HID_Action gui_action_list[] = { +pcb_hid_action_t gui_action_list[] = { {"Display", 0, ActionDisplay, display_help, display_syntax} , Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 4786) +++ trunk/src/hid.h (revision 4787) @@ -46,7 +46,7 @@ Square_Cap, /* Square pins or pads. */ Round_Cap, /* Round pins or round-ended pads, thermals. */ Beveled_Cap /* Octagon pins or bevel-cornered pads. */ -} EndCapStyle; +} pcb_cap_style_t; /* The HID may need something more than an "int" for colors, timers, etc. So it passes/returns one of these, which is castable to a @@ -54,7 +54,7 @@ typedef union { long lval; void *ptr; -} hidval; +} pcb_hidval_t; /* 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 @@ -85,11 +85,11 @@ const char *description; /* Full allowed syntax; use \n to separate lines. */ const char *syntax; -} HID_Action; +} pcb_hid_action_t; -extern void hid_register_action(const HID_Action *a, const char *cookie, int copy); +extern void hid_register_action(const pcb_hid_action_t *a, const char *cookie, int copy); -extern void hid_register_actions(const HID_Action *a, int, const char *cookie, int copy); +extern void hid_register_actions(const pcb_hid_action_t *a, int, const char *cookie, int copy); #define REGISTER_ACTIONS(a, cookie) HIDCONCAT(void register_,a) ()\ { hid_register_actions(a, sizeof(a)/sizeof(a[0]), cookie, 0); } @@ -123,7 +123,7 @@ /**< As in POLLOUT */ PCB_WATCH_ERROR = 1 << 2, /**< As in POLLERR */ PCB_WATCH_HANGUP = 1 << 3 /**< As in POLLHUP */ -} PCBWatchFlags; +} pcb_watch_flags_t; /* DRC GUI Hooks */ typedef struct { @@ -132,12 +132,12 @@ void (*reset_drc_dialog_message) (void); void (*append_drc_violation) (pcb_drc_violation_t * violation); int (*throw_drc_dialog) (void); -} HID_DRC_GUI; +} pcb_hid_drc_gui_t; -typedef struct hid_st HID; +typedef struct hid_s pcb_hid_t; /* This is the main HID structure. */ -struct hid_st { +struct hid_s { /* The size of this structure. We use this as a compatibility check; a HID built with a different hid.h than we're expecting should have a different size here. */ @@ -197,10 +197,10 @@ void (*do_export) (HID_Attr_Val * options_); /* uninit a GUI hid */ - void (*uninit) (HID *hid); + void (*uninit) (pcb_hid_t *hid); /* uninit a GUI hid */ - void (*do_exit) (HID *hid); + void (*do_exit) (pcb_hid_t *hid); /* Parse the command line. Call this early for whatever HID will be the primary HID, as it will set all the registered attributes. @@ -269,7 +269,7 @@ /* 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_, EndCapStyle style_); + 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_); /* Blends 20% or so color with 80% background. Only used for @@ -330,24 +330,24 @@ timer during the callback for the first. user_data can be anything, it's just passed to func. Times are not guaranteed to be accurate. */ - hidval(*add_timer) (void (*func) (hidval user_data_), unsigned long milliseconds_, hidval user_data_); + pcb_hidval_t(*add_timer) (void (*func) (pcb_hidval_t user_data_), unsigned long milliseconds_, pcb_hidval_t user_data_); /* Use this to stop a timer that hasn't triggered yet. */ - void (*stop_timer) (hidval timer_); + void (*stop_timer) (pcb_hidval_t timer_); /* Causes func to be called when some condition occurs on the file descriptor passed. Conditions include data for reading, writing, hangup, and errors. user_data can be anything, it's just passed to func. */ - hidval(*watch_file) (int fd_, unsigned int condition_, - void (*func_) (hidval watch_, int fd_, unsigned int condition_, hidval user_data_), - hidval user_data); + pcb_hidval_t(*watch_file) (int fd_, unsigned int condition_, + void (*func_) (pcb_hidval_t watch_, int fd_, unsigned int condition_, pcb_hidval_t user_data_), + pcb_hidval_t user_data); /* Use this to stop a file watch. */ - void (*unwatch_file) (hidval watch_); + void (*unwatch_file) (pcb_hidval_t watch_); /* Causes func to be called in the mainloop prior to blocking */ - hidval(*add_block_hook) (void (*func_) (hidval data_), hidval data_); + pcb_hidval_t(*add_block_hook) (void (*func_) (pcb_hidval_t data_), pcb_hidval_t data_); /* Use this to stop a mainloop block hook. */ - void (*stop_block_hook) (hidval block_hook_); + void (*stop_block_hook) (pcb_hidval_t block_hook_); /* Various dialogs */ @@ -444,7 +444,7 @@ Returns nonzero if the user wishes to cancel the operation. */ int (*progress) (int so_far_, int total_, const char *message_); - HID_DRC_GUI *drc_gui; + pcb_hid_drc_gui_t *drc_gui; void (*edit_attributes) (const char *owner, pcb_attribute_list_t * attrlist_); @@ -462,7 +462,7 @@ * gui-> for making drawing calls. If the return value is NULL, then * permission has been denied, and the drawing must not continue. */ - HID *(*request_debug_draw) (void); + pcb_hid_t *(*request_debug_draw) (void); /* Flush pending drawing to the screen * @@ -551,22 +551,22 @@ Do *not* assume that the hid that is passed is the GUI hid. This callback is also used for printing and exporting. */ struct pcb_box_t; -void hid_expose_callback(HID * hid_, pcb_box_t *region_, void *item_); +void hid_expose_callback(pcb_hid_t * hid_, pcb_box_t *region_, void *item_); /* This is initially set to a "no-gui" gui, and later reset by main. hid_expose_callback also temporarily set it for drawing. */ -extern HID *gui; +extern pcb_hid_t *gui; /* When not NULL, auto-start the next gui after the current one quits */ -extern HID *next_gui; +extern pcb_hid_t *next_gui; /* This is either NULL or points to the current HID that is being called to do the exporting. The gui HIDs set and unset this var.*/ -extern HID *exporter; +extern pcb_hid_t *exporter; -/* This is either NULL or points to the current HID_Action that is being +/* This is either NULL or points to the current pcb_hid_action_t that is being called. The action launcher sets and unsets this variable. */ -extern const HID_Action *current_action; +extern const pcb_hid_action_t *current_action; /* The GUI may set this to be approximately the PCB size of a pixel, to allow for near-misses in selection and changes in drawing items Index: trunk/src/hid_actions.c =================================================================== --- trunk/src/hid_actions.c (revision 4786) +++ trunk/src/hid_actions.c (revision 4787) @@ -29,7 +29,7 @@ } static htsp_t *all_actions = NULL; -const HID_Action *current_action = NULL; +const pcb_hid_action_t *current_action = NULL; static const char *check_action_name(const char *s) { @@ -41,10 +41,10 @@ typedef struct { const char *cookie; - const HID_Action *action; + const pcb_hid_action_t *action; } hid_cookie_action_t; -void hid_register_actions(const HID_Action * a, int n, const char *cookie, int copy) +void hid_register_actions(const pcb_hid_action_t * a, int n, const char *cookie, int copy) { int i; hid_cookie_action_t *ca; @@ -68,12 +68,12 @@ } } -void hid_register_action(const HID_Action * a, const char *cookie, int copy) +void hid_register_action(const pcb_hid_action_t * a, const char *cookie, int copy) { hid_register_actions(a, 1, cookie, copy); } -void hid_remove_actions(const HID_Action * a, int n) +void hid_remove_actions(const pcb_hid_action_t * a, int n) { int i; @@ -106,7 +106,7 @@ } } -void hid_remove_action(const HID_Action * a) +void hid_remove_action(const pcb_hid_action_t * a) { htsp_entry_t *e; @@ -120,7 +120,7 @@ } } -const HID_Action *hid_find_action(const char *name) +const pcb_hid_action_t *hid_find_action(const char *name) { hid_cookie_action_t *ca; @@ -219,11 +219,11 @@ return hid_actionv(name, argc, argv); } -int hid_actionv_(const HID_Action *a, int argc, const char **argv) +int hid_actionv_(const pcb_hid_action_t *a, int argc, const char **argv) { Coord x = 0, y = 0; int i, ret; - const HID_Action *old_action; + const pcb_hid_action_t *old_action; if (a->need_coord_msg) gui->get_coords(_(a->need_coord_msg), &x, &y); @@ -245,7 +245,7 @@ int hid_actionv(const char *name, int argc, const char **argv) { - const HID_Action *a; + const pcb_hid_action_t *a; if (!name) return 1; Index: trunk/src/hid_actions.h =================================================================== --- trunk/src/hid_actions.h (revision 4786) +++ trunk/src/hid_actions.h (revision 4787) @@ -11,16 +11,16 @@ /* HID internal interfaces. These may ONLY be called from the HID modules, not from the common PCB code. */ -const HID_Action *hid_find_action(const char *name); +const pcb_hid_action_t *hid_find_action(const char *name); -extern void hid_remove_actions(const HID_Action * a, int n); -extern void hid_remove_action(const HID_Action * a); +extern void hid_remove_actions(const pcb_hid_action_t * a, int n); +extern void hid_remove_action(const pcb_hid_action_t * a); extern void hid_remove_actions_by_cookie(const char *cookie); int hid_action(const char *action_); int hid_actionl(const char *action_, ...); /* NULL terminated */ int hid_actionv(const char *action_, int argc_, const char **argv_); -int hid_actionv_(const HID_Action *a, int argc, const char **argv); +int hid_actionv_(const pcb_hid_action_t *a, int argc, const char **argv); /* Parse the given command string into action calls, and call hid_actionv for each action found. Accepts both "action(arg1, Index: trunk/src/hid_color.c =================================================================== --- trunk/src/hid_color.c (revision 4786) +++ trunk/src/hid_color.c (revision 4787) @@ -4,12 +4,12 @@ #include #include "compat_misc.h" -static hidval invalid_color = { 0 }; +static pcb_hidval_t invalid_color = { 0 }; #define HT_HAS_CONST_KEY typedef char *htsh_key_t; typedef const char *htsh_const_key_t; -typedef hidval htsh_value_t; +typedef pcb_hidval_t htsh_value_t; #define HT_INVALID_VALUE invalid_color #define HT(x) htsh_ ## x #include @@ -17,7 +17,7 @@ #undef HT -int hid_cache_color(int set, const char *name, hidval * val, void **vcache) +int hid_cache_color(int set, const char *name, pcb_hidval_t * val, void **vcache) { htsh_t *cache; htsh_entry_t *e; @@ -32,7 +32,7 @@ e = htsh_getentry(cache, (char *)name); if (e == NULL) /* not found */ return 0; - memcpy(val, &e->value, sizeof(hidval)); + memcpy(val, &e->value, sizeof(pcb_hidval_t)); } else htsh_set(cache, pcb_strdup(name), *val); /* write */ Index: trunk/src/hid_color.h =================================================================== --- trunk/src/hid_color.h (revision 4786) +++ trunk/src/hid_color.h (revision 4787) @@ -10,6 +10,6 @@ and if found sets val and returns nonzero. If not found, it returns zero. If set is nonzero, name/val is added to the cache. */ -int hid_cache_color(int set, const char *name, hidval * val, void **cache); +int hid_cache_color(int set, const char *name, pcb_hidval_t * val, void **cache); #endif Index: trunk/src/hid_draw_helpers.c =================================================================== --- trunk/src/hid_draw_helpers.c (revision 4786) +++ trunk/src/hid_draw_helpers.c (revision 4787) @@ -430,7 +430,7 @@ } } -void common_draw_helpers_init(HID * hid) +void common_draw_helpers_init(pcb_hid_t * hid) { hid->fill_pcb_polygon = common_fill_pcb_polygon; hid->thindraw_pcb_polygon = common_thindraw_pcb_polygon; Index: trunk/src/hid_draw_helpers.h =================================================================== --- trunk/src/hid_draw_helpers.h (revision 4786) +++ trunk/src/hid_draw_helpers.h (revision 4787) @@ -6,5 +6,5 @@ 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_draw_helpers_init(HID * hid); +void common_draw_helpers_init(pcb_hid_t * hid); #endif Index: trunk/src/hid_extents.c =================================================================== --- trunk/src/hid_extents.c (revision 4786) +++ trunk/src/hid_extents.c (revision 4787) @@ -57,7 +57,7 @@ { } -static void extents_set_line_cap(hidGC gc, EndCapStyle style) +static void extents_set_line_cap(hidGC gc, pcb_cap_style_t style) { } @@ -121,7 +121,7 @@ PEY(y2, 0); } -static HID extents_hid; +static pcb_hid_t extents_hid; void hid_extents_init(void) { @@ -130,11 +130,11 @@ if (initialised) return; - memset(&extents_hid, 0, sizeof(HID)); + memset(&extents_hid, 0, sizeof(pcb_hid_t)); common_draw_helpers_init(&extents_hid); - extents_hid.struct_size = sizeof(HID); + extents_hid.struct_size = sizeof(pcb_hid_t); extents_hid.name = "extents-extents"; extents_hid.description = "used to calculate extents"; extents_hid.poly_before = 1; Index: trunk/src/hid_flags.c =================================================================== --- trunk/src/hid_flags.c (revision 4786) +++ trunk/src/hid_flags.c (revision 4787) @@ -29,7 +29,7 @@ const char *end, *s; const char *argv[2]; if (cp != NULL) { - const HID_Action *a; + const pcb_hid_action_t *a; char buff[256]; int len, multiarg; len = cp - name; Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 4786) +++ trunk/src/hid_init.c (revision 4787) @@ -17,12 +17,12 @@ #include "compat_inc.h" #include "fptr_cast.h" -HID **hid_list = 0; +pcb_hid_t **hid_list = 0; int hid_num_hids = 0; -HID *gui = NULL; -HID *next_gui = NULL; -HID *exporter = NULL; +pcb_hid_t *gui = NULL; +pcb_hid_t *next_gui = NULL; +pcb_hid_t *exporter = NULL; int pixel_slop = 1; @@ -129,12 +129,12 @@ hid_attributes_uninit(); } -void hid_register_hid(HID * hid) +void hid_register_hid(pcb_hid_t * hid) { int i; - int sz = (hid_num_hids + 2) * sizeof(HID *); + int sz = (hid_num_hids + 2) * sizeof(pcb_hid_t *); - if (hid->struct_size != sizeof(HID)) { + if (hid->struct_size != sizeof(pcb_hid_t)) { fprintf(stderr, "Warning: hid \"%s\" has an incompatible ABI.\n", hid->name); return; } @@ -145,15 +145,15 @@ hid_num_hids++; if (hid_list) - hid_list = (HID **) realloc(hid_list, sz); + hid_list = (pcb_hid_t **) realloc(hid_list, sz); else - hid_list = (HID **) malloc(sz); + hid_list = (pcb_hid_t **) malloc(sz); hid_list[hid_num_hids - 1] = hid; hid_list[hid_num_hids] = 0; } -void hid_remove_hid(HID * hid) +void hid_remove_hid(pcb_hid_t * hid) { int i; @@ -168,7 +168,7 @@ } -HID *hid_find_gui(const char *preference) +pcb_hid_t *hid_find_gui(const char *preference) { int i; @@ -187,7 +187,7 @@ exit(1); } -HID *hid_find_printer() +pcb_hid_t *hid_find_printer() { int i; @@ -198,7 +198,7 @@ return 0; } -HID *hid_find_exporter(const char *which) +pcb_hid_t *hid_find_exporter(const char *which) { int i; @@ -215,7 +215,7 @@ return 0; } -HID **hid_enumerate() +pcb_hid_t **hid_enumerate() { return hid_list; } Index: trunk/src/hid_init.h =================================================================== --- trunk/src/hid_init.h (revision 4786) +++ trunk/src/hid_init.h (revision 4787) @@ -7,7 +7,7 @@ hid_register_hid, used by hid_find_*() and hid_enumerate(). The order in this list is the same as the order of hid_register_hid calls. */ -extern HID **hid_list; +extern pcb_hid_t **hid_list; /* Count of entries in the above. */ extern int hid_num_hids; @@ -22,17 +22,17 @@ /* When PCB runs in interactive mode, this is called to instantiate one GUI HID which happens to be the GUI. This HID is the one that interacts with the mouse and keyboard. */ -HID *hid_find_gui(const char *preference); +pcb_hid_t *hid_find_gui(const char *preference); /* Finds the one printer HID and instantiates it. */ -HID *hid_find_printer(void); +pcb_hid_t *hid_find_printer(void); /* Finds the indicated exporter HID and instantiates it. */ -HID *hid_find_exporter(const char *); +pcb_hid_t *hid_find_exporter(const char *); /* This returns a NULL-terminated array of available HIDs. The only real reason to use this is to locate all the export-style HIDs. */ -HID **hid_enumerate(void); +pcb_hid_t **hid_enumerate(void); /* HID internal interfaces. These may ONLY be called from the HID modules, not from the common PCB code. */ @@ -43,7 +43,7 @@ void hid_parse_command_line(int *argc, char ***argv); /* Called by the init funcs, used to set up hid_list. */ -extern void hid_register_hid(HID * hid); -void hid_remove_hid(HID * hid); +extern void hid_register_hid(pcb_hid_t * hid); +void hid_remove_hid(pcb_hid_t * hid); #endif Index: trunk/src/hid_nogui.c =================================================================== --- trunk/src/hid_nogui.c (revision 4786) +++ trunk/src/hid_nogui.c (revision 4787) @@ -74,7 +74,7 @@ CRASH("set_color"); } -static void nogui_set_line_cap(hidGC gc, EndCapStyle style) +static void nogui_set_line_cap(hidGC gc, pcb_cap_style_t style) { CRASH("set_line_cap"); } @@ -180,41 +180,41 @@ { } -static hidval nogui_add_timer(void (*func) (hidval user_data), unsigned long milliseconds, hidval user_data) +static pcb_hidval_t nogui_add_timer(void (*func) (pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { - hidval rv; + pcb_hidval_t rv; CRASH("add_timer"); rv.lval = 0; return rv; } -static void nogui_stop_timer(hidval timer) +static void nogui_stop_timer(pcb_hidval_t timer) { CRASH("stop_timer"); } -static hidval nogui_watch_file(int fd, unsigned int condition, void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), hidval user_data) +static pcb_hidval_t nogui_watch_file(int fd, unsigned int condition, void (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { - hidval rv; + pcb_hidval_t rv; CRASH("watch_file"); rv.lval = 0; return rv; } -static void nogui_unwatch_file(hidval watch) +static void nogui_unwatch_file(pcb_hidval_t watch) { CRASH("unwatch_file"); } -static hidval nogui_add_block_hook(void (*func) (hidval data), hidval data) +static pcb_hidval_t nogui_add_block_hook(void (*func) (pcb_hidval_t data), pcb_hidval_t data) { - hidval rv; + pcb_hidval_t rv; CRASH("add_block_hook"); rv.ptr = NULL; return rv; } -static void nogui_stop_block_hook(hidval block_hook) +static void nogui_stop_block_hook(pcb_hidval_t block_hook) { CRASH("stop_block_hook"); } @@ -376,7 +376,7 @@ return 0; } -static HID *nogui_request_debug_draw(void) +static pcb_hid_t *nogui_request_debug_draw(void) { return NULL; } @@ -393,7 +393,7 @@ { } -void common_nogui_init(HID * hid) +void common_nogui_init(pcb_hid_t * hid) { hid->get_export_options = nogui_get_export_options; hid->do_export = nogui_do_export; @@ -450,13 +450,13 @@ hid->create_menu = nogui_create_menu; } -static HID nogui_hid; +static pcb_hid_t nogui_hid; -HID *hid_nogui_get_hid(void) +pcb_hid_t *hid_nogui_get_hid(void) { - memset(&nogui_hid, 0, sizeof(HID)); + memset(&nogui_hid, 0, sizeof(pcb_hid_t)); - nogui_hid.struct_size = sizeof(HID); + nogui_hid.struct_size = sizeof(pcb_hid_t); nogui_hid.name = "nogui"; nogui_hid.description = "Default GUI when no other GUI is present. " "Does nothing."; Index: trunk/src/hid_nogui.h =================================================================== --- trunk/src/hid_nogui.h (revision 4786) +++ trunk/src/hid_nogui.h (revision 4787) @@ -1,7 +1,7 @@ #ifndef PCB_HID_COMMON_HIDNOGUI_H #define PCB_HID_COMMON_HIDNOGUI_H -void common_nogui_init(HID * hid); -HID *hid_nogui_get_hid(void); +void common_nogui_init(pcb_hid_t * hid); +pcb_hid_t *hid_nogui_get_hid(void); #endif Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 4786) +++ trunk/src/main_act.c (revision 4787) @@ -75,7 +75,7 @@ static int help0(void) { - HID **hl = hid_enumerate(); + pcb_hid_t **hl = hid_enumerate(); int i; u("pcb-rnd Printed Circuit Board editing program, http://repo.hu/projects/pcb-rnd"); @@ -108,7 +108,7 @@ static int help_invoc(void) { - HID **hl = hid_enumerate(); + pcb_hid_t **hl = hid_enumerate(); int i; int n_printer = 0, n_gui = 0, n_exporter = 0; @@ -146,7 +146,7 @@ { u(""); if (argc > 0) { - HID **hl = hid_enumerate(); + pcb_hid_t **hl = hid_enumerate(); int i; if (strcmp(argv[0], "invocation") == 0) return help_invoc(); @@ -244,7 +244,7 @@ /* --------------------------------------------------------------------------- */ -HID_Action main_action_list[] = { +pcb_hid_action_t main_action_list[] = { {"PrintActions", 0, ActionPrintActions, printactions_help, printactions_syntax} , Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 4786) +++ trunk/src/move.c (revision 4787) @@ -444,7 +444,7 @@ return 0; } -HID_Action move_action_list[] = { +pcb_hid_action_t move_action_list[] = { {"MoveLayer", 0, MoveLayerAction, movelayer_help, movelayer_syntax} }; Index: trunk/src/netlist_act.c =================================================================== --- trunk/src/netlist_act.c (revision 4786) +++ trunk/src/netlist_act.c (revision 4787) @@ -333,7 +333,7 @@ return 0; } -HID_Action netlist_action_list[] = { +pcb_hid_action_t netlist_action_list[] = { {"net", 0, ActionNetlist, netlist_help, netlist_syntax} , Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 4786) +++ trunk/src/object_act.c (revision 4787) @@ -996,7 +996,7 @@ -HID_Action object_action_list[] = { +pcb_hid_action_t object_action_list[] = { {"Attributes", 0, ActionAttributes, attributes_help, attributes_syntax} , Index: trunk/src/plug_footprint_act.c =================================================================== --- trunk/src/plug_footprint_act.c (revision 4786) +++ trunk/src/plug_footprint_act.c (revision 4787) @@ -36,7 +36,7 @@ } -HID_Action conf_plug_footprint_list[] = { +pcb_hid_action_t conf_plug_footprint_list[] = { {"fp_rehash", 0, Action_fp_rehash, fp_rehash_help, fp_rehash_syntax} }; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 4786) +++ trunk/src/plug_io.c (revision 4787) @@ -655,7 +655,7 @@ * Callback for the autosave */ -static hidval backup_timer; +static pcb_hidval_t backup_timer; /* * If the backup interval is > 0 then set another timer. Otherwise @@ -662,7 +662,7 @@ * we do nothing and it is up to the GUI to call EnableAutosave() * after setting conf_core.rc.backup_interval > 0 again. */ -static void backup_cb(hidval data) +static void backup_cb(pcb_hidval_t data) { backup_timer.ptr = NULL; Backup(); @@ -672,7 +672,7 @@ void EnableAutosave(void) { - hidval x; + pcb_hidval_t x; x.ptr = NULL; Index: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c (revision 4786) +++ trunk/src/plugins.c (revision 4787) @@ -133,7 +133,7 @@ } -HID_Action plugins_action_list[] = { +pcb_hid_action_t plugins_action_list[] = { {"ManagePlugins", 0, ActionManagePlugins, manageplugins_help, manageplugins_syntax} }; Index: trunk/src/polygon_act.c =================================================================== --- trunk/src/polygon_act.c (revision 4786) +++ trunk/src/polygon_act.c (revision 4787) @@ -137,7 +137,7 @@ } -HID_Action polygon_action_list[] = { +pcb_hid_action_t polygon_action_list[] = { {"MorphPolygon", 0, ActionMorphPolygon, morphpolygon_help, morphpcb_polygon_syntax} , Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 4786) +++ trunk/src/rats_act.c (revision 4787) @@ -215,7 +215,7 @@ } -HID_Action rats_action_list[] = { +pcb_hid_action_t rats_action_list[] = { {"AddRats", 0, ActionAddRats, addrats_help, addrats_syntax} , Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 4786) +++ trunk/src/rats_patch.c (revision 4787) @@ -487,7 +487,7 @@ return 0; } -HID_Action rats_patch_action_list[] = { +pcb_hid_action_t rats_patch_action_list[] = { {"ReplaceFootprint", 0, ActionReplaceFootprint, replacefootprint_help, replacefootprint_syntax} , Index: trunk/src/remove_act.c =================================================================== --- trunk/src/remove_act.c (revision 4786) +++ trunk/src/remove_act.c (revision 4787) @@ -96,7 +96,7 @@ } -HID_Action remove_action_list[] = { +pcb_hid_action_t remove_action_list[] = { {"Delete", 0, ActionDelete, delete_help, delete_syntax} , Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 4786) +++ trunk/src/select_act.c (revision 4787) @@ -377,7 +377,7 @@ return 0; } -HID_Action select_action_list[] = { +pcb_hid_action_t select_action_list[] = { {"Select", 0, ActionSelect, select_help, select_syntax} , Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 4786) +++ trunk/src/undo_act.c (revision 4787) @@ -284,7 +284,7 @@ } -HID_Action undo_action_list[] = { +pcb_hid_action_t undo_action_list[] = { {"Atomic", 0, ActionAtomic, atomic_help, atomic_syntax} , Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 4786) +++ trunk/src_plugins/autocrop/autocrop.c (revision 4787) @@ -226,7 +226,7 @@ return 0; } -static HID_Action autocrop_action_list[] = { +static pcb_hid_action_t autocrop_action_list[] = { {"autocrop", NULL, autocrop, NULL, NULL} }; Index: trunk/src_plugins/autoplace/action.c =================================================================== --- trunk/src_plugins/autoplace/action.c (revision 4786) +++ trunk/src_plugins/autoplace/action.c (revision 4787) @@ -55,7 +55,7 @@ static const char *autoplace_cookie = "autoplace plugin"; -HID_Action autoplace_action_list[] = { +pcb_hid_action_t autoplace_action_list[] = { {"AutoPlaceSelected", 0, ActionAutoPlaceSelected, autoplace_help, autoplace_syntax} , Index: trunk/src_plugins/autoroute/action.c =================================================================== --- trunk/src_plugins/autoroute/action.c (revision 4786) +++ trunk/src_plugins/autoroute/action.c (revision 4787) @@ -81,7 +81,7 @@ static const char *autoroute_cookie = "autoroute plugin"; -HID_Action autoroute_action_list[] = { +pcb_hid_action_t autoroute_action_list[] = { {"AutoRoute", 0, ActionAutoRoute, autoroute_help, autoroute_syntax} , Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4786) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4787) @@ -135,7 +135,7 @@ } #ifdef ROUTE_DEBUG -HID *ddraw = NULL; +pcb_hid_t *ddraw = NULL; static hidGC ar_gc = 0; #endif Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 4786) +++ trunk/src_plugins/boardflip/boardflip.c (revision 4787) @@ -162,7 +162,7 @@ return 0; } -static HID_Action boardflip_action_list[] = { +static pcb_hid_action_t boardflip_action_list[] = { {"BoardFlip", NULL, boardflip, NULL, NULL} }; Index: trunk/src_plugins/dbus/dbus-pcbmain.c =================================================================== --- trunk/src_plugins/dbus/dbus-pcbmain.c (revision 4786) +++ trunk/src_plugins/dbus/dbus-pcbmain.c (revision 4787) @@ -38,17 +38,17 @@ struct _IOWatchHandler { DBusWatch *dbus_watch; - hidval pcb_watch; + pcb_hidval_t pcb_watch; }; struct _TimeoutHandler { DBusTimeout *dbus_timeout; - hidval pcb_timer; + pcb_hidval_t pcb_timer; int interval; }; -static void block_hook_cb(hidval data) +static void block_hook_cb(pcb_hidval_t data) { DBusConnection *connection = (DBusConnection *) data.ptr; if (dbus_connection_get_dispatch_status(connection) != DBUS_DISPATCH_DATA_REMAINS) @@ -76,7 +76,7 @@ } -void io_watch_handler_cb(hidval pcb_watch, int fd, unsigned int condition, hidval data) +void io_watch_handler_cb(pcb_hidval_t pcb_watch, int fd, unsigned int condition, pcb_hidval_t data) { IOWatchHandler *handler; unsigned int dbus_condition = 0; @@ -120,7 +120,7 @@ } -void timeout_handler_cb(hidval data) +void timeout_handler_cb(pcb_hidval_t data) { TimeoutHandler *handler; handler = (TimeoutHandler *) data.ptr; @@ -140,7 +140,7 @@ int fd; unsigned int pcb_condition; unsigned int dbus_flags; - hidval temp; + pcb_hidval_t temp; /* We won't create a watch until it becomes enabled. */ if (!dbus_watch_get_enabled(dbus_watch)) @@ -188,7 +188,7 @@ static dbus_bool_t timeout_add(DBusTimeout * timeout, void *data) { TimeoutHandler *handler; - hidval temp; + pcb_hidval_t temp; /* We can't create a timeout without a GUI */ if (gui == NULL) @@ -248,7 +248,7 @@ void pcb_dbus_connection_setup_with_mainloop(DBusConnection * connection) { /* ConnectionSetup *cs; */ - hidval temp; + pcb_hidval_t temp; /* FIXME we never free the slot, so its refcount just keeps growing, * which is kind of broken. Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 4786) +++ trunk/src_plugins/diag/diag.c (revision 4787) @@ -178,7 +178,7 @@ } -HID_Action diag_action_list[] = { +pcb_hid_action_t diag_action_list[] = { {"dumpconf", 0, ActionDumpConf, dump_conf_help, dump_conf_syntax}, {"dumplayers", 0, ActionDumpLayers, Index: trunk/src_plugins/distalign/distalign.c =================================================================== --- trunk/src_plugins/distalign/distalign.c (revision 4786) +++ trunk/src_plugins/distalign/distalign.c (revision 4787) @@ -618,7 +618,7 @@ return 0; } -static HID_Action distalign_action_list[] = { +static pcb_hid_action_t distalign_action_list[] = { {"distribute", NULL, distribute, "Distribute Elements", distribute_syntax}, {"align", NULL, align, "Align Elements", align_syntax} }; Index: trunk/src_plugins/distaligntext/distaligntext.c =================================================================== --- trunk/src_plugins/distaligntext/distaligntext.c (revision 4786) +++ trunk/src_plugins/distaligntext/distaligntext.c (revision 4787) @@ -615,7 +615,7 @@ return 0; } -static HID_Action distaligntext_action_list[] = { +static pcb_hid_action_t distaligntext_action_list[] = { {"distributetext", NULL, distributetext, "Distribute Text Elements", distributetext_syntax}, {"aligntext", NULL, aligntext, "Align Text Elements", aligntext_syntax} }; Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 4786) +++ trunk/src_plugins/djopt/djopt.c (revision 4787) @@ -2677,7 +2677,7 @@ return 0; } -HID_Action djopt_action_list[] = { +pcb_hid_action_t djopt_action_list[] = { {"djopt", 0, ActionDJopt, djopt_help, djopt_syntax} }; Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 4786) +++ trunk/src_plugins/export_bboard/bboard.c (revision 4787) @@ -74,7 +74,7 @@ * Breadboard export filter parameters and options ****************************************************************************************************/ -static HID bboard_hid; +static pcb_hid_t bboard_hid; static struct { int draw; @@ -586,7 +586,7 @@ { } -static HID bboard_hid; +static pcb_hid_t bboard_hid; pcb_uninit_t hid_export_bboard_init() Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 4786) +++ trunk/src_plugins/export_bom/bom.c (revision 4787) @@ -301,15 +301,15 @@ hid_parse_command_line(argc, argv); } -HID bom_hid; +pcb_hid_t bom_hid; pcb_uninit_t hid_export_bom_init() { - memset(&bom_hid, 0, sizeof(HID)); + memset(&bom_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&bom_hid); - bom_hid.struct_size = sizeof(HID); + bom_hid.struct_size = sizeof(pcb_hid_t); bom_hid.name = "bom"; bom_hid.description = "Exports a Bill of Materials"; bom_hid.exporter = 1; Index: trunk/src_plugins/export_dsn/dsn.c =================================================================== --- trunk/src_plugins/export_dsn/dsn.c (revision 4786) +++ trunk/src_plugins/export_dsn/dsn.c (revision 4787) @@ -70,7 +70,7 @@ static Coord viawidth = 45; static Coord viadrill = 25; -static HID dsn_hid; +static pcb_hid_t dsn_hid; static HID_Attribute dsn_options[] = { {"dsnfile", "SPECCTRA output file", @@ -571,10 +571,10 @@ #include "dolists.h" pcb_uninit_t hid_export_dsn_init() { - memset(&dsn_hid, 0, sizeof(HID)); + memset(&dsn_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&dsn_hid); - dsn_hid.struct_size = sizeof(HID); + dsn_hid.struct_size = sizeof(pcb_hid_t); dsn_hid.name = "dsn"; dsn_hid.description = "Exports DSN format"; dsn_hid.exporter = 1; Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 4786) +++ trunk/src_plugins/export_dxf/dxf.c (revision 4787) @@ -261,7 +261,7 @@ static void dxf_set_color(hidGC 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, EndCapStyle style); +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_show_item(void *item); static StringList *dxf_string_insert(char *str, StringList * list); @@ -537,7 +537,7 @@ /*! * \brief Record with all values of the DXF HID. */ -static HID dxf_hid; +static pcb_hid_t dxf_hid; /*! * \brief Drill (hole) properties. @@ -604,7 +604,7 @@ * shapes, and is thus not yet implemented. */ typedef struct hid_gc_struct { - EndCapStyle cap; + pcb_cap_style_t cap; /*!< end cap style. */ int width; /*!< width. */ @@ -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, EndCapStyle style) { +static void dxf_set_line_cap(hidGC gc, pcb_cap_style_t style) { #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_set_line_cap () function.\n", __FILE__, __LINE__); #endif @@ -5930,11 +5930,11 @@ */ pcb_uninit_t hid_export_dxf_init() { - memset(&dxf_hid, 0, sizeof(HID)); + memset(&dxf_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&dxf_hid); common_draw_helpers_init(&dxf_hid); - dxf_hid.struct_size = sizeof(HID); + dxf_hid.struct_size = sizeof(pcb_hid_t); dxf_hid.name = "dxf"; dxf_hid.description = "DXF export"; dxf_hid.exporter = 1; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 4786) +++ trunk/src_plugins/export_gcode/gcode.c (revision 4787) @@ -82,8 +82,8 @@ }; struct hid_gc_struct { - HID *me_pointer; - EndCapStyle cap; + pcb_hid_t *me_pointer; + pcb_cap_style_t cap; int width; unsigned char r, g, b; int erase; @@ -612,7 +612,7 @@ return; } -static void gcode_set_line_cap(hidGC gc, EndCapStyle style) +static void gcode_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -653,7 +653,7 @@ } if (lastbrush != gc->brush || need_brush) { static void *bcache = 0; - hidval bval; + pcb_hidval_t bval; char name[256]; char type; int r; @@ -873,16 +873,16 @@ #include "dolists.h" -HID gcode_hid; +pcb_hid_t gcode_hid; pcb_uninit_t hid_export_gcode_init() { - memset(&gcode_hid, 0, sizeof(HID)); + memset(&gcode_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&gcode_hid); common_draw_helpers_init(&gcode_hid); - gcode_hid.struct_size = sizeof(HID); + gcode_hid.struct_size = sizeof(pcb_hid_t); gcode_hid.name = "gcode"; gcode_hid.description = "G-CODE export"; gcode_hid.exporter = 1; Index: trunk/src_plugins/export_gcode/gcode.h =================================================================== --- trunk/src_plugins/export_gcode/gcode.h (revision 4786) +++ trunk/src_plugins/export_gcode/gcode.h (revision 4787) @@ -1,3 +1,3 @@ /* $Id: nelma.h,v 1.2 2007/04/20 11:31:15 danmc Exp $ */ extern const char *gcode_cookie; -extern HID gcode_hid; +extern pcb_hid_t gcode_hid; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 4786) +++ trunk/src_plugins/export_gerber/gerber.c (revision 4787) @@ -46,7 +46,7 @@ static void gerber_destroy_gc(hidGC 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, EndCapStyle style); +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); @@ -255,10 +255,10 @@ /* --------------------------------------------------------------------------- */ -static HID gerber_hid; +static pcb_hid_t gerber_hid; typedef struct hid_gc_struct { - EndCapStyle cap; + pcb_cap_style_t cap; int width; int color; int erase; @@ -829,7 +829,7 @@ } } -static void gerber_set_line_cap(hidGC gc, EndCapStyle style) +static void gerber_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4786) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 4787) @@ -601,15 +601,15 @@ hid_parse_command_line(argc, argv); } -HID IPCD356_hid; +pcb_hid_t IPCD356_hid; pcb_uninit_t *hid_export_ipcd356_init() { - memset(&IPCD356_hid, 0, sizeof(HID)); + memset(&IPCD356_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&IPCD356_hid); - IPCD356_hid.struct_size = sizeof(HID); + IPCD356_hid.struct_size = sizeof(pcb_hid_t); IPCD356_hid.name = "IPC-D-356"; IPCD356_hid.description = "Exports a IPC-D-356 Netlist"; IPCD356_hid.exporter = 1; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 4786) +++ trunk/src_plugins/export_lpr/lpr.c (revision 4787) @@ -108,7 +108,7 @@ ps_calibrate_1(xval, yval, 1); } -static HID lpr_hid; +static pcb_hid_t lpr_hid; static int lpr_usage(const char *topic) { @@ -125,12 +125,12 @@ pcb_uninit_t hid_export_lpr_init() { - memset(&lpr_hid, 0, sizeof(HID)); + memset(&lpr_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&lpr_hid); ps_ps_init(&lpr_hid); - lpr_hid.struct_size = sizeof(HID); + lpr_hid.struct_size = sizeof(pcb_hid_t); lpr_hid.name = "lpr"; lpr_hid.description = "Postscript print"; lpr_hid.printer = 1; Index: trunk/src_plugins/export_nelma/nelma.c =================================================================== --- trunk/src_plugins/export_nelma/nelma.c (revision 4786) +++ trunk/src_plugins/export_nelma/nelma.c (revision 4787) @@ -95,8 +95,8 @@ }; struct hid_gc_struct { - HID *me_pointer; - EndCapStyle cap; + pcb_hid_t *me_pointer; + pcb_cap_style_t cap; Coord width; unsigned char r, g, b; int erase; @@ -105,7 +105,7 @@ gdImagePtr brush; }; -static HID nelma_hid; +static pcb_hid_t nelma_hid; static struct color_struct *black = NULL, *white = NULL; static Coord linewidth = -1; @@ -743,7 +743,7 @@ return; } -static void nelma_set_line_cap(hidGC gc, EndCapStyle style) +static void nelma_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -784,7 +784,7 @@ } if (lastbrush != gc->brush || need_brush) { static void *bcache = 0; - hidval bval; + pcb_hidval_t bval; char name[256]; char type; int r; @@ -986,12 +986,12 @@ pcb_uninit_t hid_export_nelma_init() { - memset(&nelma_hid, 0, sizeof(HID)); + memset(&nelma_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&nelma_hid); common_draw_helpers_init(&nelma_hid); - nelma_hid.struct_size = sizeof(HID); + nelma_hid.struct_size = sizeof(pcb_hid_t); nelma_hid.name = "nelma"; nelma_hid.description = "Numerical analysis package export"; nelma_hid.exporter = 1; Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 4786) +++ trunk/src_plugins/export_openscad/scad.c (revision 4787) @@ -108,7 +108,7 @@ -static HID scad_hid; +static pcb_hid_t scad_hid; static int silk_layer, drill_layer, outline_layer, mask_layer; static int layer_open, fresh_layer; @@ -887,7 +887,7 @@ } } -static void scad_set_line_cap(hidGC gc, EndCapStyle style) +static void scad_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -1132,7 +1132,7 @@ static const char *openscad_cookie = "openscad exporter"; -static HID scad_hid; +static pcb_hid_t scad_hid; pcb_uninit_t hid_export_openscad_init() { Index: trunk/src_plugins/export_openscad/scad.h =================================================================== --- trunk/src_plugins/export_openscad/scad.h (revision 4786) +++ trunk/src_plugins/export_openscad/scad.h (revision 4787) @@ -110,7 +110,7 @@ } color_table_struct; typedef struct hid_gc_struct { - EndCapStyle cap; + pcb_cap_style_t cap; int width; int erase; int drill; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 4786) +++ trunk/src_plugins/export_png/png.c (revision 4787) @@ -59,7 +59,7 @@ #define CRASH(func) fprintf(stderr, "HID error: pcb called unimplemented PNG function %s.\n", func); abort() -static HID png_hid; +static pcb_hid_t png_hid; const char *png_cookie = "png HID"; @@ -96,8 +96,8 @@ } color_struct; typedef struct hid_gc_struct { - HID *me_pointer; - EndCapStyle cap; + pcb_hid_t *me_pointer; + pcb_cap_style_t cap; int width; unsigned char r, g, b; color_struct *color; @@ -1127,7 +1127,7 @@ static void png_set_color(hidGC gc, const char *name) { - hidval cval; + pcb_hidval_t cval; if (im == NULL) return; @@ -1168,7 +1168,7 @@ } -static void png_set_line_cap(hidGC gc, EndCapStyle style) +static void png_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -1203,7 +1203,7 @@ } if (lastbrush != gc->brush || need_brush) { - hidval bval; + pcb_hidval_t bval; char name[256]; char type; int r; @@ -1491,12 +1491,12 @@ pcb_uninit_t hid_export_png_init() { - memset(&png_hid, 0, sizeof(HID)); + memset(&png_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&png_hid); common_draw_helpers_init(&png_hid); - png_hid.struct_size = sizeof(HID); + png_hid.struct_size = sizeof(pcb_hid_t); png_hid.name = "png"; png_hid.description = "GIF/JPEG/PNG export"; png_hid.exporter = 1; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 4786) +++ trunk/src_plugins/export_ps/eps.c (revision 4787) @@ -36,7 +36,7 @@ static void eps_destroy_gc(hidGC 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, EndCapStyle style); +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); @@ -50,13 +50,13 @@ /*----------------------------------------------------------------------------*/ typedef struct hid_gc_struct { - EndCapStyle cap; + pcb_cap_style_t cap; Coord width; int color; int erase; } hid_gc_struct; -static HID eps_hid; +static pcb_hid_t eps_hid; static FILE *f = 0; static Coord linewidth = -1; @@ -430,7 +430,7 @@ static void eps_set_color(hidGC gc, const char *name) { static void *cache = 0; - hidval cval; + pcb_hidval_t cval; if (strcmp(name, "erase") == 0) { gc->color = 0xffffff; @@ -458,7 +458,7 @@ gc->color = 0; } -static void eps_set_line_cap(hidGC gc, EndCapStyle style) +static void eps_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -601,12 +601,12 @@ void hid_eps_init() { - memset(&eps_hid, 0, sizeof(HID)); + memset(&eps_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&eps_hid); common_draw_helpers_init(&eps_hid); - eps_hid.struct_size = sizeof(HID); + eps_hid.struct_size = sizeof(pcb_hid_t); eps_hid.name = "eps"; eps_hid.description = "Encapsulated Postscript"; eps_hid.exporter = 1; Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 4786) +++ trunk/src_plugins/export_ps/ps.c (revision 4787) @@ -40,8 +40,8 @@ static void use_gc(hidGC gc); typedef struct hid_gc_struct { - HID *me_pointer; - EndCapStyle cap; + pcb_hid_t *me_pointer; + pcb_cap_style_t cap; Coord width; unsigned char r, g, b; int erase; @@ -1005,7 +1005,7 @@ } } -static void ps_set_line_cap(hidGC gc, EndCapStyle style) +static void ps_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -1550,7 +1550,7 @@ return 0; } -HID_Action hidps_action_list[] = { +pcb_hid_action_t hidps_action_list[] = { {"pscalib", 0, ActionPSCalib} }; @@ -1559,9 +1559,9 @@ #include "dolists.h" -HID ps_hid; +pcb_hid_t ps_hid; static int ps_inited = 0; -void ps_ps_init(HID * hid) +void ps_ps_init(pcb_hid_t * hid) { if (ps_inited) return; @@ -1610,13 +1610,13 @@ pcb_uninit_t hid_export_ps_init() { - memset(&ps_hid, 0, sizeof(HID)); + memset(&ps_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&ps_hid); common_draw_helpers_init(&ps_hid); ps_ps_init(&ps_hid); - ps_hid.struct_size = sizeof(HID); + ps_hid.struct_size = sizeof(pcb_hid_t); ps_hid.name = "ps"; ps_hid.description = "Postscript export"; ps_hid.exporter = 1; Index: trunk/src_plugins/export_ps/ps.h =================================================================== --- trunk/src_plugins/export_ps/ps.h (revision 4786) +++ trunk/src_plugins/export_ps/ps.h (revision 4787) @@ -1,7 +1,7 @@ extern const char *ps_cookie; -extern HID ps_hid; +extern pcb_hid_t ps_hid; extern void ps_hid_export_to_file(FILE *, HID_Attr_Val *); extern void ps_start_file(FILE *); extern void ps_calibrate_1(double, double, int); extern void hid_eps_init(); -void ps_ps_init(HID * hid); +void ps_ps_init(pcb_hid_t * hid); Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 4786) +++ trunk/src_plugins/export_svg/svg.c (revision 4787) @@ -56,20 +56,20 @@ #include "hid_flags.h" -static HID svg_hid; +static pcb_hid_t svg_hid; const char *svg_cookie = "svg HID"; typedef struct hid_gc_struct { - HID *me_pointer; - EndCapStyle cap; + pcb_hid_t *me_pointer; + pcb_cap_style_t cap; int width; char *color; int erase, drill; } hid_gc_struct; -static const char *CAPS(EndCapStyle cap) +static const char *CAPS(pcb_cap_style_t cap) { switch (cap) { case Trace_Cap: @@ -434,7 +434,7 @@ gc->color = pcb_strdup(name); } -static void svg_set_line_cap(hidGC gc, EndCapStyle style) +static void svg_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -695,12 +695,12 @@ pcb_uninit_t hid_export_svg_init() { - memset(&svg_hid, 0, sizeof(HID)); + memset(&svg_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&svg_hid); common_draw_helpers_init(&svg_hid); - svg_hid.struct_size = sizeof(HID); + svg_hid.struct_size = sizeof(pcb_hid_t); svg_hid.name = "svg"; svg_hid.description = "Scalable Vector Graphics export"; svg_hid.exporter = 1; Index: trunk/src_plugins/export_test/export_test.c =================================================================== --- trunk/src_plugins/export_test/export_test.c (revision 4786) +++ trunk/src_plugins/export_test/export_test.c (revision 4787) @@ -328,15 +328,15 @@ hid_parse_command_line(argc, argv); } -HID export_test_hid; +pcb_hid_t export_test_hid; pcb_uninit_t hid_export_test_init() { - memset(&export_test_hid, 0, sizeof(HID)); + memset(&export_test_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&export_test_hid); - export_test_hid.struct_size = sizeof(HID); + export_test_hid.struct_size = sizeof(pcb_hid_t); export_test_hid.name = "export_test"; export_test_hid.description = "Exports a dump of HID calls"; export_test_hid.exporter = 1; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 4786) +++ trunk/src_plugins/export_xy/xy.c (revision 4787) @@ -362,15 +362,15 @@ hid_parse_command_line(argc, argv); } -HID xy_hid; +pcb_hid_t xy_hid; pcb_uninit_t hid_export_xy_init() { - memset(&xy_hid, 0, sizeof(HID)); + memset(&xy_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&xy_hid); - xy_hid.struct_size = sizeof(HID); + xy_hid.struct_size = sizeof(pcb_hid_t); xy_hid.name = "XY"; xy_hid.description = "Exports a XY (centroid)"; xy_hid.exporter = 1; Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 4786) +++ trunk/src_plugins/fontmode/fontmode.c (revision 4787) @@ -219,7 +219,7 @@ return 0; } -HID_Action fontmode_action_list[] = { +pcb_hid_action_t fontmode_action_list[] = { {"FontEdit", 0, FontEdit, fontedit_help, fontedit_syntax} , Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/actions/actions.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/actions/actions.c (revision 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/actions/actions.c (revision 4787) @@ -13,7 +13,7 @@ typedef struct acontext_s acontext_t; struct acontext_s { - HID_Action action; + pcb_hid_action_t action; char *name; gpmi_module *module; acontext_t *next; 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/dialogs/dialogs.c (revision 4787) @@ -2,7 +2,7 @@ #include "src/error.h" #include "dialogs.h" -extern HID *gui; +extern pcb_hid_t *gui; void dialog_log(const char *msg) { 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.c (revision 4787) @@ -21,7 +21,7 @@ h->hid->user_context = data; } -hid_t *hid_gpmi_data_get(HID *h) +hid_t *hid_gpmi_data_get(pcb_hid_t *h) { if (h == NULL) return NULL; @@ -33,7 +33,7 @@ hid_t *h; h = calloc(sizeof(hid_t), 1); - h->hid = calloc(sizeof(HID), 1); + h->hid = calloc(sizeof(pcb_hid_t), 1); common_nogui_init (h->hid); @@ -43,7 +43,7 @@ h->hid->description = pcb_strdup(description); h->hid->exporter = 1; h->hid->gui = 0; - h->hid->struct_size = sizeof(HID); + h->hid->struct_size = sizeof(pcb_hid_t); h->hid->get_export_options = gpmi_hid_get_export_options; h->hid->make_gc = gpmi_hid_make_gc; 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid.h (revision 4787) @@ -22,18 +22,18 @@ /* TODO: these should not be here; GPMI needs to switch over to c99tree! */ #ifndef FROM_PKG -typedef void HID; +typedef void pcb_hid_t; typedef void HID_Attribute; typedef void* hidGC; typedef char* HID_Attr_Val; /* Line or arc ending style */ -typedef enum EndCapStyle_e { +typedef enum pcb_cap_style_t_e { Trace_Cap, /* filled circle (trace drawing) */ Square_Cap, /* rectangular lines (square pad) */ Round_Cap, /* round pins or round-ended pads, thermals */ Beveled_Cap /* octagon pins or bevel-cornered pads */ -} EndCapStyle; +} pcb_cap_style_t; typedef void *pcb_polygon_t; typedef void *pcb_box_t; @@ -44,7 +44,7 @@ int attr_num; HID_Attribute *attr; hid_attr_type_t *type; - HID *hid; + pcb_hid_t *hid; HID_Attr_Val *result; hidGC new_gc; } hid_t; @@ -83,7 +83,7 @@ void hid_gpmi_data_set(hid_t *h, void *data); /* For internal use */ -hid_t *hid_gpmi_data_get(HID *h); +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); 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.c (revision 4787) @@ -96,7 +96,7 @@ gpmi_event(h->module, HIDE_set_color, h, gc, name); } -void gpmi_hid_set_line_cap(hidGC gc, EndCapStyle style) +void gpmi_hid_set_line_cap(hidGC 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); 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_callbacks.h (revision 4787) @@ -6,7 +6,7 @@ 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, EndCapStyle style); +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); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_events.h =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_events.h (revision 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/hid/hid_events.h (revision 4787) @@ -18,7 +18,7 @@ gpmi_define_event(HIDE_set_color)(void *hid, void *gc, const char *name); /* PCB callback events for drawing: change drawing line cap style*/ -gpmi_define_event(HIDE_set_line_cap)(void *hid, void *gc, EndCapStyle style); +gpmi_define_event(HIDE_set_line_cap)(void *hid, void *gc, pcb_cap_style_t style); /* PCB callback events for drawing: change drawing line width */ gpmi_define_event(HIDE_set_line_width)(void *hid, void *gc, int width); 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/debug_draw.c (revision 4787) @@ -4,7 +4,7 @@ #include "src/hid.h" #include "src/error.h" -static HID *ddh = NULL; +static pcb_hid_t *ddh = NULL; #define need_ddh if (ddh == NULL) return 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/draw.c (revision 4787) @@ -6,7 +6,7 @@ #define setup(func) \ hidGC gc = ctx->gc; \ - HID *hid = ctx->hid; \ + 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 @@ -17,7 +17,7 @@ hid->set_color(gc, name); } -/*void set_line_cap(dctx_t *ctx, EndCapStyle style_);*/ +/*void set_line_cap(dctx_t *ctx, pcb_cap_style_t style_);*/ void draw_set_line_width(dctx_t *ctx, int width) { setup("draw_set_line_width"); 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 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/layout.h (revision 4787) @@ -238,7 +238,7 @@ /* Debug draw style: set drawing color */ void draw_set_color(dctx_t *ctx, const char *name); -/*void set_line_cap(dctx_t *ctx, EndCapStyle style_);*/ +/*void set_line_cap(dctx_t *ctx, pcb_cap_style_t style_);*/ /* Debug draw style: set line width */ void draw_set_line_width(dctx_t *ctx, int width); Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_plugin.c (revision 4787) @@ -112,7 +112,7 @@ static void register_actions() { - HID_Action act; + pcb_hid_action_t act; act.name = "gpmi_scripts"; act.need_coord_msg = NULL; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c (revision 4786) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/manage_scripts.c (revision 4787) @@ -11,7 +11,7 @@ #include "src/hid_attrib.h" -extern HID *gui; +extern pcb_hid_t *gui; #define attr_make_label(attr, name_, help_) \ do { \ Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 4786) +++ trunk/src_plugins/hid_batch/batch.c (revision 4787) @@ -97,7 +97,7 @@ return 0; } -HID_Action batch_action_list[] = { +pcb_hid_action_t batch_action_list[] = { {"PCBChanged", 0, PCBChanged} , {"RouteStylesChanged", 0, nop} @@ -155,7 +155,7 @@ batch_end(); } -static void batch_do_exit(HID *hid) +static void batch_do_exit(pcb_hid_t *hid) { batch_stay = 0; } @@ -195,7 +195,7 @@ { } -static void batch_set_line_cap(hidGC gc, EndCapStyle style) +static void batch_set_line_cap(hidGC gc, pcb_cap_style_t style) { } @@ -258,38 +258,38 @@ { } -static hidval batch_add_timer(void (*func) (hidval user_data), unsigned long milliseconds, hidval user_data) +static pcb_hidval_t batch_add_timer(void (*func) (pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { - hidval rv; + pcb_hidval_t rv; rv.lval = 0; return rv; } -static void batch_stop_timer(hidval timer) +static void batch_stop_timer(pcb_hidval_t timer) { } -hidval -batch_watch_file(int fd, unsigned int condition, void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), - hidval user_data) +pcb_hidval_t +batch_watch_file(int fd, unsigned int condition, void (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), + pcb_hidval_t user_data) { - hidval ret; + pcb_hidval_t ret; ret.ptr = NULL; return ret; } -void batch_unwatch_file(hidval data) +void batch_unwatch_file(pcb_hidval_t data) { } -static hidval batch_add_block_hook(void (*func) (hidval data), hidval user_data) +static pcb_hidval_t batch_add_block_hook(void (*func) (pcb_hidval_t data), pcb_hidval_t user_data) { - hidval ret; + pcb_hidval_t ret; ret.ptr = NULL; return ret; } -static void batch_stop_block_hook(hidval mlpoll) +static void batch_stop_block_hook(pcb_hidval_t mlpoll) { } @@ -337,16 +337,16 @@ #include "dolists.h" -static HID batch_hid; +static pcb_hid_t batch_hid; pcb_uninit_t hid_hid_batch_init() { - memset(&batch_hid, 0, sizeof(HID)); + memset(&batch_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&batch_hid); common_draw_helpers_init(&batch_hid); - batch_hid.struct_size = sizeof(HID); + batch_hid.struct_size = sizeof(pcb_hid_t); batch_hid.name = "batch"; batch_hid.description = "Batch-mode GUI for non-interactive use."; batch_hid.gui = 1; Index: trunk/src_plugins/hid_gtk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gtkhid-gdk.c (revision 4787) @@ -12,7 +12,7 @@ #include "hid_helper.h" #include "hid_color.h" -extern HID ghid_hid; +extern pcb_hid_t ghid_hid; /* Sets priv->u_gc to the "right" GC to use (wrt mask or window) */ @@ -44,7 +44,7 @@ typedef struct hid_gc_struct { - HID *me_pointer; + pcb_hid_t *me_pointer; GdkGC *gc; gchar *colorname; @@ -458,7 +458,7 @@ void ghid_set_color(hidGC gc, const char *name) { static void *cache = 0; - hidval cval; + pcb_hidval_t cval; if (name == NULL) { fprintf(stderr, "ghid_set_color(): name = NULL, setting to magenta\n"); @@ -516,7 +516,7 @@ } } -void ghid_set_line_cap(hidGC gc, EndCapStyle style) +void ghid_set_line_cap(hidGC gc, pcb_cap_style_t style) { render_priv *priv = gport->render_priv; @@ -570,7 +570,7 @@ gc->gc = gdk_gc_new(window); ghid_set_color(gc, gc->colorname); ghid_set_line_width(gc, gc->width); - ghid_set_line_cap(gc, (EndCapStyle) gc->cap); + ghid_set_line_cap(gc, (pcb_cap_style_t) gc->cap); ghid_set_draw_xor(gc, gc->xor_mask); gdk_gc_set_clip_origin(gc->gc, 0, 0); } @@ -1233,7 +1233,7 @@ return pixmap; } -HID *ghid_request_debug_draw(void) +pcb_hid_t *ghid_request_debug_draw(void) { /* No special setup requirements, drawing goes into * the backing pixmap. */ Index: trunk/src_plugins/hid_gtk/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gtkhid-gl.c (revision 4787) @@ -25,7 +25,7 @@ #include "hid/common/hidgl.h" #include "hid_draw_helpers.h" -extern HID ghid_hid; +extern pcb_hid_t ghid_hid; static hidGC current_gc = NULL; @@ -55,7 +55,7 @@ typedef struct hid_gc_struct { - HID *me_pointer; + pcb_hid_t *me_pointer; const char *colorname; double alpha_mult; @@ -333,7 +333,7 @@ { render_priv *priv = gport->render_priv; static void *cache = NULL; - hidval cval; + pcb_hidval_t cval; ColorCache *cc; double r, g, b, a; @@ -433,7 +433,7 @@ set_gl_color_for_gc(gc); } -void ghid_set_line_cap(hidGC gc, EndCapStyle style) +void ghid_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -1083,7 +1083,7 @@ return pixmap; } -HID *ghid_request_debug_draw(void) +pcb_hid_t *ghid_request_debug_draw(void) { GHidPort *port = gport; GtkWidget *widget = port->drawing_area; Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 4787) @@ -365,9 +365,9 @@ } typedef struct { - void (*func) (hidval); + void (*func) (pcb_hidval_t); guint id; - hidval user_data; + pcb_hidval_t user_data; } GuiTimer; /* We need a wrapper around the hid timer because a gtk timer needs @@ -380,10 +380,10 @@ return FALSE; /* Turns timer off */ } -hidval ghid_add_timer(void (*func) (hidval user_data), unsigned long milliseconds, hidval user_data) +pcb_hidval_t ghid_add_timer(void (*func) (pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { GuiTimer *timer = g_new0(GuiTimer, 1); - hidval ret; + pcb_hidval_t ret; timer->func = func; timer->user_data = user_data; @@ -392,7 +392,7 @@ return ret; } -void ghid_stop_timer(hidval timer) +void ghid_stop_timer(pcb_hidval_t timer) { void *ptr = timer.ptr; @@ -401,8 +401,8 @@ } typedef struct { - void (*func) (hidval, int, unsigned int, hidval); - hidval user_data; + void (*func) (pcb_hidval_t, int, unsigned int, pcb_hidval_t); + pcb_hidval_t user_data; int fd; GIOChannel *channel; gint id; @@ -413,7 +413,7 @@ static gboolean ghid_watch(GIOChannel * source, GIOCondition condition, gpointer data) { unsigned int pcb_condition = 0; - hidval x; + pcb_hidval_t x; GuiWatch *watch = (GuiWatch *) data; if (condition & G_IO_IN) @@ -432,12 +432,12 @@ return TRUE; /* Leave watch on */ } -hidval -ghid_watch_file(int fd, unsigned int condition, void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), - hidval user_data) +pcb_hidval_t +ghid_watch_file(int fd, unsigned int condition, void (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), + pcb_hidval_t user_data) { GuiWatch *watch = g_new0(GuiWatch, 1); - hidval ret; + pcb_hidval_t ret; unsigned int glib_condition = 0; if (condition & PCB_WATCH_READABLE) @@ -459,7 +459,7 @@ return ret; } -void ghid_unwatch_file(hidval data) +void ghid_unwatch_file(pcb_hidval_t data) { GuiWatch *watch = (GuiWatch *) data.ptr; @@ -470,8 +470,8 @@ typedef struct { GSource source; - void (*func) (hidval user_data); - hidval user_data; + void (*func) (pcb_hidval_t user_data); + pcb_hidval_t user_data; } BlockHookSource; static gboolean ghid_block_hook_prepare(GSource * source, gint * timeout); @@ -487,7 +487,7 @@ static gboolean ghid_block_hook_prepare(GSource * source, gint * timeout) { - hidval data = ((BlockHookSource *) source)->user_data; + pcb_hidval_t data = ((BlockHookSource *) source)->user_data; ((BlockHookSource *) source)->func(data); return FALSE; } @@ -502,9 +502,9 @@ return FALSE; } -static hidval ghid_add_block_hook(void (*func) (hidval data), hidval user_data) +static pcb_hidval_t ghid_add_block_hook(void (*func) (pcb_hidval_t data), pcb_hidval_t user_data) { - hidval ret; + pcb_hidval_t ret; BlockHookSource *source; source = (BlockHookSource *) g_source_new(&ghid_block_hook_funcs, sizeof(BlockHookSource)); @@ -518,7 +518,7 @@ return ret; } -static void ghid_stop_block_hook(hidval mlpoll) +static void ghid_stop_block_hook(pcb_hidval_t mlpoll) { GSource *source = (GSource *) mlpoll.ptr; g_source_destroy(source); @@ -992,7 +992,7 @@ /* ---------------------------------------------------------------------- */ -HID_DRC_GUI ghid_drc_gui = { +pcb_hid_drc_gui_t ghid_drc_gui = { 1, /* log_drc_overview */ 0, /* log_drc_details */ ghid_drc_window_reset_message, @@ -1375,9 +1375,9 @@ static int Print(int argc, const char **argv, Coord x, Coord y) { - HID **hids; + pcb_hid_t **hids; int i; - HID *printer = NULL; + pcb_hid_t *printer = NULL; hids = hid_enumerate(); for (i = 0; hids[i]; i++) { @@ -1427,7 +1427,7 @@ static int PrintCalibrate(int argc, const char **argv, Coord x, Coord y) { - HID *printer = hid_find_printer(); + pcb_hid_t *printer = hid_find_printer(); printer->calibrate(0.0, 0.0); if (gui->attribute_dialog(printer_calibrate_attrs, 3, @@ -1916,7 +1916,7 @@ return 0; } -HID_Action ghid_main_action_list[] = { +pcb_hid_action_t ghid_main_action_list[] = { {"About", 0, About, about_help, about_syntax} , {"Benchmark", 0, Benchmark} @@ -1985,7 +1985,7 @@ #include #endif -HID ghid_hid; +pcb_hid_t ghid_hid; static void init_conf_watch(conf_hid_callbacks_t *cbs, const char *path, void (*func)(conf_native_t *)) { @@ -2043,12 +2043,12 @@ printf("\"Share\" installation path is \"%s\"\n", "share_dir_todo12"); #endif - memset(&ghid_hid, 0, sizeof(HID)); + memset(&ghid_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&ghid_hid); common_draw_helpers_init(&ghid_hid); - ghid_hid.struct_size = sizeof(HID); + ghid_hid.struct_size = sizeof(pcb_hid_t); ghid_hid.name = "gtk"; ghid_hid.description = "Gtk - The Gimp Toolkit"; ghid_hid.gui = 1; Index: trunk/src_plugins/hid_gtk/gui-dialog-print.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-dialog-print.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gui-dialog-print.c (revision 4787) @@ -308,12 +308,12 @@ -static void exporter_clicked_cb(GtkButton * button, HID * exporter) +static void exporter_clicked_cb(GtkButton * button, pcb_hid_t * exporter) { ghid_dialog_print(exporter); } -void ghid_dialog_print(HID * hid) +void ghid_dialog_print(pcb_hid_t * hid) { HID_Attribute *attr; int n = 0; @@ -359,7 +359,7 @@ GtkWidget *vbox, *button; GHidPort *out = &ghid_port; int i; - HID **hids; + pcb_hid_t **hids; gboolean no_exporter = TRUE; export_dialog = gtk_dialog_new_with_buttons(_("PCB Export Layout"), Index: trunk/src_plugins/hid_gtk/gui-log-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-log-window.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gui-log-window.c (revision 4787) @@ -193,7 +193,7 @@ return 0; } -HID_Action ghid_log_action_list[] = { +pcb_hid_action_t ghid_log_action_list[] = { {"LogShowOnAppend", 0, GhidLogShowOnAppend, logshowonappend_help, logshowonappend_syntax} , Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4787) @@ -950,7 +950,7 @@ return 0; } -HID_Action ghid_netlist_action_list[] = { +pcb_hid_action_t ghid_netlist_action_list[] = { {"NetlistChanged", 0, GhidNetlistChanged, netlistchanged_help, netlistchanged_syntax} , Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4786) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 4787) @@ -1507,7 +1507,7 @@ gtkhid_end(); } -void ghid_do_exit(HID *hid) +void ghid_do_exit(pcb_hid_t *hid) { gtk_main_quit(); } @@ -1653,7 +1653,7 @@ } -HID_Action gtk_topwindow_action_list[] = { +pcb_hid_action_t gtk_topwindow_action_list[] = { {"LayersChanged", 0, LayersChanged, layerschanged_help, layerschanged_syntax} , @@ -1754,7 +1754,7 @@ /* ------------------------------------------------------------ */ -HID_Action ghid_menu_action_list[] = { +pcb_hid_action_t ghid_menu_action_list[] = { {"AdjustStyle", 0, AdjustStyle, adjuststyle_help, adjuststyle_syntax} , {"EditLayerGroups", 0, EditLayerGroups, editlayergroups_help, editlayergroups_syntax} Index: trunk/src_plugins/hid_gtk/gui.h =================================================================== --- trunk/src_plugins/hid_gtk/gui.h (revision 4786) +++ trunk/src_plugins/hid_gtk/gui.h (revision 4787) @@ -191,7 +191,7 @@ */ void ghid_parse_arguments(gint * argc, gchar *** argv); void ghid_do_export(HID_Attr_Val * options); -void ghid_do_exit(HID *hid); +void ghid_do_exit(pcb_hid_t *hid); void ghid_create_pcb_widgets(void); void ghid_window_set_name_label(gchar * name); @@ -283,7 +283,7 @@ /* gui-dialog-print.c */ void ghid_dialog_export(void); -void ghid_dialog_print(HID *); +void ghid_dialog_print(pcb_hid_t *); int ghid_attribute_dialog(HID_Attribute *, int, HID_Attr_Val *, const char *, const char *); @@ -412,7 +412,7 @@ void ghid_destroy_gc(hidGC); void ghid_use_mask(int use_it); void ghid_set_color(hidGC gc, const char *name); -void ghid_set_line_cap(hidGC gc, EndCapStyle style); +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); @@ -434,7 +434,7 @@ void ghid_port_drawing_realize_cb(GtkWidget *, gpointer); gboolean ghid_pinout_preview_expose(GtkWidget * widget, GdkEventExpose * ev); GdkPixmap *ghid_render_pixmap(int cx, int cy, double zoom, int width, int height, int depth); -HID *ghid_request_debug_draw(void); +pcb_hid_t *ghid_request_debug_draw(void); void ghid_flush_debug_draw(void); void ghid_finish_debug_draw(void); pcb_bool ghid_event_to_pcb_coords(int event_x, int event_y, Coord * pcb_x, Coord * pcb_y); Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 4786) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 4787) @@ -890,7 +890,7 @@ static int Print(int argc, const char **argv, Coord x, Coord y) { HID_Attribute *opts; - HID *printer; + pcb_hid_t *printer; HID_Attr_Val *vals; int n; @@ -934,7 +934,7 @@ static int PrintCalibrate(int argc, const char **argv, Coord x, Coord y) { - HID *printer = hid_find_printer(); + pcb_hid_t *printer = hid_find_printer(); printer->calibrate(0.0, 0.0); if (gui->attribute_dialog(printer_calibrate_attrs, 3, printer_calibrate_values, @@ -959,7 +959,7 @@ { static Widget selector = 0; HID_Attribute *opts; - HID *printer, **hids; + pcb_hid_t *printer, **hids; HID_Attr_Val *vals; int n, i, count; Widget prev = 0; @@ -1904,7 +1904,7 @@ /* ------------------------------------------------------------ */ -HID_Action lesstif_dialog_action_list[] = { +pcb_hid_action_t lesstif_dialog_action_list[] = { {"Load", 0, Load, load_help, load_syntax} , Index: trunk/src_plugins/hid_lesstif/library.c =================================================================== --- trunk/src_plugins/hid_lesstif/library.c (revision 4786) +++ trunk/src_plugins/hid_lesstif/library.c (revision 4787) @@ -181,7 +181,7 @@ } } -HID_Action lesstif_library_action_list[] = { +pcb_hid_action_t lesstif_library_action_list[] = { {"LibraryChanged", 0, LibraryChanged, librarychanged_help, librarychanged_syntax} , Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 4786) +++ trunk/src_plugins/hid_lesstif/main.c (revision 4787) @@ -64,16 +64,16 @@ #define UUNIT conf_core.editor.grid_unit->allow typedef struct hid_gc_struct { - HID *me_pointer; + pcb_hid_t *me_pointer; Pixel color; char *colorname; int width; - EndCapStyle cap; + pcb_cap_style_t cap; char xor_set; char erase; } hid_gc_struct; -static HID lesstif_hid; +static pcb_hid_t lesstif_hid; #define CRASH(func) fprintf(stderr, "HID error: pcb called unimplemented GUI function %s\n", func), abort() @@ -869,7 +869,7 @@ return 0; } -HID_Action lesstif_main_action_list[] = { +pcb_hid_action_t lesstif_main_action_list[] = { {"PCBChanged", 0, PCBChanged, pcbchanged_help, pcbchanged_syntax} , @@ -1863,7 +1863,7 @@ lesstif_end(); } -static void lesstif_do_exit(HID *hid) +static void lesstif_do_exit(pcb_hid_t *hid) { XtAppSetExitFlag(app_context); } @@ -1870,7 +1870,7 @@ void lesstif_uninit_menu(void); -static void lesstif_uninit(HID *hid) +static void lesstif_uninit(pcb_hid_t *hid) { if (lesstif_hid_inited) { lesstif_uninit_menu(); @@ -2918,7 +2918,7 @@ static void lesstif_set_color(hidGC gc, const char *name) { static void *cache = 0; - hidval cval; + pcb_hidval_t cval; static XColor color, exact_color; if (!display) @@ -3026,7 +3026,7 @@ } } -static void lesstif_set_line_cap(hidGC gc, EndCapStyle style) +static void lesstif_set_line_cap(hidGC gc, pcb_cap_style_t style) { gc->cap = style; } @@ -3311,8 +3311,8 @@ } typedef struct { - void (*func) (hidval); - hidval user_data; + void (*func) (pcb_hidval_t); + pcb_hidval_t user_data; XtIntervalId id; } TimerStruct; @@ -3323,10 +3323,10 @@ free(ts); } -static hidval lesstif_add_timer(void (*func) (hidval user_data), unsigned long milliseconds, hidval user_data) +static pcb_hidval_t lesstif_add_timer(void (*func) (pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { TimerStruct *t; - hidval rv; + pcb_hidval_t rv; t = (TimerStruct *) malloc(sizeof(TimerStruct)); rv.ptr = t; t->func = func; @@ -3335,7 +3335,7 @@ return rv; } -static void lesstif_stop_timer(hidval hv) +static void lesstif_stop_timer(pcb_hidval_t hv) { TimerStruct *ts = (TimerStruct *) hv.ptr; XtRemoveTimeOut(ts->id); @@ -3344,8 +3344,8 @@ typedef struct { - void (*func) (hidval, int, unsigned int, hidval); - hidval user_data; + void (*func) (pcb_hidval_t, int, unsigned int, pcb_hidval_t); + pcb_hidval_t user_data; int fd; XtInputId id; } WatchStruct; @@ -3357,7 +3357,7 @@ unsigned int pcb_condition = 0; struct pollfd fds; short condition; - hidval x; + pcb_hidval_t x; WatchStruct *watch = (WatchStruct *) client_data; fds.fd = watch->fd; @@ -3381,12 +3381,12 @@ return; } -hidval +pcb_hidval_t lesstif_watch_file(int fd, unsigned int condition, - void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), hidval user_data) + void (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { WatchStruct *watch = (WatchStruct *) malloc(sizeof(WatchStruct)); - hidval ret; + pcb_hidval_t ret; unsigned int xt_condition = 0; if (condition & PCB_WATCH_READABLE) @@ -3407,7 +3407,7 @@ return ret; } -void lesstif_unwatch_file(hidval data) +void lesstif_unwatch_file(pcb_hidval_t data) { WatchStruct *watch = (WatchStruct *) data.ptr; XtRemoveInput(watch->id); @@ -3416,8 +3416,8 @@ typedef struct { XtBlockHookId id; - void (*func) (hidval user_data); - hidval user_data; + void (*func) (pcb_hidval_t user_data); + pcb_hidval_t user_data; } BlockHookStruct; static void lesstif_block_hook_cb(XtPointer user_data); @@ -3428,9 +3428,9 @@ block_hook->func(block_hook->user_data); } -static hidval lesstif_add_block_hook(void (*func) (hidval data), hidval user_data) +static pcb_hidval_t lesstif_add_block_hook(void (*func) (pcb_hidval_t data), pcb_hidval_t user_data) { - hidval ret; + pcb_hidval_t ret; BlockHookStruct *block_hook = (BlockHookStruct *) malloc(sizeof(BlockHookStruct)); block_hook->func = func; @@ -3442,7 +3442,7 @@ return ret; } -static void lesstif_stop_block_hook(hidval mlpoll) +static void lesstif_stop_block_hook(pcb_hidval_t mlpoll) { BlockHookStruct *block_hook = (BlockHookStruct *) mlpoll.ptr; XtRemoveBlockHook(block_hook->id); @@ -3721,7 +3721,7 @@ return progress_cancelled; } -static HID *lesstif_request_debug_draw(void) +static pcb_hid_t *lesstif_request_debug_draw(void) { /* Send drawing to the backing pixmap */ pixmap = main_pixmap; @@ -3762,12 +3762,12 @@ pcb_uninit_t hid_hid_lesstif_init() { - memset(&lesstif_hid, 0, sizeof(HID)); + memset(&lesstif_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&lesstif_hid); common_draw_helpers_init(&lesstif_hid); - lesstif_hid.struct_size = sizeof(HID); + lesstif_hid.struct_size = sizeof(pcb_hid_t); lesstif_hid.name = "lesstif"; lesstif_hid.description = "LessTif - a Motif clone for X/Unix"; lesstif_hid.gui = 1; Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 4786) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 4787) @@ -525,7 +525,7 @@ /*-----------------------------------------------------------------------------*/ -HID_Action lesstif_menu_action_list[] = { +pcb_hid_action_t lesstif_menu_action_list[] = { {"GetXY", "", GetXY, getxy_help, getxy_syntax}, {"LayersChanged", 0, LayersChanged, Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4786) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4787) @@ -431,7 +431,7 @@ XtManageChild(netlist_dialog); } -HID_Action lesstif_netlist_action_list[] = { +pcb_hid_action_t lesstif_netlist_action_list[] = { {"NetlistChanged", 0, LesstifNetlistChanged, netlistchanged_help, netlistchanged_syntax}, {"NetlistShow", 0, LesstifNetlistShow, Index: trunk/src_plugins/hid_lesstif/styles.c =================================================================== --- trunk/src_plugins/hid_lesstif/styles.c (revision 4786) +++ trunk/src_plugins/hid_lesstif/styles.c (revision 4787) @@ -426,7 +426,7 @@ update_style_buttons(); } -HID_Action lesstif_styles_action_list[] = { +pcb_hid_action_t lesstif_styles_action_list[] = { {"AdjustStyle", 0, AdjustStyle, adjuststyle_help, adjuststyle_syntax} , Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 4786) +++ trunk/src_plugins/hid_remote/remote.c (revision 4787) @@ -22,7 +22,7 @@ static const char *remote_cookie = "remote HID"; -static HID remote_hid; +static pcb_hid_t remote_hid; typedef struct hid_gc_struct { int nop; @@ -56,7 +56,7 @@ return 0; } -HID_Action remote_action_list[] = { +pcb_hid_action_t remote_action_list[] = { {"PCBChanged", 0, PCBChanged} , {"RouteStylesChanged", 0, nop} @@ -101,7 +101,7 @@ exit(1); } -static void remote_do_exit(HID *hid) +static void remote_do_exit(pcb_hid_t *hid) { remote_stay = 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, EndCapStyle style) +static void remote_set_line_cap(hidGC gc, pcb_cap_style_t style) { int idx = gc2idx(gc); int max = strlen(cap_style_names); @@ -293,38 +293,38 @@ { } -static hidval remote_add_timer(void (*func) (hidval user_data), unsigned long milliseconds, hidval user_data) +static pcb_hidval_t remote_add_timer(void (*func) (pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { - hidval rv; + pcb_hidval_t rv; rv.lval = 0; return rv; } -static void remote_stop_timer(hidval timer) +static void remote_stop_timer(pcb_hidval_t timer) { } -hidval -remote_watch_file(int fd, unsigned int condition, void (*func) (hidval watch, int fd, unsigned int condition, hidval user_data), - hidval user_data) +pcb_hidval_t +remote_watch_file(int fd, unsigned int condition, void (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), + pcb_hidval_t user_data) { - hidval ret; + pcb_hidval_t ret; ret.ptr = NULL; return ret; } -void remote_unwatch_file(hidval data) +void remote_unwatch_file(pcb_hidval_t data) { } -static hidval remote_add_block_hook(void (*func) (hidval data), hidval user_data) +static pcb_hidval_t remote_add_block_hook(void (*func) (pcb_hidval_t data), pcb_hidval_t user_data) { - hidval ret; + pcb_hidval_t ret; ret.ptr = NULL; return ret; } -static void remote_stop_block_hook(hidval mlpoll) +static void remote_stop_block_hook(pcb_hidval_t mlpoll) { } @@ -375,12 +375,12 @@ pcb_uninit_t hid_hid_remote_init() { - memset(&remote_hid, 0, sizeof(HID)); + memset(&remote_hid, 0, sizeof(pcb_hid_t)); common_nogui_init(&remote_hid); common_draw_helpers_init(&remote_hid); - remote_hid.struct_size = sizeof(HID); + remote_hid.struct_size = sizeof(pcb_hid_t); remote_hid.name = "remote"; remote_hid.description = "remote-mode GUI for non-interactive use."; remote_hid.gui = 1; Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 4786) +++ trunk/src_plugins/import_dsn/dsn.c (revision 4787) @@ -159,7 +159,7 @@ return 0; } -HID_Action dsn_action_list[] = { +pcb_hid_action_t dsn_action_list[] = { {"LoadDsnFrom", 0, ActionLoadDsnFrom, load_dsn_help, load_dsn_syntax} }; Index: trunk/src_plugins/import_hyp/import_hyp.c =================================================================== --- trunk/src_plugins/import_hyp/import_hyp.c (revision 4786) +++ trunk/src_plugins/import_hyp/import_hyp.c (revision 4787) @@ -73,7 +73,7 @@ return 0; } -HID_Action hyp_action_list[] = { +pcb_hid_action_t hyp_action_list[] = { {"LoadhypFrom", 0, ActionLoadhypFrom, load_hyp_help, load_hyp_syntax} }; Index: trunk/src_plugins/import_sch/import_sch.c =================================================================== --- trunk/src_plugins/import_sch/import_sch.c (revision 4786) +++ trunk/src_plugins/import_sch/import_sch.c (revision 4787) @@ -446,7 +446,7 @@ static const char *import_sch_cookie = "import_sch plugin"; -HID_Action import_sch_action_list[] = { +pcb_hid_action_t import_sch_action_list[] = { {"Import", 0, ActionImport, import_help, import_syntax} }; Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4786) +++ trunk/src_plugins/jostle/jostle.c (revision 4787) @@ -83,7 +83,7 @@ PLINE *pl; VNODE *v; POLYAREA *p; - HID *ddraw; + pcb_hid_t *ddraw; hidGC ddgc; #ifndef DEBUG_POLYAREA @@ -541,7 +541,7 @@ return 0; } -static HID_Action jostle_action_list[] = { +static pcb_hid_action_t jostle_action_list[] = { {"jostle", NULL, jostle, "Move lines out of the way", jostle_syntax}, }; Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 4786) +++ trunk/src_plugins/loghid/hid-logger.c (revision 4787) @@ -11,8 +11,8 @@ * Just having one instance for now. Keeping it * local is fine. */ -static HID logging_hid_; -static HID *delegatee_ = NULL; +static pcb_hid_t logging_hid_; +static pcb_hid_t *delegatee_ = NULL; static FILE *out_ = NULL; static HID_Attribute *log_get_export_options(int *ret) { @@ -21,7 +21,7 @@ return result; } -static void log_do_exit(HID *hid) { +static void log_do_exit(pcb_hid_t *hid) { pcb_fprintf(out_, "do_exit()\n"); delegatee_->do_exit(delegatee_); } @@ -76,7 +76,7 @@ delegatee_->set_color(gc, name); } -static void log_set_line_cap(hidGC gc, EndCapStyle style) { +static void log_set_line_cap(hidGC gc, pcb_cap_style_t style) { const char *txt = "unknown"; switch (style) { ENUM_LOG_TEXT(Trace_Cap); @@ -183,7 +183,7 @@ delegatee_->beep(); } -HID *create_log_hid(FILE *log_out, HID *delegatee) { +pcb_hid_t *create_log_hid(FILE *log_out, pcb_hid_t *delegatee) { out_ = log_out; delegatee_ = delegatee; Index: trunk/src_plugins/loghid/hid-logger.h =================================================================== --- trunk/src_plugins/loghid/hid-logger.h (revision 4786) +++ trunk/src_plugins/loghid/hid-logger.h (revision 4787) @@ -9,6 +9,6 @@ * Create a delegating HID that sends all calls to the * delegatee but also logs the calls. */ -HID *create_log_hid(FILE *log_out, HID *delegatee); +pcb_hid_t *create_log_hid(FILE *log_out, pcb_hid_t *delegatee); #endif Index: trunk/src_plugins/loghid/loghid.c =================================================================== --- trunk/src_plugins/loghid/loghid.c (revision 4786) +++ trunk/src_plugins/loghid/loghid.c (revision 4787) @@ -46,7 +46,7 @@ static void loghid_parse_arguments_real(int *argc, char ***argv, int is_gui) { - HID *target; + pcb_hid_t *target; const char *target_name; hid_register_attributes(loghid_attribute_list, NUM_OPTIONS, loghid_cookie, 0); @@ -104,16 +104,16 @@ { } -static HID loghid_gui; -static HID loghid_exp; +static pcb_hid_t loghid_gui; +static pcb_hid_t loghid_exp; pcb_uninit_t hid_loghid_init(void) { - memset(&loghid_gui, 0, sizeof(HID)); - memset(&loghid_exp, 0, sizeof(HID)); + memset(&loghid_gui, 0, sizeof(pcb_hid_t)); + memset(&loghid_exp, 0, sizeof(pcb_hid_t)); /* gui version */ - loghid_gui.struct_size = sizeof(HID); + loghid_gui.struct_size = sizeof(pcb_hid_t); loghid_gui.name = "loghid-gui"; loghid_gui.description = "log GUI HID calls"; loghid_gui.gui = 1; @@ -124,7 +124,7 @@ hid_register_hid(&loghid_gui); /* export version */ - loghid_exp.struct_size = sizeof(HID); + loghid_exp.struct_size = sizeof(pcb_hid_t); loghid_exp.name = "loghid-exp"; loghid_exp.description = "log export HID calls"; loghid_exp.exporter = 1; Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 4786) +++ trunk/src_plugins/oldactions/oldactions.c (revision 4787) @@ -281,7 +281,7 @@ } -HID_Action oldactions_action_list[] = { +pcb_hid_action_t oldactions_action_list[] = { {"DumpLibrary", 0, ActionDumpLibrary, dumplibrary_help, dumplibrary_syntax}, {"Bell", 0, ActionBell, Index: trunk/src_plugins/polycombine/polycombine.c =================================================================== --- trunk/src_plugins/polycombine/polycombine.c (revision 4786) +++ trunk/src_plugins/polycombine/polycombine.c (revision 4787) @@ -339,7 +339,7 @@ return 0; } -static HID_Action polycombine_action_list[] = { +static pcb_hid_action_t polycombine_action_list[] = { {"PolyCombine", "???", polycombine, NULL, NULL} }; Index: trunk/src_plugins/polystitch/polystitch.c =================================================================== --- trunk/src_plugins/polystitch/polystitch.c (revision 4786) +++ trunk/src_plugins/polystitch/polystitch.c (revision 4787) @@ -240,7 +240,7 @@ return 0; } -static HID_Action polystitch_action_list[] = { +static pcb_hid_action_t polystitch_action_list[] = { {"PolyStitch", "Select a corner on the inner polygon", polystitch, NULL, NULL} }; Index: trunk/src_plugins/propedit/propedit.c =================================================================== --- trunk/src_plugins/propedit/propedit.c (revision 4786) +++ trunk/src_plugins/propedit/propedit.c (revision 4787) @@ -72,7 +72,7 @@ static const char *propedit_cookie = "propedit"; -HID_Action propedit_action_list[] = { +pcb_hid_action_t propedit_action_list[] = { {"propedit", 0, propedit_action, propedit_help, propedit_syntax}, {"propset", 0, propset_action, Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4786) +++ trunk/src_plugins/puller/puller.c (revision 4787) @@ -2379,7 +2379,7 @@ /* */ /*****************************************************************************/ -HID_Action puller_action_list[] = { +pcb_hid_action_t puller_action_list[] = { {"Puller", "Click on a line-arc intersection or line segment", Puller, puller_help, puller_syntax} , Index: trunk/src_plugins/query/query_act.c =================================================================== --- trunk/src_plugins/query/query_act.c (revision 4786) +++ trunk/src_plugins/query/query_act.c (revision 4787) @@ -166,7 +166,7 @@ return -1; } -HID_Action query_action_list[] = { +pcb_hid_action_t query_action_list[] = { {"query", NULL, query_action, query_action_help, query_action_syntax} }; Index: trunk/src_plugins/renumber/renumber.c =================================================================== --- trunk/src_plugins/renumber/renumber.c (revision 4786) +++ trunk/src_plugins/renumber/renumber.c (revision 4787) @@ -358,7 +358,7 @@ static const char *renumber_cookie = "renumber plugin"; -HID_Action renumber_action_list[] = { +pcb_hid_action_t renumber_action_list[] = { {"Renumber", 0, ActionRenumber, renumber_help, renumber_syntax}, {"RenumberBlock", NULL, action_renumber_block, Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4786) +++ trunk/src_plugins/report/report.c (revision 4787) @@ -891,7 +891,7 @@ return 1; } -HID_Action report_action_list[] = { +pcb_hid_action_t report_action_list[] = { {"ReportObject", "Click on an object", ReportDialog, reportdialog_help, reportdialog_syntax} , Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 4786) +++ trunk/src_plugins/shand_cmd/command.c (revision 4787) @@ -364,7 +364,7 @@ /* --------------------------------------------------------------------------- */ -HID_Action shand_cmd_action_list[] = { +pcb_hid_action_t shand_cmd_action_list[] = { {"h", 0, CommandHelp, h_help, h_syntax} , Index: trunk/src_plugins/smartdisperse/smartdisperse.c =================================================================== --- trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4786) +++ trunk/src_plugins/smartdisperse/smartdisperse.c (revision 4787) @@ -263,7 +263,7 @@ return 0; } -static HID_Action smartdisperse_action_list[] = { +static pcb_hid_action_t smartdisperse_action_list[] = { {"smartdisperse", NULL, smartdisperse, NULL, NULL} }; Index: trunk/src_plugins/teardrops/teardrops.c =================================================================== --- trunk/src_plugins/teardrops/teardrops.c (revision 4786) +++ trunk/src_plugins/teardrops/teardrops.c (revision 4787) @@ -308,7 +308,7 @@ return 0; } -static HID_Action teardrops_action_list[] = { +static pcb_hid_action_t teardrops_action_list[] = { {"Teardrops", NULL, teardrops, NULL, NULL} }; Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 4786) +++ trunk/src_plugins/toporouter/toporouter.c (revision 4787) @@ -8225,7 +8225,7 @@ return 0; } -static HID_Action toporouter_action_list[] = { +static pcb_hid_action_t toporouter_action_list[] = { {"Escape", "Select a set of pads", escape, "Pad escape", "Escape()"}, {"Toporouter", "Select net(s)", toporouter, "Topological autorouter", "Toporouter()"} }; Index: trunk/src_plugins/vendordrill/vendor.c =================================================================== --- trunk/src_plugins/vendordrill/vendor.c (revision 4786) +++ trunk/src_plugins/vendordrill/vendor.c (revision 4787) @@ -640,7 +640,7 @@ static const char *vendor_cookie = "vendor drill mapping"; -HID_Action vendor_action_list[] = { +pcb_hid_action_t vendor_action_list[] = { {"ApplyVendor", 0, ActionApplyVendor, apply_vendor_help, apply_vendor_syntax} ,