Index: trunk/doc/developer/dad/TEMPLATE_MODAL.c =================================================================== --- trunk/doc/developer/dad/TEMPLATE_MODAL.c (revision 30970) +++ trunk/doc/developer/dad/TEMPLATE_MODAL.c (revision 30971) @@ -46,7 +46,7 @@ #include "core headers this file depends on (even if other dialogs include them)" typedef struct{ - pcb_hid_attribute_t *attrs; + rnd_hid_attribute_t *attrs; } foo_ctx_t; <<<- rename this static void pcb_dlg_foo(whatever args) <<<- edit this Index: trunk/src/actions_pcb.c =================================================================== --- trunk/src/actions_pcb.c (revision 30970) +++ trunk/src/actions_pcb.c (revision 30971) @@ -50,7 +50,7 @@ #define conv_str2layerid(dst, src) \ do { \ - pcb_layer_id_t lid = pcb_layer_str2id(PCB->Data, src); \ + rnd_layer_id_t lid = pcb_layer_str2id(PCB->Data, src); \ if (lid < 0) \ return -1; \ dst = lid; \ @@ -59,7 +59,7 @@ static int layerid_arg_conv(fgw_ctx_t *ctx, fgw_arg_t *arg, fgw_type_t target) { if (target == FGW_LAYERID) { /* convert to layer id */ - pcb_layer_id_t tmp; + rnd_layer_id_t tmp; switch(FGW_BASE_TYPE(arg->type)) { ARG_CONV_CASE_LONG(tmp, conv_assign) ARG_CONV_CASE_LLONG(tmp, conv_assign) @@ -75,7 +75,7 @@ return 0; } if (arg->type == FGW_LAYERID) { /* convert from layer id */ - pcb_layer_id_t tmp = fgw_layerid(arg); + rnd_layer_id_t tmp = fgw_layerid(arg); switch(target) { ARG_CONV_CASE_LONG(tmp, conv_rev_assign) ARG_CONV_CASE_LLONG(tmp, conv_rev_assign) @@ -100,7 +100,7 @@ static int layer_arg_conv(fgw_ctx_t *ctx, fgw_arg_t *arg, fgw_type_t target) { if (target == FGW_LAYER) { /* convert to layer */ - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (layerid_arg_conv(ctx, arg, FGW_LAYERID) != 0) return -1; lid = fgw_layerid(arg); @@ -113,7 +113,7 @@ return 0; } if (arg->type == FGW_LAYER) { /* convert from layer */ - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *ly = arg->val.ptr_void; pcb_data_t *data; if (ly == NULL) @@ -135,7 +135,7 @@ #define conv_str2layergrpid(dst, src) \ do { \ - pcb_layergrp_id_t gid = pcb_layergrp_str2id(PCB, src); \ + rnd_layergrp_id_t gid = pcb_layergrp_str2id(PCB, src); \ if (gid < 0) \ return -1; \ dst = gid; \ @@ -144,7 +144,7 @@ static int layergrpid_arg_conv(fgw_ctx_t *ctx, fgw_arg_t *arg, fgw_type_t target) { if (target == FGW_LAYERGRPID) { /* convert to layergrp id */ - pcb_layergrp_id_t tmp; + rnd_layergrp_id_t tmp; switch(FGW_BASE_TYPE(arg->type)) { ARG_CONV_CASE_LONG(tmp, conv_assign) ARG_CONV_CASE_LLONG(tmp, conv_assign) @@ -160,7 +160,7 @@ return 0; } if (arg->type == FGW_LAYERGRPID) { /* convert from layergrp id */ - pcb_layergrp_id_t tmp = fgw_layergrpid(arg); + rnd_layergrp_id_t tmp = fgw_layergrpid(arg); switch(target) { ARG_CONV_CASE_LONG(tmp, conv_rev_assign) ARG_CONV_CASE_LLONG(tmp, conv_rev_assign) @@ -185,7 +185,7 @@ static int layergrp_arg_conv(fgw_ctx_t *ctx, fgw_arg_t *arg, fgw_type_t target) { if (target == FGW_LAYERGRP) { /* convert to layer group */ - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; if (layergrpid_arg_conv(ctx, arg, FGW_LAYERGRPID) != 0) return -1; gid = fgw_layergrpid(arg); @@ -198,7 +198,7 @@ return 0; } if (arg->type == FGW_LAYERGRP) { /* convert from layer group */ - pcb_layer_id_t gid; + rnd_layer_id_t gid; pcb_layergrp_t *grp = arg->val.ptr_void; pcb_board_t *pcb; if (grp == NULL) Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 30970) +++ trunk/src/board.c (revision 30971) @@ -411,7 +411,7 @@ rnd_coord_t pcb_board_thickness(pcb_board_t *pcb, const char *namespace, pcb_board_thickness_flags_t flags) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; rnd_coord_t curr, total = 0; Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 30970) +++ trunk/src/brave.c (revision 30971) @@ -150,7 +150,7 @@ } /* Convert the current state of dialog box widget into brave bits, update the conf */ -static void dlg2brave(pcb_hid_attribute_t *attrs) +static void dlg2brave(rnd_hid_attribute_t *attrs) { desc_t *d; for(d = desc; d->name != NULL; d++) @@ -158,7 +158,7 @@ } /* If a checkbox changes, do the conversion forth and back to ensure sync */ -static void brave_dialog_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void brave_dialog_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { dlg2brave(caller_data); brave2dlg(hid_ctx); @@ -165,7 +165,7 @@ } /* Tick in all - button callback */ -static void brave_dialog_allon(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void brave_dialog_allon(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { desc_t *d; for(d = desc; d->name != NULL; d++) @@ -174,7 +174,7 @@ } /* Tick off all - button callback */ -static void brave_dialog_alloff(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void brave_dialog_alloff(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { desc_t *d; for(d = desc; d->name != NULL; d++) @@ -183,7 +183,7 @@ } /* Copy the config from CLI to USER and flush the file */ -static void brave_dialog_save(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void brave_dialog_save(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_conf_set(RND_CFR_USER, "rc/brave", 0, conf_core.rc.brave, RND_POL_OVERWRITE); if (rnd_conf_isdirty(RND_CFR_USER)) Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 30970) +++ trunk/src/buffer.c (revision 30971) @@ -490,11 +490,11 @@ } scale_t; /* make sure x;y values are synced when lock is active */ -static void scale_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void scale_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { scale_t *ctx = caller_data; int wid = attr - ctx->dlg, locked = ctx->dlg[ctx->wlock].val.lng; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; if (!locked) return; @@ -654,8 +654,8 @@ void pcb_buffer_flip_side(pcb_board_t *pcb, pcb_buffer_t *Buffer) { int j, k; - pcb_layer_id_t SLayer = -1, CLayer = -1; - pcb_layergrp_id_t sgroup, cgroup; + rnd_layer_id_t SLayer = -1, CLayer = -1; + rnd_layergrp_id_t sgroup, cgroup; pcb_layer_t swap; #if 0 @@ -712,8 +712,8 @@ TODO("layer: revise this code for the generic physical layer support; move this code to layer*.c") if (pcb->LayerGroups.grp[cgroup].len == pcb->LayerGroups.grp[sgroup].len) { for (j = k = 0; j < pcb->LayerGroups.grp[sgroup].len; j++) { - pcb_layer_id_t cnumber = pcb->LayerGroups.grp[cgroup].lid[k]; - pcb_layer_id_t snumber = pcb->LayerGroups.grp[sgroup].lid[j]; + rnd_layer_id_t cnumber = pcb->LayerGroups.grp[cgroup].lid[k]; + rnd_layer_id_t snumber = pcb->LayerGroups.grp[sgroup].lid[j]; if ((pcb_layer_flags(pcb, snumber)) & PCB_LYT_SILK) continue; Index: trunk/src/build_run.c =================================================================== --- trunk/src/build_run.c (revision 30970) +++ trunk/src/build_run.c (revision 30971) @@ -137,7 +137,7 @@ char *pcb_get_info_compile_options(void) { - pcb_hid_t **hids; + rnd_hid_t **hids; int i; static gds_t info; static int first_time = 1; Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 30970) +++ trunk/src/crosshair.h (revision 30971) @@ -56,8 +56,8 @@ } pcb_attached_object_t; typedef struct { /* holds crosshair, cursor and crosshair-attachment information */ - pcb_hid_gc_t GC; /* GC for cursor drawing */ - pcb_hid_gc_t AttachGC; /* and for displaying buffer contents */ + rnd_hid_gc_t GC; /* GC for cursor drawing */ + rnd_hid_gc_t AttachGC; /* and for displaying buffer contents */ rnd_coord_t ptr_x, ptr_y; /* last seen raw mouse pointer x;y coords */ rnd_coord_t X, Y; /* (snapped) crosshair position */ pcb_attached_line_t AttachedLine; /* data of new lines... */ Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 30970) +++ trunk/src/data.c (revision 30971) @@ -119,7 +119,7 @@ } else { pcb_layer_it_t it; - pcb_layer_id_t lid; + rnd_layer_id_t lid; for(lid = pcb_layer_first_all(&pcb->LayerGroups, &it); lid != -1; lid = pcb_layer_next(&it)) { pcb_layer_t *layer = pcb->Data->Layer + lid; pcb_loop_layer(pcb, layer, ctx, lacb, lcb, acb, tcb, pocb, gcb); @@ -335,7 +335,7 @@ void pcb_data_set_layer_parents(pcb_data_t *data) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < PCB_MAX_LAYER; n++) pcb_layer_setup(&data->Layer[n], data); } @@ -342,7 +342,7 @@ void pcb_data_bind_board_layers(pcb_board_t *pcb, pcb_data_t *data, int share_rtrees) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < pcb->Data->LayerN; n++) { pcb_layer_real2bound(&data->Layer[n], &pcb->Data->Layer[n], share_rtrees); data->Layer[n].parent.data = data; @@ -354,7 +354,7 @@ void pcb_data_make_layers_bound(pcb_board_t *pcb4layer_groups, pcb_data_t *data) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < data->LayerN; n++) { pcb_layer_type_t lyt = pcb_layergrp_flags(pcb4layer_groups, data->Layer[n].meta.real.grp); memset(&data->Layer[n].meta.bound, 0, sizeof(data->Layer[n].meta.bound)); @@ -368,7 +368,7 @@ void pcb_data_unbind_layers(pcb_data_t *data) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < data->LayerN; n++) data->Layer[n].meta.bound.real = NULL; } @@ -687,7 +687,7 @@ pcb_r_dir_t (*rectangle_in_region) (const rnd_rnd_box_t *box, void *cl), void *closure, int *num_found, rnd_bool vis_only) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_r_dir_t res = 0; if (!vis_only || PCB->RatOn) Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 30970) +++ trunk/src/draw.c (revision 30971) @@ -67,12 +67,12 @@ static void draw_everything(pcb_draw_info_t *info); static void pcb_draw_layer_grp(pcb_draw_info_t *info, int, int); -static void pcb_draw_obj_label(pcb_draw_info_t *info, pcb_layergrp_id_t gid, pcb_any_obj_t *obj); +static void pcb_draw_obj_label(pcb_draw_info_t *info, rnd_layergrp_id_t gid, pcb_any_obj_t *obj); static void pcb_draw_pstk_marks(pcb_draw_info_t *info); static void pcb_draw_pstk_labels(pcb_draw_info_t *info); -static void pcb_draw_pstk_holes(pcb_draw_info_t *info, pcb_layergrp_id_t group, pcb_pstk_draw_hole_t holetype); -static void pcb_draw_ppv(pcb_draw_info_t *info, pcb_layergrp_id_t group); -static void xform_setup(pcb_draw_info_t *info, pcb_xform_t *dst, const pcb_layer_t *Layer); +static void pcb_draw_pstk_holes(pcb_draw_info_t *info, rnd_layergrp_id_t group, pcb_pstk_draw_hole_t holetype); +static void pcb_draw_ppv(pcb_draw_info_t *info, rnd_layergrp_id_t group); +static void xform_setup(pcb_draw_info_t *info, rnd_xform_t *dst, const pcb_layer_t *Layer); /* In draw_ly_spec.c: */ static void pcb_draw_paste(pcb_draw_info_t *info, int side); @@ -106,7 +106,7 @@ rnd_color_load_int(dst, MIN(255, orig->r * factor), MIN(255, orig->g * factor), MIN(255, orig->b * factor), 255); } -void pcb_draw_dashed_line(pcb_draw_info_t *info, pcb_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, pcb_bool_t cheap) +void pcb_draw_dashed_line(pcb_draw_info_t *info, rnd_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, pcb_bool_t cheap) { /* TODO: we need a real geo lib... using double here is plain wrong */ double dx = x2-x1, dy = y2-y1; @@ -162,7 +162,7 @@ pcb_draw_invalidated.X2 = pcb_draw_invalidated.Y2 = -RND_COORD_MAX; } -static void draw_everything_holes(pcb_draw_info_t *info, pcb_layergrp_id_t gid) +static void draw_everything_holes(pcb_draw_info_t *info, rnd_layergrp_id_t gid) { int plated, unplated; pcb_board_count_holes(PCB, &plated, &unplated, info->drawn_area); @@ -179,11 +179,11 @@ } typedef struct { - pcb_layergrp_id_t top_fab, top_assy, bot_assy; + rnd_layergrp_id_t top_fab, top_assy, bot_assy; int top_fab_enable, top_assy_enable, bot_assy_enable; } legacy_vlayer_t; -static int set_vlayer(pcb_draw_info_t *info, pcb_layergrp_id_t gid, int enable, pcb_virtual_layer_t vly_type) +static int set_vlayer(pcb_draw_info_t *info, rnd_layergrp_id_t gid, int enable, pcb_virtual_layer_t vly_type) { if (gid >= 0) { /* has a doc layer */ if (!enable) @@ -198,8 +198,8 @@ static void draw_virtual_layers(pcb_draw_info_t *info, const legacy_vlayer_t *lvly_drawn) { - pcb_hid_expose_ctx_t hid_exp; - pcb_xform_t tmp; + rnd_hid_expose_ctx_t hid_exp; + rnd_xform_t tmp; hid_exp.view = *info->drawn_area; @@ -305,7 +305,7 @@ } } -static void draw_pins_and_pads(pcb_draw_info_t *info, pcb_layergrp_id_t component, pcb_layergrp_id_t solder) +static void draw_pins_and_pads(pcb_draw_info_t *info, rnd_layergrp_id_t component, rnd_layergrp_id_t solder) { int per_side = conf_core.appearance.subc_layer_per_side; @@ -339,18 +339,18 @@ static void draw_everything(pcb_draw_info_t *info) { - pcb_layergrp_id_t backsilk_gid; + rnd_layergrp_id_t backsilk_gid; pcb_layergrp_t *backsilk_grp; rnd_color_t old_silk_color[PCB_MAX_LAYERGRP]; int i, ngroups; - pcb_layergrp_id_t component, solder, gid, side_copper_grp; + rnd_layergrp_id_t component, solder, gid, side_copper_grp; /* This is the list of layer groups we will draw. */ char do_group[PCB_MAX_LAYERGRP]; /* This is the reverse of the order in which we draw them. */ - pcb_layergrp_id_t drawn_groups[PCB_MAX_LAYERGRP]; + rnd_layergrp_id_t drawn_groups[PCB_MAX_LAYERGRP]; rnd_bool paste_empty; legacy_vlayer_t lvly; - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); backsilk_gid = ((!info->xform->show_solder_side) ? pcb_layergrp_get_bottom_silk() : pcb_layergrp_get_top_silk()); @@ -373,7 +373,7 @@ lvly.top_assy = lvly.bot_assy = -1; for (ngroups = 0, i = 0; i < pcb_max_layer(PCB); i++) { pcb_layer_t *l = PCB_STACKLAYER(PCB, i); - pcb_layergrp_id_t group = pcb_layer_get_group(PCB, pcb_layer_stack[i]); + rnd_layergrp_id_t group = pcb_layer_get_group(PCB, pcb_layer_stack[i]); pcb_layergrp_t *grp = pcb_get_layergrp(PCB, group); unsigned int gflg = 0; @@ -436,11 +436,11 @@ /* draw all layers in layerstack order */ for (i = ngroups - 1; i >= 0; i--) { - pcb_layergrp_id_t group = drawn_groups[i]; + rnd_layergrp_id_t group = drawn_groups[i]; if (pcb_layer_gui_set_glayer(PCB, group, 0, &info->xform_exporter)) { int is_current = 0; - pcb_layergrp_id_t cgrp = PCB_CURRLAYER(PCB)->meta.real.grp; + rnd_layergrp_id_t cgrp = PCB_CURRLAYER(PCB)->meta.real.grp; if ((cgrp == solder) || (cgrp == component)) { /* current group is top or bottom: visibility depends on side we are looking at */ @@ -465,7 +465,7 @@ pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); pcb_render->set_drawing_mode(pcb_render, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); if (pcb_render->gui) { - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); pcb_draw_ppv(info, info->xform->show_solder_side ? solder : component); info->xform = NULL; info->layer = NULL; @@ -523,7 +523,7 @@ draw_virtual_layers(info, &lvly); if ((pcb_render->gui) || (!info->xform_caller->omit_overlay)) { - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); draw_rats(info, info->drawn_area); draw_pins_and_pads(info, component, solder); @@ -531,7 +531,7 @@ draw_ui_layers(info); if (pcb_render->gui) { - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); draw_xor_marks(info); } @@ -547,10 +547,10 @@ } } -static void pcb_draw_pstks(pcb_draw_info_t *info, pcb_layergrp_id_t group, int is_current, pcb_layer_combining_t comb) +static void pcb_draw_pstks(pcb_draw_info_t *info, rnd_layergrp_id_t group, int is_current, pcb_layer_combining_t comb) { pcb_layergrp_t *g = PCB->LayerGroups.grp + group; - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); @@ -578,9 +578,9 @@ pcb_r_search(PCB->Data->padstack_tree, info->drawn_area, NULL, pcb_pstk_draw_label_callback, info, NULL); } -static void pcb_draw_pstk_holes(pcb_draw_info_t *info, pcb_layergrp_id_t group, pcb_pstk_draw_hole_t holetype) +static void pcb_draw_pstk_holes(pcb_draw_info_t *info, rnd_layergrp_id_t group, pcb_pstk_draw_hole_t holetype) { - pcb_xform_t tmp; + rnd_xform_t tmp; if (!PCB->hole_on) @@ -593,9 +593,9 @@ info->xform = NULL; info->layer = NULL; } -static void pcb_draw_pstk_slots(pcb_draw_info_t *info, pcb_layergrp_id_t group, pcb_pstk_draw_hole_t holetype) +static void pcb_draw_pstk_slots(pcb_draw_info_t *info, rnd_layergrp_id_t group, pcb_pstk_draw_hole_t holetype) { - pcb_xform_t tmp; + rnd_xform_t tmp; if (!PCB->hole_on) return; @@ -611,7 +611,7 @@ * Draws padstacks - Always draws for non-gui HIDs, * otherwise drawing depends on PCB->pstk_on */ -static void pcb_draw_ppv(pcb_draw_info_t *info, pcb_layergrp_id_t group) +static void pcb_draw_ppv(pcb_draw_info_t *info, rnd_layergrp_id_t group) { /* draw padstack holes - copper is drawn with each group */ if (PCB->pstk_on || !pcb_render->gui) { @@ -628,7 +628,7 @@ * Draws padstacks' names - Always draws for non-gui HIDs, * otherwise drawing depends on PCB->pstk_on */ -void pcb_draw_pstk_names(pcb_draw_info_t *info, pcb_layergrp_id_t group, const rnd_rnd_box_t *drawn_area) +void pcb_draw_pstk_names(pcb_draw_info_t *info, rnd_layergrp_id_t group, const rnd_rnd_box_t *drawn_area) { if (PCB->pstk_on || !pcb_render->gui) { size_t n; @@ -677,7 +677,7 @@ #include "draw_composite.c" #include "draw_ly_spec.c" -static void xform_setup(pcb_draw_info_t *info, pcb_xform_t *dst, const pcb_layer_t *Layer) +static void xform_setup(pcb_draw_info_t *info, rnd_xform_t *dst, const pcb_layer_t *Layer) { info->layer = Layer; if ((Layer != NULL) && (!pcb_xform_is_nop(&Layer->meta.real.xform))) { @@ -706,7 +706,7 @@ { unsigned int lflg = 0; int may_have_delayed = 0, restore_color = 0, current_grp; - pcb_xform_t xform; + rnd_xform_t xform; rnd_color_t orig_color; pcb_layer_t *Layer = (pcb_layer_t *)Layer_; /* ugly hack until layer color is moved into info */ @@ -824,7 +824,7 @@ /* This version is about 1% slower and used rarely, thus it's all dupped from pcb_draw_layer() to keep the original speed there */ -void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, pcb_xform_t *xf) +void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, rnd_xform_t *xf) { pcb_draw_info_t info; rnd_rnd_box_t scr2; @@ -831,7 +831,7 @@ unsigned int lflg = 0; rnd_rtree_it_t it; pcb_any_obj_t *o; - pcb_xform_t tmp; + rnd_xform_t tmp; if ((screen->X2 <= screen->X1) || (screen->Y2 <= screen->Y1)) { scr2 = *screen; @@ -922,10 +922,10 @@ static void pcb_draw_layer_grp(pcb_draw_info_t *info, int group, int is_current) { int i; - pcb_layer_id_t layernum; + rnd_layer_id_t layernum; pcb_layer_t *Layer; rnd_cardinal_t n_entries = PCB->LayerGroups.grp[group].len; - pcb_layer_id_t *layers = PCB->LayerGroups.grp[group].lid; + rnd_layer_id_t *layers = PCB->LayerGroups.grp[group].lid; pcb_layergrp_t *grp = pcb_get_layergrp(PCB, group); unsigned int gflg = grp->ltype; @@ -940,7 +940,7 @@ } if ((gflg & PCB_LYT_COPPER) && (PCB->pstk_on)) { - pcb_xform_t tmp; + rnd_xform_t tmp; const pcb_layer_t *ly1 = NULL; /* figure first layer to get the transformations from */ @@ -1039,7 +1039,7 @@ } } -static void pcb_draw_obj_label(pcb_draw_info_t *info, pcb_layergrp_id_t gid, pcb_any_obj_t *obj) +static void pcb_draw_obj_label(pcb_draw_info_t *info, rnd_layergrp_id_t gid, pcb_any_obj_t *obj) { if (pcb_hidden_floater(obj, info)) return; @@ -1066,7 +1066,7 @@ * HID drawing callback. */ -static void expose_begin(pcb_output_t *save, pcb_hid_t *hid) +static void expose_begin(pcb_output_t *save, rnd_hid_t *hid) { memcpy(save, &pcb_draw_out, sizeof(pcb_output_t)); save->hid = pcb_render; @@ -1120,7 +1120,7 @@ pcb_render = pcb_draw_out.hid; } -void pcb_draw_setup_default_gui_xform(pcb_xform_t *dst) +void pcb_draw_setup_default_gui_xform(rnd_xform_t *dst) { dst->wireframe = conf_core.editor.wireframe_draw; dst->thin_draw = conf_core.editor.thin_draw; @@ -1133,10 +1133,10 @@ dst->flag_color = 1; } -void pcb_draw_setup_default_xform_info(pcb_hid_t *hid, pcb_draw_info_t *info) +void pcb_draw_setup_default_xform_info(rnd_hid_t *hid, pcb_draw_info_t *info) { - static pcb_xform_t xf_def = {0}; - static pcb_xform_t xform_main_exp; + static rnd_xform_t xf_def = {0}; + static rnd_xform_t xform_main_exp; if (info->xform_caller == NULL) { if (hid->exporter) { @@ -1155,7 +1155,7 @@ } } -void pcbhl_expose_main(pcb_hid_t * hid, const pcb_hid_expose_ctx_t *ctx, pcb_xform_t *xform_caller) +void pcbhl_expose_main(rnd_hid_t * hid, const rnd_hid_expose_ctx_t *ctx, rnd_xform_t *xform_caller) { if (!pcb_draw_inhibit) { pcb_output_t save; @@ -1175,7 +1175,7 @@ } } -void pcbhl_expose_preview(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *e) +void pcbhl_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e) { pcb_output_t save; expose_begin(&save, hid); Index: trunk/src/draw.h =================================================================== --- trunk/src/draw.h (revision 30970) +++ trunk/src/draw.h (revision 30971) @@ -35,9 +35,9 @@ /* holds information about output window */ typedef struct { - pcb_hid_t *hid; - pcb_hid_gc_t drillGC, fgGC, pmGC; /* changed from some routines */ - pcb_hid_gc_t active_padGC, backpadGC, padGC, padselGC; /* pads are drawn with this gc */ + rnd_hid_t *hid; + rnd_hid_gc_t drillGC, fgGC, pmGC; /* changed from some routines */ + rnd_hid_gc_t active_padGC, backpadGC, padGC, padselGC; /* pads are drawn with this gc */ unsigned direct:1; /* starts as 1 and becomes 0 before the first compositing layer group is reset */ } pcb_output_t; @@ -56,15 +56,15 @@ const char *export_name; /* name of the export plugin */ char noexport_name[64]; /* "noexport:" attribute name rendered for the current exporter */ const rnd_rnd_box_t *drawn_area; - pcb_xform_t *xform_caller; /* the extra transformation the caller requested (the one who has initiated the rendering, e.g. throuh pcb_draw_everything()) */ - pcb_xform_t *xform_exporter; /* the extra transformation the exporter requested (e.g. because of cam) */ - pcb_xform_t *xform; /* the final transformation applied on objects */ + rnd_xform_t *xform_caller; /* the extra transformation the caller requested (the one who has initiated the rendering, e.g. throuh pcb_draw_everything()) */ + rnd_xform_t *xform_exporter; /* the extra transformation the exporter requested (e.g. because of cam) */ + rnd_xform_t *xform; /* the final transformation applied on objects */ const pcb_layer_t *layer; union { /* fields used for specific object callbacks */ struct { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; int is_current; pcb_pstk_draw_hole_t holetype; pcb_layer_combining_t comb; @@ -124,7 +124,7 @@ the number of on/off segment pairs. It is guaranteed that the line starts and ends with an "on" line segment. If cheap is true, allow drawing less segments if the line is short */ -void pcb_draw_dashed_line(pcb_draw_info_t *info, pcb_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, pcb_bool_t cheap); +void pcb_draw_dashed_line(pcb_draw_info_t *info, rnd_hid_gc_t GC, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, unsigned int segs, pcb_bool_t cheap); void pcb_draw(void); @@ -135,14 +135,14 @@ /* Same as pcb_draw_layer(), but never draws an implicit outline and ignores objects that are not in the subtree of data - useful for drawing a subtree, e.g. a subc only */ -void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, pcb_xform_t *xform); +void pcb_draw_layer_under(pcb_board_t *pcb, const pcb_layer_t *Layer, const rnd_rnd_box_t *screen, pcb_data_t *data, rnd_xform_t *xform); /* Composite draw all layer groups matching lyt/purpi/purpose */ -void pcb_draw_groups(pcb_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert); +void pcb_draw_groups(rnd_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert); void pcb_erase_obj(int, void *, void *); -void pcb_draw_pstk_names(pcb_draw_info_t *info, pcb_layergrp_id_t group, const rnd_rnd_box_t *drawn_area); +void pcb_draw_pstk_names(pcb_draw_info_t *info, rnd_layergrp_id_t group, const rnd_rnd_box_t *drawn_area); /*#define PCB_BBOX_DEBUG*/ @@ -158,7 +158,7 @@ /* Returns whether lay_id is part of a group that is composite-drawn */ -int pcb_draw_layer_is_comp(pcb_layer_id_t lay_id); +int pcb_draw_layer_is_comp(rnd_layer_id_t lay_id); /* Returns whether a group is composite-drawn */ int pcb_draw_layergrp_is_comp(const pcb_layergrp_t *g); @@ -170,8 +170,8 @@ void pcb_label_invalidate(rnd_coord_t x, rnd_coord_t y, double scale, rnd_bool vert, rnd_bool centered, const char *label); -void pcb_draw_setup_default_xform_info(pcb_hid_t *hid, pcb_draw_info_t *info); -void pcb_draw_setup_default_gui_xform(pcb_xform_t *dst); +void pcb_draw_setup_default_xform_info(rnd_hid_t *hid, pcb_draw_info_t *info); +void pcb_draw_setup_default_gui_xform(rnd_xform_t *dst); /* Schedule an object to be called again at the end for drawing its labels Index: trunk/src/draw_composite.c =================================================================== --- trunk/src/draw_composite.c (revision 30970) +++ trunk/src/draw_composite.c (revision 30971) @@ -32,7 +32,7 @@ typedef struct comp_ctx_s { pcb_draw_info_t *info; const pcb_layergrp_t *grp; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; const rnd_color_t *color; unsigned thin:1; @@ -129,7 +129,7 @@ } { - pcb_hid_gc_t old_fg = pcb_draw_out.fgGC; + rnd_hid_gc_t old_fg = pcb_draw_out.fgGC; pcb_draw_out.fgGC = pcb_draw_out.pmGC; if ((l->comb & PCB_LYC_AUTO) && (draw_auto != NULL)) draw_auto(ctx, auto_data); @@ -153,7 +153,7 @@ return 0; } -int pcb_draw_layer_is_comp(pcb_layer_id_t id) +int pcb_draw_layer_is_comp(rnd_layer_id_t id) { pcb_layergrp_t *g = pcb_get_layergrp(PCB, PCB->Data->Layer[id].meta.real.grp); if (g == NULL) return 0; @@ -180,13 +180,13 @@ pcb_draw_pstks(ctx->info, ctx->gid, 0, *pstk_lyt_match); } -void pcb_draw_groups(pcb_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert) +void pcb_draw_groups(rnd_hid_t *hid, pcb_board_t *pcb, pcb_layer_type_t lyt, int purpi, char *purpose, const rnd_rnd_box_t *screen, const rnd_color_t *default_color, pcb_layer_type_t pstk_lyt_match, int thin_draw, int invert) { pcb_draw_info_t info; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; comp_ctx_t cctx; - pcb_xform_t tmp; + rnd_xform_t tmp; memset(&info, 0, sizeof(info)); info.pcb = pcb; Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 30970) +++ trunk/src/draw_ly_spec.c (revision 30971) @@ -42,10 +42,10 @@ static void pcb_draw_paste(pcb_draw_info_t *info, int side) { unsigned long side_lyt = side ? PCB_LYT_TOP : PCB_LYT_BOTTOM; - pcb_layergrp_id_t gid = -1; + rnd_layergrp_id_t gid = -1; comp_ctx_t cctx; pcb_layer_t *ly = NULL; - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); @@ -84,10 +84,10 @@ static void pcb_draw_mask(pcb_draw_info_t *info, int side) { unsigned long side_lyt = side ? PCB_LYT_TOP : PCB_LYT_BOTTOM; - pcb_layergrp_id_t gid = -1; + rnd_layergrp_id_t gid = -1; comp_ctx_t cctx; pcb_layer_t *ly = NULL; - pcb_xform_t tmp; + rnd_xform_t tmp; xform_setup(info, &tmp, NULL); @@ -127,7 +127,7 @@ pcb_draw_pstks(ctx->info, ctx->gid, 0, PCB_LYC_AUTO); } -static int pcb_is_silk_old_style(comp_ctx_t *cctx, pcb_layer_id_t lid) +static int pcb_is_silk_old_style(comp_ctx_t *cctx, rnd_layer_id_t lid) { if (cctx->grp == NULL) return 1; /* no group means no silk -> fall back to implicit */ @@ -140,8 +140,8 @@ static void pcb_draw_silk_doc(pcb_draw_info_t *info, pcb_layer_type_t lyt_side, pcb_layer_type_t lyt_type, int setgrp, int invis) { - pcb_layer_id_t lid; - pcb_layergrp_id_t gid[PCB_MAX_LAYERGRP]; + rnd_layer_id_t lid; + rnd_layergrp_id_t gid[PCB_MAX_LAYERGRP]; comp_ctx_t cctx; int len, n; @@ -233,7 +233,7 @@ static void pcb_draw_boundary_mech(pcb_draw_info_t *info) { int count = 0; - pcb_layergrp_id_t gid, goutid; + rnd_layergrp_id_t gid, goutid; const pcb_layergrp_t *g, *goutl = NULL; pcb_layer_t *uslot = NULL, *pslot = NULL; int uscore = 0, pscore = 0; @@ -338,7 +338,7 @@ static void pcb_draw_assembly(pcb_draw_info_t *info, pcb_layer_type_t lyt_side) { - pcb_layergrp_id_t side_group; + rnd_layergrp_id_t side_group; if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | lyt_side, &side_group, 1) != 1) return; Index: trunk/src/draw_wireframe.h =================================================================== --- trunk/src/draw_wireframe.h (revision 30970) +++ trunk/src/draw_wireframe.h (revision 30971) @@ -34,7 +34,7 @@ /*----------------------------------------------------------- * Draws the outline of an arc */ -RND_INLINE void pcb_draw_wireframe_arc(pcb_hid_gc_t gc, pcb_arc_t *arc, rnd_coord_t thick) +RND_INLINE void pcb_draw_wireframe_arc(rnd_hid_gc_t gc, pcb_arc_t *arc, rnd_coord_t thick) { rnd_coord_t wid = thick / 2; rnd_coord_t x1, y1, x2, y2; @@ -58,7 +58,7 @@ /*----------------------------------------------------------- * Draws the outline of a line */ -RND_INLINE void pcb_draw_wireframe_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, int square) +RND_INLINE void pcb_draw_wireframe_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t thick, int square) { if((x1 != x2) || (y1 != y2)) { double dx = x2 - x1; Index: trunk/src/extobj_helper.h =================================================================== --- trunk/src/extobj_helper.h (revision 30970) +++ trunk/src/extobj_helper.h (revision 30971) @@ -145,7 +145,7 @@ /*** dialog box build ***/ -RND_INLINE void pcb_exto_dlg_gui_chg_attr(pcb_subc_t *subc, pcb_hid_attribute_t *attr, const char *newval) /* for internal use */ +RND_INLINE void pcb_exto_dlg_gui_chg_attr(pcb_subc_t *subc, rnd_hid_attribute_t *attr, const char *newval) /* for internal use */ { pcb_board_t *pcb; pcb_data_t *data; @@ -162,7 +162,7 @@ pcb_gui->invalidate_all(pcb_gui); } -RND_INLINE void pcb_exto_dlg_coord_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +RND_INLINE void pcb_exto_dlg_coord_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_subc_t *subc = caller_data; char tmp[128]; @@ -200,7 +200,7 @@ /* pcb_dad_spin_set_value(spin->cmp.wend, NULL, wid, &hv); \*/ -RND_INLINE void pcb_exto_dlg_str_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +RND_INLINE void pcb_exto_dlg_str_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_subc_t *subc = caller_data; pcb_exto_dlg_gui_chg_attr(subc, attr, attr->val.str); @@ -222,7 +222,7 @@ PCB_DAD_DEFAULT_PTR(dlg, currval); \ } while(0) -RND_INLINE void pcb_exto_dlg_int_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +RND_INLINE void pcb_exto_dlg_int_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_subc_t *subc = caller_data; char tmp[128]; Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 30970) +++ trunk/src/find.c (revision 30971) @@ -240,7 +240,7 @@ if ((ctx->start_layergrp == NULL) && (ctx->open.used > 0) && (ctx->pcb != NULL)) { curr = ctx->open.array[0]; if ((curr != NULL) && (curr->parent_type == PCB_PARENT_LAYER)) { - pcb_layergrp_id_t gid = pcb_layer_get_group_(curr->parent.layer); + rnd_layergrp_id_t gid = pcb_layer_get_group_(curr->parent.layer); ctx->start_layergrp = pcb_get_layergrp(ctx->pcb, gid); if (!ctx->allow_noncopper) { TODO("find.c: implement this; special case: starting layer object on non-copper can still jump on padstack!"); Index: trunk/src/find_geo.c =================================================================== --- trunk/src/find_geo.c (revision 30970) +++ trunk/src/find_geo.c (revision 30971) @@ -282,7 +282,7 @@ /* Tests any end of a rat line is on the line */ static rnd_bool pcb_isc_rat_line(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_line_t *line) { - pcb_layergrp_id_t gid = pcb_layer_get_group_(line->parent.layer); + rnd_layergrp_id_t gid = pcb_layer_get_group_(line->parent.layer); if ((rat->group1 == gid) && pcb_isc_ratp_line(ctx, &rat->Point1, line)) return pcb_true; @@ -319,7 +319,7 @@ /* Tests any end of a rat line is on the arc */ static rnd_bool pcb_isc_rat_arc(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_arc_t *arc) { - pcb_layergrp_id_t gid = pcb_layer_get_group_(arc->parent.layer); + rnd_layergrp_id_t gid = pcb_layer_get_group_(arc->parent.layer); if ((rat->group1 == gid) && pcb_isc_ratp_arc(ctx, &rat->Point1, arc)) return pcb_true; @@ -386,7 +386,7 @@ /* Tests any end of a rat line is on the poly */ static rnd_bool pcb_isc_rat_poly(const pcb_find_t *ctx, pcb_rat_t *rat, pcb_poly_t *poly) { - pcb_layergrp_id_t gid = pcb_layer_get_group_(poly->parent.layer); + rnd_layergrp_id_t gid = pcb_layer_get_group_(poly->parent.layer); int donut = PCB_FLAG_TEST(PCB_FLAG_VIA, rat); if ((rat->group1 == gid) && pcb_isc_ratp_poly(ctx, &rat->Point1, poly, donut)) Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 30970) +++ trunk/src/gui_act.c (revision 30971) @@ -636,7 +636,7 @@ const char *arg; RND_PCB_ACT_CONVARG(n, FGW_STR, EditLayer, arg = argv[n].val.str); if (!explicit && (*arg == '@')) { - pcb_layer_id_t lid = pcb_layer_by_name(PCB->Data, arg+1); + rnd_layer_id_t lid = pcb_layer_by_name(PCB->Data, arg+1); if (lid < 0) { rnd_message(RND_MSG_ERROR, "Can't find layer named %s\n", arg+1); return 1; @@ -716,7 +716,7 @@ return ret; } -pcb_layergrp_id_t pcb_actd_EditGroup_gid = -1; +rnd_layergrp_id_t pcb_actd_EditGroup_gid = -1; static const char pcb_acts_EditGroup[] = "Editgroup([@group], [name=text|type=+bit|type=-bit])]\nEditlayer([@layer], attrib, key=value)"; static const char pcb_acth_EditGroup[] = "Change a property or attribute of a layer group. If the first argument starts with @, it is taken as the group name to manipulate, else the action uses the current layer's group. Without arguments or if only a layer name is specified, interactive runs editing."; static fgw_error_t pcb_act_EditGroup(fgw_arg_t *res, int argc, fgw_arg_t *argv) @@ -737,7 +737,7 @@ const char *arg; RND_PCB_ACT_CONVARG(n, FGW_STR, EditLayer, arg = argv[n].val.str); if (!explicit && (*arg == '@')) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; if (arg[1] == '\0') gid = pcb_actd_EditGroup_gid; else @@ -832,7 +832,7 @@ { const char *name = NULL; pcb_layergrp_t *g = NULL; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; if (PCB_CURRLAYER(PCB_ACT_BOARD) != NULL) g = pcb_get_layergrp(PCB, PCB_CURRLAYER(PCB_ACT_BOARD)->meta.real.grp); @@ -903,7 +903,7 @@ pcb_layergrp_inhibit_inc(); g = pcb_get_grp_new_misc(PCB); if (g != NULL) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (spurp != NULL) pcb_layergrp_set_purpose__(g, rnd_strdup(spurp), 1); @@ -979,7 +979,7 @@ { const char *name = NULL; pcb_layergrp_t *g = NULL; - pcb_layergrp_id_t gid, ng; + rnd_layergrp_id_t gid, ng; if (PCB_CURRLAYER(PCB_ACT_BOARD) != NULL) g = pcb_get_layergrp(PCB, PCB_CURRLAYER(PCB_ACT_BOARD)->meta.real.grp); @@ -1008,7 +1008,7 @@ pcb_undo_freeze_serial(); ng = pcb_layergrp_dup(PCB, gid, 1, 1); if (ng >= 0) { - pcb_layer_id_t lid = pcb_layer_create(PCB, ng, g->name, 1); + rnd_layer_id_t lid = pcb_layer_create(PCB, ng, g->name, 1); if (lid >= 0) { RND_ACT_IRES(0); PCB->Data->Layer[lid].meta.real.vis = 1; @@ -1033,7 +1033,7 @@ /* DOC: selectlayer.html */ static fgw_error_t pcb_act_SelectLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; const pcb_menu_layers_t *ml; char *name; @@ -1078,7 +1078,7 @@ /* DOC: chklayer.html */ static fgw_error_t pcb_act_ChkLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *ly; char *end; const char *name; @@ -1127,7 +1127,7 @@ /* DOC: toggleview.html */ static fgw_error_t pcb_act_ToggleView(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; const char *name; RND_PCB_ACT_CONVARG(1, FGW_STR, toggleview, name = argv[1].val.str); @@ -1211,7 +1211,7 @@ /* DOC: chkview.html */ static fgw_error_t pcb_act_ChkView(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *ly; char *end; const char *name; @@ -1255,10 +1255,10 @@ } -static int layer_get_curr_pos(pcb_board_t *pcb, pcb_layer_id_t *lidout, pcb_layergrp_id_t *gid, pcb_layergrp_t **grp, int *glidx) +static int layer_get_curr_pos(pcb_board_t *pcb, rnd_layer_id_t *lidout, rnd_layergrp_id_t *gid, pcb_layergrp_t **grp, int *glidx) { pcb_layergrp_t *g; - pcb_layer_id_t lid; + rnd_layer_id_t lid; int n; lid = PCB_CURRLID(pcb); @@ -1285,8 +1285,8 @@ static int layer_select_delta(pcb_board_t *pcb, int d) { pcb_layergrp_t *g; - pcb_layer_id_t lid; - pcb_layergrp_id_t gid; + rnd_layer_id_t lid; + rnd_layergrp_id_t gid; int glidx; if (layer_get_curr_pos(pcb, &lid, &gid, &g, &glidx) < 0) Index: trunk/src/hid_cam.c =================================================================== --- trunk/src/hid_cam.c (revision 30970) +++ trunk/src/hid_cam.c (revision 30971) @@ -65,10 +65,10 @@ } -char *pcb_layer_to_file_name_append(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) +char *pcb_layer_to_file_name_append(gds_t *dest, rnd_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) { const pcb_virt_layer_t *v; - pcb_layergrp_id_t group; + rnd_layergrp_id_t group; const char *res = NULL; static char buf[PCB_DERIVE_FN_SUFF_LEN]; @@ -146,7 +146,7 @@ return dest->array; } -char *pcb_layer_to_file_name(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) +char *pcb_layer_to_file_name(gds_t *dest, rnd_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style) { dest->used = 0; return pcb_layer_to_file_name_append(dest, lid, flags, purpose, purpi, style); @@ -184,7 +184,7 @@ return buf; } -void pcb_derive_default_filename(const char *pcbfile, pcb_export_opt_t *filename_attrib, const char *suffix) +void pcb_derive_default_filename(const char *pcbfile, rnd_export_opt_t *filename_attrib, const char *suffix) { if (filename_attrib->default_val.str) free((char *)filename_attrib->default_val.str); @@ -193,7 +193,7 @@ static void layervis_save_and_reset(pcb_cam_t *cam) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < cam->pcb->Data->LayerN; n++) { cam->orig_vis[n] = cam->pcb->Data->Layer[n].meta.real.vis; cam->pcb->Data->Layer[n].meta.real.vis = 0; @@ -202,14 +202,14 @@ static void layervis_restore(pcb_cam_t *cam) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < cam->pcb->Data->LayerN; n++) cam->pcb->Data->Layer[n].meta.real.vis = cam->orig_vis[n]; } -static void cam_xform_init(pcb_xform_t *dst_xform) +static void cam_xform_init(rnd_xform_t *dst_xform) { - memset(dst_xform, 0, sizeof(pcb_xform_t)); + memset(dst_xform, 0, sizeof(rnd_xform_t)); dst_xform->omit_overlay = 1; /* normally exporters shouldn't draw overlays */ } @@ -257,7 +257,7 @@ } } -int pcb_cam_begin(pcb_board_t *pcb, pcb_cam_t *dst, pcb_xform_t *dst_xform, const char *src, const pcb_export_opt_t *attr_tbl, int numa, pcb_hid_attr_val_t *options) +int pcb_cam_begin(pcb_board_t *pcb, pcb_cam_t *dst, rnd_xform_t *dst_xform, const char *src, const rnd_export_opt_t *attr_tbl, int numa, rnd_hid_attr_val_t *options) { char *curr, *next; @@ -295,8 +295,8 @@ /* parse layers */ for(curr = next; curr != NULL; curr = next) { - pcb_layergrp_id_t gids[PCB_MAX_LAYERGRP]; - pcb_xform_t *xf = NULL, xf_; + rnd_layergrp_id_t gids[PCB_MAX_LAYERGRP]; + rnd_xform_t *xf = NULL, xf_; int numg, vid; char *spk[64], *spv[64]; int spc = sizeof(spk) / sizeof(spk[0]); @@ -314,12 +314,12 @@ else if (numg >= 1) { int n; for(n = 0; n < numg; n++) { - pcb_layergrp_id_t gid = gids[n]; + rnd_layergrp_id_t gid = gids[n]; pcb_layervis_change_group_vis(&pcb->hidlib, pcb->LayerGroups.grp[gid].lid[0], 1, 0); dst->grp_vis[gid] = 1; if (xf != NULL) { dst->xform[gid] = &dst->xform_[gid]; - memcpy(&dst->xform_[gid], &xf_, sizeof(pcb_xform_t)); + memcpy(&dst->xform_[gid], &xf_, sizeof(rnd_xform_t)); } } } @@ -327,7 +327,7 @@ dst->vgrp_vis[vid] = 1; if (xf != NULL) { dst->vxform[vid] = &dst->vxform_[vid]; - memcpy(&dst->vxform_[vid], &xf_, sizeof(pcb_xform_t)); + memcpy(&dst->vxform_[vid], &xf_, sizeof(rnd_xform_t)); } } } @@ -357,7 +357,7 @@ } -void pcb_cam_begin_nolayer(pcb_board_t *pcb, pcb_cam_t *dst, pcb_xform_t *dst_xform, const char *src, const char **fn_out) +void pcb_cam_begin_nolayer(pcb_board_t *pcb, pcb_cam_t *dst, rnd_xform_t *dst_xform, const char *src, const char **fn_out) { char *eq; @@ -380,7 +380,7 @@ char *tmp; char *spk[64], *spv[64], *end, *purpose = NULL; int spc = sizeof(spk) / sizeof(spk[0]); - pcb_xform_t *dummy; + rnd_xform_t *dummy; tmp = rnd_strdup(start); end = pcb_parse_layergrp_address(start, spk, spv, &spc); @@ -438,7 +438,7 @@ else if (strncmp(*input, "top_offs", 8) == 0) { int tune, from_top = -1; pcb_layergrp_t *tcop = pcb_get_grp(&PCB->LayerGroups, PCB_LYT_TOP, PCB_LYT_COPPER); - pcb_layergrp_id_t tcop_id = pcb_layergrp_id(PCB, tcop); + rnd_layergrp_id_t tcop_id = pcb_layergrp_id(PCB, tcop); (*input) += 8; tune = get_tune(input); @@ -449,7 +449,7 @@ else if (strncmp(*input, "bot_offs", 8) == 0) { int tune, from_bot = -1; pcb_layergrp_t *bcop = pcb_get_grp(&PCB->LayerGroups, PCB_LYT_BOTTOM, PCB_LYT_COPPER); - pcb_layergrp_id_t bcop_id = pcb_layergrp_id(PCB, bcop); + rnd_layergrp_id_t bcop_id = pcb_layergrp_id(PCB, bcop); (*input) += 8; tune = get_tune(input); @@ -487,7 +487,7 @@ return 0; } -static int cam_update_name(pcb_cam_t *cam, pcb_layergrp_id_t gid, const pcb_virt_layer_t *vl) +static int cam_update_name(pcb_cam_t *cam, rnd_layergrp_id_t gid, const pcb_virt_layer_t *vl) { cam_name_ctx_t ctx; if (cam->fn_template == NULL) @@ -509,7 +509,7 @@ return 0; } -int pcb_cam_set_layer_group_(pcb_cam_t *cam, pcb_layergrp_id_t group, const char *purpose, int purpi, unsigned int flags, pcb_xform_t **xform) +int pcb_cam_set_layer_group_(pcb_cam_t *cam, rnd_layergrp_id_t group, const char *purpose, int purpi, unsigned int flags, rnd_xform_t **xform) { const pcb_virt_layer_t *vl; Index: trunk/src/hid_cam.h =================================================================== --- trunk/src/hid_cam.h (revision 30970) +++ trunk/src/hid_cam.h (revision 30971) @@ -14,10 +14,10 @@ int grp_vis[PCB_MAX_LAYERGRP]; /* whether a real layer group should be rendered */ int vgrp_vis[PCB_VLY_end]; /* whether a virtual layer group should be rendered */ - pcb_xform_t *xform[PCB_MAX_LAYERGRP]; - pcb_xform_t xform_[PCB_MAX_LAYERGRP]; - pcb_xform_t *vxform[PCB_VLY_end]; - pcb_xform_t vxform_[PCB_VLY_end]; + rnd_xform_t *xform[PCB_MAX_LAYERGRP]; + rnd_xform_t xform_[PCB_MAX_LAYERGRP]; + rnd_xform_t *vxform[PCB_VLY_end]; + rnd_xform_t vxform_[PCB_VLY_end]; unsigned int okempty_content:1; /* do not warn if no objects exported (but group exists) */ unsigned int okempty_group:1; /* do not warn if no group exported */ @@ -31,7 +31,7 @@ int exported_grps; } pcb_cam_t; -int pcb_cam_begin(pcb_board_t *pcb, pcb_cam_t *dst, pcb_xform_t *dst_xform, const char *src, const pcb_export_opt_t *attr_tbl, int numa, pcb_hid_attr_val_t *options); +int pcb_cam_begin(pcb_board_t *pcb, pcb_cam_t *dst, rnd_xform_t *dst_xform, const char *src, const rnd_export_opt_t *attr_tbl, int numa, rnd_hid_attr_val_t *options); /* Finish cam export, free all memory, mark cam export inactive and report the number of layer groups exported */ @@ -39,7 +39,7 @@ /* load *fn_out with the cam-requested output file name in cam mode; useful for non layer based exporters */ -void pcb_cam_begin_nolayer(pcb_board_t *pcb, pcb_cam_t *dst, pcb_xform_t *dst_xform, const char *src, const char **fn_out); +void pcb_cam_begin_nolayer(pcb_board_t *pcb, pcb_cam_t *dst, rnd_xform_t *dst_xform, const char *src, const char **fn_out); /* Shall be the first rule in a cam capable exporter's set_layer_group() @@ -53,7 +53,7 @@ /* the logics behind pcb_cam_set_layer_group(); returns non-zero if the macro should return (and skip the current group) */ -int pcb_cam_set_layer_group_(pcb_cam_t *cam, pcb_layergrp_id_t group, const char *purpose, int purpi, unsigned int flags, pcb_xform_t **xform); +int pcb_cam_set_layer_group_(pcb_cam_t *cam, rnd_layergrp_id_t group, const char *purpose, int purpi, unsigned int flags, rnd_xform_t **xform); /*** CAM caller side API for global export ***/ @@ -84,12 +84,12 @@ /* Returns a filename base that can be used to output the layer. The file name is built in dest, the returned pointer is pointing to the array of dest. */ -char *pcb_layer_to_file_name(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style); -char *pcb_layer_to_file_name_append(gds_t *dest, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style); +char *pcb_layer_to_file_name(gds_t *dest, rnd_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style); +char *pcb_layer_to_file_name_append(gds_t *dest, rnd_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, pcb_file_name_style_t style); /* Returns a filename base that can be used to output the layer; if flags is 0, look it up. Copies result in dest (which should be at least PCB_DERIVE_FN_SUFF_LEN bytes wide). */ -void pcb_derive_default_filename(const char *pcbfile, pcb_export_opt_t *filename_attrib, const char *suffix); +void pcb_derive_default_filename(const char *pcbfile, rnd_export_opt_t *filename_attrib, const char *suffix); /* Same as pcb_derive_default_filename() but returns an allocated string directly, instead of manipulating an attribute */ Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 30970) +++ trunk/src/layer.c (revision 30971) @@ -199,7 +199,7 @@ /* need to recurse to subc */ PCB_SUBC_LOOP(data); { - pcb_layer_id_t n; + rnd_layer_id_t n; pcb_layer_t *sl; for(sl = subc->data->Layer, n = 0; n < subc->data->LayerN; sl++,n++) { @@ -235,7 +235,7 @@ return 1; } -rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t num) +rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, rnd_layer_id_t num) { if ((num >= 0) && (num < pcb->Data->LayerN)) return pcb_layer_is_empty_(pcb, pcb->Data->Layer + num); @@ -242,7 +242,7 @@ return pcb_false; } -pcb_layer_id_t pcb_layer_id(const pcb_data_t *Data, const pcb_layer_t *Layer) +rnd_layer_id_t pcb_layer_id(const pcb_data_t *Data, const pcb_layer_t *Layer) { if (Layer->parent_type == PCB_PARENT_UI) return pcb_uilayer_get_id(Layer); @@ -260,7 +260,7 @@ return -1; } -unsigned int pcb_layer_flags(const pcb_board_t *pcb, pcb_layer_id_t layer_idx) +unsigned int pcb_layer_flags(const pcb_board_t *pcb, rnd_layer_id_t layer_idx) { pcb_layer_t *l; @@ -283,7 +283,7 @@ /* real layer: have to do a layer stack based lookup; but at least we have a real layer ID */ if (!layer->is_bound) { pcb_data_t *data = layer->parent.data; - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (data == NULL) return 0; @@ -308,7 +308,7 @@ return layer->meta.bound.type; } -int pcb_layer_purpose(const pcb_board_t *pcb, pcb_layer_id_t layer_idx, const char **out) +int pcb_layer_purpose(const pcb_board_t *pcb, rnd_layer_id_t layer_idx, const char **out) { pcb_layergrp_t *grp; @@ -349,7 +349,7 @@ /* real layer: have to do a layer stack based lookup; but at least we have a real layer ID */ if (!layer->is_bound) { pcb_data_t *data = layer->parent.data; - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (data == NULL) return 0; @@ -405,7 +405,7 @@ -int pcb_layer_list(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layer_id_t *res, int res_len) +int pcb_layer_list(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layer_id_t *res, int res_len) { int n, used = 0; pcb_virt_layer_t *v; @@ -427,7 +427,7 @@ } /* optimization: code dup for speed */ -int pcb_layer_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layer_id_t *res, int res_len, int purpi, const char *purpose) +int pcb_layer_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layer_id_t *res, int res_len, int purpi, const char *purpose) { int n, used = 0; pcb_virt_layer_t *v; @@ -455,7 +455,7 @@ } -int pcb_layer_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layer_id_t *res, int res_len) +int pcb_layer_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layer_id_t *res, int res_len) { int n, used = 0; pcb_virt_layer_t *v; @@ -476,9 +476,9 @@ return used; } -pcb_layer_id_t pcb_layer_by_name(pcb_data_t *data, const char *name) +rnd_layer_id_t pcb_layer_by_name(pcb_data_t *data, const char *name) { - pcb_layer_id_t n; + rnd_layer_id_t n; for (n = 0; n < data->LayerN; n++) if (strcmp(data->Layer[n].name, name) == 0) return n; @@ -487,7 +487,7 @@ void pcb_layers_reset(pcb_board_t *pcb) { - pcb_layer_id_t n; + rnd_layer_id_t n; /* reset everything to empty, even if that's invalid (no top/bottom copper) for the rest of the code: the (embedded) default design will overwrite this. */ @@ -519,9 +519,9 @@ } static void pcb_layer_undoable_created(pcb_board_t *pcb, pcb_layer_t *l); -pcb_layer_id_t pcb_layer_create(pcb_board_t *pcb, pcb_layergrp_id_t grp, const char *lname, rnd_bool undoable) +rnd_layer_id_t pcb_layer_create(pcb_board_t *pcb, rnd_layergrp_id_t grp, const char *lname, rnd_bool undoable) { - pcb_layer_id_t id; + rnd_layer_id_t id; layer_if_too_many(pcb, return -1); @@ -624,7 +624,7 @@ return 0; } -int pcb_layer_rename(pcb_data_t *data, pcb_layer_id_t layer, const char *lname, rnd_bool undoable) +int pcb_layer_rename(pcb_data_t *data, rnd_layer_id_t layer, const char *lname, rnd_bool undoable) { return pcb_layer_rename_(&data->Layer[layer], rnd_strdup(lname), undoable); } @@ -689,7 +689,7 @@ return 0; } -int pcb_layer_recolor(pcb_data_t *data, pcb_layer_id_t layer, const char *color, rnd_bool undoable) +int pcb_layer_recolor(pcb_data_t *data, rnd_layer_id_t layer, const char *color, rnd_bool undoable) { rnd_color_t clr; rnd_color_load_str(&clr, color); @@ -700,8 +700,8 @@ static int is_last_top_copper_layer(pcb_board_t *pcb, int layer) { - pcb_layergrp_id_t cgroup = pcb_layer_get_group(pcb, pcb->LayerGroups.len + PCB_COMPONENT_SIDE); - pcb_layergrp_id_t lgroup = pcb_layer_get_group(pcb, layer); + rnd_layergrp_id_t cgroup = pcb_layer_get_group(pcb, pcb->LayerGroups.len + PCB_COMPONENT_SIDE); + rnd_layergrp_id_t lgroup = pcb_layer_get_group(pcb, layer); if (cgroup == lgroup && pcb->LayerGroups.grp[lgroup].len == 1) return 1; return 0; @@ -768,7 +768,7 @@ } /* Initialize a new layer with safe initial values */ -static void layer_init(pcb_board_t *pcb, pcb_layer_t *lp, pcb_layer_id_t idx, pcb_layergrp_id_t gid, pcb_data_t *parent) +static void layer_init(pcb_board_t *pcb, pcb_layer_t *lp, rnd_layer_id_t idx, rnd_layergrp_id_t gid, pcb_data_t *parent) { memset(lp, 0, sizeof(pcb_layer_t)); lp->meta.real.grp = gid; @@ -786,11 +786,11 @@ pcb_layer_setup(lp, parent); } -static pcb_layer_t *pcb_layer_move_append_(pcb_board_t *pcb, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp) +static pcb_layer_t *pcb_layer_move_append_(pcb_board_t *pcb, rnd_layer_id_t new_index, rnd_layergrp_id_t new_in_grp) { pcb_layergrp_t *g; pcb_layer_t *lp; - pcb_layer_id_t new_lid = pcb->Data->LayerN++; + rnd_layer_id_t new_lid = pcb->Data->LayerN++; int grp_idx; lp = &pcb->Data->Layer[new_lid]; @@ -812,7 +812,7 @@ /* shift group members up and insert the new layer in group */ if ((g->len > grp_idx) && (grp_idx >= 0)) - memmove(g->lid+grp_idx+1, g->lid+grp_idx, (g->len - grp_idx) * sizeof(pcb_layer_id_t)); + memmove(g->lid+grp_idx+1, g->lid+grp_idx, (g->len - grp_idx) * sizeof(rnd_layer_id_t)); if (grp_idx < 0) grp_idx = 0; g->lid[grp_idx] = new_lid; @@ -824,12 +824,12 @@ return lp; } -static pcb_layer_t *pcb_layer_move_insert_(pcb_board_t *pcb, pcb_layer_id_t new_lid, pcb_layergrp_id_t new_in_grp, int grp_idx) +static pcb_layer_t *pcb_layer_move_insert_(pcb_board_t *pcb, rnd_layer_id_t new_lid, rnd_layergrp_id_t new_in_grp, int grp_idx) { pcb_layergrp_t *g; pcb_layer_t *lp; - pcb_layergrp_id_t gid; - pcb_layer_id_t lid; + rnd_layergrp_id_t gid; + rnd_layer_id_t lid; /* update lids in all groups (shifting down idx) */ @@ -855,7 +855,7 @@ /* shift target group members up and insert the new layer in group */ g = pcb_get_layergrp(pcb, new_in_grp); if ((g->len > grp_idx) && (grp_idx >= 0)) - memmove(g->lid+grp_idx+1, g->lid+grp_idx, (g->len - grp_idx) * sizeof(pcb_layer_id_t)); + memmove(g->lid+grp_idx+1, g->lid+grp_idx, (g->len - grp_idx) * sizeof(rnd_layer_id_t)); g->lid[grp_idx] = new_lid; g->len++; @@ -866,10 +866,10 @@ return lp; } -static int pcb_layer_move_delete_(pcb_board_t *pcb, pcb_layer_id_t old_index, rnd_bool undoable) +static int pcb_layer_move_delete_(pcb_board_t *pcb, rnd_layer_id_t old_index, rnd_bool undoable) { - pcb_layer_id_t l; - pcb_layergrp_id_t gid; + rnd_layer_id_t l; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; int grp_idx, remaining; @@ -888,7 +888,7 @@ remaining = (g->len - grp_idx - 1); if (remaining > 0) - memmove(g->lid+grp_idx, g->lid+grp_idx+1, remaining * sizeof(pcb_layer_id_t)); + memmove(g->lid+grp_idx, g->lid+grp_idx+1, remaining * sizeof(rnd_layer_id_t)); g->len--; /* update lids in all groups (shifting down idx) */ @@ -923,13 +923,13 @@ typedef struct { pcb_board_t *pcb; unsigned append:1; - pcb_layer_id_t lid; + rnd_layer_id_t lid; long in_grp_idx; /* fields */ char *name; pcb_layer_combining_t comb; - pcb_layergrp_id_t grp; + rnd_layergrp_id_t grp; rnd_color_t color; } undo_layer_move_t; @@ -981,7 +981,7 @@ static long layer_idx_in_grp(pcb_board_t *pcb, pcb_layer_t *l) { - pcb_layer_id_t lid = l - pcb->Data->Layer; + rnd_layer_id_t lid = l - pcb->Data->Layer; pcb_layergrp_t *g; if ((lid < 0) || (lid >= pcb->Data->LayerN)) @@ -1012,7 +1012,7 @@ } -static int pcb_layer_move_append(pcb_board_t *pcb, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, int undoable) +static int pcb_layer_move_append(pcb_board_t *pcb, rnd_layer_id_t new_index, rnd_layergrp_id_t new_in_grp, int undoable) { pcb_layer_t *l; @@ -1025,7 +1025,7 @@ return 0; } -static int pcb_layer_move_delete(pcb_board_t *pcb, pcb_layer_id_t old_index, int undoable) +static int pcb_layer_move_delete(pcb_board_t *pcb, rnd_layer_id_t old_index, int undoable) { undo_layer_move_t *m, mtmp; pcb_layer_t *l; @@ -1057,7 +1057,7 @@ } -int pcb_layer_move(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, rnd_bool undoable) +int pcb_layer_move(pcb_board_t *pcb, rnd_layer_id_t old_index, rnd_layer_id_t new_index, rnd_layergrp_id_t new_in_grp, rnd_bool undoable) { /* sanity checks */ if (old_index < -1 || old_index >= pcb->Data->LayerN) { @@ -1095,7 +1095,7 @@ return 1; } -const char *pcb_layer_name(pcb_data_t *data, pcb_layer_id_t id) +const char *pcb_layer_name(pcb_data_t *data, rnd_layer_id_t id) { if (id < 0) return NULL; @@ -1106,7 +1106,7 @@ return NULL; } -pcb_layer_t *pcb_get_layer(pcb_data_t *data, pcb_layer_id_t id) +pcb_layer_t *pcb_get_layer(pcb_data_t *data, rnd_layer_id_t id) { if ((id >= 0) && (id < data->LayerN)) return &data->Layer[id]; @@ -1140,8 +1140,8 @@ int from_top, from_bottom, res; pcb_layergrp_t *tcop = pcb_get_grp(&src_pcb->LayerGroups, PCB_LYT_TOP, PCB_LYT_COPPER); pcb_layergrp_t *bcop = pcb_get_grp(&src_pcb->LayerGroups, PCB_LYT_BOTTOM, PCB_LYT_COPPER); - pcb_layergrp_id_t tcop_id = pcb_layergrp_id(src_pcb, tcop); - pcb_layergrp_id_t bcop_id = pcb_layergrp_id(src_pcb, bcop); + rnd_layergrp_id_t tcop_id = pcb_layergrp_id(src_pcb, tcop); + rnd_layergrp_id_t bcop_id = pcb_layergrp_id(src_pcb, bcop); res = pcb_layergrp_dist(src_pcb, src->meta.real.grp, tcop_id, PCB_LYT_COPPER, &from_top); res |= pcb_layergrp_dist(src_pcb, src->meta.real.grp, bcop_id, PCB_LYT_COPPER, &from_bottom); @@ -1230,7 +1230,7 @@ pcb_layer_t *pcb_layer_resolve_binding(pcb_board_t *pcb, pcb_layer_t *src) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; int best_score = 0; pcb_layer_t *best = NULL; @@ -1437,7 +1437,7 @@ void pcb_layer_auto_fixup(pcb_board_t *pcb) { - pcb_layer_id_t n; + rnd_layer_id_t n; /* old silk layers are always auto */ for(n = 0; n < pcb->Data->LayerN; n++) @@ -1445,7 +1445,7 @@ pcb->Data->Layer[n].comb |= PCB_LYC_AUTO; } -int pcb_layer_gui_set_vlayer(pcb_board_t *pcb, pcb_virtual_layer_t vid, int is_empty, pcb_xform_t **xform) +int pcb_layer_gui_set_vlayer(pcb_board_t *pcb, pcb_virtual_layer_t vid, int is_empty, rnd_xform_t **xform) { pcb_virt_layer_t *v = &pcb_virt_layers[vid]; assert((vid >= 0) && (vid < PCB_VLY_end)); @@ -1459,8 +1459,8 @@ TODO("layer: need to pass the flags of the group, not the flags of the layer once we have a group for each layer") if (pcb_render->set_layer_group != NULL) { - pcb_layergrp_id_t grp; - pcb_layer_id_t lid = v->new_id; + rnd_layergrp_id_t grp; + rnd_layer_id_t lid = v->new_id; grp = pcb_layer_get_group(pcb, lid); return pcb_render->set_layer_group(pcb_render, grp, v->purpose, v->purpi, lid, v->type, is_empty, xform); } @@ -1469,7 +1469,7 @@ return 1; } -int pcb_layer_gui_set_g_ui(pcb_layer_t *first, int is_empty, pcb_xform_t **xform) +int pcb_layer_gui_set_g_ui(pcb_layer_t *first, int is_empty, rnd_xform_t **xform) { /* if there's no renderer, that means no draw should be done */ if (pcb_render == NULL) Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 30970) +++ trunk/src/layer.h (revision 30971) @@ -136,12 +136,12 @@ union { struct { /* A real board layer */ - pcb_layergrp_id_t grp; /* the group this layer is in (cross-reference) */ + rnd_layergrp_id_t grp; /* the group this layer is in (cross-reference) */ rnd_bool vis; /* visible flag */ rnd_color_t color; /* copied */ int no_drc; /* whether to ignore the layer when checking the design rules */ const char *cookie; /* for UI layers: registration cookie; NULL for unused UI layers */ - pcb_xform_t xform; /* layer specified rendering transformation */ + rnd_xform_t xform; /* layer specified rendering transformation */ } real; struct { /* A subcircuit layer binding; list data are local but everything else is coming from board layers */ pcb_layer_t *real; /* NULL if unbound */ @@ -153,7 +153,7 @@ char *purpose; /* what the target doc/mech layer is used for */ unsigned user_specified:1; /* 1 if the user forced the binding */ - pcb_layer_id_t user_lid; + rnd_layer_id_t user_lid; } bound; } meta; @@ -161,7 +161,7 @@ }; /* returns the layer number for the passed copper or silk layer pointer */ -pcb_layer_id_t pcb_layer_id(const pcb_data_t *Data, const pcb_layer_t *Layer); +rnd_layer_id_t pcb_layer_id(const pcb_data_t *Data, const pcb_layer_t *Layer); /* the offsets of the two additional special layers (e.g. silk) for 'component' @@ -204,16 +204,16 @@ void pcb_layer_free_fields(pcb_layer_t *layer, rnd_bool undoable); /* Return the layer pointer (or NULL on invalid or virtual layers) for an id */ -pcb_layer_t *pcb_get_layer(pcb_data_t *data, pcb_layer_id_t id); +pcb_layer_t *pcb_get_layer(pcb_data_t *data, rnd_layer_id_t id); /* Return the name of a layer (real or virtual) or NULL on error NOTE: layer names may not be unique; returns the first case sensitive hit; slow linear search */ -pcb_layer_id_t pcb_layer_by_name(pcb_data_t *data, const char *name); +rnd_layer_id_t pcb_layer_by_name(pcb_data_t *data, const char *name); /* Returns pcb_true if the given layer is empty (there are no objects on the layer) */ rnd_bool pcb_layer_is_empty_(pcb_board_t *pcb, pcb_layer_t *ly); -rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, pcb_layer_id_t ly); +rnd_bool pcb_layer_is_empty(pcb_board_t *pcb, rnd_layer_id_t ly); /* Returns pcb_true if the given layer is empty - non-recursive variant (doesn't deal with side effects) */ rnd_bool pcb_layer_is_pure_empty(pcb_layer_t *layer); @@ -220,17 +220,17 @@ /* call the gui to set a virtual layer or the UI layer group */ -int pcb_layer_gui_set_vlayer(pcb_board_t *pcb, pcb_virtual_layer_t vid, int is_empty, pcb_xform_t **xform); -int pcb_layer_gui_set_g_ui(pcb_layer_t *first, int is_empty, pcb_xform_t **xform); +int pcb_layer_gui_set_vlayer(pcb_board_t *pcb, pcb_virtual_layer_t vid, int is_empty, rnd_xform_t **xform); +int pcb_layer_gui_set_g_ui(pcb_layer_t *first, int is_empty, rnd_xform_t **xform); /* returns a bitfield of pcb_layer_type_t; returns 0 if layer_idx or layer is invalid. */ -unsigned int pcb_layer_flags(const pcb_board_t *pcb, pcb_layer_id_t layer_idx); +unsigned int pcb_layer_flags(const pcb_board_t *pcb, rnd_layer_id_t layer_idx); unsigned int pcb_layer_flags_(const pcb_layer_t *layer); /* Return the purpi of the group of a layer; if out is not NULL, also copy a pointer to the purpose string there (valid until a layer change) */ -int pcb_layer_purpose(const pcb_board_t *pcb, pcb_layer_id_t layer_idx, const char **out); +int pcb_layer_purpose(const pcb_board_t *pcb, rnd_layer_id_t layer_idx, const char **out); int pcb_layer_purpose_(const pcb_layer_t *layer, const char **out); @@ -265,9 +265,9 @@ The version that ends in 'p' also matches purpose if purpi is not -1 and/or purpose is not NULL. */ -int pcb_layer_list(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layer_id_t *res, int res_len); -int pcb_layer_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layer_id_t *res, int res_len); -int pcb_layer_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layer_id_t *res, int res_len, int purpi, const char *purpose); +int pcb_layer_list(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layer_id_t *res, int res_len); +int pcb_layer_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layer_id_t *res, int res_len); +int pcb_layer_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layer_id_t *res, int res_len, int purpi, const char *purpose); /**** layer creation (for load/import code) ****/ @@ -279,17 +279,17 @@ void pcb_layers_reset(pcb_board_t *pcb); /* Create a new layer and put it in an existing group (if grp is not -1). */ -pcb_layer_id_t pcb_layer_create(pcb_board_t *pcb, pcb_layergrp_id_t grp, const char *lname, rnd_bool undoable); +rnd_layer_id_t pcb_layer_create(pcb_board_t *pcb, rnd_layergrp_id_t grp, const char *lname, rnd_bool undoable); /* Return the name of a layer (resolving the true name of virtual layers too) */ -const char *pcb_layer_name(pcb_data_t *data, pcb_layer_id_t id); +const char *pcb_layer_name(pcb_data_t *data, rnd_layer_id_t id); /* Return the default color for a new layer from the config */ const rnd_color_t *pcb_layer_default_color(int idx, pcb_layer_type_t lyt); /* Rename/recolor an existing layer by idx */ -int pcb_layer_rename(pcb_data_t *data, pcb_layer_id_t layer, const char *lname, rnd_bool undoable); -int pcb_layer_recolor(pcb_data_t *data, pcb_layer_id_t layer, const char *lcolor, rnd_bool undoable); +int pcb_layer_rename(pcb_data_t *data, rnd_layer_id_t layer, const char *lname, rnd_bool undoable); +int pcb_layer_recolor(pcb_data_t *data, rnd_layer_id_t layer, const char *lcolor, rnd_bool undoable); /* changes the color of a layer; string has to be allocated by the caller (pcb_strdup) */ int pcb_layer_rename_(pcb_layer_t *Layer, char *Name, rnd_bool undoable); @@ -300,7 +300,7 @@ /* index is 0..PCB_MAX_LAYER-1. If old_index is -1, a new layer is inserted at that index. If new_index is -1, the specified layer is deleted. Returns non-zero on error, zero if OK. */ -int pcb_layer_move(pcb_board_t *pcb, pcb_layer_id_t old_index, pcb_layer_id_t new_index, pcb_layergrp_id_t new_in_grp, rnd_bool undoable); +int pcb_layer_move(pcb_board_t *pcb, rnd_layer_id_t old_index, rnd_layer_id_t new_index, rnd_layergrp_id_t new_in_grp, rnd_bool undoable); /* set up dst to be a bound layer with the right offset in the stack; src_pcb @@ -352,7 +352,7 @@ have a real layer in the array */ typedef struct pcb_virt_layer_s { char *name; - pcb_layer_id_t new_id; + rnd_layer_id_t new_id; pcb_layer_type_t type; const char *purpose; int purpi; Index: trunk/src/layer_addr.c =================================================================== --- trunk/src/layer_addr.c (revision 30970) +++ trunk/src/layer_addr.c (revision 30971) @@ -133,13 +133,13 @@ return 0; } -void pcb_parse_layer_supplements(char **spk, char **spv, int spc, char **purpose, pcb_xform_t **xf, pcb_xform_t *xf_) +void pcb_parse_layer_supplements(char **spk, char **spv, int spc, char **purpose, rnd_xform_t **xf, rnd_xform_t *xf_) { int n; *purpose = NULL; if (xf_ != NULL) - memset(xf_, 0, sizeof(pcb_xform_t)); + memset(xf_, 0, sizeof(rnd_xform_t)); for(n = 0; n < spc; n++) { char *key = spk[n], *val = spv[n]; @@ -196,9 +196,9 @@ } -int pcb_layergrp_list_by_addr(pcb_board_t *pcb, const char *curr, pcb_layergrp_id_t gids[PCB_MAX_LAYERGRP], char **spk, char **spv, int spc, int *vid, pcb_xform_t **xf, pcb_xform_t *xf_in, const char *err_prefix) +int pcb_layergrp_list_by_addr(pcb_board_t *pcb, const char *curr, rnd_layergrp_id_t gids[PCB_MAX_LAYERGRP], char **spk, char **spv, int spc, int *vid, rnd_xform_t **xf, rnd_xform_t *xf_in, const char *err_prefix) { - pcb_layergrp_id_t gid, lgids[PCB_MAX_LAYERGRP]; + rnd_layergrp_id_t gid, lgids[PCB_MAX_LAYERGRP]; int gids_max = PCB_MAX_LAYERGRP; char *purpose; @@ -287,10 +287,10 @@ return 0; } -static pcb_layer_id_t layer_str2id_data(pcb_board_t *pcb, pcb_data_t *data, const char *str) +static rnd_layer_id_t layer_str2id_data(pcb_board_t *pcb, pcb_data_t *data, const char *str) { char *end; - pcb_layer_id_t id; + rnd_layer_id_t id; if (*str == '#') { id = strtol(str+1, &end, 10); @@ -313,7 +313,7 @@ return -1; } -static pcb_layer_id_t layer_str2id_grp(pcb_board_t *pcb, pcb_layergrp_t *grp, const char *str) +static rnd_layer_id_t layer_str2id_grp(pcb_board_t *pcb, pcb_layergrp_t *grp, const char *str) { char *end; long id, n; @@ -355,7 +355,7 @@ return -1; } -pcb_layer_id_t pcb_layer_str2id(pcb_data_t *data, const char *str) +rnd_layer_id_t pcb_layer_str2id(pcb_data_t *data, const char *str) { char *sep; pcb_board_t *pcb = NULL; @@ -365,7 +365,7 @@ sep = strchr(str, '/'); if (sep != NULL) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; if (pcb == NULL) return -1; /* group addressing works only on a board */ @@ -379,14 +379,14 @@ return layer_str2id_data(pcb, data, str); } -pcb_layergrp_id_t pcb_layergrp_str2id(pcb_board_t *pcb, const char *str) +rnd_layergrp_id_t pcb_layergrp_str2id(pcb_board_t *pcb, const char *str) { char *end, *tmp = NULL; const char *curr; - pcb_layer_id_t gid = -1; + rnd_layer_id_t gid = -1; char *spk[64], *spv[64]; int spc = 0, numg; - pcb_layergrp_id_t gids[PCB_MAX_LAYERGRP]; + rnd_layergrp_id_t gids[PCB_MAX_LAYERGRP]; if (strchr(str, '(') != NULL) { curr = tmp = rnd_strdup(str); @@ -483,7 +483,7 @@ int pcb_layer_append_to_addr(pcb_board_t *pcb, pcb_layer_t *ly, gds_t *dst) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layergrp_t *grp; long n; char buf[64]; Index: trunk/src/layer_addr.h =================================================================== --- trunk/src/layer_addr.h (revision 30970) +++ trunk/src/layer_addr.h (revision 30971) @@ -8,8 +8,8 @@ /* Convert a textual layer(grp) reference into a layer ID. The text is either #id or a layer name. */ -pcb_layer_id_t pcb_layer_str2id(pcb_data_t *data, const char *str); -pcb_layergrp_id_t pcb_layergrp_str2id(pcb_board_t *pcb, const char *str); +rnd_layer_id_t pcb_layer_str2id(pcb_data_t *data, const char *str); +rnd_layergrp_id_t pcb_layergrp_str2id(pcb_board_t *pcb, const char *str); /* Convert a layer(grp) into a reusable address; returns NULL on error; caller needs to free() the returned string */ @@ -30,7 +30,7 @@ char *pcb_parse_layergrp_address(char *curr, char **spk, char **spv, int *spc); extern char *pcb_parse_layergrp_err; -void pcb_parse_layer_supplements(char **spk, char **spv, int spc, char **purpose, pcb_xform_t **xf, pcb_xform_t *xf_); +void pcb_parse_layer_supplements(char **spk, char **spv, int spc, char **purpose, rnd_xform_t **xf, rnd_xform_t *xf_); /* parse addr into: - a list of layer group IDs @@ -47,6 +47,6 @@ - a positive integer if 1 or more real matching groups are found - -1 on error (typically syntax error) */ -int pcb_layergrp_list_by_addr(pcb_board_t *pcb, const char *addr, pcb_layergrp_id_t gids[PCB_MAX_LAYERGRP], char **spk, char **spv, int spc, int *vid, pcb_xform_t **xf, pcb_xform_t *xf_in, const char *err_prefix); +int pcb_layergrp_list_by_addr(pcb_board_t *pcb, const char *addr, rnd_layergrp_id_t gids[PCB_MAX_LAYERGRP], char **spk, char **spv, int spc, int *vid, rnd_xform_t **xf, rnd_xform_t *xf_in, const char *err_prefix); #endif Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 30970) +++ trunk/src/layer_grp.c (revision 30971) @@ -74,7 +74,7 @@ NOTIFY(pcb); } -pcb_layergrp_id_t pcb_layergrp_id(const pcb_board_t *pcb, const pcb_layergrp_t *grp) +rnd_layergrp_id_t pcb_layergrp_id(const pcb_board_t *pcb, const pcb_layergrp_t *grp) { if ((grp >= &pcb->LayerGroups.grp[0]) && (grp < &pcb->LayerGroups.grp[pcb->LayerGroups.len])) return grp - &pcb->LayerGroups.grp[0]; @@ -81,7 +81,7 @@ return -1; } -pcb_layergrp_id_t pcb_layer_get_group_(pcb_layer_t *Layer) +rnd_layergrp_id_t pcb_layer_get_group_(pcb_layer_t *Layer) { if (!Layer->is_bound) return Layer->meta.real.grp; @@ -92,7 +92,7 @@ return Layer->meta.bound.real->meta.real.grp; } -pcb_layergrp_t *pcb_get_layergrp(pcb_board_t *pcb, pcb_layergrp_id_t gid) +pcb_layergrp_t *pcb_get_layergrp(pcb_board_t *pcb, rnd_layergrp_id_t gid) { if ((gid < 0) || (gid >= pcb->LayerGroups.len)) return NULL; @@ -100,7 +100,7 @@ } -pcb_layergrp_id_t pcb_layer_get_group(pcb_board_t *pcb, pcb_layer_id_t lid) +rnd_layergrp_id_t pcb_layer_get_group(pcb_board_t *pcb, rnd_layer_id_t lid) { if ((lid < 0) || (lid >= pcb->Data->LayerN)) return -1; @@ -108,7 +108,7 @@ return pcb_layer_get_group_(&pcb->Data->Layer[lid]); } -int pcb_layergrp_del_layer(pcb_board_t *pcb, pcb_layergrp_id_t gid, pcb_layer_id_t lid) +int pcb_layergrp_del_layer(pcb_board_t *pcb, rnd_layergrp_id_t gid, rnd_layer_id_t lid) { int n; pcb_layergrp_t *grp; @@ -135,7 +135,7 @@ if (grp->lid[n] == lid) { int remain = grp->len - n - 1; if (remain > 0) - memmove(&grp->lid[n], &grp->lid[n+1], remain * sizeof(pcb_layer_id_t)); + memmove(&grp->lid[n], &grp->lid[n+1], remain * sizeof(rnd_layer_id_t)); grp->len--; layer->meta.real.grp = -1; NOTIFY(pcb); @@ -154,10 +154,10 @@ pcb_layergrp_setup(g, pcb); } -pcb_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, pcb_layergrp_id_t gid, int auto_substrate, rnd_bool undoable) +rnd_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, rnd_layergrp_id_t gid, int auto_substrate, rnd_bool undoable) { pcb_layergrp_t *ng, *og = pcb_get_layergrp(pcb, gid); - pcb_layergrp_id_t after; + rnd_layergrp_id_t after; if (og == NULL) return -1; @@ -189,7 +189,7 @@ } -pcb_layergrp_id_t pcb_layer_move_to_group(pcb_board_t *pcb, pcb_layer_id_t lid, pcb_layergrp_id_t gid) +rnd_layergrp_id_t pcb_layer_move_to_group(pcb_board_t *pcb, rnd_layer_id_t lid, rnd_layergrp_id_t gid) { if (pcb_layergrp_del_layer(pcb, -1, lid) != 0) return -1; @@ -199,7 +199,7 @@ return gid; } -unsigned int pcb_layergrp_flags(const pcb_board_t *pcb, pcb_layergrp_id_t gid) +unsigned int pcb_layergrp_flags(const pcb_board_t *pcb, rnd_layergrp_id_t gid) { if ((gid < 0) || (gid >= pcb->LayerGroups.len)) @@ -208,7 +208,7 @@ return pcb->LayerGroups.grp[gid].ltype; } -const char *pcb_layergrp_name(pcb_board_t *pcb, pcb_layergrp_id_t gid) +const char *pcb_layergrp_name(pcb_board_t *pcb, rnd_layergrp_id_t gid) { if ((gid < 0) || (gid >= pcb->LayerGroups.len)) @@ -217,7 +217,7 @@ return pcb->LayerGroups.grp[gid].name; } -rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, pcb_layergrp_id_t num) +rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, rnd_layergrp_id_t num) { int i; pcb_layergrp_t *g = &pcb->LayerGroups.grp[num]; @@ -235,7 +235,7 @@ return pcb_true; } -rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, pcb_layergrp_id_t num) +rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, rnd_layergrp_id_t num) { int i; pcb_layergrp_t *g = &pcb->LayerGroups.grp[num]; @@ -255,7 +255,7 @@ } -int pcb_layergrp_free(pcb_board_t *pcb, pcb_layergrp_id_t id) +int pcb_layergrp_free(pcb_board_t *pcb, rnd_layergrp_id_t id) { pcb_layer_stack_t *stack = &pcb->LayerGroups; if ((id >= 0) && (id < stack->len)) { @@ -272,7 +272,7 @@ return -1; } -int pcb_layergrp_move_onto(pcb_board_t *pcb, pcb_layergrp_id_t dst, pcb_layergrp_id_t src) +int pcb_layergrp_move_onto(pcb_board_t *pcb, rnd_layergrp_id_t dst, rnd_layergrp_id_t src) { pcb_layer_stack_t *stack = &pcb->LayerGroups; pcb_layergrp_t *d, *s; @@ -297,10 +297,10 @@ return 0; } -static int flush_item(const char *s, const char *start, pcb_layer_id_t *lids, int *lids_len, pcb_layer_type_t *loc) +static int flush_item(const char *s, const char *start, rnd_layer_id_t *lids, int *lids_len, pcb_layer_type_t *loc) { char *end; - pcb_layer_id_t lid; + rnd_layer_id_t lid; switch (*start) { case 'c': case 'C': case 't': case 'T': *loc = PCB_LYT_TOP; break; case 's': case 'S': case 'b': case 'B': *loc = PCB_LYT_BOTTOM; break; @@ -325,7 +325,7 @@ return NULL; } -pcb_layergrp_t *pcb_layergrp_insert_after(pcb_board_t *pcb, pcb_layergrp_id_t where) +pcb_layergrp_t *pcb_layergrp_insert_after(pcb_board_t *pcb, rnd_layergrp_id_t where) { pcb_layer_stack_t *stack = &pcb->LayerGroups; pcb_layergrp_t *g; @@ -460,13 +460,13 @@ /* Move an inclusive block of groups [from..to] by delta on the stack, assuming target is already cleared and the new hole will be cleared by the caller */ -static void move_grps(pcb_board_t *pcb, pcb_layer_stack_t *stk, pcb_layergrp_id_t from, pcb_layergrp_id_t to, int delta) +static void move_grps(pcb_board_t *pcb, pcb_layer_stack_t *stk, rnd_layergrp_id_t from, rnd_layergrp_id_t to, int delta) { int g, remaining, n; for(g = from; g <= to; g++) { for(n = 0; n < stk->grp[g].len; n++) { - pcb_layer_id_t lid =stk->grp[g].lid[n]; + rnd_layer_id_t lid =stk->grp[g].lid[n]; if ((lid >= 0) && (lid < pcb->Data->LayerN)) { pcb_layer_t *l = &pcb->Data->Layer[lid]; if (l->meta.real.grp > 0) @@ -480,7 +480,7 @@ memmove(&stk->grp[from + delta], &stk->grp[from], sizeof(pcb_layergrp_t) * remaining); } -int pcb_layergrp_index_in_grp(pcb_layergrp_t *grp, pcb_layer_id_t lid) +int pcb_layergrp_index_in_grp(pcb_layergrp_t *grp, rnd_layer_id_t lid) { int idx; for(idx = 0; idx < grp->len; idx++) @@ -491,10 +491,10 @@ /*** undoable step within the group ***/ -static int pcb_layergrp_step_layer_(pcb_board_t *pcb, pcb_layergrp_t *grp, pcb_layer_id_t lid, int delta) +static int pcb_layergrp_step_layer_(pcb_board_t *pcb, pcb_layergrp_t *grp, rnd_layer_id_t lid, int delta) { int idx, idx2; - pcb_layer_id_t tmp; + rnd_layer_id_t tmp; for(idx = 0; idx < grp->len; idx++) { if (grp->lid[idx] == lid) { @@ -526,8 +526,8 @@ typedef struct { pcb_board_t *pcb; - pcb_layergrp_id_t gid; - pcb_layer_id_t lid; + rnd_layergrp_id_t gid; + rnd_layer_id_t lid; int delta; } undo_layergrp_steply_t; @@ -557,7 +557,7 @@ undo_layergrp_steply_print }; -int pcb_layergrp_step_layer(pcb_board_t *pcb, pcb_layergrp_t *grp, pcb_layer_id_t lid, int delta) +int pcb_layergrp_step_layer(pcb_board_t *pcb, pcb_layergrp_t *grp, rnd_layer_id_t lid, int delta) { undo_layergrp_steply_t *s = pcb_undo_alloc(pcb, &undo_layergrp_steply, sizeof(undo_layergrp_steply_t)); int res; @@ -578,7 +578,7 @@ memset(src, 0, sizeof(pcb_layergrp_t)); } -static void pcb_layergrp_del_1(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, rnd_bool undoable) +static void pcb_layergrp_del_1(pcb_board_t *pcb, rnd_layergrp_id_t gid, int del_layers, rnd_bool undoable) { int n; pcb_layer_stack_t *stk = &pcb->LayerGroups; @@ -598,7 +598,7 @@ } } -static void pcb_layergrp_del_2(pcb_board_t *pcb, pcb_layergrp_id_t gid) +static void pcb_layergrp_del_2(pcb_board_t *pcb, rnd_layergrp_id_t gid) { pcb_layer_stack_t *stk = &pcb->LayerGroups; @@ -608,7 +608,7 @@ NOTIFY(pcb); } -static void pcb_layergrp_ins(pcb_board_t *pcb, pcb_layergrp_id_t gid, pcb_layergrp_t *src) +static void pcb_layergrp_ins(pcb_board_t *pcb, rnd_layergrp_id_t gid, pcb_layergrp_t *src) { pcb_layer_stack_t *stk = &pcb->LayerGroups; move_grps(pcb, stk, gid, stk->len-1, +1); @@ -620,7 +620,7 @@ typedef struct { pcb_board_t *pcb; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; unsigned int del:1; pcb_layergrp_t save; } undo_layergrp_del_t; @@ -665,7 +665,7 @@ }; -int pcb_layergrp_del(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, rnd_bool undoable) +int pcb_layergrp_del(pcb_board_t *pcb, rnd_layergrp_id_t gid, int del_layers, rnd_bool undoable) { undo_layergrp_del_t *r; pcb_layer_stack_t *stk = &pcb->LayerGroups; @@ -707,7 +707,7 @@ pcb_undo_inc_serial(); } -int pcb_layergrp_move(pcb_board_t *pcb, pcb_layergrp_id_t from, pcb_layergrp_id_t to_before) +int pcb_layergrp_move(pcb_board_t *pcb, rnd_layergrp_id_t from, rnd_layergrp_id_t to_before) { pcb_layer_stack_t *stk = &pcb->LayerGroups; pcb_layergrp_t tmp; @@ -751,7 +751,7 @@ pcb_layer_stack_t *LayerGroup = &pcb->LayerGroups; pcb_layergrp_t *g = pcb_get_grp(LayerGroup, PCB_LYT_ANYWHERE, PCB_LYT_BOUNDARY); if ((g != NULL) && (g[1].ltype & PCB_LYT_SUBSTRATE)) { - pcb_layergrp_id_t gid = g - LayerGroup->grp + 1; + rnd_layergrp_id_t gid = g - LayerGroup->grp + 1; pcb_layergrp_del(pcb, gid, 0, 0); } } @@ -794,7 +794,7 @@ int pcb_layer_parse_group_string(pcb_board_t *pcb, const char *grp_str, int LayerN, int oldfmt) { const char *s, *start; - pcb_layer_id_t lids[PCB_MAX_LAYER]; + rnd_layer_id_t lids[PCB_MAX_LAYER]; int lids_len = 0; pcb_layer_type_t loc = PCB_LYT_INTERN; pcb_layergrp_t *g; @@ -867,7 +867,7 @@ return 1; } -int pcb_layer_gui_set_layer(pcb_layergrp_id_t gid, const pcb_layergrp_t *grp, int is_empty, pcb_xform_t **xform) +int pcb_layer_gui_set_layer(rnd_layergrp_id_t gid, const pcb_layergrp_t *grp, int is_empty, rnd_xform_t **xform) { /* if there's no GUI, that means no draw should be done */ if (pcb_gui == NULL) @@ -883,7 +883,7 @@ return 1; } -int pcb_layer_gui_set_glayer(pcb_board_t *pcb, pcb_layergrp_id_t grp, int is_empty, pcb_xform_t **xform) +int pcb_layer_gui_set_glayer(pcb_board_t *pcb, rnd_layergrp_id_t grp, int is_empty, rnd_xform_t **xform) { return pcb_layer_gui_set_layer(grp, &pcb->LayerGroups.grp[grp], is_empty, xform); } @@ -900,7 +900,7 @@ used++; \ } while(0) -int pcb_layergrp_list(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layergrp_id_t *res, int res_len) +int pcb_layergrp_list(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layergrp_id_t *res, int res_len) { int group, used = 0; for (group = 0; group < pcb->LayerGroups.len; group++) { @@ -910,7 +910,7 @@ return used; } -int pcb_layergrp_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layergrp_id_t *res, int res_len, int purpi, const char *purpose) +int pcb_layergrp_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layergrp_id_t *res, int res_len, int purpi, const char *purpose) { int group, used = 0; const pcb_layergrp_t *g; @@ -924,7 +924,7 @@ return used; } -int pcb_layergrp_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layergrp_id_t *res, int res_len) +int pcb_layergrp_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layergrp_id_t *res, int res_len) { int group, used = 0; for (group = 0; group < pcb->LayerGroups.len; group++) { @@ -934,7 +934,7 @@ return used; } -int pcb_layer_add_in_group_(pcb_board_t *pcb, pcb_layergrp_t *grp, pcb_layergrp_id_t group_id, pcb_layer_id_t layer_id) +int pcb_layer_add_in_group_(pcb_board_t *pcb, pcb_layergrp_t *grp, rnd_layergrp_id_t group_id, rnd_layer_id_t layer_id) { if ((layer_id < 0) || (layer_id >= pcb->Data->LayerN)) return -1; @@ -946,7 +946,7 @@ return 0; } -int pcb_layer_add_in_group(pcb_board_t *pcb, pcb_layer_id_t layer_id, pcb_layergrp_id_t group_id) +int pcb_layer_add_in_group(pcb_board_t *pcb, rnd_layer_id_t layer_id, rnd_layergrp_id_t group_id) { if ((group_id < 0) || (group_id >= pcb->LayerGroups.len)) return -1; @@ -989,7 +989,7 @@ void pcb_layer_group_setup_silks(pcb_board_t *pcb) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; for(gid = 0; gid < pcb->LayerGroups.len; gid++) if ((pcb->LayerGroups.grp[gid].ltype & PCB_LYT_SILK) && (pcb->LayerGroups.grp[gid].len == 0)) pcb_layer_create(pcb, gid, "silk", 0); @@ -1058,7 +1058,7 @@ return 0; } -int pcb_layergrp_rename(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *name, rnd_bool undoable) +int pcb_layergrp_rename(pcb_board_t *pcb, rnd_layergrp_id_t gid, const char *name, rnd_bool undoable) { pcb_layergrp_t *grp = pcb_get_layergrp(pcb, gid); if (grp == NULL) return -1; @@ -1205,9 +1205,9 @@ } -pcb_layergrp_id_t pcb_layergrp_by_name(pcb_board_t *pcb, const char *name) +rnd_layergrp_id_t pcb_layergrp_by_name(pcb_board_t *pcb, const char *name) { - pcb_layergrp_id_t n; + rnd_layergrp_id_t n; for (n = 0; n < pcb->LayerGroups.len; n++) if ((pcb->LayerGroups.grp[n].name != NULL) && (strcmp(pcb->LayerGroups.grp[n].name, name) == 0)) return n; @@ -1214,7 +1214,7 @@ return -1; } -int pcb_layergrp_dist(pcb_board_t *pcb, pcb_layergrp_id_t gid1, pcb_layergrp_id_t gid2, pcb_layer_type_t mask, int *diff) +int pcb_layergrp_dist(pcb_board_t *pcb, rnd_layergrp_id_t gid1, rnd_layergrp_id_t gid2, pcb_layer_type_t mask, int *diff) { int gid, d, cnt; @@ -1237,7 +1237,7 @@ return 0; } -pcb_layergrp_id_t pcb_layergrp_step(pcb_board_t *pcb, pcb_layergrp_id_t gid, int steps, pcb_layer_type_t mask) +rnd_layergrp_id_t pcb_layergrp_step(pcb_board_t *pcb, rnd_layergrp_id_t gid, int steps, pcb_layer_type_t mask) { int d; @@ -1268,10 +1268,10 @@ void pcb_layergrp_create_missing_substrate(pcb_board_t *pcb) { - pcb_layergrp_id_t g; - for(g = 0; g < ((pcb_layergrp_id_t)pcb->LayerGroups.len)-2; g++) { + rnd_layergrp_id_t g; + for(g = 0; g < ((rnd_layergrp_id_t)pcb->LayerGroups.len)-2; g++) { pcb_layergrp_t *g0 = &pcb->LayerGroups.grp[g], *g1 = &pcb->LayerGroups.grp[g+1]; - if ((g < ((pcb_layergrp_id_t)pcb->LayerGroups.len)-3) && (g1->ltype & PCB_LYT_BOUNDARY)) g1++; + if ((g < ((rnd_layergrp_id_t)pcb->LayerGroups.len)-3) && (g1->ltype & PCB_LYT_BOUNDARY)) g1++; if ((g0->ltype & PCB_LYT_COPPER) && (g1->ltype & PCB_LYT_COPPER)) { pcb_layergrp_t *ng = pcb_layergrp_insert_after(pcb, g); ng->ltype = PCB_LYT_INTERN | PCB_LYT_SUBSTRATE; @@ -1310,7 +1310,7 @@ if (ly->meta.bound.type & PCB_LYT_BOUNDARY) { pcb_layergrp_t *grp = pcb_get_grp_new_misc(pcb); - pcb_layer_id_t nlid; + rnd_layer_id_t nlid; pcb_layer_t *nly; grp->ltype = PCB_LYT_BOUNDARY; grp->name = rnd_strdup("outline"); @@ -1334,7 +1334,7 @@ grp = pcb_get_grp(&pcb->LayerGroups, ly->meta.bound.type & PCB_LYT_ANYWHERE, ly->meta.bound.type & PCB_LYT_ANYTHING); if (grp != NULL) { - pcb_layer_id_t lid = pcb_layer_create(pcb, pcb_layergrp_id(pcb, grp), ly->name, 0); + rnd_layer_id_t lid = pcb_layer_create(pcb, pcb_layergrp_id(pcb, grp), ly->name, 0); pcb_layer_t *nly = pcb_get_layer(pcb->Data, lid); nly->comb = ly->comb; continue; @@ -1474,7 +1474,7 @@ void pcb_layergrp_set_dflgly(pcb_board_t *pcb, pcb_layergrp_t *grp, const pcb_dflgmap_t *src, const char *grname, const char *lyname) { - pcb_layergrp_id_t gid = grp - pcb->LayerGroups.grp; + rnd_layergrp_id_t gid = grp - pcb->LayerGroups.grp; if (grname == NULL) grname = src->name; @@ -1490,7 +1490,7 @@ pcb_layergrp_set_purpose__(grp, rnd_strdup(src->purpose), 1); if (grp->len == 0) { - pcb_layer_id_t lid = pcb_layer_create(pcb, gid, lyname, 0); + rnd_layer_id_t lid = pcb_layer_create(pcb, gid, lyname, 0); if (lid >= 0) { pcb->Data->Layer[lid].comb = src->comb; } @@ -1502,7 +1502,7 @@ { const pcb_dflgmap_t *m; pcb_layergrp_t *grp; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; inhibit_notify++; for(m = map; m->name != NULL; m++) { @@ -1545,7 +1545,7 @@ pcb_layergrp_upgrade_by_map(pcb, pcb_dflgmap); } -static pcb_layergrp_id_t pcb_layergrp_get_cached(pcb_board_t *pcb, pcb_layer_id_t *cache, unsigned int loc, unsigned int typ) +static rnd_layergrp_id_t pcb_layergrp_get_cached(pcb_board_t *pcb, rnd_layer_id_t *cache, unsigned int loc, unsigned int typ) { pcb_layergrp_t *g; @@ -1565,51 +1565,51 @@ return *cache; } -pcb_layergrp_id_t pcb_layergrp_get_bottom_mask() +rnd_layergrp_id_t pcb_layergrp_get_bottom_mask() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_BOTTOM, PCB_LYT_MASK); } -pcb_layergrp_id_t pcb_layergrp_get_top_mask() +rnd_layergrp_id_t pcb_layergrp_get_top_mask() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_TOP, PCB_LYT_MASK); } -pcb_layergrp_id_t pcb_layergrp_get_bottom_paste() +rnd_layergrp_id_t pcb_layergrp_get_bottom_paste() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_BOTTOM, PCB_LYT_PASTE); } -pcb_layergrp_id_t pcb_layergrp_get_top_paste() +rnd_layergrp_id_t pcb_layergrp_get_top_paste() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_TOP, PCB_LYT_PASTE); } -pcb_layergrp_id_t pcb_layergrp_get_bottom_silk() +rnd_layergrp_id_t pcb_layergrp_get_bottom_silk() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_BOTTOM, PCB_LYT_SILK); } -pcb_layergrp_id_t pcb_layergrp_get_top_silk() +rnd_layergrp_id_t pcb_layergrp_get_top_silk() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_TOP, PCB_LYT_SILK); } -pcb_layergrp_id_t pcb_layergrp_get_bottom_copper() +rnd_layergrp_id_t pcb_layergrp_get_bottom_copper() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_BOTTOM, PCB_LYT_COPPER); } -pcb_layergrp_id_t pcb_layergrp_get_top_copper() +rnd_layergrp_id_t pcb_layergrp_get_top_copper() { - static pcb_layer_id_t cache = -1; + static rnd_layer_id_t cache = -1; return pcb_layergrp_get_cached(PCB, &cache, PCB_LYT_TOP, PCB_LYT_COPPER); } @@ -1616,7 +1616,7 @@ /* Note: these function is in this file mainly to access the static inlines */ int pcb_silk_on(pcb_board_t *pcb) { - static pcb_layer_id_t ts = -1, bs = -1; + static rnd_layer_id_t ts = -1, bs = -1; pcb_layergrp_get_cached(pcb, &ts, PCB_LYT_TOP, PCB_LYT_SILK); if ((ts >= 0) && (pcb->LayerGroups.grp[ts].vis)) return 1; @@ -1628,7 +1628,7 @@ int pcb_mask_on(pcb_board_t *pcb) { - static pcb_layer_id_t tm = -1, bm = -1; + static rnd_layer_id_t tm = -1, bm = -1; pcb_layergrp_get_cached(pcb, &tm, PCB_LYT_TOP, PCB_LYT_MASK); if ((tm >= 0) && (pcb->LayerGroups.grp[tm].vis)) return 1; @@ -1641,7 +1641,7 @@ int pcb_paste_on(pcb_board_t *pcb) { - static pcb_layer_id_t tp = -1, bp = -1; + static rnd_layer_id_t tp = -1, bp = -1; pcb_layergrp_get_cached(pcb, &tp, PCB_LYT_TOP, PCB_LYT_PASTE); if ((tp >= 0) && (pcb->LayerGroups.grp[tp].vis)) return 1; @@ -1654,7 +1654,7 @@ void pcb_layergrp_copper_cache_update(pcb_layer_stack_t *st) { - pcb_layergrp_id_t n; + rnd_layergrp_id_t n; if (st->len > st->cache.copper_alloced) { st->cache.copper_alloced = st->len + 64; st->cache.copper = realloc(st->cache.copper, sizeof(st->cache.copper[0]) * st->cache.copper_alloced); Index: trunk/src/layer_grp.h =================================================================== --- trunk/src/layer_grp.h (revision 30970) +++ trunk/src/layer_grp.h (revision 30971) @@ -40,7 +40,7 @@ struct pcb_layergrp_s { PCB_ANY_OBJ_FIELDS; rnd_cardinal_t len; /* number of layer IDs in use */ - pcb_layer_id_t lid[PCB_MAX_LAYER]; /* lid=layer ID */ + rnd_layer_id_t lid[PCB_MAX_LAYER]; /* lid=layer ID */ char *name; /* name of the physical layer (independent of the name of the layer groups) */ pcb_layer_type_t ltype; @@ -65,7 +65,7 @@ pcb_layergrp_t grp[PCB_MAX_LAYERGRP]; struct { /* cache copper groups from top to bottom for fast padstack ("bbvia") lookup */ int copper_len, copper_alloced; - pcb_layergrp_id_t *copper; + rnd_layergrp_id_t *copper; unsigned copper_valid:1; /* whether the cache is valid */ } cache; }; @@ -74,60 +74,60 @@ void pcb_layergroup_free_stack(pcb_layer_stack_t *st); /* Return the layer group for an id, or NULL on error (range check) */ -pcb_layergrp_t *pcb_get_layergrp(pcb_board_t *pcb, pcb_layergrp_id_t gid); +pcb_layergrp_t *pcb_get_layergrp(pcb_board_t *pcb, rnd_layergrp_id_t gid); /* Return the gid if grp is in the stackup of pcb (else return -1) */ -pcb_layergrp_id_t pcb_layergrp_id(const pcb_board_t *pcb, const pcb_layergrp_t *grp); +rnd_layergrp_id_t pcb_layergrp_id(const pcb_board_t *pcb, const pcb_layergrp_t *grp); /* Free a layer group (don't free the layers but detach them) */ -int pcb_layergrp_free(pcb_board_t *pcb, pcb_layergrp_id_t id); +int pcb_layergrp_free(pcb_board_t *pcb, rnd_layergrp_id_t id); /* lookup the group to which a layer belongs to returns -1 if no group is found */ -pcb_layergrp_id_t pcb_layer_get_group(pcb_board_t *pcb, pcb_layer_id_t Layer); -pcb_layergrp_id_t pcb_layer_get_group_(pcb_layer_t *Layer); +rnd_layergrp_id_t pcb_layer_get_group(pcb_board_t *pcb, rnd_layer_id_t Layer); +rnd_layergrp_id_t pcb_layer_get_group_(pcb_layer_t *Layer); /* Returns group actually moved to (i.e. either group or previous) */ -pcb_layergrp_id_t pcb_layer_move_to_group(pcb_board_t *pcb, pcb_layer_id_t layer, pcb_layergrp_id_t group); +rnd_layergrp_id_t pcb_layer_move_to_group(pcb_board_t *pcb, rnd_layer_id_t layer, rnd_layergrp_id_t group); /* Returns pcb_true if all layers in a group are empty */ -rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, pcb_layergrp_id_t lgrp); -rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, pcb_layergrp_id_t num); +rnd_bool pcb_layergrp_is_empty(pcb_board_t *pcb, rnd_layergrp_id_t lgrp); +rnd_bool pcb_layergrp_is_pure_empty(pcb_board_t *pcb, rnd_layergrp_id_t num); /* call the gui to set a layer group */ -int pcb_layer_gui_set_layer(pcb_layergrp_id_t gid, const pcb_layergrp_t *grp, int is_empty, pcb_xform_t **xform); -int pcb_layer_gui_set_glayer(pcb_board_t *pcb, pcb_layergrp_id_t grp, int is_empty, pcb_xform_t **xform); +int pcb_layer_gui_set_layer(rnd_layergrp_id_t gid, const pcb_layergrp_t *grp, int is_empty, rnd_xform_t **xform); +int pcb_layer_gui_set_glayer(pcb_board_t *pcb, rnd_layergrp_id_t grp, int is_empty, rnd_xform_t **xform); /* returns a bitfield of pcb_layer_type_t; returns 0 if layer_idx is invalid. */ -unsigned int pcb_layergrp_flags(const pcb_board_t *pcb, pcb_layergrp_id_t group_idx); -const char *pcb_layergrp_name(pcb_board_t *pcb, pcb_layergrp_id_t gid); +unsigned int pcb_layergrp_flags(const pcb_board_t *pcb, rnd_layergrp_id_t group_idx); +const char *pcb_layergrp_name(pcb_board_t *pcb, rnd_layergrp_id_t gid); /* Same as pcb_layer_list but lists layer groups. A group is matching if any layer in that group matches mask. */ -int pcb_layergrp_list(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layergrp_id_t *res, int res_len); -int pcb_layergrp_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layergrp_id_t *res, int res_len, int purpi, const char *purpose); -int pcb_layergrp_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, pcb_layergrp_id_t *res, int res_len); +int pcb_layergrp_list(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layergrp_id_t *res, int res_len); +int pcb_layergrp_listp(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layergrp_id_t *res, int res_len, int purpi, const char *purpose); +int pcb_layergrp_list_any(const pcb_board_t *pcb, pcb_layer_type_t mask, rnd_layergrp_id_t *res, int res_len); /* Put a layer in a group (the layer should not be in any other group); returns 0 on success */ -int pcb_layer_add_in_group(pcb_board_t *pcb, pcb_layer_id_t layer_id, pcb_layergrp_id_t group_id); -int pcb_layer_add_in_group_(pcb_board_t *pcb, pcb_layergrp_t *grp, pcb_layergrp_id_t group_id, pcb_layer_id_t layer_id); +int pcb_layer_add_in_group(pcb_board_t *pcb, rnd_layer_id_t layer_id, rnd_layergrp_id_t group_id); +int pcb_layer_add_in_group_(pcb_board_t *pcb, pcb_layergrp_t *grp, rnd_layergrp_id_t group_id, rnd_layer_id_t layer_id); /* Remove a layer group; if del_layers is zero, layers are kept but detached (.grp = -1), else layers are deleted too */ -int pcb_layergrp_del(pcb_board_t *pcb, pcb_layergrp_id_t gid, int del_layers, rnd_bool undoable); +int pcb_layergrp_del(pcb_board_t *pcb, rnd_layergrp_id_t gid, int del_layers, rnd_bool undoable); /* Remove a layer from a group */ -int pcb_layergrp_del_layer(pcb_board_t *pcb, pcb_layergrp_id_t gid, pcb_layer_id_t lid); +int pcb_layergrp_del_layer(pcb_board_t *pcb, rnd_layergrp_id_t gid, rnd_layer_id_t lid); /* Duplicate a layer group (with no layers); if auto_substrate is set, insert a substrate layer automatically if needed */ -pcb_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, pcb_layergrp_id_t gid, int auto_substrate, rnd_bool undoable); +rnd_layergrp_id_t pcb_layergrp_dup(pcb_board_t *pcb, rnd_layergrp_id_t gid, int auto_substrate, rnd_bool undoable); /* Move gfrom to to_before and shift the stack as necessary. Return -1 on range error */ -int pcb_layergrp_move(pcb_board_t *pcb, pcb_layergrp_id_t gfrom, pcb_layergrp_id_t to_before); +int pcb_layergrp_move(pcb_board_t *pcb, rnd_layergrp_id_t gfrom, rnd_layergrp_id_t to_before); /* Move src onto dst, not shifting the stack, free()'ing and overwriting dst, leaving a gap (0'd slot) at src */ -int pcb_layergrp_move_onto(pcb_board_t *pcb, pcb_layergrp_id_t dst, pcb_layergrp_id_t src); +int pcb_layergrp_move_onto(pcb_board_t *pcb, rnd_layergrp_id_t dst, rnd_layergrp_id_t src); /* Set up the administrative fields (type, parent) of a group */ void pcb_layergrp_setup(pcb_layergrp_t *g, pcb_board_t *parent); @@ -134,27 +134,27 @@ /* Insert a new layer group in the layer stack after the specified group */ -pcb_layergrp_t *pcb_layergrp_insert_after(pcb_board_t *pcb, pcb_layergrp_id_t where); +pcb_layergrp_t *pcb_layergrp_insert_after(pcb_board_t *pcb, rnd_layergrp_id_t where); /* Move lid 1 step towards the front (delta=-1) or end (delta=+1) of the layer list of the group. Return 0 on success (even when already reached the end of the list) or -1 on error. This operation is always undoable. */ -int pcb_layergrp_step_layer(pcb_board_t *pcb, pcb_layergrp_t *grp, pcb_layer_id_t lid, int delta); +int pcb_layergrp_step_layer(pcb_board_t *pcb, pcb_layergrp_t *grp, rnd_layer_id_t lid, int delta); /* Return the array index of lid within the grp's lid list or -1 if not on the list */ -int pcb_layergrp_index_in_grp(pcb_layergrp_t *grp, pcb_layer_id_t lid); +int pcb_layergrp_index_in_grp(pcb_layergrp_t *grp, rnd_layer_id_t lid); /* Calculate the distance between gid1 and gid2 in the stack, in number of layer groups matching mask. The result is placed in *diff. Returns 0 on success. Typical use case: gid1 is an internal copper layer, gid2 is the top copper layer, mask is PCB_LYT_COPPER -> *diff is the copper index of the internal layer from top */ -int pcb_layergrp_dist(pcb_board_t *pcb, pcb_layergrp_id_t gid1, pcb_layergrp_id_t gid2, pcb_layer_type_t mask, int *diff); +int pcb_layergrp_dist(pcb_board_t *pcb, rnd_layergrp_id_t gid1, rnd_layergrp_id_t gid2, pcb_layer_type_t mask, int *diff); /* walk the given amount steps on the stack among layer groups matching mask. A negative step goes upward. Typical use: "return the 2nd copper layer below this one" */ -pcb_layergrp_id_t pcb_layergrp_step(pcb_board_t *pcb, pcb_layergrp_id_t gid, int steps, pcb_layer_type_t mask); +rnd_layergrp_id_t pcb_layergrp_step(pcb_board_t *pcb, rnd_layergrp_id_t gid, int steps, pcb_layer_type_t mask); /* Enable/disable inhibition of layer changed events during layer group updates */ @@ -169,7 +169,7 @@ void pcb_layergrp_notify(pcb_board_t *pcb); /* Rename an existing layer by idx */ -int pcb_layergrp_rename(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *lname, rnd_bool undoable); +int pcb_layergrp_rename(pcb_board_t *pcb, rnd_layergrp_id_t gid, const char *lname, rnd_bool undoable); /* changes the name of a layer; memory has to be already allocated */ int pcb_layergrp_rename_(pcb_layergrp_t *grp, char *name, rnd_bool undoable); @@ -183,7 +183,7 @@ int pcb_layergrp_set_ltype(pcb_layergrp_t *g, pcb_layer_type_t lyt, rnd_bool undoable); /* Slow linear search for a layer group by name */ -pcb_layergrp_id_t pcb_layergrp_by_name(pcb_board_t *pcb, const char *name); +rnd_layergrp_id_t pcb_layergrp_by_name(pcb_board_t *pcb, const char *name); /* Create a layer for each unbindable layers from the layer array */ int pcb_layer_create_all_for_recipe(pcb_board_t *pcb, pcb_layer_t *layer, int num_layer); @@ -219,7 +219,7 @@ for (entry = 0; entry < ((pcb_board_t *)(cgl__pcb))->LayerGroups.grp[(group)].len; entry++) \ { \ pcb_layer_t *layer; \ - pcb_layer_id_t number; \ + rnd_layer_id_t number; \ number = ((pcb_board_t *)(cgl__pcb))->LayerGroups.grp[(group)].lid[entry]; \ if (!(pcb_layer_flags(PCB, number) & PCB_LYT_COPPER)) \ continue; \ @@ -246,14 +246,14 @@ /* Cached layer group lookups foir a few common cases */ -pcb_layergrp_id_t pcb_layergrp_get_bottom_mask(); -pcb_layergrp_id_t pcb_layergrp_get_top_mask(); -pcb_layergrp_id_t pcb_layergrp_get_bottom_paste(); -pcb_layergrp_id_t pcb_layergrp_get_top_paste(); -pcb_layergrp_id_t pcb_layergrp_get_bottom_silk(); -pcb_layergrp_id_t pcb_layergrp_get_top_silk(); -pcb_layergrp_id_t pcb_layergrp_get_bottom_copper(); -pcb_layergrp_id_t pcb_layergrp_get_top_copper(); +rnd_layergrp_id_t pcb_layergrp_get_bottom_mask(); +rnd_layergrp_id_t pcb_layergrp_get_top_mask(); +rnd_layergrp_id_t pcb_layergrp_get_bottom_paste(); +rnd_layergrp_id_t pcb_layergrp_get_top_paste(); +rnd_layergrp_id_t pcb_layergrp_get_bottom_silk(); +rnd_layergrp_id_t pcb_layergrp_get_top_silk(); +rnd_layergrp_id_t pcb_layergrp_get_bottom_copper(); +rnd_layergrp_id_t pcb_layergrp_get_top_copper(); /* return whether any silk or mask or paste layer group is visible */ Index: trunk/src/layer_it.h =================================================================== --- trunk/src/layer_it.h (revision 30970) +++ trunk/src/layer_it.h (revision 30971) @@ -35,17 +35,17 @@ typedef struct pcb_layer_it_s pcb_layer_it_t; /* Start an iteration matching exact flags or any of the flags; returns -1 if over */ -RND_INLINE pcb_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask); -RND_INLINE pcb_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask); +RND_INLINE rnd_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask); +RND_INLINE rnd_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask); /* next iteration; returns -1 if over */ -RND_INLINE pcb_layer_id_t pcb_layer_next(pcb_layer_it_t *it); +RND_INLINE rnd_layer_id_t pcb_layer_next(pcb_layer_it_t *it); /*************** inline implementation *************************/ struct pcb_layer_it_s { pcb_layer_stack_t *stack; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; rnd_cardinal_t lidx; unsigned int mask; unsigned int exact:1; @@ -52,7 +52,7 @@ unsigned int global:1; }; -RND_INLINE pcb_layer_id_t pcb_layer_next(pcb_layer_it_t *it) +RND_INLINE rnd_layer_id_t pcb_layer_next(pcb_layer_it_t *it) { if (it->global) { /* over all layers, random order, without any checks - go the cheap way, bypassing groups */ @@ -62,7 +62,7 @@ } else for(;;) { pcb_layergrp_t *g = &(it->stack->grp[it->gid]); - pcb_layer_id_t lid; + rnd_layer_id_t lid; unsigned int hit; if (it->lidx >= g->len) { /* layer list over in this group */ it->gid++; @@ -87,7 +87,7 @@ } } -RND_INLINE pcb_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask) +RND_INLINE rnd_layer_id_t pcb_layer_first(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int exact_mask) { it->stack = stack; it->mask = exact_mask; @@ -98,7 +98,7 @@ return pcb_layer_next(it); } -RND_INLINE pcb_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask) +RND_INLINE rnd_layer_id_t pcb_layer_first_any(pcb_layer_stack_t *stack, pcb_layer_it_t *it, unsigned int any_mask) { it->stack = stack; it->mask = any_mask; @@ -109,7 +109,7 @@ return pcb_layer_next(it); } -RND_INLINE pcb_layer_id_t pcb_layer_first_all(pcb_layer_stack_t *stack, pcb_layer_it_t *it) +RND_INLINE rnd_layer_id_t pcb_layer_first_all(pcb_layer_stack_t *stack, pcb_layer_it_t *it) { it->stack = stack; it->lidx = 0; Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 30970) +++ trunk/src/layer_vis.c (revision 30971) @@ -73,9 +73,9 @@ } } -int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, pcb_layer_id_t Layer, int On, rnd_bool ChangeStackOrder) +int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, rnd_layer_id_t Layer, int On, rnd_bool ChangeStackOrder) { - pcb_layergrp_id_t group; + rnd_layergrp_id_t group; int i, changed = 1; /* at least the current layer changes */ @@ -96,7 +96,7 @@ /* decrement 'i' to keep stack in order of layergroup */ if ((group = pcb_layer_get_group(PCB, Layer)) >= 0) { for (i = PCB->LayerGroups.grp[group].len; i;) { - pcb_layer_id_t layer = PCB->LayerGroups.grp[group].lid[--i]; + rnd_layer_id_t layer = PCB->LayerGroups.grp[group].lid[--i]; /* don't count the passed member of the group */ if (layer != Layer && layer < pcb_max_layer(PCB)) { @@ -126,7 +126,7 @@ void pcb_layervis_reset_stack(rnd_hidlib_t *hl) { - pcb_layer_id_t comp; + rnd_layer_id_t comp; rnd_cardinal_t i; assert(PCB->Data->LayerN <= PCB_MAX_LAYER); @@ -212,7 +212,7 @@ void layer_vis_chg_mask(rnd_conf_native_t *cfg, int arr_idx) { - pcb_layer_id_t n; + rnd_layer_id_t n; int chg = 0; static int in = 0; /* don't run when called from the PCB_EVENT_LAYERS_CHANGED triggered from this function */ @@ -235,7 +235,7 @@ void pcb_layer_vis_change_all(pcb_board_t *pcb, pcb_bool_op_t open, pcb_bool_op_t vis) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; int n; for(gid = 0; gid < pcb_max_group(pcb); gid++) { @@ -267,7 +267,7 @@ void pcb_layer_vis_historical_hides(pcb_board_t *pcb) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; /* do not show paste and mask by default - they are distractive */ for(gid = 0; gid < pcb_max_group(pcb); gid++) { @@ -295,12 +295,12 @@ rnd_event(hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); /* Can't send LAYERVIS_CHANGED here: it's a race condition, the layer selector could still have the old widgets */ } -pcb_layer_id_t pcb_layer_vis_last_lyt(pcb_layer_type_t target) +rnd_layer_id_t pcb_layer_vis_last_lyt(pcb_layer_type_t target) { int n; /* find the last used match on stack first */ for(n = 0; n < PCB_MAX_LAYER; n++) { - pcb_layer_id_t lid = pcb_layer_stack[n]; + rnd_layer_id_t lid = pcb_layer_stack[n]; pcb_layer_type_t lyt = pcb_layer_flags(PCB, lid); if ((lyt & target) == target) return lid; @@ -318,7 +318,7 @@ void pcb_hid_save_and_show_layer_ons(int *save_array) { - pcb_layer_id_t i; + rnd_layer_id_t i; for (i = 0; i < pcb_max_layer(PCB); i++) { save_array[i] = PCB->Data->Layer[i].meta.real.vis; PCB->Data->Layer[i].meta.real.vis = 1; @@ -327,7 +327,7 @@ void pcb_hid_save_and_show_layergrp_ons(int *save_array) { - pcb_layergrp_id_t i; + rnd_layergrp_id_t i; for (i = 0; i < PCB->LayerGroups.len; i++) save_array[i] = PCB->LayerGroups.grp[i].vis; } @@ -334,7 +334,7 @@ void pcb_hid_restore_layer_ons(int *save_array) { - pcb_layer_id_t i; + rnd_layer_id_t i; for (i = 0; i < pcb_max_layer(PCB); i++) PCB->Data->Layer[i].meta.real.vis = save_array[i]; } @@ -341,7 +341,7 @@ void pcb_hid_restore_layergrp_ons(int *save_array) { - pcb_layergrp_id_t i; + rnd_layergrp_id_t i; for (i = 0; i < PCB->LayerGroups.len; i++) PCB->LayerGroups.grp[i].vis = save_array[i]; } Index: trunk/src/layer_vis.h =================================================================== --- trunk/src/layer_vis.h (revision 30970) +++ trunk/src/layer_vis.h (revision 30971) @@ -36,7 +36,7 @@ /* changes the visibility of all layers in a group; returns the number of changed layers; on should be 0 or 1 for setting the state or -1 for toggling it */ -int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, pcb_layer_id_t Layer, int On, rnd_bool ChangeStackOrder); +int pcb_layervis_change_group_vis(rnd_hidlib_t *hl, rnd_layer_id_t Layer, int On, rnd_bool ChangeStackOrder); /* resets the layer visibility stack setting */ void pcb_layervis_reset_stack(rnd_hidlib_t *hl); @@ -52,7 +52,7 @@ void pcb_layervis_restore_stack(void); /* Return the last used layer (or if none, any layer) that matches target type */ -pcb_layer_id_t pcb_layer_vis_last_lyt(pcb_layer_type_t target); +rnd_layer_id_t pcb_layer_vis_last_lyt(pcb_layer_type_t target); /* Use this to temporarily make all layers visible, so that they can be exported even if they're not currently visible. save_array must be Index: trunk/src/librnd/core/error.c =================================================================== --- trunk/src/librnd/core/error.c (revision 30970) +++ trunk/src/librnd/core/error.c (revision 30971) @@ -219,7 +219,7 @@ } else if (rnd_strcasecmp(op, "Export") == 0) { const char *fmts[] = { "text", "lihata", NULL }; - pcb_hid_dad_subdialog_t fmtsub; + rnd_hid_dad_subdialog_t fmtsub; char *fn; int wfmt; Index: trunk/src/librnd/core/global_typedefs.h =================================================================== --- trunk/src/librnd/core/global_typedefs.h (revision 30970) +++ trunk/src/librnd/core/global_typedefs.h (revision 30971) @@ -54,30 +54,30 @@ typedef unsigned int rnd_cardinal_t; typedef struct rnd_color_s rnd_color_t; typedef struct rnd_clrcache_s rnd_clrcache_t; -typedef struct pcb_pixmap_s pcb_pixmap_t; +typedef struct rnd_pixmap_s rnd_pixmap_t; typedef struct rnd_action_s rnd_action_t; -typedef struct pcb_hid_dad_subdialog_s pcb_hid_dad_subdialog_t; +typedef struct rnd_hid_dad_subdialog_s rnd_hid_dad_subdialog_t; typedef struct rnd_event_arg_s rnd_event_arg_t; -typedef struct pcb_hid_expose_ctx_s pcb_hid_expose_ctx_t; -typedef struct pcb_hid_s pcb_hid_t; -typedef struct pcb_xform_s pcb_xform_t; /* declared by the app */ +typedef struct rnd_hid_expose_ctx_s rnd_hid_expose_ctx_t; +typedef struct rnd_hid_s rnd_hid_t; +typedef struct rnd_xform_s rnd_xform_t; /* declared by the app */ /* This graphics context is an opaque pointer defined by the HID. GCs are HID-specific; attempts to use one HID's GC for a different HID will result in a fatal error. The first field must be: - pcb_core_gc_t core_gc; */ -typedef struct hid_gc_s *pcb_hid_gc_t; + rnd_core_gc_t core_gc; */ +typedef struct rnd_hid_gc_s *rnd_hid_gc_t; -typedef struct pcb_hid_attr_val_s pcb_hid_attr_val_t; -typedef struct pcb_hid_attribute_s pcb_hid_attribute_t; -typedef struct pcb_export_opt_s pcb_export_opt_t; +typedef struct rnd_hid_attr_val_s rnd_hid_attr_val_t; +typedef struct rnd_hid_attribute_s rnd_hid_attribute_t; +typedef struct rnd_export_opt_s rnd_export_opt_t; -typedef long int pcb_layer_id_t; -typedef long int pcb_layergrp_id_t; +typedef long int rnd_layer_id_t; +typedef long int rnd_layergrp_id_t; #include Index: trunk/src/librnd/core/hid.h =================================================================== --- trunk/src/librnd/core/hid.h (revision 30970) +++ trunk/src/librnd/core/hid.h (revision 30971) @@ -42,7 +42,7 @@ flip is activated. All zoom, scaling, panning, and conversions are hidden inside the HIDs. -The main structure is pcb_hid_t. +The main structure is rnd_hid_t. */ /* Line end cap styles. The cap *always* extends beyond the @@ -66,7 +66,7 @@ pcb_cap_style_t cap; /* as set by set_line_cap */ int xor; /* as set by set_draw_xor */ int faded; /* as set by set_draw_faded */ - pcb_hid_t *hid; /* the HID that owns this gc */ + rnd_hid_t *hid; /* the HID that owns this gc */ } pcb_core_gc_t; @@ -158,7 +158,7 @@ extern int pcb_dock_has_frame[PCB_HID_DOCK_max]; /* 1 if a new dock box (parent of a new sub-DAD) should be framed */ /* This is the main HID structure. */ -struct pcb_hid_s { +struct rnd_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. */ @@ -214,7 +214,7 @@ /* called by core when the global hidlib context changes (e.g. board changed) The HID should store the hidlib pointer for knowing drawing area dimensions */ - void (*set_hidlib)(pcb_hid_t *hid, rnd_hidlib_t *hidlib); + void (*set_hidlib)(rnd_hid_t *hid, rnd_hidlib_t *hidlib); /* Returns a set of resources describing options the export or print HID supports. In GUI mode, the print/export dialogs use this to @@ -223,23 +223,23 @@ the number of attributes is stored there. The caller must not free the returned table but may modify the default values in it. */ - pcb_export_opt_t *(*get_export_options)(pcb_hid_t *hid, int *n_ret); + rnd_export_opt_t *(*get_export_options)(rnd_hid_t *hid, int *n_ret); /* Exports (or print) the current PCB. The options given represent the choices made from the options returned from get_export_options. Call with options_ == NULL to start the primary GUI (create a main window, print, export, etc) */ - void (*do_export)(pcb_hid_t *hid, pcb_hid_attr_val_t *options); + void (*do_export)(rnd_hid_t *hid, rnd_hid_attr_val_t *options); /* uninit a GUI hid */ - void (*uninit)(pcb_hid_t *hid); + void (*uninit)(rnd_hid_t *hid); /* uninit a GUI hid */ - void (*do_exit)(pcb_hid_t *hid); + void (*do_exit)(rnd_hid_t *hid); /* Process pending events, flush output, but never block. Called from busy loops from time to time. */ - void (*iterate)(pcb_hid_t *hid); + void (*iterate)(rnd_hid_t *hid); /* Parses the command line. Call this early for whatever HID will be the primary HID, as it will set all the registered attributes. @@ -246,13 +246,13 @@ The HID should remove all arguments, leaving any possible file names behind. Returns 0 on success, positive for recoverable errors (no change in argc or argv) and negative for unrecoverable errors. */ - int (*parse_arguments)(pcb_hid_t *hid, int *argc, char ***argv); + int (*parse_arguments)(rnd_hid_t *hid, int *argc, char ***argv); /* This may be called to ask the GUI to force a redraw of a given area */ - void (*invalidate_lr)(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom); - void (*invalidate_all)(pcb_hid_t *hid); - void (*notify_crosshair_change)(pcb_hid_t *hid, rnd_bool changes_complete); - void (*notify_mark_change)(pcb_hid_t *hid, rnd_bool changes_complete); + void (*invalidate_lr)(rnd_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom); + void (*invalidate_all)(rnd_hid_t *hid); + void (*notify_crosshair_change)(rnd_hid_t *hid, rnd_bool changes_complete); + void (*notify_mark_change)(rnd_hid_t *hid, rnd_bool changes_complete); /* During redraw or print/export cycles, this is called once per layer group (physical layer); pusrpose/purpi are the extracted purpose field and its @@ -264,26 +264,26 @@ functions. In addition to the copper layer groups, you may select virtual layers. The is_empty argument is a hint - if set, the layer is empty, if zero it may be non-empty. */ - int (*set_layer_group)(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform); + int (*set_layer_group)(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform); /* Tell the GUI the layer last selected has been finished with. */ - void (*end_layer)(pcb_hid_t *hid); + void (*end_layer)(rnd_hid_t *hid); /*** Drawing Functions. ***/ /* Make an empty gc (graphics context, which is like a pen). */ - pcb_hid_gc_t (*make_gc)(pcb_hid_t *hid); - void (*destroy_gc)(pcb_hid_gc_t gc); + rnd_hid_gc_t (*make_gc)(rnd_hid_t *hid); + void (*destroy_gc)(rnd_hid_gc_t gc); /* Composite layer drawing: manipulate the sketch canvas and set positive or negative drawing mode. The canvas covers the screen box. */ - void (*set_drawing_mode)(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); + void (*set_drawing_mode)(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); /* Announce start/end of a render burst for a specific screen screen box; A GUI hid should set the coord_per_pix value here for proper optimization. */ - void (*render_burst)(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen); + void (*render_burst)(rnd_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen); - /*** gc vs. pcb_hid_t *: pcb_core_gc_t contains ->hid, so these calls don't + /*** gc vs. rnd_hid_t *: pcb_core_gc_t contains ->hid, so these calls don't need to get it as first arg. ***/ /* Sets a color. Can be one of the special colors like rnd_color_drill. @@ -290,31 +290,31 @@ (Always use the drill color to draw holes and slots). You may assume this is cheap enough to call inside the redraw callback, but not cheap enough to call for each item drawn. */ - void (*set_color)(pcb_hid_gc_t gc, const rnd_color_t *color); + void (*set_color)(rnd_hid_gc_t gc, const rnd_color_t *color); /* Sets 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)(pcb_hid_gc_t gc, pcb_cap_style_t style); - void (*set_line_width)(pcb_hid_gc_t gc, rnd_coord_t width); - void (*set_draw_xor)(pcb_hid_gc_t gc, int xor); + void (*set_line_cap)(rnd_hid_gc_t gc, pcb_cap_style_t style); + void (*set_line_width)(rnd_hid_gc_t gc, rnd_coord_t width); + void (*set_draw_xor)(rnd_hid_gc_t gc, int xor); /* Blends 20% or so color with 80% background. Only used for assembly drawings so far. */ - void (*set_draw_faded)(pcb_hid_gc_t gc, int faded); + void (*set_draw_faded)(rnd_hid_gc_t gc, int faded); /* The usual drawing functions. "draw" means to use segments of the given width, whereas "fill" means to fill to a zero-width outline. */ - void (*draw_line)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); - void (*draw_arc)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle); - void (*draw_rect)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); - void (*fill_circle)(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); - void (*fill_polygon)(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y); - void (*fill_polygon_offs)(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); - void (*fill_rect)(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); + void (*draw_line)(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); + void (*draw_arc)(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle); + void (*draw_rect)(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); + void (*fill_circle)(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); + void (*fill_polygon)(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y); + void (*fill_polygon_offs)(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy); + void (*fill_rect)(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); - void (*draw_pixmap)(pcb_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, const pcb_pixmap_t *pixmap); - void (*uninit_pixmap)(pcb_hid_t *hid, const pcb_pixmap_t *pixmap); + void (*draw_pixmap)(rnd_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, const rnd_pixmap_t *pixmap); + void (*uninit_pixmap)(rnd_hid_t *hid, const rnd_pixmap_t *pixmap); /* This is for the printer. If xval_ and yval_ are zero, a calibration page is printed with instructions for @@ -321,17 +321,17 @@ calibrating your printer. After calibrating, nonzero xval_ and yval_ are passed according to the instructions. Metric is nonzero if the user prefers metric units, else inches are used. */ - void (*calibrate)(pcb_hid_t *hid, double xval, double yval); + void (*calibrate)(rnd_hid_t *hid, double xval, double yval); /*** GUI layout functions. Not used or defined for print/export HIDs. ***/ /* Temporary */ - int (*shift_is_pressed)(pcb_hid_t *hid); - int (*control_is_pressed)(pcb_hid_t *hid); - int (*mod1_is_pressed)(pcb_hid_t *hid); + int (*shift_is_pressed)(rnd_hid_t *hid); + int (*control_is_pressed)(rnd_hid_t *hid); + int (*mod1_is_pressed)(rnd_hid_t *hid); - void (*get_coords)(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); + void (*get_coords)(rnd_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); /* Sets the crosshair, which may differ from the pointer depending on grid and pad snap. Note that the HID is responsible for @@ -341,7 +341,7 @@ or mils accordingly. If cursor_action_ is set, the cursor or screen may be adjusted so that the cursor and the crosshair are at the same point on the screen. */ - void (*set_crosshair)(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int cursor_action); + void (*set_crosshair)(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int cursor_action); #define HID_SC_DO_NOTHING 0 #define HID_SC_WARP_POINTER 1 #define HID_SC_PAN_VIEWPORT 2 @@ -351,9 +351,9 @@ 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. */ - pcb_hidval_t (*add_timer)(pcb_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data); + pcb_hidval_t (*add_timer)(rnd_hid_t *hid, 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)(pcb_hid_t *hid, pcb_hidval_t timer); + void (*stop_timer)(rnd_hid_t *hid, pcb_hidval_t timer); /* Causes func_ to be called when some condition occurs on the file descriptor passed. Conditions include data for reading, writing, @@ -360,10 +360,10 @@ hangup, and errors. user_data_ can be anything, it's just passed to func. If the watch function returns pcb_true, the watch is kept, else it is removed. */ - pcb_hidval_t (*watch_file)(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data); + pcb_hidval_t (*watch_file)(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*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; must not be called from within a GUI callback! */ - void (*unwatch_file)(pcb_hid_t *hid, pcb_hidval_t watch); + void (*unwatch_file)(rnd_hid_t *hid, pcb_hidval_t watch); /* Run the file selection dialog. Return a string the caller needs to free(). @@ -391,7 +391,7 @@ * get_path returns the current full path in res as an strdup'd string (caller needs to free it) * set_file_name replaces the file name portion of the current path from arg[0].d.s */ - char *(*fileselect)(pcb_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); + char *(*fileselect)(rnd_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub); /* A generic dialog to ask for a set of attributes. If n_attrs_ is zero, attrs_(.name) must be NULL terminated. attr_dlg_run returns @@ -402,9 +402,9 @@ for window placement) and is strdup'd. If defx and defy are larger than 0, they are hints for the default (starting) window size - can be overridden by window placement. Returns opaque hid_ctx. - (Hid_ctx shall save pcb_hid_t so subsequent attr_dlg_*() calls don't have + (Hid_ctx shall save rnd_hid_t so subsequent attr_dlg_*() calls don't have it as an argument) */ - void *(*attr_dlg_new)(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); + void *(*attr_dlg_new)(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int (*attr_dlg_run)(void *hid_ctx); void (*attr_dlg_raise)(void *hid_ctx); /* raise the window to top */ void (*attr_dlg_close)(void *hid_ctx); /* close the GUI but do not yet free hid_ctx (results should be available) */ @@ -412,7 +412,7 @@ /* Set a property of an attribute dialog (typical call is between attr_dlg_new() and attr_dlg_run()) */ - void (*attr_dlg_property)(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val); + void (*attr_dlg_property)(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val); /* Disable or enable a widget of an active attribute dialog; if enabled is @@ -424,7 +424,7 @@ /* Change the current value of a widget; same as if the user chaged it, except the value-changed callback is inhibited */ - int (*attr_dlg_set_value)(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); + int (*attr_dlg_set_value)(void *hid_ctx, int idx, const rnd_hid_attr_val_t *val); /* Change the help text (tooltip) string of a widget; NULL means remove it. NOTE: does _not_ change the help_text field of the attribute. */ @@ -433,13 +433,13 @@ /* top window docking: enter a new docked part by registering a new subdialog or leave (remove a docked part) from a subdialog. Return 0 on success. */ - int (*dock_enter)(pcb_hid_t *hid, pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); - void (*dock_leave)(pcb_hid_t *hid, pcb_hid_dad_subdialog_t *sub); + int (*dock_enter)(rnd_hid_t *hid, rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); + void (*dock_leave)(rnd_hid_t *hid, rnd_hid_dad_subdialog_t *sub); /* Something to alert the user. */ - void (*beep)(pcb_hid_t *hid); + void (*beep)(rnd_hid_t *hid); - void (*edit_attributes)(pcb_hid_t *hid, const char *owner, rnd_attribute_list_t *attrlist); + void (*edit_attributes)(rnd_hid_t *hid, const char *owner, rnd_attribute_list_t *attrlist); /* Creates a new menu and/or submenus * menu_path is a / separated path to the new menu (parents are silently created). @@ -449,21 +449,21 @@ * and remove menu items that are no longer needed. * If action is NULL, the menu may get submenus. */ - void (*create_menu)(pcb_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props); + void (*create_menu)(rnd_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props); /* Removes a menu recursively */ - int (*remove_menu)(pcb_hid_t *hid, const char *menu_path); - int (*remove_menu_node)(pcb_hid_t *hid, lht_node_t *nd); + int (*remove_menu)(rnd_hid_t *hid, const char *menu_path); + int (*remove_menu_node)(rnd_hid_t *hid, lht_node_t *nd); /* At the moment HIDs load the menu file. Some plugin code, like the toolbar code needs to traverse the menu tree too. This call exposes the HID-internal menu struct */ - rnd_hid_cfg_t *(*get_menu_cfg)(pcb_hid_t *hid); + rnd_hid_cfg_t *(*get_menu_cfg)(rnd_hid_t *hid); /* Update the state of all checkboxed menus whose lihata node cookie matches cookie (or all checkboxed menus globally if cookie is NULL) */ - void (*update_menu_checkbox)(pcb_hid_t *hid, const char *cookie); + void (*update_menu_checkbox)(rnd_hid_t *hid, const char *cookie); /* Pointer to the hid's configuration - useful for plugins and core wanting to install menus at anchors */ rnd_hid_cfg_t *hid_cfg; @@ -475,11 +475,11 @@ string print summary for the topic in string Return 0 on success. */ - int (*usage)(pcb_hid_t *hid, const char *subtopic); + int (*usage)(rnd_hid_t *hid, const char *subtopic); /* Optional: change cursor to indicate if an object is grabbed (or not) */ - void (*point_cursor)(pcb_hid_t *hid, rnd_bool grabbed); + void (*point_cursor)(rnd_hid_t *hid, rnd_bool grabbed); /* Optional: when non-zero, the core renderer may decide to draw cheaper (simplified) approximation of some objects that would end up being too @@ -492,22 +492,22 @@ If ovr is NULL: - if cursor is not NULL, load the value with the cursor (or -1 if not supported) Return the current command entry content in a read-only string */ - const char *(*command_entry)(pcb_hid_t *hid, const char *ovr, int *cursor); + const char *(*command_entry)(rnd_hid_t *hid, const char *ovr, int *cursor); /*** clipboard handling for GUI HIDs ***/ /* Place format/data/len on the clipboard; return 0 on success */ - int (*clip_set)(pcb_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len); + int (*clip_set)(rnd_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len); /* retrieve format/data/len from the clipboard; return 0 on success; data is a copy of the data, modifiable by the caller */ - int (*clip_get)(pcb_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len); + int (*clip_get)(rnd_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len); /* release the data from the last clip_get(); clip_get() and clip_free() should be called in pair */ - void (*clip_free)(pcb_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len); + void (*clip_free)(rnd_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len); /* run redraw-benchmark and return an FPS value (optional) */ - double (*benchmark)(pcb_hid_t *hid); + double (*benchmark)(rnd_hid_t *hid); /* (pcb_hid_cfg_keys_t *): key state */ void *key_state; @@ -516,41 +516,41 @@ /* side-correct zoom to show a window of the board. If set_crosshair is true, also update the crosshair to be on the center of the window */ - void (*zoom_win)(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair); + void (*zoom_win)(rnd_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair); /* Zoom relative or absolute by factor; relative means current zoom is multiplied by factor */ - void (*zoom)(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative); + void (*zoom)(rnd_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative); /* Pan relative/absolute by x and y; relative means x and y are added to the current pan */ - void (*pan)(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative); + void (*pan)(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative); /* Start or stop panning at x;y - stop is mode=0, start is mode=1 */ - void (*pan_mode)(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode); + void (*pan_mode)(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode); /* Load viewbox with the extents of visible pixels translated to board coords */ - void (*view_get)(pcb_hid_t *hid, rnd_rnd_box_t *viewbox); + void (*view_get)(rnd_hid_t *hid, rnd_rnd_box_t *viewbox); /*** misc GUI ***/ /* Open the command line */ - void (*open_command)(pcb_hid_t *hid); + void (*open_command)(rnd_hid_t *hid); /* Open a popup menu addressed by full menu path (starting with "/popups/"). Return 0 on success. */ - int (*open_popup)(pcb_hid_t *hid, const char *menupath); + int (*open_popup)(rnd_hid_t *hid, const char *menupath); /* Change the mouse cursor to a named cursor e.g. after the tool has changed. The list of cursors names available may depend on the HID. */ - void (*reg_mouse_cursor)(pcb_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask); - void (*set_mouse_cursor)(pcb_hid_t *hid, int idx); + void (*reg_mouse_cursor)(rnd_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask); + void (*set_mouse_cursor)(rnd_hid_t *hid, int idx); /* change top window title any time the after the GUI_INIT event */ - void (*set_top_title)(pcb_hid_t *hid, const char *title); + void (*set_top_title)(rnd_hid_t *hid, const char *title); /* OPTIONAL: override the mouse cursor to indicate busy state */ - void (*busy)(pcb_hid_t *hid, rnd_bool busy); + void (*busy)(rnd_hid_t *hid, rnd_bool busy); /* this field is used by that HID implementation to store its data */ void *hid_data; @@ -559,29 +559,29 @@ rnd_hidlib_t *(*get_dad_hidlib)(void *hid_ctx); }; -typedef void (*pcb_hid_expose_cb_t)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); +typedef void (*pcb_hid_expose_cb_t)(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); -struct pcb_hid_expose_ctx_s { +struct rnd_hid_expose_ctx_s { rnd_rnd_box_t view; pcb_hid_expose_cb_t expose_cb; /* function that is called on expose to get things drawn */ void *draw_data; /* user data for the expose function */ }; -typedef void (*pcb_hid_expose_t)(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *ctx); +typedef void (*pcb_hid_expose_t)(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *ctx); /* This is initially set to a "no-gui" GUI, and later reset by main. It is used for on-screen GUI calls, such as dialog boxes */ -extern pcb_hid_t *pcb_gui; +extern rnd_hid_t *pcb_gui; /* This is initially set to a "no-gui" GUI, and later reset by main. hid_expose_callback also temporarily set it for drawing. Normally matches pcb_gui, but is temporarily changed while exporting. It is used for drawing calls, mainly by draw*.c */ -extern pcb_hid_t *pcb_render; +extern rnd_hid_t *pcb_render; /* 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 pcb_hid_t *pcb_exporter; +extern rnd_hid_t *pcb_exporter; /* This is either NULL or points to the current rnd_action_t that is being called. The action launcher sets and unsets this variable. */ @@ -615,10 +615,10 @@ /* non-zero if DAD dialogs are available currently */ #define PCB_HAVE_GUI_ATTR_DLG \ ((pcb_gui != NULL) && (pcb_gui->gui) && (pcb_gui->attr_dlg_new != NULL) && (pcb_gui->attr_dlg_new != pcb_nogui_attr_dlg_new)) -void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +void *pcb_nogui_attr_dlg_new(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); -int pcb_hid_dock_enter(pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); -void pcb_hid_dock_leave(pcb_hid_dad_subdialog_t *sub); +int pcb_hid_dock_enter(rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); +void pcb_hid_dock_leave(rnd_hid_dad_subdialog_t *sub); #define pcb_hid_redraw(pcb) pcb_gui->invalidate_all(pcb_gui) Index: trunk/src/librnd/core/hid_attrib.c =================================================================== --- trunk/src/librnd/core/hid_attrib.c (revision 30970) +++ trunk/src/librnd/core/hid_attrib.c (revision 30971) @@ -35,7 +35,7 @@ pcb_hid_attr_node_t *hid_attr_nodes = 0; -void pcb_export_register_opts(pcb_export_opt_t *a, int n, const char *cookie, int copy) +void pcb_export_register_opts(rnd_export_opt_t *a, int n, const char *cookie, int copy) { pcb_hid_attr_node_t *ha; @@ -85,7 +85,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - pcb_export_opt_t *a = ha->opts + i; + rnd_export_opt_t *a = ha->opts + i; switch (a->type) { case PCB_HATT_LABEL: break; @@ -136,7 +136,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) if (strcmp((*argv)[0] + arg_ofs, ha->opts[i].name) == 0) { - pcb_export_opt_t *a = ha->opts + i; + rnd_export_opt_t *a = ha->opts + i; char *ep; const rnd_unit_t *unit; switch (ha->opts[i].type) { @@ -252,7 +252,7 @@ fprintf(stderr, "--%-20s %s\n", name, help); } -void pcb_hid_usage(pcb_export_opt_t *a, int numa) +void pcb_hid_usage(rnd_export_opt_t *a, int numa) { for (; numa > 0; numa--,a++) { const char *help; Index: trunk/src/librnd/core/hid_attrib.h =================================================================== --- trunk/src/librnd/core/hid_attrib.h (revision 30970) +++ trunk/src/librnd/core/hid_attrib.h (revision 30971) @@ -9,7 +9,7 @@ HA_boolean uses lng, HA_enum sets lng to the index and str to the enumeration string. PCB_HATT_LABEL just shows the default str. */ -struct pcb_hid_attr_val_s { +struct rnd_hid_attr_val_s { long lng; const char *str; double dbl; @@ -71,16 +71,16 @@ #define PCB_HAT_IS_STR(type) (type == PCB_HATT_STRING) -/* alternative field names in struct pcb_hid_attribute_s */ +/* alternative field names in struct rnd_hid_attribute_s */ #define pcb_hatt_flags hatt_flags #define pcb_hatt_table_cols wdata_aux1 -struct pcb_hid_attribute_s { +struct rnd_hid_attribute_s { const char *name; const char *help_text; pcb_hid_attr_type_t type; double min_val, max_val; /* for integer and real */ - pcb_hid_attr_val_t val; /* Also actual value for global attributes. */ + rnd_hid_attr_val_t val; /* Also actual value for global attributes. */ /* PCB_HATT_ENUM: const char ** (NULL terminated list of values) PCB_HATT_PICTURE & PCB_HATT_PICBUTTON: const char **xpm @@ -91,9 +91,9 @@ /* dynamic API */ unsigned changed:1; /* 0 for initial values, 1 on user change */ unsigned empty:1; /* set to 1 by the widget implementation if the textual value is empty, where applicable */ - void (*change_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); /* called upon value change by the user */ - void (*right_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); /* called upon right click by the user */ - void (*enter_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); /* called upon the user pressed enter in a widget that handles keys */ + void (*change_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); /* called upon value change by the user */ + void (*right_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); /* called upon right click by the user */ + void (*enter_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); /* called upon the user pressed enter in a widget that handles keys */ void *user_data; /* ignored; the caller is free to use it */ unsigned int hatt_flags; @@ -102,12 +102,12 @@ int geo_height; }; -struct pcb_export_opt_s { +struct rnd_export_opt_s { const char *name; const char *help_text; pcb_hid_attr_type_t type; double min_val, max_val; /* for integer and real */ - pcb_hid_attr_val_t default_val; + rnd_hid_attr_val_t default_val; const char **enumerations; /* NULL terminated list of values for a PCB_HATT_ENUM */ @@ -123,7 +123,7 @@ current session won't register and the registration is lost immediately after the export because pcb-rnd exits. Cam or dialog box direct exporting won't go through this. */ -extern void pcb_export_register_opts(pcb_export_opt_t *, int, const char *cookie, int copy); +extern void pcb_export_register_opts(rnd_export_opt_t *, int, const char *cookie, int copy); /* Remove all attributes registered with the given cookie */ void pcb_export_remove_opts_by_cookie(const char *cookie); @@ -133,7 +133,7 @@ typedef struct pcb_hid_attr_node_s { struct pcb_hid_attr_node_s *next; - pcb_export_opt_t *opts; + rnd_export_opt_t *opts; int n; const char *cookie; } pcb_hid_attr_node_t; @@ -140,15 +140,15 @@ extern pcb_hid_attr_node_t *hid_attr_nodes; -void pcb_hid_usage(pcb_export_opt_t *a, int numa); +void pcb_hid_usage(rnd_export_opt_t *a, int numa); void pcb_hid_usage_option(const char *name, const char *help); /* Count the number of direct children, start_from the first children */ -int pcb_hid_attrdlg_num_children(pcb_hid_attribute_t *attrs, int start_from, int n_attrs); +int pcb_hid_attrdlg_num_children(rnd_hid_attribute_t *attrs, int start_from, int n_attrs); /* Invoke a simple modal attribute dialog if GUI is available */ -int pcb_attribute_dialog_(const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, void **retovr, int defx, int defy, int minx, int miny, void **hid_ctx_out); -int pcb_attribute_dialog(const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data); +int pcb_attribute_dialog_(const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, void **retovr, int defx, int defy, int minx, int miny, void **hid_ctx_out); +int pcb_attribute_dialog(const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data); /* Convert between compflag bit value and name */ @@ -155,7 +155,7 @@ const char *pcb_hid_compflag_bit2name(pcb_hatt_compflags_t bit); pcb_hatt_compflags_t pcb_hid_compflag_name2bit(const char *name); -/*** When an pcb_export_opt_t item is a box, the following function is called +/*** When an rnd_export_opt_t item is a box, the following function is called from its ->func ***/ typedef enum pcb_hid_export_opt_func_action_e { @@ -163,6 +163,6 @@ PCB_HIDEOF_DAD /* call_ctx is a pcb_hid_export_opt_func_dad_t */ } pcb_hid_export_opt_func_action_t; -typedef void (*pcb_hid_export_opt_func_t)(pcb_hid_export_opt_func_action_t act, void *call_ctx, pcb_export_opt_t *opt); +typedef void (*pcb_hid_export_opt_func_t)(pcb_hid_export_opt_func_action_t act, void *call_ctx, rnd_export_opt_t *opt); #endif Index: trunk/src/librnd/core/hid_dad.c =================================================================== --- trunk/src/librnd/core/hid_dad.c (revision 30970) +++ trunk/src/librnd/core/hid_dad.c (revision 30971) @@ -72,7 +72,7 @@ pcb_gui->attr_dlg_close(hid_ctx); } -void pcb_hid_dad_close_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_hid_dad_close_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_dad_retovr_t **retovr = attr->wdata; pcb_hid_dad_close(hid_ctx, *retovr, attr->val.lng); @@ -91,7 +91,7 @@ return ret; } -int pcb_hid_attrdlg_num_children(pcb_hid_attribute_t *attrs, int start_from, int n_attrs) +int pcb_hid_attrdlg_num_children(rnd_hid_attribute_t *attrs, int start_from, int n_attrs) { int n, level = 1, cnt = 0; @@ -117,7 +117,7 @@ return cnt; } -int pcb_attribute_dialog_(const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, void **retovr, int defx, int defy, int minx, int miny, void **hid_ctx_out) +int pcb_attribute_dialog_(const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, void **retovr, int defx, int defy, int minx, int miny, void **hid_ctx_out) { int rv; void *hid_ctx; @@ -135,12 +135,12 @@ return rv ? 0 : 1; } -int pcb_attribute_dialog(const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data) +int pcb_attribute_dialog(const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data) { return pcb_attribute_dialog_(id, attrs, n_attrs, title, caller_data, NULL, 0, 0, 0, 0, NULL); } -int pcb_hid_dock_enter(pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) +int pcb_hid_dock_enter(rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) { if ((pcb_gui == NULL) || (pcb_gui->dock_enter == NULL)) return -1; @@ -147,7 +147,7 @@ return pcb_gui->dock_enter(pcb_gui, sub, where, id); } -void pcb_hid_dock_leave(pcb_hid_dad_subdialog_t *sub) +void pcb_hid_dock_leave(rnd_hid_dad_subdialog_t *sub) { if ((pcb_gui == NULL) || (pcb_gui->dock_leave == NULL)) return; Index: trunk/src/librnd/core/hid_dad.h =================================================================== --- trunk/src/librnd/core/hid_dad.h (revision 30970) +++ trunk/src/librnd/core/hid_dad.h (revision 30971) @@ -47,22 +47,22 @@ typedef struct { /* cursor manipulation callbacks */ - void (*hid_get_xy)(pcb_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y); /* can be very slow */ - long (*hid_get_offs)(pcb_hid_attribute_t *attrib, void *hid_ctx); - void (*hid_set_xy)(pcb_hid_attribute_t *attrib, void *hid_ctx, long x, long y); /* can be very slow */ - void (*hid_set_offs)(pcb_hid_attribute_t *attrib, void *hid_ctx, long offs); - void (*hid_scroll_to_bottom)(pcb_hid_attribute_t *attrib, void *hid_ctx); - void (*hid_set_text)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *txt); - char *(*hid_get_text)(pcb_hid_attribute_t *attrib, void *hid_ctx); /* caller needs to free the result */ - void (*hid_set_readonly)(pcb_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly); /* by default text views are not read-only */ + void (*hid_get_xy)(rnd_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y); /* can be very slow */ + long (*hid_get_offs)(rnd_hid_attribute_t *attrib, void *hid_ctx); + void (*hid_set_xy)(rnd_hid_attribute_t *attrib, void *hid_ctx, long x, long y); /* can be very slow */ + void (*hid_set_offs)(rnd_hid_attribute_t *attrib, void *hid_ctx, long offs); + void (*hid_scroll_to_bottom)(rnd_hid_attribute_t *attrib, void *hid_ctx); + void (*hid_set_text)(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *txt); + char *(*hid_get_text)(rnd_hid_attribute_t *attrib, void *hid_ctx); /* caller needs to free the result */ + void (*hid_set_readonly)(rnd_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly); /* by default text views are not read-only */ /* optional callbacks the user set after widget creation */ void *user_ctx; - void (*user_free_cb)(pcb_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx); + void (*user_free_cb)(rnd_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx); /* optional callbacks HIDs may set after widget creation */ void *hid_wdata; - void (*hid_free_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata); + void (*hid_free_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata); } pcb_hid_text_t; @@ -87,31 +87,31 @@ typedef struct { gdl_list_t rows; /* ordered list of first level rows (tree root) */ htsp_t paths; /* translate first column paths iinto (pcb_hid_row_t *) */ - pcb_hid_attribute_t *attrib; + rnd_hid_attribute_t *attrib; const char **hdr; /* optional column headers (NULL means disable header) */ /* optional callbacks the user set after widget creation */ void *user_ctx; - void (*user_free_cb)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); - void (*user_selected_cb)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); - int (*user_browse_activate_cb)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); /* returns non-zero if the row should auto-activate while browsing (e.g. stepping with arrow keys) */ - const char *(*user_copy_to_clip_cb)(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); /* returns the string to copy to clipboard for the given row (if unset, first column text is used) */ + void (*user_free_cb)(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); + void (*user_selected_cb)(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); + int (*user_browse_activate_cb)(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); /* returns non-zero if the row should auto-activate while browsing (e.g. stepping with arrow keys) */ + const char *(*user_copy_to_clip_cb)(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); /* returns the string to copy to clipboard for the given row (if unset, first column text is used) */ /* optional callbacks HIDs may set after widget creation */ void *hid_wdata; - void (*hid_insert_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *new_row); - void (*hid_modify_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int col); /* if col is negative, all columns have changed */ - void (*hid_remove_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row); - void (*hid_free_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row); - pcb_hid_row_t *(*hid_get_selected_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata); - void (*hid_jumpto_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row); /* row = NULL means deselect all */ - void (*hid_expcoll_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int expanded); /* sets whether a row is expanded or collapsed */ - void (*hid_update_hide_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata); + void (*hid_insert_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *new_row); + void (*hid_modify_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int col); /* if col is negative, all columns have changed */ + void (*hid_remove_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row); + void (*hid_free_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row); + pcb_hid_row_t *(*hid_get_selected_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata); + void (*hid_jumpto_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row); /* row = NULL means deselect all */ + void (*hid_expcoll_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int expanded); /* sets whether a row is expanded or collapsed */ + void (*hid_update_hide_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata); } pcb_hid_tree_t; typedef struct pcb_hid_preview_s pcb_hid_preview_t; struct pcb_hid_preview_s { - pcb_hid_attribute_t *attrib; + rnd_hid_attribute_t *attrib; rnd_rnd_box_t initial_view; unsigned initial_view_valid:1; @@ -120,14 +120,14 @@ /* optional callbacks the user set after widget creation */ void *user_ctx; - void (*user_free_cb)(pcb_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx); - void (*user_expose_cb)(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); - rnd_bool (*user_mouse_cb)(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); /* returns true if redraw is needed */ + void (*user_free_cb)(rnd_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx); + void (*user_expose_cb)(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); + rnd_bool (*user_mouse_cb)(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); /* returns true if redraw is needed */ /* optional callbacks HIDs may set after widget creation */ void *hid_wdata; - void (*hid_zoomto_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata, const rnd_rnd_box_t *view); - void (*hid_free_cb)(pcb_hid_attribute_t *attrib, void *hid_wdata); + void (*hid_zoomto_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata, const rnd_rnd_box_t *view); + void (*hid_free_cb)(rnd_hid_attribute_t *attrib, void *hid_wdata); }; typedef struct { @@ -134,16 +134,16 @@ int wbegin, wend; /* widget index to the correspoding PCB_HATT_BEGIN_COMPOUND and PCB_HATT_END */ /* compound implementation callbacks */ - int (*widget_state)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); - int (*widget_hide)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); - int (*set_value)(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); /* set value runtime */ - void (*set_val_num)(pcb_hid_attribute_t *attr, long l, double d, rnd_coord_t c); /* set value during creation; attr is the END */ - void (*set_val_ptr)(pcb_hid_attribute_t *attr, void *ptr); /* set value during creation; attr is the END */ - void (*set_help)(pcb_hid_attribute_t *attr, const char *text); /* set the tooltip help; attr is the END */ - void (*set_field_num)(pcb_hid_attribute_t *attr, const char *fieldname, long l, double d, rnd_coord_t c); /* set value during creation; attr is the END */ - void (*set_field_ptr)(pcb_hid_attribute_t *attr, const char *fieldname, void *ptr); /* set value during creation; attr is the END */ - void (*set_geo)(pcb_hid_attribute_t *attr, pcb_hatt_compflags_t flg, int geo); /* set geometry during creation; attr is the END */ - void (*free)(pcb_hid_attribute_t *attrib); /* called by DAD on free'ing the PCB_HATT_BEGIN_COMPOUND and PCB_HATT_END_COMPOUND widget */ + int (*widget_state)(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); + int (*widget_hide)(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); + int (*set_value)(rnd_hid_attribute_t *end, void *hid_ctx, int idx, const rnd_hid_attr_val_t *val); /* set value runtime */ + void (*set_val_num)(rnd_hid_attribute_t *attr, long l, double d, rnd_coord_t c); /* set value during creation; attr is the END */ + void (*set_val_ptr)(rnd_hid_attribute_t *attr, void *ptr); /* set value during creation; attr is the END */ + void (*set_help)(rnd_hid_attribute_t *attr, const char *text); /* set the tooltip help; attr is the END */ + void (*set_field_num)(rnd_hid_attribute_t *attr, const char *fieldname, long l, double d, rnd_coord_t c); /* set value during creation; attr is the END */ + void (*set_field_ptr)(rnd_hid_attribute_t *attr, const char *fieldname, void *ptr); /* set value during creation; attr is the END */ + void (*set_geo)(rnd_hid_attribute_t *attr, pcb_hatt_compflags_t flg, int geo); /* set geometry during creation; attr is the END */ + void (*free)(rnd_hid_attribute_t *attrib); /* called by DAD on free'ing the PCB_HATT_BEGIN_COMPOUND and PCB_HATT_END_COMPOUND widget */ } pcb_hid_compound_t; #include @@ -150,7 +150,7 @@ /*** Helpers for building dynamic attribute dialogs (DAD) ***/ #define PCB_DAD_DECL(table) \ - pcb_hid_attribute_t *table = NULL; \ + rnd_hid_attribute_t *table = NULL; \ int table ## _append_lock = 0; \ int table ## _len = 0; \ int table ## _alloced = 0; \ @@ -160,7 +160,7 @@ pcb_dad_retovr_t *table ## _ret_override; #define PCB_DAD_DECL_NOINIT(table) \ - pcb_hid_attribute_t *table; \ + rnd_hid_attribute_t *table; \ int table ## _append_lock; \ int table ## _len; \ int table ## _alloced; \ @@ -442,13 +442,13 @@ #define PCB_DAD_DUP_ATTR(table, attr) \ do { \ PCB_DAD_ALLOC(table, 0); \ - memcpy(&table[table ## _len-1], (attr), sizeof(pcb_hid_attribute_t)); \ + memcpy(&table[table ## _len-1], (attr), sizeof(rnd_hid_attribute_t)); \ PCB_DAD_UPDATE_INTERNAL(table, table ## _len-1); \ } while(0) #define PCB_DAD_DUP_EXPOPT(table, opt) \ do { \ - pcb_export_opt_t *__opt__ = (opt); \ + rnd_export_opt_t *__opt__ = (opt); \ PCB_DAD_ALLOC(table, 0); \ table[table ## _len-1].name = __opt__->name; \ table[table ## _len-1].help_text = __opt__->help_text; \ @@ -523,7 +523,7 @@ /* safe way to call gui->attr_dlg_set_value() - resets the unused fields */ #define PCB_DAD_SET_VALUE(hid_ctx, wid, field, val_) \ do { \ - pcb_hid_attr_val_t __val__; \ + rnd_hid_attr_val_t __val__; \ memset(&__val__, 0, sizeof(__val__)); \ __val__.field = val_; \ pcb_gui->attr_dlg_set_value(hid_ctx, wid, &__val__); \ @@ -798,7 +798,7 @@ } while(0) /* Internal: free all rows and caches and the tree itself */ -void pcb_dad_tree_free(pcb_hid_attribute_t *attr); +void pcb_dad_tree_free(rnd_hid_attribute_t *attr); /* internal: retval override for the auto-close buttons */ typedef struct { @@ -813,12 +813,12 @@ } pcb_hid_dad_buttons_t; void pcb_hid_dad_close(void *hid_ctx, pcb_dad_retovr_t *retovr, int retval); -void pcb_hid_dad_close_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); +void pcb_hid_dad_close_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); int pcb_hid_dad_run(void *hid_ctx, pcb_dad_retovr_t *retovr); -void pcb_hid_iterate(pcb_hid_t *hid); +void pcb_hid_iterate(rnd_hid_t *hid); /* sub-dialogs e.g. for the file selector dialog */ -struct pcb_hid_dad_subdialog_s { +struct rnd_hid_dad_subdialog_s { /* filled in by the sub-dialog's creator */ PCB_DAD_DECL_NOINIT(dlg) @@ -827,12 +827,12 @@ argc/argv are all specific to the given dialog. Returns 0 on success, return payload may be placed in res (if it is not NULL). Parent poke: close() - cancel/close the dialog */ - int (*parent_poke)(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv); + int (*parent_poke)(rnd_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv); /* OPTIONAL: filled in by the sub-dialog's creator: called by the sub-dialog's parent while the parent dialog is being closed. If ok is false, the dialog was cancelled */ - void (*on_close)(pcb_hid_dad_subdialog_t *sub, rnd_bool ok); + void (*on_close)(rnd_hid_dad_subdialog_t *sub, rnd_bool ok); void *parent_ctx; /* used by the parent dialog code */ void *sub_ctx; /* used by the sub-dialog's creator */ Index: trunk/src/librnd/core/hid_dad_spin.c =================================================================== --- trunk/src/librnd/core/hid_dad_spin.c (revision 30970) +++ trunk/src/librnd/core/hid_dad_spin.c (revision 30971) @@ -84,10 +84,10 @@ " ******* ", }; -static void spin_changed(void *hid_ctx, void *caller_data, pcb_hid_dad_spin_t *spin, pcb_hid_attribute_t *end) +static void spin_changed(void *hid_ctx, void *caller_data, pcb_hid_dad_spin_t *spin, rnd_hid_attribute_t *end) { const char *s; - pcb_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; + rnd_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; end->changed = 1; @@ -101,7 +101,7 @@ end->change_cb(hid_ctx, caller_data, end); } -static void spin_warn(void *hid_ctx, pcb_hid_dad_spin_t *spin, pcb_hid_attribute_t *end, const char *msg) +static void spin_warn(void *hid_ctx, pcb_hid_dad_spin_t *spin, rnd_hid_attribute_t *end, const char *msg) { pcb_gui->attr_dlg_widget_hide(hid_ctx, spin->wwarn, (msg == NULL)); if (pcb_gui->attr_dlg_set_help != NULL) @@ -124,14 +124,14 @@ typedef struct { PCB_DAD_DECL_NOINIT(dlg) - pcb_hid_attribute_t *end; + rnd_hid_attribute_t *end; int wout, wunit, wstick, wglob, valid; char buf[128]; } spin_unit_t; -static void spin_unit_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void spin_unit_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; spin_unit_t *su = (spin_unit_t *)caller_data; const rnd_unit_t *unit; int unum = su->dlg[su->wunit].val.lng; @@ -163,7 +163,7 @@ su->valid = 1; } -static void spin_unit_dialog(void *spin_hid_ctx, pcb_hid_dad_spin_t *spin, pcb_hid_attribute_t *end, pcb_hid_attribute_t *str) +static void spin_unit_dialog(void *spin_hid_ctx, pcb_hid_dad_spin_t *spin, rnd_hid_attribute_t *end, rnd_hid_attribute_t *str) { pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", -1}, {"ok", 0}, {NULL, 0}}; spin_unit_t ctx; @@ -228,7 +228,7 @@ PCB_DAD_AUTORUN("unit", ctx.dlg, "spinbox coord unit change", &ctx, dlgfail); if ((dlgfail == 0) && (ctx.valid)) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; int unum = ctx.dlg[ctx.wunit].val.lng; int can_glob = (spin->unit_family == (PCB_UNIT_METRIC | PCB_UNIT_IMPERIAL)); @@ -251,7 +251,7 @@ PCB_DAD_FREE(ctx.dlg); } -static double get_step(pcb_hid_dad_spin_t *spin, pcb_hid_attribute_t *end, pcb_hid_attribute_t *str) +static double get_step(pcb_hid_dad_spin_t *spin, rnd_hid_attribute_t *end, rnd_hid_attribute_t *str) { double v, step; const rnd_unit_t *unit; @@ -303,9 +303,9 @@ } \ } while(0) -static void do_step(void *hid_ctx, pcb_hid_dad_spin_t *spin, pcb_hid_attribute_t *str, pcb_hid_attribute_t *end, double step) +static void do_step(void *hid_ctx, pcb_hid_dad_spin_t *spin, rnd_hid_attribute_t *str, rnd_hid_attribute_t *end, double step) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; const char *warn = NULL; char buf[128]; @@ -336,11 +336,11 @@ spin->set_writeback_lock--; } -void pcb_dad_spin_up_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_spin_up_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_spin_t *spin = (pcb_hid_dad_spin_t *)attr->user_data; - pcb_hid_attribute_t *str = attr - spin->wup + spin->wstr; - pcb_hid_attribute_t *end = attr - spin->wup + spin->cmp.wend; + rnd_hid_attribute_t *str = attr - spin->wup + spin->wstr; + rnd_hid_attribute_t *end = attr - spin->wup + spin->cmp.wend; pcb_dad_spin_txt_enter_cb_dry(hid_ctx, caller_data, str); /* fix up missing unit */ @@ -349,11 +349,11 @@ pcb_dad_spin_txt_enter_call_users(hid_ctx, end); } -void pcb_dad_spin_down_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_spin_down_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_spin_t *spin = (pcb_hid_dad_spin_t *)attr->user_data; - pcb_hid_attribute_t *str = attr - spin->wdown + spin->wstr; - pcb_hid_attribute_t *end = attr - spin->wdown + spin->cmp.wend; + rnd_hid_attribute_t *str = attr - spin->wdown + spin->wstr; + rnd_hid_attribute_t *end = attr - spin->wdown + spin->cmp.wend; pcb_dad_spin_txt_enter_cb_dry(hid_ctx, caller_data, str); /* fix up missing unit */ @@ -362,11 +362,11 @@ pcb_dad_spin_txt_enter_call_users(hid_ctx, end); } -void pcb_dad_spin_txt_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_spin_txt_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_spin_t *spin = (pcb_hid_dad_spin_t *)attr->user_data; - pcb_hid_attribute_t *str = attr; - pcb_hid_attribute_t *end = attr - spin->wstr + spin->cmp.wend; + rnd_hid_attribute_t *str = attr; + rnd_hid_attribute_t *end = attr - spin->wstr + spin->cmp.wend; char *ends, *warn = NULL; long l; double d; @@ -412,11 +412,11 @@ spin_changed(hid_ctx, caller_data, spin, end); } -void pcb_dad_spin_txt_enter_cb_dry(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_spin_txt_enter_cb_dry(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_spin_t *spin = (pcb_hid_dad_spin_t *)attr->user_data; - pcb_hid_attribute_t *str = attr; - pcb_hid_attribute_t *end = attr - spin->wstr + spin->cmp.wend; + rnd_hid_attribute_t *str = attr; + rnd_hid_attribute_t *end = attr - spin->wstr + spin->cmp.wend; const char *inval; char *ends, *warn = NULL; int changed = 0; @@ -439,7 +439,7 @@ strtod(inval, &ends); while(isspace(*ends)) ends++; if (*ends == '\0') { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char *tmp = pcb_concat(inval, " ", pcbhl_conf.editor.grid_unit->suffix, NULL); changed = 1; @@ -466,7 +466,7 @@ } } -void pcb_dad_spin_txt_enter_call_users(void *hid_ctx, pcb_hid_attribute_t *end) +void pcb_dad_spin_txt_enter_call_users(void *hid_ctx, rnd_hid_attribute_t *end) { struct { void *caller_data; @@ -476,10 +476,10 @@ end->enter_cb(hid_ctx, hc->caller_data, end); } -void pcb_dad_spin_txt_enter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_spin_txt_enter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_spin_t *spin = (pcb_hid_dad_spin_t *)attr->user_data; - pcb_hid_attribute_t *end = attr - spin->wstr + spin->cmp.wend; + rnd_hid_attribute_t *end = attr - spin->wstr + spin->cmp.wend; pcb_dad_spin_txt_enter_cb_dry(hid_ctx, caller_data, attr); pcb_dad_spin_txt_enter_call_users(hid_ctx, end); @@ -486,18 +486,18 @@ } -void pcb_dad_spin_unit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_spin_unit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_spin_t *spin = (pcb_hid_dad_spin_t *)attr->user_data; - pcb_hid_attribute_t *str = attr - spin->wunit + spin->wstr; - pcb_hid_attribute_t *end = attr - spin->wunit + spin->cmp.wend; + rnd_hid_attribute_t *str = attr - spin->wunit + spin->wstr; + rnd_hid_attribute_t *end = attr - spin->wunit + spin->cmp.wend; spin_unit_dialog(hid_ctx, spin, end, str); } -void pcb_dad_spin_set_num(pcb_hid_attribute_t *attr, long l, double d, rnd_coord_t c) +void pcb_dad_spin_set_num(rnd_hid_attribute_t *attr, long l, double d, rnd_coord_t c) { pcb_hid_dad_spin_t *spin = attr->wdata; - pcb_hid_attribute_t *str = attr - spin->cmp.wend + spin->wstr; + rnd_hid_attribute_t *str = attr - spin->cmp.wend + spin->wstr; switch(spin->type) { case PCB_DAD_SPIN_INT: @@ -521,7 +521,7 @@ } } -void pcb_dad_spin_free(pcb_hid_attribute_t *attr) +void pcb_dad_spin_free(rnd_hid_attribute_t *attr) { if (attr->type == PCB_HATT_END) { pcb_hid_dad_spin_t *spin = attr->wdata; @@ -531,22 +531,22 @@ } } -int pcb_dad_spin_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled) +int pcb_dad_spin_widget_state(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled) { pcb_hid_dad_spin_t *spin = end->wdata; return pcb_gui->attr_dlg_widget_state(hid_ctx, spin->wall, enabled); } -int pcb_dad_spin_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide) +int pcb_dad_spin_widget_hide(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide) { pcb_hid_dad_spin_t *spin = end->wdata; return pcb_gui->attr_dlg_widget_hide(hid_ctx, spin->wall, hide); } -int pcb_dad_spin_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val) +int pcb_dad_spin_set_value(rnd_hid_attribute_t *end, void *hid_ctx, int idx, const rnd_hid_attr_val_t *val) { pcb_hid_dad_spin_t *spin = end->wdata; - pcb_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; + rnd_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; /* do not modify the text field if the value is the same */ switch(spin->type) { @@ -572,10 +572,10 @@ return 0; } -void pcb_dad_spin_set_help(pcb_hid_attribute_t *end, const char *help) +void pcb_dad_spin_set_help(rnd_hid_attribute_t *end, const char *help) { pcb_hid_dad_spin_t *spin = end->wdata; - pcb_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; + rnd_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; if ((spin->hid_ctx == NULL) || (*spin->hid_ctx == NULL)) /* while building */ str->help_text = help; @@ -589,7 +589,7 @@ for(spin = gdl_first(&pcb_dad_coord_spins); spin != NULL; spin = gdl_next(&pcb_dad_coord_spins, spin)) { - pcb_hid_attribute_t *dlg; + rnd_hid_attribute_t *dlg; void *hid_ctx; if ((spin->unit != NULL) || (spin->attrs == NULL) || (*spin->attrs == NULL) || (spin->hid_ctx == NULL) || (*spin->hid_ctx == NULL)) @@ -603,8 +603,8 @@ void pcb_dad_spin_update_internal(pcb_hid_dad_spin_t *spin) { - pcb_hid_attribute_t *dlg = *spin->attrs, *end = dlg+spin->cmp.wend; - pcb_hid_attribute_t *str = dlg + spin->wstr; + rnd_hid_attribute_t *dlg = *spin->attrs, *end = dlg+spin->cmp.wend; + rnd_hid_attribute_t *str = dlg + spin->wstr; void *hid_ctx = *spin->hid_ctx; char buf[128]; @@ -614,10 +614,10 @@ do_step(hid_ctx, spin, &dlg[spin->wstr], &dlg[spin->cmp.wend], 0); /* cheap conversion*/ } -void pcb_dad_spin_set_geo(pcb_hid_attribute_t *end, pcb_hatt_compflags_t flg, int geo) +void pcb_dad_spin_set_geo(rnd_hid_attribute_t *end, pcb_hatt_compflags_t flg, int geo) { pcb_hid_dad_spin_t *spin = end->wdata; - pcb_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; + rnd_hid_attribute_t *str = end - spin->cmp.wend + spin->wstr; if (flg == PCB_HATF_HEIGHT_CHR) { str->hatt_flags |= PCB_HATF_HEIGHT_CHR; Index: trunk/src/librnd/core/hid_dad_spin.h =================================================================== --- trunk/src/librnd/core/hid_dad_spin.h (revision 30970) +++ trunk/src/librnd/core/hid_dad_spin.h (revision 30971) @@ -41,7 +41,7 @@ int wall, wstr, wup, wdown, wunit, wwarn; const rnd_unit_t *unit; /* for PCB_DAD_SPIN_COORD and PCB_DAD_SPIN_FREQ only: current unit */ pcb_family_t unit_family; - pcb_hid_attribute_t **attrs; + rnd_hid_attribute_t **attrs; void **hid_ctx; int set_writeback_lock; rnd_coord_t last_good_crd; @@ -134,21 +134,21 @@ extern const char *pcb_hid_dad_spin_unit[]; extern const char *pcb_hid_dad_spin_warn[]; -void pcb_dad_spin_up_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -void pcb_dad_spin_down_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -void pcb_dad_spin_txt_enter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -void pcb_dad_spin_txt_enter_cb_dry(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -void pcb_dad_spin_txt_enter_call_users(void *hid_ctx, pcb_hid_attribute_t *end); /* call the user's enter_cb on end */ -void pcb_dad_spin_txt_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -void pcb_dad_spin_unit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); +void pcb_dad_spin_up_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +void pcb_dad_spin_down_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +void pcb_dad_spin_txt_enter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +void pcb_dad_spin_txt_enter_cb_dry(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +void pcb_dad_spin_txt_enter_call_users(void *hid_ctx, rnd_hid_attribute_t *end); /* call the user's enter_cb on end */ +void pcb_dad_spin_txt_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +void pcb_dad_spin_unit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); -void pcb_dad_spin_free(pcb_hid_attribute_t *attrib); -void pcb_dad_spin_set_num(pcb_hid_attribute_t *attr, long l, double d, rnd_coord_t c); -int pcb_dad_spin_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); -int pcb_dad_spin_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); -int pcb_dad_spin_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); -void pcb_dad_spin_set_help(pcb_hid_attribute_t *end, const char *help); -void pcb_dad_spin_set_geo(pcb_hid_attribute_t *end, pcb_hatt_compflags_t flg, int geo); +void pcb_dad_spin_free(rnd_hid_attribute_t *attrib); +void pcb_dad_spin_set_num(rnd_hid_attribute_t *attr, long l, double d, rnd_coord_t c); +int pcb_dad_spin_widget_state(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); +int pcb_dad_spin_widget_hide(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); +int pcb_dad_spin_set_value(rnd_hid_attribute_t *end, void *hid_ctx, int idx, const rnd_hid_attr_val_t *val); +void pcb_dad_spin_set_help(rnd_hid_attribute_t *end, const char *help); +void pcb_dad_spin_set_geo(rnd_hid_attribute_t *end, pcb_hatt_compflags_t flg, int geo); void pcb_dad_spin_update_internal(pcb_hid_dad_spin_t *spin); /* update the widget from spin, before or after the dialog is realized */ Index: trunk/src/librnd/core/hid_dad_tree.c =================================================================== --- trunk/src/librnd/core/hid_dad_tree.c (revision 30970) +++ trunk/src/librnd/core/hid_dad_tree.c (revision 30971) @@ -30,7 +30,7 @@ #include /* recursively free a row list subtree */ -static void pcb_dad_tree_free_rowlist(pcb_hid_attribute_t *attr, gdl_list_t *list) +static void pcb_dad_tree_free_rowlist(rnd_hid_attribute_t *attr, gdl_list_t *list) { pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *r; @@ -53,7 +53,7 @@ } /* Internal: free all rows and caches and the tree itself */ -void pcb_dad_tree_free(pcb_hid_attribute_t *attr) +void pcb_dad_tree_free(rnd_hid_attribute_t *attr) { pcb_hid_tree_t *tree = attr->wdata; htsp_uninit(&tree->paths); Index: trunk/src/librnd/core/hid_dad_tree.h =================================================================== --- trunk/src/librnd/core/hid_dad_tree.h (revision 30970) +++ trunk/src/librnd/core/hid_dad_tree.h (revision 30971) @@ -116,7 +116,7 @@ } /* calculate path of a row and insert it in the tree hash */ -RND_INLINE void pcb_dad_tree_set_hash(pcb_hid_attribute_t *attr, pcb_hid_row_t *row) +RND_INLINE void pcb_dad_tree_set_hash(rnd_hid_attribute_t *attr, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attr->wdata; if (attr->pcb_hatt_flags & PCB_HATF_TREE_COL) { @@ -132,7 +132,7 @@ /* allocate a new row and append it after aft; if aft is NULL, the new row is appended at the end of the list of entries in the root (== at the bottom of the list) */ -RND_INLINE pcb_hid_row_t *pcb_dad_tree_append(pcb_hid_attribute_t *attr, pcb_hid_row_t *aft, char **cols) +RND_INLINE pcb_hid_row_t *pcb_dad_tree_append(rnd_hid_attribute_t *attr, pcb_hid_row_t *aft, char **cols) { pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *nrow = pcb_dad_tree_new_row(cols); @@ -156,7 +156,7 @@ /* allocate a new row and inert it before bfr; if bfr is NULL, the new row is inserted at the beginning of the list of entries in the root (== at the top of the list) */ -RND_INLINE pcb_hid_row_t *pcb_dad_tree_insert(pcb_hid_attribute_t *attr, pcb_hid_row_t *bfr, char **cols) +RND_INLINE pcb_hid_row_t *pcb_dad_tree_insert(rnd_hid_attribute_t *attr, pcb_hid_row_t *bfr, char **cols) { pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *nrow = pcb_dad_tree_new_row(cols); @@ -180,7 +180,7 @@ /* allocate a new row and append it under prn; if aft is NULL, the new row is appended at the end of the list of entries in the root (== at the bottom of the list) */ -RND_INLINE pcb_hid_row_t *pcb_dad_tree_append_under(pcb_hid_attribute_t *attr, pcb_hid_row_t *prn, char **cols) +RND_INLINE pcb_hid_row_t *pcb_dad_tree_append_under(rnd_hid_attribute_t *attr, pcb_hid_row_t *prn, char **cols) { pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *nrow = pcb_dad_tree_new_row(cols); @@ -200,7 +200,7 @@ return nrow; } -RND_INLINE int pcb_dad_tree_remove(pcb_hid_attribute_t *attr, pcb_hid_row_t *row) +RND_INLINE int pcb_dad_tree_remove(rnd_hid_attribute_t *attr, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *r, *rn, *par = pcb_dad_tree_parent_row(tree, row); @@ -234,7 +234,7 @@ pcb_dad_tree_remove(tree->attrib, r); } -RND_INLINE pcb_hid_row_t *pcb_dad_tree_get_selected(pcb_hid_attribute_t *attr) +RND_INLINE pcb_hid_row_t *pcb_dad_tree_get_selected(rnd_hid_attribute_t *attr) { pcb_hid_tree_t *tree = attr->wdata; @@ -246,7 +246,7 @@ return tree->hid_get_selected_cb(tree->attrib, tree->hid_wdata); } -RND_INLINE void pcb_dad_tree_update_hide(pcb_hid_attribute_t *attr) +RND_INLINE void pcb_dad_tree_update_hide(rnd_hid_attribute_t *attr) { pcb_hid_tree_t *tree = attr->wdata; @@ -256,7 +256,7 @@ tree->hid_update_hide_cb(tree->attrib, tree->hid_wdata); } -RND_INLINE int pcb_dad_tree_modify_cell(pcb_hid_attribute_t *attr, pcb_hid_row_t *row, int col, char *new_val) +RND_INLINE int pcb_dad_tree_modify_cell(rnd_hid_attribute_t *attr, pcb_hid_row_t *row, int col, char *new_val) { pcb_hid_tree_t *tree = attr->wdata; @@ -282,7 +282,7 @@ return 0; } -RND_INLINE void pcb_dad_tree_jumpto(pcb_hid_attribute_t *attr, pcb_hid_row_t *row) +RND_INLINE void pcb_dad_tree_jumpto(rnd_hid_attribute_t *attr, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attr->wdata; @@ -303,7 +303,7 @@ tree->hid_expcoll_cb(tree->attrib, tree->hid_wdata, row, expanded); } -RND_INLINE void pcb_dad_tree_expcoll(pcb_hid_attribute_t *attr, pcb_hid_row_t *row, rnd_bool expanded, rnd_bool recursive) +RND_INLINE void pcb_dad_tree_expcoll(rnd_hid_attribute_t *attr, pcb_hid_row_t *row, rnd_bool expanded, rnd_bool recursive) { pcb_hid_tree_t *tree = attr->wdata; Index: trunk/src/librnd/core/hid_dad_unit.c =================================================================== --- trunk/src/librnd/core/hid_dad_unit.c (revision 30970) +++ trunk/src/librnd/core/hid_dad_unit.c (revision 30971) @@ -33,11 +33,11 @@ #include #include -void pcb_dad_unit_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +void pcb_dad_unit_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_unit_t *unit = (pcb_hid_dad_unit_t *)attr->user_data; - pcb_hid_attribute_t *enu = attr; - pcb_hid_attribute_t *end = attr - unit->wenum + unit->cmp.wend; + rnd_hid_attribute_t *enu = attr; + rnd_hid_attribute_t *end = attr - unit->wenum + unit->cmp.wend; const char **vals = enu->wdata; const rnd_unit_t *u = get_unit_by_suffix(vals[enu->val.lng]); int unit_id = u == NULL ? -1 : u - pcb_units; @@ -48,11 +48,11 @@ end->change_cb(hid_ctx, caller_data, end); } -void pcb_dad_unit_set_num(pcb_hid_attribute_t *attr, long unit_id, double unused1, rnd_coord_t unused2) +void pcb_dad_unit_set_num(rnd_hid_attribute_t *attr, long unit_id, double unused1, rnd_coord_t unused2) { int l; pcb_hid_dad_unit_t *unit = attr->wdata; - pcb_hid_attribute_t *enu = attr - unit->cmp.wend + unit->wenum; + rnd_hid_attribute_t *enu = attr - unit->cmp.wend + unit->wenum; const char *target = pcb_units[unit_id].suffix; const char **vals = enu->wdata; @@ -64,7 +64,7 @@ } } -void pcb_dad_unit_set_val_ptr(pcb_hid_attribute_t *end, void *val_) +void pcb_dad_unit_set_val_ptr(rnd_hid_attribute_t *end, void *val_) { const rnd_unit_t *val = val_; int __n__, __v__ = pcb_get_n_units(1); @@ -78,19 +78,19 @@ } } -int pcb_dad_unit_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled) +int pcb_dad_unit_widget_state(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled) { pcb_hid_dad_unit_t *unit = end->wdata; return pcb_gui->attr_dlg_widget_state(hid_ctx, unit->wenum, enabled); } -int pcb_dad_unit_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide) +int pcb_dad_unit_widget_hide(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide) { pcb_hid_dad_unit_t *unit = end->wdata; return pcb_gui->attr_dlg_widget_hide(hid_ctx, unit->wenum, hide); } -int pcb_dad_unit_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val) +int pcb_dad_unit_set_value(rnd_hid_attribute_t *end, void *hid_ctx, int idx, const rnd_hid_attr_val_t *val) { pcb_hid_dad_unit_t *unit = end->wdata; if (pcb_gui->attr_dlg_set_value(hid_ctx, unit->wenum, val) != 0) @@ -99,10 +99,10 @@ return 0; } -void pcb_dad_unit_set_help(pcb_hid_attribute_t *end, const char *help) +void pcb_dad_unit_set_help(rnd_hid_attribute_t *end, const char *help) { pcb_hid_dad_unit_t *unit = end->wdata; - pcb_hid_attribute_t *enu = end - unit->cmp.wend + unit->wenum; + rnd_hid_attribute_t *enu = end - unit->cmp.wend + unit->wenum; if ((unit->hid_ctx == NULL) || (*unit->hid_ctx == NULL)) /* while building */ enu->help_text = help; Index: trunk/src/librnd/core/hid_dad_unit.h =================================================================== --- trunk/src/librnd/core/hid_dad_unit.h (revision 30970) +++ trunk/src/librnd/core/hid_dad_unit.h (revision 30971) @@ -69,13 +69,13 @@ extern const char **pcb_dad_unit_enum; -void pcb_dad_unit_set_num(pcb_hid_attribute_t *attr, long l, double unused1, rnd_coord_t unused2); -int pcb_dad_unit_widget_state(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); -int pcb_dad_unit_widget_hide(pcb_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); -int pcb_dad_unit_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); -void pcb_dad_unit_set_val_ptr(pcb_hid_attribute_t *end, void *val); -void pcb_dad_unit_set_help(pcb_hid_attribute_t *end, const char *help); -void pcb_dad_unit_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); +void pcb_dad_unit_set_num(rnd_hid_attribute_t *attr, long l, double unused1, rnd_coord_t unused2); +int pcb_dad_unit_widget_state(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool enabled); +int pcb_dad_unit_widget_hide(rnd_hid_attribute_t *end, void *hid_ctx, int idx, rnd_bool hide); +int pcb_dad_unit_set_value(rnd_hid_attribute_t *end, void *hid_ctx, int idx, const rnd_hid_attr_val_t *val); +void pcb_dad_unit_set_val_ptr(rnd_hid_attribute_t *end, void *val); +void pcb_dad_unit_set_help(rnd_hid_attribute_t *end, const char *help); +void pcb_dad_unit_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); void pcb_dad_unit_init(enum pcb_family_e family); void pcb_dad_unit_uninit(void); Index: trunk/src/librnd/core/hid_dlg.c =================================================================== --- trunk/src/librnd/core/hid_dlg.c (revision 30970) +++ trunk/src/librnd/core/hid_dlg.c (revision 30971) @@ -126,7 +126,7 @@ return -1; } -void pcb_hid_iterate(pcb_hid_t *hid) +void pcb_hid_iterate(rnd_hid_t *hid) { if (hid->iterate != NULL) hid->iterate(hid); @@ -141,7 +141,7 @@ pcb_hid_progress(0, 0, NULL); } -static void progress_close_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void progress_close_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_progress(0, 0, cancel); } @@ -157,7 +157,7 @@ static pcb_hidval_t timer; static int active = 0, cancelled = 0; static int wp, have_timer = 0; - static pcb_hid_attr_val_t val; + static rnd_hid_attr_val_t val; static double last = 0; static int closing = 0; static struct { Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 30970) +++ trunk/src/librnd/core/hid_init.c (revision 30971) @@ -71,12 +71,12 @@ { NULL, NULL, NULL } }; -pcb_hid_t **pcb_hid_list = 0; +rnd_hid_t **pcb_hid_list = 0; int pcb_hid_num_hids = 0; -pcb_hid_t *pcb_gui = NULL; -pcb_hid_t *pcb_render = NULL; -pcb_hid_t *pcb_exporter = NULL; +rnd_hid_t *pcb_gui = NULL; +rnd_hid_t *pcb_render = NULL; +rnd_hid_t *pcb_exporter = NULL; int pcb_pixel_slop = 1; @@ -149,12 +149,12 @@ pcb_plugin_dir_first = pcb_plugin_dir_last = NULL; } -void pcb_hid_register_hid(pcb_hid_t * hid) +void pcb_hid_register_hid(rnd_hid_t * hid) { int i; - int sz = (pcb_hid_num_hids + 2) * sizeof(pcb_hid_t *); + int sz = (pcb_hid_num_hids + 2) * sizeof(rnd_hid_t *); - if (hid->struct_size != sizeof(pcb_hid_t)) { + if (hid->struct_size != sizeof(rnd_hid_t)) { fprintf(stderr, "Warning: hid \"%s\" has an incompatible ABI.\n", hid->name); return; } @@ -165,15 +165,15 @@ pcb_hid_num_hids++; if (pcb_hid_list) - pcb_hid_list = (pcb_hid_t **) realloc(pcb_hid_list, sz); + pcb_hid_list = (rnd_hid_t **) realloc(pcb_hid_list, sz); else - pcb_hid_list = (pcb_hid_t **) malloc(sz); + pcb_hid_list = (rnd_hid_t **) malloc(sz); pcb_hid_list[pcb_hid_num_hids - 1] = hid; pcb_hid_list[pcb_hid_num_hids] = 0; } -void pcb_hid_remove_hid(pcb_hid_t * hid) +void pcb_hid_remove_hid(rnd_hid_t * hid) { int i; @@ -188,13 +188,13 @@ } -pcb_hid_t *pcb_hid_find_gui(const char *preference) +rnd_hid_t *pcb_hid_find_gui(const char *preference) { int i; /* ugly hack for historical reasons: some old configs and veteran users are used to the --gui gtk option */ if ((preference != NULL) && (strcmp(preference, "gtk") == 0)) { - pcb_hid_t *g; + rnd_hid_t *g; g = pcb_hid_find_gui("gtk2_gl"); if (g != NULL) @@ -223,7 +223,7 @@ exit(1); } -pcb_hid_t *pcb_hid_find_printer() +rnd_hid_t *pcb_hid_find_printer() { int i; @@ -242,7 +242,7 @@ fprintf(f, "%s%s%s", prefix, pcb_hid_list[i]->name, suffix); } -pcb_hid_t *pcb_hid_find_exporter(const char *which) +rnd_hid_t *pcb_hid_find_exporter(const char *which) { int i; @@ -269,7 +269,7 @@ return 0; } -pcb_hid_t **pcb_hid_enumerate() +rnd_hid_t **pcb_hid_enumerate() { return pcb_hid_list; } Index: trunk/src/librnd/core/hid_init.h =================================================================== --- trunk/src/librnd/core/hid_init.h (revision 30970) +++ trunk/src/librnd/core/hid_init.h (revision 30971) @@ -41,7 +41,7 @@ hid_register_hid, used by hid_find_*() and pcb_hid_enumerate(). The order in this list is the same as the order of hid_register_hid calls. */ -extern pcb_hid_t **pcb_hid_list; +extern rnd_hid_t **pcb_hid_list; /* Count of entries in the above. */ extern int pcb_hid_num_hids; @@ -56,17 +56,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. */ -pcb_hid_t *pcb_hid_find_gui(const char *preference); +rnd_hid_t *pcb_hid_find_gui(const char *preference); /* Finds the one printer HID and instantiates it. */ -pcb_hid_t *pcb_hid_find_printer(void); +rnd_hid_t *pcb_hid_find_printer(void); /* Finds the indicated exporter HID and instantiates it. */ -pcb_hid_t *pcb_hid_find_exporter(const char *); +rnd_hid_t *pcb_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. */ -pcb_hid_t **pcb_hid_enumerate(void); +rnd_hid_t **pcb_hid_enumerate(void); /* HID internal interfaces. These may ONLY be called from the HID modules, not from the common PCB code. */ @@ -77,8 +77,8 @@ int pcb_hid_parse_command_line(int *argc, char ***argv); /* Called by the init funcs, used to set up pcb_hid_list. */ -extern void pcb_hid_register_hid(pcb_hid_t * hid); -void pcb_hid_remove_hid(pcb_hid_t * hid); +extern void pcb_hid_register_hid(rnd_hid_t * hid); +void pcb_hid_remove_hid(rnd_hid_t * hid); typedef struct pcb_plugin_dir_s pcb_plugin_dir_t; struct pcb_plugin_dir_s { Index: trunk/src/librnd/core/hid_inlines.h =================================================================== --- trunk/src/librnd/core/hid_inlines.h (revision 30970) +++ trunk/src/librnd/core/hid_inlines.h (revision 30971) @@ -30,9 +30,9 @@ #include #include -RND_INLINE pcb_hid_gc_t pcb_hid_make_gc(void) +RND_INLINE rnd_hid_gc_t pcb_hid_make_gc(void) { - pcb_hid_gc_t res; + rnd_hid_gc_t res; pcb_core_gc_t *hc; res = pcb_render->make_gc(pcb_gui); hc = (pcb_core_gc_t *)res; /* assumes first field is pcb_core_gc_t */ @@ -44,12 +44,12 @@ return res; } -RND_INLINE void pcb_hid_destroy_gc(pcb_hid_gc_t gc) +RND_INLINE void pcb_hid_destroy_gc(rnd_hid_gc_t gc) { pcb_render->destroy_gc(gc); } -RND_INLINE void pcb_hid_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +RND_INLINE void pcb_hid_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { pcb_core_gc_t *hc = (pcb_core_gc_t *)gc; if (hc->cap != style) { @@ -58,7 +58,7 @@ } } -RND_INLINE void pcb_hid_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +RND_INLINE void pcb_hid_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { pcb_core_gc_t *hc = (pcb_core_gc_t *)gc; if (hc->width != width) { @@ -67,7 +67,7 @@ } } -RND_INLINE void pcb_hid_set_draw_xor(pcb_hid_gc_t gc, int xor) +RND_INLINE void pcb_hid_set_draw_xor(rnd_hid_gc_t gc, int xor) { pcb_core_gc_t *hc = (pcb_core_gc_t *)gc; if (hc->xor != xor) { @@ -76,7 +76,7 @@ } } -RND_INLINE void pcb_hid_set_draw_faded(pcb_hid_gc_t gc, int faded) +RND_INLINE void pcb_hid_set_draw_faded(rnd_hid_gc_t gc, int faded) { pcb_core_gc_t *hc = (pcb_core_gc_t *)gc; if (hc->faded != faded) { Index: trunk/src/librnd/core/hid_nogui.c =================================================================== --- trunk/src/librnd/core/hid_nogui.c (revision 30970) +++ trunk/src/librnd/core/hid_nogui.c (revision 30971) @@ -48,13 +48,13 @@ static const char pcb_acth_cli[] = "Intenal: CLI frontend action. Do not use directly."; -static pcb_hid_t nogui_hid; +static rnd_hid_t nogui_hid; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { int nothing_interesting_here; -} hid_gc_s; +} rnd_hid_gc_s; -static pcb_export_opt_t *nogui_get_export_options(pcb_hid_t *hid, int *n_ret) +static rnd_export_opt_t *nogui_get_export_options(rnd_hid_t *hid, int *n_ret) { if (n_ret != NULL) *n_ret = 0; @@ -61,142 +61,142 @@ return NULL; } -static void nogui_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void nogui_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { CRASH("do_export"); } -static int nogui_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int nogui_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { CRASH("parse_arguments"); } -static void nogui_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) +static void nogui_invalidate_lr(rnd_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { CRASH("invalidate_lr"); } -static void nogui_invalidate_all(pcb_hid_t *hid) +static void nogui_invalidate_all(rnd_hid_t *hid) { CRASH("invalidate_all"); } -static int nogui_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int nogui_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { CRASH("set_layer_group"); return 0; } -static void nogui_end_layer(pcb_hid_t *hid) +static void nogui_end_layer(rnd_hid_t *hid) { } -static pcb_hid_gc_t nogui_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t nogui_make_gc(rnd_hid_t *hid) { return 0; } -static void nogui_destroy_gc(pcb_hid_gc_t gc) +static void nogui_destroy_gc(rnd_hid_gc_t gc) { } -static void nogui_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void nogui_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { CRASH("set_drawing_mode"); } -static void nogui_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) +static void nogui_render_burst(rnd_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { /* the HID may decide to ignore this hook */ } -static void nogui_set_color(pcb_hid_gc_t gc, const rnd_color_t *name) +static void nogui_set_color(rnd_hid_gc_t gc, const rnd_color_t *name) { CRASH("set_color"); } -static void nogui_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void nogui_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { CRASH("set_line_cap"); } -static void nogui_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void nogui_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { CRASH("set_line_width"); } -static void nogui_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void nogui_set_draw_xor(rnd_hid_gc_t gc, int xor_) { CRASH("set_draw_xor"); } -static void nogui_set_draw_faded(pcb_hid_gc_t gc, int faded) +static void nogui_set_draw_faded(rnd_hid_gc_t gc, int faded) { } -static void nogui_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void nogui_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { CRASH("draw_line"); } -static void nogui_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t end_angle) +static void nogui_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t end_angle) { CRASH("draw_arc"); } -static void nogui_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void nogui_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { CRASH("draw_rect"); } -static void nogui_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void nogui_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { CRASH("fill_circle"); } -static void nogui_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) +static void nogui_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { CRASH("fill_polygon"); } -static void nogui_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void nogui_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { CRASH("fill_rect"); } -static void nogui_calibrate(pcb_hid_t *hid, double xval, double yval) +static void nogui_calibrate(rnd_hid_t *hid, double xval, double yval) { CRASH("calibrate"); } -static int nogui_shift_is_pressed(pcb_hid_t *hid) +static int nogui_shift_is_pressed(rnd_hid_t *hid) { /* This is called from pcb_crosshair_grid_fit() when the board is loaded. */ return 0; } -static int nogui_control_is_pressed(pcb_hid_t *hid) +static int nogui_control_is_pressed(rnd_hid_t *hid) { CRASH("control_is_pressed"); return 0; } -static int nogui_mod1_is_pressed(pcb_hid_t *hid) +static int nogui_mod1_is_pressed(rnd_hid_t *hid) { CRASH("mod1_is_pressed"); return 0; } -static void nogui_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) +static void nogui_get_coords(rnd_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { CRASH("get_coords"); } -static void nogui_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void nogui_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } -static pcb_hidval_t nogui_add_timer(pcb_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) +static pcb_hidval_t nogui_add_timer(rnd_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { pcb_hidval_t rv; CRASH("add_timer"); @@ -204,12 +204,12 @@ return rv; } -static void nogui_stop_timer(pcb_hid_t *hid, pcb_hidval_t timer) +static void nogui_stop_timer(rnd_hid_t *hid, pcb_hidval_t timer) { CRASH("stop_timer"); } -static pcb_hidval_t nogui_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) +static pcb_hidval_t nogui_watch_file(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_hidval_t rv; CRASH("watch_file"); @@ -217,7 +217,7 @@ return rv; } -static void nogui_unwatch_file(pcb_hid_t *hid, pcb_hidval_t watch) +static void nogui_unwatch_file(rnd_hid_t *hid, pcb_hidval_t watch) { CRASH("unwatch_file"); } @@ -330,8 +330,8 @@ /* FIXME - this could use some enhancement to actually use the other args */ -static char *nogui_fileselect(pcb_hid_t *hid, const char *title, const char *descr, - const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) +static char *nogui_fileselect(rnd_hid_t *hid, const char *title, const char *descr, + const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub) { char *answer; @@ -350,7 +350,7 @@ return rnd_strdup(answer); } -void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +void *pcb_nogui_attr_dlg_new(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { CRASH("attr_dlg_new"); } @@ -375,12 +375,12 @@ CRASH("attr_dlg_free"); } -static void nogui_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val) +static void nogui_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val) { CRASH("attr_dlg_dlg_property"); } -static void nogui_beep(pcb_hid_t *hid) +static void nogui_beep(rnd_hid_t *hid) { putchar(7); fflush(stdout); @@ -412,7 +412,7 @@ return 0; } -static void nogui_create_menu(pcb_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) +static void nogui_create_menu(rnd_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) { } @@ -430,7 +430,7 @@ static size_t clip_len; static pcb_hid_clipfmt_t clip_format; -static int nogui_clip_set(pcb_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len) +static int nogui_clip_set(rnd_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len) { free(clip_data); clip_data = malloc(len); @@ -444,7 +444,7 @@ return clip_warn(); } -static int nogui_clip_get(pcb_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len) +static int nogui_clip_get(rnd_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len) { if (clip_data == NULL) { *data = NULL; @@ -463,24 +463,24 @@ return clip_warn(); } -static void nogui_clip_free(pcb_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len) +static void nogui_clip_free(rnd_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len) { free(data); } -static void nogui_reg_mouse_cursor(pcb_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask) +static void nogui_reg_mouse_cursor(rnd_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask) { } -static void nogui_set_mouse_cursor(pcb_hid_t *hid, int idx) +static void nogui_set_mouse_cursor(rnd_hid_t *hid, int idx) { } -static void nogui_set_top_title(pcb_hid_t *hid, const char *title) +static void nogui_set_top_title(rnd_hid_t *hid, const char *title) { } -void pcb_hid_nogui_init(pcb_hid_t * hid) +void pcb_hid_nogui_init(rnd_hid_t * hid) { hid->get_export_options = nogui_get_export_options; hid->do_export = nogui_do_export; @@ -532,11 +532,11 @@ } -pcb_hid_t *pcb_hid_nogui_get_hid(void) +rnd_hid_t *pcb_hid_nogui_get_hid(void) { - memset(&nogui_hid, 0, sizeof(pcb_hid_t)); + memset(&nogui_hid, 0, sizeof(rnd_hid_t)); - nogui_hid.struct_size = sizeof(pcb_hid_t); + nogui_hid.struct_size = sizeof(rnd_hid_t); nogui_hid.name = "nogui"; nogui_hid.description = "Default GUI when no other GUI is present. " "Does nothing."; Index: trunk/src/librnd/core/hid_nogui.h =================================================================== --- trunk/src/librnd/core/hid_nogui.h (revision 30970) +++ trunk/src/librnd/core/hid_nogui.h (revision 30971) @@ -1,11 +1,11 @@ #ifndef PCB_HID_COMMON_HIDNOGUI_H #define PCB_HID_COMMON_HIDNOGUI_H -void pcb_hid_nogui_init(pcb_hid_t * hid); -pcb_hid_t *pcb_hid_nogui_get_hid(void); +void pcb_hid_nogui_init(rnd_hid_t * hid); +rnd_hid_t *pcb_hid_nogui_get_hid(void); /* For checking if attr dialogs are not available: */ -void *pcb_nogui_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +void *pcb_nogui_attr_dlg_new(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int pcb_nogui_progress(long so_far, long total, const char *message); Index: trunk/src/librnd/core/hidlib.h =================================================================== --- trunk/src/librnd/core/hidlib.h (revision 30970) +++ trunk/src/librnd/core/hidlib.h (revision 30971) @@ -106,10 +106,10 @@ /* Main expose: draw the design in the top window (pcb-rnd: all layers with all flags (no .content is used) */ -void pcbhl_expose_main(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *region, pcb_xform_t *xform_caller); +void pcbhl_expose_main(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *region, rnd_xform_t *xform_caller); /* Preview expose: generic, dialog based, used in preview widgets */ -void pcbhl_expose_preview(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *e); +void pcbhl_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e); Index: trunk/src/librnd/core/pixmap.c =================================================================== --- trunk/src/librnd/core/pixmap.c (revision 30970) +++ trunk/src/librnd/core/pixmap.c (revision 30971) @@ -36,7 +36,7 @@ static unsigned int pixmap_hash_(const void *key_, int pixels) { - pcb_pixmap_t *key = (pcb_pixmap_t *)key_; + rnd_pixmap_t *key = (rnd_pixmap_t *)key_; unsigned int i; if (pixels && key->hash_valid) @@ -69,7 +69,7 @@ static int pixmap_eq_(const void *keya_, const void *keyb_, int pixels) { - const pcb_pixmap_t *keya = keya_, *keyb = keyb_; + const rnd_pixmap_t *keya = keya_, *keyb = keyb_; if ((keya->transp_valid) || (keyb->transp_valid)) { if (keya->transp_valid != keyb->transp_valid) return 0; @@ -138,7 +138,7 @@ rnd_message(RND_MSG_ERROR, "pcb_pixmap_chain is not empty: %s. Fix your plugins!\n", i->cookie); } -int pcb_pixmap_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn) +int pcb_pixmap_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn) { pcb_pixmap_import_t *i; for(i = pcb_pixmap_chain; i != NULL; i = i->next) @@ -147,9 +147,9 @@ return -1; } -pcb_pixmap_t *rnd_pixmap_load(rnd_hidlib_t *hidlib, const char *fn) +rnd_pixmap_t *rnd_pixmap_load(rnd_hidlib_t *hidlib, const char *fn) { - pcb_pixmap_t *p = calloc(sizeof(pcb_pixmap_t), 1); + rnd_pixmap_t *p = calloc(sizeof(rnd_pixmap_t), 1); if (pcb_pixmap_load(hidlib, p, fn) == 0) return p; free(p); @@ -156,9 +156,9 @@ return NULL; } -pcb_pixmap_t *rnd_pixmap_alloc(rnd_hidlib_t *hidlib, long sx, long sy) +rnd_pixmap_t *rnd_pixmap_alloc(rnd_hidlib_t *hidlib, long sx, long sy) { - pcb_pixmap_t *p = calloc(sizeof(pcb_pixmap_t), 1); + rnd_pixmap_t *p = calloc(sizeof(rnd_pixmap_t), 1); p->sx = sx; p->sy = sy; p->size = sx * sy * 3; @@ -166,12 +166,12 @@ return p; } -void rnd_pixmap_free_fields(pcb_pixmap_t *pxm) +void rnd_pixmap_free_fields(rnd_pixmap_t *pxm) { free(pxm->p); } -void rnd_pixmap_free(pcb_pixmap_t *pxm) +void rnd_pixmap_free(rnd_pixmap_t *pxm) { rnd_pixmap_free_fields(pxm); free(pxm); Index: trunk/src/librnd/core/pixmap.h =================================================================== --- trunk/src/librnd/core/pixmap.h (revision 30970) +++ trunk/src/librnd/core/pixmap.h (revision 30971) @@ -35,7 +35,7 @@ struct pcb_pixmap_import_s { const char *name; - int (*load)(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn); + int (*load)(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn); /* filled in by code */ pcb_pixmap_import_t *next; @@ -42,7 +42,7 @@ const char *cookie; }; -struct pcb_pixmap_s { +struct rnd_pixmap_s { long size; /* total size of the array in memory (sx*sy*3) */ long sx, sy; /* x and y dimensions */ unsigned char tr, tg, tb; /* color of the transparent pixel if has_transp is 1 */ @@ -70,9 +70,9 @@ void pcb_pixmap_unreg_import_all(const char *cookie); void rnd_pixmap_uninit(void); -int pcb_pixmap_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn); /* legacy API, should be removed */ -pcb_pixmap_t *rnd_pixmap_load(rnd_hidlib_t *hidlib, const char *fn); -pcb_pixmap_t *rnd_pixmap_alloc(rnd_hidlib_t *hidlib, long sx, long sy); +int pcb_pixmap_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn); /* legacy API, should be removed */ +rnd_pixmap_t *rnd_pixmap_load(rnd_hidlib_t *hidlib, const char *fn); +rnd_pixmap_t *rnd_pixmap_alloc(rnd_hidlib_t *hidlib, long sx, long sy); unsigned int pcb_pixmap_hash_meta(const void *key); unsigned int pcb_pixmap_hash_pixels(const void *key); @@ -79,7 +79,7 @@ int pcb_pixmap_eq_meta(const void *keya, const void *keyb); int pcb_pixmap_eq_pixels(const void *keya, const void *keyb); -void rnd_pixmap_free_fields(pcb_pixmap_t *pxm); -void rnd_pixmap_free(pcb_pixmap_t *pxm); +void rnd_pixmap_free_fields(rnd_pixmap_t *pxm); +void rnd_pixmap_free(rnd_pixmap_t *pxm); #endif Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30970) +++ trunk/src/librnd/pcb_compat.h (revision 30971) @@ -490,3 +490,23 @@ #define pcb_RTREE_DIR_STOP rnd_RTREE_DIR_STOP #define pcb_RTREE_DIR_FOUND rnd_RTREE_DIR_FOUND #define pcb_rtree_search_obj rnd_rtree_search_obj +#define pcb_pixmap_s rnd_pixmap_s +#define pcb_pixmap_t rnd_pixmap_t +#define pcb_hid_dad_subdialog_s rnd_hid_dad_subdialog_s +#define pcb_hid_dad_subdialog_t rnd_hid_dad_subdialog_t +#define pcb_hid_expose_ctx_s rnd_hid_expose_ctx_s +#define pcb_hid_expose_ctx_t rnd_hid_expose_ctx_t +#define pcb_hid_s rnd_hid_s +#define pcb_hid_t rnd_hid_t +#define pcb_xform_s rnd_xform_s +#define pcb_xform_t rnd_xform_t +#define pcb_hid_gc_t rnd_hid_gc_t +#define hid_gc_s rnd_hid_gc_s +#define pcb_hid_attr_val_s rnd_hid_attr_val_s +#define pcb_hid_attr_val_t rnd_hid_attr_val_t +#define pcb_hid_attribute_s rnd_hid_attribute_s +#define pcb_hid_attribute_t rnd_hid_attribute_t +#define pcb_export_opt_s rnd_export_opt_s +#define pcb_export_opt_t rnd_export_opt_t +#define pcb_layer_id_t rnd_layer_id_t +#define pcb_layergrp_id_t rnd_layergrp_id_t Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 30970) +++ trunk/src/main_act.c (revision 30971) @@ -72,7 +72,7 @@ static int help0(void) { - pcb_hid_t **hl = pcb_hid_enumerate(); + rnd_hid_t **hl = pcb_hid_enumerate(); int i; u("pcb-rnd Printed Circuit Board editing program, http://repo.hu/projects/pcb-rnd"); @@ -106,7 +106,7 @@ static int help_invoc(void) { - pcb_hid_t **hl = pcb_hid_enumerate(); + rnd_hid_t **hl = pcb_hid_enumerate(); int i; int n_printer = 0, n_gui = 0, n_exporter = 0; @@ -149,7 +149,7 @@ u(""); if (topic != NULL) { - pcb_hid_t **hl = pcb_hid_enumerate(); + rnd_hid_t **hl = pcb_hid_enumerate(); int i; if (strcmp(topic, "invocation") == 0) return help_invoc(); Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 30970) +++ trunk/src/netlist.c (revision 30971) @@ -938,7 +938,7 @@ } /* Return the (most natural) copper group the obj is in */ -static pcb_layergrp_id_t get_side_group(pcb_board_t *pcb, pcb_any_obj_t *obj) +static rnd_layergrp_id_t get_side_group(pcb_board_t *pcb, pcb_any_obj_t *obj) { switch(obj->type) { case PCB_OBJ_ARC: @@ -960,7 +960,7 @@ { pcb_subc_t *sc1, *sc2, *sctmp; pcb_net_t *net1 = NULL, *net2 = NULL, *ntmp, *target_net = NULL; - pcb_layergrp_id_t group1, group2; + rnd_layergrp_id_t group1, group2; pcb_rat_t *res; static long netname_cnt = 0; char ratname_[32], *ratname, *id; Index: trunk/src/netlist_geo.c =================================================================== --- trunk/src/netlist_geo.c (revision 30970) +++ trunk/src/netlist_geo.c (revision 30971) @@ -30,7 +30,7 @@ typedef struct { pcb_any_obj_t *o1, *o2; rnd_coord_t o1x, o1y, o2x, o2y; - pcb_layergrp_id_t o1g, o2g; + rnd_layergrp_id_t o1g, o2g; double dist2; } pcb_subnet_dist_t; @@ -350,7 +350,7 @@ return sdist_invalid; } -static pcb_layergrp_id_t get_obj_grp(const pcb_board_t *pcb, pcb_any_obj_t *obj) +static rnd_layergrp_id_t get_obj_grp(const pcb_board_t *pcb, pcb_any_obj_t *obj) { switch(obj->type) { case PCB_OBJ_ARC: @@ -361,7 +361,7 @@ case PCB_OBJ_PSTK: /* return the first copper layer's group */ { int n; - pcb_layergrp_id_t res; + rnd_layergrp_id_t res; pcb_pstk_tshape_t *ts = pcb_pstk_get_tshape((pcb_pstk_t *)obj); for(n = 0; n < ts->len; n++) if (ts->shape[n].layer_mask & PCB_LYT_COPPER) Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 30970) +++ trunk/src/obj_arc.c (revision 30971) @@ -433,7 +433,7 @@ void *pcb_arcop_add_to_buffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { pcb_arc_t *a; - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); pcb_layer_t *layer; /* the buffer may not have the specified layer, e.g. on loose subc subc-aux layer */ @@ -457,7 +457,7 @@ assert(arc->parent_type == PCB_PARENT_LAYER); if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_arcop_move_buffer\n"); return NULL; Index: trunk/src/obj_arc_ui.c =================================================================== --- trunk/src/obj_arc_ui.c (revision 30970) +++ trunk/src/obj_arc_ui.c (revision 30971) @@ -35,7 +35,7 @@ #include -static void draw_mark(pcb_hid_gc_t gc, const pcb_arc_t *arc) +static void draw_mark(rnd_hid_gc_t gc, const pcb_arc_t *arc) { const rnd_coord_t mark = PCB_MM_TO_COORD(0.2); pcb_render->draw_line(gc, arc->X-mark, arc->Y, arc->X+mark, arc->Y); Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 30970) +++ trunk/src/obj_common.h (revision 30971) @@ -91,7 +91,7 @@ typedef double pcb_xform_mx_t[9]; #define PCB_XFORM_MX_IDENT {1,0,0, 0,1,0, 0,0,1} -struct pcb_xform_s { /* generic object transformation; all-zero means no transformation */ +struct rnd_xform_s { /* generic object transformation; all-zero means no transformation */ rnd_coord_t bloat; /* if non-zero, bloat (positive) or shrink (negative) by this value */ unsigned layer_faded:1; /* draw layer colors faded */ @@ -110,12 +110,12 @@ /* WARNING: After adding new fields, make sure to update pcb_xform_add() and pcb_xform_is_nop() below */ }; -#define pcb_xform_clear(dst) memset(dst, 0, sizeof(pcb_xform_t)) -#define pcb_xform_copy(dst, src) memcpy(dst, src, sizeof(pcb_xform_t)) +#define pcb_xform_clear(dst) memset(dst, 0, sizeof(rnd_xform_t)) +#define pcb_xform_copy(dst, src) memcpy(dst, src, sizeof(rnd_xform_t)) #define pcb_xform_add(dst, src) \ do { \ - pcb_xform_t *__dst__ = dst; \ - const pcb_xform_t *__src__ = src; \ + rnd_xform_t *__dst__ = dst; \ + const rnd_xform_t *__src__ = src; \ __dst__->bloat += __src__->bloat; \ __dst__->layer_faded |= __src__->layer_faded; \ __dst__->omit_overlay |= __src__->omit_overlay; \ @@ -343,9 +343,9 @@ #define PCB_OBJ_COLOR_ON_BOUND_LAYER(dst, layer, sel) \ do { \ if (layer->meta.bound.type & PCB_LYT_TOP) { \ - pcb_layer_id_t lid = -1; \ + rnd_layer_id_t lid = -1; \ pcb_layergrp_t *g; \ - pcb_layergrp_id_t grp = -1; \ + rnd_layergrp_id_t grp = -1; \ if (layer->meta.bound.type & PCB_LYT_SILK) { \ if (sel) {\ dst = &conf_core.appearance.color.selected; \ Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 30970) +++ trunk/src/obj_gfx.c (revision 30971) @@ -304,7 +304,7 @@ void *pcb_gfxop_add_to_buffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_gfx_t *gfx) { pcb_gfx_t *a; - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); pcb_layer_t *layer; /* the buffer may not have the specified layer, e.g. on loose subc subc-aux layer */ @@ -327,7 +327,7 @@ assert(gfx->parent_type == PCB_PARENT_LAYER); if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_gfxop_move_buffer\n"); return NULL; @@ -599,7 +599,7 @@ return gfx; } -void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, rnd_bool undoable) +void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, rnd_pixmap_t *pxm, rnd_bool undoable) { TODO("gfx: undoable pixmap assign"); gfx->pxm_neutral = pcb_pixmap_insert_neutral_or_free(&pcb_pixmaps, pxm); Index: trunk/src/obj_gfx.h =================================================================== --- trunk/src/obj_gfx.h (revision 30970) +++ trunk/src/obj_gfx.h (revision 30971) @@ -41,8 +41,8 @@ rnd_angle_t rot; unsigned int xmirror:1, ymirror:1; - pcb_pixmap_t *pxm_neutral; /* graphics is a pixmap, if not NULL - in neutral scale/rot */ - pcb_pixmap_t *pxm_xformed; /* transformed version from the cache */ + rnd_pixmap_t *pxm_neutral; /* graphics is a pixmap, if not NULL - in neutral scale/rot */ + rnd_pixmap_t *pxm_xformed; /* transformed version from the cache */ /* calculated/cached fields */ rnd_coord_t cox[4], coy[4]; /* the 4 corners */ @@ -77,7 +77,7 @@ void pcb_gfx_chg_geo(pcb_gfx_t *gfx, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, rnd_angle_t rot, rnd_bool undoable); /* assings pxm to gfx and free pxm (if needed) */ -void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, pcb_pixmap_t *pxm, rnd_bool undoable); +void pcb_gfx_set_pixmap_free(pcb_gfx_t *gfx, rnd_pixmap_t *pxm, rnd_bool undoable); /*** hash and eq ***/ int pcb_gfx_eq(const pcb_host_trans_t *tr1, const pcb_gfx_t *g1, const pcb_host_trans_t *tr2, const pcb_gfx_t *g2); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 30970) +++ trunk/src/obj_line.c (revision 30971) @@ -473,7 +473,7 @@ void *pcb_lineop_add_to_buffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { pcb_line_t *line; - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); pcb_layer_t *layer; /* the buffer may not have the specified layer, e.g. on loose subc subc-aux layer */ @@ -496,7 +496,7 @@ assert(line->parent_type == PCB_PARENT_LAYER); if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_lineop_move_buffer\n"); return NULL; Index: trunk/src/obj_line_drcenf.c =================================================================== --- trunk/src/obj_line_drcenf.c (revision 30970) +++ trunk/src/obj_line_drcenf.c (revision 30971) @@ -231,7 +231,7 @@ rnd_coord_t dx, dy, temp, last, length; rnd_coord_t temp2, last2, length2; pcb_line_t line1, line2; - pcb_layergrp_id_t group, comp; + rnd_layergrp_id_t group, comp; struct drc_info info; rnd_bool two_lines, x_is_long, blocker; rnd_point_t ans; @@ -401,7 +401,7 @@ static void drc_line(rnd_point_t *end) { struct drc_info info; - pcb_layergrp_id_t group, comp; + rnd_layergrp_id_t group, comp; pcb_line_t line; pcb_attached_line_t aline; static rnd_point_t last_good; /* internal state of last good endpoint - we can do this cheat, because... */ @@ -465,7 +465,7 @@ double r1, r2; /* Silence a bogus compiler warning by storing this in a variable */ - pcb_layer_id_t layer_idx = PCB_CURRLID(pcb); + rnd_layer_id_t layer_idx = PCB_CURRLID(pcb); if (pcb_gui->mod1_is_pressed(pcb_gui) || pcb_gui->control_is_pressed(pcb_gui) || PCB->RatDraw) return; Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 30970) +++ trunk/src/obj_poly.c (revision 30971) @@ -619,7 +619,7 @@ void *pcb_polyop_add_to_buffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_poly_t *Polygon) { pcb_poly_t *polygon; - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, Layer); pcb_layer_t *layer; /* the buffer may not have the specified layer, e.g. on loose subc subc-aux layer */ @@ -653,7 +653,7 @@ assert(polygon->parent_type == PCB_PARENT_LAYER); if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_polyop_move_buffer\n"); return NULL; Index: trunk/src/obj_poly_draw_helper.c =================================================================== --- trunk/src/obj_poly_draw_helper.c (revision 30970) +++ trunk/src/obj_poly_draw_helper.c (revision 30971) @@ -69,7 +69,7 @@ } -static void fill_contour(pcb_hid_gc_t gc, pcb_pline_t * pl) +static void fill_contour(rnd_hid_gc_t gc, pcb_pline_t * pl) { size_t n, i = 0; pcb_vnode_t *v; @@ -108,7 +108,7 @@ } -static void thindraw_contour(pcb_hid_gc_t gc, pcb_pline_t * pl) +static void thindraw_contour(rnd_hid_gc_t gc, pcb_pline_t * pl) { pcb_vnode_t *v; @@ -138,7 +138,7 @@ static void fill_contour_cb(pcb_pline_t * pl, void *user_data) { - pcb_hid_gc_t gc = (pcb_hid_gc_t) user_data; + rnd_hid_gc_t gc = (rnd_hid_gc_t) user_data; pcb_pline_t *local_pl = pl; fill_contour(gc, pl); @@ -145,7 +145,7 @@ pcb_poly_contours_free(&local_pl); } -static void fill_clipped_contour(pcb_hid_gc_t gc, pcb_pline_t * pl, const rnd_rnd_box_t * clip_box) +static void fill_clipped_contour(rnd_hid_gc_t gc, pcb_pline_t * pl, const rnd_rnd_box_t * clip_box) { pcb_pline_t *pl_copy; rnd_polyarea_t *clip_poly; @@ -214,7 +214,7 @@ #undef BOUNDS_INSIDE_CLIP_THRESHOLD -static void pcb_dhlp_fill_pcb_polygon(pcb_hid_gc_t gc, pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) +static void pcb_dhlp_fill_pcb_polygon(rnd_hid_gc_t gc, pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) { if (!poly->NoHolesValid) { /* If enough of the polygon is on-screen, compute the entire @@ -249,12 +249,12 @@ static int thindraw_hole_cb(pcb_pline_t * pl, void *user_data) { - pcb_hid_gc_t gc = (pcb_hid_gc_t) user_data; + rnd_hid_gc_t gc = (rnd_hid_gc_t) user_data; thindraw_contour(gc, pl); return 0; } -static void pcb_dhlp_thindraw_pcb_polygon(pcb_hid_gc_t gc, pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) +static void pcb_dhlp_thindraw_pcb_polygon(rnd_hid_gc_t gc, pcb_poly_t * poly, const rnd_rnd_box_t * clip_box) { thindraw_contour(gc, poly->Clipped->contours); pcb_poly_holes(poly, clip_box, thindraw_hole_cb, gc); Index: trunk/src/obj_pstk.c =================================================================== --- trunk/src/obj_pstk.c (revision 30970) +++ trunk/src/obj_pstk.c (revision 30971) @@ -337,7 +337,7 @@ /*** draw ***/ -static void set_ps_color(pcb_pstk_t *ps, int is_current, pcb_layer_type_t lyt, const pcb_layer_t *ly1, pcb_xform_t *xform) +static void set_ps_color(pcb_pstk_t *ps, int is_current, pcb_layer_type_t lyt, const pcb_layer_t *ly1, rnd_xform_t *xform) { const rnd_color_t *color, *layer_color = NULL; rnd_color_t buf; @@ -411,13 +411,13 @@ pcb_render->set_color(pcb_draw_out.fgGC, color); } -static void set_ps_annot_color(pcb_hid_gc_t gc, pcb_pstk_t *ps) +static void set_ps_annot_color(rnd_hid_gc_t gc, pcb_pstk_t *ps) { pcb_render->set_color(pcb_draw_out.fgGC, PCB_FLAG_TEST(PCB_FLAG_SELECTED, ps) ? &conf_core.appearance.color.selected : &conf_core.appearance.color.padstackmark); } -static void pcb_pstk_draw_poly(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape, int fill, rnd_coord_t dthick) +static void pcb_pstk_draw_poly(pcb_draw_info_t *info, rnd_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape, int fill, rnd_coord_t dthick) { long n; @@ -480,7 +480,7 @@ } } -static void pcb_pstk_draw_shape_solid(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape) +static void pcb_pstk_draw_shape_solid(pcb_draw_info_t *info, rnd_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape) { rnd_coord_t r, dthick = 0; if ((info != NULL) && (info->xform != NULL) && (info->xform->bloat != 0)) @@ -505,7 +505,7 @@ } } -static void pcb_pstk_draw_shape_thin(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape) +static void pcb_pstk_draw_shape_thin(pcb_draw_info_t *info, rnd_hid_gc_t gc, pcb_pstk_t *ps, pcb_pstk_shape_t *shape) { rnd_coord_t r, dthick = 0; pcb_hid_set_line_cap(gc, pcb_cap_round); @@ -552,7 +552,7 @@ } else { int n; - pcb_layer_id_t *lid; + rnd_layer_id_t *lid; shape = pcb_pstk_shape_gid(info->pcb, ps, info->objcb.pstk.gid, info->objcb.pstk.comb, &grp); for(n = 0, lid = grp->lid; n < grp->len; n++,lid++) { if (*lid < ps->thermals.used) { @@ -737,11 +737,11 @@ return PCB_R_DIR_FOUND_CONTINUE; } -void pcb_pstk_thindraw(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps) +void pcb_pstk_thindraw(pcb_draw_info_t *info, rnd_hid_gc_t gc, pcb_pstk_t *ps) { pcb_pstk_shape_t *shape = NULL; pcb_board_t *pcb; - pcb_layergrp_id_t gid = PCB_CURRLAYER(PCB)->meta.real.grp; + rnd_layergrp_id_t gid = PCB_CURRLAYER(PCB)->meta.real.grp; pcb = pcb_data_get_top(ps->parent.data); if (pcb != NULL) { @@ -787,12 +787,12 @@ pcb_term_label_draw(info, ps->x, ps->y, conf_core.appearance.term_label_size, vert, pcb_true, (pcb_any_obj_t *)ps); } -static pcb_xform_t dummy_xform; +static rnd_xform_t dummy_xform; void pcb_pstk_draw_preview(pcb_board_t *pcb, const pcb_pstk_t *ps, char *layers, rnd_bool mark, rnd_bool label, const rnd_rnd_box_t *drawn_area) { pcb_draw_info_t info; int n, draw_hole = 0; - pcb_layer_id_t lid; + rnd_layer_id_t lid; info.pcb = pcb; info.drawn_area = drawn_area; @@ -1294,7 +1294,7 @@ /*** undoable thermal change ***/ typedef struct { pcb_pstk_t *ps; - pcb_layer_id_t lid; + rnd_layer_id_t lid; unsigned char shape; } undo_pstk_thermal_t; @@ -1509,7 +1509,7 @@ return 0; } -rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid) +rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, rnd_layergrp_id_t gid) { pcb_layergrp_t *g = &pcb->LayerGroups.grp[gid]; @@ -1578,9 +1578,9 @@ pcb_poly_clear_from_poly(data, PCB_OBJ_PSTK, NULL, pstk); } -pcb_layer_id_t pcb_proto_board_layer_for(const pcb_data_t *data, pcb_layer_type_t mask, pcb_layer_combining_t comb) +rnd_layer_id_t pcb_proto_board_layer_for(const pcb_data_t *data, pcb_layer_type_t mask, pcb_layer_combining_t comb) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; const pcb_layer_t *ly; for(lid = 0, ly = data->Layer; lid < data->LayerN; lid++,ly++) { pcb_layer_type_t typ = pcb_layer_flags_(ly); Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 30970) +++ trunk/src/obj_pstk.h (revision 30971) @@ -117,7 +117,7 @@ int pcb_pstk_change_instance(pcb_pstk_t *ps, rnd_cardinal_t *proto, const rnd_coord_t *clearance, double *rot, int *xmirror, int *smirror); /* Return whether a group is empty (free of padstack shapes) */ -rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, pcb_layergrp_id_t gid); +rnd_bool pcb_pstk_is_group_empty(pcb_board_t *pcb, rnd_layergrp_id_t gid); /* Copy all metadata (attributes, thermals, etc.) */ pcb_pstk_t *pcb_pstk_copy_meta(pcb_pstk_t *dst, pcb_pstk_t *src); @@ -291,7 +291,7 @@ /* Return the id of a board layer that matches a mask:comb pair or invalid if nothing matched */ -pcb_layer_id_t pcb_proto_board_layer_for(const pcb_data_t *data, pcb_layer_type_t mask, pcb_layer_combining_t comb); +rnd_layer_id_t pcb_proto_board_layer_for(const pcb_data_t *data, pcb_layer_type_t mask, pcb_layer_combining_t comb); /*** hash ***/ unsigned int pcb_pstk_proto_hash(const pcb_pstk_proto_t *p); Index: trunk/src/obj_pstk_draw.h =================================================================== --- trunk/src/obj_pstk_draw.h (revision 30970) +++ trunk/src/obj_pstk_draw.h (revision 30971) @@ -47,7 +47,7 @@ void pcb_pstk_invalidate_erase(pcb_pstk_t *ps); void pcb_pstk_invalidate_draw(pcb_pstk_t *ps); -void pcb_pstk_thindraw(pcb_draw_info_t *info, pcb_hid_gc_t gc, pcb_pstk_t *ps); +void pcb_pstk_thindraw(pcb_draw_info_t *info, rnd_hid_gc_t gc, pcb_pstk_t *ps); /* Draw a padstack for perview; if layers is NULL, draw all layers, else draw the layers where it is not zero (layers are defined in pcb_proto_layers[]) */ Index: trunk/src/obj_pstk_inlines.h =================================================================== --- trunk/src/obj_pstk_inlines.h (revision 30970) +++ trunk/src/obj_pstk_inlines.h (revision 30971) @@ -104,7 +104,7 @@ /* return the type of drill and optionally fill in group IDs of drill ends ; if proto_out is not NULL, also load it with the proto */ -RND_INLINE pcb_bb_type_t pcb_pstk_bbspan(pcb_board_t *pcb, const pcb_pstk_t *ps, pcb_layergrp_id_t *top, pcb_layergrp_id_t *bottom, pcb_pstk_proto_t **proto_out) +RND_INLINE pcb_bb_type_t pcb_pstk_bbspan(pcb_board_t *pcb, const pcb_pstk_t *ps, rnd_layergrp_id_t *top, rnd_layergrp_id_t *bottom, pcb_pstk_proto_t **proto_out) { pcb_bb_type_t res; int topi, boti; @@ -182,9 +182,9 @@ /* return whether a given padstack drills a given group (does not consider plating, only drill!) */ -RND_INLINE pcb_bool_t pcb_pstk_bb_drills(pcb_board_t *pcb, const pcb_pstk_t *ps, pcb_layergrp_id_t grp, pcb_pstk_proto_t **proto_out) +RND_INLINE pcb_bool_t pcb_pstk_bb_drills(pcb_board_t *pcb, const pcb_pstk_t *ps, rnd_layergrp_id_t grp, pcb_pstk_proto_t **proto_out) { - pcb_layergrp_id_t top, bot; + rnd_layergrp_id_t top, bot; pcb_bb_type_t res = pcb_pstk_bbspan(pcb, ps, &top, &bot, proto_out); switch(res) { case PCB_BB_THRU: return pcb_true; @@ -239,7 +239,7 @@ pcb_layer_combining_t comb = layer->comb; if (lyt & PCB_LYT_COPPER) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (lyt & PCB_LYT_INTERN) { /* apply internal only if that layer has drill */ if (!pcb_pstk_bb_drills(pcb, ps, pcb_layer_get_group_(layer), NULL)) @@ -274,7 +274,7 @@ } -RND_INLINE pcb_pstk_shape_t *pcb_pstk_shape_gid(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t gid, pcb_layer_combining_t comb, pcb_layergrp_t **grp_out) +RND_INLINE pcb_pstk_shape_t *pcb_pstk_shape_gid(pcb_board_t *pcb, pcb_pstk_t *ps, rnd_layergrp_id_t gid, pcb_layer_combining_t comb, pcb_layergrp_t **grp_out) { pcb_layergrp_t *grp = pcb_get_layergrp(pcb, gid); @@ -296,7 +296,7 @@ /* if all layers of the group says no-shape, don't have a shape */ for(n = 0, nosh = 0; n < grp->len; n++) { - pcb_layer_id_t lid = grp->lid[n]; + rnd_layer_id_t lid = grp->lid[n]; if ((lid < ps->thermals.used) && (ps->thermals.shape[lid] & PCB_THERMAL_ON) && ((ps->thermals.shape[lid] & 3) == PCB_THERMAL_NOSHAPE)) nosh++; } @@ -309,7 +309,7 @@ } /* Returns the mech shape (slot) if it affects grp */ -RND_INLINE pcb_pstk_shape_t *pcb_pstk_shape_mech_gid(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layergrp_id_t grp) +RND_INLINE pcb_pstk_shape_t *pcb_pstk_shape_mech_gid(pcb_board_t *pcb, pcb_pstk_t *ps, rnd_layergrp_id_t grp) { pcb_pstk_tshape_t *ts; pcb_pstk_proto_t *proto; Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 30970) +++ trunk/src/obj_pstk_proto.c (revision 30971) @@ -371,7 +371,7 @@ for(n = 0; n < ts->len; n++) { pcb_pstk_shape_t *shp = &ts->shape[n]; - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *ly, *ly1 = NULL, *ly2 = NULL, *ly3 = NULL; rnd_coord_t clr; pcb_poly_t *p; Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 30970) +++ trunk/src/obj_rat.c (revision 30971) @@ -93,7 +93,7 @@ /*** utility ***/ /* creates a new rat-line */ -pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_layergrp_id_t group1, pcb_layergrp_id_t group2, rnd_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2) +pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_layergrp_id_t group1, rnd_layergrp_id_t group2, rnd_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2) { pcb_rat_t *Line; @@ -153,7 +153,7 @@ /*** utility ***/ -static rnd_bool rat_meets_line(pcb_line_t *line, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_line(pcb_line_t *line, rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid) { if (gid >= 0) { pcb_layer_t *ly = pcb_layer_get_real(line->parent.layer); @@ -166,7 +166,7 @@ } -static rnd_bool rat_meets_arc(pcb_arc_t *arc, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_arc(pcb_arc_t *arc, rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid) { if (gid >= 0) { pcb_layer_t *ly = pcb_layer_get_real(arc->parent.layer); @@ -177,7 +177,7 @@ } -static rnd_bool rat_meets_poly(pcb_poly_t *poly, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_poly(pcb_poly_t *poly, rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid) { if (gid >= 0) { pcb_layer_t *ly = pcb_layer_get_real(poly->parent.layer); @@ -189,7 +189,7 @@ return pcb_poly_is_point_in_p(x, y, 1, poly); } -static rnd_bool rat_meets_pstk(pcb_data_t *data, pcb_pstk_t *pstk, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) +static rnd_bool rat_meets_pstk(pcb_data_t *data, pcb_pstk_t *pstk, rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid) { pcb_layergrp_t *g = pcb_get_layergrp(PCB, gid); pcb_layer_t *ly; @@ -268,7 +268,7 @@ /* return the first object (the type that is most likely an endpoint of a rat) on a point on a layer group */ -static pcb_any_obj_t *find_obj_on_grp(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) +static pcb_any_obj_t *find_obj_on_grp(pcb_data_t *data, rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid) { int i; rnd_rtree_box_t sb; @@ -306,7 +306,7 @@ pcb_idpath_t **path = &rat->anchor[!!end]; rnd_coord_t x = (end == 0) ? rat->Point1.X : rat->Point2.X; rnd_coord_t y = (end == 0) ? rat->Point1.Y : rat->Point2.Y; - pcb_layergrp_id_t gid = (end == 0) ? rat->group1 : rat->group2; + rnd_layergrp_id_t gid = (end == 0) ? rat->group1 : rat->group2; pcb_any_obj_t *ao; /* (relatively) cheap thest if existing anchor is valid */ Index: trunk/src/obj_rat.h =================================================================== --- trunk/src/obj_rat.h (revision 30970) +++ trunk/src/obj_rat.h (revision 30971) @@ -38,7 +38,7 @@ struct pcb_rat_line_s { /* a rat-line */ PCB_ANYLINEFIELDS; - pcb_layergrp_id_t group1, group2; /* the layer group each point is on */ + rnd_layergrp_id_t group1, group2; /* the layer group each point is on */ pcb_idpath_t *anchor[2]; /* endpoint object that were originally connected */ gdl_elem_t link; /* a rat line is in a list on a design */ }; @@ -51,7 +51,7 @@ void pcb_rat_unreg(pcb_rat_t *rat); /* if id is <= 0, allocate a new id */ -pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, pcb_layergrp_id_t group1, pcb_layergrp_id_t group2, rnd_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2); +pcb_rat_t *pcb_rat_new(pcb_data_t *Data, long int id, rnd_coord_t X1, rnd_coord_t Y1, rnd_coord_t X2, rnd_coord_t Y2, rnd_layergrp_id_t group1, rnd_layergrp_id_t group2, rnd_coord_t Thickness, pcb_flag_t Flags, pcb_any_obj_t *anchor1, pcb_any_obj_t *anchor2); rnd_bool pcb_rats_destroy(rnd_bool selected); /* Look up the anchor object (object the rat is connected to) for end 0 or Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 30970) +++ trunk/src/obj_subc.c (revision 30971) @@ -684,7 +684,7 @@ return 0; } -static void pcb_subc_draw_origin(pcb_hid_gc_t GC, pcb_subc_t *sc, rnd_coord_t DX, rnd_coord_t DY) +static void pcb_subc_draw_origin(rnd_hid_gc_t GC, pcb_subc_t *sc, rnd_coord_t DX, rnd_coord_t DY) { pcb_line_t *origin; pcb_subc_cache_update(sc); @@ -711,7 +711,7 @@ } /* Draw a small lock on the bottom right corner at lx;ly */ -static void pcb_subc_draw_locked(pcb_hid_gc_t GC, pcb_subc_t *sc, rnd_coord_t lx, rnd_coord_t ly, int on_bottom) +static void pcb_subc_draw_locked(rnd_hid_gc_t GC, pcb_subc_t *sc, rnd_coord_t lx, rnd_coord_t ly, int on_bottom) { rnd_coord_t s = on_bottom ? -PCB_EMARK_SIZE : PCB_EMARK_SIZE; @@ -1637,7 +1637,7 @@ typedef struct { pcb_board_t *pcb; pcb_subc_t *sc; - pcb_layer_id_t lid; + rnd_layer_id_t lid; int slot; /* layer index within the subc */ unsigned int unbind:1; } undo_subc_unbind_t; @@ -1673,7 +1673,7 @@ }; -static void pcb_subc_unbind_(pcb_board_t *pcb, pcb_subc_t *sc, pcb_layer_id_t brdlid, int slot, int undoable) +static void pcb_subc_unbind_(pcb_board_t *pcb, pcb_subc_t *sc, rnd_layer_id_t brdlid, int slot, int undoable) { undo_subc_unbind_t utmp, *u = &utmp; @@ -2089,7 +2089,7 @@ pcb_draw_info_t info; rnd_rtree_it_t it; pcb_any_obj_t *o; - pcb_xform_t xf = {0}; + rnd_xform_t xf = {0}; pcb_draw_setup_default_gui_xform(&xf); /* draw copper only first - order doesn't matter */ Index: trunk/src/obj_term.c =================================================================== --- trunk/src/obj_term.c (revision 30970) +++ trunk/src/obj_term.c (revision 30971) @@ -281,7 +281,7 @@ } \ } while(0) -pcb_any_obj_t *pcb_term_find_name(const pcb_board_t *pcb, pcb_data_t *data, pcb_layer_type_t lyt, const char *subc_name, const char *term_name, pcb_subc_t **parent_out, pcb_layergrp_id_t *gid_out) +pcb_any_obj_t *pcb_term_find_name(const pcb_board_t *pcb, pcb_data_t *data, pcb_layer_type_t lyt, const char *subc_name, const char *term_name, pcb_subc_t **parent_out, rnd_layergrp_id_t *gid_out) { pcb_subc_t *subc; pcb_layer_t *layer; Index: trunk/src/obj_term.h =================================================================== --- trunk/src/obj_term.h (revision 30970) +++ trunk/src/obj_term.h (revision 30971) @@ -84,6 +84,6 @@ /* Look up subc_name/term_name on layers matching lyt. Returns the object or NULL if not found. If the *out parameters are non-NULL, load them. Ignores subcircuits marked as nonetlist even if explicitly named. */ -pcb_any_obj_t *pcb_term_find_name(const pcb_board_t *pcb, pcb_data_t *data, pcb_layer_type_t lyt, const char *subc_name, const char *term_name, pcb_subc_t **parent_out, pcb_layergrp_id_t *gid_out); +pcb_any_obj_t *pcb_term_find_name(const pcb_board_t *pcb, pcb_data_t *data, pcb_layer_type_t lyt, const char *subc_name, const char *term_name, pcb_subc_t **parent_out, rnd_layergrp_id_t *gid_out); #endif Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 30970) +++ trunk/src/obj_text.c (revision 30971) @@ -490,7 +490,7 @@ assert(text->parent_type == PCB_PARENT_LAYER); if ((dstly == NULL) || (dstly == srcly)) { /* auto layer in dst */ - pcb_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); + rnd_layer_id_t lid = pcb_layer_id(ctx->buffer.src, srcly); if (lid < 0) { rnd_message(RND_MSG_ERROR, "Internal error: can't resolve source layer ID in pcb_textop_move_buffer\n"); return NULL; @@ -1064,7 +1064,7 @@ if (xordraw || thindraw) { - pcb_hid_gc_t gc = xordraw ? pcb_crosshair.GC : pcb_draw_out.fgGC; + rnd_hid_gc_t gc = xordraw ? pcb_crosshair.GC : pcb_draw_out.fgGC; for(n = 1, p = poly->Points+1; n < max; n++,p++) pcb_render->draw_line(gc, xordx + x[n-1], xordy + y[n-1], xordx + x[n], xordy + y[n]); pcb_render->draw_line(gc, xordx + x[0], xordy + y[0], xordx + x[max-1], xordy + y[max-1]); @@ -1107,7 +1107,7 @@ } -RND_INLINE void cheap_text_line(pcb_hid_gc_t gc, pcb_xform_mx_t mx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t xordx, rnd_coord_t xordy) +RND_INLINE void cheap_text_line(rnd_hid_gc_t gc, pcb_xform_mx_t mx, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t xordx, rnd_coord_t xordy) { rnd_coord_t tx1, ty1, tx2, ty2; @@ -1475,7 +1475,7 @@ } static pcb_draw_info_t txor_info; -static pcb_xform_t txor_xform; +static rnd_xform_t txor_xform; void pcb_text_draw_xor(pcb_text_t *text, rnd_coord_t x, rnd_coord_t y) { Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 30970) +++ trunk/src/object_act.c (revision 30971) @@ -954,7 +954,7 @@ static const char pcb_acts_MoveLayer[] = "MoveLayer(old,new)\nMoveLayer(lid,group,gid)"; static const char pcb_acth_MoveLayer[] = "Moves/Creates/Deletes Layers."; /* DOC: movelayer.html */ -extern pcb_layergrp_id_t pcb_actd_EditGroup_gid; +extern rnd_layergrp_id_t pcb_actd_EditGroup_gid; fgw_error_t pcb_act_MoveLayer(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *a0, *a1; Index: trunk/src/pixmap_pcb.c =================================================================== --- trunk/src/pixmap_pcb.c (revision 30970) +++ trunk/src/pixmap_pcb.c (revision 30971) @@ -48,9 +48,9 @@ htpp_uninit(&pmhash->pixels); } -pcb_pixmap_t *pcb_pixmap_insert_neutral_or_free(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *pm) +rnd_pixmap_t *pcb_pixmap_insert_neutral_or_free(pcb_pixmap_hash_t *pmhash, rnd_pixmap_t *pm) { - pcb_pixmap_t *r; + rnd_pixmap_t *r; if ((pm->tr_rot != 0) || pm->tr_xmirror || pm->tr_ymirror) return NULL; @@ -67,9 +67,9 @@ return pm; } -pcb_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *ipm, rnd_angle_t rot, int xmirror, int ymirror) +rnd_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, rnd_pixmap_t *ipm, rnd_angle_t rot, int xmirror, int ymirror) { - pcb_pixmap_t *pm; + rnd_pixmap_t *pm; pcb_xform_mx_t mx = PCB_XFORM_MX_IDENT; long n, len; int x, y, ix, iy, ox, oy; @@ -78,7 +78,7 @@ if ((rot == 0) && !xmirror && !ymirror) return ipm; /* xformed == neutral */ - pm = calloc(sizeof(pcb_pixmap_t), 1); + pm = calloc(sizeof(rnd_pixmap_t), 1); if (ipm->has_transp) { pm->tr = ipm->tr; pm->tg = ipm->tg; Index: trunk/src/pixmap_pcb.h =================================================================== --- trunk/src/pixmap_pcb.h (revision 30970) +++ trunk/src/pixmap_pcb.h (revision 30971) @@ -45,10 +45,10 @@ /* Either inserts pm in the board's pixmap hash, if pm is new there, or frees pm and returns the matching pixmap from the board's pixmap hash. pm must be in neutral position (no rotation, no mirror). Returns NULL on error. */ -pcb_pixmap_t *pcb_pixmap_insert_neutral_or_free(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *pm); +rnd_pixmap_t *pcb_pixmap_insert_neutral_or_free(pcb_pixmap_hash_t *pmhash, rnd_pixmap_t *pm); /* Allocate and render a transformed version of pm (or return the one from cache if already cached */ -pcb_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, pcb_pixmap_t *pm, rnd_angle_t rot, int xmirror, int ymirror); +rnd_pixmap_t *pcb_pixmap_alloc_insert_transformed(pcb_pixmap_hash_t *pmhash, rnd_pixmap_t *pm, rnd_angle_t rot, int xmirror, int ymirror); /*** global state ***/ Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 30970) +++ trunk/src/plug_io.h (revision 30971) @@ -127,9 +127,9 @@ unique; if multiple pcb_plug_io_t structs share the same init(), only one, shared format-setting-tab is created for them. If apply is true, the dialog box was closed with okay on this format selected. */ - void *(*save_as_subd_init)(const pcb_plug_io_t *ctx, pcb_hid_dad_subdialog_t *sub, pcb_plug_iot_t type); - void (*save_as_subd_uninit)(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, rnd_bool apply); - void (*save_as_fmt_changed)(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub); + void *(*save_as_subd_init)(const pcb_plug_io_t *ctx, rnd_hid_dad_subdialog_t *sub, pcb_plug_iot_t type); + void (*save_as_subd_uninit)(const pcb_plug_io_t *ctx, void *plg_ctx, rnd_hid_dad_subdialog_t *sub, rnd_bool apply); + void (*save_as_fmt_changed)(const pcb_plug_io_t *ctx, void *plg_ctx, rnd_hid_dad_subdialog_t *sub); const char *default_fmt; const char *description; Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 30970) +++ trunk/src/polygon.c (revision 30971) @@ -352,7 +352,7 @@ static int SubtractPadstack(pcb_data_t *d, pcb_pstk_t *ps, pcb_layer_t *l, pcb_poly_t *p) { rnd_polyarea_t *np; - pcb_layer_id_t i; + rnd_layer_id_t i; /* ps->Clearance == 0 doesn't mean no clearance because of the per shape clearances */ if (!PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, ps)) @@ -490,7 +490,7 @@ pcb_poly_t *polygon; rnd_polyarea_t *np; rnd_polyarea_t *merged; - pcb_layer_id_t i; + rnd_layer_id_t i; /* don't subtract the object that was put back! */ if (b == info->other) @@ -758,7 +758,7 @@ int seen; rnd_rnd_box_t region; struct cpInfo info; - pcb_layergrp_id_t group; + rnd_layergrp_id_t group; unsigned int gflg; pcb_layer_type_t lf; int old_noop; Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 30970) +++ trunk/src/route.c (revision 30971) @@ -107,7 +107,7 @@ return &p_route->objects[p_route->size - 1]; } -void pcb_route_add_line(pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer) +void pcb_route_add_line(pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, rnd_layer_id_t layer) { pcb_route_object_t *p_object = pcb_route_alloc_object(p_route); if (p_object == NULL) @@ -120,7 +120,7 @@ p_route->end_point = *point2; } -void pcb_route_add_arc(pcb_route_t *p_route, rnd_point_t *center, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer) +void pcb_route_add_arc(pcb_route_t *p_route, rnd_point_t *center, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, rnd_layer_id_t layer) { pcb_route_object_t *p_object = pcb_route_alloc_object(p_route); if (p_object == NULL) @@ -138,7 +138,7 @@ } -void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) +void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, rnd_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { pcb_route_reset(route); route->start_point = *point1; @@ -291,7 +291,7 @@ } } -void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) +void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point, rnd_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags) { /* Restart the route */ pcb_route_reset(route); @@ -312,7 +312,7 @@ rnd_point_t *point1 = &route->end_point; rnd_point_t *point2 = point; - pcb_layer_id_t layer_id = route->end_layer; + rnd_layer_id_t layer_id = route->end_layer; /* Set radius to 0 for standard 45/90 operation */ const rnd_coord_t radius = route->thickness * conf_core.editor.route_radius; @@ -398,7 +398,7 @@ } TODO("Pass in other required information such as object flags") -void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2) +void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, rnd_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2) { /* Set radius to 0 for standard 45/90 operation */ /* const rnd_coord_t radius = thickness * conf_core.editor.route_radius; - TODO: remove this if not needed */ @@ -698,7 +698,7 @@ /*----------------------------------------------------------- * Draws the outline of an arc *---------------------------------------------------------*/ -void pcb_route_draw_arc(pcb_hid_gc_t GC, rnd_coord_t x, rnd_coord_t y, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, rnd_coord_t thickness) +void pcb_route_draw_arc(rnd_hid_gc_t GC, rnd_coord_t x, rnd_coord_t y, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, rnd_coord_t thickness) { double x1, y1, x2, y2, wid = thickness / 2; @@ -724,7 +724,7 @@ /*----------------------------------------------------------- * Draws the route as outlines *---------------------------------------------------------*/ -void pcb_route_draw(pcb_route_t *p_route, pcb_hid_gc_t GC) +void pcb_route_draw(pcb_route_t *p_route, rnd_hid_gc_t GC) { int i = 0; for(i = 0; i < p_route->size; ++i) { @@ -752,7 +752,7 @@ /*----------------------------------------------------------- * Draws a drc outline around the route *---------------------------------------------------------*/ -void pcb_route_draw_drc(pcb_route_t *p_route, pcb_hid_gc_t GC) +void pcb_route_draw_drc(pcb_route_t *p_route, rnd_hid_gc_t GC) { rnd_coord_t thickness = p_route->thickness + 2 * conf_core.design.bloat; int i; Index: trunk/src/route.h =================================================================== --- trunk/src/route.h (revision 30970) +++ trunk/src/route.h (revision 30971) @@ -42,7 +42,7 @@ rnd_coord_t radius; /* Arc */ rnd_angle_t start_angle; /* Arc */ rnd_angle_t delta_angle; /* Arc */ - pcb_layer_id_t layer; + rnd_layer_id_t layer; } pcb_route_object_t; typedef struct { @@ -50,8 +50,8 @@ rnd_point_t end_point; rnd_coord_t thickness; rnd_coord_t clearance; - pcb_layer_id_t start_layer; /* The ID of the layer that the route started on */ - pcb_layer_id_t end_layer; /* The ID of the layer that the route ended on, usually the same as the start for simple routes */ + rnd_layer_id_t start_layer; /* The ID of the layer that the route started on */ + rnd_layer_id_t end_layer; /* The ID of the layer that the route ended on, usually the same as the start for simple routes */ pcb_board_t *PCB; pcb_flag_t flags; int size; /* The number of active objects in the array */ @@ -66,14 +66,14 @@ void pcb_route_reset(pcb_route_t *p_route); void pcb_route_reserve(pcb_route_t *p_route, int size); void pcb_route_resize(pcb_route_t *p_route, int size); -void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); +void pcb_route_start(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point, rnd_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); -void pcb_route_add_line(pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer); -void pcb_route_add_arc(pcb_route_t *p_route, rnd_point_t *center, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, pcb_layer_id_t layer); +void pcb_route_add_line(pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, rnd_layer_id_t layer); +void pcb_route_add_arc(pcb_route_t *p_route, rnd_point_t *center, rnd_angle_t start_angle, rnd_angle_t delta, rnd_coord_t radius, rnd_layer_id_t layer); -void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2); +void pcb_route_calculate(pcb_board_t *PCB, pcb_route_t *route, rnd_point_t *point1, rnd_point_t *point2, rnd_layer_id_t layer_id, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags, int mod1, int mod2); void pcb_route_calculate_to(pcb_route_t *route, rnd_point_t *point, int mod1, int mod2); -void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, pcb_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); +void pcb_route_direct(pcb_board_t *PCB, pcb_route_t *p_route, rnd_point_t *point1, rnd_point_t *point2, rnd_layer_id_t layer, rnd_coord_t thickness, rnd_coord_t clearance, pcb_flag_t flags); int pcb_route_apply(const pcb_route_t *p_route); int pcb_route_apply_to_line(const pcb_route_t *p_route, pcb_layer_t *Layer, pcb_line_t *apply_to_line); Index: trunk/src/route_draw.h =================================================================== --- trunk/src/route_draw.h (revision 30970) +++ trunk/src/route_draw.h (revision 30971) @@ -4,7 +4,7 @@ #include #include -void pcb_route_draw(pcb_route_t *p_route, pcb_hid_gc_t GC); -void pcb_route_draw_drc(pcb_route_t *p_route, pcb_hid_gc_t GC); +void pcb_route_draw(pcb_route_t *p_route, rnd_hid_gc_t GC); +void pcb_route_draw_drc(pcb_route_t *p_route, rnd_hid_gc_t GC); #endif Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 30970) +++ trunk/src/search.c (revision 30971) @@ -1193,7 +1193,7 @@ pcb_layer_type_t pstk_vis_layers(pcb_board_t *pcb, pcb_layer_type_t material) { pcb_layer_type_t res = 0, lyt; - pcb_layer_id_t lid; + rnd_layer_id_t lid; for(lid = 0; lid < pcb->Data->LayerN; lid++) { pcb_layer_t *ly = &pcb->Data->Layer[lid]; lyt = pcb_layer_flags_(ly); @@ -1273,7 +1273,7 @@ return 0; } -static int pcb_search_obj_by_loc_group_id(unsigned long Type, void **Result1, void **Result2, void **Result3, unsigned long req_flag, const pcb_layergrp_id_t gid, int HigherAvail, double HigherBound, int objst) +static int pcb_search_obj_by_loc_group_id(unsigned long Type, void **Result1, void **Result2, void **Result3, unsigned long req_flag, const rnd_layergrp_id_t gid, int HigherAvail, double HigherBound, int objst) { pcb_layergrp_t *grp = pcb_get_layergrp(PCB, gid); if (grp == NULL) @@ -1369,7 +1369,7 @@ { /* search the front silk layer first */ int found; - pcb_layergrp_id_t front_silk_id = conf_core.editor.show_solder_side ? pcb_layergrp_get_bottom_silk() : pcb_layergrp_get_top_silk(); + rnd_layergrp_id_t front_silk_id = conf_core.editor.show_solder_side ? pcb_layergrp_get_bottom_silk() : pcb_layergrp_get_top_silk(); found = pcb_search_obj_by_loc_group_id(Type, Result1, Result2, Result3, req_flag, front_silk_id, HigherAvail, HigherBound, objst); if (found > 0) return found; @@ -1390,7 +1390,7 @@ if (PCB->InvisibleObjectsOn) { /* search the back silk layer last, unless it's invisible */ int found; - pcb_layergrp_id_t back_silk_id = conf_core.editor.show_solder_side ? pcb_layergrp_get_top_silk() : pcb_layergrp_get_bottom_silk(); + rnd_layergrp_id_t back_silk_id = conf_core.editor.show_solder_side ? pcb_layergrp_get_top_silk() : pcb_layergrp_get_bottom_silk(); found = pcb_search_obj_by_loc_group_id(Type, Result1, Result2, Result3, req_flag, back_silk_id, HigherAvail, HigherBound, objst); if (found > 0) return found; @@ -1726,7 +1726,7 @@ pcb_r_dir_t pcb_search_data_by_loc(pcb_data_t *data, pcb_objtype_t type, const rnd_rnd_box_t *query_box, pcb_r_dir_t (*cb_)(void *closure, pcb_any_obj_t *obj, void *box), void *closure) { pcb_layer_t *ly; - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_r_dir_t res; const rnd_rtree_box_t *query = (const rnd_rtree_box_t *)query_box; rnd_rtree_dir_t (*cb)(void *, void *, const rnd_rtree_box_t *) = (rnd_rtree_dir_t(*)(void *, void *, const rnd_rtree_box_t *))cb_; Index: trunk/src/stub_draw.c =================================================================== --- trunk/src/stub_draw.c (revision 30970) +++ trunk/src/stub_draw.c (revision 30971) @@ -31,7 +31,7 @@ #include "obj_text_draw.h" /****** common code ******/ -void dummy_draw_text(pcb_draw_info_t *info, pcb_hid_gc_t gc, const char *str) +void dummy_draw_text(pcb_draw_info_t *info, rnd_hid_gc_t gc, const char *str) { pcb_text_t t; @@ -58,30 +58,30 @@ return 0; } -void dummy_DrawFab(pcb_draw_info_t *info, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +void dummy_DrawFab(pcb_draw_info_t *info, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { dummy_draw_text(info, gc, "Can't render the fab layer: the draw_fab plugin is not compiled and/or not loaded"); } int (*pcb_stub_draw_fab_overhang)(void) = dummy_DrawFab_overhang; -void (*pcb_stub_draw_fab)(pcb_draw_info_t *info, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) = dummy_DrawFab; +void (*pcb_stub_draw_fab)(pcb_draw_info_t *info, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) = dummy_DrawFab; /****** csect - cross section of the board ******/ -static void dummy_draw_csect(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void dummy_draw_csect(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { dummy_draw_text(NULL, gc, "Can't render the fab layer: the draw_csect plugin is not compiled and/or not loaded"); } -void (*pcb_stub_draw_csect)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) = dummy_draw_csect; +void (*pcb_stub_draw_csect)(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) = dummy_draw_csect; rnd_bool (*pcb_stub_draw_csect_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) = dummy_mouse; /****** font selector GUI ******/ -static void dummy_draw_fontsel(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_text_t *txt) +static void dummy_draw_fontsel(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e, pcb_text_t *txt) { dummy_draw_text(NULL, gc, "Can't render the font selector: the draw_fontsel plugin is not compiled and/or not loaded"); } @@ -91,6 +91,6 @@ return 0; } -void (*pcb_stub_draw_fontsel)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_text_t *txt) = dummy_draw_fontsel; +void (*pcb_stub_draw_fontsel)(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e, pcb_text_t *txt) = dummy_draw_fontsel; rnd_bool (*pcb_stub_draw_fontsel_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y, pcb_text_t *txt) = dummy_mouse_fontsel; Index: trunk/src/stub_draw.h =================================================================== --- trunk/src/stub_draw.h (revision 30970) +++ trunk/src/stub_draw.h (revision 30971) @@ -38,14 +38,14 @@ /* fab */ extern int (*pcb_stub_draw_fab_overhang)(void); -extern void (*pcb_stub_draw_fab)(pcb_draw_info_t *info, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); +extern void (*pcb_stub_draw_fab)(pcb_draw_info_t *info, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); /* csect */ -extern void (*pcb_stub_draw_csect)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); +extern void (*pcb_stub_draw_csect)(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); extern rnd_bool (*pcb_stub_draw_csect_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); /* fontsel */ -extern void (*pcb_stub_draw_fontsel)(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_text_t *txt); +extern void (*pcb_stub_draw_fontsel)(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e, pcb_text_t *txt); extern rnd_bool (*pcb_stub_draw_fontsel_mouse_ev)(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y, pcb_text_t *txt); #endif Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 30970) +++ trunk/src/thermal.c (revision 30971) @@ -150,7 +150,7 @@ return pcb_poly_from_pcb_arc(&atmp, clr); } -rnd_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, rnd_layer_id_t lid) { rnd_polyarea_t *pa, *pb, *pc; double dx, dy, len, vx, vy, nx, ny, clr, clrth, x1, y1, x2, y2, mx, my; @@ -649,7 +649,7 @@ polytherm_base(pres, it->pa); } -rnd_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, rnd_layer_id_t lid) { rnd_polyarea_t *pa, *pres = NULL; rnd_coord_t clr = poly->Clearance/2; @@ -675,7 +675,7 @@ } /* Generate a clearance around a padstack shape, with no thermal */ -static rnd_polyarea_t *pcb_thermal_area_pstk_nothermal(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid, pcb_pstk_shape_t *shp, rnd_coord_t clearance) +static rnd_polyarea_t *pcb_thermal_area_pstk_nothermal(pcb_board_t *pcb, pcb_pstk_t *ps, rnd_layer_id_t lid, pcb_pstk_shape_t *shp, rnd_coord_t clearance) { pcb_poly_it_t it; rnd_polyarea_t *pres = NULL; @@ -705,7 +705,7 @@ return NULL; } -rnd_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, rnd_layer_id_t lid) { unsigned char thr; pcb_pstk_shape_t *shp, tmpshp; @@ -732,7 +732,7 @@ shp = pcb_pstk_shape_at_(pcb, ps, layer, 1); if (shp == NULL) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); if (proto->hdia < 0) @@ -757,7 +757,7 @@ clearance = shp->clearance/2; if (clearance <= 0) { - pcb_layergrp_id_t gid = pcb_layer_get_group_(layer); + rnd_layergrp_id_t gid = pcb_layer_get_group_(layer); pcb_layergrp_t *grp = pcb_get_layergrp(pcb, gid); pcb_pstk_proto_t *proto = pcb_pstk_get_proto(ps); if (grp == NULL) return NULL; @@ -831,7 +831,7 @@ return NULL; } -rnd_polyarea_t *pcb_thermal_area(pcb_board_t *pcb, pcb_any_obj_t *obj, pcb_layer_id_t lid) +rnd_polyarea_t *pcb_thermal_area(pcb_board_t *pcb, pcb_any_obj_t *obj, rnd_layer_id_t lid) { switch(obj->type) { Index: trunk/src/thermal.h =================================================================== --- trunk/src/thermal.h (revision 30970) +++ trunk/src/thermal.h (revision 30971) @@ -54,10 +54,10 @@ const char *pcb_thermal_bits2str(pcb_thermal_t *bits); -rnd_polyarea_t *pcb_thermal_area(pcb_board_t *p, pcb_any_obj_t *obj, pcb_layer_id_t lid); -rnd_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, pcb_layer_id_t lid); -rnd_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, pcb_layer_id_t lid); -rnd_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, pcb_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area(pcb_board_t *p, pcb_any_obj_t *obj, rnd_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area_line(pcb_board_t *pcb, pcb_line_t *line, rnd_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area_poly(pcb_board_t *pcb, pcb_poly_t *poly, rnd_layer_id_t lid); +rnd_polyarea_t *pcb_thermal_area_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, rnd_layer_id_t lid); unsigned char pcb_themal_style_old2new(rnd_cardinal_t t); rnd_cardinal_t pcb_themal_style_new2old(unsigned char t); Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 30970) +++ trunk/src/undo_old.c (revision 30971) @@ -489,7 +489,7 @@ return pcb_false; } -static void get_subc_parent_data(long subcid, pcb_layer_id_t subclayer, pcb_subc_t **subc, pcb_data_t **data, void **ptr1) +static void get_subc_parent_data(long subcid, rnd_layer_id_t subclayer, pcb_subc_t **subc, pcb_data_t **data, void **ptr1) { if (subcid > 0) { /* need to use a subc layer - putting back a floater */ void *p1, *p2, *p3; @@ -605,7 +605,7 @@ { void *ptr1, *ptr2, *ptr3; int type; - pcb_layer_id_t swap; + rnd_layer_id_t swap; /* lookup entry by it's ID */ type = pcb_search_obj_by_id(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); Index: trunk/src_plugins/act_read/act_layer.c =================================================================== --- trunk/src_plugins/act_read/act_layer.c (revision 30970) +++ trunk/src_plugins/act_read/act_layer.c (revision 30971) @@ -56,7 +56,7 @@ pcb_board_t *pcb = PCB_ACT_BOARD; int cmd, fld; char *cmds, *flds; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; pcb_layer_type_t lyt; long idx; Index: trunk/src_plugins/asm/asm.c =================================================================== --- trunk/src_plugins/asm/asm.c (revision 30970) +++ trunk/src_plugins/asm/asm.c (revision 30971) @@ -350,7 +350,7 @@ pcb_gui->pan(pcb_gui, (sc->BoundingBox.X1+sc->BoundingBox.X2)/2, (sc->BoundingBox.Y1+sc->BoundingBox.Y2)/2, 0); } -static void asm_row_selected(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void asm_row_selected(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { long n; int isgrp = 0, ispart = 0; @@ -449,7 +449,7 @@ group_progress_update(hid_ctx, part->parent); } -static void asm_done_part(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void asm_done_part(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_row_t *row = pcb_dad_tree_get_selected(&asm_ctx.dlg[asm_ctx.wtbl]); if (*(int *)row->user_data) @@ -458,7 +458,7 @@ skip(hid_ctx, 0, row); } -static void asm_undo_part(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void asm_undo_part(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_row_t *row = pcb_dad_tree_get_selected(&asm_ctx.dlg[asm_ctx.wtbl]); if (*(int *)row->user_data) @@ -467,7 +467,7 @@ skip(hid_ctx, 0, row); } -static void asm_skip_part(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void asm_skip_part(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_row_t *row = pcb_dad_tree_get_selected(&asm_ctx.dlg[asm_ctx.wtbl]); if (*(int *)row->user_data) @@ -475,7 +475,7 @@ skip(hid_ctx, 0, row); } -static void asm_done_group_(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr, int dn) +static void asm_done_group_(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr, int dn) { long n; group_t *g; @@ -493,18 +493,18 @@ skip(hid_ctx, 1, row); } -static void asm_done_group(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void asm_done_group(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { asm_done_group_(hid_ctx, caller_data, attr, 1); } -static void asm_undo_group(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void asm_undo_group(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { asm_done_group_(hid_ctx, caller_data, attr, 0); } -static void asm_skip_group(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void asm_skip_group(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_row_t *row = pcb_dad_tree_get_selected(&asm_ctx.dlg[asm_ctx.wtbl]); Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 30970) +++ trunk/src_plugins/autoplace/autoplace.c (revision 30971) @@ -153,9 +153,9 @@ } /* Return a terminal's preferred layer group ID or -1 on error */ -static pcb_layergrp_id_t obj_layergrp(const pcb_any_obj_t *obj) +static rnd_layergrp_id_t obj_layergrp(const pcb_any_obj_t *obj) { - pcb_layergrp_id_t SLayer = -1; + rnd_layergrp_id_t SLayer = -1; pcb_layer_t *layer; switch (obj->type) { Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 30970) +++ trunk/src_plugins/autoroute/autoroute.c (revision 30971) @@ -145,8 +145,8 @@ } #ifdef ROUTE_DEBUG -pcb_hid_t *ddraw = NULL; -static pcb_hid_gc_t ar_gc = 0; +rnd_hid_t *ddraw = NULL; +static rnd_hid_gc_t ar_gc = 0; #endif #define EXPENSIVE 3e28 @@ -406,7 +406,7 @@ #endif /* group number of groups that hold surface mount pads */ -static pcb_layergrp_id_t front, back; +static rnd_layergrp_id_t front, back; static rnd_bool usedGroup[PCB_MAX_LAYERGRP]; static int x_cost[PCB_MAX_LAYERGRP], y_cost[PCB_MAX_LAYERGRP]; static rnd_bool is_layer_group_active[PCB_MAX_LAYERGRP]; @@ -744,7 +744,7 @@ static routebox_t *AddPolygon(vtp0_t layergroupboxes[], rnd_cardinal_t layer, pcb_poly_t *polygon, pcb_route_style_t * style) { int is_not_rectangle = 1; - pcb_layergrp_id_t layergroup = pcb_layer_get_group(PCB, layer); + rnd_layergrp_id_t layergroup = pcb_layer_get_group(PCB, layer); routebox_t *rb; assert(0 <= layergroup && layergroup < pcb_max_group(PCB)); rb = AddIrregularObstacle(layergroupboxes, @@ -870,7 +870,7 @@ PCB_END_LOOP; for (i = 0; i < data->LayerN; i++) { - pcb_layergrp_id_t layergroup; + rnd_layergrp_id_t layergroup; pcb_layer_t *ly = &data->Layer[i]; if (!(pcb_layer_flags_(ly) & PCB_LYT_COPPER)) @@ -943,7 +943,7 @@ } -static routebox_t *crd_add_line(routedata_t *rd, vtp0_t *layergroupboxes, pcb_layergrp_id_t group, pcb_any_obj_t *obj, int j, routebox_t **last_in_net, routebox_t **last_in_subnet) +static routebox_t *crd_add_line(routedata_t *rd, vtp0_t *layergroupboxes, rnd_layergrp_id_t group, pcb_any_obj_t *obj, int j, routebox_t **last_in_net, routebox_t **last_in_subnet) { routebox_t *rb = NULL; pcb_line_t *line = (pcb_line_t *) obj; @@ -1039,7 +1039,7 @@ rb = AddTerm(layergroupboxes, obj, rd->styles[j]); else if (obj->type == PCB_OBJ_LINE) { pcb_layer_t *layer = pcb_layer_get_real(obj->parent.layer); - pcb_layergrp_id_t group = layer->meta.real.grp; + rnd_layergrp_id_t group = layer->meta.real.grp; rb = crd_add_line(rd, layergroupboxes, group, obj, j, last_in_net, &last_in_subnet); } else @@ -1117,7 +1117,7 @@ routing_layers = 0; for (group = 0; group < pcb_max_group(PCB); group++) { for (i = 0; i < PCB->LayerGroups.grp[group].len; i++) { - pcb_layer_id_t lid = PCB->LayerGroups.grp[group].lid[i]; + rnd_layer_id_t lid = PCB->LayerGroups.grp[group].lid[i]; /* layer must be 1) copper and 2) on */ if ((pcb_layer_flags(PCB, lid) & PCB_LYT_COPPER) && PCB->Data->Layer[lid].meta.real.vis) { routing_layers++; @@ -1381,7 +1381,7 @@ { pcb_line_t *line; pcb_layer_t *csl, *SLayer = pcb_get_layer(PCB->Data, group); - pcb_layer_id_t cs_id; + rnd_layer_id_t cs_id; if (showboxen < -1) return; if (showboxen != -1 && showboxen != group) Index: trunk/src_plugins/cam/cam.c =================================================================== --- trunk/src_plugins/cam/cam.c (revision 30970) +++ trunk/src_plugins/cam/cam.c (revision 30971) @@ -205,12 +205,12 @@ {"cam", pcb_act_cam, pcb_acth_cam, pcb_acts_cam} }; -static pcb_export_opt_t *export_cam_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *export_cam_get_export_options(rnd_hid_t *hid, int *n) { return 0; } -static int export_cam_usage(pcb_hid_t *hid, const char *topic) +static int export_cam_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nThe cam exporter shorthand:\n\n"); fprintf(stderr, "\nUsage: pcb-rnd -x cam jobname [cam-opts] [pcb-rnd-options] filename"); @@ -224,7 +224,7 @@ static char *cam_export_job; static cam_ctx_t cam_export_ctx; static int cam_export_has_outfile; -static int export_cam_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int export_cam_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { int d, s, oargc; if (*argc < 1) { @@ -265,7 +265,7 @@ return 1; } -static void export_cam_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void export_cam_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { if (!cam_export_has_outfile) cam_init_inst_fn(&cam_export_ctx); @@ -288,7 +288,7 @@ pcb_export_remove_opts_by_cookie(cam_cookie); } -pcb_hid_t export_cam_hid; +rnd_hid_t export_cam_hid; int pplg_init_cam(void) { @@ -300,11 +300,11 @@ RND_REGISTER_ACTIONS(cam_action_list, cam_cookie) - memset(&export_cam_hid, 0, sizeof(pcb_hid_t)); + memset(&export_cam_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&export_cam_hid); - export_cam_hid.struct_size = sizeof(pcb_hid_t); + export_cam_hid.struct_size = sizeof(rnd_hid_t); export_cam_hid.name = "cam"; export_cam_hid.description = "Shorthand for exporting by can job name"; export_cam_hid.exporter = 1; Index: trunk/src_plugins/cam/cam_compile.h =================================================================== --- trunk/src_plugins/cam/cam_compile.h (revision 30970) +++ trunk/src_plugins/cam/cam_compile.h (revision 30971) @@ -43,7 +43,7 @@ char *arg; } desc; struct { - pcb_hid_t *exporter; + rnd_hid_t *exporter; int argc; char **argv; } plugin; @@ -75,7 +75,7 @@ typedef struct { rnd_hidlib_t *hidlib; char *prefix; /* strdup'd file name prefix from the last prefix command */ - pcb_hid_t *exporter; + rnd_hid_t *exporter; unsigned partial:1; /* when 1, there are objects marked with the EXPORTSEL flag */ unsigned has_partial:1; /* the code has partial in it so an initial flag reset is needed */ Index: trunk/src_plugins/cam/cam_gui.c =================================================================== --- trunk/src_plugins/cam/cam_gui.c (revision 30970) +++ trunk/src_plugins/cam/cam_gui.c (revision 30971) @@ -41,7 +41,7 @@ static void cam_gui_jobs2dlg(cam_dlg_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[2], *cursor_path = NULL; @@ -73,7 +73,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wjobs, &hv); } @@ -81,7 +81,7 @@ static void cam_gui_digest2dlg(cam_dlg_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_cam_code_t *c, *plugin = NULL; char *cell[4], tmp[1024]; @@ -131,8 +131,8 @@ { htsp_t *vars = ctx->cam.vars; htsp_entry_t *e; - pcb_hid_attr_val_t hv; - pcb_hid_attribute_t *attr; + rnd_hid_attr_val_t hv; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[3], *cursor_path = NULL; @@ -162,22 +162,22 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wopts, &hv); } } -static void cam_gui_outfile_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void cam_gui_outfile_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { cam_dlg_t *ctx = caller_data; cam_gui_opts2dlg(ctx); } -static void cam_gui_filter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void cam_gui_filter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { cam_dlg_t *ctx = caller_data; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; const char *text; @@ -190,10 +190,10 @@ pcb_dad_tree_update_hide(attr); } -static void cam_gui_export_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void cam_gui_export_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { cam_dlg_t *ctx = caller_data; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wjobs]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wjobs]; pcb_hid_row_t *row = pcb_dad_tree_get_selected(attr); if (row != NULL) { @@ -214,7 +214,7 @@ return res; } -static void cam_job_select_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void cam_job_select_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; cam_dlg_t *ctx = tree->user_ctx; @@ -221,7 +221,7 @@ if (row != NULL) { char *script = kill_tabs(cam_find_job(row->cell[0])); - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_text(atxt, hid_ctx, PCB_HID_TEXT_REPLACE, script); @@ -340,7 +340,7 @@ PCB_DAD_NEW("cam", ctx->dlg, "CAM export", ctx, pcb_false, cam_close_cb); { /* set default outfile */ - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = pcb_derive_default_filename_(PCB->hidlib.filename, ""); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->woutfile, &hv); free((char *)hv.str); @@ -348,7 +348,7 @@ } { /* set right top text read-only */ - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_readonly(atxt, ctx->dlg_hid_ctx, 1); } Index: trunk/src_plugins/ddraft/constraint_gui.c =================================================================== --- trunk/src_plugins/ddraft/constraint_gui.c (revision 30970) +++ trunk/src_plugins/ddraft/constraint_gui.c (revision 30971) @@ -122,7 +122,7 @@ /* copy all GUI fields into the cons struct */ -static void gui2cons(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void gui2cons(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { char *end, buff[1024]; rnd_bool succ; @@ -138,7 +138,7 @@ g2c_scalar(move_length_mod, crd); } -static void reset_line(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void reset_line(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_angle, str, rnd_strdup("")); PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.line_angle_mod, dbl, 0); @@ -147,7 +147,7 @@ gui2cons(hid_ctx, caller_data, attr); } -static void reset_move(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void reset_move(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_angle, str, rnd_strdup("")); PCB_DAD_SET_VALUE(cnstgui_ctx.dlg_hid_ctx, cnstgui_ctx.move_angle_mod, dbl, 0); @@ -156,18 +156,18 @@ gui2cons(hid_ctx, caller_data, attr); } -static void set_paral(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void set_paral(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "paral", NULL); } -static void set_perp(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void set_perp(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "perp", NULL); } -static void set_tang(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void set_tang(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "tang", NULL); } @@ -182,7 +182,7 @@ cnstgui_ctx.inhibit_confchg--; } -static void set_alldir(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void set_alldir(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { const char *nv; if (cnstgui_ctx.inhibit_confchg) Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 30970) +++ trunk/src_plugins/diag/diag.c (revision 30971) @@ -166,8 +166,8 @@ static fgw_error_t pcb_act_DumpLayers(fgw_arg_t *res, int argc, fgw_arg_t *argv) { int op = -2, g, n, used; - pcb_layer_id_t arr[128]; /* WARNING: this assumes we won't have more than 128 layers */ - pcb_layergrp_id_t garr[128]; /* WARNING: this assumes we won't have more than 128 layers */ + rnd_layer_id_t arr[128]; /* WARNING: this assumes we won't have more than 128 layers */ + rnd_layergrp_id_t garr[128]; /* WARNING: this assumes we won't have more than 128 layers */ rnd_PCB_ACT_MAY_CONVARG(1, FGW_KEYWORD, DumpLayers, op = fgw_keyword(&argv[1])); @@ -213,8 +213,8 @@ printf("Max: theoretical=%d current_board=%d\n", PCB_MAX_LAYER, pcb_max_layer(PCB)); used = pcb_layer_list_any(PCB, PCB_LYT_ANYTHING | PCB_LYT_ANYWHERE | PCB_LYT_VIRTUAL, arr, sizeof(arr)/sizeof(arr[0])); for(n = 0; n < used; n++) { - pcb_layer_id_t layer_id = arr[n]; - pcb_layergrp_id_t grp = pcb_layer_get_group(PCB, layer_id); + rnd_layer_id_t layer_id = arr[n]; + rnd_layergrp_id_t grp = pcb_layer_get_group(PCB, layer_id); printf(" [%lx] %04x group=%ld %s\n", layer_id, pcb_layer_flags(PCB, layer_id), grp, pcb_layer_name(PCB->Data, layer_id)); } @@ -222,7 +222,7 @@ used = pcb_layer_list(PCB, PCB_LYT_COPPER | PCB_LYT_BOTTOM, arr, sizeof(arr)/sizeof(arr[0])); printf("All %d bottom copper layers are:\n", used); for(n = 0; n < used; n++) { - pcb_layer_id_t layer_id = arr[n]; + rnd_layer_id_t layer_id = arr[n]; printf(" [%lx] %s \n", layer_id, PCB->Data->Layer[layer_id].name); } @@ -230,10 +230,10 @@ used = pcb_layergrp_list(PCB, PCB_LYT_COPPER, garr, sizeof(garr)/sizeof(garr[0])); printf("All %d groups containing copper layers are:\n", used); for(g = 0; g < used; g++) { - pcb_layergrp_id_t group_id = garr[g]; + rnd_layergrp_id_t group_id = garr[g]; printf(" group %ld (%d layers)\n", group_id, PCB->LayerGroups.grp[group_id].len); for(n = 0; n < PCB->LayerGroups.grp[group_id].len; n++) { - pcb_layer_id_t layer_id = PCB->LayerGroups.grp[group_id].lid[n]; + rnd_layer_id_t layer_id = PCB->LayerGroups.grp[group_id].lid[n]; printf(" [%lx] %s\n", layer_id, PCB->Data->Layer[layer_id].name); } } @@ -411,7 +411,7 @@ static fgw_error_t pcb_act_d1(fgw_arg_t *res, int argc, fgw_arg_t *argv) { pcb_board_t *pcb = PCB_ACT_BOARD; - pcb_pixmap_t *pxm; + rnd_pixmap_t *pxm; pcb_gfx_t *g = pcb_gfx_new(PCB_CURRLAYER(pcb), PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(233), PCB_MIL_TO_COORD(233), 15, pcb_flag_make(0)); Index: trunk/src_plugins/diag/integrity.c =================================================================== --- trunk/src_plugins/diag/integrity.c (revision 30970) +++ trunk/src_plugins/diag/integrity.c (revision 30971) @@ -185,7 +185,7 @@ references from any node */ static void chk_layers(const char *whose, pcb_data_t *data, pcb_parenttype_t pt, void *parent, int name_chk) { - pcb_layer_id_t n; + rnd_layer_id_t n; long id_chk_cnt = 0; htip_entry_t *e; @@ -306,7 +306,7 @@ static void chk_layergrps(pcb_board_t *pcb) { - pcb_layergrp_id_t n; + rnd_layergrp_id_t n; const char *whose = "board"; for(n = 0; n < pcb->LayerGroups.len; n++) { Index: trunk/src_plugins/dialogs/dlg_export.c =================================================================== --- trunk/src_plugins/dialogs/dlg_export.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_export.c (revision 30971) @@ -43,32 +43,32 @@ int tabs, len; /* per exporter data */ - pcb_hid_t **hid; + rnd_hid_t **hid; const char **tab_name; int **exp_attr; /* widget IDs of the attributes holding the actual data; outer array is indexed by exporter, inner array is by exporter option index from 0*/ int *button; /* widget ID of the export button for a specific exporter */ int *numo; /* number of exporter options */ - pcb_export_opt_t **ea; /* original export option arrays */ + rnd_export_opt_t **ea; /* original export option arrays */ } export_ctx_t; export_ctx_t export_ctx; -static pcb_hid_attr_val_t *get_results(export_ctx_t *export_ctx, int id) +static rnd_hid_attr_val_t *get_results(export_ctx_t *export_ctx, int id) { - pcb_hid_attr_val_t *r; + rnd_hid_attr_val_t *r; int *exp_attr, n, numo = export_ctx->numo[id]; - r = malloc(sizeof(pcb_hid_attr_val_t) * numo); + r = malloc(sizeof(rnd_hid_attr_val_t) * numo); exp_attr = export_ctx->exp_attr[id]; for(n = 0; n < numo; n++) { int src = exp_attr[n]; - memcpy(&r[n], &(export_ctx->dlg[src].val), sizeof(pcb_hid_attr_val_t)); + memcpy(&r[n], &(export_ctx->dlg[src].val), sizeof(rnd_hid_attr_val_t)); } return r; } -static void export_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void export_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { export_ctx_t *export_ctx = caller_data; int h, wid; @@ -84,7 +84,7 @@ wid = attr - export_ctx->dlg; for(h = 0; h < export_ctx->len; h++) { if (export_ctx->button[h] == wid) { - pcb_hid_attr_val_t *results = get_results(export_ctx, h); + rnd_hid_attr_val_t *results = get_results(export_ctx, h); rnd_event(&PCB->hidlib, RND_EVENT_EXPORT_SESSION_BEGIN, NULL); export_ctx->hid[h]->do_export(export_ctx->hid[h], results); rnd_event(&PCB->hidlib, RND_EVENT_EXPORT_SESSION_END, NULL); @@ -114,10 +114,10 @@ for(n = 0; n < ctx->len; n++) { int *exp_attr = export_ctx.exp_attr[n]; int numo = export_ctx.numo[n]; - pcb_export_opt_t *opts = export_ctx.ea[n]; + rnd_export_opt_t *opts = export_ctx.ea[n]; for(i = 0; i < numo; i++) - memcpy(&opts[i].default_val, &ctx->dlg[exp_attr[i]].val, sizeof(pcb_hid_attr_val_t)); + memcpy(&opts[i].default_val, &ctx->dlg[exp_attr[i]].val, sizeof(rnd_hid_attr_val_t)); } } @@ -142,7 +142,7 @@ static void pcb_dlg_export(const char *title, int exporters, int printers) { - pcb_hid_t **hids; + rnd_hid_t **hids; int n, i, *exp_attr; pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; @@ -161,11 +161,11 @@ } export_ctx.tab_name = malloc(sizeof(char *) * (export_ctx.len+1)); - export_ctx.hid = malloc(sizeof(pcb_hid_t *) * (export_ctx.len)); + export_ctx.hid = malloc(sizeof(rnd_hid_t *) * (export_ctx.len)); export_ctx.exp_attr = malloc(sizeof(int *) * (export_ctx.len)); export_ctx.button = malloc(sizeof(int) * (export_ctx.len)); export_ctx.numo = malloc(sizeof(int) * (export_ctx.len)); - export_ctx.ea = malloc(sizeof(pcb_hid_attribute_t *) * (export_ctx.len)); + export_ctx.ea = malloc(sizeof(rnd_hid_attribute_t *) * (export_ctx.len)); for(i = n = 0; hids[n] != NULL; n++) { if (((exporters && hids[n]->exporter) || (printers && hids[n]->printer)) && (!hids[n]->hide_from_gui)) { @@ -184,7 +184,7 @@ export_ctx.tabs = PCB_DAD_CURRENT(export_ctx.dlg); for(n = 0; n < export_ctx.len; n++) { int numo; - pcb_export_opt_t *opts = export_ctx.hid[n]->get_export_options(export_ctx.hid[n], &numo); + rnd_export_opt_t *opts = export_ctx.hid[n]->get_export_options(export_ctx.hid[n], &numo); export_ctx.numo[n] = numo; export_ctx.ea[n] = opts; if (numo < 1) { Index: trunk/src_plugins/dialogs/dlg_flag_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_flag_edit.c (revision 30971) @@ -43,7 +43,7 @@ int obj_type; void *ptr1; pcb_any_obj_t *obj; - pcb_hid_attribute_t *attrs; + rnd_hid_attribute_t *attrs; } fe_ctx_t; #define PCB_FLAGEDIT_TYPES \ @@ -50,7 +50,7 @@ (PCB_OBJ_PSTK | PCB_OBJ_LINE | PCB_OBJ_POLY | \ PCB_OBJ_TEXT | PCB_OBJ_SUBC | PCB_OBJ_ARC) -static void fe_attr_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void fe_attr_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int n; fe_ctx_t *ctx = caller_data; @@ -86,7 +86,7 @@ { int op = F_Object; fe_ctx_t ctx; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; int type; pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; Index: trunk/src_plugins/dialogs/dlg_fontsel.c =================================================================== --- trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_fontsel.c (revision 30971) @@ -71,7 +71,7 @@ memset(ctx, 0, sizeof(fontsel_ctx_t)); } -void fontsel_expose_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +void fontsel_expose_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { fontsel_ctx_t *ctx = prv->user_ctx; @@ -88,7 +88,7 @@ } } -rnd_bool fontsel_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +rnd_bool fontsel_mouse_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { fontsel_ctx_t *ctx = prv->user_ctx; @@ -101,13 +101,13 @@ return pcb_stub_draw_fontsel_mouse_ev(kind, x, y, NULL); } -void fontsel_free_cb(pcb_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx) +void fontsel_free_cb(rnd_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx) { } static void fontsel_preview_update(fontsel_ctx_t *ctx) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; if ((ctx == NULL) || (!ctx->active)) return; @@ -117,13 +117,13 @@ } -static void btn_load_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_load_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "LoadFontFrom", NULL); /* modal, blocking */ fontsel_preview_update((fontsel_ctx_t *)caller_data); } -static void btn_replace_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_replace_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { char file[1] = "", id[5]; pcb_snprintf(id, sizeof(id), "%ld", conf_core.design.text_font_id); @@ -131,7 +131,7 @@ fontsel_preview_update((fontsel_ctx_t *)caller_data); } -static void btn_remove_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_remove_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { if (conf_core.design.text_font_id == 0) { rnd_message(RND_MSG_ERROR, "Can not remove the default font.\n"); Index: trunk/src_plugins/dialogs/dlg_infobar.c =================================================================== --- trunk/src_plugins/dialogs/dlg_infobar.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_infobar.c (revision 30971) @@ -36,13 +36,13 @@ #include "../src_plugins/lib_hid_common/dlg_comm_m.h" #include "plug_io.h" -static void ifb_file_chg_reload_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ifb_file_chg_reload_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_revert_pcb(); rnd_actionva(&PCB->hidlib, "InfoBarFileChanged", "close", NULL); } -static void ifb_file_chg_close_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ifb_file_chg_close_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "InfoBarFileChanged", "close", NULL); } @@ -51,9 +51,9 @@ const char pcb_acth_InfoBarFileChanged[] = "Present the \"file changed\" warning info bar with buttons to reload or cancel"; fgw_error_t pcb_act_InfoBarFileChanged(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - static pcb_hid_dad_subdialog_t sub; + static rnd_hid_dad_subdialog_t sub; static int active = 0, wlab[2]; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; const char *cmd; if (!PCB_HAVE_GUI_ATTR_DLG) { Index: trunk/src_plugins/dialogs/dlg_layer_binding.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_layer_binding.c (revision 30971) @@ -52,7 +52,7 @@ pcb_subc_t *subc; pcb_board_t *pcb; int no_layer; /* the "invalid layer" in the layer names enum */ - pcb_hid_attribute_t *attrs; + rnd_hid_attribute_t *attrs; } lb_ctx_t; int pcb_ly_type2enum(pcb_layer_type_t type) @@ -142,7 +142,7 @@ for(n = 0; n < ctx->data->LayerN; n++) { lb_widx_t *w = ctx->widx + n; pcb_layer_t *layer = ctx->data->Layer + n; - pcb_layer_id_t lid; + rnd_layer_id_t lid; int ofs; /* disable comp for copper and outline */ @@ -236,7 +236,7 @@ } -static void lb_attr_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void lb_attr_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { lb_ctx_t *ctx = caller_data; lb_dialog2data(hid_ctx, ctx); @@ -258,7 +258,7 @@ int op = F_Object; lb_ctx_t ctx; int num_copper; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; memset(&ctx, 0, sizeof(ctx)); rnd_PCB_ACT_MAY_CONVARG(1, FGW_KEYWORD, LayerBinding, op = fgw_keyword(&argv[1])); Index: trunk/src_plugins/dialogs/dlg_layer_flags.c =================================================================== --- trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_layer_flags.c (revision 30971) @@ -40,7 +40,7 @@ pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", 1}, {"OK", 0}, {NULL, 0}}; int wname, wsub, wauto, failed, ar = 0; pcb_layer_t *ly; - pcb_layer_id_t lid; + rnd_layer_id_t lid; rnd_PCB_ACT_MAY_CONVARG(1, FGW_LONG, LayerPropGui, lid = argv[1].val.nat_long); @@ -100,7 +100,7 @@ pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", 1}, {"OK", 0}, {NULL, 0}}; int wname, wtype, wpurp, wloc; int failed, n, ar = 0, orig_type, changed = 0, omit_loc = 0, orig_loc = -1, def_loc; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; static const char *ltypes[] = { "top", "bottom", "any intern", "global", NULL }; pcb_layer_type_t ltype_bits[] = { PCB_LYT_TOP, PCB_LYT_BOTTOM, PCB_LYT_INTERN, 0 }; Index: trunk/src_plugins/dialogs/dlg_lib_pstk.c =================================================================== --- trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_lib_pstk.c (revision 30971) @@ -85,7 +85,7 @@ { pcb_pstk_proto_t *proto; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[4], *cursor_path = NULL; @@ -121,7 +121,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); @@ -149,7 +149,7 @@ ps->ID = -1; /* disable undo and clipping */ } -static void pstklib_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void pstklib_expose(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pstk_lib_ctx_t *ctx = prv->user_ctx; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); @@ -214,9 +214,9 @@ pcb_dad_preview_zoomto(&ctx->dlg[ctx->wprev], &ctx->drawbox); } -static void pstklib_select(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void pstklib_select(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; pcb_hid_tree_t *tree = attrib->wdata; pstk_lib_ctx_t *ctx = tree->user_ctx; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); @@ -234,17 +234,17 @@ pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wprev, &hv); } -static void pstklib_update_prv(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_update_prv(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pstk_lib_ctx_t *ctx = caller_data; pcb_dad_preview_zoomto(&ctx->dlg[ctx->wprev], &ctx->drawbox); } -static void pstklib_update_layerc(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_update_layerc(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pstk_lib_ctx_t *ctx = caller_data; int n, idx = -1, widx = attr - ctx->dlg; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; for(n = 0; n < pcb_proto_num_layers; n++) { if (ctx->wlayerc[n] == widx) { @@ -263,11 +263,11 @@ } -static void pstklib_filter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void pstklib_filter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; const char *text; @@ -316,7 +316,7 @@ } -static void pstklib_proto_edit(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_proto_edit(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); @@ -328,12 +328,12 @@ pstklib_proto_edit_common(ctx, data, strtol(row->cell[0], NULL, 10), 1); } -static void pstklib_proto_new_(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr, int dup) +static void pstklib_proto_new_(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr, int dup) { pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); pcb_pstk_proto_t proto_, *proto; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char tmp[64]; int tab; @@ -365,21 +365,21 @@ pstklib_proto_edit_common(ctx, data, ctx->proto_id, tab); } -static void pstklib_proto_new(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_proto_new(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pstklib_proto_new_(hid_ctx, caller_data, attr, 0); } -static void pstklib_proto_dup(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_proto_dup(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pstklib_proto_new_(hid_ctx, caller_data, attr, 1); } -static void pstklib_proto_switch(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void pstklib_proto_switch(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_row_t *r; rnd_cardinal_t from_pid, to_pid; pcb_pstk_t *ps; @@ -406,11 +406,11 @@ } -static void pstklib_proto_select(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void pstklib_proto_select(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { pstk_lib_ctx_t *ctx = caller_data; pcb_data_t *data = get_data(ctx, ctx->subc_id, NULL); - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_row_t *r; long pid; rnd_rnd_box_t box; @@ -449,7 +449,7 @@ } } -static void pstklib_count_uses(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_count_uses(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_cardinal_t len; pstk_lib_ctx_t *ctx = caller_data; @@ -464,7 +464,7 @@ ctx->stat = NULL; } -static void pstklib_del_unused(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pstklib_del_unused(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_cardinal_t len, n; pstk_lib_ctx_t *ctx = caller_data; Index: trunk/src_plugins/dialogs/dlg_library.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_library.c (revision 30971) @@ -138,7 +138,7 @@ static void library_update_preview(library_ctx_t *ctx, pcb_subc_t *sc, pcb_fplibrary_t *l) { rnd_rnd_box_t bbox; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; gds_t tmp; if (ctx->sc != NULL) { @@ -252,7 +252,7 @@ memset(ctx, 0, sizeof(library_ctx_t)); /* reset all states to the initial - includes ctx->active = 0; */ } -static void create_lib_tree_model_recurse(pcb_hid_attribute_t *attr, pcb_fplibrary_t *parent_lib, pcb_hid_row_t *parent_row) +static void create_lib_tree_model_recurse(rnd_hid_attribute_t *attr, pcb_fplibrary_t *parent_lib, pcb_hid_row_t *parent_row) { char *cell[2]; pcb_fplibrary_t *l; @@ -273,7 +273,7 @@ static void library_lib2dlg(library_ctx_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cursor_path = NULL; @@ -294,7 +294,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtree, &hv); free(cursor_path); @@ -329,9 +329,9 @@ pcb_pclose(f); } -static void library_select(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void library_select(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; pcb_hid_tree_t *tree = attrib->wdata; library_ctx_t *ctx = tree->user_ctx; int close_param = 1; @@ -376,7 +376,7 @@ } -static void library_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void library_expose(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { library_ctx_t *ctx = prv->user_ctx; int orig_po = pcb_draw_force_termlab; @@ -429,10 +429,10 @@ } } -static void library_filter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void library_filter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { library_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; const char *otext; char *text, *sep, *para_start; @@ -544,7 +544,7 @@ static pcb_hid_row_t *find_fp_prefix(library_ctx_t *ctx, const char *name, int namelen) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; attr = &ctx->dlg[ctx->wtree]; @@ -554,10 +554,10 @@ } -static void library_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void library_edit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { library_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_row_t *r, *rnew; const char *otext = ctx->dlg[ctx->wfilt].val.str; char *name, *sep; @@ -576,7 +576,7 @@ pcb_fplibrary_t *l = r->user_data; name = rnd_strdup(l->name); if (name != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = name; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wfilt, &hv); } @@ -606,7 +606,7 @@ free(name); } -static void library_refresh_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void library_refresh_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { library_ctx_t *ctx = caller_data; pcb_hid_row_t *r = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wtree])); @@ -633,7 +633,7 @@ } -static rnd_bool library_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +static rnd_bool library_mouse(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; } Index: trunk/src_plugins/dialogs/dlg_library_param.c =================================================================== --- trunk/src_plugins/dialogs/dlg_library_param.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_library_param.c (revision 30971) @@ -59,8 +59,8 @@ static void set_attr(library_ctx_t *ctx, int pidx, char *val) { - pcb_hid_attr_val_t hv; - pcb_hid_attribute_t *a = &ctx->pdlg[ctx->pwid[pidx]]; + rnd_hid_attr_val_t hv; + rnd_hid_attribute_t *a = &ctx->pdlg[ctx->pwid[pidx]]; const char **s; char *desc; int vlen, len, n; @@ -102,7 +102,7 @@ pcb_gui->attr_dlg_set_value(ctx->pdlg_hid_ctx, ctx->pwid[pidx], &hv); } -static void library_param_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp); +static void library_param_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp); #define pre_append() \ do { \ @@ -304,7 +304,7 @@ for(n = 0; n < ctx->num_params; n++) { char *desc, buff[128]; const char *val; - pcb_hid_attribute_t *a = &ctx->pdlg[ctx->pwid[n]]; + rnd_hid_attribute_t *a = &ctx->pdlg[ctx->pwid[n]]; if ((!a->changed) || (a->empty)) continue; @@ -356,11 +356,11 @@ return sres.array; } -static void library_param_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void library_param_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { library_ctx_t *ctx = caller_data; char *cmd = gen_cmd(ctx); - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cmd; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wfilt, &hv); @@ -474,7 +474,7 @@ void pcb_library_param_fillin(library_ctx_t *ctx, pcb_fplibrary_t *l) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; const char *filter_txt = ctx->dlg[ctx->wfilt].val.str; if (filter_txt != NULL) { Index: trunk/src_plugins/dialogs/dlg_loadsave.c =================================================================== --- trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_loadsave.c (revision 30971) @@ -98,7 +98,7 @@ /*** Save ***/ typedef struct { - pcb_hid_dad_subdialog_t *fmtsub; + rnd_hid_dad_subdialog_t *fmtsub; pcb_io_formats_t *avail; int *opt_tab; /* plugion options tab index for each avail[]; 0 means "no options" (the first tab) */ const char **fmt_tab_names; @@ -115,7 +115,7 @@ static void update_opts(save_t *save) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; int selection = save->fmtsub->dlg[save->wfmt].val.lng; hv.lng = save->opt_tab[selection]; @@ -122,15 +122,15 @@ pcb_gui->attr_dlg_set_value(save->fmtsub->dlg_hid_ctx, save->wopts, &hv); } -static void fmt_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void fmt_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_hid_dad_subdialog_t *fmtsub = caller_data; + rnd_hid_dad_subdialog_t *fmtsub = caller_data; save_t *save = fmtsub->sub_ctx; char *bn, *fn, *s; const char *ext; rnd_event_arg_t res, argv[4]; int selection = attr->val.lng; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; if ((save->avail == NULL) || save->fmt_chg_lock) return; @@ -179,9 +179,9 @@ update_opts(save); } -static void guess_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void guess_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_hid_dad_subdialog_t *fmtsub = caller_data; + rnd_hid_dad_subdialog_t *fmtsub = caller_data; save_t *save = fmtsub->sub_ctx; if (save->fmtsub->dlg[save->wguess].val.lng) { @@ -205,7 +205,7 @@ for(n = 0; n < save->num_fmts; n++) { if (strcmp(save->avail->extension[n], ext) == 0) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; save->fmt_chg_lock = 1; hv.lng = n; pcb_gui->attr_dlg_set_value(save->fmtsub->dlg_hid_ctx, save->wfmt, &hv); @@ -251,7 +251,7 @@ } } -static void save_on_close(pcb_hid_dad_subdialog_t *sub, rnd_bool ok) +static void save_on_close(rnd_hid_dad_subdialog_t *sub, rnd_bool ok) { save_t *save = sub->sub_ctx; int n, i; @@ -387,7 +387,7 @@ { const char *function = "Layout"; static char *cwd = NULL; - pcb_hid_dad_subdialog_t *fmtsub = NULL, fmtsub_local; + rnd_hid_dad_subdialog_t *fmtsub = NULL, fmtsub_local; char *final_name, *name_in = NULL; const char *prompt; pcb_io_formats_t avail; Index: trunk/src_plugins/dialogs/dlg_netlist.c =================================================================== --- trunk/src_plugins/dialogs/dlg_netlist.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_netlist.c (revision 30971) @@ -52,7 +52,7 @@ /* returns allocated net name for the currently selected net */ static char *netlist_data2dlg_netlist(netlist_ctx_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[4], *cursor_path = NULL; @@ -81,7 +81,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnetlist, &hv); } @@ -91,7 +91,7 @@ static void netlist_data2dlg_connlist(netlist_ctx_t *ctx, pcb_net_t *net) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[2], *cursor_path = NULL; @@ -121,7 +121,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtermlist, &hv); free(cursor_path); @@ -146,7 +146,7 @@ } -static void netlist_row_selected(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void netlist_row_selected(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; netlist_ctx_t *ctx= tree->user_ctx; @@ -162,7 +162,7 @@ netlist_force_redraw(ctx); } -static void termlist_row_selected(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void termlist_row_selected(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; netlist_ctx_t *ctx= tree->user_ctx; @@ -187,10 +187,10 @@ free(refdes); } -static void netlist_button_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void netlist_button_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { netlist_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *atree; + rnd_hid_attribute_t *atree; int w = attr - ctx->dlg; pcb_hid_row_t *r; const char *name; @@ -235,19 +235,19 @@ pcb_gui->invalidate_all(pcb_gui); } -static void netlist_claim_obj_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void netlist_claim_obj_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { netlist_ctx_t *ctx = caller_data; rnd_actionva(&ctx->pcb->hidlib, "ClaimNet", "object", NULL); } -static void netlist_claim_sel_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void netlist_claim_sel_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { netlist_ctx_t *ctx = caller_data; rnd_actionva(&ctx->pcb->hidlib, "ClaimNet", "selected", NULL); } -static void netlist_claim_fnd_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void netlist_claim_fnd_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { netlist_ctx_t *ctx = caller_data; rnd_actionva(&ctx->pcb->hidlib, "ClaimNet", "found", NULL); @@ -255,13 +255,13 @@ static vtp0_t netlist_color_save; -static void netlist_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void netlist_expose(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { netlist_ctx_t *ctx = prv->user_ctx; - pcb_xform_t xform; + rnd_xform_t xform; size_t n; void **p; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_row_t *r; pcb_net_t *net = NULL; @@ -302,7 +302,7 @@ } } -static rnd_bool netlist_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +static rnd_bool netlist_mouse(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; } @@ -433,7 +433,7 @@ PCB_DAD_NEW("netlist", netlist_ctx.dlg, "pcb-rnd netlist", &netlist_ctx, pcb_false, netlist_close_cb); { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.dbl = 0.33; pcb_gui->attr_dlg_set_value(netlist_ctx.dlg_hid_ctx, wvpan, &hv); } Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 30971) @@ -66,7 +66,7 @@ const char *prn = ""; int n; pcb_pstk_proto_t *proto; - pcb_layergrp_id_t top_gid, bottom_gid; + rnd_layergrp_id_t top_gid, bottom_gid; pcb_layergrp_t *top_grp, *bottom_grp; pcb_bb_type_t htype; char shp_found[32]; @@ -210,7 +210,7 @@ pcb_board_set_changed_flag(1); } -static void pse_chg_protoid(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_protoid(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; rnd_cardinal_t proto_id; @@ -235,7 +235,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_chg_protodup(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_protodup(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; rnd_cardinal_t proto_id; @@ -253,7 +253,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_chg_instance(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_instance(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; static int lock = 0; @@ -280,7 +280,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_chg_prname(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_prname(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -309,7 +309,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_chg_hole(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_hole(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -334,7 +334,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_chg_proto_clr(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_proto_clr(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -381,7 +381,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_shape_del(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_del(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -393,7 +393,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_shape_hshadow(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_hshadow(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -405,7 +405,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_shape_auto(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_auto(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int n, src_idx = -1; pse_t *pse = caller_data; @@ -451,7 +451,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_shape_copy(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_copy(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -485,7 +485,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_shape_swap(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_swap(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; pcb_pstk_proto_t *proto = pcb_pstk_get_proto(pse->ps); @@ -547,17 +547,17 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pse_shape_shrink(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_shrink(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_shape_bloat(hid_ctx, caller_data, -1); } -static void pse_shape_grow(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_shape_grow(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_shape_bloat(hid_ctx, caller_data, +1); } -static void pse_chg_shape(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_chg_shape(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pse_t *pse = caller_data; int n; @@ -691,7 +691,7 @@ } /* Auto gen shapes for all layers the user selected on the dialog plus add the hole */ -static void pse_gen(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pse_gen(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int err = 0; pse_t *pse = caller_data; Index: trunk/src_plugins/dialogs/dlg_padstack.h =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.h (revision 30970) +++ trunk/src_plugins/dialogs/dlg_padstack.h (revision 30971) @@ -4,7 +4,7 @@ struct pse_s { /* caller conf */ int disable_instance_tab, gen_shape_in_place; - pcb_hid_attribute_t *attrs; + rnd_hid_attribute_t *attrs; pcb_board_t *pcb; pcb_data_t *data; /* parent data where the proto is sitting; might be a subc */ pcb_pstk_t *ps; @@ -33,7 +33,7 @@ /* sub-dialog: shape change */ void *parent_hid_ctx; int editing_shape; /* index of the shape being edited */ - pcb_hid_attribute_t *shape_chg; + rnd_hid_attribute_t *shape_chg; int text_shape, del, derive, hshadow; int copy_do, copy_from; int shrink, amount, grow; Index: trunk/src_plugins/dialogs/dlg_pinout.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pinout.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pinout.c (revision 30971) @@ -56,7 +56,7 @@ } -static void pinout_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void pinout_expose(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pinout_ctx_t *ctx = prv->user_ctx; void *r1, *r2, *r3; @@ -84,7 +84,7 @@ static pcb_r_dir_t pinout_mouse_search_cb(void *closure, pcb_any_obj_t *obj, void *box) { pinout_ctx_t *ctx = closure; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; if ((obj->term != NULL) && (pcb_obj_parent_subc(obj) == ctx->tempsc) && (obj->term != NULL)) { val.str = obj->term; @@ -105,7 +105,7 @@ return PCB_R_DIR_NOT_FOUND; } -static rnd_bool pinout_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +static rnd_bool pinout_mouse(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { if (kind == PCB_HID_MOUSE_RELEASE) { pinout_ctx_t *ctx = prv->user_ctx; @@ -112,7 +112,7 @@ void *r1, *r2, *r3; pcb_objtype_t type; rnd_rnd_box_t b; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; val.str = "n/a"; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->w_lab_num, &val); Index: trunk/src_plugins/dialogs/dlg_pref.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 30971) @@ -78,7 +78,7 @@ } } -void pcb_pref_dlg2conf_item(pref_ctx_t *ctx, pref_confitem_t *item, pcb_hid_attribute_t *attr) +void pcb_pref_dlg2conf_item(pref_ctx_t *ctx, pref_confitem_t *item, rnd_hid_attribute_t *attr) { pref_confitem_t *old = ctx->pcb_conf_lock; rnd_conf_native_t *cn = rnd_conf_get_field(item->confpath); @@ -110,7 +110,7 @@ ctx->pcb_conf_lock = old; } -rnd_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, pcb_hid_attribute_t *attr) +rnd_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, rnd_hid_attribute_t *attr) { pref_confitem_t *c; int wid = attr - ctx->dlg; @@ -125,7 +125,7 @@ } -void pcb_pref_create_conf_item(pref_ctx_t *ctx, pref_confitem_t *item, void (*change_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr)) +void pcb_pref_create_conf_item(pref_ctx_t *ctx, pref_confitem_t *item, void (*change_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr)) { rnd_conf_native_t *cn = rnd_conf_get_field(item->confpath); @@ -187,7 +187,7 @@ rnd_conf_hid_set_data(cn, pref_hid, item); } -void pcb_pref_create_conftable(pref_ctx_t *ctx, pref_confitem_t *list, void (*change_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr)) +void pcb_pref_create_conftable(pref_ctx_t *ctx, pref_confitem_t *list, void (*change_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr)) { pref_confitem_t *c; for(c = list; c->confpath != NULL; c++) @@ -205,7 +205,7 @@ } } -static void pref_role_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_role_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; ctx->role = roles[attr->val.lng]; Index: trunk/src_plugins/dialogs/dlg_pref.h =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.h (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref.h (revision 30971) @@ -44,13 +44,13 @@ /* Create label-input widget pair for editing a conf item, or create whole list of them */ -void pcb_pref_create_conf_item(pref_ctx_t *ctx, pref_confitem_t *item, void (*change_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr)); -void pcb_pref_create_conftable(pref_ctx_t *ctx, pref_confitem_t *list, void (*change_cb)(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr)); +void pcb_pref_create_conf_item(pref_ctx_t *ctx, pref_confitem_t *item, void (*change_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr)); +void pcb_pref_create_conftable(pref_ctx_t *ctx, pref_confitem_t *list, void (*change_cb)(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr)); /* Set the config node from the current widget value of a conf item, or create whole list of them; the table version returns whether the item is found. */ -void pcb_pref_dlg2conf_item(pref_ctx_t *ctx, pref_confitem_t *item, pcb_hid_attribute_t *attr); -rnd_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, pcb_hid_attribute_t *attr); +void pcb_pref_dlg2conf_item(pref_ctx_t *ctx, pref_confitem_t *item, rnd_hid_attribute_t *attr); +rnd_bool pcb_pref_dlg2conf_table(pref_ctx_t *ctx, pref_confitem_t *list, rnd_hid_attribute_t *attr); /* Remove conf change binding - shall be called when widgets are removed (i.e. on dialog box close) */ Index: trunk/src_plugins/dialogs/dlg_pref_board.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_board.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_board.c (revision 30971) @@ -41,7 +41,7 @@ } /* Dialog box to actual board meta */ -static void pref_board_dlg2brd(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_board_dlg2brd(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int changed = 0; const char *newname, *oldname; @@ -68,7 +68,7 @@ } } -static void pref_board_edit_attr(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_board_edit_attr(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "Propedit", "board", NULL); } Index: trunk/src_plugins/dialogs/dlg_pref_color.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_color.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_color.c (revision 30971) @@ -69,7 +69,7 @@ free(ctx->color.wlayer); } -static void pref_color_gen_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_color_gen_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; const char *path = attr->user_data; @@ -77,7 +77,7 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pref_color_layer_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_color_layer_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; int idx = (int *)attr->user_data - ctx->color.wlayer; Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30971) @@ -50,7 +50,7 @@ static void setup_tree(pref_ctx_t *ctx) { char *cell[2] = {NULL}; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wtree]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wtree]; pcb_hid_tree_t *tree = attr->wdata; htsp_entry_t *e; htsp_entry_t **sorted; @@ -139,7 +139,7 @@ static void setup_intree(pref_ctx_t *ctx, rnd_conf_native_t *nat, int idx) { rnd_conf_role_t n; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wintree]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wintree]; pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *r; @@ -188,7 +188,7 @@ static void dlg_conf_select_node(pref_ctx_t *ctx, const char *path, rnd_conf_native_t *nat, int idx) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char *tmp, buf[128]; const char *rolename; lht_node_t *src; @@ -232,7 +232,7 @@ if ((nat->type == RND_CFN_LIST) || (nat->type == RND_CFN_HLIST)) { /* non-default: lists are manually loaded */ - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wnatval[nat->type]]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wnatval[nat->type]]; pcb_hid_tree_t *tree = attr->wdata; rnd_conf_listitem_t *n; char *cell[4]; @@ -272,7 +272,7 @@ return; } -static void dlg_conf_select_node_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void dlg_conf_select_node_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; char *end, *end2; @@ -318,10 +318,10 @@ } -static void pcb_pref_dlg_conf_filter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void pcb_pref_dlg_conf_filter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { pref_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; const char *text; int have_filter_text; @@ -481,12 +481,12 @@ void pcb_dlg_pref_conf_open(pref_ctx_t *ctx, const char *tabarg) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.dbl = 0.25; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wmainp, &hv); if (tabarg != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = rnd_strdup(tabarg); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wfilter, &hv); pcb_pref_dlg_conf_filter_cb(ctx->dlg_hid_ctx, ctx, &ctx->dlg[ctx->conf.wfilter]); Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30971) @@ -55,7 +55,7 @@ static void confedit_brd2dlg(confedit_ctx_t *ctx) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; lht_node_t *nl, *nd = rnd_conf_lht_get_at(ctx->role, ctx->nat->hash_path, 1); const char *val; @@ -99,7 +99,7 @@ break; case RND_CFN_LIST: { - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_tree_t *tree = attr->wdata; pcb_dad_tree_clear(tree); @@ -123,10 +123,10 @@ } } -static void pref_conf_editval_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *trigger_attr) +static void pref_conf_editval_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *trigger_attr) { confedit_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; char buf[128]; const char *val = buf; @@ -149,7 +149,7 @@ case RND_CFN_COLOR: val = attr->val.clr.str; break; case RND_CFN_LIST: { - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *r; lht_node_t *nd = rnd_conf_lht_get_at(ctx->role, ctx->nat->hash_path, 0); @@ -194,10 +194,10 @@ pcb_gui->invalidate_all(pcb_gui); } -static void pref_conf_editval_del_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *trigger_attr) +static void pref_conf_editval_del_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *trigger_attr) { confedit_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); if (r != NULL) { @@ -206,7 +206,7 @@ } } -static void pref_conf_editval_edit(void *hid_ctx, confedit_ctx_t *ctx, pcb_hid_attribute_t *attr, pcb_hid_row_t *r) +static void pref_conf_editval_edit(void *hid_ctx, confedit_ctx_t *ctx, rnd_hid_attribute_t *attr, pcb_hid_row_t *r) { char *nv = pcb_hid_prompt_for(&PCB->hidlib, "list item value:", r->cell[0], "Edit config list item"); if (nv == NULL) @@ -216,10 +216,10 @@ pref_conf_editval_cb(hid_ctx, ctx, attr); } -static void pref_conf_editval_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *trigger_attr) +static void pref_conf_editval_edit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *trigger_attr) { confedit_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); if (r != NULL) @@ -226,10 +226,10 @@ pref_conf_editval_edit(hid_ctx, ctx, attr, r); } -static void pref_conf_editval_ins_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *trigger_attr) +static void pref_conf_editval_ins_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *trigger_attr) { confedit_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); char *cols[] = {NULL, NULL}; @@ -243,7 +243,7 @@ pref_conf_editval_edit(hid_ctx, ctx, attr, r); } -static void pref_conf_editval_hlist_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *trigger_attr) +static void pref_conf_editval_hlist_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *trigger_attr) { confedit_ctx_t *ctx = caller_data; rnd_actionva(&PCB->hidlib, ctx->nat->gui_edit_act, @@ -252,7 +252,7 @@ } -static void pref_conf_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_conf_edit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; pref_ctx_t *pctx = caller_data; @@ -407,7 +407,7 @@ confedit_brd2dlg(ctx); } -static void pref_conf_del_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_conf_del_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *pctx = caller_data; pcb_hid_row_t *r; Index: trunk/src_plugins/dialogs/dlg_pref_general.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_general.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_general.c (revision 30971) @@ -44,7 +44,7 @@ {NULL, NULL, 0} }; -static void pref_general_dlg2conf(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_general_dlg2conf(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; pcb_pref_dlg2conf_table(ctx, perf_topwin, attr); Index: trunk/src_plugins/dialogs/dlg_pref_layer.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_layer.c (revision 30971) @@ -34,17 +34,17 @@ #define PCB_EMPTY(a) ((a) ? (a) : "") -void layersel_expose_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +void layersel_expose_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pcb_stub_draw_csect(gc, e); } -rnd_bool layersel_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +rnd_bool layersel_mouse_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_stub_draw_csect_mouse_ev(kind, x, y); } -void layersel_free_cb(pcb_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx) +void layersel_free_cb(rnd_hid_attribute_t *attrib, void *user_ctx, void *hid_ctx) { } Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30971) @@ -34,11 +34,11 @@ static const char *SRC_BRD = ""; -static void libhelp_btn(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); +static void libhelp_btn(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); static void pref_lib_update_buttons(void) { - pcb_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; + rnd_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); int en = (r != NULL); @@ -48,12 +48,12 @@ pcb_gui->attr_dlg_widget_state(pref_ctx.dlg_hid_ctx, pref_ctx.lib.wmovedown, en); } -static void pref_lib_select_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void pref_lib_select_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pref_lib_update_buttons(); } -static void pref_lib_row_free(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void pref_lib_row_free(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { free(row->cell[0]); free(row->cell[1]); @@ -65,7 +65,7 @@ the widget first */ static void pref_lib_conf2dlg_pre(rnd_conf_native_t *cfg, int arr_idx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; @@ -102,8 +102,8 @@ int idx; const char *s; char *cell[4]; - pcb_hid_attribute_t *attr; - pcb_hid_attr_val_t hv; + rnd_hid_attribute_t *attr; + rnd_hid_attr_val_t hv; if ((pref_ctx.lib.lock) || (!pref_ctx.active)) return; @@ -148,7 +148,7 @@ } /* Dialog box to current libraries in config */ -static void pref_lib_dlg2conf(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_lib_dlg2conf(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; pcb_hid_tree_t *tree = attr->wdata; @@ -183,9 +183,9 @@ ctx->lib.lock--; } -static void lib_btn_remove(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_btn_remove(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { - pcb_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; + rnd_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); if (r == NULL) @@ -197,9 +197,9 @@ } } -static void lib_btn_up(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_btn_up(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { - pcb_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; + rnd_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; pcb_hid_row_t *prev, *r = pcb_dad_tree_get_selected(attr); pcb_hid_tree_t *tree = attr->wdata; char *cell[4]; @@ -216,7 +216,7 @@ cell[2] = r->cell[2]; r->cell[2] = NULL; cell[3] = NULL; if (pcb_dad_tree_remove(attr, r) == 0) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; pcb_dad_tree_insert(attr, prev, cell); pref_lib_dlg2conf(hid_ctx, caller_data, attr); hv.str = cell[0]; @@ -224,9 +224,9 @@ } } -static void lib_btn_down(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_btn_down(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { - pcb_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; + rnd_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; pcb_hid_row_t *next, *r = pcb_dad_tree_get_selected(attr); pcb_hid_tree_t *tree = attr->wdata; char *cell[4]; @@ -243,7 +243,7 @@ cell[2] = r->cell[2]; r->cell[2] = NULL; cell[3] = NULL; if (pcb_dad_tree_remove(attr, r) == 0) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; pcb_dad_tree_append(attr, next, cell); pref_lib_dlg2conf(hid_ctx, caller_data, attr); hv.str = cell[0]; @@ -257,7 +257,7 @@ pref_ctx_t *pctx; } cell_edit_ctx_t; -static void lib_cell_edit_update(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_cell_edit_update(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { cell_edit_ctx_t *ctx = caller_data; char *tmp; @@ -310,10 +310,10 @@ return 0; } -static void lib_btn_insert(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr, int pos) +static void lib_btn_insert(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr, int pos) { pref_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; + rnd_hid_attribute_t *attr = &pref_ctx.dlg[pref_ctx.lib.wlist]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); char *cell[4]; @@ -369,17 +369,17 @@ pref_lib_dlg2conf(hid_ctx, caller_data, attr); } -static void lib_btn_insert_before(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_btn_insert_before(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { lib_btn_insert(hid_ctx, caller_data, btn_attr, -1); } -static void lib_btn_insert_after(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_btn_insert_after(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { lib_btn_insert(hid_ctx, caller_data, btn_attr, +1); } -static void lib_btn_edit(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *btn_attr) +static void lib_btn_edit(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *btn_attr) { lib_btn_insert(hid_ctx, caller_data, btn_attr, 0); } @@ -427,7 +427,7 @@ memset(ctx, 0, sizeof(pref_libhelp_ctx_t)); /* reset all states to the initial - includes ctx->active = 0; */ } -static void libhelp_btn(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void libhelp_btn(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_libhelp_open(&pref_ctx.lib.help); } Index: trunk/src_plugins/dialogs/dlg_pref_sizes.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_sizes.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_sizes.c (revision 30971) @@ -42,7 +42,7 @@ } /* Dialog box to actual board size */ -static void pref_sizes_dlg2brd(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_sizes_dlg2brd(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; @@ -52,7 +52,7 @@ ctx->sizes.lock--; } -static void drc_rules_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void drc_rules_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, attr->user_data, NULL); } @@ -67,7 +67,7 @@ {NULL, NULL, 0} }; -static void pref_sizes_drc_dlg2conf(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_sizes_drc_dlg2conf(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; pcb_pref_dlg2conf_table(ctx, drc_sizes, attr); @@ -80,7 +80,7 @@ PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, pref_ctx.sizes.wisle, dbl, conf_core.design.poly_isle_area / 1000000.0); } -static void pref_isle_dlg2brd(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_isle_dlg2brd(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; double v = ctx->dlg[ctx->sizes.wisle].val.dbl * 1000000.0; Index: trunk/src_plugins/dialogs/dlg_pref_win.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30971) @@ -53,7 +53,7 @@ { } -static void pref_win_master_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_master_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; rnd_conf_setf(ctx->role, "editor/auto_place", -1, "%d", attr->val.lng); @@ -60,7 +60,7 @@ pref_win_brd2dlg(ctx); } -static void pref_win_board_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_board_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; rnd_conf_setf(ctx->role, "plugins/dialogs/auto_save_window_geometry/to_design", -1, "%d", attr->val.lng); @@ -67,7 +67,7 @@ pref_win_brd2dlg(ctx); } -static void pref_win_project_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_project_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; rnd_conf_setf(ctx->role, "plugins/dialogs/auto_save_window_geometry/to_project", -1, "%d", attr->val.lng); @@ -74,7 +74,7 @@ pref_win_brd2dlg(ctx); } -static void pref_win_user_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_user_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pref_ctx_t *ctx = caller_data; rnd_conf_setf(ctx->role, "plugins/dialogs/auto_save_window_geometry/to_user", -1, "%d", attr->val.lng); @@ -82,22 +82,22 @@ } -static void pref_win_board_now_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_board_now_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_wplc_save_to_role(RND_CFR_USER); } -static void pref_win_project_now_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_project_now_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_wplc_save_to_role(RND_CFR_USER); } -static void pref_win_user_now_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_user_now_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_wplc_save_to_role(RND_CFR_USER); } -static void pref_win_file_now_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pref_win_file_now_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { char *fname; Index: trunk/src_plugins/dialogs/dlg_printcalib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_printcalib.c (revision 30971) @@ -28,7 +28,7 @@ #include -static pcb_hid_attribute_t printer_calibrate_attrs[] = { +static rnd_hid_attribute_t printer_calibrate_attrs[] = { {"Enter Values here:", "", PCB_HATT_LABEL, 0, 0, {0, 0, 0}, 0, 0}, {"x-calibration", "X scale for calibrating your printer", @@ -42,7 +42,7 @@ /* DOC: printcalibrate.html */ fgw_error_t pcb_act_PrintCalibrate(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_hid_t *printer = pcb_hid_find_printer(); + rnd_hid_t *printer = pcb_hid_find_printer(); if (printer == NULL) { rnd_message(RND_MSG_ERROR, "No printer available\n"); Index: trunk/src_plugins/dialogs/dlg_search.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_search.c (revision 30971) @@ -127,7 +127,7 @@ } /* look up row and col for a widget attr in a [row][col] widget idx array; returns 0 on success */ -static int rc_lookup(search_ctx_t *ctx, int w[MAX_ROW][MAX_COL], pcb_hid_attribute_t *attr, int *row, int *col) +static int rc_lookup(search_ctx_t *ctx, int w[MAX_ROW][MAX_COL], rnd_hid_attribute_t *attr, int *row, int *col) { int r, c, idx = attr - ctx->dlg; for(r = 0; r < MAX_ROW; r++) { @@ -143,7 +143,7 @@ } /* look up row for a widget attr in a [row] widget idx array; returns 0 on success */ -static int r_lookup(search_ctx_t *ctx, int w[MAX_ROW], pcb_hid_attribute_t *attr, int *row) +static int r_lookup(search_ctx_t *ctx, int w[MAX_ROW], rnd_hid_attribute_t *attr, int *row) { int r, idx = attr - ctx->dlg; for(r = 0; r < MAX_ROW; r++) { @@ -166,7 +166,7 @@ static void redraw_expr(search_ctx_t *ctx, int row, int col) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; gds_t buf; search_expr_t *e = &(ctx->expr[row][col]); @@ -185,7 +185,7 @@ static void search_recompile(search_ctx_t *ctx) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; gds_t buf; int row, col; @@ -212,7 +212,7 @@ gds_uninit(&buf); } -static void search_del_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void search_del_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; int row, col; @@ -234,7 +234,7 @@ search_recompile(ctx); } -static void search_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void search_edit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; int row, col; @@ -250,7 +250,7 @@ } } -static void search_enable_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void search_enable_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; if (WIZ(ctx)) @@ -258,7 +258,7 @@ update_vis(ctx); } -static void search_append_col_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void search_append_col_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; int row, col; @@ -278,7 +278,7 @@ rnd_message(RND_MSG_ERROR, "Too many expressions in the row, can not add more\n"); } -static void search_append_row_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void search_append_row_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; int row; @@ -295,7 +295,7 @@ rnd_message(RND_MSG_ERROR, "Too many expression rows, can not add more\n"); } -static void search_apply_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void search_apply_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { search_ctx_t *ctx = caller_data; if (ctx->dlg[ctx->wexpr_str].val.str != NULL) Index: trunk/src_plugins/dialogs/dlg_search_edit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_search_edit.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_search_edit.c (revision 30971) @@ -43,7 +43,7 @@ static srchedit_ctx_t srchedit_ctx; /* Set the right side of the expression from the non-enum value of an widget attr */ -static void set_right(srchedit_ctx_t *ctx, pcb_hid_attribute_t *attr) +static void set_right(srchedit_ctx_t *ctx, rnd_hid_attribute_t *attr) { free(ctx->se.right); ctx->se.right = NULL; @@ -70,7 +70,7 @@ static void srch_expr_set_ops(srchedit_ctx_t *ctx, const expr_wizard_op_t *op, int click) { pcb_hid_tree_t *tree; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_row_t *r, *cur = NULL; char *cell[2], *cursor_path = NULL; const char **o; @@ -103,7 +103,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wop, &hv); free(cursor_path); @@ -116,7 +116,7 @@ static void srch_expr_fill_in_right_const(srchedit_ctx_t *ctx, const search_expr_t *s) { pcb_hid_tree_t *tree; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; char *cell[2]; const char **o; @@ -135,7 +135,7 @@ /* set cursor to last known value */ if ((s != NULL) && (s->right != NULL)) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = s->right; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wright[RIGHT_CONST], &hv); } @@ -144,7 +144,7 @@ static void srch_expr_fill_in_right(srchedit_ctx_t *ctx, const search_expr_t *s) { int n, empty = 0; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; /* don't recalc if the same type; except for const, because there the same type means different set of values for each expr */ if ((s->expr->rtype == ctx->last_rtype) && (s->expr->rtype != RIGHT_CONST)) @@ -189,7 +189,7 @@ ctx->last_rtype = s->expr->rtype; } -static void srch_expr_left_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void srch_expr_left_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; srchedit_ctx_t *ctx = tree->user_ctx; @@ -207,7 +207,7 @@ srch_expr_fill_in_right(ctx, &ctx->se); } -static void srch_expr_op_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void srch_expr_op_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; srchedit_ctx_t *ctx = tree->user_ctx; @@ -223,7 +223,7 @@ static int fill_in_left(srchedit_ctx_t *ctx) { const expr_wizard_t *t; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_row_t *r, *parent = NULL, *cur = NULL; char *cell[2]; @@ -259,7 +259,7 @@ return 0; } -static void srchexpr_right_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void srchexpr_right_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { srchedit_ctx_t *ctx = caller_data; @@ -266,7 +266,7 @@ set_right(ctx, attr); } -static void srch_expr_right_table_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void srch_expr_right_table_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; srchedit_ctx_t *ctx = tree->user_ctx; Index: trunk/src_plugins/dialogs/dlg_test.c =================================================================== --- trunk/src_plugins/dialogs/dlg_test.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_test.c (revision 30971) @@ -40,31 +40,31 @@ } test_t; -static void pcb_act_attr_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void pcb_act_spin_reset(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void pcb_act_spin_upd(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_tab_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_jump(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_color_print(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_color_reset(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_ttbl_insert(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_ttbl_append(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_ttbl_jump(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_ttbl_filt(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_ttbl_select(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_ttbl_row_selected(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); -static void cb_ttbl_free_row(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); -static void cb_pane_set(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_replace(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_insert(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_append(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_get(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_edit(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_offs(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); -static void cb_text_ro(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); +static void pcb_act_attr_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void pcb_act_spin_reset(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void pcb_act_spin_upd(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_tab_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_jump(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_color_print(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_color_reset(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_ttbl_insert(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_ttbl_append(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_ttbl_jump(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_ttbl_filt(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_ttbl_select(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_ttbl_row_selected(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); +static void cb_ttbl_free_row(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); +static void cb_pane_set(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_replace(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_insert(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_append(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_get(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_edit(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_offs(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); +static void cb_text_ro(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); -static void prv_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e); -static rnd_bool prv_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); +static void prv_expose(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e); +static rnd_bool prv_mouse(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); static const char * test_xpm[] = { "8 8 4 1", @@ -285,9 +285,9 @@ return 0; } -static void pcb_act_attr_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pcb_act_attr_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - static pcb_hid_attr_val_t val; + static rnd_hid_attr_val_t val; static rnd_bool st; printf("Chg\n"); @@ -298,10 +298,10 @@ pcb_gui->attr_dlg_set_value(hid_ctx, attr_idx, &val); } -static void pcb_act_spin_reset(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pcb_act_spin_reset(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.lng = 42; hv.dbl = 42.0; @@ -312,10 +312,10 @@ pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wspin_coord, &hv); } -static void pcb_act_spin_upd(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pcb_act_spin_upd(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char tmp[256]; hv.str = tmp; @@ -329,15 +329,15 @@ } -static void cb_tab_chg(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_tab_chg(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; printf("Tab switch to %ld!\n", ctx->dlg[ctx->wtab].val.lng); } -static void cb_jump(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_jump(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; test_t *ctx = caller_data; printf("Jumping tabs\n"); @@ -345,13 +345,13 @@ pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wtab, &val); } -static void cb_ttbl_insert(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_ttbl_insert(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *treea = &ctx->dlg[ctx->tt]; + rnd_hid_attribute_t *treea = &ctx->dlg[ctx->tt]; char *rowdata[] = {NULL, "ins", "dummy", NULL}; pcb_hid_row_t *new_row, *row = pcb_dad_tree_get_selected(treea); - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; rowdata[0] = pcb_strdup_printf("dyn_%d", ctx->ttctr++); new_row = pcb_dad_tree_insert(treea, row, rowdata); @@ -361,13 +361,13 @@ pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wprog, &val); } -static void cb_ttbl_append(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_ttbl_append(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *treea = &ctx->dlg[ctx->tt]; + rnd_hid_attribute_t *treea = &ctx->dlg[ctx->tt]; char *rowdata[] = {NULL, "app", "dummy", NULL}; pcb_hid_row_t *new_row, *row = pcb_dad_tree_get_selected(treea); - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; rowdata[0] = pcb_strdup_printf("dyn_%d", ctx->ttctr++); new_row = pcb_dad_tree_append(treea, row, rowdata); @@ -377,10 +377,10 @@ pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wprog, &val); } -static void cb_ttbl_jump(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_ttbl_jump(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; val.str = "two/under_two"; pcb_gui->attr_dlg_set_value(hid_ctx, ctx->tt, &val); @@ -396,10 +396,10 @@ } } -static void cb_ttbl_filt(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_ttbl_filt(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *treea = &ctx->dlg[ctx->tt]; + rnd_hid_attribute_t *treea = &ctx->dlg[ctx->tt]; pcb_hid_tree_t *tree = treea->wdata; ttbl_filt(&tree->rows, attr->val.lng); @@ -407,7 +407,7 @@ } /* table level selection */ -static void cb_ttbl_select(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_ttbl_select(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hid_row_t *row = pcb_dad_tree_get_selected(attr); if (attr->val.str != NULL) @@ -417,7 +417,7 @@ } /* row level selection */ -static void cb_ttbl_row_selected(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void cb_ttbl_row_selected(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { if (row != NULL) rnd_trace("tt row selected: row=%p '%s'\n", row, row->cell[0]); @@ -425,16 +425,16 @@ rnd_trace("tt row selected: \n"); } -static void cb_ttbl_free_row(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void cb_ttbl_free_row(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { if (row->user_data2.lng) free(row->cell[0]); } -static void cb_pane_set(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_pane_set(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; val.dbl = 0.3; pcb_gui->attr_dlg_set_value(hid_ctx, ctx->whpane, &val); @@ -441,34 +441,34 @@ pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wvpane, &val); } -static void cb_text_replace(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_replace(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_text(atxt, hid_ctx, PCB_HID_TEXT_REPLACE, "Hello\nworld!\n"); } -static void cb_text_insert(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_insert(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_text(atxt, hid_ctx, PCB_HID_TEXT_INSERT, "ins"); } -static void cb_text_append(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_append(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_text(atxt, hid_ctx, PCB_HID_TEXT_APPEND | PCB_HID_TEXT_MARKUP, "appred\n"); } -static void cb_text_get(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_get(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; char *s; s = txt->hid_get_text(atxt, hid_ctx); @@ -476,13 +476,13 @@ free(s); } -static void cb_text_edit(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_edit(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; pcb_hid_text_t *txt = attr->wdata; long x, y, o; char buf[256]; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; txt->hid_get_xy(attr, hid_ctx, &x, &y); o = txt->hid_get_offs(attr, hid_ctx); @@ -491,24 +491,24 @@ pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wtxtpos, &val); } -static void cb_text_offs(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_offs(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_offs(atxt, hid_ctx, txt->hid_get_offs(atxt, hid_ctx) / 2); } -static void cb_text_ro(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_text_ro(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; ctx->txtro = !ctx->txtro; txt->hid_set_readonly(atxt, hid_ctx, ctx->txtro); } -static void prv_expose(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void prv_expose(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pcb_render->set_color(gc, rnd_color_red); pcb_text_draw_string_simple(NULL, "foo", PCB_MM_TO_COORD(1), PCB_MM_TO_COORD(20), 500, 10.0, 0, 0, 0, 0, 0); @@ -517,13 +517,13 @@ } -static rnd_bool prv_mouse(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +static rnd_bool prv_mouse(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { pcb_printf("Mouse %d %mm %mm\n", kind, x, y); return (kind == PCB_HID_MOUSE_PRESS) || (kind == PCB_HID_MOUSE_RELEASE); } -static void cb_color_print(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_color_print(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; @@ -531,10 +531,10 @@ ctx->dlg[ctx->wclr].val.clr.r, ctx->dlg[ctx->wclr].val.clr.g, ctx->dlg[ctx->wclr].val.clr.b); } -static void cb_color_reset(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_color_reset(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { test_t *ctx = caller_data; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; rnd_color_load_str(&val.clr, "#005599"); pcb_gui->attr_dlg_set_value(hid_ctx, ctx->wclr, &val); Index: trunk/src_plugins/dialogs/dlg_undo.c =================================================================== --- trunk/src_plugins/dialogs/dlg_undo.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_undo.c (revision 30971) @@ -48,17 +48,17 @@ memset(ctx, 0, sizeof(undo_ctx_t)); } -static void cb_undo(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_undo(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_undo(pcb_true); } -static void cb_redo(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_redo(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_redo(pcb_true); } -static void cb_clear(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void cb_clear(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_undo_clear_list(pcb_true); } @@ -66,7 +66,7 @@ static void undo_data2dlg(undo_ctx_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[4], *cursor_path = NULL; @@ -108,7 +108,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); Index: trunk/src_plugins/dialogs/dlg_view.c =================================================================== --- trunk/src_plugins/dialogs/dlg_view.c (revision 30970) +++ trunk/src_plugins/dialogs/dlg_view.c (revision 30971) @@ -86,7 +86,7 @@ static void view2dlg_list(view_ctx_t *ctx) { pcb_view_t *v; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[3], *cursor_path = NULL; @@ -123,7 +123,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); @@ -191,7 +191,7 @@ pcb_dad_preview_zoomto(&ctx->dlg[ctx->wprev], &v->bbox); } -static void view_select(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void view_select(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; view_ctx_t *ctx = tree->user_ctx; @@ -203,10 +203,10 @@ static vtp0_t view_color_save; -static void view_expose_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void view_expose_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { view_ctx_t *ctx = prv->user_ctx; - pcb_xform_t xform; + rnd_xform_t xform; int old_termlab, g; static const rnd_color_t *offend_color[2]; pcb_view_t *v = pcb_view_by_uid(ctx->lst, ctx->selected); @@ -256,7 +256,7 @@ } -static rnd_bool view_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +static rnd_bool view_mouse_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; /* don't redraw */ } @@ -270,7 +270,7 @@ static void view_preview_update(view_ctx_t *ctx) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; if ((ctx == NULL) || (!ctx->active) || (ctx->selected == 0)) return; @@ -280,12 +280,12 @@ } -static void view_refresh_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void view_refresh_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { view_refresh((view_ctx_t *)caller_data); } -static void view_close_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void view_close_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { view_ctx_t *ctx = caller_data; PCB_DAD_FREE(ctx->dlg); @@ -300,7 +300,7 @@ view2dlg_pos(ctx); } -static void view_del_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void view_del_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { view_ctx_t *ctx = caller_data; pcb_view_t *v, *newv; @@ -317,7 +317,7 @@ view2dlg_count(ctx); } else { /* full dialog, go by the list */ - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; pcb_hid_row_t *rc, *r = pcb_dad_tree_get_selected(attr); if (r == NULL) @@ -343,12 +343,12 @@ } } -static void view_copy_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void view_copy_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { view_ctx_t *ctx = caller_data; pcb_view_t *v; gds_t tmp; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; pcb_hid_row_t *rc, *r = pcb_dad_tree_get_selected(attr); int btn_idx = attr_btn - ctx->dlg; int cut = (ctx->wbtn_cut == btn_idx); @@ -388,7 +388,7 @@ view2dlg_list(ctx); } -static void view_paste_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void view_paste_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { view_ctx_t *ctx = caller_data; pcb_hid_clipfmt_t cformat; @@ -395,7 +395,7 @@ void *cdata, *load_ctx; size_t clen; pcb_view_t *v, *vt = NULL; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; pcb_hid_row_t *r = pcb_dad_tree_get_selected(attr); if (r != NULL) { @@ -433,7 +433,7 @@ view2dlg_list(ctx); } -static void view_save_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void view_save_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { view_ctx_t *ctx = caller_data; gds_t tmp; @@ -462,7 +462,7 @@ gds_uninit(&tmp); } -static void view_load_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void view_load_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { view_ctx_t *ctx = caller_data; pcb_view_t *v; @@ -524,10 +524,10 @@ } } -static void view_select_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void view_select_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { view_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wlist]; pcb_hid_row_t *rc, *r = pcb_dad_tree_get_selected(attr); if (r == NULL) @@ -556,7 +556,7 @@ ctx->selected = 0; } -static void view_prev_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void view_prev_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { view_ctx_t *ctx = caller_data; pcb_view_t *v = pcb_view_by_uid(ctx->lst, ctx->selected); @@ -568,7 +568,7 @@ view_stepped(ctx, v); } -static void view_next_btn_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void view_next_btn_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { view_ctx_t *ctx = caller_data; pcb_view_t *v = pcb_view_by_uid(ctx->lst, ctx->selected); Index: trunk/src_plugins/draw_csect/draw_csect.c =================================================================== --- trunk/src_plugins/draw_csect/draw_csect.c (revision 30970) +++ trunk/src_plugins/draw_csect/draw_csect.c (revision 30971) @@ -44,7 +44,7 @@ #include "obj_text_draw.h" #include "obj_line_draw.h" -extern pcb_layergrp_id_t pcb_actd_EditGroup_gid; +extern rnd_layergrp_id_t pcb_actd_EditGroup_gid; static const char *COLOR_COPPER_ = "#C05020"; static const char *COLOR_SUBSTRATE_ = "#E0D090"; @@ -61,12 +61,12 @@ COLOR_COPPER, COLOR_SUBSTRATE, COLOR_SILK, COLOR_MASK, COLOR_PASTE, COLOR_MISC, COLOR_OUTLINE; -static pcb_layer_id_t drag_lid = -1; -static pcb_layergrp_id_t drag_gid = -1, drag_gid_subst = -1; +static rnd_layer_id_t drag_lid = -1; +static rnd_layergrp_id_t drag_gid = -1, drag_gid_subst = -1; #define GROUP_WIDTH_MM 75 -static pcb_xform_t def_xform; +static rnd_xform_t def_xform; static pcb_draw_info_t def_info; /* Draw a text at x;y sized scale percentage */ @@ -106,7 +106,7 @@ } /* Draw a text at x;y with a background */ -static pcb_text_t *dtext_bg(pcb_hid_gc_t gc, int x, int y, int scale, int dir, const char *txt, const rnd_color_t *bgcolor, const rnd_color_t *fgcolor) +static pcb_text_t *dtext_bg(rnd_hid_gc_t gc, int x, int y, int scale, int dir, const char *txt, const rnd_color_t *bgcolor, const rnd_color_t *fgcolor) { static pcb_text_t t; @@ -253,7 +253,7 @@ static char group_valid[PCB_MAX_LAYERGRP]; static char outline_valid; -static void reg_layer_coords(pcb_layer_id_t lid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void reg_layer_coords(rnd_layer_id_t lid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { if ((lid < 0) || (lid >= PCB_MAX_LAYER)) return; @@ -264,7 +264,7 @@ layer_valid[lid] = 1; } -static void reg_group_coords(pcb_layergrp_id_t gid, rnd_coord_t y1, rnd_coord_t y2) +static void reg_group_coords(rnd_layergrp_id_t gid, rnd_coord_t y1, rnd_coord_t y2) { if ((gid < 0) || (gid >= PCB_MAX_LAYER)) return; @@ -289,9 +289,9 @@ outline_valid = 0; } -static pcb_layer_id_t get_layer_coords(rnd_coord_t x, rnd_coord_t y) +static rnd_layer_id_t get_layer_coords(rnd_coord_t x, rnd_coord_t y) { - pcb_layer_id_t n; + rnd_layer_id_t n; for(n = 0; n < PCB_MAX_LAYER; n++) { if (!layer_valid[n]) continue; @@ -302,9 +302,9 @@ return -1; } -static pcb_layergrp_id_t get_group_coords(rnd_coord_t y, rnd_coord_t *y1, rnd_coord_t *y2) +static rnd_layergrp_id_t get_group_coords(rnd_coord_t y, rnd_coord_t *y1, rnd_coord_t *y2) { - pcb_layergrp_id_t n; + rnd_layergrp_id_t n; for(n = 0; n < PCB_MAX_LAYERGRP; n++) { if (!group_valid[n]) continue; @@ -317,7 +317,7 @@ return -1; } -static rnd_coord_t create_button(pcb_hid_gc_t gc, int x, int y, const char *label, rnd_rnd_box_t *box) +static rnd_coord_t create_button(rnd_hid_gc_t gc, int x, int y, const char *label, rnd_rnd_box_t *box) { pcb_text_t *t; t = dtext_bg(gc, x, y, 200, 0, label, &COLOR_BG, &COLOR_ANNOT); @@ -335,13 +335,13 @@ return (x >= box->X1) && (x <= box->X2) && (y >= box->Y1) && (y <= box->Y2); } -static pcb_hid_gc_t csect_gc; +static rnd_hid_gc_t csect_gc; static rnd_coord_t ox, oy, cx, cy; static int drag_addgrp, drag_delgrp, drag_addlayer, drag_dellayer, drag_addoutline; -static pcb_layergrp_id_t gactive = -1; -static pcb_layergrp_id_t outline_gactive = -1; -static pcb_layer_id_t lactive = -1; +static rnd_layergrp_id_t gactive = -1; +static rnd_layergrp_id_t outline_gactive = -1; +static rnd_layer_id_t lactive = -1; int lactive_idx = -1; /* true if we are dragging somehting */ @@ -356,7 +356,7 @@ static void mark_grp(rnd_coord_t y, unsigned int accept_mask, mark_grp_loc_t loc) { rnd_coord_t y1, y2, x0 = -PCB_MM_TO_COORD(5); - pcb_layergrp_id_t g; + rnd_layergrp_id_t g; g = get_group_coords(y, &y1, &y2); @@ -379,7 +379,7 @@ gactive = -1; } -static void mark_outline_grp(rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid) +static void mark_outline_grp(rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid) { if (outline_valid && (outline_crd.X1 <= x) && (outline_crd.Y1 <= y) && @@ -418,7 +418,7 @@ ty2 = layer_crd[g->lid[0]].Y2; for(lactive_idx = g->len-1; lactive_idx >= 0; lactive_idx--) { - pcb_layer_id_t lid = g->lid[lactive_idx]; + rnd_layer_id_t lid = g->lid[lactive_idx]; if (x > (layer_crd[lid].X1 + layer_crd[lid].X2)/2) { tx = layer_crd[lid].X2; break; @@ -429,7 +429,7 @@ lactive_idx++; } -static void draw_hover_label(pcb_hid_gc_t gc, const char *str) +static void draw_hover_label(rnd_hid_gc_t gc, const char *str) { int x0 = PCB_MM_TO_COORD(2.5); /* compensate for the mouse cursor (sort of random) */ pcb_render->set_color(gc, &COLOR_ANNOT); @@ -437,9 +437,9 @@ } /* Draw the cross-section layer */ -static void draw_csect(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void draw_csect(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { - pcb_layergrp_id_t gid, outline_gid = -1; + rnd_layergrp_id_t gid, outline_gid = -1; int ystart = 10, x, y, last_copper_step = 5; reset_layer_coords(); @@ -510,7 +510,7 @@ x = GROUP_WIDTH_MM + 3; for(i = 0; i < g->len; i++) { pcb_text_t *t; - pcb_layer_id_t lid = g->lid[i]; + rnd_layer_id_t lid = g->lid[i]; pcb_layer_t *l = &PCB->Data->Layer[lid]; int redraw_text = 0; @@ -621,7 +621,7 @@ } /* Returns 0 if gactive can be removed from its current group */ -static int check_layer_del(pcb_layer_id_t lid) +static int check_layer_del(rnd_layer_id_t lid) { pcb_layergrp_t *grp; unsigned int tflg; @@ -679,7 +679,7 @@ static rnd_bool mouse_csect(pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { rnd_bool res = 0; - pcb_layer_id_t lid; + rnd_layer_id_t lid; switch(kind) { case PCB_HID_MOUSE_PRESS: @@ -723,7 +723,7 @@ if ((x > 0) && (x < PCB_MM_TO_COORD(GROUP_WIDTH_MM))) { rnd_coord_t tmp; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; gid = get_group_coords(y, &tmp, &tmp); if ((gid >= 0) && (pcb_layergrp_flags(PCB, gid) & PCB_LYT_COPPER) && (pcb_layergrp_flags(PCB, gid) & PCB_LYT_INTERN)) { drag_gid = gid; @@ -843,7 +843,7 @@ rnd_message(RND_MSG_INFO, "moved layer %s to group %d\n", l->name, gactive); move_layer_to_its_place:; if (lactive_idx < g->len-1) { - memmove(g->lid + lactive_idx + 1, g->lid + lactive_idx, (g->len - 1 - lactive_idx) * sizeof(pcb_layer_id_t)); + memmove(g->lid + lactive_idx + 1, g->lid + lactive_idx, (g->len - 1 - lactive_idx) * sizeof(rnd_layer_id_t)); g->lid[lactive_idx] = drag_lid; } rnd_event(&PCB->hidlib, PCB_EVENT_LAYERS_CHANGED, NULL); @@ -898,7 +898,7 @@ static fgw_error_t pcb_act_dump_csect(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; for(gid = 0; gid < pcb_max_group(PCB); gid++) { int i; @@ -924,7 +924,7 @@ printf("%s {%ld} %s\n", type_gfx, gid, g->name); for(i = 0; i < g->len; i++) { - pcb_layer_id_t lid = g->lid[i]; + rnd_layer_id_t lid = g->lid[i]; pcb_layer_t *l = &PCB->Data->Layer[lid]; printf(" [%ld] %s comb=", lid, l->name); if (l->comb & PCB_LYC_SUB) printf(" sub"); Index: trunk/src_plugins/draw_fab/draw_fab.c =================================================================== --- trunk/src_plugins/draw_fab/draw_fab.c (revision 30970) +++ trunk/src_plugins/draw_fab/draw_fab.c (revision 30971) @@ -60,12 +60,12 @@ #define DRILL_MARK_SIZE PCB_MIL_TO_COORD(16) #define FAB_LINE_W PCB_MIL_TO_COORD(8) -static void fab_line(pcb_hid_gc_t gc, int x1, int y1, int x2, int y2) +static void fab_line(rnd_hid_gc_t gc, int x1, int y1, int x2, int y2) { pcb_render->draw_line(gc, x1, y1, x2, y2); } -static void fab_circle(pcb_hid_gc_t gc, int x, int y, int r) +static void fab_circle(rnd_hid_gc_t gc, int x, int y, int r) { pcb_render->draw_arc(gc, x, y, r, r, 0, 180); pcb_render->draw_arc(gc, x, y, r, r, 180, 180); @@ -72,7 +72,7 @@ } /* align is 0=left, 1=center, 2=right, add 8 for underline */ -static void text_at(pcb_draw_info_t *info, pcb_hid_gc_t gc, int x, int y, int align, const char *fmt, ...) +static void text_at(pcb_draw_info_t *info, rnd_hid_gc_t gc, int x, int y, int align, const char *fmt, ...) { char tmp[512]; int w = 0, i; @@ -103,7 +103,7 @@ } /* Y, +, X, circle, square */ -static void drill_sym(pcb_hid_gc_t gc, int idx, int x, int y) +static void drill_sym(rnd_hid_gc_t gc, int idx, int x, int y) { int type = idx % 5; int size = idx / 5; @@ -176,7 +176,7 @@ return (ds + 2) * TEXT_LINE; } -static void draw_fab_layer(pcb_draw_info_t *info, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_layer_t *layer, int found) +static void draw_fab_layer(pcb_draw_info_t *info, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e, pcb_layer_t *layer, int found) { pcb_hid_set_line_width(gc, PCB_MIL_TO_COORD(10)); PCB_LINE_LOOP(layer); @@ -200,7 +200,7 @@ } } -static void DrawFab(pcb_draw_info_t *info, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void DrawFab(pcb_draw_info_t *info, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pcb_drill_info_t *AllDrills; int i, n, yoff, total_drills = 0, ds = 0, found; Index: trunk/src_plugins/draw_fontsel/draw_fontsel.c =================================================================== --- trunk/src_plugins/draw_fontsel/draw_fontsel.c (revision 30970) +++ trunk/src_plugins/draw_fontsel/draw_fontsel.c (revision 30971) @@ -47,7 +47,7 @@ #include "obj_line_draw.h" static pcb_draw_info_t dinfo; -static pcb_xform_t dxform; +static rnd_xform_t dxform; static pcb_text_t *dtext(int x, int y, int scale, pcb_font_id_t fid, const char *txt) @@ -82,7 +82,7 @@ pcb_line_draw_(&dinfo, &l, 0); } -static void dchkbox(pcb_hid_gc_t gc, int x0, int y0, int checked) +static void dchkbox(rnd_hid_gc_t gc, int x0, int y0, int checked) { int w = 2, h = 2; float th = 0.1, th2 = 0.4; @@ -108,7 +108,7 @@ font_coord_t font_coord[MAX_FONT]; int font_coords; -static void pcb_draw_font(pcb_hid_gc_t gc, pcb_font_t *f, int x, int *y, pcb_text_t *txt) +static void pcb_draw_font(rnd_hid_gc_t gc, pcb_font_t *f, int x, int *y, pcb_text_t *txt) { char buf[256]; pcb_text_t *t; @@ -136,7 +136,7 @@ } -static void pcb_draw_fontsel(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e, pcb_text_t *txt) +static void pcb_draw_fontsel(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e, pcb_text_t *txt) { int y = 0; Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 30970) +++ trunk/src_plugins/drc_query/dlg.c (revision 30971) @@ -37,7 +37,7 @@ #define PCB dont_use -static void rlist_select(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); +static void rlist_select(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row); typedef struct{ PCB_DAD_DECL_NOINIT(dlg) @@ -80,7 +80,7 @@ pcb_dad_retovr_t retovr; lht_node_t *nd = rnd_conf_lht_get_at_mainplug(ctx->role, ctx->path, 1, 0); if (nd != NULL) { - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; pcb_hid_text_t *txt = atxt->wdata; int *dis, dis_ = 0; @@ -111,10 +111,10 @@ } -static void rule_btn_run_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void rule_btn_run_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { rule_edit_ctx_t *ctx = caller_data; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; pcb_hid_text_t *txt = atxt->wdata; char *script = txt->hid_get_text(atxt, hid_ctx); pcb_view_list_t *view = calloc(sizeof(pcb_view_list_t), 1); @@ -168,13 +168,13 @@ ntxt->data.text.value = rnd_strdup(nval == NULL ? "" : nval); \ } while(0) -static void rule_btn_save_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void rule_btn_save_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { rule_edit_ctx_t *ctx = caller_data; int ri = ctx->dlg[ctx->wsaveroles].val.lng; lht_node_t *nd; rnd_conf_role_t role; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; pcb_hid_text_t *txt = atxt->wdata; if ((ri < 0) || (ri >= sizeof(save_rolee)/sizeof(save_rolee[0]))) { @@ -364,7 +364,7 @@ static void drc_rlist_pcb2dlg(void) { drc_rlist_ctx_t *ctx = &drc_rlist_ctx; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[5], *cursor_path = NULL; @@ -414,7 +414,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wlist, &hv); free(cursor_path); @@ -424,7 +424,7 @@ } } -static void rlist_btn_toggle_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void rlist_btn_toggle_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { drc_rlist_ctx_t *ctx = caller_data; pcb_hid_row_t *row = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wlist])); @@ -469,7 +469,7 @@ free(path); \ } while(0) -static void rlist_btn_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void rlist_btn_edit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { drc_rlist_ctx_t *ctx = caller_data; pcb_hid_row_t *row = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wlist])); @@ -480,7 +480,7 @@ pcb_dlg_rule_edit(role, row->cell[0]); } -static void rlist_btn_run_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_inp) +static void rlist_btn_run_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_inp) { drc_rlist_ctx_t *ctx = caller_data; pcb_hid_row_t *row = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wlist])); @@ -505,9 +505,9 @@ drc_rlist_pcb2dlg(); /* for the run time */ } -static void rlist_select(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void rlist_select(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; pcb_hid_tree_t *tree = attrib->wdata; drc_rlist_ctx_t *ctx = tree->user_ctx; lht_node_t *nd; Index: trunk/src_plugins/export_bom/bom.c =================================================================== --- trunk/src_plugins/export_bom/bom.c (revision 30970) +++ trunk/src_plugins/export_bom/bom.c (revision 30971) @@ -29,7 +29,7 @@ const char *bom_cookie = "bom HID"; -static pcb_export_opt_t bom_options[] = { +static rnd_export_opt_t bom_options[] = { /* %start-doc options "8 BOM Creation" @ftable @code @item --bomfile @@ -49,7 +49,7 @@ #define NUM_OPTIONS (sizeof(bom_options)/sizeof(bom_options[0])) -static pcb_hid_attr_val_t bom_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t bom_values[NUM_OPTIONS]; static const char *bom_filename; @@ -61,7 +61,7 @@ struct pcb_bom_list_s *next; } pcb_bom_list_t; -static pcb_export_opt_t *bom_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *bom_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (bom_options[HA_bomfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &bom_options[HA_bomfile], ".bom"); @@ -221,7 +221,7 @@ return 0; } -static void bom_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void bom_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; pcb_cam_t cam; @@ -243,7 +243,7 @@ pcb_cam_end(&cam); } -static int bom_usage(pcb_hid_t *hid, const char *topic) +static int bom_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nbom exporter command line arguments:\n\n"); pcb_hid_usage(bom_options, sizeof(bom_options) / sizeof(bom_options[0])); @@ -252,13 +252,13 @@ } -static int bom_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int bom_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(bom_options, sizeof(bom_options) / sizeof(bom_options[0]), bom_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -pcb_hid_t bom_hid; +rnd_hid_t bom_hid; int pplg_check_ver_export_bom(int ver_needed) { return 0; } @@ -271,11 +271,11 @@ { PCB_API_CHK_VER; - memset(&bom_hid, 0, sizeof(pcb_hid_t)); + memset(&bom_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&bom_hid); - bom_hid.struct_size = sizeof(pcb_hid_t); + bom_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/export_dsn/dsn.c (revision 30971) @@ -76,9 +76,9 @@ static rnd_coord_t viawidth = 45; static rnd_coord_t viadrill = 25; -static pcb_hid_t dsn_hid; +static rnd_hid_t dsn_hid; -static pcb_export_opt_t dsn_options[] = { +static rnd_export_opt_t dsn_options[] = { {"dsnfile", "SPECCTRA output file", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_dsnfile 0 @@ -104,11 +104,11 @@ #define NUM_OPTIONS (sizeof(dsn_options)/sizeof(dsn_options[0])) -static pcb_hid_attr_val_t dsn_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t dsn_values[NUM_OPTIONS]; static const char *dsn_filename; -static pcb_export_opt_t *dsn_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *dsn_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (dsn_options[HA_dsnfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &dsn_options[HA_dsnfile], ".dsn"); @@ -119,7 +119,7 @@ static void print_structure(FILE * fp) { - pcb_layergrp_id_t group, top_group, bot_group; + rnd_layergrp_id_t group, top_group, bot_group; pcb_layergrp_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, &top_group, 1); pcb_layergrp_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_COPPER, &bot_group, 1); @@ -300,7 +300,7 @@ static void print_term_poly(FILE *fp, gds_t *term_shapes, pcb_poly_t *poly, rnd_coord_t ox, rnd_coord_t oy, int term_on_bottom, int partsidesign) { if (poly->term != NULL) { - pcb_layergrp_id_t gid = term_on_bottom ? pcb_layergrp_get_bottom_copper() : pcb_layergrp_get_top_copper(); + rnd_layergrp_id_t gid = term_on_bottom ? pcb_layergrp_get_bottom_copper() : pcb_layergrp_get_top_copper(); pcb_layergrp_t *grp = pcb_get_layergrp(PCB, gid); char *padstack = pcb_strdup_printf("Term_poly_%ld", poly->ID); pcb_poly_it_t it; @@ -329,7 +329,7 @@ } } -void print_pstk_shape(gds_t *term_shapes, pcb_pstk_t *padstack, pcb_layergrp_id_t gid, rnd_coord_t ox, rnd_coord_t oy, int partsidesign) +void print_pstk_shape(gds_t *term_shapes, pcb_pstk_t *padstack, rnd_layergrp_id_t gid, rnd_coord_t ox, rnd_coord_t oy, int partsidesign) { pcb_pstk_shape_t *shp; pcb_layergrp_t *grp = pcb_get_layergrp(PCB, gid); @@ -341,7 +341,7 @@ /* if the subc is placed on the other side, need to invert the output layerstack as well */ if (partsidesign < 0) { - pcb_layergrp_id_t n, offs = 0; + rnd_layergrp_id_t n, offs = 0; /* determine copper offset from the top */ for(n = 0; (n < PCB->LayerGroups.len) && (n != gid); n++) @@ -406,7 +406,7 @@ PCB_PADSTACK_LOOP(subc->data); { - pcb_layergrp_id_t group; + rnd_layergrp_id_t group; char *pid = pcb_strdup_printf("Pstk_shape_%ld", padstack->ID); pcb_fprintf(fp, " (pin %s \"%s\" %.6mm %.6mm)\n", pid, padstack->term, (padstack->x-ox)*partsidesign, -(padstack->y-oy)); @@ -571,7 +571,7 @@ } -static void dsn_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void dsn_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; pcb_cam_t cam; @@ -596,7 +596,7 @@ pcb_cam_end(&cam); } -static int dsn_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int dsn_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { return pcb_hid_parse_command_line(argc, argv); } @@ -611,10 +611,10 @@ int pplg_init_export_dsn(void) { PCB_API_CHK_VER; - memset(&dsn_hid, 0, sizeof(pcb_hid_t)); + memset(&dsn_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&dsn_hid); - dsn_hid.struct_size = sizeof(pcb_hid_t); + dsn_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/export_dxf/dxf.c (revision 30971) @@ -63,7 +63,7 @@ NULL }; -static pcb_hid_t dxf_hid; +static rnd_hid_t dxf_hid; const char *dxf_cookie = "dxf HID"; @@ -86,9 +86,9 @@ static dxf_ctx_t dxf_ctx; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; pcb_cap_style_t cap; rnd_coord_t width; char *color; @@ -95,9 +95,9 @@ int drill; unsigned warned_elliptical:1; unsigned drawing_hole:1; -} hid_gc_s; +} rnd_hid_gc_s; -static struct hid_gc_s thin = { +static struct rnd_hid_gc_s thin = { {0}, NULL, 0, 1, @@ -108,7 +108,7 @@ #include "dxf_draw.c" -pcb_export_opt_t dxf_attribute_list[] = { +rnd_export_opt_t dxf_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "93 DXF Options" @@ -196,9 +196,9 @@ #define NUM_OPTIONS (sizeof(dxf_attribute_list)/sizeof(dxf_attribute_list[0])) -static pcb_hid_attr_val_t dxf_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t dxf_values[NUM_OPTIONS]; -static pcb_export_opt_t *dxf_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *dxf_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".dxf"; @@ -210,10 +210,10 @@ return dxf_attribute_list; } -void dxf_hid_export_to_file(dxf_ctx_t *ctx, pcb_hid_attr_val_t * options, pcb_xform_t *xform) +void dxf_hid_export_to_file(dxf_ctx_t *ctx, rnd_hid_attr_val_t * options, rnd_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; - pcb_hid_expose_ctx_t hectx; + rnd_hid_expose_ctx_t hectx; hectx.view.X1 = 0; hectx.view.Y1 = 0; @@ -261,7 +261,7 @@ } extern const char dxf_templ_default_arr[]; -static void dxf_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void dxf_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *filename; int save_ons[PCB_MAX_LAYER]; @@ -269,7 +269,7 @@ const char *fn; char *errmsg; lht_err_t err; - pcb_xform_t xform; + rnd_xform_t xform; if (!options) { dxf_get_export_options(hid, 0); @@ -345,13 +345,13 @@ } } -static int dxf_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int dxf_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(dxf_attribute_list, sizeof(dxf_attribute_list) / sizeof(dxf_attribute_list[0]), dxf_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static int dxf_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int dxf_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { if (flags & PCB_LYT_UI) return 0; @@ -431,19 +431,19 @@ } -static pcb_hid_gc_t dxf_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t dxf_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_s), 1); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(sizeof(rnd_hid_gc_s), 1); rv->me_pointer = &dxf_hid; return rv; } -static void dxf_destroy_gc(pcb_hid_gc_t gc) +static void dxf_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void dxf_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void dxf_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { if (direct) return; @@ -462,24 +462,24 @@ } } -static void dxf_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void dxf_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { if (rnd_color_is_drill(color) == 0) gc->drawing_hole = 1; } -static void dxf_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void dxf_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void dxf_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void dxf_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void dxf_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void dxf_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } @@ -496,27 +496,27 @@ y2 = t; \ } -static void dxf_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void dxf_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { fix_rect_coords(); } -static void dxf_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void dxf_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { fix_rect_coords(); } -static void dxf_calibrate(pcb_hid_t *hid, double xval, double yval) +static void dxf_calibrate(rnd_hid_t *hid, double xval, double yval) { rnd_message(RND_MSG_ERROR, "dxf_calibrate() not implemented"); return; } -static void dxf_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) +static void dxf_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } -static int dxf_usage(pcb_hid_t *hid, const char *topic) +static int dxf_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\ndxf exporter command line arguments:\n\n"); pcb_hid_usage(dxf_attribute_list, sizeof(dxf_attribute_list) / sizeof(dxf_attribute_list[0])); @@ -535,11 +535,11 @@ { PCB_API_CHK_VER; - memset(&dxf_hid, 0, sizeof(pcb_hid_t)); + memset(&dxf_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&dxf_hid); - dxf_hid.struct_size = sizeof(pcb_hid_t); + dxf_hid.struct_size = sizeof(rnd_hid_t); dxf_hid.name = "dxf"; dxf_hid.description = "Drawing eXchange Format exporter"; dxf_hid.exporter = 1; Index: trunk/src_plugins/export_dxf/dxf_draw.c =================================================================== --- trunk/src_plugins/export_dxf/dxf_draw.c (revision 30970) +++ trunk/src_plugins/export_dxf/dxf_draw.c (revision 30971) @@ -34,7 +34,7 @@ fprintf(ctx->f, "5\n%lu\n", ctx->handle); } -static void dxf_draw_line_props(dxf_ctx_t *ctx, pcb_hid_gc_t gc) +static void dxf_draw_line_props(dxf_ctx_t *ctx, rnd_hid_gc_t gc) { fprintf(ctx->f, "100\nAcDbEntity\n"); fprintf(ctx->f, "8\n%s\n", ctx->layer_name); /* layer name */ @@ -48,7 +48,7 @@ fprintf(ctx->f, "370\n%d\n", (int)rnd_round(PCB_COORD_TO_MM(gc->width)*100.0)); } -static void dxf_hatch_pre(dxf_ctx_t *ctx, pcb_hid_gc_t gc, int n_coords) +static void dxf_hatch_pre(dxf_ctx_t *ctx, rnd_hid_gc_t gc, int n_coords) { fprintf(ctx->f, "0\nHATCH\n"); dxf_draw_handle(ctx); @@ -72,7 +72,7 @@ fprintf(ctx->f, "98\n0\n"); /* number of seed points */ } -static void dxf_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void dxf_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { dxf_ctx_t *ctx = &dxf_ctx; fprintf(ctx->f, "0\nLINE\n"); @@ -83,7 +83,7 @@ pcb_fprintf(ctx->f, "11\n%mm\n21\n%mm\n", TRX(x2), TRY(y2)); } -static void dxf_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) +static void dxf_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r) { dxf_ctx_t *ctx = &dxf_ctx; fprintf(ctx->f, "0\nCIRCLE\n"); @@ -110,7 +110,7 @@ } } -static void dxf_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void dxf_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_angle_t end_angle, tmp; dxf_ctx_t *ctx = &dxf_ctx; @@ -141,7 +141,7 @@ fprintf(ctx->f, "51\n%f\n", end_angle); } -static void dxf_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void dxf_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { dxf_ctx_t *ctx = &dxf_ctx; int n, to; @@ -184,7 +184,7 @@ } -static void dxf_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void dxf_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { dxf_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } Index: trunk/src_plugins/export_excellon/excellon.c =================================================================== --- trunk/src_plugins/export_excellon/excellon.c (revision 30970) +++ trunk/src_plugins/export_excellon/excellon.c (revision 30971) @@ -138,7 +138,7 @@ } /*** HID ***/ -static pcb_hid_t excellon_hid; +static rnd_hid_t excellon_hid; static const char *excellon_cookie = "excellon drill/cnc exporter"; #define SUFF_LEN 32 @@ -156,15 +156,15 @@ unsigned comp:1; } warn; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; pcb_cap_style_t style; rnd_coord_t width; -} hid_gc_s; +} rnd_hid_gc_s; static long exc_drawn_objs; -static pcb_export_opt_t excellon_options[] = { +static rnd_export_opt_t excellon_options[] = { /* %start-doc options "90 excellon Export" @ftable @code @@ -200,9 +200,9 @@ #define NUM_OPTIONS (sizeof(excellon_options)/sizeof(excellon_options[0])) -static pcb_hid_attr_val_t excellon_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t excellon_values[NUM_OPTIONS]; -static pcb_export_opt_t *excellon_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *excellon_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (excellon_options[HA_excellonfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &excellon_options[HA_excellonfile], ""); @@ -212,14 +212,14 @@ return excellon_options; } -static void excellon_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void excellon_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *fnbase, *fn; char *filesuff; int i; int save_ons[PCB_MAX_LAYER]; - pcb_hid_expose_ctx_t ctx; - pcb_xform_t xform; + rnd_hid_expose_ctx_t ctx; + rnd_xform_t xform; if (!options) { excellon_get_export_options(hid, NULL); @@ -299,13 +299,13 @@ } -static int excellon_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int excellon_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(excellon_options, NUM_OPTIONS, excellon_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static int excellon_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int excellon_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { int is_drill; @@ -326,18 +326,18 @@ return 1; } -static pcb_hid_gc_t excellon_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t excellon_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = calloc(1, sizeof(*rv)); + rnd_hid_gc_t rv = calloc(1, sizeof(*rv)); return rv; } -static void excellon_destroy_gc(pcb_hid_gc_t gc) +static void excellon_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void excellon_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void excellon_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -354,21 +354,21 @@ } } -static void excellon_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void excellon_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { } -static void excellon_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void excellon_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->style = style; } -static void excellon_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void excellon_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void excellon_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void excellon_set_draw_xor(rnd_hid_gc_t gc, int xor_) { } @@ -380,7 +380,7 @@ return (is_plated ? &pdrills : &udrills); } -static void use_gc(pcb_hid_gc_t gc, rnd_coord_t radius) +static void use_gc(rnd_hid_gc_t gc, rnd_coord_t radius) { exc_drawn_objs++; if ((gc->style != pcb_cap_round) && (!warn.nonround)) { @@ -402,7 +402,7 @@ } -static void excellon_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void excellon_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { rnd_coord_t dia = gc->width/2; @@ -412,7 +412,7 @@ pcb_drill_new_pending(get_drill_ctx(), x1, y1, x2, y2, dia*2); } -static void excellon_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void excellon_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { excellon_draw_line(gc, x1, y1, x1, y2); excellon_draw_line(gc, x1, y1, x2, y1); @@ -420,7 +420,7 @@ excellon_draw_line(gc, x2, y1, x2, y2); } -static void excellon_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void excellon_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { if (!warn.arc) { warn.arc = 1; @@ -428,7 +428,7 @@ } } -static void excellon_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void excellon_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { if (radius <= 0) return; @@ -439,7 +439,7 @@ pcb_drill_new_pending(get_drill_ctx(), cx, cy, cx, cy, radius * 2); } -static void excellon_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void excellon_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { if (!warn.poly) { warn.poly = 1; @@ -447,23 +447,23 @@ } } -static void excellon_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void excellon_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { excellon_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void excellon_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void excellon_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { excellon_fill_polygon(gc, 0, NULL, NULL); } -static void excellon_calibrate(pcb_hid_t *hid, double xval, double yval) +static void excellon_calibrate(rnd_hid_t *hid, double xval, double yval) { rnd_message(RND_MSG_ERROR, "Excellon internal error: can not calibrate()\n"); } -static int excellon_usage(pcb_hid_t *hid, const char *topic) +static int excellon_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nexcellon exporter command line arguments:\n\n"); pcb_hid_usage(excellon_options, sizeof(excellon_options) / sizeof(excellon_options[0])); @@ -471,7 +471,7 @@ return 0; } -static void excellon_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void excellon_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } Index: trunk/src_plugins/export_fidocadj/fidocadj.c =================================================================== --- trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30970) +++ trunk/src_plugins/export_fidocadj/fidocadj.c (revision 30971) @@ -61,11 +61,11 @@ #include "../src_plugins/lib_compat_help/pstk_compat.h" -static pcb_hid_t fidocadj_hid; +static rnd_hid_t fidocadj_hid; const char *fidocadj_cookie = "fidocadj HID"; -pcb_export_opt_t fidocadj_attribute_list[] = { +rnd_export_opt_t fidocadj_attribute_list[] = { /* other HIDs expect this to be first. */ {"outfile", "Output file name", @@ -79,9 +79,9 @@ #define NUM_OPTIONS (sizeof(fidocadj_attribute_list)/sizeof(fidocadj_attribute_list[0])) -static pcb_hid_attr_val_t fidocadj_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t fidocadj_values[NUM_OPTIONS]; -static pcb_export_opt_t *fidocadj_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *fidocadj_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".fcd"; @@ -160,12 +160,12 @@ free(msg); } -static void fidocadj_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void fidocadj_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { FILE *f; const char *filename, *libfile; int n, fidoly_next, have_lib; - pcb_layer_id_t lid; + rnd_layer_id_t lid; htsi_t lib_names; /* hash of names found in the library, if have_lib is 1 */ if (!options) { @@ -340,13 +340,13 @@ } } -static int fidocadj_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int fidocadj_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(fidocadj_attribute_list, sizeof(fidocadj_attribute_list) / sizeof(fidocadj_attribute_list[0]), fidocadj_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static int fidocadj_usage(pcb_hid_t *hid, const char *topic) +static int fidocadj_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nfidocadj exporter command line arguments:\n\n"); pcb_hid_usage(fidocadj_attribute_list, sizeof(fidocadj_attribute_list) / sizeof(fidocadj_attribute_list[0])); @@ -365,11 +365,11 @@ { PCB_API_CHK_VER; - memset(&fidocadj_hid, 0, sizeof(pcb_hid_t)); + memset(&fidocadj_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&fidocadj_hid); - fidocadj_hid.struct_size = sizeof(pcb_hid_t); + fidocadj_hid.struct_size = sizeof(rnd_hid_t); fidocadj_hid.name = "fidocadj"; fidocadj_hid.description = "export board in FidoCadJ .fcd format"; fidocadj_hid.exporter = 1; Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 30970) +++ trunk/src_plugins/export_gcode/gcode.c (revision 30971) @@ -43,7 +43,7 @@ const char *pcb_export_gcode_cookie = "export_gcode plugin"; -static pcb_hid_t gcode_hid; +static rnd_hid_t gcode_hid; typedef struct { pcb_cam_t cam; @@ -59,7 +59,7 @@ static const char def_layer_script[] = "setup_negative; trace_contour; fix_overcuts"; static const char def_mech_script[] = "setup_positive; trace_contour; fix_overcuts"; -pcb_export_opt_t gcode_attribute_list[] = { +rnd_export_opt_t gcode_attribute_list[] = { {"outfile", "file name prefix for non-cam", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_outfile 0 @@ -100,9 +100,9 @@ #define NUM_OPTIONS (sizeof(gcode_attribute_list)/sizeof(gcode_attribute_list[0])) -static pcb_hid_attr_val_t gcode_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t gcode_values[NUM_OPTIONS]; -static pcb_export_opt_t *gcode_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *gcode_get_export_options(rnd_hid_t *hid, int *n) { if (n) *n = NUM_OPTIONS; @@ -249,7 +249,7 @@ } -static int gcode_export_layer_group(pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, pcb_xform_t **xform) +static int gcode_export_layer_group(rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, rnd_xform_t **xform) { int script_ha, thru; const char *script; @@ -324,11 +324,11 @@ return 0; } -static void gcode_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void gcode_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; - pcb_layergrp_id_t gid; - pcb_xform_t xform; + rnd_layergrp_id_t gid; + rnd_xform_t xform; pcb_board_t *pcb = PCB; if (!options) { @@ -353,7 +353,7 @@ if (!gctx.cam.active || (gctx.f != NULL)) { for(gid = 0; gid < pcb->LayerGroups.len; gid++) { pcb_layergrp_t *grp = &pcb->LayerGroups.grp[gid]; - pcb_xform_t *xf = &xform; + rnd_xform_t *xf = &xform; gctx.grp = grp; gcode_export_layer_group(gid, grp->purpose, grp->purpi, grp->lid[0], grp->ltype, &xf); gctx.grp = NULL; @@ -377,7 +377,7 @@ } } -static int gcode_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int gcode_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(gcode_attribute_list, sizeof(gcode_attribute_list) / sizeof(gcode_attribute_list[0]), pcb_export_gcode_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -384,7 +384,7 @@ } -static int gcode_usage(pcb_hid_t *hid, const char *topic) +static int gcode_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\ngcode exporter command line arguments:\n\n"); pcb_hid_usage(gcode_attribute_list, sizeof(gcode_attribute_list) / sizeof(gcode_attribute_list[0])); @@ -405,11 +405,11 @@ { PCB_API_CHK_VER; - memset(&gcode_hid, 0, sizeof(pcb_hid_t)); + memset(&gcode_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&gcode_hid); - gcode_hid.struct_size = sizeof(pcb_hid_t); + gcode_hid.struct_size = sizeof(rnd_hid_t); gcode_hid.name = "gcode"; gcode_hid.description = "router g-code for removing copper, drilling and routing board outline"; gcode_hid.exporter = 1; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 30970) +++ trunk/src_plugins/export_gerber/gerber.c (revision 30971) @@ -134,9 +134,9 @@ /* --------------------------------------------------------------------------- */ -static pcb_hid_t gerber_hid; +static rnd_hid_t gerber_hid; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; pcb_cap_style_t cap; int width; @@ -143,7 +143,7 @@ int color; int erase; int drill; -} hid_gc_s; +} rnd_hid_gc_s; static FILE *f = NULL; static gds_t fn_gds; @@ -156,7 +156,7 @@ static int finding_apertures = 0; static int pagecount = 0; static int linewidth = -1; -static pcb_layergrp_id_t lastgroup = -1; +static rnd_layergrp_id_t lastgroup = -1; static int lastcap = -1; static int lastcolor = -1; static int lastX, lastY; /* the last X and Y coordinate */ @@ -195,9 +195,9 @@ NULL }; -static void gerber_warning(pcb_hid_export_opt_func_action_t act, void *call_ctx, pcb_export_opt_t *opt); +static void gerber_warning(pcb_hid_export_opt_func_action_t act, void *call_ctx, rnd_export_opt_t *opt); -static pcb_export_opt_t gerber_options[] = { +static rnd_export_opt_t gerber_options[] = { {"", "WARNING", PCB_HATT_BEGIN_VBOX, 0, 0, {0, 0, 0, 0, {0}, gerber_warning}, 0, 0}, #define HA_warning 0 @@ -256,9 +256,9 @@ #define NUM_OPTIONS (sizeof(gerber_options)/sizeof(gerber_options[0])) -static pcb_hid_attr_val_t gerber_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t gerber_values[NUM_OPTIONS]; -static pcb_export_opt_t *gerber_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *gerber_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (gerber_options[HA_gerberfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &gerber_options[HA_gerberfile], ""); @@ -268,7 +268,7 @@ return gerber_options; } -static pcb_layergrp_id_t group_for_layer(int l) +static rnd_layergrp_id_t group_for_layer(int l) { if (l < pcb_max_layer(PCB) && l >= 0) return pcb_layer_get_group(PCB, l); @@ -296,7 +296,7 @@ static rnd_rnd_box_t region; -static void append_file_suffix(gds_t *dst, pcb_layergrp_id_t gid, pcb_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, int drill, int *merge_same) +static void append_file_suffix(gds_t *dst, rnd_layergrp_id_t gid, rnd_layer_id_t lid, unsigned int flags, const char *purpose, int purpi, int drill, int *merge_same) { const char *sext = ".gbr"; @@ -310,14 +310,14 @@ filesuff = fn_gds.array + fn_baselen; } -static void gerber_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void gerber_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *fnbase; int i; static int saved_layer_stack[PCB_MAX_LAYER]; int save_ons[PCB_MAX_LAYER]; - pcb_hid_expose_ctx_t ctx; - pcb_xform_t xform; + rnd_hid_expose_ctx_t ctx; + rnd_xform_t xform; gerber_ovr = 0; @@ -419,7 +419,7 @@ gds_uninit(&fn_gds); } -static int gerber_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int gerber_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(gerber_options, NUM_OPTIONS, gerber_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -427,7 +427,7 @@ -static int gerber_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int gerber_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { int want_outline; char *cp; @@ -602,7 +602,7 @@ pcb_draw_groups(hid, PCB, PCB_LYT_BOUNDARY, F_uroute, NULL, ®ion, rnd_color_black, PCB_LYT_MECH, 0, 0); } else { - pcb_hid_gc_t gc = pcb_hid_make_gc(); + rnd_hid_gc_t gc = pcb_hid_make_gc(); if (flags & PCB_LYT_SILK) pcb_hid_set_line_width(gc, conf_core.design.min_slk); else if (group >= 0) @@ -619,19 +619,19 @@ return 1; } -static pcb_hid_gc_t gerber_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t gerber_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(1, sizeof(*rv)); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(1, sizeof(*rv)); rv->cap = pcb_cap_round; return rv; } -static void gerber_destroy_gc(pcb_hid_gc_t gc) +static void gerber_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void gerber_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void gerber_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { gerber_drawing_mode = op; if ((f != NULL) && (gerber_debug)) @@ -638,7 +638,7 @@ fprintf(f, "G04 hid debug composite: %d*\r\n", op); } -static void gerber_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void gerber_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { if (rnd_color_is_drill(color)) { gc->color = 1; @@ -652,22 +652,22 @@ } } -static void gerber_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void gerber_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void gerber_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void gerber_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void gerber_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void gerber_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } -static void use_gc(pcb_hid_gc_t gc, int radius) +static void use_gc(rnd_hid_gc_t gc, int radius) { gerber_drawn_objs++; if ((f != NULL) && (gerber_drawing_mode != drawing_mode_issued)) { @@ -718,7 +718,7 @@ } } -static void gerber_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void gerber_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { rnd_bool m = pcb_false; int i; @@ -769,12 +769,12 @@ fprintf(f, "G37*\r\n"); } -static void gerber_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void gerber_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { gerber_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void gerber_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void gerber_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { rnd_bool m = pcb_false; @@ -844,7 +844,7 @@ } } -static void gerber_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void gerber_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { gerber_draw_line(gc, x1, y1, x1, y2); gerber_draw_line(gc, x1, y1, x2, y1); @@ -852,7 +852,7 @@ gerber_draw_line(gc, x2, y1, x2, y2); } -static void gerber_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void gerber_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_bool m = pcb_false; double arcStartX, arcStopX, arcStartY, arcStopY; @@ -953,7 +953,7 @@ lastY = arcStopY; } -static void gerber_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void gerber_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { if (radius <= 0) return; @@ -979,7 +979,7 @@ fprintf(f, "D03*\r\n"); } -static void gerber_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void gerber_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { rnd_coord_t x[5]; rnd_coord_t y[5]; @@ -994,12 +994,12 @@ gerber_fill_polygon(gc, 5, x, y); } -static void gerber_calibrate(pcb_hid_t *hid, double xval, double yval) +static void gerber_calibrate(rnd_hid_t *hid, double xval, double yval) { CRASH("gerber_calibrate"); } -static int gerber_usage(pcb_hid_t *hid, const char *topic) +static int gerber_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\ngerber exporter command line arguments:\n\n"); pcb_hid_usage(gerber_options, sizeof(gerber_options) / sizeof(gerber_options[0])); @@ -1007,7 +1007,7 @@ return 0; } -static void gerber_go_to_cam_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void gerber_go_to_cam_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_dad_retovr_t retovr; pcb_hid_dad_close(hid_ctx, &retovr, -1); @@ -1015,7 +1015,7 @@ } -static void gerber_warning(pcb_hid_export_opt_func_action_t act, void *call_ctx, pcb_export_opt_t *opt) +static void gerber_warning(pcb_hid_export_opt_func_action_t act, void *call_ctx, rnd_export_opt_t *opt) { const char warn_txt[] = "WARNING: direct gerber export is most probably NOT what\n" @@ -1051,7 +1051,7 @@ } -static void gerber_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void gerber_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } Index: trunk/src_plugins/export_ipcd356/ipcd356.c =================================================================== --- trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30970) +++ trunk/src_plugins/export_ipcd356/ipcd356.c (revision 30971) @@ -398,7 +398,7 @@ /*** export hid administration and API/glu ***/ -static pcb_export_opt_t ipcd356_options[] = { +static rnd_export_opt_t ipcd356_options[] = { /* %start-doc options "8 IPC-D-356 Netlist Export" @ftable @code @item --netlist-file @@ -421,9 +421,9 @@ #define NUM_OPTIONS (sizeof(ipcd356_options)/sizeof(ipcd356_options[0])) -static pcb_hid_attr_val_t ipcd356_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t ipcd356_values[NUM_OPTIONS]; -static pcb_export_opt_t *ipcd356_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *ipcd356_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (ipcd356_options[HA_ipcd356_filename].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &ipcd356_options[HA_ipcd356_filename], ".net"); @@ -434,12 +434,12 @@ return ipcd356_options; } -static int ipcd356_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int ipcd356_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { return pcb_hid_parse_command_line(argc, argv); } -static void ipcd356_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void ipcd356_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int n; const char *fn; @@ -471,7 +471,7 @@ pcb_cam_end(&cam); } -static pcb_hid_t ipcd356_hid; +static rnd_hid_t ipcd356_hid; int pplg_check_ver_export_ipcd356(int ver_needed) { return 0; } @@ -483,11 +483,11 @@ int pplg_init_export_ipcd356(void) { PCB_API_CHK_VER; - memset(&ipcd356_hid, 0, sizeof(pcb_hid_t)); + memset(&ipcd356_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&ipcd356_hid); - ipcd356_hid.struct_size = sizeof(pcb_hid_t); + ipcd356_hid.struct_size = sizeof(rnd_hid_t); ipcd356_hid.name = "IPC-D-356"; ipcd356_hid.description = "Exports to IPC-D-356 netlist"; ipcd356_hid.exporter = 1; Index: trunk/src_plugins/export_lpr/lpr.c =================================================================== --- trunk/src_plugins/export_lpr/lpr.c (revision 30970) +++ trunk/src_plugins/export_lpr/lpr.c (revision 30971) @@ -20,7 +20,7 @@ const char *lpr_cookie = "lpr HID"; -static pcb_export_opt_t base_lpr_options[] = { +static rnd_export_opt_t base_lpr_options[] = { /* %start-doc options "98 lpr Printing Options" @ftable @code @@ -39,11 +39,11 @@ #define NUM_OPTIONS (sizeof(lpr_options)/sizeof(lpr_options[0])) -static pcb_export_opt_t *lpr_options = 0; +static rnd_export_opt_t *lpr_options = 0; static int num_lpr_options = 0; -static pcb_hid_attr_val_t *lpr_values; +static rnd_hid_attr_val_t *lpr_values; -static pcb_export_opt_t *lpr_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *lpr_get_export_options(rnd_hid_t *hid, int *n) { /* * We initialize the default value in this manner because the GUI @@ -55,11 +55,11 @@ } if (lpr_options == 0) { - pcb_export_opt_t *ps_opts = ps_hid.get_export_options(&ps_hid, &num_lpr_options); - lpr_options = calloc(num_lpr_options, sizeof(pcb_hid_attribute_t)); - memcpy(lpr_options, ps_opts, num_lpr_options * sizeof(pcb_hid_attribute_t)); + rnd_export_opt_t *ps_opts = ps_hid.get_export_options(&ps_hid, &num_lpr_options); + lpr_options = calloc(num_lpr_options, sizeof(rnd_hid_attribute_t)); + memcpy(lpr_options, ps_opts, num_lpr_options * sizeof(rnd_hid_attribute_t)); memcpy(lpr_options, base_lpr_options, sizeof(base_lpr_options)); - lpr_values = (pcb_hid_attr_val_t *) calloc(num_lpr_options, sizeof(pcb_hid_attr_val_t)); + lpr_values = (rnd_hid_attr_val_t *) calloc(num_lpr_options, sizeof(rnd_hid_attr_val_t)); } if (n) *n = num_lpr_options; @@ -66,7 +66,7 @@ return lpr_options; } -static void lpr_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void lpr_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { FILE *f; int i; @@ -93,7 +93,7 @@ pcb_pclose(f); } -static int lpr_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int lpr_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { lpr_get_export_options(hid, 0); pcb_export_register_opts(lpr_options, num_lpr_options, lpr_cookie, 0); @@ -100,14 +100,14 @@ return pcb_hid_parse_command_line(argc, argv); } -static void lpr_calibrate(pcb_hid_t *hid, double xval, double yval) +static void lpr_calibrate(rnd_hid_t *hid, double xval, double yval) { ps_calibrate_1(hid, xval, yval, 1); } -static pcb_hid_t lpr_hid; +static rnd_hid_t lpr_hid; -static int lpr_usage(pcb_hid_t *hid, const char *topic) +static int lpr_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nlpr exporter command line arguments:\n\n"); pcb_hid_usage(base_lpr_options, sizeof(base_lpr_options) / sizeof(base_lpr_options[0])); @@ -125,12 +125,12 @@ int pplg_init_export_lpr(void) { PCB_API_CHK_VER; - memset(&lpr_hid, 0, sizeof(pcb_hid_t)); + memset(&lpr_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&lpr_hid); ps_ps_init(&lpr_hid); - lpr_hid.struct_size = sizeof(pcb_hid_t); + lpr_hid.struct_size = sizeof(rnd_hid_t); lpr_hid.name = "lpr"; lpr_hid.description = "Postscript print"; lpr_hid.printer = 1; Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 30970) +++ trunk/src_plugins/export_openems/excitation.c (revision 30971) @@ -79,7 +79,7 @@ ser_save(tmp, attrkey); } else { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char *end; const char *orig = ser_load(attrkey); @@ -106,7 +106,7 @@ ser_save(tmp, attrkey); } else { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char *end; const char *orig = ser_load(attrkey); @@ -133,7 +133,7 @@ ser_save(exc_ctx.dlg[widx].val.str, attrkey); } else { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = ser_load(attrkey); if (hv.str == NULL) hv.str = ""; @@ -141,7 +141,7 @@ } } -static void exc_val_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr); +static void exc_val_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr); static rnd_bool to_hz(const char *s, double *out) { @@ -308,7 +308,7 @@ static void exc_user_ser(int idx, int save) { int wscript; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_text_t *txt; wscript = exc_ctx.exc_data[idx].w[I_SCRIPT]; @@ -367,7 +367,7 @@ static void select_update(int setattr) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.lng = exc_ctx.selected; if ((exc_ctx.selected < 0) || (exc_ctx.selected >= sizeof(excitations)/sizeof(excitations[0]))) { @@ -386,13 +386,13 @@ } } -static void select_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void select_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { exc_ctx.selected = attr->val.lng; select_update(1); } -static void exc_val_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void exc_val_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { excitations[exc_ctx.selected].ser(exc_ctx.selected, 1); } Index: trunk/src_plugins/export_openems/export_openems.c =================================================================== --- trunk/src_plugins/export_openems/export_openems.c (revision 30970) +++ trunk/src_plugins/export_openems/export_openems.c (revision 30971) @@ -53,7 +53,7 @@ #include "../src_plugins/lib_polyhelp/topoly.h" #include "mesh.h" -static pcb_hid_t openems_hid; +static rnd_hid_t openems_hid; const char *openems_cookie = "openems HID"; @@ -61,18 +61,18 @@ #define MESH_NAME "openems" -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; pcb_cap_style_t cap; int width; -} hid_gc_s; +} rnd_hid_gc_s; typedef struct { /* input/output */ FILE *f, *fsim; pcb_board_t *pcb; - pcb_hid_attr_val_t *options; + rnd_hid_attr_val_t *options; /* local cache */ const char *filename; @@ -93,7 +93,7 @@ #define THMAX PCB_MM_TO_COORD(100) -pcb_export_opt_t openems_attribute_list[] = { +rnd_export_opt_t openems_attribute_list[] = { {"outfile", "Graphics output file", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_openemsfile 0 @@ -154,9 +154,9 @@ #define NUM_OPTIONS (sizeof(openems_attribute_list)/sizeof(openems_attribute_list[0])) -static pcb_hid_attr_val_t openems_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t openems_values[NUM_OPTIONS]; -static pcb_export_opt_t *openems_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *openems_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".m"; pcb_mesh_t *mesh = pcb_mesh_get(MESH_NAME); @@ -258,7 +258,7 @@ static void openems_write_layers(wctx_t *ctx) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; int next = 1; for(gid = 0; gid < PCB_MAX_LAYERGRP; gid++) @@ -360,7 +360,7 @@ fprintf(ctx->f, "\n"); } -static void openems_vport_write(wctx_t *ctx, pcb_any_obj_t *o, rnd_coord_t x, rnd_coord_t y, pcb_layergrp_id_t gid1, pcb_layergrp_id_t gid2, const char *port_name) +static void openems_vport_write(wctx_t *ctx, pcb_any_obj_t *o, rnd_coord_t x, rnd_coord_t y, rnd_layergrp_id_t gid1, rnd_layergrp_id_t gid2, const char *port_name) { char *end, *s, *safe_name = rnd_strdup(port_name); const char *att; @@ -399,10 +399,10 @@ free(safe_name); } -pcb_layergrp_id_t openems_vport_main_group_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, int *gstep, const char *port_name) +rnd_layergrp_id_t openems_vport_main_group_pstk(pcb_board_t *pcb, pcb_pstk_t *ps, int *gstep, const char *port_name) { int top, bot, intern; - pcb_layergrp_id_t gid1; + rnd_layergrp_id_t gid1; top = (pcb_pstk_shape(ps, PCB_LYT_COPPER | PCB_LYT_TOP, 0) != NULL); bot = (pcb_pstk_shape(ps, PCB_LYT_COPPER | PCB_LYT_BOTTOM, 0) != NULL); @@ -437,9 +437,9 @@ return gid1; } -pcb_layergrp_id_t openems_vport_aux_group(pcb_board_t *pcb, pcb_layergrp_id_t gid1, int gstep, const char *port_name) +rnd_layergrp_id_t openems_vport_aux_group(pcb_board_t *pcb, rnd_layergrp_id_t gid1, int gstep, const char *port_name) { - pcb_layergrp_id_t gid2; + rnd_layergrp_id_t gid2; for(gid2 = gid1 + gstep; (gid2 >= 0) && (gid2 <= pcb->LayerGroups.len); gid2 += gstep) if (pcb->LayerGroups.grp[gid2].ltype & PCB_LYT_COPPER) @@ -477,7 +477,7 @@ case PCB_OBJ_PSTK: { int gstep; - pcb_layergrp_id_t gid1, gid2; + rnd_layergrp_id_t gid1, gid2; pcb_pstk_t *ps = (pcb_pstk_t *)o; if (port_name == NULL) @@ -589,9 +589,9 @@ } -void openems_hid_export_to_file(const char *filename, FILE *the_file, FILE *fsim, pcb_hid_attr_val_t *options) +void openems_hid_export_to_file(const char *filename, FILE *the_file, FILE *fsim, rnd_hid_attr_val_t *options) { - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; wctx_t wctx; memset(&wctx, 0, sizeof(wctx)); @@ -628,7 +628,7 @@ rnd_conf_update(NULL, -1); /* restore forced sets */ } -static void openems_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void openems_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *filename; char *runfn, *end; @@ -681,13 +681,13 @@ free(runfn); } -static int openems_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int openems_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(openems_attribute_list, sizeof(openems_attribute_list) / sizeof(openems_attribute_list[0]), openems_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static int openems_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int openems_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { if (flags & PCB_LYT_COPPER) { /* export copper layers only */ ems_ctx->clayer = ems_ctx->lg_pcb2ems[group]; @@ -696,19 +696,19 @@ return 0; } -static pcb_hid_gc_t openems_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t openems_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_s), 1); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(sizeof(rnd_hid_gc_s), 1); rv->me_pointer = &openems_hid; return rv; } -static void openems_destroy_gc(pcb_hid_gc_t gc) +static void openems_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void openems_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void openems_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -724,39 +724,39 @@ } } -static void openems_set_color(pcb_hid_gc_t gc, const rnd_color_t *name) +static void openems_set_color(rnd_hid_gc_t gc, const rnd_color_t *name) { } -static void openems_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void openems_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void openems_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void openems_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void openems_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void openems_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } -static void openems_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void openems_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void openems_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void openems_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void openems_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void openems_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { } -static void openems_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void openems_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { wctx_t *ctx = ems_ctx; long oid = ctx->oid++; @@ -766,7 +766,7 @@ pcb_fprintf(ctx->f, "CSX = AddPcbrndTrace(CSX, PCBRND, %d, points%ld, %mm, 0);\n", ctx->clayer, oid, radius*2); } -static void openems_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void openems_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { wctx_t *ctx = ems_ctx; int n; @@ -778,12 +778,12 @@ fprintf(ctx->f, "CSX = AddPcbrndPoly(CSX, PCBRND, %d, poly%ld_xy, 1);\n", ctx->clayer, oid); } -static void openems_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void openems_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { openems_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void openems_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void openems_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { wctx_t *ctx = ems_ctx; @@ -806,17 +806,17 @@ } -static void openems_calibrate(pcb_hid_t *hid, double xval, double yval) +static void openems_calibrate(rnd_hid_t *hid, double xval, double yval) { rnd_message(RND_MSG_ERROR, "openems_calibrate() not implemented"); return; } -static void openems_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) +static void openems_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } -static int openems_usage(pcb_hid_t *hid, const char *topic) +static int openems_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nopenems exporter command line arguments:\n\n"); pcb_hid_usage(openems_attribute_list, sizeof(openems_attribute_list) / sizeof(openems_attribute_list[0])); @@ -842,11 +842,11 @@ { PCB_API_CHK_VER; - memset(&openems_hid, 0, sizeof(pcb_hid_t)); + memset(&openems_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&openems_hid); - openems_hid.struct_size = sizeof(pcb_hid_t); + openems_hid.struct_size = sizeof(rnd_hid_t); openems_hid.name = "openems"; openems_hid.description = "OpenEMS exporter"; openems_hid.exporter = 1; Index: trunk/src_plugins/export_openems/mesh.c =================================================================== --- trunk/src_plugins/export_openems/mesh.c (revision 30970) +++ trunk/src_plugins/export_openems/mesh.c (revision 30971) @@ -618,7 +618,7 @@ static int mesh_auto_z(pcb_mesh_t *mesh) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; rnd_coord_t y = 0, ytop = 0, ybottom, top_dens, bottom_dens; int n, lns, first = 1; @@ -755,7 +755,7 @@ static int mesh_vis_z(pcb_mesh_t *mesh) { int n; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; rnd_coord_t y0 = PCB->hidlib.size_y/3, y = y0, y2; rnd_coord_t xl = PCB->hidlib.size_x/5; /* board left */ rnd_coord_t xr = PCB->hidlib.size_x/5*3; /* board right */ @@ -963,7 +963,7 @@ } static char *default_file = NULL; -static void ia_save_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ia_save_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { char *fname = NULL; FILE *f; @@ -994,7 +994,7 @@ fclose(f); } -static void ia_load_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ia_load_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { char *fname = NULL; FILE *f; @@ -1020,7 +1020,7 @@ fclose(f); } -static void ia_gen_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ia_gen_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { mesh_layer_reset(); mesh.layer = PCB_CURRLAYER(PCB); Index: trunk/src_plugins/export_openscad/export_openscad.c =================================================================== --- trunk/src_plugins/export_openscad/export_openscad.c (revision 30970) +++ trunk/src_plugins/export_openscad/export_openscad.c (revision 30971) @@ -60,17 +60,17 @@ #include "hid_cam.h" -static pcb_hid_t openscad_hid; +static rnd_hid_t openscad_hid; const char *openscad_cookie = "openscad HID"; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; pcb_cap_style_t cap; int width; -} hid_gc_s; +} rnd_hid_gc_s; static FILE *f = NULL; static unsigned layer_open; @@ -82,7 +82,7 @@ static int scad_layer_cnt; static vti0_t scad_comp; -pcb_export_opt_t openscad_attribute_list[] = { +rnd_export_opt_t openscad_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "93 DXF Options" @@ -127,9 +127,9 @@ #include "scad_draw.c" #include "scad_models.c" -static pcb_hid_attr_val_t openscad_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t openscad_values[NUM_OPTIONS]; -static pcb_export_opt_t *openscad_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *openscad_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".scad"; @@ -141,10 +141,10 @@ return openscad_attribute_list; } -void openscad_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t * options) +void openscad_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t * options) { static int saved_layer_stack[PCB_MAX_LAYER]; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; ctx.view.X1 = 0; ctx.view.Y1 = 0; @@ -291,7 +291,7 @@ } -static void openscad_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void openscad_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *filename; int save_ons[PCB_MAX_LAYER]; @@ -351,7 +351,7 @@ pcb_cam_end(&cam); } -static int openscad_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int openscad_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(openscad_attribute_list, sizeof(openscad_attribute_list) / sizeof(openscad_attribute_list[0]), openscad_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -359,7 +359,7 @@ -static int openscad_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int openscad_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { if (flags & PCB_LYT_UI) return 0; @@ -417,19 +417,19 @@ } -static pcb_hid_gc_t openscad_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t openscad_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_s), 1); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(sizeof(rnd_hid_gc_s), 1); rv->me_pointer = &openscad_hid; return rv; } -static void openscad_destroy_gc(pcb_hid_gc_t gc) +static void openscad_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void openscad_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void openscad_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { switch(op) { case PCB_HID_COMP_RESET: @@ -449,22 +449,22 @@ } } -static void openscad_set_color(pcb_hid_gc_t gc, const rnd_color_t *name) +static void openscad_set_color(rnd_hid_gc_t gc, const rnd_color_t *name) { } -static void openscad_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void openscad_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void openscad_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void openscad_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void openscad_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void openscad_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } @@ -482,7 +482,7 @@ } -static void openscad_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void openscad_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -492,7 +492,7 @@ x1, y1, x2, y2, 0.0, effective_layer_thickness); } -static void openscad_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void openscad_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double length, angle; const char *cap_style; @@ -512,7 +512,7 @@ x1, y1, (rnd_coord_t)rnd_round(length), angle * PCB_RAD_TO_DEG, gc->width, effective_layer_thickness); } -static void openscad_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void openscad_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -524,7 +524,7 @@ openscad_draw_line(gc, x1, y2, x1, y1); } -static void openscad_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void openscad_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { double a, step = delta_angle/10.0, end_angle = start_angle + delta_angle; int first; @@ -562,7 +562,7 @@ } } -static void openscad_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void openscad_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { TRX(cx); TRY(cy); @@ -569,7 +569,7 @@ pcb_fprintf(f, " pcb_fcirc(%mm, %mm, %mm, %f);\n", cx, cy, radius, effective_layer_thickness); } -static void openscad_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void openscad_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int n; fprintf(f, " pcb_fill_poly(["); @@ -578,22 +578,22 @@ pcb_fprintf(f, "[%mm,%mm]], %f);\n", TRX_(x[n]+dx), TRY_(y[n]+dy), effective_layer_thickness); } -static void openscad_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void openscad_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { openscad_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void openscad_calibrate(pcb_hid_t *hid, double xval, double yval) +static void openscad_calibrate(rnd_hid_t *hid, double xval, double yval) { rnd_message(RND_MSG_ERROR, "openscad_calibrate() not implemented"); return; } -static void openscad_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) +static void openscad_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } -static int openscad_usage(pcb_hid_t *hid, const char *topic) +static int openscad_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nopenscad exporter command line arguments:\n\n"); pcb_hid_usage(openscad_attribute_list, sizeof(openscad_attribute_list) / sizeof(openscad_attribute_list[0])); @@ -669,11 +669,11 @@ { PCB_API_CHK_VER; - memset(&openscad_hid, 0, sizeof(pcb_hid_t)); + memset(&openscad_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&openscad_hid); - openscad_hid.struct_size = sizeof(pcb_hid_t); + openscad_hid.struct_size = sizeof(rnd_hid_t); openscad_hid.name = "openscad"; openscad_hid.description = "OpenSCAD exporter"; openscad_hid.exporter = 1; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 30970) +++ trunk/src_plugins/export_png/png.c (revision 30971) @@ -72,7 +72,7 @@ #define CRASH(func) fprintf(stderr, "HID error: pcb called unimplemented PNG function %s.\n", func); abort() -static pcb_hid_t png_hid; +static rnd_hid_t png_hid; const char *png_cookie = "png HID"; @@ -99,7 +99,7 @@ #define NOT_EDGE_Y(y) ((y) != 0 && (y) != PCB->hidlib.size_y) #define NOT_EDGE(x,y) (NOT_EDGE_X(x) || NOT_EDGE_Y(y)) -static void png_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); +static void png_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); /* The result of a failed gdImageColorAllocate() call */ #define BADC -1 @@ -113,9 +113,9 @@ } color_struct; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; pcb_cap_style_t cap; int width, r, g, b; color_struct *color; @@ -165,7 +165,7 @@ #include "png_photo1.c" -pcb_export_opt_t png_attribute_list[] = { +rnd_export_opt_t png_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "93 PNG Options" @@ -374,7 +374,7 @@ #define NUM_OPTIONS (sizeof(png_attribute_list)/sizeof(png_attribute_list[0])) -static pcb_hid_attr_val_t png_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t png_values[NUM_OPTIONS]; static const char *get_file_suffix(void) { @@ -398,7 +398,7 @@ return result; } -static pcb_export_opt_t *png_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *png_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = get_file_suffix(); @@ -411,7 +411,7 @@ } -static pcb_layergrp_id_t group_for_layer(int l) +static rnd_layergrp_id_t group_for_layer(int l) { if (l < pcb_max_layer(PCB) && l >= 0) return pcb_layer_get_group(PCB, l); @@ -419,15 +419,15 @@ return pcb_max_group(PCB) + 3 + l; } -static int is_solder(pcb_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_BOTTOM; } -static int is_component(pcb_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_TOP; } +static int is_solder(rnd_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_BOTTOM; } +static int is_component(rnd_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_TOP; } static int layer_sort(const void *va, const void *vb) { int a = *(int *) va; int b = *(int *) vb; - pcb_layergrp_id_t al = group_for_layer(a); - pcb_layergrp_id_t bl = group_for_layer(b); + rnd_layergrp_id_t al = group_for_layer(a); + rnd_layergrp_id_t bl = group_for_layer(b); int d = bl - al; if (a >= 0 && a < pcb_max_layer(PCB)) { @@ -468,7 +468,7 @@ dest->b = b; } -static pcb_hid_attr_val_t *png_options; +static rnd_hid_attr_val_t *png_options; #include "png_photo2.c" @@ -523,11 +523,11 @@ fprintf(stderr, "Error: Invalid graphic file format." " This is a bug. Please report it.\n"); } -void png_hid_export_to_file(FILE *the_file, pcb_hid_attr_val_t *options, pcb_xform_t *xform) +void png_hid_export_to_file(FILE *the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; rnd_rnd_box_t tmp, region; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; f = the_file; @@ -596,7 +596,7 @@ } } -static void png_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void png_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int save_ons[PCB_MAX_LAYER]; int i; @@ -603,7 +603,7 @@ rnd_rnd_box_t tmp, *bbox; int w, h; int xmax, ymax, dpi; - pcb_xform_t xform; + rnd_xform_t xform; png_free_cache(); @@ -791,7 +791,7 @@ } } -static int png_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int png_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(png_attribute_list, sizeof(png_attribute_list) / sizeof(png_attribute_list[0]), png_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -800,7 +800,7 @@ static int is_mask; -static int png_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int png_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { if (flags & PCB_LYT_UI) return 0; @@ -854,9 +854,9 @@ } -static pcb_hid_gc_t png_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t png_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_t), 1); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(sizeof(hid_gc_t), 1); rv->me_pointer = &png_hid; rv->cap = pcb_cap_round; rv->width = 1; @@ -867,13 +867,13 @@ return rv; } -static void png_destroy_gc(pcb_hid_gc_t gc) +static void png_destroy_gc(rnd_hid_gc_t gc) { free(gc); } static pcb_composite_op_t drawing_mode; -static void png_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void png_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { static gdImagePtr dst_im; drawing_mode = op; @@ -935,7 +935,7 @@ } } -static void png_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void png_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { color_struct *cc; @@ -983,17 +983,17 @@ } } -static void png_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void png_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void png_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void png_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void png_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void png_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } @@ -1016,10 +1016,10 @@ } static int unerase_override = 0; -static void use_gc(gdImagePtr im, pcb_hid_gc_t gc) +static void use_gc(gdImagePtr im, rnd_hid_gc_t gc) { int need_brush = 0; - pcb_hid_gc_t agc; + rnd_hid_gc_t agc; gdImagePtr brp; png_drawn_objs++; @@ -1128,7 +1128,7 @@ } -static void png_fill_rect_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void png_fill_rect_(gdImagePtr im, rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(im, gc); gdImageSetThickness(im, 0); @@ -1152,7 +1152,7 @@ have_outline |= doing_outline; } -static void png_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void png_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { png_fill_rect_(im, gc, x1, y1, x2, y2); if ((im != erase_im) && (erase_im != NULL)) { @@ -1163,7 +1163,7 @@ } -static void png_draw_line_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void png_draw_line_(gdImagePtr im, rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int x1o = 0, y1o = 0, x2o = 0, y2o = 0; if (x1 == x2 && y1 == y2 && !photo_mode) { @@ -1225,7 +1225,7 @@ } } -static void png_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void png_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { png_draw_line_(im, gc, x1, y1, x2, y2); if ((im != erase_im) && (erase_im != NULL)) { @@ -1235,7 +1235,7 @@ } } -static void png_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void png_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { png_draw_line(gc, x1, y1, x2, y1); png_draw_line(gc, x2, y1, x2, y2); @@ -1244,7 +1244,7 @@ } -static void png_draw_arc_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void png_draw_arc_(gdImagePtr im, rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_angle_t sa, ea; @@ -1302,7 +1302,7 @@ gdImageArc(im, SCALE_X(cx), SCALE_Y(cy), SCALE(2 * width), SCALE(2 * height), sa, ea, gdBrushed); } -static void png_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void png_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { png_draw_arc_(im, gc, cx, cy, width, height, start_angle, delta_angle); if ((im != erase_im) && (erase_im != NULL)) { @@ -1312,7 +1312,7 @@ } } -static void png_fill_circle_(gdImagePtr im, pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void png_fill_circle_(gdImagePtr im, rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { rnd_coord_t my_bloat; @@ -1330,7 +1330,7 @@ gdImageFilledEllipse(im, SCALE_X(cx), SCALE_Y(cy), SCALE(2 * radius + my_bloat), SCALE(2 * radius + my_bloat), unerase_override ? white->c : gc->color->c); } -static void png_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void png_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { png_fill_circle_(im, gc, cx, cy, radius); if ((im != erase_im) && (erase_im != NULL)) { @@ -1341,7 +1341,7 @@ } -static void png_fill_polygon_offs_(gdImagePtr im, pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void png_fill_polygon_offs_(gdImagePtr im, rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; gdPoint *points; @@ -1365,7 +1365,7 @@ free(points); } -static void png_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void png_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { png_fill_polygon_offs_(im, gc, n_coords, x, y, dx, dy); if ((im != erase_im) && (erase_im != NULL)) { @@ -1376,22 +1376,22 @@ } -static void png_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void png_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { png_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void png_calibrate(pcb_hid_t *hid, double xval, double yval) +static void png_calibrate(rnd_hid_t *hid, double xval, double yval) { CRASH("png_calibrate"); } -static void png_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) +static void png_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } -static int png_usage(pcb_hid_t *hid, const char *topic) +static int png_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\npng exporter command line arguments:\n\n"); pcb_hid_usage(png_attribute_list, sizeof(png_attribute_list) / sizeof(png_attribute_list[0])); @@ -1410,11 +1410,11 @@ { PCB_API_CHK_VER; - memset(&png_hid, 0, sizeof(pcb_hid_t)); + memset(&png_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&png_hid); - png_hid.struct_size = sizeof(pcb_hid_t); + png_hid.struct_size = sizeof(rnd_hid_t); png_hid.name = "png"; png_hid.description = "GIF/JPEG/PNG export"; png_hid.exporter = 1; Index: trunk/src_plugins/export_png/png.h =================================================================== --- trunk/src_plugins/export_png/png.h (revision 30970) +++ trunk/src_plugins/export_png/png.h (revision 30971) @@ -1,2 +1,2 @@ extern const char *png_cookie; -extern void png_hid_export_to_file(FILE *, pcb_hid_attr_val_t *, pcb_xform_t *); +extern void png_hid_export_to_file(FILE *, rnd_hid_attr_val_t *, rnd_xform_t *); Index: trunk/src_plugins/export_png/png_photo1.c =================================================================== --- trunk/src_plugins/export_png/png_photo1.c (revision 30970) +++ trunk/src_plugins/export_png/png_photo1.c (revision 30971) @@ -35,7 +35,7 @@ static gdImagePtr photo_outline; static int photo_groups[PCB_MAX_LAYERGRP + 2], photo_ngroups; static int photo_has_inners; -static pcb_layergrp_id_t photo_last_grp; +static rnd_layergrp_id_t photo_last_grp; static int is_photo_drill; static const char *mask_colour_names[] = { Index: trunk/src_plugins/export_png/png_photo2.c =================================================================== --- trunk/src_plugins/export_png/png_photo2.c (revision 30970) +++ trunk/src_plugins/export_png/png_photo2.c (revision 30971) @@ -122,7 +122,7 @@ clip(dest, dest); } -static int png_set_layer_group_photo(pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int png_set_layer_group_photo(rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { /* workaround: the outline layer vs. alpha breaks if set twice and the draw code may set it twice (if there's no mech layer), but always in a row */ @@ -382,7 +382,7 @@ static void png_photo_as_shown() { int i, n = 0; - pcb_layergrp_id_t solder_layer = -1, comp_layer = -1; + rnd_layergrp_id_t solder_layer = -1, comp_layer = -1; pcb_layergrp_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_COPPER, &solder_layer, 1); pcb_layergrp_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, &comp_layer, 1); @@ -417,7 +417,7 @@ } } -static void png_photo_do_export(pcb_hid_attr_val_t *options) +static void png_photo_do_export(rnd_hid_attr_val_t *options) { options[HA_mono].lng = 1; options[HA_as_shown].lng = 0; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 30970) +++ trunk/src_plugins/export_ps/eps.c (revision 30971) @@ -28,15 +28,15 @@ static pcb_cam_t eps_cam; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; pcb_cap_style_t cap; rnd_coord_t width; unsigned long color; int erase; -} hid_gc_s; +} rnd_hid_gc_s; -static pcb_hid_t eps_hid; +static rnd_hid_t eps_hid; static FILE *f = 0; static rnd_coord_t linewidth = -1; @@ -48,7 +48,7 @@ static pcb_composite_op_t drawing_mode; static long eps_drawn_objs; -static pcb_export_opt_t eps_attribute_list[] = { +static rnd_export_opt_t eps_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "92 Encapsulated Postscript Export" @@ -116,9 +116,9 @@ #define NUM_OPTIONS (sizeof(eps_attribute_list)/sizeof(eps_attribute_list[0])) -static pcb_hid_attr_val_t eps_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t eps_values[NUM_OPTIONS]; -static pcb_export_opt_t *eps_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *eps_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (eps_attribute_list[HA_psfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &eps_attribute_list[HA_psfile], ".eps"); @@ -128,7 +128,7 @@ return eps_attribute_list; } -static pcb_layergrp_id_t group_for_layer(int l) +static rnd_layergrp_id_t group_for_layer(int l) { if (l < pcb_max_layer(PCB) && l >= 0) return pcb_layer_get_group(PCB, l); @@ -136,15 +136,15 @@ return pcb_max_group(PCB) + 3 + l; } -static int is_solder(pcb_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_BOTTOM; } -static int is_component(pcb_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_TOP; } +static int is_solder(rnd_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_BOTTOM; } +static int is_component(rnd_layergrp_id_t grp) { return pcb_layergrp_flags(PCB, grp) & PCB_LYT_TOP; } static int layer_sort(const void *va, const void *vb) { int a = *(int *) va; int b = *(int *) vb; - pcb_layergrp_id_t al = group_for_layer(a); - pcb_layergrp_id_t bl = group_for_layer(b); + rnd_layergrp_id_t al = group_for_layer(a); + rnd_layergrp_id_t bl = group_for_layer(b); int d = bl - al; if (a >= 0 && a < pcb_max_layer(PCB)) { @@ -162,7 +162,7 @@ static rnd_rnd_box_t *bounds; static int in_mono, as_shown; -static pcb_hid_attr_val_t *options_; +static rnd_hid_attr_val_t *options_; static void eps_print_header(FILE *f, const char *outfn) { linewidth = -1; @@ -213,12 +213,12 @@ fprintf(f, "%%%%EOF\n"); } -void eps_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t *options, pcb_xform_t *xform) +void eps_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t *options, rnd_xform_t *xform) { int i; static int saved_layer_stack[PCB_MAX_LAYER]; rnd_rnd_box_t tmp, region; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; options_ = options; @@ -258,7 +258,7 @@ /* If NO layers had anything on them, at least print the component layer to get the pins. */ if (fast_erase == 0) { - pcb_layergrp_id_t comp_copp; + rnd_layergrp_id_t comp_copp; if (pcb_layergrp_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, &comp_copp, 1) > 0) { print_group[pcb_layer_get_group(PCB, comp_copp)] = 1; fast_erase = 1; @@ -307,11 +307,11 @@ options_ = NULL; } -static void eps_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void eps_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; int save_ons[PCB_MAX_LAYER]; - pcb_xform_t xform; + rnd_xform_t xform; if (!options) { eps_get_export_options(hid, 0); @@ -357,7 +357,7 @@ } } -static int eps_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int eps_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(eps_attribute_list, sizeof(eps_attribute_list) / sizeof(eps_attribute_list[0]), ps_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -367,7 +367,7 @@ static int is_paste; static int is_drill; -static int eps_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int eps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { gds_t tmp_ln; const char *name; @@ -429,9 +429,9 @@ return 1; } -static pcb_hid_gc_t eps_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t eps_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) malloc(sizeof(hid_gc_s)); + rnd_hid_gc_t rv = (rnd_hid_gc_t) malloc(sizeof(rnd_hid_gc_s)); rv->cap = pcb_cap_round; rv->width = 0; rv->color = 0; @@ -438,12 +438,12 @@ return rv; } -static void eps_destroy_gc(pcb_hid_gc_t gc) +static void eps_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void eps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void eps_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { if (direct) return; @@ -466,7 +466,7 @@ } -static void eps_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void eps_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { if (drawing_mode == PCB_HID_COMP_NEGATIVE) { gc->color = 0xffffff; @@ -487,22 +487,22 @@ gc->color = 0; } -static void eps_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void eps_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void eps_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void eps_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void eps_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void eps_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } -static void use_gc(pcb_hid_gc_t gc) +static void use_gc(rnd_hid_gc_t gc) { eps_drawn_objs++; if (linewidth != gc->width) { @@ -533,16 +533,16 @@ } } -static void eps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); -static void eps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); +static void eps_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +static void eps_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); -static void eps_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void eps_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); } -static void eps_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void eps_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { rnd_coord_t w = gc->width / 2; if (x1 == x2 && y1 == y2) { @@ -571,7 +571,7 @@ pcb_fprintf(f, "%mi %mi %mi %mi %s\n", x1, y1, x2, y2, gc->erase ? "tc" : "t"); } -static void eps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void eps_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_angle_t sa, ea; double w; @@ -600,13 +600,13 @@ pcb_fprintf(f, "%ma %ma %mi %mi %mi %mi %f a\n", sa, ea, -width, height, cx, cy, (double) linewidth / w); } -static void eps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void eps_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %s\n", cx, cy, radius, gc->erase ? "cc" : "c"); } -static void eps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void eps_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; const char *op = "moveto"; @@ -619,28 +619,28 @@ fprintf(f, "fill\n"); } -static void eps_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void eps_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { eps_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void eps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void eps_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); pcb_fprintf(f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); } -static void eps_calibrate(pcb_hid_t *hid, double xval, double yval) +static void eps_calibrate(rnd_hid_t *hid, double xval, double yval) { CRASH("eps_calibrate"); } -static void eps_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void eps_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } -static int eps_usage(pcb_hid_t *hid, const char *topic) +static int eps_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\neps exporter command line arguments:\n\n"); pcb_hid_usage(eps_attribute_list, sizeof(eps_attribute_list) / sizeof(eps_attribute_list[0])); @@ -650,11 +650,11 @@ void hid_eps_init() { - memset(&eps_hid, 0, sizeof(pcb_hid_t)); + memset(&eps_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&eps_hid); - eps_hid.struct_size = sizeof(pcb_hid_t); + eps_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/export_ps/ps.c (revision 30971) @@ -32,22 +32,22 @@ const char *ps_cookie = "ps HID"; -static int ps_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform); -static void use_gc(pcb_hid_gc_t gc); +static int ps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform); +static void use_gc(rnd_hid_gc_t gc); -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; pcb_cap_style_t cap; rnd_coord_t width; unsigned char r, g, b; int erase; int faded; -} hid_gc_s; +} rnd_hid_gc_s; static pcb_cam_t ps_cam; -pcb_export_opt_t ps_attribute_list[] = { +rnd_export_opt_t ps_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "91 Postscript Export" @@ -324,9 +324,9 @@ int has_outline; double scale_factor; - pcb_hid_expose_ctx_t exps; + rnd_hid_expose_ctx_t exps; - pcb_hid_attr_val_t ps_values[NUM_OPTIONS]; + rnd_hid_attr_val_t ps_values[NUM_OPTIONS]; rnd_bool is_mask; rnd_bool is_drill; @@ -339,7 +339,7 @@ long drawn_objs; } global; -static pcb_export_opt_t *ps_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *ps_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (ps_attribute_list[HA_psfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &ps_attribute_list[HA_psfile], ".ps"); @@ -349,7 +349,7 @@ return ps_attribute_list; } -static pcb_layergrp_id_t group_for_layer(int l) +static rnd_layergrp_id_t group_for_layer(int l) { if (l < pcb_max_layer(PCB) && l >= 0) return pcb_layer_get_group(PCB, l); @@ -520,7 +520,7 @@ /* This is used by other HIDs that use a postscript format, like lpr or eps. */ -void ps_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t * options, pcb_xform_t *xform) +void ps_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t * options, rnd_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; @@ -601,12 +601,12 @@ memcpy(pcb_layer_stack, saved_layer_stack, sizeof(pcb_layer_stack)); } -static void ps_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void ps_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { FILE *fh; int save_ons[PCB_MAX_LAYER]; int i; - pcb_xform_t xform; + rnd_xform_t xform; global.ovr_all = 0; @@ -670,7 +670,7 @@ } -static int ps_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int ps_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(ps_attribute_list, NUM_OPTIONS, ps_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -697,7 +697,7 @@ fprintf(fh, "stroke grestore\n"); } -static int ps_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int ps_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { gds_t tmp_ln; static int lastgroup = -1; @@ -950,26 +950,26 @@ return 1; } -static pcb_hid_gc_t ps_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t ps_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(1, sizeof(hid_gc_s)); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(1, sizeof(rnd_hid_gc_s)); rv->me_pointer = &ps_hid; rv->cap = pcb_cap_round; return rv; } -static void ps_destroy_gc(pcb_hid_gc_t gc) +static void ps_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void ps_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void ps_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { global.drawing_mode = op; } -static void ps_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void ps_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { if (global.drawing_mode == PCB_HID_COMP_NEGATIVE) { gc->r = gc->g = gc->b = 255; @@ -991,27 +991,27 @@ } } -static void ps_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void ps_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void ps_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void ps_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void ps_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void ps_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } -static void ps_set_draw_faded(pcb_hid_gc_t gc, int faded) +static void ps_set_draw_faded(rnd_hid_gc_t gc, int faded) { gc->faded = faded; } -static void use_gc(pcb_hid_gc_t gc) +static void use_gc(rnd_hid_gc_t gc) { static int lastcap = -1; static int lastcolor = -1; @@ -1070,16 +1070,16 @@ } } -static void ps_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ps_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); pcb_fprintf(global.f, "%mi %mi %mi %mi dr\n", x1, y1, x2, y2); } -static void ps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); -static void ps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); +static void ps_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); +static void ps_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius); -static void ps_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ps_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { #if 0 /* If you're etching your own paste mask, this will reduce the @@ -1114,7 +1114,7 @@ pcb_fprintf(global.f, "%mi %mi %mi %mi t\n", x1, y1, x2, y2); } -static void ps_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void ps_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_angle_t sa, ea; double w; @@ -1144,7 +1144,7 @@ sa, ea, -width, height, cx, cy, (double)(global.linewidth) / w); } -static void ps_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void ps_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { use_gc(gc); if (!gc->erase || !global.is_copper || global.drillcopper) { @@ -1154,7 +1154,7 @@ } } -static void ps_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void ps_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; const char *op = "moveto"; @@ -1166,7 +1166,7 @@ fprintf(global.f, "fill\n"); } -static void ps_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void ps_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { ps_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } @@ -1221,7 +1221,7 @@ return *c1 < *c2; } -static void ps_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ps_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { use_gc(gc); if (x1 > x2) { @@ -1249,7 +1249,7 @@ pcb_fprintf(global.f, "%mi %mi %mi %mi r\n", x1, y1, x2, y2); } -pcb_hid_attribute_t ps_calib_attribute_list[] = { +rnd_hid_attribute_t ps_calib_attribute_list[] = { {"lprcommand", "Command to print", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, }; @@ -1339,7 +1339,7 @@ return 1; } -void ps_calibrate_1(pcb_hid_t *hid, double xval, double yval, int use_command) +void ps_calibrate_1(rnd_hid_t *hid, double xval, double yval, int use_command) { FILE *ps_cal_file; int used_popen = 0, c; @@ -1405,16 +1405,16 @@ fclose(ps_cal_file); } -static void ps_calibrate(pcb_hid_t *hid, double xval, double yval) +static void ps_calibrate(rnd_hid_t *hid, double xval, double yval) { ps_calibrate_1(hid, xval, yval, 0); } -static void ps_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void ps_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } -pcb_hid_t ps_hid; +rnd_hid_t ps_hid; static fgw_error_t pcb_act_PSCalib(fgw_arg_t *res, int argc, fgw_arg_t *argv) { @@ -1427,7 +1427,7 @@ }; static int ps_inited = 0; -void ps_ps_init(pcb_hid_t * hid) +void ps_ps_init(rnd_hid_t * hid) { if (ps_inited) return; @@ -1459,7 +1459,7 @@ ps_inited = 1; } -static int ps_usage(pcb_hid_t *hid, const char *topic) +static int ps_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nps exporter command line arguments:\n\n"); pcb_hid_usage(ps_attribute_list, sizeof(ps_attribute_list) / sizeof(ps_attribute_list[0])); @@ -1485,12 +1485,12 @@ int pplg_init_export_ps(void) { PCB_API_CHK_VER; - memset(&ps_hid, 0, sizeof(pcb_hid_t)); + memset(&ps_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&ps_hid); ps_ps_init(&ps_hid); - ps_hid.struct_size = sizeof(pcb_hid_t); + ps_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/export_ps/ps.h (revision 30971) @@ -1,7 +1,7 @@ extern const char *ps_cookie; -extern pcb_hid_t ps_hid; -extern void ps_hid_export_to_file(FILE *, pcb_hid_attr_val_t *, pcb_xform_t *); +extern rnd_hid_t ps_hid; +extern void ps_hid_export_to_file(FILE *, rnd_hid_attr_val_t *, rnd_xform_t *); extern void ps_start_file(FILE *); -extern void ps_calibrate_1(pcb_hid_t *hid, double, double, int); +extern void ps_calibrate_1(rnd_hid_t *hid, double, double, int); extern void hid_eps_init(); -void ps_ps_init(pcb_hid_t * hid); +void ps_ps_init(rnd_hid_t * hid); Index: trunk/src_plugins/export_stat/stat.c =================================================================== --- trunk/src_plugins/export_stat/stat.c (revision 30970) +++ trunk/src_plugins/export_stat/stat.c (revision 30971) @@ -64,11 +64,11 @@ #include "hid_cam.h" -static pcb_hid_t stat_hid; +static rnd_hid_t stat_hid; const char *stat_cookie = "stat HID"; -pcb_export_opt_t stat_attribute_list[] = { +rnd_export_opt_t stat_attribute_list[] = { /* other HIDs expect this to be first. */ {"outfile", "Output file name", @@ -108,9 +108,9 @@ #define NUM_OPTIONS (sizeof(stat_attribute_list)/sizeof(stat_attribute_list[0])) -static pcb_hid_attr_val_t stat_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t stat_values[NUM_OPTIONS]; -static pcb_export_opt_t *stat_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *stat_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".stat.lht"; @@ -128,12 +128,12 @@ unsigned long int lines, arcs, polys, elements; } layer_stat_t; -static void stat_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void stat_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { FILE *f; const char *filename; int i, lid; - pcb_layergrp_id_t lgid; + rnd_layergrp_id_t lgid; char buff[1024]; layer_stat_t ls, *lgs, lgss[PCB_MAX_LAYERGRP]; int nl, phg, hp, hup, group_not_empty[PCB_MAX_LAYERGRP]; @@ -371,13 +371,13 @@ pcb_cam_end(&cam); } -static int stat_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int stat_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(stat_attribute_list, sizeof(stat_attribute_list) / sizeof(stat_attribute_list[0]), stat_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static int stat_usage(pcb_hid_t *hid, const char *topic) +static int stat_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nstat exporter command line arguments:\n\n"); pcb_hid_usage(stat_attribute_list, sizeof(stat_attribute_list) / sizeof(stat_attribute_list[0])); @@ -400,11 +400,11 @@ { PCB_API_CHK_VER; - memset(&stat_hid, 0, sizeof(pcb_hid_t)); + memset(&stat_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&stat_hid); - stat_hid.struct_size = sizeof(pcb_hid_t); + stat_hid.struct_size = sizeof(rnd_hid_t); stat_hid.name = "stat"; stat_hid.description = "board statistics"; stat_hid.exporter = 1; Index: trunk/src_plugins/export_stl/export_stl.c =================================================================== --- trunk/src_plugins/export_stl/export_stl.c (revision 30970) +++ trunk/src_plugins/export_stl/export_stl.c (revision 30971) @@ -37,10 +37,10 @@ #include "../lib_polyhelp/topoly.h" #include "../lib_polyhelp/triangulate.h" -static pcb_hid_t stl_hid; +static rnd_hid_t stl_hid; const char *stl_cookie = "export_stl HID"; -pcb_export_opt_t stl_attribute_list[] = { +rnd_export_opt_t stl_attribute_list[] = { {"outfile", "STL output file", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_stlfile 0 @@ -68,9 +68,9 @@ #define NUM_OPTIONS (sizeof(stl_attribute_list)/sizeof(stl_attribute_list[0])) -static pcb_hid_attr_val_t stl_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t stl_values[NUM_OPTIONS]; -static pcb_export_opt_t *stl_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *stl_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".stl"; @@ -129,7 +129,7 @@ fprintf(f, " endfacet\n"); } -int stl_hid_export_to_file(FILE *f, pcb_hid_attr_val_t *options, rnd_coord_t maxy, rnd_coord_t z0, rnd_coord_t z1) +int stl_hid_export_to_file(FILE *f, rnd_hid_attr_val_t *options, rnd_coord_t maxy, rnd_coord_t z0, rnd_coord_t z1) { pcb_poly_t *poly = pcb_topoly_1st_outline(PCB, PCB_TOPOLY_FLOATING); size_t mem_req = fp2t_memory_required(poly->PointN); @@ -181,7 +181,7 @@ return 0; } -static void stl_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void stl_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *filename; int i; @@ -225,7 +225,7 @@ pcb_cam_end(&cam); } -static int stl_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int stl_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(stl_attribute_list, sizeof(stl_attribute_list) / sizeof(stl_attribute_list[0]), stl_cookie, 0); return pcb_hid_parse_command_line(argc, argv); @@ -232,7 +232,7 @@ } -static int stl_usage(pcb_hid_t *hid, const char *topic) +static int stl_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nstl exporter command line arguments:\n\n"); pcb_hid_usage(stl_attribute_list, sizeof(stl_attribute_list) / sizeof(stl_attribute_list[0])); @@ -252,11 +252,11 @@ { PCB_API_CHK_VER; - memset(&stl_hid, 0, sizeof(pcb_hid_t)); + memset(&stl_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&stl_hid); - stl_hid.struct_size = sizeof(pcb_hid_t); + stl_hid.struct_size = sizeof(rnd_hid_t); stl_hid.name = "stl"; stl_hid.description = "export board outline in 3-dimensional STL"; stl_hid.exporter = 1; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 30970) +++ trunk/src_plugins/export_svg/svg.c (revision 30971) @@ -62,21 +62,21 @@ #include "hid_cam.h" -static pcb_hid_t svg_hid; +static rnd_hid_t svg_hid; const char *svg_cookie = "svg HID"; static pcb_cam_t svg_cam; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; pcb_cap_style_t cap; int width; char *color; int drill; unsigned warned_elliptical:1; -} hid_gc_s; +} rnd_hid_gc_s; static const char *CAPS(pcb_cap_style_t cap) { @@ -125,7 +125,7 @@ /* INNER */ { "#222222", "#111111", "#000000", PCB_MM_TO_COORD(0) } }; -pcb_export_opt_t svg_attribute_list[] = { +rnd_export_opt_t svg_attribute_list[] = { /* other HIDs expect this to be first. */ /* %start-doc options "93 SVG Options" @@ -193,9 +193,9 @@ y = PCB->hidlib.size_y - y; \ } while(0) -static pcb_hid_attr_val_t svg_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t svg_values[NUM_OPTIONS]; -static pcb_export_opt_t *svg_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *svg_get_export_options(rnd_hid_t *hid, int *n) { const char *suffix = ".svg"; @@ -207,10 +207,10 @@ return svg_attribute_list; } -void svg_hid_export_to_file(FILE * the_file, pcb_hid_attr_val_t * options, pcb_xform_t *xform) +void svg_hid_export_to_file(FILE * the_file, rnd_hid_attr_val_t * options, rnd_xform_t *xform) { static int saved_layer_stack[PCB_MAX_LAYER]; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; ctx.view.X1 = 0; ctx.view.Y1 = 0; @@ -317,12 +317,12 @@ fprintf(f, "\n"); } -static void svg_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void svg_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *filename; int save_ons[PCB_MAX_LAYER]; int i; - pcb_xform_t xform; + rnd_xform_t xform; comp_cnt = 0; @@ -377,13 +377,13 @@ } } -static int svg_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int svg_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(svg_attribute_list, sizeof(svg_attribute_list) / sizeof(svg_attribute_list[0]), svg_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static int svg_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int svg_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { int opa, is_our_mask = 0, is_our_silk = 0; @@ -471,9 +471,9 @@ } -static pcb_hid_gc_t svg_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t svg_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (pcb_hid_gc_t) calloc(sizeof(hid_gc_s), 1); + rnd_hid_gc_t rv = (rnd_hid_gc_t) calloc(sizeof(rnd_hid_gc_s), 1); rv->me_pointer = &svg_hid; rv->cap = pcb_cap_round; rv->width = 1; @@ -481,12 +481,12 @@ return rv; } -static void svg_destroy_gc(pcb_hid_gc_t gc) +static void svg_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void svg_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void svg_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { drawing_mode = op; @@ -520,12 +520,12 @@ } } -static const char *svg_color(pcb_hid_gc_t gc) +static const char *svg_color(rnd_hid_gc_t gc) { return gc->color; } -static const char *svg_clip_color(pcb_hid_gc_t gc) +static const char *svg_clip_color(rnd_hid_gc_t gc) { if ((drawing_mode == PCB_HID_COMP_POSITIVE) || (drawing_mode == PCB_HID_COMP_POSITIVE_XOR)) return "#FFFFFF"; @@ -534,7 +534,7 @@ return NULL; } -static void svg_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void svg_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { const char *name; gc->drill = 0; @@ -556,12 +556,12 @@ gc->color = rnd_strdup(name); } -static void svg_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void svg_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void svg_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void svg_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width < PCB_MM_TO_COORD(0.01) ? PCB_MM_TO_COORD(0.01) : width; } @@ -585,7 +585,7 @@ pcb_append_printf(s, ind); } -static void svg_set_draw_xor(pcb_hid_gc_t gc, int xor_) +static void svg_set_draw_xor(rnd_hid_gc_t gc, int xor_) { ; } @@ -602,7 +602,7 @@ y2 = t; \ } -static void draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t w, rnd_coord_t h, rnd_coord_t stroke) +static void draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t w, rnd_coord_t h, rnd_coord_t stroke) { const char *clip_color = svg_clip_color(gc); @@ -616,7 +616,7 @@ } } -static void svg_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void svg_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { svg_drawn_objs++; fix_rect_coords(); @@ -623,7 +623,7 @@ draw_rect(gc, x1, y1, x2-x1, y2-y1, gc->width); } -static void draw_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t w, rnd_coord_t h) +static void draw_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t w, rnd_coord_t h) { const char *clip_color = svg_clip_color(gc); if ((photo_mode) && (clip_color == NULL)) { @@ -650,7 +650,7 @@ } } -static void svg_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void svg_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { svg_drawn_objs++; TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -658,7 +658,7 @@ draw_fill_rect(gc, x1, y1, x2-x1, y2-y1); } -static void pcb_line_draw(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void pcb_line_draw(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { const char *clip_color = svg_clip_color(gc); if ((photo_mode) && (clip_color == NULL)) { @@ -686,7 +686,7 @@ } } -static void svg_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void svg_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { svg_drawn_objs++; TRX(x1); TRY(y1); TRX(x2); TRY(y2); @@ -693,7 +693,7 @@ pcb_line_draw(gc, x1, y1, x2, y2); } -static void pcb_arc_draw(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t r, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t stroke, int large, int sweep) +static void pcb_arc_draw(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t r, rnd_coord_t x2, rnd_coord_t y2, rnd_coord_t stroke, int large, int sweep) { const char *clip_color = svg_clip_color(gc); if ((photo_mode) && (clip_color == NULL)) { @@ -720,7 +720,7 @@ } } -static void svg_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void svg_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { rnd_coord_t x1, y1, x2, y2, diff = 0, diff2, maxdiff; rnd_angle_t sa, ea; @@ -779,7 +779,7 @@ pcb_arc_draw(gc, x1, y1, width, x2, y2, gc->width, (fabs(delta_angle) > 180), (delta_angle < 0.0)); } -static void draw_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, rnd_coord_t stroke) +static void draw_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t r, rnd_coord_t stroke) { const char *clip_color = svg_clip_color(gc); @@ -817,7 +817,7 @@ } } -static void svg_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void svg_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { svg_drawn_objs++; TRX(cx); TRY(cy); @@ -824,7 +824,7 @@ draw_fill_circle(gc, cx, cy, radius, 0); } -static void draw_poly(gds_t *s, pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y, rnd_coord_t dx, rnd_coord_t dy, const char *clr) +static void draw_poly(gds_t *s, rnd_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y, rnd_coord_t dx, rnd_coord_t dy, const char *clr) { int i; float poly_bloat = 0.01; @@ -839,7 +839,7 @@ pcb_append_printf(s, "\" stroke-width=\"%.3f\" stroke=\"%s\" fill=\"%s\"/>\n", poly_bloat, clr, clr); } -static void svg_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void svg_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { const char *clip_color = svg_clip_color(gc); svg_drawn_objs++; @@ -858,23 +858,23 @@ } } -static void svg_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void svg_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { svg_fill_polygon_offs(gc, n_coords, x, y, 0, 0); } -static void svg_calibrate(pcb_hid_t *hid, double xval, double yval) +static void svg_calibrate(rnd_hid_t *hid, double xval, double yval) { rnd_message(RND_MSG_ERROR, "svg_calibrate() not implemented"); return; } -static void svg_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) +static void svg_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int a) { } -static int svg_usage(pcb_hid_t *hid, const char *topic) +static int svg_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nsvg exporter command line arguments:\n\n"); pcb_hid_usage(svg_attribute_list, sizeof(svg_attribute_list) / sizeof(svg_attribute_list[0])); @@ -893,11 +893,11 @@ { PCB_API_CHK_VER; - memset(&svg_hid, 0, sizeof(pcb_hid_t)); + memset(&svg_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&svg_hid); - svg_hid.struct_size = sizeof(pcb_hid_t); + svg_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/export_test/export_test.c (revision 30971) @@ -22,7 +22,7 @@ const char *export_test_cookie = "export_test HID"; -static pcb_export_opt_t export_test_options[] = { +static rnd_export_opt_t export_test_options[] = { /* %start-doc options "8 export_test Creation" @ftable @code @item --export_testfile @@ -37,11 +37,11 @@ #define NUM_OPTIONS (sizeof(export_test_options)/sizeof(export_test_options[0])) -static pcb_hid_attr_val_t export_test_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t export_test_values[NUM_OPTIONS]; static const char *export_test_filename; -static pcb_export_opt_t *export_test_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *export_test_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (export_test_options[HA_export_testfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &export_test_options[HA_export_testfile], ".export_test"); @@ -56,7 +56,7 @@ return 0; } -static void export_test_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void export_test_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; @@ -77,7 +77,7 @@ Printexport_test(); } -static int export_test_usage(pcb_hid_t *hid, const char *topic) +static int export_test_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nexport_test exporter command line arguments:\n\n"); pcb_hid_usage(export_test_options, sizeof(export_test_options) / sizeof(export_test_options[0])); @@ -86,13 +86,13 @@ } -static int export_test_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int export_test_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(export_test_options, sizeof(export_test_options) / sizeof(export_test_options[0]), export_test_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -pcb_hid_t export_test_hid; +rnd_hid_t export_test_hid; int pplg_check_ver_export_test(int ver_needed) { return 0; } @@ -104,11 +104,11 @@ { PCB_API_CHK_VER; - memset(&export_test_hid, 0, sizeof(pcb_hid_t)); + memset(&export_test_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&export_test_hid); - export_test_hid.struct_size = sizeof(pcb_hid_t); + export_test_hid.struct_size = sizeof(rnd_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_vfs_fuse/export_vfs_fuse.c =================================================================== --- trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c (revision 30970) +++ trunk/src_plugins/export_vfs_fuse/export_vfs_fuse.c (revision 30971) @@ -38,7 +38,7 @@ static int pcb_fuse_changed; static char fuse_cwd[PCB_PATH_MAX]; -static pcb_export_opt_t *export_vfs_fuse_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *export_vfs_fuse_get_export_options(rnd_hid_t *hid, int *n) { return 0; } @@ -255,7 +255,7 @@ static char **fuse_argv; static int fuse_argc = 0; -static void export_vfs_fuse_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void export_vfs_fuse_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { static struct fuse_operations oper; @@ -275,7 +275,7 @@ fprintf(stderr, "fuse_main() returned error.\n"); } -static int export_vfs_fuse_usage(pcb_hid_t *hid, const char *topic) +static int export_vfs_fuse_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nexport_vfs_fuse exporter command line arguments are plain fuse aguments.\n\n"); fprintf(stderr, "\nUsage: pcb-rnd [pcb-rnd-options] [-o fuse-options] foo.pcb mountpoint\n\n"); @@ -302,7 +302,7 @@ static char **fuse_ret_argv; static int fuse_ret_argc = 0; -static int export_vfs_fuse_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int export_vfs_fuse_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { int n, in_argc = *argc; char **in_argv = *argv; @@ -350,7 +350,7 @@ return 0; } -pcb_hid_t export_vfs_fuse_hid; +rnd_hid_t export_vfs_fuse_hid; int pplg_check_ver_export_vfs_fuse(int ver_needed) { return 0; } @@ -367,11 +367,11 @@ { PCB_API_CHK_VER; - memset(&export_vfs_fuse_hid, 0, sizeof(pcb_hid_t)); + memset(&export_vfs_fuse_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&export_vfs_fuse_hid); - export_vfs_fuse_hid.struct_size = sizeof(pcb_hid_t); + export_vfs_fuse_hid.struct_size = sizeof(rnd_hid_t); export_vfs_fuse_hid.name = "vfs_fuse"; export_vfs_fuse_hid.description = "Handler of FUSE calls, serving board data"; export_vfs_fuse_hid.exporter = 1; Index: trunk/src_plugins/export_vfs_mc/export_vfs_mc.c =================================================================== --- trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 30970) +++ trunk/src_plugins/export_vfs_mc/export_vfs_mc.c (revision 30971) @@ -24,7 +24,7 @@ const char *export_vfs_mc_cookie = "export_vfs_mc HID"; -static pcb_export_opt_t export_vfs_mc_options[] = { +static rnd_export_opt_t export_vfs_mc_options[] = { {"cmd", "mc command", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_export_vfs_mc_cmd 0 @@ -36,9 +36,9 @@ #define NUM_OPTIONS (sizeof(export_vfs_mc_options)/sizeof(export_vfs_mc_options[0])) -static pcb_hid_attr_val_t export_vfs_mc_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t export_vfs_mc_values[NUM_OPTIONS]; -static pcb_export_opt_t *export_vfs_mc_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *export_vfs_mc_get_export_options(rnd_hid_t *hid, int *n) { if (n) *n = NUM_OPTIONS; @@ -102,7 +102,7 @@ } } -static void export_vfs_mc_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void export_vfs_mc_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { const char *cmd; int i; @@ -124,7 +124,7 @@ } } -static int export_vfs_mc_usage(pcb_hid_t *hid, const char *topic) +static int export_vfs_mc_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nexport_vfs_mc exporter command line arguments:\n\n"); pcb_hid_usage(export_vfs_mc_options, sizeof(export_vfs_mc_options) / sizeof(export_vfs_mc_options[0])); @@ -133,13 +133,13 @@ } -static int export_vfs_mc_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int export_vfs_mc_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(export_vfs_mc_options, sizeof(export_vfs_mc_options) / sizeof(export_vfs_mc_options[0]), export_vfs_mc_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -pcb_hid_t export_vfs_mc_hid; +rnd_hid_t export_vfs_mc_hid; int pplg_check_ver_export_vfs_mc(int ver_needed) { return 0; } @@ -152,11 +152,11 @@ { PCB_API_CHK_VER; - memset(&export_vfs_mc_hid, 0, sizeof(pcb_hid_t)); + memset(&export_vfs_mc_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&export_vfs_mc_hid); - export_vfs_mc_hid.struct_size = sizeof(pcb_hid_t); + export_vfs_mc_hid.struct_size = sizeof(rnd_hid_t); export_vfs_mc_hid.name = "vfs_mc"; export_vfs_mc_hid.description = "Handler of mc VFS calls, serving board data"; export_vfs_mc_hid.exporter = 1; Index: trunk/src_plugins/export_xy/xy.c =================================================================== --- trunk/src_plugins/export_xy/xy.c (revision 30970) +++ trunk/src_plugins/export_xy/xy.c (revision 30971) @@ -47,7 +47,7 @@ #define MAX_TEMP_NAME_LEN 128 -static pcb_export_opt_t xy_options[] = { +static rnd_export_opt_t xy_options[] = { /* %start-doc options "8 XY Creation" @ftable @code @item --xyfile @@ -81,7 +81,7 @@ #define NUM_OPTIONS (sizeof(xy_options)/sizeof(xy_options[0])) -static pcb_hid_attr_val_t xy_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t xy_values[NUM_OPTIONS]; static const char *xy_filename; static const rnd_unit_t *xy_unit; @@ -97,7 +97,7 @@ } } -static pcb_export_opt_t *xy_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *xy_get_export_options(rnd_hid_t *hid, int *n) { static int last_unit_value = -1; rnd_conf_listitem_t *li; @@ -787,7 +787,7 @@ return NULL; } -static void xy_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void xy_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; template_t templ; @@ -830,7 +830,7 @@ pcb_cam_end(&cam); } -static int xy_usage(pcb_hid_t *hid, const char *topic) +static int xy_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nXY exporter command line arguments:\n\n"); pcb_hid_usage(xy_options, sizeof(xy_options) / sizeof(xy_options[0])); @@ -838,13 +838,13 @@ return 0; } -static int xy_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int xy_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(xy_options, sizeof(xy_options) / sizeof(xy_options[0]), xy_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -pcb_hid_t xy_hid; +rnd_hid_t xy_hid; int pplg_check_ver_export_xy(int ver_needed) { return 0; } @@ -865,7 +865,7 @@ rnd_conf_reg_file(CONF_FN, export_xy_conf_internal); - memset(&xy_hid, 0, sizeof(pcb_hid_t)); + memset(&xy_hid, 0, sizeof(rnd_hid_t)); #define conf_reg(field,isarray,type_name,cpath,cname,desc,flags) \ rnd_conf_reg_field(conf_xy, field,isarray,type_name,cpath,cname,desc,flags); @@ -873,7 +873,7 @@ pcb_hid_nogui_init(&xy_hid); - xy_hid.struct_size = sizeof(pcb_hid_t); + xy_hid.struct_size = sizeof(rnd_hid_t); xy_hid.name = "XY"; xy_hid.description = "Exports a XY (centroid)"; xy_hid.exporter = 1; Index: trunk/src_plugins/extedit/extedit_dad.c =================================================================== --- trunk/src_plugins/extedit/extedit_dad.c (revision 30970) +++ trunk/src_plugins/extedit/extedit_dad.c (revision 30971) @@ -45,7 +45,7 @@ pcb_gui->attr_dlg_widget_state(ee->dlg_hid_ctx, ee->wfmt, pcb_false); } -static void ee_chg_method(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ee_chg_method(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { static int lock = 0; ee_t *ee = caller_data; @@ -60,7 +60,7 @@ lock = 0; } -static void ee_chg_cmd(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void ee_chg_cmd(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { static int lock = 0; ee_t *ee = caller_data; Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 30970) +++ trunk/src_plugins/fontmode/fontmode.c (revision 30971) @@ -70,9 +70,9 @@ static const char pcb_acts_fontedit[] = "FontEdit()"; static const char pcb_acth_fontedit[] = "Convert the current font to a PCB for editing."; -static pcb_layer_t *make_layer(pcb_layergrp_id_t grp, const char *lname) +static pcb_layer_t *make_layer(rnd_layergrp_id_t grp, const char *lname) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; assert(grp >= 0); lid = pcb_layer_create(PCB, grp, lname, 0); @@ -101,7 +101,7 @@ pcb_font_t *font; pcb_symbol_t *symbol; pcb_layer_t *lfont, *lorig, *lwidth, *lgrid, *lsilk; - pcb_layergrp_id_t grp[4]; + rnd_layergrp_id_t grp[4]; pcb_poly_t *poly; pcb_arc_t *arc, *newarc; int s, l; Index: trunk/src_plugins/hid_batch/batch.c =================================================================== --- trunk/src_plugins/hid_batch/batch.c (revision 30970) +++ trunk/src_plugins/hid_batch/batch.c (revision 30971) @@ -30,11 +30,11 @@ /* This is a text-line "batch" HID, which exists for scripting and non-GUI needs. */ -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; -} hid_gc_s; +} rnd_hid_gc_s; -static pcb_export_opt_t *batch_get_export_options(pcb_hid_t *hid, int *n_ret) +static rnd_export_opt_t *batch_get_export_options(rnd_hid_t *hid, int *n_ret) { if (n_ret != NULL) *n_ret = 0; @@ -41,7 +41,7 @@ return NULL; } -static int batch_usage(pcb_hid_t *hid, const char *topic) +static int batch_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nbatch GUI command line arguments: none\n\n"); fprintf(stderr, "\nInvocation: pcb-rnd --gui batch [options]\n"); @@ -115,7 +115,7 @@ /* ----------------------------------------------------------------------------- */ static int batch_stay; -static void batch_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void batch_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int interactive; char line[1000]; @@ -151,111 +151,111 @@ batch_end(); } -static void batch_do_exit(pcb_hid_t *hid) +static void batch_do_exit(rnd_hid_t *hid) { batch_stay = 0; } -static int batch_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int batch_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { return pcb_hid_parse_command_line(argc, argv); } -static void batch_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) +static void batch_invalidate_lr(rnd_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { } -static void batch_invalidate_all(pcb_hid_t *hid) +static void batch_invalidate_all(rnd_hid_t *hid) { } -static int batch_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int batch_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { return 0; } -static pcb_hid_gc_t batch_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t batch_make_gc(rnd_hid_t *hid) { static pcb_core_gc_t hc; - return (pcb_hid_gc_t)&hc; + return (rnd_hid_gc_t)&hc; } -static void batch_destroy_gc(pcb_hid_gc_t gc) +static void batch_destroy_gc(rnd_hid_gc_t gc) { } -static void batch_set_color(pcb_hid_gc_t gc, const rnd_color_t *name) +static void batch_set_color(rnd_hid_gc_t gc, const rnd_color_t *name) { } -static void batch_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void batch_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { } -static void batch_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void batch_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { } -static void batch_set_draw_xor(pcb_hid_gc_t gc, int xor_set) +static void batch_set_draw_xor(rnd_hid_gc_t gc, int xor_set) { } -static void batch_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void batch_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void batch_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t end_angle) +static void batch_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t end_angle) { } -static void batch_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void batch_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void batch_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void batch_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { } -static void batch_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) +static void batch_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { } -static void batch_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void batch_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { } -static void batch_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void batch_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { } -static void batch_calibrate(pcb_hid_t *hid, double xval, double yval) +static void batch_calibrate(rnd_hid_t *hid, double xval, double yval) { } -static int batch_shift_is_pressed(pcb_hid_t *hid) +static int batch_shift_is_pressed(rnd_hid_t *hid) { return 0; } -static int batch_control_is_pressed(pcb_hid_t *hid) +static int batch_control_is_pressed(rnd_hid_t *hid) { return 0; } -static int batch_mod1_is_pressed(pcb_hid_t *hid) +static int batch_mod1_is_pressed(rnd_hid_t *hid) { return 0; } -static void batch_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) +static void batch_get_coords(rnd_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { } -static void batch_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void batch_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } -static pcb_hidval_t batch_add_timer(pcb_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) +static pcb_hidval_t batch_add_timer(rnd_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { pcb_hidval_t rv; rv.lval = 0; @@ -262,12 +262,12 @@ return rv; } -static void batch_stop_timer(pcb_hid_t *hid, pcb_hidval_t timer) +static void batch_stop_timer(rnd_hid_t *hid, pcb_hidval_t timer) { } pcb_hidval_t -batch_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), +batch_watch_file(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func) (pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_hidval_t ret; @@ -275,37 +275,37 @@ return ret; } -void batch_unwatch_file(pcb_hid_t *hid, pcb_hidval_t data) +void batch_unwatch_file(rnd_hid_t *hid, pcb_hidval_t data) { } -static void batch_create_menu(pcb_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) +static void batch_create_menu(rnd_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) { } -static void batch_zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) +static void batch_zoom_win(rnd_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) { } -static void batch_zoom(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) +static void batch_zoom(rnd_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) { } -static void batch_pan(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) +static void batch_pan(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) { } -static void batch_pan_mode(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) +static void batch_pan_mode(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) { } -static void batch_set_hidlib(pcb_hid_t *hid, rnd_hidlib_t *hidlib) +static void batch_set_hidlib(rnd_hid_t *hid, rnd_hidlib_t *hidlib) { hid->hid_data = hidlib; } -static void batch_view_get(pcb_hid_t *hid, rnd_rnd_box_t *viewbox) +static void batch_view_get(rnd_hid_t *hid, rnd_rnd_box_t *viewbox) { rnd_hidlib_t *hidlib = hid->hid_data; viewbox->X1 = 0; @@ -314,18 +314,18 @@ viewbox->Y2 = hidlib->size_y; } -static void batch_open_command(pcb_hid_t *hid) +static void batch_open_command(rnd_hid_t *hid) { } -static int batch_open_popup(pcb_hid_t *hid, const char *menupath) +static int batch_open_popup(rnd_hid_t *hid, const char *menupath) { return 1; } -static pcb_hid_t batch_hid; +static rnd_hid_t batch_hid; int pplg_check_ver_hid_batch(int ver_needed) { return 0; } @@ -338,11 +338,11 @@ int pplg_init_hid_batch(void) { PCB_API_CHK_VER; - memset(&batch_hid, 0, sizeof(pcb_hid_t)); + memset(&batch_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&batch_hid); - batch_hid.struct_size = sizeof(pcb_hid_t); + batch_hid.struct_size = sizeof(rnd_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_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30970) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30971) @@ -22,7 +22,7 @@ #include "../src_plugins/lib_hid_common/clip.h" -extern pcb_hid_t gtk2_gdk_hid; +extern rnd_hid_t gtk2_gdk_hid; static void ghid_gdk_screen_update(void); /* Sets priv->u_gc to the "right" GC to use (wrt mask or window) */ @@ -58,9 +58,9 @@ } render_priv_t; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; GdkGC *pixel_gc; GdkGC *clip_gc; @@ -69,7 +69,7 @@ gint cap, join; gchar xor_mask; gint sketch_seq; -} hid_gc_s; +} rnd_hid_gc_s; static const gchar *get_color_name(pcb_gtk_color_t *color) { @@ -103,13 +103,13 @@ } -static int ghid_gdk_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int ghid_gdk_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { /* draw anything */ return 1; } -static void ghid_gdk_destroy_gc(pcb_hid_gc_t gc) +static void ghid_gdk_destroy_gc(rnd_hid_gc_t gc) { if (gc->pixel_gc) g_object_unref(gc->pixel_gc); @@ -118,11 +118,11 @@ g_free(gc); } -static pcb_hid_gc_t ghid_gdk_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t ghid_gdk_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv; + rnd_hid_gc_t rv; - rv = g_new0(hid_gc_s, 1); + rv = g_new0(rnd_hid_gc_s, 1); rv->me_pointer = >k2_gdk_hid; rv->pcolor = pcbhl_conf.appearance.color.background; return rv; @@ -374,7 +374,7 @@ priv->out_clip = priv->sketch_clip; } -static void ghid_gdk_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void ghid_gdk_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { render_priv_t *priv = ghidgui->port.render_priv; @@ -428,7 +428,7 @@ curr_drawing_mode = op; } -static void ghid_gdk_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) +static void ghid_gdk_render_burst(rnd_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_gui->coord_per_pix = ghidgui->port.view.coord_per_px; } @@ -479,7 +479,7 @@ } } -static void ghid_gdk_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void ghid_gdk_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { static GdkColormap *colormap = NULL; render_priv_t *priv = ghidgui->port.render_priv; @@ -527,7 +527,7 @@ } } -static void ghid_gdk_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void ghid_gdk_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { switch (style) { case pcb_cap_round: @@ -547,7 +547,7 @@ gdk_gc_set_line_attributes(gc->pixel_gc, Vz(gc->width), GDK_LINE_SOLID, (GdkCapStyle) gc->cap, (GdkJoinStyle) gc->join); } -static void ghid_gdk_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void ghid_gdk_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { /* If width is negative then treat it as pixel width, otherwise it is world coordinates. */ if(width < 0) { @@ -565,7 +565,7 @@ gdk_gc_set_line_attributes(gc->clip_gc, width, GDK_LINE_SOLID, (GdkCapStyle) gc->cap, (GdkJoinStyle) gc->join); } -static void ghid_gdk_set_draw_xor(pcb_hid_gc_t gc, int xor_mask) +static void ghid_gdk_set_draw_xor(rnd_hid_gc_t gc, int xor_mask) { render_priv_t *priv = ghidgui->port.render_priv; @@ -589,7 +589,7 @@ } } -static int use_gc(pcb_hid_gc_t gc, int need_pen) +static int use_gc(rnd_hid_gc_t gc, int need_pen) { render_priv_t *priv = ghidgui->port.render_priv; GdkWindow *window = gtkc_widget_get_window(ghidgui->port.top_window); @@ -632,7 +632,7 @@ return 1; } -static void ghid_gdk_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ghid_gdk_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double dx1, dy1, dx2, dy2; render_priv_t *priv = ghidgui->port.render_priv; @@ -666,7 +666,7 @@ gdk_draw_line(priv->out_clip, priv->clip_gc, dx1, dy1, dx2, dy2); } -static void ghid_gdk_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void ghid_gdk_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) { gint vrx2, vry2; double w, h, radius; @@ -717,7 +717,7 @@ (start_angle + 180) * 64, delta_angle * 64); } -static void ghid_gdk_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ghid_gdk_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { gint w, h, lw, sx1, sy1; render_priv_t *priv = ghidgui->port.render_priv; @@ -770,7 +770,7 @@ } -static void ghid_gdk_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void ghid_gdk_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { gint w, h, vr; render_priv_t *priv = ghidgui->port.render_priv; @@ -848,7 +848,7 @@ } /* Intentional code duplication for performance */ -static void ghid_gdk_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void ghid_gdk_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { rnd_rnd_box_t b; static GdkPoint *points = 0; @@ -908,7 +908,7 @@ } /* Intentional code duplication for performance */ -static void ghid_gdk_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void ghid_gdk_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { rnd_rnd_box_t b; static GdkPoint *points = 0; @@ -966,7 +966,7 @@ gdk_draw_polygon(priv->out_clip, priv->clip_gc, 1, points, len); } -static void ghid_gdk_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ghid_gdk_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { gint w, h, lw, xx, yy, sx1, sy1; render_priv_t *priv = ghidgui->port.render_priv; @@ -1019,7 +1019,7 @@ static void redraw_region(rnd_hidlib_t *hidlib, GdkRectangle *rect) { int eleft, eright, etop, ebottom; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; render_priv_t *priv = ghidgui->port.render_priv; if (!priv->base_pixel) @@ -1105,7 +1105,7 @@ } static int preview_lock = 0; -static void ghid_gdk_invalidate_lr(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) +static void ghid_gdk_invalidate_lr(rnd_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { rnd_hidlib_t *hidlib = ghidgui->hidlib; int dleft, dright, dtop, dbottom; @@ -1138,7 +1138,7 @@ } -static void ghid_gdk_invalidate_all(pcb_hid_t *hid) +static void ghid_gdk_invalidate_all(rnd_hid_t *hid) { rnd_hidlib_t *hidlib = ghidgui->hidlib; if (ghidgui && ghidgui->topwin.menu.menu_bar) { @@ -1152,7 +1152,7 @@ } } -static void ghid_gdk_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void ghid_gdk_notify_crosshair_change(rnd_hid_t *hid, rnd_bool changes_complete) { rnd_hidlib_t *hidlib = ghidgui->hidlib; render_priv_t *priv = ghidgui->port.render_priv; @@ -1187,7 +1187,7 @@ } } -static void ghid_gdk_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void ghid_gdk_notify_mark_change(rnd_hid_t *hid, rnd_bool changes_complete) { rnd_hidlib_t *hidlib = ghidgui->hidlib; render_priv_t *priv = ghidgui->port.render_priv; @@ -1441,7 +1441,7 @@ { } -static gboolean ghid_gdk_preview_expose(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, pcb_hid_expose_ctx_t *ctx) +static gboolean ghid_gdk_preview_expose(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, rnd_hid_expose_ctx_t *ctx) { GdkWindow *window = gtkc_widget_get_window(widget); GdkDrawable *save_drawable; @@ -1510,7 +1510,7 @@ } -void ghid_gdk_install(pcb_gtk_impl_t *impl, pcb_hid_t *hid) +void ghid_gdk_install(pcb_gtk_impl_t *impl, rnd_hid_t *hid) { if (impl != NULL) { impl->new_drawing_widget = ghid_gdk_new_drawing_widget; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-main.c (revision 30970) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-main.c (revision 30971) @@ -10,11 +10,11 @@ const char *ghid_cookie = "gtk2 hid, gdk"; -pcb_hid_t gtk2_gdk_hid; +rnd_hid_t gtk2_gdk_hid; -extern void ghid_gdk_install(pcb_gtk_impl_t *impl, pcb_hid_t *hid); +extern void ghid_gdk_install(pcb_gtk_impl_t *impl, rnd_hid_t *hid); -int gtk2_gdk_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +int gtk2_gdk_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { ghid_glue_common_init(ghid_cookie); ghid_gdk_install(&ghidgui->impl, hid); Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30970) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30971) @@ -27,9 +27,9 @@ #include "../src_plugins/lib_gtk_common/hid_gtk_conf.h" #define Z_NEAR 3.0 -extern pcb_hid_t gtk2_gl_hid; +extern rnd_hid_t gtk2_gl_hid; -static pcb_hid_gc_t current_gc = NULL; +static rnd_hid_gc_t current_gc = NULL; /* Sets ghidgui->port.u_gc to the "right" GC to use (wrt mask or window) */ #define USE_GC(gc) if (!use_gc(gc)) return @@ -53,16 +53,16 @@ } render_priv_t; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; const rnd_color_t *pcolor; double alpha_mult; rnd_coord_t width; -} hid_gc_s; +} rnd_hid_gc_s; -void ghid_gl_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) +void ghid_gl_render_burst(rnd_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_gui->coord_per_pix = ghidgui->port.view.coord_per_px; } @@ -135,7 +135,7 @@ } #endif -int ghid_gl_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +int ghid_gl_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { rnd_hidlib_t *hidlib = ghidgui->hidlib; render_priv_t *priv = ghidgui->port.render_priv; @@ -158,22 +158,22 @@ return 1; } -static void ghid_gl_end_layer(pcb_hid_t *hid) +static void ghid_gl_end_layer(rnd_hid_t *hid) { drawgl_flush(); drawgl_reset(); } -void ghid_gl_destroy_gc(pcb_hid_gc_t gc) +void ghid_gl_destroy_gc(rnd_hid_gc_t gc) { g_free(gc); } -pcb_hid_gc_t ghid_gl_make_gc(pcb_hid_t *hid) +rnd_hid_gc_t ghid_gl_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv; + rnd_hid_gc_t rv; - rv = g_new0(hid_gc_s, 1); + rv = g_new0(rnd_hid_gc_s, 1); rv->me_pointer = >k2_gl_hid; rv->pcolor = &pcbhl_conf.appearance.color.background; rv->alpha_mult = 1.0; @@ -286,7 +286,7 @@ double blue; } pcb_gtk_color_cache_t; -static void set_gl_color_for_gc(pcb_hid_gc_t gc) +static void set_gl_color_for_gc(rnd_hid_gc_t gc) { render_priv_t *priv = ghidgui->port.render_priv; static GdkColormap *colormap = NULL; @@ -385,7 +385,7 @@ drawgl_set_colour(r, g, b, a); } -void ghid_gl_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +void ghid_gl_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { if (color == NULL) { fprintf(stderr, "ghid_gl_set_color(): name = NULL, setting to magenta\n"); @@ -396,23 +396,23 @@ set_gl_color_for_gc(gc); } -void ghid_gl_set_alpha_mult(pcb_hid_gc_t gc, double alpha_mult) +void ghid_gl_set_alpha_mult(rnd_hid_gc_t gc, double alpha_mult) { gc->alpha_mult = alpha_mult; set_gl_color_for_gc(gc); } -void ghid_gl_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +void ghid_gl_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { } -void ghid_gl_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +void ghid_gl_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width < 0 ? (-width) * ghidgui->port.view.coord_per_px : width; } -void ghid_gl_set_draw_xor(pcb_hid_gc_t gc, int xor) +void ghid_gl_set_draw_xor(rnd_hid_gc_t gc, int xor) { /* NOT IMPLEMENTED */ @@ -420,12 +420,12 @@ We manage our own drawing model for that anyway. */ } -void ghid_gl_set_draw_faded(pcb_hid_gc_t gc, int faded) +void ghid_gl_set_draw_faded(rnd_hid_gc_t gc, int faded) { printf("ghid_gl_set_draw_faded(%p,%d) -- not implemented\n", (void *)gc, faded); } -void ghid_gl_set_line_cap_angle(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +void ghid_gl_set_line_cap_angle(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { printf("ghid_gl_set_line_cap_angle() -- not implemented\n"); } @@ -435,7 +435,7 @@ current_gc = NULL; } -static int use_gc(pcb_hid_gc_t gc) +static int use_gc(rnd_hid_gc_t gc) { if (gc->me_pointer != >k2_gl_hid) { fprintf(stderr, "Fatal: GC from another HID passed to GTK HID\n"); @@ -452,7 +452,7 @@ } -static void ghid_gl_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ghid_gl_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { USE_GC(gc); @@ -459,7 +459,7 @@ hidgl_draw_line(gc->core_gc.cap, gc->width, x1, y1, x2, y2, ghidgui->port.view.coord_per_px); } -static void ghid_gl_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void ghid_gl_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) { USE_GC(gc); @@ -466,7 +466,7 @@ hidgl_draw_arc(gc->width, cx, cy, xradius, yradius, start_angle, delta_angle, ghidgui->port.view.coord_per_px); } -static void ghid_gl_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ghid_gl_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { USE_GC(gc); @@ -474,7 +474,7 @@ } -static void ghid_gl_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void ghid_gl_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { USE_GC(gc); @@ -482,7 +482,7 @@ } -static void ghid_gl_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void ghid_gl_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { USE_GC(gc); @@ -489,7 +489,7 @@ hidgl_fill_polygon(n_coords, x, y); } -static void ghid_gl_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void ghid_gl_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { USE_GC(gc); @@ -496,7 +496,7 @@ hidgl_fill_polygon_offs(n_coords, x, y, dx, dy); } -static void ghid_gl_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void ghid_gl_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { USE_GC(gc); @@ -505,7 +505,7 @@ static int preview_lock = 0; -void ghid_gl_invalidate_all(pcb_hid_t *hid) +void ghid_gl_invalidate_all(rnd_hid_t *hid) { if (ghidgui && ghidgui->topwin.menu.menu_bar) { ghid_draw_area_update(&ghidgui->port, NULL); @@ -517,7 +517,7 @@ } } -void ghid_gl_invalidate_lr(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) +void ghid_gl_invalidate_lr(rnd_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { ghid_gl_invalidate_all(hid); if (!preview_lock) { @@ -527,7 +527,7 @@ } } -static void ghid_gl_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void ghid_gl_notify_crosshair_change(rnd_hid_t *hid, rnd_bool changes_complete) { /* We sometimes get called before the GUI is up */ if (ghidgui->port.drawing_area == NULL) @@ -537,7 +537,7 @@ ghid_gl_invalidate_all(hid); } -static void ghid_gl_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void ghid_gl_notify_mark_change(rnd_hid_t *hid, rnd_bool changes_complete) { /* We sometimes get called before the GUI is up */ if (ghidgui->port.drawing_area == NULL) @@ -720,7 +720,7 @@ /* Settles background color + inital GL configuration, to allow further drawing in GL area. (w, h) describes the total area concerned, while (xr, yr, wr, hr) describes area requested by an expose event. The color structure holds the wanted solid back-ground color, used to first paint the exposed drawing area. */ -static void pcb_gl_draw_expose_init(pcb_hid_t *hid, int w, int h, int xr, int yr, int wr, int hr, rnd_color_t *bg_c) +static void pcb_gl_draw_expose_init(rnd_hid_t *hid, int w, int h, int xr, int yr, int wr, int hr, rnd_color_t *bg_c) { hidgl_init(); @@ -755,7 +755,7 @@ rnd_hidlib_t *hidlib = ghidgui->hidlib; render_priv_t *priv = port->render_priv; GtkAllocation allocation; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; gtkc_widget_get_allocation(widget, &allocation); @@ -823,7 +823,7 @@ return; } -static gboolean ghid_gl_preview_expose(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, pcb_hid_expose_ctx_t *ctx) +static gboolean ghid_gl_preview_expose(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, rnd_hid_expose_ctx_t *ctx) { GdkGLContext *pGlContext = gtk_widget_get_gl_context(widget); GdkGLDrawable *pGlDrawable = gtk_widget_get_gl_drawable(widget); @@ -936,7 +936,7 @@ } -void ghid_gl_install(pcb_gtk_impl_t *impl, pcb_hid_t *hid) +void ghid_gl_install(pcb_gtk_impl_t *impl, rnd_hid_t *hid) { if (impl != NULL) { Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c (revision 30970) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-main.c (revision 30971) @@ -13,11 +13,11 @@ const char *ghid_gl_cookie = "gtk2 hid, gl"; -pcb_hid_t gtk2_gl_hid; +rnd_hid_t gtk2_gl_hid; -extern void ghid_gl_install(pcb_gtk_impl_t *impl, pcb_hid_t *hid); +extern void ghid_gl_install(pcb_gtk_impl_t *impl, rnd_hid_t *hid); -int gtk2_gl_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +int gtk2_gl_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { ghid_glue_common_init(ghid_gl_cookie); ghid_gl_install(&ghidgui->impl, hid); Index: trunk/src_plugins/hid_lesstif/dialogs.c =================================================================== --- trunk/src_plugins/hid_lesstif/dialogs.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/dialogs.c (revision 30971) @@ -177,13 +177,13 @@ typedef struct { void *caller_data; /* WARNING: for now, this must be the first field (see core spinbox enter_cb) */ - pcb_hid_attribute_t *attrs; + rnd_hid_attribute_t *attrs; int n_attrs; Widget *wl; /* content widget */ Widget *wltop;/* the parent widget, which is different from wl if reparenting (extra boxes, e.g. for framing or scrolling) was needed */ Widget **btn; /* enum value buttons */ Widget dialog; - pcb_hid_attr_val_t property[PCB_HATP_max]; + rnd_hid_attr_val_t property[PCB_HATP_max]; Dimension minw, minh; void (*close_cb)(void *caller_data, pcb_hid_attr_ev_t ev); char *id; @@ -484,7 +484,7 @@ } -static int attribute_dialog_set(lesstif_attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int attribute_dialog_set(lesstif_attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { int save, n, copied = 0; @@ -632,7 +632,7 @@ XtUnmanageChild(ctx->wltop[n]); } -void *lesstif_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +void *lesstif_attr_dlg_new(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { Widget topform, main_tbl; lesstif_attr_dlg_t *ctx; @@ -707,7 +707,7 @@ return ctx; } -void *lesstif_attr_sub_new(Widget parent_box, pcb_hid_attribute_t *attrs, int n_attrs, void *caller_data) +void *lesstif_attr_sub_new(Widget parent_box, rnd_hid_attribute_t *attrs, int n_attrs, void *caller_data) { lesstif_attr_dlg_t *ctx; @@ -767,7 +767,7 @@ free(ctx); } -void lesstif_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val) +void lesstif_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val) { lesstif_attr_dlg_t *ctx = hid_ctx; if ((prop >= 0) && (prop < PCB_HATP_max)) @@ -821,7 +821,7 @@ return 0; } -int lesstif_attr_dlg_set_value(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val) +int lesstif_attr_dlg_set_value(void *hid_ctx, int idx, const rnd_hid_attr_val_t *val) { lesstif_attr_dlg_t *ctx = hid_ctx; @@ -1091,7 +1091,7 @@ lesstif_attributes_revert(); } -void lesstif_attributes_dialog(pcb_hid_t *hid, const char *owner, rnd_attribute_list_t * attrs_list) +void lesstif_attributes_dialog(rnd_hid_t *hid, const char *owner, rnd_attribute_list_t * attrs_list) { Widget bform, sw, b_ok, b_cancel, b_revert, b_new; Widget sep; Index: trunk/src_plugins/hid_lesstif/dlg_attr_box.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_box.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/dlg_attr_box.c (revision 30971) @@ -162,7 +162,7 @@ XtVaSetValues(tabbed, XmNuserData, NULL, NULL); } -static int ltf_tabbed_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr, int i) +static int ltf_tabbed_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr, int i) { Widget wtop, wtab, wframe, t; int res, add_top = 0, numtabs; Index: trunk/src_plugins/hid_lesstif/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/dlg_attr_misc.c (revision 30971) @@ -74,10 +74,10 @@ /* called back from core (which is called from wt_preview) to get the user expose function called */ -static void ltf_preview_expose(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void ltf_preview_expose(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pcb_ltf_preview_t *pd = e->draw_data; - pcb_hid_attribute_t *attr = pd->attr; + rnd_hid_attribute_t *attr = pd->attr; pcb_hid_preview_t *prv = attr->wdata; prv->user_expose_cb(attr, prv, gc, e); } @@ -94,7 +94,7 @@ pcb_ltf_preview_redraw(pd); } -static void ltf_preview_zoomto(pcb_hid_attribute_t *attr, void *hid_ctx, const rnd_rnd_box_t *view) +static void ltf_preview_zoomto(rnd_hid_attribute_t *attr, void *hid_ctx, const rnd_rnd_box_t *view) { pcb_hid_preview_t *prv = attr->wdata; pcb_ltf_preview_t *pd = prv->hid_wdata; @@ -111,7 +111,7 @@ static void ltf_preview_motion_callback(Widget w, XtPointer pd_, XEvent *e, Boolean *ctd) { pcb_ltf_preview_t *pd = pd_; - pcb_hid_attribute_t *attr = pd->attr; + rnd_hid_attribute_t *attr = pd->attr; pcb_hid_preview_t *prv = attr->wdata; rnd_coord_t x, y; Window root, child; @@ -131,7 +131,7 @@ static void ltf_preview_input_callback(Widget w, XtPointer pd_, XmDrawingAreaCallbackStruct *cbs) { pcb_ltf_preview_t *pd = pd_; - pcb_hid_attribute_t *attr = pd->attr; + rnd_hid_attribute_t *attr = pd->attr; pcb_hid_preview_t *prv = attr->wdata; rnd_coord_t x, y; pcb_hid_mouse_ev_t kind = -1; @@ -162,7 +162,7 @@ pcb_ltf_preview_del(pd); } -static Widget ltf_preview_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr) +static Widget ltf_preview_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr) { Widget pw; pcb_ltf_preview_t *pd; @@ -218,7 +218,7 @@ } -static Widget ltf_picture_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr) +static Widget ltf_picture_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr) { Widget pic = pcb_ltf_xpm_label(display, parent, XmStrCast("dad_picture"), attr->wdata); XtManageChild(pic); @@ -225,7 +225,7 @@ return pic; } -static Widget ltf_picbutton_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr) +static Widget ltf_picbutton_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr) { Widget pic = pcb_ltf_xpm_button(display, parent, XmStrCast("dad_picture"), attr->wdata); XtManageChild(pic); @@ -281,7 +281,7 @@ } -static Widget ltf_colorbtn_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr, int readonly) +static Widget ltf_colorbtn_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr, int readonly) { Widget pic = pcb_ltf_color_button(display, parent, XmStrCast("dad_picture"), &attr->val.clr); if (!readonly) @@ -295,7 +295,7 @@ valchg(w, w, NULL); } -static long ltf_text_get_offs(pcb_hid_attribute_t *attrib, void *hid_ctx) +static long ltf_text_get_offs(rnd_hid_attribute_t *attrib, void *hid_ctx) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -308,7 +308,7 @@ return pos; } -void ltf_text_set_offs(pcb_hid_attribute_t *attrib, void *hid_ctx, long offs) +void ltf_text_set_offs(rnd_hid_attribute_t *attrib, void *hid_ctx, long offs) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -337,7 +337,7 @@ } } -static void ltf_text_set_text(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *txt) +static void ltf_text_set_text(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *txt) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -369,7 +369,7 @@ } -static char *ltf_text_get_text_(pcb_hid_attribute_t *attrib, void *hid_ctx) +static char *ltf_text_get_text_(rnd_hid_attribute_t *attrib, void *hid_ctx) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -377,7 +377,7 @@ return XmTextGetString(wtxt); } -char *ltf_text_get_text(pcb_hid_attribute_t *attrib, void *hid_ctx) +char *ltf_text_get_text(rnd_hid_attribute_t *attrib, void *hid_ctx) { char *orig = ltf_text_get_text_(attrib, hid_ctx); char *s = rnd_strdup(orig); @@ -385,7 +385,7 @@ return s; } -static void ltf_text_get_xy(pcb_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y) +static void ltf_text_get_xy(rnd_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y) { char *orig, *s = ltf_text_get_text_(attrib, hid_ctx); long to, n, lines = 0, cols = 0; @@ -411,7 +411,7 @@ *y = lines; } -void ltf_text_set_xy(pcb_hid_attribute_t *attrib, void *hid_ctx, long x, long y) +void ltf_text_set_xy(rnd_hid_attribute_t *attrib, void *hid_ctx, long x, long y) { char *orig, *s = ltf_text_get_text_(attrib, hid_ctx); long offs; @@ -438,7 +438,7 @@ XtFree(orig); } -void ltf_text_set_readonly(pcb_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly) +void ltf_text_set_readonly(rnd_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -449,7 +449,7 @@ XtSetValues(wtxt, stdarg_args, stdarg_n); } -static void ltf_text_scroll_to_bottom(pcb_hid_attribute_t *attrib, void *hid_ctx) +static void ltf_text_scroll_to_bottom(rnd_hid_attribute_t *attrib, void *hid_ctx) { lesstif_attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -473,7 +473,7 @@ free(buf); } -static Widget ltf_text_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr) +static Widget ltf_text_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr) { Widget wtxt; pcb_hid_text_t *txt = attr->wdata; Index: trunk/src_plugins/hid_lesstif/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_attr_tree.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/dlg_attr_tree.c (revision 30971) @@ -4,7 +4,7 @@ typedef struct { lesstif_attr_dlg_t *ctx; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; gdl_list_t model; Widget w; pcb_hid_tree_t *ht; @@ -94,7 +94,7 @@ extern void xm_extent_prediction(XmTreeTableWidget w); -static void ltf_tree_insert_cb(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *new_row) +static void ltf_tree_insert_cb(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *new_row) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -104,7 +104,7 @@ REDRAW(); } -static void ltf_tree_modify_cb(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int col) +static void ltf_tree_modify_cb(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int col) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -127,7 +127,7 @@ ht->user_selected_cb(lt->attr, lt->ctx, c_row); } -static void ltf_tree_remove_cb(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row) +static void ltf_tree_remove_cb(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -148,7 +148,7 @@ cursor_changed(lt); } -static void ltf_tree_free_cb(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row) +static void ltf_tree_free_cb(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -164,7 +164,7 @@ ht->hid_wdata = NULL; } -static pcb_hid_row_t *ltf_tree_get_selected_cb(pcb_hid_attribute_t *attrib, void *hid_wdata) +static pcb_hid_row_t *ltf_tree_get_selected_cb(rnd_hid_attribute_t *attrib, void *hid_wdata) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -229,7 +229,7 @@ cursor_changed(lt); } -static void ltf_tree_jumpto_cb(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row) +static void ltf_tree_jumpto_cb(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -271,7 +271,7 @@ static void ltf_tree_set(lesstif_attr_dlg_t *ctx, int idx, const char *val) { - pcb_hid_attribute_t *attr = &ctx->attrs[idx]; + rnd_hid_attribute_t *attr = &ctx->attrs[idx]; pcb_hid_tree_t *ht = attr->wdata; ltf_tree_t *lt = ht->hid_wdata; pcb_hid_row_t *r, *row; @@ -307,7 +307,7 @@ ltf_tt_jumpto(lt, row->hid_data, 1); /* implies a REDRAW() */ } -static void ltf_tree_expcoll_cb(pcb_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int expanded) +static void ltf_tree_expcoll_cb(rnd_hid_attribute_t *attrib, void *hid_wdata, pcb_hid_row_t *row, int expanded) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -315,7 +315,7 @@ REDRAW(); } -static void ltf_tree_update_hide_cb(pcb_hid_attribute_t *attrib, void *hid_wdata) +static void ltf_tree_update_hide_cb(rnd_hid_attribute_t *attrib, void *hid_wdata) { pcb_hid_tree_t *ht = attrib->wdata; ltf_tree_t *lt = ht->hid_wdata; @@ -397,7 +397,7 @@ } } -static Widget ltf_tree_create_(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr) +static Widget ltf_tree_create_(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr) { pcb_hid_tree_t *ht = attr->wdata; ltf_tree_t *lt = calloc(sizeof(ltf_tree_t), 1); @@ -433,7 +433,7 @@ return table; } -static Widget ltf_tree_create(lesstif_attr_dlg_t *ctx, Widget parent, pcb_hid_attribute_t *attr) +static Widget ltf_tree_create(lesstif_attr_dlg_t *ctx, Widget parent, rnd_hid_attribute_t *attr) { Widget w; Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.c =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.c (revision 30971) @@ -101,7 +101,7 @@ XmStringFree(xms_path); } -static int pcb_ltf_fsd_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) +static int pcb_ltf_fsd_poke(rnd_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { pcb_ltf_fsd_t *pctx = sub->parent_ctx; @@ -127,7 +127,7 @@ return -1; } -char *pcb_ltf_fileselect(pcb_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) +char *pcb_ltf_fileselect(rnd_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub) { XmString xms_ext = NULL, xms_load = NULL; pcb_ltf_fsd_t pctx; Index: trunk/src_plugins/hid_lesstif/dlg_fileselect.h =================================================================== --- trunk/src_plugins/hid_lesstif/dlg_fileselect.h (revision 30970) +++ trunk/src_plugins/hid_lesstif/dlg_fileselect.h (revision 30971) @@ -1,2 +1,2 @@ #include -char *pcb_ltf_fileselect(pcb_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); +char *pcb_ltf_fileselect(rnd_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub); Index: trunk/src_plugins/hid_lesstif/lesstif.h =================================================================== --- trunk/src_plugins/hid_lesstif/lesstif.h (revision 30970) +++ trunk/src_plugins/hid_lesstif/lesstif.h (revision 30971) @@ -40,10 +40,10 @@ extern void lesstif_need_idle_proc(void); extern void lesstif_show_crosshair(int); -extern void lesstif_invalidate_all(pcb_hid_t *hid); +extern void lesstif_invalidate_all(rnd_hid_t *hid); extern void lesstif_coords_to_pcb(int, int, rnd_coord_t *, rnd_coord_t *); extern void lesstif_get_xy(const char *msg); -extern void lesstif_update_widget_flags(pcb_hid_t *hid, const char *cookie); +extern void lesstif_update_widget_flags(rnd_hid_t *hid, const char *cookie); extern int lesstif_call_action(const char *, int, char **); extern void lesstif_pan_fixup(void); extern void lesstif_show_library(void); @@ -51,9 +51,9 @@ extern Pixel lesstif_parse_color(const rnd_color_t *value); extern void lesstif_update_layer_groups(); extern void lesstif_update_status_line(); -extern void lesstif_attributes_dialog(pcb_hid_t *hid, const char *, rnd_attribute_list_t *); -void *lesstif_attr_sub_new(Widget parent_box, pcb_hid_attribute_t *attrs, int n_attrs, void *caller_data); -char *pcb_ltf_fileselect(pcb_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); +extern void lesstif_attributes_dialog(rnd_hid_t *hid, const char *, rnd_attribute_list_t *); +void *lesstif_attr_sub_new(Widget parent_box, rnd_hid_attribute_t *attrs, int n_attrs, void *caller_data); +char *pcb_ltf_fileselect(rnd_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub); rnd_hidlib_t *ltf_attr_get_dad_hidlib(void *hid_ctx); extern int pcb_ltf_ok; Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30971) @@ -80,9 +80,9 @@ #define MAX_ZOOM_SCALE 10 #define UUNIT pcbhl_conf.editor.grid_unit->allow -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; - pcb_hid_t *me_pointer; + rnd_hid_t *me_pointer; Pixel color; rnd_color_t pcolor; int width; @@ -89,9 +89,9 @@ pcb_cap_style_t cap; char xor_set; char erase; -} hid_gc_s; +} rnd_hid_gc_s; -pcb_hid_t lesstif_hid; +rnd_hid_t lesstif_hid; #define CRASH(func) fprintf(stderr, "HID error: pcb called unimplemented GUI function %s\n", func), abort() @@ -175,12 +175,12 @@ return ltf_dockbox[where]; } -static int ltf_dock_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) +static int ltf_dock_poke(rnd_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { return -1; } -static int ltf_dock_enter(pcb_hid_t *hid, pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) +static int ltf_dock_enter(rnd_hid_t *hid, rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) { docked_t *docked; Widget hvbox; @@ -247,7 +247,7 @@ static int stdin_listen = 0; static char *background_image_file = 0; -pcb_export_opt_t lesstif_attribute_list[] = { +rnd_export_opt_t lesstif_attribute_list[] = { {"install", "Install private colormap", PCB_HATT_BOOL, 0, 0, {0, 0, 0}, 0, &use_private_colormap}, #define HA_colormap 0 @@ -286,7 +286,7 @@ static void zoom_max(); static void zoom_to(double factor, rnd_coord_t x, rnd_coord_t y); -static void zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch); +static void zoom_win(rnd_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch); static void zoom_by(double factor, rnd_coord_t x, rnd_coord_t y); static void Pan(int mode, rnd_coord_t x, rnd_coord_t y); @@ -367,7 +367,7 @@ } /* Called from the core when it's busy doing something and we need to indicate that to the user. */ -static void ltf_busy(pcb_hid_t *hid, rnd_bool busy) +static void ltf_busy(rnd_hid_t *hid, rnd_bool busy) { static Cursor busy_cursor = 0; if (!lesstif_active) @@ -389,7 +389,7 @@ /* Local actions. */ -static void PointCursor(pcb_hid_t *hid, rnd_bool grabbed) +static void PointCursor(rnd_hid_t *hid, rnd_bool grabbed) { if (grabbed > 0) over_point = 1; @@ -402,7 +402,7 @@ extern void LesstifLibraryChanged(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]); -static void ltf_set_hidlib(pcb_hid_t *hid, rnd_hidlib_t *hidlib) +static void ltf_set_hidlib(rnd_hid_t *hid, rnd_hidlib_t *hidlib) { ltf_hidlib = hidlib; if ((work_area == 0) || (hidlib == NULL)) @@ -544,7 +544,7 @@ } -static const char *lesstif_command_entry(pcb_hid_t *hid, const char *ovr, int *cursor) +static const char *lesstif_command_entry(rnd_hid_t *hid, const char *ovr, int *cursor) { if (!cmd_is_active) { if (cursor != NULL) @@ -569,11 +569,11 @@ return XmTextGetString(m_cmd); } -static double ltf_benchmark(pcb_hid_t *hid) +static double ltf_benchmark(rnd_hid_t *hid) { int i = 0; time_t start, end; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; Drawable save_main; @@ -606,7 +606,7 @@ */ typedef struct { - const pcb_pixmap_t *pxm; + const rnd_pixmap_t *pxm; /* cache */ int w_scaled, h_scaled; @@ -772,7 +772,7 @@ } } -static void pcb_ltf_draw_pixmap(pcb_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, pcb_pixmap_t *pixmap) +static void pcb_ltf_draw_pixmap(rnd_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, rnd_pixmap_t *pixmap) { if (pixmap->hid_data == NULL) { pcb_ltf_pixmap_t *lpm = calloc(sizeof(pcb_ltf_pixmap_t), 1); @@ -784,7 +784,7 @@ } -static pcb_pixmap_t ltf_bg_img; +static rnd_pixmap_t ltf_bg_img; static void DrawBackgroundImage() { static pcb_ltf_pixmap_t lpm; @@ -805,10 +805,10 @@ /* ---------------------------------------------------------------------- */ -static pcb_export_opt_t *lesstif_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *lesstif_get_export_options(rnd_hid_t *hid, int *n) { if (n != NULL) - *n = sizeof(lesstif_attribute_list) / sizeof(pcb_export_opt_t); + *n = sizeof(lesstif_attribute_list) / sizeof(rnd_export_opt_t); return lesstif_attribute_list; } @@ -903,7 +903,7 @@ lesstif_pan_fixup(); } -static void zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch) +static void zoom_win(rnd_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, int setch) { rnd_coord_t w = x2 - x1, h = y2 - y1; double new_zoom = w / view_width; @@ -1396,7 +1396,7 @@ #include "mouse.c" -static void lesstif_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void lesstif_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { Dimension width, height; Widget menu; @@ -1558,12 +1558,12 @@ lesstif_end(); } -static void lesstif_do_exit(pcb_hid_t *hid) +static void lesstif_do_exit(rnd_hid_t *hid) { XtAppSetExitFlag(app_context); } -static void lesstif_uninit(pcb_hid_t *hid) +static void lesstif_uninit(rnd_hid_t *hid) { if (lesstif_hid_inited) { lesstif_uninit_menu(); @@ -1572,7 +1572,7 @@ } } -static void lesstif_iterate(pcb_hid_t *hid) +static void lesstif_iterate(rnd_hid_t *hid) { while (XtAppPending(app_context)) XtAppProcessEvent(app_context, XtIMAll); @@ -1643,7 +1643,7 @@ longjmp(lesstif_err_jmp, 1); } -static int lesstif_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int lesstif_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { Atom close_atom; pcb_hid_attr_node_t *ha; @@ -1662,7 +1662,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - pcb_export_opt_t *a = ha->opts + i; + rnd_export_opt_t *a = ha->opts + i; switch (a->type) { case PCB_HATT_INTEGER: case PCB_HATT_COORD: @@ -1698,7 +1698,7 @@ for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - pcb_export_opt_t *a = ha->opts + i; + rnd_export_opt_t *a = ha->opts + i; XrmOptionDescRec *o = new_options + acount; char *tmpopt, *tmpres; XtResource *r = new_resources + rcount; @@ -1814,7 +1814,7 @@ rcount = 0; for (ha = hid_attr_nodes; ha; ha = ha->next) for (i = 0; i < ha->n; i++) { - pcb_export_opt_t *a = ha->opts + i; + rnd_export_opt_t *a = ha->opts + i; val_union *v = new_values + rcount; switch (a->type) { case PCB_HATT_INTEGER: @@ -1950,7 +1950,7 @@ { if (need_redraw) { int mx, my; - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; pixmap = main_pixmap; mx = view_width; @@ -2077,7 +2077,7 @@ idle_proc_set = 1; } -static void lesstif_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) +static void lesstif_invalidate_lr(rnd_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { if (!window) return; @@ -2086,13 +2086,13 @@ need_idle_proc(); } -void lesstif_invalidate_all(pcb_hid_t *hid) +void lesstif_invalidate_all(rnd_hid_t *hid) { if (ltf_hidlib != NULL) lesstif_invalidate_lr(hid, 0, ltf_hidlib->size_x, 0, ltf_hidlib->size_y); } -static void lesstif_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void lesstif_notify_crosshair_change(rnd_hid_t *hid, rnd_bool changes_complete) { static int invalidate_depth = 0; Pixmap save_pixmap; @@ -2126,7 +2126,7 @@ invalidate_depth++; } -static void lesstif_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void lesstif_notify_mark_change(rnd_hid_t *hid, rnd_bool changes_complete) { static int invalidate_depth = 0; Pixmap save_pixmap; @@ -2156,31 +2156,31 @@ invalidate_depth++; } -static int lesstif_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int lesstif_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { /* accept anything and draw */ return 1; } -static pcb_hid_gc_t lesstif_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t lesstif_make_gc(rnd_hid_t *hid) { - pcb_hid_gc_t rv = (hid_gc_s *) malloc(sizeof(hid_gc_s)); - memset(rv, 0, sizeof(hid_gc_s)); + rnd_hid_gc_t rv = (rnd_hid_gc_s *) malloc(sizeof(rnd_hid_gc_s)); + memset(rv, 0, sizeof(rnd_hid_gc_s)); rv->me_pointer = &lesstif_hid; return rv; } -static void lesstif_destroy_gc(pcb_hid_gc_t gc) +static void lesstif_destroy_gc(rnd_hid_gc_t gc) { free(gc); } -static void lesstif_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) +static void lesstif_render_burst(rnd_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_gui->coord_per_pix = view_zoom; } -static void lesstif_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void lesstif_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { lesstif_drawing_mode = op; @@ -2241,7 +2241,7 @@ Pixel pix; } ltf_color_cache_t; -static void lesstif_set_color(pcb_hid_gc_t gc, const rnd_color_t *pcolor) +static void lesstif_set_color(rnd_hid_gc_t gc, const rnd_color_t *pcolor) { ltf_color_cache_t *cc; @@ -2293,7 +2293,7 @@ } } -static void set_gc(pcb_hid_gc_t gc) +static void set_gc(rnd_hid_gc_t gc) { int cap, join, width; if (gc->me_pointer != &lesstif_hid) { @@ -2338,17 +2338,17 @@ } } -static void lesstif_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void lesstif_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { gc->cap = style; } -static void lesstif_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void lesstif_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { gc->width = width; } -static void lesstif_set_draw_xor(pcb_hid_gc_t gc, int xor_set) +static void lesstif_set_draw_xor(rnd_hid_gc_t gc, int xor_set) { gc->xor_set = xor_set; } @@ -2355,7 +2355,7 @@ #define ISORT(a,b) if (a>b) { a^=b; b^=a; a^=b; } -static void lesstif_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void lesstif_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { double dx1, dy1, dx2, dy2; int vw = Vw(gc->width); @@ -2395,7 +2395,7 @@ } } -static void lesstif_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void lesstif_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { if (conf_core.editor.thin_draw && gc->erase) return; @@ -2432,7 +2432,7 @@ XDrawArc(display, mask_bitmap, mask_gc, cx, cy, width * 2, height * 2, (start_angle + 180) * 64, delta_angle * 64); } -static void lesstif_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void lesstif_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int vw = Vw(gc->width); if (conf_core.editor.thin_draw && gc->erase) @@ -2465,7 +2465,7 @@ XDrawRectangle(display, mask_bitmap, mask_gc, x1, y1, x2 - x1 + 1, y2 - y1 + 1); } -static void lesstif_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void lesstif_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { if ((conf_core.editor.thin_draw || conf_core.editor.thin_draw_poly) && gc->erase) return; @@ -2489,7 +2489,7 @@ } /* Intentaional code duplication for performance */ -static void lesstif_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) +static void lesstif_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { static XPoint *p = 0; static int maxp = 0; @@ -2517,7 +2517,7 @@ } /* Intentaional code duplication for performance */ -static void lesstif_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void lesstif_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { static XPoint *p = 0; static int maxp = 0; @@ -2542,7 +2542,7 @@ XFillPolygon(display, mask_bitmap, mask_gc, p, n_coords, Complex, CoordModeOrigin); } -static void lesstif_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void lesstif_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int vw = Vw(gc->width); if (conf_core.editor.thin_draw && gc->erase) @@ -2575,29 +2575,29 @@ XFillRectangle(display, mask_bitmap, mask_gc, x1, y1, x2 - x1 + 1, y2 - y1 + 1); } -static void lesstif_calibrate(pcb_hid_t *hid, double xval, double yval) +static void lesstif_calibrate(rnd_hid_t *hid, double xval, double yval) { CRASH("lesstif_calibrate"); } -static int lesstif_shift_is_pressed(pcb_hid_t *hid) +static int lesstif_shift_is_pressed(rnd_hid_t *hid) { return shift_pressed; } -static int lesstif_control_is_pressed(pcb_hid_t *hid) +static int lesstif_control_is_pressed(rnd_hid_t *hid) { return ctrl_pressed; } -static int lesstif_mod1_is_pressed(pcb_hid_t *hid) +static int lesstif_mod1_is_pressed(rnd_hid_t *hid) { return alt_pressed; } -extern void lesstif_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); +extern void lesstif_get_coords(rnd_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force); -static void lesstif_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void lesstif_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { if (crosshair_x != x || crosshair_y != y) { lesstif_show_crosshair(0); @@ -2652,7 +2652,7 @@ free(ts); } -static pcb_hidval_t lesstif_add_timer(pcb_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) +static pcb_hidval_t lesstif_add_timer(rnd_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { TimerStruct *t; pcb_hidval_t rv; @@ -2664,7 +2664,7 @@ return rv; } -static void lesstif_stop_timer(pcb_hid_t *hid, pcb_hidval_t hv) +static void lesstif_stop_timer(rnd_hid_t *hid, pcb_hidval_t hv) { TimerStruct *ts = (TimerStruct *) hv.ptr; XtRemoveTimeOut(ts->id); @@ -2679,7 +2679,7 @@ XtInputId id; } WatchStruct; -void lesstif_unwatch_file(pcb_hid_t *hid, pcb_hidval_t data) +void lesstif_unwatch_file(rnd_hid_t *hid, pcb_hidval_t data) { WatchStruct *watch = (WatchStruct *) data.ptr; XtRemoveInput(watch->id); @@ -2716,7 +2716,7 @@ return; } -pcb_hidval_t lesstif_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) +pcb_hidval_t lesstif_watch_file(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*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)); pcb_hidval_t ret; @@ -2740,28 +2740,28 @@ return ret; } -extern void *lesstif_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +extern void *lesstif_attr_dlg_new(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); extern int lesstif_attr_dlg_run(void *hid_ctx); extern void lesstif_attr_dlg_raise(void *hid_ctx); extern void lesstif_attr_dlg_close(void *hid_ctx); extern void lesstif_attr_dlg_free(void *hid_ctx); -extern void lesstif_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val); +extern void lesstif_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val); extern int lesstif_attr_dlg_widget_state(void *hid_ctx, int idx, int enabled); extern int lesstif_attr_dlg_widget_hide(void *hid_ctx, int idx, rnd_bool hide); -extern int lesstif_attr_dlg_set_value(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); +extern int lesstif_attr_dlg_set_value(void *hid_ctx, int idx, const rnd_hid_attr_val_t *val); extern void lesstif_attr_dlg_set_help(void *hid_ctx, int idx, const char *val); #include "wt_preview.c" -static void lesstif_beep(pcb_hid_t *hid) +static void lesstif_beep(rnd_hid_t *hid) { putchar(7); fflush(stdout); } -static int lesstif_usage(pcb_hid_t *hid, const char *topic) +static int lesstif_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nLesstif GUI command line arguments:\n\n"); pcb_hid_usage(lesstif_attribute_list, sizeof(lesstif_attribute_list) / sizeof(lesstif_attribute_list[0])); @@ -2804,7 +2804,7 @@ #include -static int ltf_clip_set(pcb_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len) +static int ltf_clip_set(rnd_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len) { static long cnt = 0; long item_id, data_id; @@ -2827,7 +2827,7 @@ return 0; } -static int ltf_clip_get(pcb_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len) +static int ltf_clip_get(rnd_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len) { int res; gds_t tmp; @@ -2857,17 +2857,17 @@ return 0; } -static void ltf_clip_free(pcb_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len) +static void ltf_clip_free(rnd_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len) { free(data); } -static void ltf_zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) +static void ltf_zoom_win(rnd_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) { zoom_win(hid, x1, y1, x2, y2, 1); } -static void ltf_zoom(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) +static void ltf_zoom(rnd_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) { if (relative) zoom_by(factor, Vx(center_x), Vy(center_y)); @@ -2875,7 +2875,7 @@ zoom_to(factor, Vx(center_x), Vy(center_y)); } -static void ltf_pan(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) +static void ltf_pan(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) { if (relative) { view_left_x += x; @@ -2891,13 +2891,13 @@ } } -static void ltf_pan_mode(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) +static void ltf_pan_mode(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) { Pan(mode, Vx(x), Vy(y)); } -static void ltf_view_get(pcb_hid_t *hid, rnd_rnd_box_t *viewbox) +static void ltf_view_get(rnd_hid_t *hid, rnd_rnd_box_t *viewbox) { viewbox->X1 = view_left_x; viewbox->Y1 = view_top_y; @@ -2905,7 +2905,7 @@ viewbox->Y2 = rnd_round(view_top_y + view_height * view_zoom); } -static void ltf_open_command(pcb_hid_t *hid) +static void ltf_open_command(rnd_hid_t *hid) { pcb_clihist_init(); pcb_clihist_reset(); @@ -2915,7 +2915,7 @@ cmd_is_active = 1; } -static void ltf_set_top_title(pcb_hid_t *hid, const char *title) +static void ltf_set_top_title(rnd_hid_t *hid, const char *title) { stdarg_n = 0; stdarg(XmNtitle, title); @@ -2922,11 +2922,11 @@ XtSetValues(appwidget, stdarg_args, stdarg_n); } -void lesstif_create_menu(pcb_hid_t *hid, const char *menu, const pcb_menu_prop_t *props); -int lesstif_remove_menu(pcb_hid_t *hid, const char *menu); -int lesstif_remove_menu_node(pcb_hid_t *hid, lht_node_t *node); -rnd_hid_cfg_t *lesstif_get_menu_cfg(pcb_hid_t *hid); -int ltf_open_popup(pcb_hid_t *hid, const char *menupath); +void lesstif_create_menu(rnd_hid_t *hid, const char *menu, const pcb_menu_prop_t *props); +int lesstif_remove_menu(rnd_hid_t *hid, const char *menu); +int lesstif_remove_menu_node(rnd_hid_t *hid, lht_node_t *node); +rnd_hid_cfg_t *lesstif_get_menu_cfg(rnd_hid_t *hid); +int ltf_open_popup(rnd_hid_t *hid, const char *menupath); int pplg_check_ver_hid_lesstif(int version_we_need) { return 0; } @@ -2946,11 +2946,11 @@ memset(&ccb, 0, sizeof(ccb)); ccb.val_change_post = lesstif_globconf_change_post; - memset(&lesstif_hid, 0, sizeof(pcb_hid_t)); + memset(&lesstif_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&lesstif_hid); - lesstif_hid.struct_size = sizeof(pcb_hid_t); + lesstif_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 30971) @@ -93,7 +93,7 @@ } /* WARNING: when call originaltes from the lesstif hid, hid==NULL for now */ -void lesstif_update_widget_flags(pcb_hid_t *hid, const char *cookie) +void lesstif_update_widget_flags(rnd_hid_t *hid, const char *cookie) { int i; @@ -175,7 +175,7 @@ pcb_hidlib_crosshair_restore(ltf_hidlib, chst); } -void lesstif_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *px, rnd_coord_t *py, int force) +void lesstif_get_coords(rnd_hid_t *hid, const char *msg, rnd_coord_t *px, rnd_coord_t *py, int force) { if ((force || !have_xy) && msg) { if (force) { @@ -554,7 +554,7 @@ } extern char *lesstif_pcbmenu_path; -extern pcb_hid_t lesstif_hid; +extern rnd_hid_t lesstif_hid; Widget lesstif_menu(Widget parent, const char *name, Arg * margs, int mn) { @@ -626,7 +626,7 @@ return mb; } -int ltf_open_popup(pcb_hid_t *hid, const char *menupath) +int ltf_open_popup(rnd_hid_t *hid, const char *menupath) { menu_data_t *md; lht_node_t *menu_node = pcb_hid_cfg_get_menu(lesstif_cfg, menupath); @@ -651,22 +651,22 @@ } -void lesstif_create_menu(pcb_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) +void lesstif_create_menu(rnd_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) { pcb_hid_cfg_create_menu(lesstif_cfg, menu_path, props, lesstif_create_menu_widget, NULL); } -int lesstif_remove_menu(pcb_hid_t *hid, const char *menu_path) +int lesstif_remove_menu(rnd_hid_t *hid, const char *menu_path) { return pcb_hid_cfg_remove_menu(lesstif_cfg, menu_path, del_menu, NULL); } -int lesstif_remove_menu_node(pcb_hid_t *hid, lht_node_t *node) +int lesstif_remove_menu_node(rnd_hid_t *hid, lht_node_t *node) { return pcb_hid_cfg_remove_menu_node(lesstif_cfg, node, del_menu, NULL); } -rnd_hid_cfg_t *lesstif_get_menu_cfg(pcb_hid_t *hid) +rnd_hid_cfg_t *lesstif_get_menu_cfg(rnd_hid_t *hid) { return lesstif_cfg; } Index: trunk/src_plugins/hid_lesstif/mouse.c =================================================================== --- trunk/src_plugins/hid_lesstif/mouse.c (revision 30970) +++ trunk/src_plugins/hid_lesstif/mouse.c (revision 30971) @@ -43,7 +43,7 @@ static vtlmc_t ltf_mouse_cursors; -static void ltf_reg_mouse_cursor(pcb_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask) +static void ltf_reg_mouse_cursor(rnd_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask) { ltf_cursor_t *mc = vtlmc_get(<f_mouse_cursors, idx, 1); @@ -82,7 +82,7 @@ } } -static void ltf_set_mouse_cursor(pcb_hid_t *hid, int idx) +static void ltf_set_mouse_cursor(rnd_hid_t *hid, int idx) { if (!lesstif_hid_inited) return; Index: trunk/src_plugins/hid_lesstif/wt_preview.h =================================================================== --- trunk/src_plugins/hid_lesstif/wt_preview.h (revision 30970) +++ trunk/src_plugins/hid_lesstif/wt_preview.h (revision 30971) @@ -4,8 +4,8 @@ typedef struct pcb_ltf_preview_s { void *hid_ctx; - pcb_hid_attribute_t *attr; - pcb_hid_expose_ctx_t exp_ctx; + rnd_hid_attribute_t *attr; + rnd_hid_expose_ctx_t exp_ctx; Window window; Widget pw; @@ -15,7 +15,7 @@ double zoom; /* PCB units per screen pixel */ int v_width, v_height; /* widget dimensions in pixels */ - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; rnd_bool (*mouse_ev)(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); void (*pre_close)(struct pcb_ltf_preview_s *pd); pcb_hid_expose_t overlay_draw; Index: trunk/src_plugins/hid_remote/proto.c =================================================================== --- trunk/src_plugins/hid_remote/proto.c (revision 30970) +++ trunk/src_plugins/hid_remote/proto.c (revision 30971) @@ -103,7 +103,7 @@ send_end(&pctx); } -int proto_send_set_layer_group(pcb_layergrp_id_t group, const char *purpose, int is_empty, pcb_xform_t **xform) +int proto_send_set_layer_group(rnd_layergrp_id_t group, const char *purpose, int is_empty, rnd_xform_t **xform) { send_begin(&pctx, "setlg"); send_open(&pctx, 0, 1); @@ -129,7 +129,7 @@ send_close(&pctx); } -int pcb_remote_new_layer_group(const char *name, pcb_layergrp_id_t idx, unsigned int flags) +int pcb_remote_new_layer_group(const char *name, rnd_layergrp_id_t idx, unsigned int flags) { send_begin(&pctx, "newlg"); send_open(&pctx, str_is_bin(name), 1); @@ -146,7 +146,7 @@ } -int pcb_remote_new_layer(const char *name, pcb_layer_id_t lid, unsigned int gid) +int pcb_remote_new_layer(const char *name, rnd_layer_id_t lid, unsigned int gid) { send_begin(&pctx, "newly"); send_open(&pctx, str_is_bin(name), 1); Index: trunk/src_plugins/hid_remote/proto.h =================================================================== --- trunk/src_plugins/hid_remote/proto.h (revision 30970) +++ trunk/src_plugins/hid_remote/proto.h (revision 30971) @@ -32,9 +32,9 @@ void proto_send_invalidate(int l, int r, int t, int b); void proto_send_invalidate_all(void); -int pcb_remote_new_layer_group(const char *name, pcb_layergrp_id_t idx, unsigned int flags); -int pcb_remote_new_layer(const char *name, pcb_layer_id_t idx, unsigned int group); -int proto_send_set_layer_group(pcb_layergrp_id_t group, const char *purpose, int is_empty); +int pcb_remote_new_layer_group(const char *name, rnd_layergrp_id_t idx, unsigned int flags); +int pcb_remote_new_layer(const char *name, rnd_layer_id_t idx, unsigned int group); +int proto_send_set_layer_group(rnd_layergrp_id_t group, const char *purpose, int is_empty); int proto_send_make_gc(void); int proto_send_del_gc(int gc); Index: trunk/src_plugins/hid_remote/remote.c =================================================================== --- trunk/src_plugins/hid_remote/remote.c (revision 30970) +++ trunk/src_plugins/hid_remote/remote.c (revision 30971) @@ -24,14 +24,14 @@ static const char *remote_cookie = "remote HID"; -static pcb_hid_t remote_hid; +static rnd_hid_t remote_hid; -typedef struct hid_gc_s { +typedef struct rnd_hid_gc_s { pcb_core_gc_t core_gc; int nop; -} hid_gc_s; +} rnd_hid_gc_s; -static pcb_export_opt_t *remote_get_export_options(pcb_hid_t *hid, int *n_ret) +static rnd_export_opt_t *remote_get_export_options(rnd_hid_t *hid, int *n_ret) { if (n_ret != NULL) *n_ret = 0; @@ -53,13 +53,13 @@ static void remote_send_all_layers() { - pcb_layer_id_t arr[128]; - pcb_layergrp_id_t garr[128]; + rnd_layer_id_t arr[128]; + rnd_layergrp_id_t garr[128]; int n, used; used = pcb_layergrp_list_any(PCB, PCB_LYT_ANYTHING | PCB_LYT_ANYWHERE | PCB_LYT_VIRTUAL, garr, sizeof(garr)/sizeof(garr[0])); for(n = 0; n < used; n++) { - pcb_layergrp_id_t gid = garr[n]; + rnd_layergrp_id_t gid = garr[n]; pcb_remote_new_layer_group(pcb_layergrp_name(PCB, gid), gid, pcb_layergrp_flags(PCB, gid)); } @@ -68,8 +68,8 @@ TODO("layer: remove this temporary hack for virtual layers") for(n = 0; n < used; n++) { const char *name; - pcb_layer_id_t layer_id = arr[n]; - pcb_layergrp_id_t gid = pcb_layer_get_group(PCB, layer_id); + rnd_layer_id_t layer_id = arr[n]; + rnd_layergrp_id_t gid = pcb_layer_get_group(PCB, layer_id); name = pcb_layer_name(PCB->Data, layer_id); if ((gid < 0) && (name != NULL)) { pcb_remote_new_layer_group(name, layer_id, pcb_layer_flags(PCB, layer_id)); @@ -79,8 +79,8 @@ for(n = 0; n < used; n++) { - pcb_layer_id_t lid = arr[n]; - pcb_layergrp_id_t gid = pcb_layer_get_group(PCB, lid); + rnd_layer_id_t lid = arr[n]; + rnd_layergrp_id_t gid = pcb_layer_get_group(PCB, lid); if (gid >= 0) pcb_remote_new_layer(pcb_layer_name(PCB->Data, lid), lid, gid); } @@ -89,9 +89,9 @@ /* ----------------------------------------------------------------------------- */ static int remote_stay; -static void remote_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void remote_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { - pcb_hid_expose_ctx_t ctx; + rnd_hid_expose_ctx_t ctx; ctx.view.X1 = 0; ctx.view.Y1 = 0; @@ -113,27 +113,27 @@ exit(1); } -static void remote_do_exit(pcb_hid_t *hid) +static void remote_do_exit(rnd_hid_t *hid) { remote_stay = 0; } -static int remote_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int remote_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { return pcb_hid_parse_command_line(argc, argv); } -static void remote_invalidate_lr(pcb_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) +static void remote_invalidate_lr(rnd_hid_t *hid, rnd_coord_t l, rnd_coord_t r, rnd_coord_t t, rnd_coord_t b) { proto_send_invalidate(l,r, t, b); } -static void remote_invalidate_all(pcb_hid_t *hid) +static void remote_invalidate_all(rnd_hid_t *hid) { proto_send_invalidate_all(); } -static int remote_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int remote_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { if (flags & PCB_LYT_UI) /* do not draw UI layers yet, we didn't create them */ return 0; @@ -156,10 +156,10 @@ rnd_coord_t line_width; char cap; } remote_gc_cache_t; -static hid_gc_s remote_gc[32]; +static rnd_hid_gc_s remote_gc[32]; static remote_gc_cache_t gc_cache[32]; -static pcb_hid_gc_t remote_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t remote_make_gc(rnd_hid_t *hid) { int gci = proto_send_make_gc(); int max = sizeof(remote_gc) / sizeof(remote_gc[0]); @@ -172,7 +172,7 @@ return remote_gc+gci; } -static int gc2idx(pcb_hid_gc_t gc) +static int gc2idx(rnd_hid_gc_t gc) { int idx = gc - remote_gc; int max = sizeof(remote_gc) / sizeof(remote_gc[0]); @@ -184,7 +184,7 @@ return idx; } -static void remote_destroy_gc(pcb_hid_gc_t gc) +static void remote_destroy_gc(rnd_hid_gc_t gc) { int idx = gc2idx(gc); if (idx >= 0) @@ -192,7 +192,7 @@ } static const char *drawing_mode_names[] = { "reset", "positive", "negative", "flush"}; -static void remote_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) +static void remote_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *drw_screen) { if ((op >= 0) && (op < sizeof(drawing_mode_names) / sizeof(drawing_mode_names[0]))) proto_send_set_drawing_mode(drawing_mode_names[op], direct); @@ -200,7 +200,7 @@ rnd_message(RND_MSG_ERROR, "Invalid drawing mode %d\n", op); } -static void remote_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void remote_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { int idx = gc2idx(gc); if (idx >= 0) { @@ -213,7 +213,7 @@ /* r=round, s=square, b=beveled (octagon) */ static const char *cap_style_names = "rsrb"; -static void remote_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void remote_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { int idx = gc2idx(gc); int max = strlen(cap_style_names); @@ -232,7 +232,7 @@ } } -static void remote_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void remote_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { int idx = gc2idx(gc); if (idx >= 0) { @@ -243,7 +243,7 @@ } } -static void remote_set_draw_xor(pcb_hid_gc_t gc, int xor_set) +static void remote_set_draw_xor(rnd_hid_gc_t gc, int xor_set) { int idx = gc2idx(gc); if (idx >= 0) @@ -250,7 +250,7 @@ proto_send_set_draw_xor(idx, xor_set); } -static void remote_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void remote_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -257,7 +257,7 @@ proto_send_draw_line(idx, x1, y1, x2, y2); } -static void remote_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void remote_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t width, rnd_coord_t height, rnd_angle_t start_angle, rnd_angle_t delta_angle) { int idx = gc2idx(gc); if (idx >= 0) @@ -264,7 +264,7 @@ proto_send_draw_arc(idx, cx, cy, width, height, start_angle, delta_angle); } -static void remote_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void remote_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -271,7 +271,7 @@ proto_send_draw_rect(idx, x1, y1, x2, y2, 0); } -static void remote_fill_circle(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) +static void remote_fill_circle(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t radius) { int idx = gc2idx(gc); if (idx >= 0) @@ -278,7 +278,7 @@ proto_send_fill_circle(idx, cx, cy, radius); } -static void remote_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) +static void remote_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t * x, rnd_coord_t * y) { int idx = gc2idx(gc); if (idx >= 0) @@ -285,7 +285,7 @@ proto_send_draw_poly(idx, n_coords, x, y, 0, 0); } -static void remote_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void remote_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int idx = gc2idx(gc); if (idx >= 0) @@ -292,7 +292,7 @@ proto_send_draw_poly(idx, n_coords, x, y, dx, dy); } -static void remote_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void remote_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { int idx = gc2idx(gc); if (idx >= 0) @@ -299,34 +299,34 @@ proto_send_draw_rect(idx, x1, y1, x2, y2, 1); } -static void remote_calibrate(pcb_hid_t *hid, double xval, double yval) +static void remote_calibrate(rnd_hid_t *hid, double xval, double yval) { } -static int remote_shift_is_pressed(pcb_hid_t *hid) +static int remote_shift_is_pressed(rnd_hid_t *hid) { return 0; } -static int remote_control_is_pressed(pcb_hid_t *hid) +static int remote_control_is_pressed(rnd_hid_t *hid) { return 0; } -static int remote_mod1_is_pressed(pcb_hid_t *hid) +static int remote_mod1_is_pressed(rnd_hid_t *hid) { return 0; } -static void remote_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) +static void remote_get_coords(rnd_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { } -static void remote_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void remote_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { } -static pcb_hidval_t remote_add_timer(pcb_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) +static pcb_hidval_t remote_add_timer(rnd_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { pcb_hidval_t rv; rv.lval = 0; @@ -333,12 +333,12 @@ return rv; } -static void remote_stop_timer(pcb_hid_t *hid, pcb_hidval_t timer) +static void remote_stop_timer(rnd_hid_t *hid, pcb_hidval_t timer) { } pcb_hidval_t -remote_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), +remote_watch_file(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data) { pcb_hidval_t ret; @@ -346,11 +346,11 @@ return ret; } -void remote_unwatch_file(pcb_hid_t *hid, pcb_hidval_t data) +void remote_unwatch_file(rnd_hid_t *hid, pcb_hidval_t data) { } -static void *remote_attr_dlg_new(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +static void *remote_attr_dlg_new(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs_, int n_attrs_, const char *title_, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { return NULL; } @@ -372,11 +372,11 @@ { } -static void remote_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val) +static void remote_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val) { } -static void remote_create_menu(pcb_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) +static void remote_create_menu(rnd_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) { } @@ -392,11 +392,11 @@ { PCB_API_CHK_VER; - memset(&remote_hid, 0, sizeof(pcb_hid_t)); + memset(&remote_hid, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&remote_hid); - remote_hid.struct_size = sizeof(pcb_hid_t); + remote_hid.struct_size = sizeof(rnd_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 30970) +++ trunk/src_plugins/import_dsn/dsn.c (revision 30971) @@ -53,7 +53,7 @@ TYPE_SESSION } dsn_type_t; -static pcb_layer_id_t ses_layer_by_name(pcb_board_t *pcb, const char *name) +static rnd_layer_id_t ses_layer_by_name(pcb_board_t *pcb, const char *name) { char *end; long gid; @@ -93,7 +93,7 @@ const char *slayer = n->children->str; const char *sthick = n->children->next->str; rnd_bool succ; - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *layer; thick = pcb_get_value(sthick, unit, NULL, &succ); Index: trunk/src_plugins/import_pxm_gd/import_pxm_gd.c =================================================================== --- trunk/src_plugins/import_pxm_gd/import_pxm_gd.c (revision 30970) +++ trunk/src_plugins/import_pxm_gd/import_pxm_gd.c (revision 30971) @@ -39,7 +39,7 @@ static const char *import_pxm_gd_cookie = "import_pxm_gd"; -static int gd_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn, gdImagePtr (*loader)(FILE *f)) +static int gd_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn, gdImagePtr (*loader)(FILE *f)) { int x, y; gdImagePtr gdi; @@ -88,7 +88,7 @@ } #ifdef RND_HAVE_GDIMAGEPNG -static int gd_png_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn) +static int gd_png_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn) { return gd_load(hidlib, pxm, fn, gdImageCreateFromPng); } @@ -100,7 +100,7 @@ #endif #ifdef RND_HAVE_GDIMAGEJPEG -static int gd_jpg_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn) +static int gd_jpg_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn) { return gd_load(hidlib, pxm, fn, gdImageCreateFromJpeg); } @@ -112,7 +112,7 @@ #endif #ifdef RND_HAVE_GDIMAGEGIF -static int gd_gif_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn) +static int gd_gif_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn) { return gd_load(hidlib, pxm, fn, gdImageCreateFromGif); } Index: trunk/src_plugins/import_pxm_pnm/import_pxm_pnm.c =================================================================== --- trunk/src_plugins/import_pxm_pnm/import_pxm_pnm.c (revision 30970) +++ trunk/src_plugins/import_pxm_pnm/import_pxm_pnm.c (revision 30971) @@ -64,7 +64,7 @@ break; \ } -static int pnm_load(rnd_hidlib_t *hidlib, pcb_pixmap_t *pxm, const char *fn) +static int pnm_load(rnd_hidlib_t *hidlib, rnd_pixmap_t *pxm, const char *fn) { FILE *f; char *s, line[1024]; Index: trunk/src_plugins/import_sch2/import_sch_dlg.c =================================================================== --- trunk/src_plugins/import_sch2/import_sch_dlg.c (revision 30970) +++ trunk/src_plugins/import_sch2/import_sch_dlg.c (revision 30971) @@ -162,12 +162,12 @@ isch_switch_fmt(tab, 0); } -static void isch_fmt_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_fmt_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { isch_switch_fmt(isch_ctx.dlg[isch_ctx.wfmt].val.lng, 1); } -static void isch_arg_del_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_arg_del_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int len = rnd_conflist_length((rnd_conflist_t *)&conf_import_sch.plugins.import_sch.args); if (len > 0) { @@ -176,7 +176,7 @@ } } -static void isch_arg_add_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_arg_add_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int len = rnd_conflist_length((rnd_conflist_t *)&conf_import_sch.plugins.import_sch.args); if (len < MAX_ARGS+1) { @@ -188,7 +188,7 @@ } } -static void isch_browse_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_browse_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int n, idx = -1, wid = attr - isch_ctx.dlg; char *name; @@ -218,13 +218,13 @@ } -static void isch_import_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_import_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { isch_flush_timer(); do_import(); } -static void isch_arg_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_arg_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_hidval_t user_data; @@ -236,7 +236,7 @@ isch_ctx.arg_dirty = 1; } -static void isch_generic_chg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_generic_chg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { const char *nv = isch_ctx.dlg[isch_ctx.wverbose].val.lng ? "1" : "0"; isch_conf_lock++; @@ -244,7 +244,7 @@ isch_conf_lock--; } -static void isch_plc_cfg_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void isch_plc_cfg_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { rnd_actionva(&PCB->hidlib, "preferences", "config", "footprint_", NULL); } Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 30970) +++ trunk/src_plugins/io_autotrax/read.c (revision 30971) @@ -105,7 +105,7 @@ pcb_board_t *pcb; const char *Filename; rnd_conf_role_t settings_dest; - pcb_layer_id_t protel_to_stackup[14]; + rnd_layer_id_t protel_to_stackup[14]; int lineno; rnd_coord_t mask_clearance; rnd_coord_t copper_clearance; @@ -302,7 +302,7 @@ rnd_angle_t delta = 360.0; pcb_flag_t Flags = pcb_flag_make(0); /* start with something bland here */ - pcb_layer_id_t PCB_layer; + rnd_layer_id_t PCB_layer; Thickness = 0; Clearance = st->copper_clearance; /* start with sane default */ @@ -762,11 +762,11 @@ return -1; } -static pcb_layer_id_t autotrax_reg_layer(read_state_t *st, const char *autotrax_layer, unsigned int mask) +static rnd_layer_id_t autotrax_reg_layer(read_state_t *st, const char *autotrax_layer, unsigned int mask) { - pcb_layer_id_t id; + rnd_layer_id_t id; if (pcb_layer_list(st->pcb, mask, &id, 1) != 1) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_list(st->pcb, mask, &gid, 1); id = pcb_layer_create(st->pcb, gid, autotrax_layer, 0); } @@ -778,7 +778,7 @@ { pcb_layergrp_t *g; - pcb_layer_id_t id; + rnd_layer_id_t id; pcb_layer_group_setup_default(st->pcb); @@ -789,7 +789,7 @@ st->protel_to_stackup[6] = autotrax_reg_layer(st, "bottom copper", PCB_LYT_COPPER | PCB_LYT_BOTTOM); if (pcb_layer_list(st->pcb, PCB_LYT_SILK | PCB_LYT_TOP, &id, 1) == 1) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_list(st->pcb, PCB_LYT_SILK | PCB_LYT_TOP, &gid, 1); st->protel_to_stackup[11] = pcb_layer_create(st->pcb, gid, "Board", 0); /* != outline, cutouts */ pcb_layergrp_list(st->pcb, PCB_LYT_SILK | PCB_LYT_TOP, &gid, 1); Index: trunk/src_plugins/io_autotrax/write.c =================================================================== --- trunk/src_plugins/io_autotrax/write.c (revision 30970) +++ trunk/src_plugins/io_autotrax/write.c (revision 30971) @@ -74,7 +74,7 @@ static int wrax_layer2id(wctx_t *ctx, pcb_layer_t *ly) { - pcb_layergrp_id_t gid = pcb_layer_get_group_(ly); + rnd_layergrp_id_t gid = pcb_layer_get_group_(ly); if ((gid >= 0) && (gid < PCB_MAX_LAYERGRP)) return ctx->grp2id[gid]; return 0; Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30970) +++ trunk/src_plugins/io_dsn/read.c (revision 30971) @@ -321,7 +321,7 @@ static int dsn_parse_boundary(dsn_read_t *ctx, gsxl_node_t *bnd) { int res; - pcb_layer_id_t olid; + rnd_layer_id_t olid; pcb_layer_t *oly; if (bnd == NULL) @@ -369,7 +369,7 @@ const pcb_dflgmap_t *m; gsxl_node_t *n, *i; pcb_layergrp_t *topcop = NULL, *botcop = NULL, *grp; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; const rnd_unit_t *old_unit; const pcb_dflgmap_t doclayers[] = { {"top_outline", PCB_LYT_TOP | PCB_LYT_DOC, "outline", PCB_LYC_AUTO, 0}, Index: trunk/src_plugins/io_dsn/write.c =================================================================== --- trunk/src_plugins/io_dsn/write.c (revision 30970) +++ trunk/src_plugins/io_dsn/write.c (revision 30971) @@ -48,7 +48,7 @@ #define GNAME_MAX 64 -static void group_name(char *dst, const char *src, pcb_layergrp_id_t gid) +static void group_name(char *dst, const char *src, rnd_layergrp_id_t gid) { int n; char *d; @@ -70,7 +70,7 @@ static int dsn_write_structure(dsn_write_t *wctx) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *lg; fprintf(wctx->f, " (structure\n"); @@ -88,13 +88,13 @@ static int dsn_write_wiring(dsn_write_t *wctx) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *ly; fprintf(wctx->f, " (wiring\n"); for(ly = wctx->pcb->Data->Layer, lid = 0; lid < wctx->pcb->Data->LayerN; lid++,ly++) { char gname[GNAME_MAX]; - pcb_layergrp_id_t gid = pcb_layer_get_group_(ly); + rnd_layergrp_id_t gid = pcb_layer_get_group_(ly); pcb_layergrp_t *lg = pcb_get_layergrp(wctx->pcb, gid); pcb_net_t *net; Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 30970) +++ trunk/src_plugins/io_eagle/read.c (revision 30971) @@ -75,7 +75,7 @@ int visible; int active; - pcb_layer_id_t lid; + rnd_layer_id_t lid; } eagle_layer_t; typedef struct eagle_library_s { @@ -304,7 +304,7 @@ long tmp_id; eagle_layerid_t id; unsigned long typ; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; ly->name = eagle_get_attrs(st, n, "name", NULL); @@ -377,7 +377,7 @@ since most Eagle packages use tDocu, bDocu for some of their artwork */ eagle_layer_t *ly = htip_get(&st->layers, id); - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_subc_t *subc = obj; pcb_layer_type_t lyt; pcb_layer_combining_t comb; @@ -388,7 +388,7 @@ if (id == 51 || id == 52) { /* create docu on the first reference */ pcb_layer_type_t typ; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; switch (id) { case 51: /* = tDocu */ typ = PCB_LYT_SILK | PCB_LYT_TOP; @@ -1670,7 +1670,7 @@ static int post_process_polyholes(read_state_t *st) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; for(lid = 0; lid < st->pcb->Data->LayerN; lid++) { pcb_poly_t *hole, *poly; gdl_iterator_t ith, itp; Index: trunk/src_plugins/io_eagle/read_dru.c =================================================================== --- trunk/src_plugins/io_eagle/read_dru.c (revision 30970) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 30971) @@ -162,7 +162,7 @@ FILE *f; char *efn; gds_t buff; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; int n, num_layers = 0; static const char prefix[] = "io_eagle::dru::"; char tmp[256]; Index: trunk/src_plugins/io_hyp/parser.c =================================================================== --- trunk/src_plugins/io_hyp/parser.c (revision 30970) +++ trunk/src_plugins/io_hyp/parser.c (revision 30971) @@ -85,9 +85,9 @@ /* layer creation */ int layer_count; -pcb_layer_id_t top_layer_id, bottom_layer_id; +rnd_layer_id_t top_layer_id, bottom_layer_id; void hyp_reset_layers(); /* reset layer stack to minimun */ -pcb_layer_id_t hyp_create_layer(char *lname); /* create new copper layer at bottom of stack */ +rnd_layer_id_t hyp_create_layer(char *lname); /* create new copper layer at bottom of stack */ int hyp_debug; /* logging on/off switch */ @@ -496,7 +496,7 @@ void hyp_perimeter_segment_add(outline_t * s, pcb_bool_t forward) { - pcb_layer_id_t outline_id; + rnd_layer_id_t outline_id; pcb_layer_t *outline_layer; /* get outline layer */ @@ -793,8 +793,8 @@ void hyp_reset_layers() { - pcb_layer_id_t id = -1; - pcb_layergrp_id_t gid = -1; + rnd_layer_id_t id = -1; + rnd_layergrp_id_t gid = -1; pcb_layergrp_t *grp = NULL; pcb_layergrp_inhibit_inc(); @@ -851,10 +851,10 @@ * If the layer name is NULL, a new copper layer with a new, unused layer name is created. */ -pcb_layer_id_t hyp_create_layer(char *lname) +rnd_layer_id_t hyp_create_layer(char *lname) { - pcb_layer_id_t layer_id; - pcb_layergrp_id_t gid; + rnd_layer_id_t layer_id; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; char new_layer_name[MAX_STRING]; int n; @@ -1211,7 +1211,7 @@ { hyp_polygon_t *i; int l, layer_count = 0; - pcb_layer_id_t *layer_array = NULL; + rnd_layer_id_t *layer_array = NULL; #ifdef XXX hyp_dump_polygons(); /* more debugging */ @@ -1221,7 +1221,7 @@ layer_count = pcb_layer_list(PCB, PCB_LYT_COPPER, NULL, 0); if (layer_count <= 0) return; - layer_array = malloc(sizeof(pcb_layer_id_t) * layer_count); + layer_array = malloc(sizeof(rnd_layer_id_t) * layer_count); if (layer_array == NULL) return; layer_count = pcb_layer_list(PCB, PCB_LYT_COPPER, layer_array, layer_count); @@ -1228,7 +1228,7 @@ /* loop over all layers */ for (l = 0; l < layer_count; l++) { - pcb_layer_id_t layer_id = layer_array[l]; + rnd_layer_id_t layer_id = layer_array[l]; if (hyp_debug) rnd_message(RND_MSG_DEBUG, "draw polygons: layer %lx \"%s\"\n", layer_id, pcb_layer_name(PCB->Data, layer_id)); @@ -1262,7 +1262,7 @@ rnd_coord_t hyp_clearance(parse_param * h) { rnd_coord_t clearance; - pcb_layer_id_t layr_id; + rnd_layer_id_t layr_id; if (h->layer_name_set) layr_id = hyp_create_layer(h->layer_name); @@ -1538,7 +1538,7 @@ rnd_bool exec_signal(parse_param * h) { - pcb_layer_id_t signal_layer_id; + rnd_layer_id_t signal_layer_id; if ((h->layer_name != NULL) && (pcb_layer_by_name(PCB->Data, h->layer_name) >= 0)) rnd_message(RND_MSG_WARNING, "duplicate SIGNAL layer name \"%s\"\n", h->layer_name); @@ -1577,7 +1577,7 @@ rnd_bool exec_plane(parse_param * h) { - pcb_layer_id_t plane_layer_id; + rnd_layer_id_t plane_layer_id; if ((h->layer_name != NULL) && (pcb_layer_by_name(PCB->Data, h->layer_name) >= 0)) rnd_message(RND_MSG_WARNING, "duplicate PLANE layer name \"%s\"\n", h->layer_name); @@ -2269,7 +2269,7 @@ rnd_bool exec_useg(parse_param * h) { - pcb_layergrp_id_t layer1_grp_id, layer2_grp_id; + rnd_layergrp_id_t layer1_grp_id, layer2_grp_id; if (hyp_debug) { rnd_message(RND_MSG_DEBUG, "useg: x1 = %ml y1 = %ml layer1_name = \"%s\"", x2coord(h->x1), y2coord(h->y1), h->layer1_name); Index: trunk/src_plugins/io_hyp/write.c =================================================================== --- trunk/src_plugins/io_hyp/write.c (revision 30970) +++ trunk/src_plugins/io_hyp/write.c (revision 30971) @@ -147,7 +147,7 @@ static const char *get_layer_name(hyp_wr_t * wr, pcb_parenttype_t pt, pcb_layer_t * l) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; if (pt != PCB_PARENT_LAYER) @@ -247,7 +247,7 @@ for(n = 0; n < tshp->len; n++) { pcb_pstk_shape_t *shp = &tshp->shape[n]; pcb_layer_type_t loc; - pcb_layer_id_t l; + rnd_layer_id_t l; if (!(shp->layer_mask & PCB_LYT_COPPER)) continue; /* hyp suppports copper only */ @@ -362,7 +362,7 @@ static int write_board(hyp_wr_t * wr) { int has_outline; - pcb_layergrp_id_t i; + rnd_layergrp_id_t i; pcb_layergrp_t *g; fprintf(wr->f, "{BOARD\n"); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 30970) +++ trunk/src_plugins/io_kicad/read.c (revision 30971) @@ -231,9 +231,9 @@ } -static int kicad_create_copper_layer_(read_state_t *st, pcb_layergrp_id_t gid, const char *lname, const char *ltype, gsxl_node_t *subtree) +static int kicad_create_copper_layer_(read_state_t *st, rnd_layergrp_id_t gid, const char *lname, const char *ltype, gsxl_node_t *subtree) { - pcb_layer_id_t id; + rnd_layer_id_t id; id = pcb_layer_create(st->pcb, gid, lname, 0); htsi_set(&st->layer_k2i, rnd_strdup(lname), id); if (ltype != NULL) { @@ -245,7 +245,7 @@ static int kicad_create_copper_layer(read_state_t *st, int lnum, const char *lname, const char *ltype, gsxl_node_t *subtree, int last_copper) { - pcb_layergrp_id_t gid = -1; + rnd_layergrp_id_t gid = -1; const char *cu; pcb_layer_type_t loc = PCB_LYT_INTERN; @@ -299,8 +299,8 @@ static int kicad_create_misc_layer(read_state_t *st, int lnum, const char *lname, const char *ltype, gsxl_node_t *subtree, int last_copper) { - pcb_layergrp_id_t gid; - pcb_layer_id_t lid = -1; + rnd_layergrp_id_t gid; + rnd_layer_id_t lid = -1; pcb_layergrp_t *grp, *new_grp = NULL; pcb_layer_t *ly; const kicad_layertab_t *lt, *best = NULL; @@ -390,10 +390,10 @@ /* Register a kicad layer in the layer hash after looking up the pcb-rnd equivalent */ static unsigned int kicad_reg_layer(read_state_t *st, const char *kicad_name, unsigned int mask, const char *purpose) { - pcb_layer_id_t id; + rnd_layer_id_t id; if (st->pcb != NULL) { if (pcb_layer_listp(st->pcb, mask, &id, 1, -1, purpose) != 1) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_listp(PCB, mask, &gid, 1, -1, purpose); id = pcb_layer_create(st->pcb, gid, kicad_name, 0); } @@ -489,7 +489,7 @@ static pcb_layer_t *kicad_get_subc_layer(read_state_t *st, pcb_subc_t *subc, const char *layer_name, const char *default_layer_name) { int pcb_idx = -1; - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_type_t lyt; pcb_layer_combining_t comb; const char *lnm; @@ -687,7 +687,7 @@ if ((nd == NULL) || (nd->str == NULL)) \ return kicad_error(n, "unexpected empty/NULL " loc " layer node"); \ if (subc == NULL) { \ - pcb_layer_id_t lid = kicad_get_layeridx(st, nd->str); \ + rnd_layer_id_t lid = kicad_get_layeridx(st, nd->str); \ if (lid < 0) \ return kicad_error(nd, "unhandled " loc " layer: (%s)", nd->str); \ ly = &st->pcb->Data->Layer[lid]; \ @@ -1378,8 +1378,8 @@ pcb_pstk_proto_t *new_proto; rnd_cardinal_t new_pid; int ot1, ot2, ob1, ob2, err; - pcb_layergrp_id_t gtop = pcb_layergrp_get_top_copper(); - pcb_layergrp_id_t gbot = pcb_layergrp_get_bottom_copper(); + rnd_layergrp_id_t gtop = pcb_layergrp_get_top_copper(); + rnd_layergrp_id_t gbot = pcb_layergrp_get_bottom_copper(); orig_proto = pcb_pstk_get_proto(ps); assert(orig_proto != NULL); @@ -1503,7 +1503,7 @@ gsxl_node_t *nd; if ((ndp != NULL) && (*ndp != NULL)) { pcb_layergrp_t *g = pcb_get_grp_new_intern(st->pcb, -1); - pcb_layergrp_id_t gid = g - st->pcb->LayerGroups.grp; + rnd_layergrp_id_t gid = g - st->pcb->LayerGroups.grp; const char *lname, *ltype; nd = *ndp; @@ -1571,7 +1571,7 @@ htpp_init(&poly_upd, ptrhash, ptrkeyeq); for(zc = st->zc_head; zc != NULL; zc = next) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *ly; /* search all layers for polygons */ @@ -1917,7 +1917,7 @@ { gsxl_node_t *l; pcb_layer_type_t smd_side = 0; - pcb_layer_id_t lid; + rnd_layer_id_t lid; int numly = 0, side_from_lyt = 0; for(l = subtree; l != NULL; l = l->next) { @@ -2048,8 +2048,8 @@ const char *old_term; pcb_subc_t *old_subc; pcb_layer_t *old_ly; - pcb_layer_id_t loc, *typ; - pcb_layer_id_t ltypes[] = { PCB_LYT_COPPER, PCB_LYT_SILK, PCB_LYT_MASK, PCB_LYT_PASTE, 0}; + rnd_layer_id_t loc, *typ; + rnd_layer_id_t ltypes[] = { PCB_LYT_COPPER, PCB_LYT_SILK, PCB_LYT_MASK, PCB_LYT_PASTE, 0}; old_subc = st->primitive_subc; old_ly = st->primitive_ly; @@ -2339,7 +2339,7 @@ static int kicad_parse_module(read_state_t *st, gsxl_node_t *subtree) { gsxl_node_t *n, *p; - pcb_layer_id_t lid = 0; + rnd_layer_id_t lid = 0; int on_bottom = 0, found_refdes = 0, module_empty = 1, module_defined = 0, i; int mod_zone_connect = 1; /* default seems to be connect; see CUCP#57, case labeled "-1" */ double mod_rot = 0, mod_paste_ratio = 0; @@ -2689,7 +2689,7 @@ /* create an extra layer for plated slots so they show up properly */ { pcb_layergrp_t *g = pcb_get_grp_new_misc(st->pcb); - pcb_layer_id_t lid = pcb_layer_create(st->pcb, g - st->pcb->LayerGroups.grp, "plated_slots", 0); + rnd_layer_id_t lid = pcb_layer_create(st->pcb, g - st->pcb->LayerGroups.grp, "plated_slots", 0); pcb_layer_t *ly = pcb_get_layer(st->pcb->Data, lid); g->ltype = PCB_LYT_MECH; pcb_layergrp_set_purpose(g, "proute", 0); Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 30970) +++ trunk/src_plugins/io_kicad/write.c (revision 30971) @@ -117,7 +117,7 @@ ctx->num_layers = -1; for(fl = fixed_layers; fl->name != NULL; fl++) { - pcb_layergrp_id_t gid[KICAD_COPPERS]; + rnd_layergrp_id_t gid[KICAD_COPPERS]; int idx, ngrp; gid[0] = -1; @@ -664,7 +664,7 @@ for(n = 0; n < data->LayerN; n++) { pcb_layer_t *ly = &data->Layer[n]; - pcb_layergrp_id_t gid = pcb_layer_get_group_(ly); + rnd_layergrp_id_t gid = pcb_layer_get_group_(ly); pcb_layergrp_t *grp; int found = 0; klayer_t kly; Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 30970) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 30971) @@ -714,17 +714,17 @@ rnd_coord_t outlineThickness = PCB_MIL_TO_COORD(10); int bottomCount; - pcb_layer_id_t *bottomLayers; + rnd_layer_id_t *bottomLayers; int innerCount; - pcb_layer_id_t *innerLayers; + rnd_layer_id_t *innerLayers; int topCount; - pcb_layer_id_t *topLayers; + rnd_layer_id_t *topLayers; int bottomSilkCount; - pcb_layer_id_t *bottomSilk; + rnd_layer_id_t *bottomSilk; int topSilkCount; - pcb_layer_id_t *topSilk; + rnd_layer_id_t *topSilk; int outlineCount; - pcb_layer_id_t *outlineLayers; + rnd_layer_id_t *outlineLayers; rnd_coord_t LayoutXOffset; rnd_coord_t LayoutYOffset; @@ -827,7 +827,7 @@ /* figure out which pcb layers are bottom copper and make a list */ bottomCount = pcb_layer_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_COPPER, NULL, 0); if (bottomCount > 0) { - bottomLayers = malloc(sizeof(pcb_layer_id_t) * bottomCount); + bottomLayers = malloc(sizeof(rnd_layer_id_t) * bottomCount); pcb_layer_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_COPPER, bottomLayers, bottomCount); } else { @@ -837,7 +837,7 @@ /* figure out which pcb layers are internal copper layers and make a list */ innerCount = pcb_layer_list(PCB, PCB_LYT_INTERN | PCB_LYT_COPPER, NULL, 0); if (innerCount > 0) { - innerLayers = malloc(sizeof(pcb_layer_id_t) * innerCount); + innerLayers = malloc(sizeof(rnd_layer_id_t) * innerCount); pcb_layer_list(PCB, PCB_LYT_INTERN | PCB_LYT_COPPER, innerLayers, innerCount); } else { @@ -847,7 +847,7 @@ /* figure out which pcb layers are top copper and make a list */ topCount = pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, NULL, 0); if (topCount > 0) { - topLayers = malloc(sizeof(pcb_layer_id_t) * topCount); + topLayers = malloc(sizeof(rnd_layer_id_t) * topCount); pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, topLayers, topCount); } else { @@ -857,7 +857,7 @@ /* figure out which pcb layers are bottom silk and make a list */ bottomSilkCount = pcb_layer_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_SILK, NULL, 0); if (bottomSilkCount > 0) { - bottomSilk = malloc(sizeof(pcb_layer_id_t) * bottomSilkCount); + bottomSilk = malloc(sizeof(rnd_layer_id_t) * bottomSilkCount); pcb_layer_list(PCB, PCB_LYT_BOTTOM | PCB_LYT_SILK, bottomSilk, bottomSilkCount); } else { @@ -867,7 +867,7 @@ /* figure out which pcb layers are top silk and make a list */ topSilkCount = pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_SILK, NULL, 0); if (topSilkCount > 0) { - topSilk = malloc(sizeof(pcb_layer_id_t) * topSilkCount); + topSilk = malloc(sizeof(rnd_layer_id_t) * topSilkCount); pcb_layer_list(PCB, PCB_LYT_TOP | PCB_LYT_SILK, topSilk, topSilkCount); } else { @@ -877,7 +877,7 @@ /* figure out which pcb layers are outlines and make a list */ outlineCount = pcb_layer_list(PCB, PCB_LYT_BOUNDARY, NULL, 0); if (outlineCount > 0) { - outlineLayers = malloc(sizeof(pcb_layer_id_t) * outlineCount); + outlineLayers = malloc(sizeof(rnd_layer_id_t) * outlineCount); pcb_layer_list(PCB, PCB_LYT_BOUNDARY, outlineLayers, outlineCount); } else { Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 30970) +++ trunk/src_plugins/io_lihata/read.c (revision 30971) @@ -1387,7 +1387,7 @@ static void layer_fixup(pcb_board_t *pcb) { int n; - pcb_layergrp_id_t top_silk, bottom_silk; + rnd_layergrp_id_t top_silk, bottom_silk; pcb_layergrp_t *g; pcb_layergrp_inhibit_inc(); @@ -1404,7 +1404,7 @@ for(n = 0; n < pcb->Data->LayerN - 2; n++) { pcb_layer_t *l = &pcb->Data->Layer[n]; - pcb_layergrp_id_t grp = l->meta.real.grp; + rnd_layergrp_id_t grp = l->meta.real.grp; /*rnd_trace("********* l=%d %s g=%ld (top=%ld bottom=%ld)\n", n, l->name, grp, top_silk, bottom_silk);*/ l->meta.real.grp = -1; @@ -1442,7 +1442,7 @@ /* outline layers did not have auto flkag back then but we need that now for padstack slots */ static void outline_fixup(pcb_board_t *pcb) { - pcb_layer_id_t n; + rnd_layer_id_t n; pcb_layergrp_inhibit_inc(); for(n = 0; n < pcb->Data->LayerN; n++) { @@ -1458,8 +1458,8 @@ static int validate_layer_stack_lyr(pcb_board_t *pcb, lht_node_t *loc) { - pcb_layer_id_t tmp[2], lid; - pcb_layergrp_id_t gid; + rnd_layer_id_t tmp[2], lid; + rnd_layergrp_id_t gid; int n, found; /* check layer->group cross-links */ @@ -1511,7 +1511,7 @@ static int validate_layer_stack_grp(pcb_board_t *pcb, lht_node_t *loc) { - pcb_layergrp_id_t tmp[2]; + rnd_layergrp_id_t tmp[2]; if (rdver == 1) { /*v1 required top and bottom silk */ if (pcb_layergrp_list(pcb, PCB_LYT_TOP | PCB_LYT_SILK, tmp, 2) < 1) @@ -1536,7 +1536,7 @@ grps = lht_dom_hash_get(nd, "groups"); for(grp = lht_dom_first(&it, grps); grp != NULL; grp = lht_dom_next(&it)) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; char *end; const char *prp; @@ -1605,7 +1605,7 @@ layers = lht_dom_hash_get(grp, "layers"); if (layers != NULL) { for(lyr = lht_dom_first(&itt, layers); lyr != NULL; lyr = lht_dom_next(&itt)) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (lyr->type != LHT_TEXT) { iolht_error(lyr, "Invalid layer node type in group '%s' (ignoring the layer)\n", g->name); continue; Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 30970) +++ trunk/src_plugins/io_lihata/write.c (revision 30971) @@ -920,7 +920,7 @@ } -static lht_node_t *build_data_layer(pcb_data_t *data, pcb_layer_t *layer, pcb_layergrp_id_t layer_group, pcb_layer_id_t lid) +static lht_node_t *build_data_layer(pcb_data_t *data, pcb_layer_t *layer, rnd_layergrp_id_t layer_group, rnd_layer_id_t lid) { lht_node_t *obj, *grp, *comb; pcb_line_t *li; @@ -1018,7 +1018,7 @@ layers = lht_dom_node_alloc(LHT_LIST, "layers"); if (wrver == 1) { /* produce an old layer group assignment from top to bottom (needed for v1, good for other versions too) */ - pcb_layergrp_id_t gm, grp[PCB_MAX_LAYERGRP], gtop = -1, gbottom = -1; + rnd_layergrp_id_t gm, grp[PCB_MAX_LAYERGRP], gtop = -1, gbottom = -1; gm = 0; for(n = 0; n < pcb_max_group(PCB); n++) { @@ -1053,7 +1053,7 @@ /* v1 needs to have silk at the end of the list */ for(n = 0; n < pcb_max_layer(PCB); n++) { if ((pcb_layer_flags(PCB, n) & PCB_LYT_SILK) == 0) { - pcb_layergrp_id_t gid = pcb_layer_get_group(PCB, n); + rnd_layergrp_id_t gid = pcb_layer_get_group(PCB, n); LAYER_GID_FIX_V1(); lht_dom_list_append(layers, build_data_layer(data, data->Layer+n, gid, n)); } @@ -1060,7 +1060,7 @@ } for(n = 0; n < pcb_max_layer(PCB); n++) { if (pcb_layer_flags(PCB, n) & PCB_LYT_SILK) { - pcb_layer_id_t gid = pcb_layer_get_group(PCB, n); + rnd_layer_id_t gid = pcb_layer_get_group(PCB, n); LAYER_GID_FIX_V1(); lht_dom_list_append(layers, build_data_layer(data, data->Layer+n, gid, n)); } @@ -1069,7 +1069,7 @@ else { /* keep the original order from v2, to minimize diffs */ for(n = 0; n < data->LayerN; n++) { - pcb_layergrp_id_t gid = pcb_layer_get_group(PCB, n); + rnd_layergrp_id_t gid = pcb_layer_get_group(PCB, n); lht_dom_list_append(layers, build_data_layer(data, data->Layer+n, gid, n)); } } @@ -1751,7 +1751,7 @@ int ver; } io_lihata_save_t; -void *io_lihata_save_as_subd_init(const pcb_plug_io_t *ctx, pcb_hid_dad_subdialog_t *sub, pcb_plug_iot_t type) +void *io_lihata_save_as_subd_init(const pcb_plug_io_t *ctx, rnd_hid_dad_subdialog_t *sub, pcb_plug_iot_t type) { io_lihata_save_t *save = calloc(sizeof(io_lihata_save_t), 1); @@ -1781,7 +1781,7 @@ return save; } -void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, rnd_bool apply) +void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, rnd_hid_dad_subdialog_t *sub, rnd_bool apply) { io_lihata_save_t *save = plg_ctx; @@ -1803,7 +1803,7 @@ free(save); } -void io_lihata_save_as_fmt_changed(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub) +void io_lihata_save_as_fmt_changed(const pcb_plug_io_t *ctx, void *plg_ctx, rnd_hid_dad_subdialog_t *sub) { io_lihata_save_t *save = plg_ctx; save->ver = plug2ver(ctx); Index: trunk/src_plugins/io_lihata/write.h =================================================================== --- trunk/src_plugins/io_lihata/write.h (revision 30970) +++ trunk/src_plugins/io_lihata/write.h (revision 30971) @@ -38,6 +38,6 @@ int io_lihata_write_subcs_subc(pcb_plug_io_t *ctx, void **udata, FILE *f, pcb_subc_t *subc); int io_lihata_write_subcs_tail(pcb_plug_io_t *ctx, void **udata, FILE *f); -void *io_lihata_save_as_subd_init(const pcb_plug_io_t *ctx, pcb_hid_dad_subdialog_t *sub, pcb_plug_iot_t type); -void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub, rnd_bool apply); -void io_lihata_save_as_fmt_changed(const pcb_plug_io_t *ctx, void *plg_ctx, pcb_hid_dad_subdialog_t *sub); +void *io_lihata_save_as_subd_init(const pcb_plug_io_t *ctx, rnd_hid_dad_subdialog_t *sub, pcb_plug_iot_t type); +void io_lihata_save_as_subd_uninit(const pcb_plug_io_t *ctx, void *plg_ctx, rnd_hid_dad_subdialog_t *sub, rnd_bool apply); +void io_lihata_save_as_fmt_changed(const pcb_plug_io_t *ctx, void *plg_ctx, rnd_hid_dad_subdialog_t *sub); Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 30970) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 30971) @@ -886,7 +886,7 @@ return -1; if (subc == NULL) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (purpose == NULL) { if (pcb_layer_list(ctx->pcb, side | type, &lid, 1) != 1) return 0; @@ -911,7 +911,7 @@ char *name = NULL; if (user) { /* user layers are DOC layers identified by name and are allocated on the go */ - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_dflgmap_t map[2]; int retry; @@ -934,7 +934,7 @@ if (strncmp(ln, "LYR_", 4) == 0) { int cidx; char *end; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; TODO("can a subcircuit have intern copper objects? assume NO for now:"); assert(subc == NULL); @@ -1003,7 +1003,7 @@ ly->meta.bound.purpose = rnd_strdup(purpose); } else { - pcb_layer_id_t lid; + rnd_layer_id_t lid; int ln = pcb_layer_listp(ctx->pcb, lyt, &lid, 1, -1, purpose); if (ln == 0) return NULL; Index: trunk/src_plugins/io_mentor_cell/read_net.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read_net.c (revision 30970) +++ trunk/src_plugins/io_mentor_cell/read_net.c (revision 30971) @@ -28,7 +28,7 @@ */ -static rnd_coord_t net_get_clearance_(hkp_ctx_t *ctx, pcb_layer_id_t lid, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) +static rnd_coord_t net_get_clearance_(hkp_ctx_t *ctx, rnd_layer_id_t lid, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) { if ((lid < 0) || (lid >= PCB_MAX_LAYER)) { hkp_error(errnode, "failed to determine clearance, falling back to default value\n"); @@ -39,7 +39,7 @@ static rnd_coord_t net_get_clearance(hkp_ctx_t *ctx, pcb_layer_t *ly, const hkp_netclass_t *nc, hkp_clearance_type_t type, node_t *errnode) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (ly == NULL) /* typically non-copper layer: clearance is 0 */ return 0; @@ -97,7 +97,7 @@ /* load default CLEARANCE_RULE_SET's children */ for(ns = ncrs->first_child; ns != NULL; ns = ns->next) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; rnd_coord_t val; int i; @@ -127,7 +127,7 @@ else continue; /* ignore the rest for now */ for(i = 0; i < grp->len; i++) { - pcb_layer_id_t lid = grp->lid[i]; + rnd_layer_id_t lid = grp->lid[i]; ctx->nc_dflt.clearance[lid][type] = val; } } Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 30970) +++ trunk/src_plugins/io_pcb/file.c (revision 30971) @@ -187,7 +187,7 @@ *cp++ = ':'; sep = 1; for (entry = 0; entry < PCB->LayerGroups.grp[group].len; entry++) { - pcb_layer_id_t layer = PCB->LayerGroups.grp[group].lid[entry]; + rnd_layer_id_t layer = PCB->LayerGroups.grp[group].lid[entry]; sprintf(cp, "%ld", layer + 1); while (*++cp); @@ -661,7 +661,7 @@ } } -static pcb_layer_id_t pcb_layer_get_cached(pcb_board_t *pcb, unsigned int loc, unsigned int typ) +static rnd_layer_id_t pcb_layer_get_cached(pcb_board_t *pcb, unsigned int loc, unsigned int typ) { pcb_layergrp_t *g = pcb_get_grp(&pcb->LayerGroups, loc, typ); if ((g == NULL) || (g->len == 0)) @@ -671,12 +671,12 @@ return g->lid[0]; } -static pcb_layer_id_t pcb_layer_get_bottom_silk(void) +static rnd_layer_id_t pcb_layer_get_bottom_silk(void) { return pcb_layer_get_cached(PCB, PCB_LYT_BOTTOM, PCB_LYT_SILK); } -static pcb_layer_id_t pcb_layer_get_top_silk(void) +static rnd_layer_id_t pcb_layer_get_top_silk(void) { return pcb_layer_get_cached(PCB, PCB_LYT_TOP, PCB_LYT_SILK); } @@ -683,7 +683,7 @@ static void LayersFixup(void) { - pcb_layer_id_t bs, ts; + rnd_layer_id_t bs, ts; int chg = 0; /* the PCB format requires 2 silk layers to be the last; swap layers to make that so */ @@ -791,7 +791,7 @@ /* opening a footprint: we don't have a layer stack; make sure top and bottom copper exist */ { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; int res; res = pcb_layergrp_list(PCB, PCB_LYT_TOP | PCB_LYT_COPPER, &gid, 1); @@ -860,9 +860,9 @@ } -pcb_layer_id_t static new_ly_end(pcb_board_t *pcb, const char *name) +rnd_layer_id_t static new_ly_end(pcb_board_t *pcb, const char *name) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; if (pcb->Data->LayerN >= PCB_MAX_LAYER) return -1; lid = pcb->Data->LayerN; @@ -874,12 +874,12 @@ return lid; } -pcb_layer_id_t static existing_or_new_ly_end(pcb_board_t *pcb, const char *name) +rnd_layer_id_t static existing_or_new_ly_end(pcb_board_t *pcb, const char *name) { - pcb_layer_id_t lid = pcb_layer_by_name(pcb->Data, name); + rnd_layer_id_t lid = pcb_layer_by_name(pcb->Data, name); if (lid >= 0) { if (pcb->Data->Layer[lid].meta.real.grp >= 0) { - pcb_layergrp_id_t gid = pcb->Data->Layer[lid].meta.real.grp; + rnd_layergrp_id_t gid = pcb->Data->Layer[lid].meta.real.grp; pcb_layergrp_del_layer(pcb, gid, lid); pcb->Data->Layer[lid].meta.real.grp = -1; } @@ -888,9 +888,9 @@ return new_ly_end(pcb, name); } -pcb_layer_id_t static new_ly_old(pcb_board_t *pcb, const char *name) +rnd_layer_id_t static new_ly_old(pcb_board_t *pcb, const char *name) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; for(lid = 0; lid < PCB_MAX_LAYER; lid++) { if (pcb->Data->Layer[lid].meta.real.grp == 0) { free((char *)pcb->Data->Layer[lid].name); @@ -906,8 +906,8 @@ int pcb_layer_improvise(pcb_board_t *pcb, rnd_bool setup) { - pcb_layergrp_id_t gid; - pcb_layer_id_t lid, silk = -1; + rnd_layergrp_id_t gid; + rnd_layer_id_t lid, silk = -1; if (setup) { pcb_layer_group_setup_default(pcb); @@ -1160,7 +1160,7 @@ rnd_message(RND_MSG_WARNING, "Broken input file: layer group string doesn't contain layer %ld\n(Trying to fix it by introducing a new intern copper layer)\n", n); if (grp != NULL) { - pcb_layergrp_id_t gid = grp - PCB->LayerGroups.grp; + rnd_layergrp_id_t gid = grp - PCB->LayerGroups.grp; pcb_layer_move_to_group(pcb, n, gid); } else Index: trunk/src_plugins/io_tedax/stackup.c =================================================================== --- trunk/src_plugins/io_tedax/stackup.c (revision 30970) +++ trunk/src_plugins/io_tedax/stackup.c (revision 30971) @@ -276,7 +276,7 @@ int tedax_stackup_fsave(tedax_stackup_t *ctx, pcb_board_t *pcb, const char *stackid, FILE *f) { int prefix = 0; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *grp; fprintf(f, "begin stackup v1 "); Index: trunk/src_plugins/io_tedax/tboard.c =================================================================== --- trunk/src_plugins/io_tedax/tboard.c (revision 30970) +++ trunk/src_plugins/io_tedax/tboard.c (revision 30971) @@ -106,7 +106,7 @@ { htsi_t urefdes; htsi_entry_t *re; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; int n; rnd_attribute_t *a; tedax_stackup_t ctx; Index: trunk/src_plugins/io_tedax/tetest.c =================================================================== --- trunk/src_plugins/io_tedax/tetest.c (revision 30970) +++ trunk/src_plugins/io_tedax/tetest.c (revision 30971) @@ -173,7 +173,7 @@ /*** export HID ***/ -static pcb_export_opt_t tedax_etest_options[] = { +static rnd_export_opt_t tedax_etest_options[] = { {"outfile", "Name of the tedax etest output file", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0}, #define HA_outfile 0 @@ -185,11 +185,11 @@ #define NUM_OPTIONS (sizeof(tedax_etest_options)/sizeof(tedax_etest_options[0])) -static pcb_hid_attr_val_t tedax_etest_values[NUM_OPTIONS]; +static rnd_hid_attr_val_t tedax_etest_values[NUM_OPTIONS]; static const char *tedax_etest_filename; -static pcb_export_opt_t *tedax_etest_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *tedax_etest_get_export_options(rnd_hid_t *hid, int *n) { if ((PCB != NULL) && (tedax_etest_options[HA_outfile].default_val.str == NULL)) pcb_derive_default_filename(PCB->hidlib.filename, &tedax_etest_options[HA_outfile], ".etest.tdx"); @@ -199,7 +199,7 @@ return tedax_etest_options; } -static void tedax_etest_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void tedax_etest_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { int i; const char *name; @@ -226,7 +226,7 @@ pcb_cam_end(&cam); } -static int tedax_etest_usage(pcb_hid_t *hid, const char *topic) +static int tedax_etest_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\ntEDAx etest exporter command line arguments:\n\n"); pcb_hid_usage(tedax_etest_options, sizeof(tedax_etest_options) / sizeof(tedax_etest_options[0])); @@ -235,13 +235,13 @@ } static const char *tedax_etest_cookie = "tEDAx etest"; -static int tedax_etest_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int tedax_etest_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_export_register_opts(tedax_etest_options, sizeof(tedax_etest_options) / sizeof(tedax_etest_options[0]), tedax_etest_cookie, 0); return pcb_hid_parse_command_line(argc, argv); } -static pcb_hid_t exp_tedax_etest; +static rnd_hid_t exp_tedax_etest; void tedax_etest_uninit(void) { @@ -250,11 +250,11 @@ void tedax_etest_init(void) { - memset(&exp_tedax_etest, 0, sizeof(pcb_hid_t)); + memset(&exp_tedax_etest, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(&exp_tedax_etest); - exp_tedax_etest.struct_size = sizeof(pcb_hid_t); + exp_tedax_etest.struct_size = sizeof(rnd_hid_t); exp_tedax_etest.name = "tedax-etest"; exp_tedax_etest.description = "Electric test (list of exposed pads)"; exp_tedax_etest.exporter = 1; Index: trunk/src_plugins/io_tedax/tlayer.c =================================================================== --- trunk/src_plugins/io_tedax/tlayer.c (revision 30970) +++ trunk/src_plugins/io_tedax/tlayer.c (revision 30971) @@ -42,7 +42,7 @@ #include #include "plug_io.h" -int tedax_layer_fsave(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *layname, FILE *f) +int tedax_layer_fsave(pcb_board_t *pcb, rnd_layergrp_id_t gid, const char *layname, FILE *f) { char lntmp[64]; int lno; @@ -124,7 +124,7 @@ return 0; } -int tedax_layer_save(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *layname, const char *fn) +int tedax_layer_save(pcb_board_t *pcb, rnd_layergrp_id_t gid, const char *layname, const char *fn) { int res; FILE *f; Index: trunk/src_plugins/io_tedax/tlayer.h =================================================================== --- trunk/src_plugins/io_tedax/tlayer.h (revision 30970) +++ trunk/src_plugins/io_tedax/tlayer.h (revision 30971) @@ -1,8 +1,8 @@ #include "board.h" #include "layer.h" -int tedax_layer_save(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *layname, const char *fn); -int tedax_layer_fsave(pcb_board_t *pcb, pcb_layergrp_id_t gid, const char *layname, FILE *f); +int tedax_layer_save(pcb_board_t *pcb, rnd_layergrp_id_t gid, const char *layname, const char *fn); +int tedax_layer_fsave(pcb_board_t *pcb, rnd_layergrp_id_t gid, const char *layname, FILE *f); int tedax_layers_load(pcb_data_t *data, const char *fn, const char *blk_id, int silent); int tedax_layers_fload(pcb_data_t *data, FILE *f, const char *blk_id, int silent); Index: trunk/src_plugins/lib_compat_help/layer_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/layer_compat.c (revision 30970) +++ trunk/src_plugins/lib_compat_help/layer_compat.c (revision 30971) @@ -47,10 +47,10 @@ } #endif -int pcb_layer_swap(pcb_board_t *pcb, pcb_layer_id_t lid1, pcb_layer_id_t lid2) +int pcb_layer_swap(pcb_board_t *pcb, rnd_layer_id_t lid1, rnd_layer_id_t lid2) { pcb_layer_t l1tmp, l2tmp; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; if (lid1 == lid2) return 0; Index: trunk/src_plugins/lib_compat_help/layer_compat.h =================================================================== --- trunk/src_plugins/lib_compat_help/layer_compat.h (revision 30970) +++ trunk/src_plugins/lib_compat_help/layer_compat.h (revision 30971) @@ -35,5 +35,5 @@ /* Swap two layers in pcb; useful only in writing the old .pcb format, because silk layers must be the last 2 layers there */ -int pcb_layer_swap(pcb_board_t *pcb, pcb_layer_id_t lid1, pcb_layer_id_t lid2); +int pcb_layer_swap(pcb_board_t *pcb, rnd_layer_id_t lid1, rnd_layer_id_t lid2); #endif Index: trunk/src_plugins/lib_gtk_common/dlg_attr_box.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_box.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_box.c (revision 30971) @@ -26,7 +26,7 @@ /* Boxes and group widgets */ -static int ghid_pane_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int ghid_pane_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { GtkWidget *pane = ctx->wl[idx]; GtkAllocation a; Index: trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_misc.c (revision 30971) @@ -30,7 +30,7 @@ #include "../src_plugins/lib_hid_common/dad_markup.h" -static int ghid_progress_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int ghid_progress_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { GtkWidget *prg = ctx->wl[idx]; double pos = val->dbl; @@ -44,7 +44,7 @@ } -static GtkWidget *ghid_progress_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent, int j) +static GtkWidget *ghid_progress_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent, int j) { GtkWidget *bparent, *prg; @@ -58,7 +58,7 @@ return prg; } -static void ghid_preview_expose(pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void ghid_preview_expose(rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { pcb_hid_preview_t *prv = e->draw_data; prv->user_expose_cb(prv->attrib, prv, gc, e); @@ -72,7 +72,7 @@ return pcb_false; } -void ghid_preview_zoomto(pcb_hid_attribute_t *attrib, void *hid_ctx, const rnd_rnd_box_t *view) +void ghid_preview_zoomto(rnd_hid_attribute_t *attrib, void *hid_ctx, const rnd_rnd_box_t *view) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -81,7 +81,7 @@ gtk_widget_queue_draw(prv); } -static int ghid_preview_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int ghid_preview_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { GtkWidget *prv = ctx->wl[idx]; @@ -100,7 +100,7 @@ } } -static GtkWidget *ghid_preview_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent, int j) +static GtkWidget *ghid_preview_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent, int j) { GtkWidget *bparent, *prv; pcb_gtk_preview_t *p; @@ -130,7 +130,7 @@ return prv; } -static GtkWidget *ghid_picture_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent, int j, GCallback click_cb, void *click_ctx) +static GtkWidget *ghid_picture_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent, int j, GCallback click_cb, void *click_ctx) { GtkWidget *bparent, *pic, *evb; GdkPixbuf *pixbuf; @@ -149,7 +149,7 @@ } -static GtkWidget *ghid_picbutton_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent, int j, int toggle, int expfill) +static GtkWidget *ghid_picbutton_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent, int j, int toggle, int expfill) { GtkWidget *bparent, *button, *img; GdkPixbuf *pixbuf; @@ -171,7 +171,7 @@ return button; } -static GtkWidget *ghid_color_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent, int j) +static GtkWidget *ghid_color_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent, int j) { GtkWidget *bparent, *button; pcb_gtk_color_t gclr; @@ -191,7 +191,7 @@ } -static int ghid_color_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int ghid_color_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { pcb_gtk_color_t gclr; GtkWidget *btn = ctx->wl[idx]; Index: trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_tree.c (revision 30971) @@ -27,7 +27,7 @@ #include -static GtkTreeIter *ghid_tree_table_add(pcb_hid_attribute_t *attr, GtkTreeStore *tstore, GtkTreeIter *par, pcb_hid_row_t *r, int prepend, GtkTreeIter *sibling) +static GtkTreeIter *ghid_tree_table_add(rnd_hid_attribute_t *attr, GtkTreeStore *tstore, GtkTreeIter *par, pcb_hid_row_t *r, int prepend, GtkTreeIter *sibling) { int c; GtkTreeIter *curr = malloc(sizeof(GtkTreeIter)); @@ -68,7 +68,7 @@ } /* insert a subtree of a tree-table widget in a gtk table store reursively */ -static void ghid_tree_table_import(pcb_hid_attribute_t *attr, GtkTreeStore *tstore, gdl_list_t *lst, GtkTreeIter *par) +static void ghid_tree_table_import(rnd_hid_attribute_t *attr, GtkTreeStore *tstore, gdl_list_t *lst, GtkTreeIter *par) { pcb_hid_row_t *r; @@ -80,7 +80,7 @@ /* Return the tree-store data model, which is the child of the filter model attached to the tree widget */ -GtkTreeModel *ghid_tree_table_get_model(attr_dlg_t *ctx, pcb_hid_attribute_t *attrib, int filter) +GtkTreeModel *ghid_tree_table_get_model(attr_dlg_t *ctx, rnd_hid_attribute_t *attrib, int filter) { int idx = attrib - ctx->attrs; GtkWidget *tt = ctx->wl[idx]; @@ -93,7 +93,7 @@ return model; } -static void ghid_tree_table_insert_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *new_row) +static void ghid_tree_table_insert_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *new_row) { attr_dlg_t *ctx = hid_ctx; pcb_hid_row_t *sibling, *par = pcb_dad_tree_parent_row(attrib->wdata, new_row); @@ -114,7 +114,7 @@ ghid_tree_table_add(attrib, GTK_TREE_STORE(model), pariter, new_row, prepnd, sibiter); } -static void ghid_tree_table_remove_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void ghid_tree_table_remove_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { attr_dlg_t *ctx = hid_ctx; GtkTreeModel *model = ghid_tree_table_get_model(ctx, attrib, 0); @@ -122,7 +122,7 @@ row->hid_data = NULL; } -static void ghid_tree_table_modify_cb(pcb_hid_attribute_t *attr, void *hid_ctx, pcb_hid_row_t *row, int col) +static void ghid_tree_table_modify_cb(rnd_hid_attribute_t *attr, void *hid_ctx, pcb_hid_row_t *row, int col) { attr_dlg_t *ctx = hid_ctx; GtkTreeIter *iter = row->hid_data; @@ -143,12 +143,12 @@ } } -static void ghid_tree_table_free_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void ghid_tree_table_free_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { free(row->hid_data); } -static void ghid_tree_table_update_hide(pcb_hid_attribute_t *attrib, void *hid_ctx) +static void ghid_tree_table_update_hide(rnd_hid_attribute_t *attrib, void *hid_ctx) { attr_dlg_t *ctx = hid_ctx; GtkTreeModel *model = ghid_tree_table_get_model(ctx, attrib, 1); @@ -156,7 +156,7 @@ } -static pcb_hid_row_t *ghid_tree_table_get_selected(pcb_hid_attribute_t *attrib, void *hid_ctx) +static pcb_hid_row_t *ghid_tree_table_get_selected(rnd_hid_attribute_t *attrib, void *hid_ctx) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -178,7 +178,7 @@ return r; } -static void ghid_tree_table_cursor(GtkWidget *widget, pcb_hid_attribute_t *attr) +static void ghid_tree_table_cursor(GtkWidget *widget, rnd_hid_attribute_t *attr) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(widget), PCB_OBJ_PROP); pcb_hid_row_t *r = ghid_tree_table_get_selected(attr, ctx); @@ -198,7 +198,7 @@ static gboolean tree_table_filter_visible_func(GtkTreeModel *model, GtkTreeIter *iter, void *user_data) { - pcb_hid_attribute_t *attr = user_data; + rnd_hid_attribute_t *attr = user_data; pcb_hid_row_t *r = NULL; gtk_tree_model_get(model, iter, attr->pcb_hatt_table_cols, &r, -1); @@ -212,7 +212,7 @@ /* Activation (e.g. double-clicking) of a footprint row. As a convenience to the user, GTK provides Shift-Arrow Left, Right to expand or contract any node with children. */ -static void tree_row_activated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, pcb_hid_attribute_t *attr) +static void tree_row_activated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, rnd_hid_attribute_t *attr) { GtkTreeModel *model; GtkTreeIter iter; @@ -228,7 +228,7 @@ /* Key pressed activation handler: CTRL-C -> copy footprint name to clipboard; Enter -> row-activate. */ -static gboolean ghid_tree_table_key_press_cb(GtkTreeView *tree_view, GdkEventKey *event, pcb_hid_attribute_t *attr) +static gboolean ghid_tree_table_key_press_cb(GtkTreeView *tree_view, GdkEventKey *event, rnd_hid_attribute_t *attr) { GtkTreeSelection *selection; GtkTreeModel *model; @@ -324,7 +324,7 @@ } /* Handle the double-click to be equivalent to "row-activated" signal */ -static gboolean ghid_tree_table_button_press_cb(GtkWidget *widget, GdkEvent *ev, pcb_hid_attribute_t *attr) +static gboolean ghid_tree_table_button_press_cb(GtkWidget *widget, GdkEvent *ev, rnd_hid_attribute_t *attr) { GtkTreeView *tv = GTK_TREE_VIEW(widget); GtkTreeModel *model; @@ -343,7 +343,7 @@ return FALSE; } -static gboolean ghid_tree_table_button_release_cb(GtkWidget *widget, GdkEvent *ev, pcb_hid_attribute_t *attr) +static gboolean ghid_tree_table_button_release_cb(GtkWidget *widget, GdkEvent *ev, rnd_hid_attribute_t *attr) { GtkTreeView *tv = GTK_TREE_VIEW(widget); GtkTreeModel *model; @@ -362,10 +362,10 @@ return FALSE; } -static int ghid_tree_table_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int ghid_tree_table_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { GtkWidget *tt = ctx->wl[idx]; - pcb_hid_attribute_t *attr = &ctx->attrs[idx]; + rnd_hid_attribute_t *attr = &ctx->attrs[idx]; GtkTreeModel *model = ghid_tree_table_get_model(ctx, attr, 0); GtkTreePath *path; pcb_hid_tree_t *tree = attr->wdata; @@ -391,7 +391,7 @@ return 0; } -void ghid_tree_table_jumpto_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +void ghid_tree_table_jumpto_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -414,7 +414,7 @@ gtk_tree_view_set_cursor(GTK_TREE_VIEW(tt), path, NULL, FALSE); } -void ghid_tree_table_expcoll_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row, int expanded) +void ghid_tree_table_expcoll_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row, int expanded) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -438,7 +438,7 @@ } -static GtkWidget *ghid_tree_table_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent, int j) +static GtkWidget *ghid_tree_table_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent, int j) { int c; const char **colhdr; @@ -508,7 +508,7 @@ return view; } -static void ghid_tree_pre_free(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, int j) +static void ghid_tree_pre_free(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, int j) { GtkWidget *tt = ctx->wl[j]; /* make sure the model filter functions are not called back in an async call Index: trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_attr_txt.c (revision 30971) @@ -30,7 +30,7 @@ unsigned markup_inited:1; } dad_txt_t; -static void txt_free_cb(pcb_hid_attribute_t *attr, void *hid_ctx) +static void txt_free_cb(rnd_hid_attribute_t *attr, void *hid_ctx) { dad_txt_t *tctx = hid_ctx; free(tctx); @@ -39,7 +39,7 @@ static void txt_changed_cb(GtkTextView *wtxt, gpointer user_data) { dad_txt_t *tctx = user_data; - pcb_hid_attribute_t *attr = &tctx->hid_ctx->attrs[tctx->attr_idx]; + rnd_hid_attribute_t *attr = &tctx->hid_ctx->attrs[tctx->attr_idx]; attr->changed = 1; if (tctx->hid_ctx->inhibit_valchg) return; @@ -46,7 +46,7 @@ change_cb(tctx->hid_ctx, attr); } -static void txt_get_xyo(pcb_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y, long *o) +static void txt_get_xyo(rnd_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y, long *o) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -63,12 +63,12 @@ *o = gtk_text_iter_get_offset(&it); } -static void txt_get_xy(pcb_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y) +static void txt_get_xy(rnd_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y) { txt_get_xyo(attrib, hid_ctx, x, y, NULL); } -static long txt_get_offs(pcb_hid_attribute_t *attrib, void *hid_ctx) +static long txt_get_offs(rnd_hid_attribute_t *attrib, void *hid_ctx) { long o; txt_get_xyo(attrib, hid_ctx, NULL, NULL, &o); @@ -75,7 +75,7 @@ return o; } -static void txt_set_xyo(pcb_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y, long *o) +static void txt_set_xyo(rnd_hid_attribute_t *attrib, void *hid_ctx, long *x, long *y, long *o) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -94,12 +94,12 @@ gtk_text_buffer_place_cursor(b, &it); } -static void txt_set_xy(pcb_hid_attribute_t *attrib, void *hid_ctx, long x, long y) +static void txt_set_xy(rnd_hid_attribute_t *attrib, void *hid_ctx, long x, long y) { txt_set_xyo(attrib, hid_ctx, &x, &y, NULL); } -static void txt_set_offs(pcb_hid_attribute_t *attrib, void *hid_ctx, long offs) +static void txt_set_offs(rnd_hid_attribute_t *attrib, void *hid_ctx, long offs) { txt_set_xyo(attrib, hid_ctx, NULL, NULL, &offs); } @@ -126,7 +126,7 @@ } } -static void txt_set_text(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *str) +static void txt_set_text(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_text_set_t how, const char *str) { attr_dlg_t *ctx = hid_ctx; pcb_hid_text_t *txt = attrib->wdata; @@ -176,13 +176,13 @@ txt_set_text_(b, how, str, strlen(str)); } -static int ghid_text_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val) +static int ghid_text_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val) { txt_set_text(&ctx->attrs[idx], ctx, PCB_HID_TEXT_REPLACE, val->str); return 0; } -static char *txt_get_text(pcb_hid_attribute_t *attrib, void *hid_ctx) +static char *txt_get_text(rnd_hid_attribute_t *attrib, void *hid_ctx) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -195,7 +195,7 @@ return gtk_text_buffer_get_text(b, &it, &it2, 0); } -static void txt_set_readonly(pcb_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly) +static void txt_set_readonly(rnd_hid_attribute_t *attrib, void *hid_ctx, rnd_bool readonly) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -203,7 +203,7 @@ gtk_text_view_set_editable(GTK_TEXT_VIEW(wtxt), !readonly); } -static void txt_scroll_to_bottom(pcb_hid_attribute_t *attrib, void *hid_ctx) +static void txt_scroll_to_bottom(rnd_hid_attribute_t *attrib, void *hid_ctx) { attr_dlg_t *ctx = hid_ctx; int idx = attrib - ctx->attrs; @@ -220,7 +220,7 @@ gtk_text_buffer_delete_mark(buffer, mark); } -static GtkWidget *ghid_text_create(attr_dlg_t *ctx, pcb_hid_attribute_t *attr, GtkWidget *parent) +static GtkWidget *ghid_text_create(attr_dlg_t *ctx, rnd_hid_attribute_t *attr, GtkWidget *parent) { GtkWidget *wtxt; GtkTextBuffer *buffer; Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.c (revision 30971) @@ -52,13 +52,13 @@ typedef struct { void *caller_data; /* WARNING: for now, this must be the first field (see core spinbox enter_cb) */ pcb_gtk_t *gctx; - pcb_hid_attribute_t *attrs; + rnd_hid_attribute_t *attrs; GtkWidget **wl; /* content widget */ GtkWidget **wltop; /* the parent widget, which is different from wl if reparenting (extra boxes, e.g. for framing or scrolling) was needed */ int n_attrs; GtkWidget *dialog; int close_cb_called; - pcb_hid_attr_val_t property[PCB_HATP_max]; + rnd_hid_attr_val_t property[PCB_HATP_max]; void (*close_cb)(void *caller_data, pcb_hid_attr_ev_t ev); char *id; gulong destroy_handler; @@ -91,7 +91,7 @@ static void set_flag_cb(GtkToggleButton *button, gpointer user_data) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(button), PCB_OBJ_PROP); - pcb_hid_attribute_t *dst = user_data; + rnd_hid_attribute_t *dst = user_data; dst->changed = 1; if (ctx->inhibit_valchg) @@ -101,7 +101,7 @@ change_cb(ctx, dst); } -static void entry_changed_cb(GtkEntry *entry, pcb_hid_attribute_t *dst) +static void entry_changed_cb(GtkEntry *entry, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(entry), PCB_OBJ_PROP); @@ -114,13 +114,13 @@ change_cb(ctx, dst); } -static void entry_activate_cb(GtkEntry *entry, pcb_hid_attribute_t *dst) +static void entry_activate_cb(GtkEntry *entry, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(entry), PCB_OBJ_PROP); enter_cb(ctx, dst); } -static void enum_changed_cb(GtkComboBox *combo_box, pcb_hid_attribute_t *dst) +static void enum_changed_cb(GtkComboBox *combo_box, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(combo_box), PCB_OBJ_PROP); @@ -132,7 +132,7 @@ change_cb(ctx, dst); } -static void notebook_changed_cb(GtkNotebook *nb, GtkWidget *page, guint page_num, pcb_hid_attribute_t *dst) +static void notebook_changed_cb(GtkNotebook *nb, GtkWidget *page, guint page_num, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(nb), PCB_OBJ_PROP); @@ -148,7 +148,7 @@ } } -static void button_changed_cb(GtkButton *button, pcb_hid_attribute_t *dst) +static void button_changed_cb(GtkButton *button, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(button), PCB_OBJ_PROP); @@ -159,7 +159,7 @@ change_cb(ctx, dst); } -static void label_click_cb(GtkButton *evbox, GdkEvent *event, pcb_hid_attribute_t *dst) +static void label_click_cb(GtkButton *evbox, GdkEvent *event, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(evbox), PCB_OBJ_PROP); @@ -176,7 +176,7 @@ } } -static void color_changed_cb(GtkColorButton *button, pcb_hid_attribute_t *dst) +static void color_changed_cb(GtkColorButton *button, rnd_hid_attribute_t *dst) { attr_dlg_t *ctx = g_object_get_data(G_OBJECT(button), PCB_OBJ_PROP); pcb_gtk_color_t clr; @@ -555,7 +555,7 @@ return j; } -static int ghid_attr_dlg_set(attr_dlg_t *ctx, int idx, const pcb_hid_attr_val_t *val, int *copied) +static int ghid_attr_dlg_set(attr_dlg_t *ctx, int idx, const rnd_hid_attr_val_t *val, int *copied) { int ret, save; save = ctx->inhibit_valchg; @@ -770,7 +770,7 @@ ghid_attr_dlg_widget_hide_(ctx, n, 1); } -void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { GtkWidget *content_area; GtkWidget *main_vbox; @@ -833,7 +833,7 @@ return ctx; } -void *ghid_attr_sub_new(pcb_gtk_t *gctx, GtkWidget *parent_box, pcb_hid_attribute_t *attrs, int n_attrs, void *caller_data) +void *ghid_attr_sub_new(pcb_gtk_t *gctx, GtkWidget *parent_box, rnd_hid_attribute_t *attrs, int n_attrs, void *caller_data) { attr_dlg_t *ctx; @@ -917,7 +917,7 @@ free(ctx); } -void ghid_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val) +void ghid_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val) { attr_dlg_t *ctx = hid_ctx; @@ -970,7 +970,7 @@ return ghid_attr_dlg_widget_hide_(ctx, idx, hide); } -int ghid_attr_dlg_set_value(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val) +int ghid_attr_dlg_set_value(void *hid_ctx, int idx, const rnd_hid_attr_val_t *val) { attr_dlg_t *ctx = hid_ctx; int res, copied; Index: trunk/src_plugins/lib_gtk_common/dlg_attribute.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_attribute.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_attribute.h (revision 30971) @@ -2,22 +2,22 @@ #include #include "pcb_gtk.h" -void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); +void *ghid_attr_dlg_new(pcb_gtk_t *gctx, const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny); int ghid_attr_dlg_run(void *hid_ctx); void ghid_attr_dlg_raise(void *hid_ctx); void ghid_attr_dlg_close(void *hid_ctx); void ghid_attr_dlg_free(void *hid_ctx); -void ghid_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const pcb_hid_attr_val_t *val); +void ghid_attr_dlg_property(void *hid_ctx, pcb_hat_property_t prop, const rnd_hid_attr_val_t *val); int ghid_attr_dlg_widget_state(void *hid_ctx, int idx, int enabled); int ghid_attr_dlg_widget_hide(void *hid_ctx, int idx, rnd_bool hide); -int ghid_attr_dlg_set_value(void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); +int ghid_attr_dlg_set_value(void *hid_ctx, int idx, const rnd_hid_attr_val_t *val); void ghid_attr_dlg_set_help(void *hid_ctx, int idx, const char *val); /* Create an interacgive DAD subdialog under parent_vbox */ -void *ghid_attr_sub_new(pcb_gtk_t *gctx, GtkWidget *parent_box, pcb_hid_attribute_t *attrs, int n_attrs, void *caller_data); +void *ghid_attr_sub_new(pcb_gtk_t *gctx, GtkWidget *parent_box, rnd_hid_attribute_t *attrs, int n_attrs, void *caller_data); /* Fix up background color of various widgets - useful if the host dialog's background color is not the default */ void pcb_gtk_dad_fixcolor(void *hid_ctx, const GdkColor *color); Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.c (revision 30971) @@ -84,7 +84,7 @@ void *hid_ctx; /* DAD subdialog context */ } pcb_gtk_fsd_t; -static int pcb_gtk_fsd_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) +static int pcb_gtk_fsd_poke(rnd_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { pcb_gtk_fsd_t *pctx = sub->parent_ctx; @@ -116,7 +116,7 @@ return -1; } -char *pcb_gtk_fileselect(pcb_gtk_t *gctx, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) +char *pcb_gtk_fileselect(pcb_gtk_t *gctx, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub) { GtkWidget *top_window = gctx->wtop_window; gchar *path = NULL, *base = NULL, *res = NULL; Index: trunk/src_plugins/lib_gtk_common/dlg_fileselect.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_fileselect.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_fileselect.h (revision 30971) @@ -1,4 +1,4 @@ #include #include -char *pcb_gtk_fileselect(pcb_gtk_t *gctx, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub); +char *pcb_gtk_fileselect(pcb_gtk_t *gctx, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub); Index: trunk/src_plugins/lib_gtk_common/dlg_topwin.c =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_topwin.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_topwin.c (revision 30971) @@ -63,7 +63,7 @@ #include "glue_common.h" /*** docking code (dynamic parts) ***/ -static int pcb_gtk_dock_poke(pcb_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) +static int pcb_gtk_dock_poke(rnd_hid_dad_subdialog_t *sub, const char *cmd, rnd_event_arg_t *res, int argc, rnd_event_arg_t *argv) { return -1; } @@ -78,7 +78,7 @@ GdkColor clr_orange = {0, 0xffff, 0xaaaa, 0x3333}; static GdkColor *pcb_dock_color[PCB_HID_DOCK_max] = {NULL, NULL, &clr_orange, NULL, NULL, NULL}; /* force change color when docked */ -int pcb_gtk_tw_dock_enter(pcb_gtk_topwin_t *tw, pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) +int pcb_gtk_tw_dock_enter(pcb_gtk_topwin_t *tw, rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) { docked_t *docked; GtkWidget *hvbox; @@ -128,7 +128,7 @@ return 0; } -void pcb_gtk_tw_dock_leave(pcb_gtk_topwin_t *tw, pcb_hid_dad_subdialog_t *sub) +void pcb_gtk_tw_dock_leave(pcb_gtk_topwin_t *tw, rnd_hid_dad_subdialog_t *sub) { docked_t *docked = sub->parent_ctx; gtk_widget_destroy(docked->frame); Index: trunk/src_plugins/lib_gtk_common/dlg_topwin.h =================================================================== --- trunk/src_plugins/lib_gtk_common/dlg_topwin.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/dlg_topwin.h (revision 30971) @@ -21,8 +21,8 @@ void pcb_gtk_tw_interface_set_sensitive(pcb_gtk_topwin_t *tw, gboolean sensitive); -int pcb_gtk_tw_dock_enter(pcb_gtk_topwin_t *tw, pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); -void pcb_gtk_tw_dock_leave(pcb_gtk_topwin_t *tw, pcb_hid_dad_subdialog_t *sub); +int pcb_gtk_tw_dock_enter(pcb_gtk_topwin_t *tw, rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id); +void pcb_gtk_tw_dock_leave(pcb_gtk_topwin_t *tw, rnd_hid_dad_subdialog_t *sub); void pcb_gtk_tw_set_title(pcb_gtk_topwin_t *tw, const char *title); Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30971) @@ -285,7 +285,7 @@ static void ghid_load_bg_image(void) { - static pcb_pixmap_t pxm; + static rnd_pixmap_t pxm; ghidgui->bg_pixmap.pxm = NULL; ghidgui->bg_pixmap.image = NULL; Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 30971) @@ -137,7 +137,7 @@ } -static void gtkhid_do_export(pcb_hid_t *hid, pcb_hid_attr_val_t *options) +static void gtkhid_do_export(rnd_hid_t *hid, rnd_hid_attr_val_t *options) { pcb_gtk_t *gctx = hid->hid_data; @@ -187,7 +187,7 @@ hid->hid_data = NULL; } -static void ghid_do_exit(pcb_hid_t *hid) +static void ghid_do_exit(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; @@ -213,7 +213,7 @@ } /* Create top level window for routines that will need top_window before ghid_create_pcb_widgets() is called. */ -int gtkhid_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +int gtkhid_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_gtk_t *gctx = hid->hid_data; GtkWidget *window; @@ -244,12 +244,12 @@ return 0; } -static void ghid_calibrate(pcb_hid_t *hid, double xval, double yval) +static void ghid_calibrate(rnd_hid_t *hid, double xval, double yval) { printf("ghid_calibrate() -- not implemented\n"); } -static void ghid_set_crosshair(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) +static void ghid_set_crosshair(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int action) { pcb_gtk_t *gctx = hid->hid_data; int offset_x, offset_y; @@ -262,45 +262,45 @@ pcb_gtk_crosshair_set(x, y, action, offset_x, offset_y, &gctx->port.view); } -static void ghid_get_coords(pcb_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) +static void ghid_get_coords(rnd_hid_t *hid, const char *msg, rnd_coord_t *x, rnd_coord_t *y, int force) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_get_coords(gctx, &gctx->port.view, msg, x, y, force); } -pcb_hidval_t ghid_add_timer(pcb_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) +pcb_hidval_t ghid_add_timer(rnd_hid_t *hid, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data) { return pcb_gtk_add_timer((pcb_gtk_t *)hid->hid_data, func, milliseconds, user_data); } -static pcb_hidval_t ghid_watch_file(pcb_hid_t *hid, int fd, unsigned int condition, +static pcb_hidval_t ghid_watch_file(rnd_hid_t *hid, int fd, unsigned int condition, rnd_bool (*func)(pcb_hidval_t, int, unsigned int, pcb_hidval_t), pcb_hidval_t user_data) { return pcb_gtk_watch_file((pcb_gtk_t *)hid->hid_data, fd, condition, func, user_data); } -static char *ghid_fileselect(pcb_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, pcb_hid_dad_subdialog_t *sub) +static char *ghid_fileselect(rnd_hid_t *hid, const char *title, const char *descr, const char *default_file, const char *default_ext, const pcb_hid_fsd_filter_t *flt, const char *history_tag, pcb_hid_fsd_flags_t flags, rnd_hid_dad_subdialog_t *sub) { return pcb_gtk_fileselect((pcb_gtk_t *)hid->hid_data, title, descr, default_file, default_ext, flt, history_tag, flags, sub); } -static void *ghid_attr_dlg_new_(pcb_hid_t *hid, const char *id, pcb_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) +static void *ghid_attr_dlg_new_(rnd_hid_t *hid, const char *id, rnd_hid_attribute_t *attrs, int n_attrs, const char *title, void *caller_data, rnd_bool modal, void (*button_cb)(void *caller_data, pcb_hid_attr_ev_t ev), int defx, int defy, int minx, int miny) { return ghid_attr_dlg_new((pcb_gtk_t *)hid->hid_data, id, attrs, n_attrs, title, caller_data, modal, button_cb, defx, defy, minx, miny); } -static void ghid_beep(pcb_hid_t *hid) +static void ghid_beep(rnd_hid_t *hid) { gdk_beep(); } -static void ghid_attributes(pcb_hid_t *hid, const char *owner, rnd_attribute_list_t *attrs) +static void ghid_attributes(rnd_hid_t *hid, const char *owner, rnd_attribute_list_t *attrs) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_dlg_attributes(gctx->port.top_window, owner, attrs); } -static void PointCursor(pcb_hid_t *hid, rnd_bool grabbed) +static void PointCursor(rnd_hid_t *hid, rnd_bool grabbed) { pcb_gtk_t *gctx = hid->hid_data; @@ -311,7 +311,7 @@ } /* Create a new menu by path */ -static int ghid_remove_menu(pcb_hid_t *hid, const char *menu_path) +static int ghid_remove_menu(rnd_hid_t *hid, const char *menu_path) { pcb_gtk_t *gctx = hid->hid_data; @@ -320,19 +320,19 @@ return pcb_hid_cfg_remove_menu(gctx->topwin.ghid_cfg, menu_path, ghid_remove_menu_widget, gctx->topwin.menu.menu_bar); } -static int ghid_remove_menu_node(pcb_hid_t *hid, lht_node_t *node) +static int ghid_remove_menu_node(rnd_hid_t *hid, lht_node_t *node) { pcb_gtk_t *gctx = hid->hid_data; return pcb_hid_cfg_remove_menu_node(gctx->topwin.ghid_cfg, node, ghid_remove_menu_widget, gctx->topwin.menu.menu_bar); } -static void ghid_create_menu(pcb_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) +static void ghid_create_menu(rnd_hid_t *hid, const char *menu_path, const pcb_menu_prop_t *props) { pcb_gtk_t *gctx = hid->hid_data; pcb_hid_cfg_create_menu(gctx->topwin.ghid_cfg, menu_path, props, ghid_create_menu_widget, &gctx->topwin.menu); } -static void ghid_update_menu_checkbox(pcb_hid_t *hid, const char *cookie) +static void ghid_update_menu_checkbox(rnd_hid_t *hid, const char *cookie) { pcb_gtk_t *gctx = hid->hid_data; if ((gctx->hid_active) && (gctx->hidlib != NULL)) @@ -339,7 +339,7 @@ ghid_update_toggle_flags(gctx->hidlib, &gctx->topwin, cookie); } -rnd_hid_cfg_t *ghid_get_menu_cfg(pcb_hid_t *hid) +rnd_hid_cfg_t *ghid_get_menu_cfg(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; if (!gctx->hid_active) @@ -347,7 +347,7 @@ return gctx->topwin.ghid_cfg; } -static int ghid_usage(pcb_hid_t *hid, const char *topic) +static int ghid_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nGTK GUI command line arguments:\n\n"); rnd_conf_usage("plugins/hid_gtk", pcb_hid_usage_option); @@ -358,13 +358,13 @@ return 0; } -static const char *ghid_command_entry(pcb_hid_t *hid, const char *ovr, int *cursor) +static const char *ghid_command_entry(rnd_hid_t *hid, const char *ovr, int *cursor) { pcb_gtk_t *gctx = hid->hid_data; return pcb_gtk_cmd_command_entry(&gctx->topwin.cmd, ovr, cursor); } -static int ghid_clip_set(pcb_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len) +static int ghid_clip_set(rnd_hid_t *hid, pcb_hid_clipfmt_t format, const void *data, size_t len) { GtkClipboard *cbrd = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); @@ -378,7 +378,7 @@ -int ghid_clip_get(pcb_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len) +int ghid_clip_get(rnd_hid_t *hid, pcb_hid_clipfmt_t *format, void **data, size_t *len) { GtkClipboard *cbrd = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); @@ -393,7 +393,7 @@ return -1; } -void ghid_clip_free(pcb_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len) +void ghid_clip_free(rnd_hid_t *hid, pcb_hid_clipfmt_t format, void *data, size_t len) { switch(format) { case PCB_HID_CLIPFMT_TEXT: @@ -402,13 +402,13 @@ } } -static void ghid_iterate(pcb_hid_t *hid) +static void ghid_iterate(rnd_hid_t *hid) { while(gtk_events_pending()) gtk_main_iteration_do(0); } -static double ghid_benchmark(pcb_hid_t *hid) +static double ghid_benchmark(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; int i = 0; @@ -432,25 +432,25 @@ return i/10.0; } -static int ghid_dock_enter(pcb_hid_t *hid, pcb_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) +static int ghid_dock_enter(rnd_hid_t *hid, rnd_hid_dad_subdialog_t *sub, pcb_hid_dock_t where, const char *id) { pcb_gtk_t *gctx = hid->hid_data; return pcb_gtk_tw_dock_enter(&gctx->topwin, sub, where, id); } -static void ghid_dock_leave(pcb_hid_t *hid, pcb_hid_dad_subdialog_t *sub) +static void ghid_dock_leave(rnd_hid_t *hid, rnd_hid_dad_subdialog_t *sub) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_tw_dock_leave(&gctx->topwin, sub); } -static void ghid_zoom_win(pcb_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) +static void ghid_zoom_win(rnd_hid_t *hid, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2, rnd_bool set_crosshair) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_zoom_view_win_side(&gctx->port.view, x1, y1, x2, y2, set_crosshair); } -static void ghid_zoom(pcb_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) +static void ghid_zoom(rnd_hid_t *hid, rnd_coord_t center_x, rnd_coord_t center_y, double factor, int relative) { pcb_gtk_t *gctx = hid->hid_data; if (relative) @@ -459,7 +459,7 @@ pcb_gtk_zoom_view_abs(&gctx->port.view, center_x, center_y, factor); } -static void ghid_pan(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) +static void ghid_pan(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, int relative) { pcb_gtk_t *gctx = hid->hid_data; if (relative) @@ -468,13 +468,13 @@ pcb_gtk_pan_view_abs(&gctx->port.view, x, y, gctx->port.view.canvas_width/2.0, gctx->port.view.canvas_height/2.0); } -static void ghid_pan_mode(pcb_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) +static void ghid_pan_mode(rnd_hid_t *hid, rnd_coord_t x, rnd_coord_t y, rnd_bool mode) { pcb_gtk_t *gctx = hid->hid_data; gctx->port.view.panning = mode; } -static void ghid_view_get(pcb_hid_t *hid, rnd_rnd_box_t *viewbox) +static void ghid_view_get(rnd_hid_t *hid, rnd_rnd_box_t *viewbox) { pcb_gtk_t *gctx = hid->hid_data; viewbox->X1 = gctx->port.view.x0; @@ -483,13 +483,13 @@ viewbox->Y2 = rnd_round((double)gctx->port.view.y0 + (double)gctx->port.view.canvas_height * gctx->port.view.coord_per_px); } -static void ghid_open_command(pcb_hid_t *hid) +static void ghid_open_command(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; ghid_handle_user_command(gctx->hidlib, &gctx->topwin.cmd, TRUE); } -static int ghid_open_popup(pcb_hid_t *hid, const char *menupath) +static int ghid_open_popup(rnd_hid_t *hid, const char *menupath) { pcb_gtk_t *gctx = hid->hid_data; GtkWidget *menu = NULL; @@ -510,7 +510,7 @@ return 0; } -static void ghid_set_hidlib(pcb_hid_t *hid, rnd_hidlib_t *hidlib) +static void ghid_set_hidlib(rnd_hid_t *hid, rnd_hidlib_t *hidlib) { pcb_gtk_t *gctx = hid->hid_data; @@ -532,23 +532,23 @@ pcb_gtk_zoom_view_win_side(&gctx->port.view, 0, 0, hidlib->size_x, hidlib->size_y, 0); } -static void ghid_reg_mouse_cursor(pcb_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask) +static void ghid_reg_mouse_cursor(rnd_hid_t *hid, int idx, const char *name, const unsigned char *pixel, const unsigned char *mask) { ghid_port_reg_mouse_cursor((pcb_gtk_t *)hid->hid_data, idx, name, pixel, mask); } -static void ghid_set_mouse_cursor(pcb_hid_t *hid, int idx) +static void ghid_set_mouse_cursor(rnd_hid_t *hid, int idx) { ghid_port_set_mouse_cursor((pcb_gtk_t *)hid->hid_data, idx); } -static void ghid_set_top_title(pcb_hid_t *hid, const char *title) +static void ghid_set_top_title(rnd_hid_t *hid, const char *title) { pcb_gtk_t *gctx = hid->hid_data; pcb_gtk_tw_set_title(&gctx->topwin, title); } -static void ghid_busy(pcb_hid_t *hid, rnd_bool busy) +static void ghid_busy(rnd_hid_t *hid, rnd_bool busy) { pcb_gtk_t *gctx = hid->hid_data; if ((gctx == NULL) || (!gctx->hid_active)) @@ -559,7 +559,7 @@ ghid_restore_cursor(gctx); } -static int ghid_shift_is_pressed(pcb_hid_t *hid) +static int ghid_shift_is_pressed(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; GdkModifierType mask; @@ -578,7 +578,7 @@ #endif } -static int ghid_control_is_pressed(pcb_hid_t *hid) +static int ghid_control_is_pressed(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; GdkModifierType mask; @@ -597,7 +597,7 @@ #endif } -static int ghid_mod1_is_pressed(pcb_hid_t *hid) +static int ghid_mod1_is_pressed(rnd_hid_t *hid) { pcb_gtk_t *gctx = hid->hid_data; GdkModifierType mask; @@ -614,7 +614,7 @@ #endif } -static void ghid_init_pixmap(pcb_hid_t *hid, pcb_pixmap_t *pxm) +static void ghid_init_pixmap(rnd_hid_t *hid, rnd_pixmap_t *pxm) { pcb_gtk_pixmap_t *gtk_px = calloc(sizeof(pcb_gtk_pixmap_t), 1); @@ -623,7 +623,7 @@ ghid_init_pixmap_(gtk_px); } -static void ghid_draw_pixmap(pcb_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, const pcb_pixmap_t *pixmap) +static void ghid_draw_pixmap(rnd_hid_t *hid, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t sx, rnd_coord_t sy, const rnd_pixmap_t *pixmap) { pcb_gtk_t *gctx = hid->hid_data; TODO("gfx: this use of sx/sy ignores rotation"); @@ -639,13 +639,13 @@ } } -void ghid_glue_hid_init(pcb_hid_t *dst) +void ghid_glue_hid_init(rnd_hid_t *dst) { - memset(dst, 0, sizeof(pcb_hid_t)); + memset(dst, 0, sizeof(rnd_hid_t)); pcb_hid_nogui_init(dst); - dst->struct_size = sizeof(pcb_hid_t); + dst->struct_size = sizeof(rnd_hid_t); dst->gui = 1; dst->heavy_term_layer_ind = 1; dst->allow_dad_before_init = 1; Index: trunk/src_plugins/lib_gtk_common/glue_hid.h =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/glue_hid.h (revision 30971) @@ -1,5 +1,5 @@ #include -void ghid_glue_hid_init(pcb_hid_t *dst); -int gtkhid_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv); +void ghid_glue_hid_init(rnd_hid_t *dst); +int gtkhid_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv); Index: trunk/src_plugins/lib_gtk_common/pcb_gtk.h =================================================================== --- trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30971) @@ -58,7 +58,7 @@ GtkWidget *(*new_drawing_widget)(pcb_gtk_impl_t *impl); void (*init_drawing_widget)(GtkWidget *widget, void *gport); - gboolean (*preview_expose)(GtkWidget *widget, pcb_gtk_expose_t *p, pcb_hid_expose_t expcall, pcb_hid_expose_ctx_t *ctx); /* p == NULL when called from the code, not from a GUI expose event */ + gboolean (*preview_expose)(GtkWidget *widget, pcb_gtk_expose_t *p, pcb_hid_expose_t expcall, rnd_hid_expose_ctx_t *ctx); /* p == NULL when called from the code, not from a GUI expose event */ void (*load_bg_image)(void); void (*init_renderer)(int *argc, char ***argv, void *port); void (*draw_grid_local)(rnd_hidlib_t *hidlib, rnd_coord_t cx, rnd_coord_t cy); @@ -141,7 +141,7 @@ #include struct pcb_gtk_pixmap_s { - pcb_pixmap_t *pxm; /* core-side pixmap (raw input image) */ + rnd_pixmap_t *pxm; /* core-side pixmap (raw input image) */ GdkPixbuf *image; /* input image converted to gdk */ /* backend/renderer cache */ Index: trunk/src_plugins/lib_gtk_common/util_timer.c =================================================================== --- trunk/src_plugins/lib_gtk_common/util_timer.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/util_timer.c (revision 30971) @@ -60,7 +60,7 @@ return ret; } -void ghid_stop_timer(pcb_hid_t *hid, pcb_hidval_t timer) +void ghid_stop_timer(rnd_hid_t *hid, pcb_hidval_t timer) { void *ptr = timer.ptr; Index: trunk/src_plugins/lib_gtk_common/util_timer.h =================================================================== --- trunk/src_plugins/lib_gtk_common/util_timer.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/util_timer.h (revision 30971) @@ -2,4 +2,4 @@ #include "pcb_gtk.h" pcb_hidval_t pcb_gtk_add_timer(struct pcb_gtk_s *gctx, void (*func)(pcb_hidval_t user_data), unsigned long milliseconds, pcb_hidval_t user_data); -void ghid_stop_timer(pcb_hid_t *hid, pcb_hidval_t timer); +void ghid_stop_timer(rnd_hid_t *hid, pcb_hidval_t timer); Index: trunk/src_plugins/lib_gtk_common/util_watch.c =================================================================== --- trunk/src_plugins/lib_gtk_common/util_watch.c (revision 30970) +++ trunk/src_plugins/lib_gtk_common/util_watch.c (revision 30971) @@ -93,7 +93,7 @@ return ret; } -void pcb_gtk_unwatch_file(pcb_hid_t *hid, pcb_hidval_t data) +void pcb_gtk_unwatch_file(rnd_hid_t *hid, pcb_hidval_t data) { pcb_gtk_watch_t *watch = (pcb_gtk_watch_t *)data.ptr; Index: trunk/src_plugins/lib_gtk_common/util_watch.h =================================================================== --- trunk/src_plugins/lib_gtk_common/util_watch.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/util_watch.h (revision 30971) @@ -5,5 +5,5 @@ rnd_bool (*func)(pcb_hidval_t watch, int fd, unsigned int condition, pcb_hidval_t user_data), pcb_hidval_t user_data); -void pcb_gtk_unwatch_file(pcb_hid_t *hid, pcb_hidval_t data); +void pcb_gtk_unwatch_file(rnd_hid_t *hid, pcb_hidval_t data); Index: trunk/src_plugins/lib_gtk_common/wt_preview.h =================================================================== --- trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 30970) +++ trunk/src_plugins/lib_gtk_common/wt_preview.h (revision 30971) @@ -57,13 +57,13 @@ typedef void (*pcb_gtk_init_drawing_widget_t)(GtkWidget *widget, void *port); typedef void (*pcb_gtk_preview_config_t)(pcb_gtk_preview_t *gp, GtkWidget *widget); -typedef gboolean(*pcb_gtk_preview_expose_t)(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, pcb_hid_expose_ctx_t *ctx); +typedef gboolean(*pcb_gtk_preview_expose_t)(GtkWidget *widget, pcb_gtk_expose_t *ev, pcb_hid_expose_t expcall, rnd_hid_expose_ctx_t *ctx); typedef rnd_bool(*pcb_gtk_preview_mouse_ev_t)(void *widget, void *draw_data, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y); struct pcb_gtk_preview_s { GtkDrawingArea parent_instance; - pcb_hid_expose_ctx_t expose_data; + rnd_hid_expose_ctx_t expose_data; pcb_gtk_view_t view; rnd_coord_t x_min, y_min, x_max, y_max; /* for the obj preview: bounding box */ Index: trunk/src_plugins/lib_hid_common/act_dad.c =================================================================== --- trunk/src_plugins/lib_hid_common/act_dad.c (revision 30970) +++ trunk/src_plugins/lib_hid_common/act_dad.c (revision 30971) @@ -109,7 +109,7 @@ dad_destroy(dad); } -static void dad_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void dad_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { dad_t *dad = caller_data; int idx = attr - dad->dlg; @@ -118,7 +118,7 @@ rnd_parse_command(dad->hidlib, *act, 1); } -static void dad_row_free_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void dad_row_free_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; dad_t *dad = tree->user_ctx; Index: trunk/src_plugins/lib_hid_common/dlg_comm_m.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 30970) +++ trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 30971) @@ -38,7 +38,7 @@ static const char nope[] = "Do not use."; -static void prompt_enter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prompt_enter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_dad_retovr_t **ro = attr->user_data; pcb_hid_dad_close(hid_ctx, *ro, 0); @@ -146,9 +146,9 @@ return c; } -static void color_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void color_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; clrpick_t *ctx = caller_data; rnd_color_load_int(&ctx->clr, clamp(ctx->dlg[ctx->wr].val.lng), clamp(ctx->dlg[ctx->wg].val.lng), clamp(ctx->dlg[ctx->wb].val.lng), 255); @@ -162,7 +162,7 @@ const char *pcb_acts_gui_PromptFor = nope; pcb_hid_dad_buttons_t clbtn[] = {{"ok", 0}, {"cancel", 1}, {NULL, 0}}; clrpick_t ctx; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; RND_PCB_ACT_CONVARG(1, FGW_STR, gui_PromptFor, sclr = argv[1].val.str); Index: trunk/src_plugins/lib_hid_common/dlg_log.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_log.c (revision 30970) +++ trunk/src_plugins/lib_hid_common/dlg_log.c (revision 30971) @@ -53,7 +53,7 @@ ctx->active = 0; } -static void log_append(log_ctx_t *ctx, pcb_hid_attribute_t *atxt, rnd_logline_t *line) +static void log_append(log_ctx_t *ctx, rnd_hid_attribute_t *atxt, rnd_logline_t *line) { pcb_hid_text_t *txt = atxt->wdata; const char *prefix = NULL; @@ -103,19 +103,19 @@ static void log_import(log_ctx_t *ctx) { rnd_logline_t *n; - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; for(n = rnd_log_find_min(ctx->last_added); n != NULL; n = n->next) log_append(ctx, atxt, n); } -static void btn_clear_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_clear_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { log_ctx_t *ctx = caller_data; rnd_actionva(ctx->hidlib, "log", "clear", NULL); } -static void btn_export_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_export_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { log_ctx_t *ctx = caller_data; rnd_actionva(ctx->hidlib, "log", "export", NULL); @@ -123,7 +123,7 @@ static void maybe_scroll_to_bottom() { - pcb_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; + rnd_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; pcb_hid_text_t *txt = atxt->wdata; if ((log_ctx.dlg[log_ctx.wscroll].val.lng) && (txt->hid_scroll_to_bottom != NULL)) @@ -133,7 +133,7 @@ static void log_window_create(rnd_hidlib_t *hidlib) { log_ctx_t *ctx = &log_ctx; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; char *title; if (ctx->active) @@ -173,7 +173,7 @@ free(title); { - pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; + rnd_hid_attribute_t *atxt = &ctx->dlg[ctx->wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_readonly(atxt, ctx->dlg_hid_ctx, 1); } @@ -198,7 +198,7 @@ rnd_logline_t *line = argv[1].d.p; if (log_ctx.active) { - pcb_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; + rnd_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; log_append(&log_ctx, atxt, line); maybe_scroll_to_bottom(); @@ -216,7 +216,7 @@ static void log_clear_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (log_ctx.active) { - pcb_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; + rnd_hid_attribute_t *atxt = &log_ctx.dlg[log_ctx.wtxt]; pcb_hid_text_t *txt = atxt->wdata; txt->hid_set_text(atxt, log_ctx.dlg_hid_ctx, PCB_HID_TEXT_REPLACE, ""); Index: trunk/src_plugins/lib_hid_common/lead_user.c =================================================================== --- trunk/src_plugins/lib_hid_common/lead_user.c (revision 30970) +++ trunk/src_plugins/lib_hid_common/lead_user.c (revision 30971) @@ -91,7 +91,7 @@ void pcb_lead_user_draw_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) { if (lead) { - pcb_hid_gc_t *gc = argv[1].d.p; + rnd_hid_gc_t *gc = argv[1].d.p; rnd_coord_t x = leadx + step, y = leady + step; assert(argv[1].type == RND_EVARG_PTR); Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30970) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30971) @@ -42,7 +42,7 @@ #include "toolbar.h" typedef struct { - pcb_hid_dad_subdialog_t sub; + rnd_hid_dad_subdialog_t sub; int sub_inited, lock; vti0_t tid2wid; /* tool ID to widget ID conversion - value 0 means no widget */ } toolbar_ctx_t; @@ -68,7 +68,7 @@ toolbar.lock = 0; } -static void toolbar_select_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void toolbar_select_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ptrdiff_t tid; Index: trunk/src_plugins/lib_hid_gl/hidgl.c =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.c (revision 30970) +++ trunk/src_plugins/lib_hid_gl/hidgl.c (revision 30971) @@ -140,7 +140,7 @@ return composite_op; } -void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +void hidgl_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { rnd_bool xor_mode = (composite_op == PCB_HID_COMP_POSITIVE_XOR ? pcb_true : pcb_false); Index: trunk/src_plugins/lib_hid_gl/hidgl.h =================================================================== --- trunk/src_plugins/lib_hid_gl/hidgl.h (revision 30970) +++ trunk/src_plugins/lib_hid_gl/hidgl.h (revision 30971) @@ -42,7 +42,7 @@ void hidgl_fill_pcb_polygon(rnd_polyarea_t *poly, const rnd_rnd_box_t *clip_box, double scale, int fullpoly); void hidgl_fill_rect(rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2); void hidgl_init(void); -void hidgl_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); +void hidgl_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen); pcb_composite_op_t hidgl_get_drawing_mode(); #endif /* PCB_HID_COMMON_HIDGL_H */ Index: trunk/src_plugins/lib_hid_pcbui/act.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/act.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/act.c (revision 30971) @@ -86,8 +86,8 @@ /* DOC: swapsides.html */ fgw_error_t pcb_act_SwapSides(fgw_arg_t *res, int argc, fgw_arg_t *argv) { - pcb_layergrp_id_t active_group = pcb_layer_get_group(PCB, pcb_layer_stack[0]); - pcb_layergrp_id_t comp_group = -1, solder_group = -1; + rnd_layergrp_id_t active_group = pcb_layer_get_group(PCB, pcb_layer_stack[0]); + rnd_layergrp_id_t comp_group = -1, solder_group = -1; rnd_bool comp_on = pcb_false, solder_on = pcb_false; rnd_rnd_box_t vb; rnd_coord_t x, y; @@ -116,7 +116,7 @@ pcb_draw_inhibit_inc(); if (argc > 1) { const char *a, *b = ""; - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_type_t lyt; RND_PCB_ACT_CONVARG(1, FGW_STR, SwapSides, a = argv[1].val.str); Index: trunk/src_plugins/lib_hid_pcbui/layer_menu.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/layer_menu.c (revision 30971) @@ -57,7 +57,7 @@ pcb_menu_prop_t props; char act[256], chk[256]; int idx, max_ml, sect; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; const pcb_menu_layers_t *ml; memset(&props, 0, sizeof(props)); @@ -137,7 +137,7 @@ continue; for(n = g->len-1; n >= 0; n--) { - pcb_layer_id_t lid = g->lid[n]; + rnd_layer_id_t lid = g->lid[n]; pcb_layer_t *l = pcb_get_layer(PCB->Data, lid); pcb_layer_type_t lyt = pcb_layer_flags_(l); @@ -169,7 +169,7 @@ *end = '\0'; } -static void custom_layer_attr_key(pcb_layer_t *l, pcb_layer_id_t lid, const char *attrname, const char *menu_prefix, const char *action_prefix, pcb_menu_prop_t *keyprops, char *path, char *end, int len_avail) +static void custom_layer_attr_key(pcb_layer_t *l, rnd_layer_id_t lid, const char *attrname, const char *menu_prefix, const char *action_prefix, pcb_menu_prop_t *keyprops, char *path, char *end, int len_avail) { char *key = rnd_attribute_get(&l->Attributes, attrname); if (key != NULL) { @@ -188,7 +188,7 @@ int len_avail = 125; char *end = path + plen; char act[256]; - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *l; pcb_menu_prop_t keyprops; Index: trunk/src_plugins/lib_hid_pcbui/layersel.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/layersel.c (revision 30971) @@ -156,13 +156,13 @@ typedef struct { int wopen, wclosed; layersel_ctx_t *ls; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; virt_grp_id_t vid; unsigned int is_open:1; } ls_group_t; struct layersel_ctx_s { - pcb_hid_dad_subdialog_t sub; + rnd_hid_dad_subdialog_t sub; int sub_inited; int lock_vis, lock_sel; int w_last_sel, w_last_sel_closed, w_last_unsel_closed; @@ -197,7 +197,7 @@ return *res; } -static ls_group_t *lgs_get_real(layersel_ctx_t *ls, pcb_layergrp_id_t gid, int alloc) +static ls_group_t *lgs_get_real(layersel_ctx_t *ls, rnd_layergrp_id_t gid, int alloc) { ls_group_t *lgs = lgs_get_(ls, gid+LGS_max, alloc); lgs->gid = gid; @@ -262,7 +262,7 @@ if (lys->ly != NULL) { if (lys->grp_vis) { - pcb_layer_id_t lid = lys->ly - PCB->Data->Layer; + rnd_layer_id_t lid = lys->ly - PCB->Data->Layer; pcb_layervis_change_group_vis(&PCB->hidlib, lid, 1, 1); } else { @@ -288,7 +288,7 @@ locked_layersel(lys->ls, lys->wlab, lys->wunsel_closed, lys->wsel_closed); } -static void layer_sel_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void layer_sel_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { layer_select(attr->user_data); } @@ -330,12 +330,12 @@ } } -static void all_open_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void all_open_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { all_open_close(1); } -static void all_close_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void all_close_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { all_open_close(0); } @@ -346,8 +346,8 @@ static void ensure_visible_current(layersel_ctx_t *ls) { pcb_layer_t *ly; - pcb_layer_id_t lid; - pcb_layergrp_id_t gid; + rnd_layer_id_t lid; + rnd_layergrp_id_t gid; pcb_layer_t *l; ls_layer_t *lys; int repeat = 0; @@ -393,7 +393,7 @@ } -static void layer_vis_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void layer_vis_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ls_layer_t *lys = attr->user_data; rnd_bool *vis; @@ -406,7 +406,7 @@ return; if (lys->grp_vis) { - pcb_layer_id_t lid = lys->ly - PCB->Data->Layer; + rnd_layer_id_t lid = lys->ly - PCB->Data->Layer; pcb_layervis_change_group_vis(&PCB->hidlib, lid, !*vis, 1); } else { @@ -420,7 +420,7 @@ pcb_hid_redraw(PCB); } -static void layer_right_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void layer_right_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ls_layer_t *lys = attr->user_data; @@ -433,8 +433,8 @@ rnd_actionva(&PCB->hidlib, "Popup", "layer", NULL); } -extern pcb_layergrp_id_t pcb_actd_EditGroup_gid; -static void group_right_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +extern rnd_layergrp_id_t pcb_actd_EditGroup_gid; +static void group_right_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ls_group_t *grp = attr->user_data; if (grp->gid < 0) @@ -444,7 +444,7 @@ } -static void group_open_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void group_open_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ls_group_t *lgs = attr->user_data; lgs->is_open = !lgs->is_open; @@ -645,7 +645,7 @@ /* Editable layer groups that are part of the stack */ static void layersel_create_stack(layersel_ctx_t *ls, pcb_board_t *pcb) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; rnd_cardinal_t created = 0; @@ -666,7 +666,7 @@ /* Editable layer groups that are not part of the stack */ static void layersel_create_global(layersel_ctx_t *ls, pcb_board_t *pcb) { - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; pcb_layergrp_t *g; rnd_cardinal_t created = 0; Index: trunk/src_plugins/lib_hid_pcbui/rendering.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/rendering.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/rendering.c (revision 30971) @@ -31,9 +31,9 @@ #include "funchash_core.h" #include "layer.h" -static int (*gui_set_layer_group)(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform); +static int (*gui_set_layer_group)(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform); -static int common_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int common_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { int idx = group; if (idx >= 0 && idx < pcb_max_group(PCB)) { @@ -77,7 +77,7 @@ return 0; } -static int pcbui_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int pcbui_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { int res; Index: trunk/src_plugins/lib_hid_pcbui/routest.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30971) @@ -42,7 +42,7 @@ #define MAX_STYLES 64 typedef struct { - pcb_hid_dad_subdialog_t sub; + rnd_hid_dad_subdialog_t sub; int sub_inited, last_len; int whbox[MAX_STYLES], wchk[MAX_STYLES], wlab[MAX_STYLES]; } rst_ctx_t; @@ -83,7 +83,7 @@ static void rst_force_update_chk_and_dlg() { int n, target = pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL); - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; for(n = 0; n < vtroutestyle_len(&PCB->RouteStyle); n++) { hv.lng = (n == target); @@ -103,7 +103,7 @@ int n, target; target = pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL); for(n = 0; n < vtroutestyle_len(&PCB->RouteStyle); n++) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.lng = (n == target); if (rst.sub.dlg[rst.wlab[n]].val.lng != hv.lng) @@ -123,7 +123,7 @@ rst_lock--; } -static void rst_select_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_select_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int n, ridx = -1; for(n = 0; n < vtroutestyle_len(&PCB->RouteStyle); n++) { @@ -138,7 +138,7 @@ rst_force_update_chk_and_dlg(); } -static void rst_edit_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_edit_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int target = pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL); if (target >= 0) @@ -145,7 +145,7 @@ pcb_dlg_rstdlg(target); } -static void rst_new_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_new_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int target = vtroutestyle_len(&PCB->RouteStyle); pcb_route_style_t *rst = vtroutestyle_alloc_append(&PCB->RouteStyle, 1); @@ -162,7 +162,7 @@ rst_updated(rst); } -static void rst_del_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_del_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int target = pcb_route_style_lookup(&PCB->RouteStyle, conf_core.design.line_thickness, conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_core.design.clearance, NULL); if (target >= 0) { Index: trunk/src_plugins/lib_hid_pcbui/routest_dlg.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/routest_dlg.c (revision 30971) @@ -56,9 +56,9 @@ static void rstdlg_pcb2dlg(int rst_idx) { int n; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; pcb_route_style_t *rst; - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; rnd_attribute_t *a; @@ -114,11 +114,11 @@ pcb_board_set_changed_flag(1); } -static void rst_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { int idx = attr - rstdlg_ctx.dlg; pcb_route_style_t *rst = vtroutestyle_get(&PCB->RouteStyle, rstdlg_ctx.curr, 0); - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; if (rst == NULL) { rnd_message(RND_MSG_ERROR, "route style does not exist"); @@ -197,7 +197,7 @@ return res; } -static void rst_add_attr_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_add_attr_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_route_style_t *rst = vtroutestyle_get(&PCB->RouteStyle, rstdlg_ctx.curr, 0); char *key = NULL, *val = NULL; @@ -208,10 +208,10 @@ } } -static void rst_edit_attr_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_edit_attr_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_route_style_t *rst = vtroutestyle_get(&PCB->RouteStyle, rstdlg_ctx.curr, 0); - pcb_hid_attribute_t *treea = &rstdlg_ctx.dlg[rstdlg_ctx.wattr]; + rnd_hid_attribute_t *treea = &rstdlg_ctx.dlg[rstdlg_ctx.wattr]; pcb_hid_row_t *row = pcb_dad_tree_get_selected(treea); char *key, *val; @@ -228,10 +228,10 @@ } } -static void rst_del_attr_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void rst_del_attr_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { pcb_route_style_t *rst = vtroutestyle_get(&PCB->RouteStyle, rstdlg_ctx.curr, 0); - pcb_hid_attribute_t *treea = &rstdlg_ctx.dlg[rstdlg_ctx.wattr]; + rnd_hid_attribute_t *treea = &rstdlg_ctx.dlg[rstdlg_ctx.wattr]; pcb_hid_row_t *row = pcb_dad_tree_get_selected(treea); if (row == NULL) Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 30970) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 30971) @@ -45,7 +45,7 @@ #include "status.h" typedef struct { - pcb_hid_dad_subdialog_t stsub, rdsub; /* st is for the bottom status line, rd is for the top readouts */ + rnd_hid_dad_subdialog_t stsub, rdsub; /* st is for the bottom status line, rd is for the top readouts */ int stsub_inited, rdsub_inited; int wst1, wst2, wsttxt; int st_has_text; @@ -132,7 +132,7 @@ static void status_st_pcb2dlg(void) { - static pcb_hid_attr_val_t hv; + static rnd_hid_attr_val_t hv; if (!status.stsub_inited) return; @@ -163,7 +163,7 @@ static void status_rd_pcb2dlg(void) { - static pcb_hid_attr_val_t hv; + static rnd_hid_attr_val_t hv; const char *s1, *s2, *s3; char sep; @@ -239,7 +239,7 @@ } } -static void unit_change_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void unit_change_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { if (pcbhl_conf.editor.grid_unit == get_unit_struct("mm")) rnd_actionva(&PCB->hidlib, "SetUnits", "mil", NULL); @@ -265,7 +265,7 @@ } /* append an expand-vbox to eat up excess space for center-align */ -static void vpad(pcb_hid_dad_subdialog_t *sub) +static void vpad(rnd_hid_dad_subdialog_t *sub) { PCB_DAD_BEGIN_VBOX(sub->dlg); PCB_DAD_COMPFLAG(sub->dlg, PCB_HATF_EXPFILL | PCB_HATF_TIGHT); @@ -351,7 +351,7 @@ rnd_PCB_ACT_MAY_CONVARG(1, FGW_STR, StatusSetText, text = argv[1].val.str); if (text != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = text; pcb_gui->attr_dlg_set_value(status.stsub.dlg_hid_ctx, status.wsttxt, &hv); hv.str = ""; @@ -373,7 +373,7 @@ /* The following code is used for the object tooltip hints: */ -static void append_obj_desc(pcb_board_t *pcb, gds_t *dst, pcb_any_obj_t *obj, pcb_layergrp_id_t gid, const char *prefix) +static void append_obj_desc(pcb_board_t *pcb, gds_t *dst, pcb_any_obj_t *obj, rnd_layergrp_id_t gid, const char *prefix) { pcb_layergrp_t *grp; Index: trunk/src_plugins/lib_polyhelp/topoly.c =================================================================== --- trunk/src_plugins/lib_polyhelp/topoly.c (revision 30970) +++ trunk/src_plugins/lib_polyhelp/topoly.c (revision 30971) @@ -285,7 +285,7 @@ pcb_any_obj_t *pcb_topoly_find_1st_outline(pcb_board_t *pcb) { - pcb_layer_id_t lid; + rnd_layer_id_t lid; pcb_layer_t *layer; pcb_any_obj_t *best = NULL; rnd_coord_t x, y; Index: trunk/src_plugins/lib_vfs/lib_vfs.c =================================================================== --- trunk/src_plugins/lib_vfs/lib_vfs.c (revision 30970) +++ trunk/src_plugins/lib_vfs/lib_vfs.c (revision 30971) @@ -223,7 +223,7 @@ static void vfs_list_layers(pcb_board_t *pcb, pcb_vfs_list_cb cb, void *ctx, const char *datapath, pcb_data_t *data) { gds_t path; - pcb_layer_id_t lid; + rnd_layer_id_t lid; size_t orig_used; gds_init(&path); @@ -312,7 +312,7 @@ { pcb_propedit_t pctx; char *end; - pcb_layer_id_t lid = strtol(path, &end, 10); + rnd_layer_id_t lid = strtol(path, &end, 10); int res; if (*end == '\0') { @@ -426,7 +426,7 @@ static void vfs_list_layergrps(pcb_board_t *pcb, pcb_vfs_list_cb cb, void *ctx) { gds_t path; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; size_t orig_used; cb(ctx, "layer_groups", 1); @@ -453,7 +453,7 @@ { pcb_propedit_t pctx; char *end; - pcb_layergrp_id_t gid = strtol(path, &end, 10); + rnd_layergrp_id_t gid = strtol(path, &end, 10); int res; if ((*end != '/') && (*end != '\0')) Index: trunk/src_plugins/loghid/hid-logger.c =================================================================== --- trunk/src_plugins/loghid/hid-logger.c (revision 30970) +++ trunk/src_plugins/loghid/hid-logger.c (revision 30971) @@ -12,12 +12,12 @@ * Just having one instance for now. Keeping it * local is fine. */ -static pcb_hid_t *delegatee_ = NULL; +static rnd_hid_t *delegatee_ = NULL; static FILE *out_ = NULL; -static pcb_export_opt_t *log_get_export_options(pcb_hid_t *hid, int *ret) +static rnd_export_opt_t *log_get_export_options(rnd_hid_t *hid, int *ret) { - pcb_export_opt_t *result = delegatee_->get_export_options(hid, ret); + rnd_export_opt_t *result = delegatee_->get_export_options(hid, ret); if (ret != NULL) pcb_fprintf(out_, "get_export_options(ret) -> ret=%d\n", *ret); else @@ -25,67 +25,67 @@ return result; } -static void log_do_exit(pcb_hid_t *hid) +static void log_do_exit(rnd_hid_t *hid) { pcb_fprintf(out_, "do_exit()\n"); delegatee_->do_exit(delegatee_); } -static int log_parse_arguments(pcb_hid_t *hid, int *argc, char ***argv) +static int log_parse_arguments(rnd_hid_t *hid, int *argc, char ***argv) { pcb_fprintf(out_, "parse_arguments()\n"); return delegatee_->parse_arguments(delegatee_, argc, argv); } -static void log_invalidate_lr(pcb_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) +static void log_invalidate_lr(rnd_hid_t *hid, rnd_coord_t left, rnd_coord_t right, rnd_coord_t top, rnd_coord_t bottom) { pcb_fprintf(out_, "invalidate_lr(%mm, %mm, %mm, %mm)\n", left, right, top, bottom); delegatee_->invalidate_lr(hid, left, right, top, bottom); } -static void log_invalidate_all(pcb_hid_t *hid) +static void log_invalidate_all(rnd_hid_t *hid) { pcb_fprintf(out_, "invalidate_all()\n"); delegatee_->invalidate_all(hid); } -static void log_notify_crosshair_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void log_notify_crosshair_change(rnd_hid_t *hid, rnd_bool changes_complete) { pcb_fprintf(out_, "pcb_hid_notify_crosshair_change(%s)\n", changes_complete ? "true" : "false"); delegatee_->notify_crosshair_change(hid, changes_complete); } -static void log_notify_mark_change(pcb_hid_t *hid, rnd_bool changes_complete) +static void log_notify_mark_change(rnd_hid_t *hid, rnd_bool changes_complete) { pcb_fprintf(out_, "pcb_notify_mark_change(%s)\n", changes_complete ? "true" : "false"); delegatee_->notify_mark_change(hid, changes_complete); } -static int log_set_layer_group(pcb_hid_t *hid, pcb_layergrp_id_t group, const char *purpose, int purpi, pcb_layer_id_t layer, unsigned int flags, int is_empty, pcb_xform_t **xform) +static int log_set_layer_group(rnd_hid_t *hid, rnd_layergrp_id_t group, const char *purpose, int purpi, rnd_layer_id_t layer, unsigned int flags, int is_empty, rnd_xform_t **xform) { pcb_fprintf(out_, "set_layer(group=%ld, layer=%ld, flags=%lx, empty=%s, xform=%p)\n", group, layer, flags, is_empty ? "true" : "false", xform); return delegatee_->set_layer_group(hid, group, purpose, purpi, layer, flags, is_empty, xform); } -static void log_end_layer(pcb_hid_t *hid) +static void log_end_layer(rnd_hid_t *hid) { pcb_fprintf(out_, "end_layer()\n"); delegatee_->end_layer(hid); } -static pcb_hid_gc_t log_make_gc(pcb_hid_t *hid) +static rnd_hid_gc_t log_make_gc(rnd_hid_t *hid) { pcb_fprintf(out_, "make_gc()\n"); return delegatee_->make_gc(hid); } -static void log_destroy_gc(pcb_hid_gc_t gc) +static void log_destroy_gc(rnd_hid_gc_t gc) { pcb_fprintf(out_, "destroy_gc()\n"); delegatee_->destroy_gc(gc); } -static void log_set_drawing_mode(pcb_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) +static void log_set_drawing_mode(rnd_hid_t *hid, pcb_composite_op_t op, rnd_bool direct, const rnd_rnd_box_t *screen) { if (screen != NULL) pcb_fprintf(out_, "set_drawing_mode(%d,%d,[%mm;%mm,%mm;%mm])\n", op, direct, screen->X1, screen->Y1, screen->X2, screen->Y2); @@ -94,7 +94,7 @@ delegatee_->set_drawing_mode(hid, op, direct, screen); } -static void log_render_burst(pcb_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) +static void log_render_burst(rnd_hid_t *hid, pcb_burst_op_t op, const rnd_rnd_box_t *screen) { pcb_fprintf(out_, "render_burst(%d,[%mm;%mm,%mm;%mm])\n", op, screen->X1, screen->Y1, screen->X2, screen->Y2); delegatee_->render_burst(hid, op, screen); @@ -102,13 +102,13 @@ } -static void log_set_color(pcb_hid_gc_t gc, const rnd_color_t *color) +static void log_set_color(rnd_hid_gc_t gc, const rnd_color_t *color) { pcb_fprintf(out_, "set_color(gc, %s)\n", color->str); delegatee_->set_color(gc, color); } -static void log_set_line_cap(pcb_hid_gc_t gc, pcb_cap_style_t style) +static void log_set_line_cap(rnd_hid_gc_t gc, pcb_cap_style_t style) { const char *txt = "unknown"; switch (style) { @@ -120,31 +120,31 @@ delegatee_->set_line_cap(gc, style); } -static void log_set_line_width(pcb_hid_gc_t gc, rnd_coord_t width) +static void log_set_line_width(rnd_hid_gc_t gc, rnd_coord_t width) { pcb_fprintf(out_, "set_line_width(gc, %d)\n", width); delegatee_->set_line_width(gc, width); } -static void log_set_draw_xor(pcb_hid_gc_t gc, int xor) +static void log_set_draw_xor(rnd_hid_gc_t gc, int xor) { pcb_fprintf(out_, "set_draw_xor(gc, %s)\n", xor ? "true" : "false"); delegatee_->set_draw_xor(gc, xor); } -static void log_set_draw_faded(pcb_hid_gc_t gc, int faded) +static void log_set_draw_faded(rnd_hid_gc_t gc, int faded) { pcb_fprintf(out_, "set_draw_faded(gc, %s)\n", faded ? "true" : "false"); delegatee_->set_draw_faded(gc, faded); } -static void log_draw_line(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void log_draw_line(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(out_, "draw_line(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->draw_line(gc, x1, y1, x2, y2); } -static void log_draw_arc(pcb_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) +static void log_draw_arc(rnd_hid_gc_t gc, rnd_coord_t cx, rnd_coord_t cy, rnd_coord_t xradius, rnd_coord_t yradius, rnd_angle_t start_angle, rnd_angle_t delta_angle) { pcb_fprintf(out_, "draw_arc(gc, %mm, %mm, rx=%mm, ry=%mm, start_angle=%.1f, delta_a=%.1f)\n", cx, cy, xradius, yradius, start_angle, delta_angle); @@ -151,19 +151,19 @@ delegatee_->draw_arc(gc, cx, cy, xradius, yradius, start_angle, delta_angle); } -static void log_draw_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void log_draw_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(out_, "draw_rect(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->draw_rect(gc, x1, y1, x2, y2); } -static void log_fill_circle(pcb_hid_gc_t gc, rnd_coord_t x, rnd_coord_t y, rnd_coord_t r) +static void log_fill_circle(rnd_hid_gc_t gc, rnd_coord_t x, rnd_coord_t y, rnd_coord_t r) { pcb_fprintf(out_, "fill_circle(gc, %mm, %mm, %mm)\n", x, y, r); delegatee_->fill_circle(gc, x, y, r); } -static void log_fill_polygon(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) +static void log_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) { int i; pcb_fprintf(out_, "fill_polygon(gc, %d", n_coords); @@ -174,7 +174,7 @@ delegatee_->fill_polygon(gc, n_coords, x, y); } -static void log_fill_polygon_offs(pcb_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) +static void log_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) { int i; pcb_fprintf(out_, "fill_polygon_offs(gc, %d", n_coords); @@ -185,19 +185,19 @@ delegatee_->fill_polygon_offs(gc, n_coords, x, y, dx, dy); } -static void log_fill_rect(pcb_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) +static void log_fill_rect(rnd_hid_gc_t gc, rnd_coord_t x1, rnd_coord_t y1, rnd_coord_t x2, rnd_coord_t y2) { pcb_fprintf(out_, "fill_rect(gc, %mm, %mm, %mm, %mm)\n", x1, y1, x2, y2); delegatee_->fill_rect(gc, x1, y1, x2, y2); } -static void log_beep(pcb_hid_t *hid) +static void log_beep(rnd_hid_t *hid) { pcb_fprintf(out_, "beep(); BEEEP .... BEEEEEEEP\n"); delegatee_->beep(hid); } -void create_log_hid(FILE *log_out, pcb_hid_t *loghid, pcb_hid_t *delegatee) +void create_log_hid(FILE *log_out, rnd_hid_t *loghid, rnd_hid_t *delegatee) { out_ = log_out; delegatee_ = delegatee; Index: trunk/src_plugins/loghid/hid-logger.h =================================================================== --- trunk/src_plugins/loghid/hid-logger.h (revision 30970) +++ trunk/src_plugins/loghid/hid-logger.h (revision 30971) @@ -7,6 +7,6 @@ /* Set up the delegating loghid that sends all calls to the delegatee but also logs the calls. */ -void create_log_hid(FILE *log_out, pcb_hid_t *loghid, pcb_hid_t *delegatee); +void create_log_hid(FILE *log_out, rnd_hid_t *loghid, rnd_hid_t *delegatee); #endif Index: trunk/src_plugins/loghid/loghid.c =================================================================== --- trunk/src_plugins/loghid/loghid.c (revision 30970) +++ trunk/src_plugins/loghid/loghid.c (revision 30971) @@ -45,10 +45,10 @@ static const char *loghid_cookie = "loghid plugin"; -static pcb_hid_t loghid_gui; -static pcb_hid_t loghid_exp; +static rnd_hid_t loghid_gui; +static rnd_hid_t loghid_exp; -pcb_export_opt_t loghid_attribute_list[] = { +rnd_export_opt_t loghid_attribute_list[] = { {"target-hid", "the real GUI or export HID to relay calls to", PCB_HATT_STRING, 0, 0, {0, 0, 0}, 0, 0} #define HA_target_hid 0 @@ -55,9 +55,9 @@ }; #define NUM_OPTIONS sizeof(loghid_attribute_list) / sizeof(loghid_attribute_list[0]) -static int loghid_parse_arguments_real(pcb_hid_t *hid, int *argc, char ***argv, int is_gui) +static int loghid_parse_arguments_real(rnd_hid_t *hid, int *argc, char ***argv, int is_gui) { - pcb_hid_t *target, *me; + rnd_hid_t *target, *me; const char *target_name; pcb_export_register_opts(loghid_attribute_list, NUM_OPTIONS, loghid_cookie, 0); @@ -78,18 +78,18 @@ return target->parse_arguments(target, argc, argv); } -static int loghid_parse_arguments_gui(pcb_hid_t *hid, int *argc, char ***argv) +static int loghid_parse_arguments_gui(rnd_hid_t *hid, int *argc, char ***argv) { return loghid_parse_arguments_real(hid, argc, argv, 1); } -static int loghid_parse_arguments_exp(pcb_hid_t *hid, int *argc, char ***argv) +static int loghid_parse_arguments_exp(rnd_hid_t *hid, int *argc, char ***argv) { return loghid_parse_arguments_real(hid, argc, argv, 0); } -static int loghid_usage(pcb_hid_t *hid, const char *topic) +static int loghid_usage(rnd_hid_t *hid, const char *topic) { fprintf(stderr, "\nloghid command line arguments:\n\n"); pcb_hid_usage(loghid_attribute_list, NUM_OPTIONS); @@ -100,7 +100,7 @@ return 0; } -static pcb_export_opt_t *loghid_get_export_options(pcb_hid_t *hid, int *n) +static rnd_export_opt_t *loghid_get_export_options(rnd_hid_t *hid, int *n) { /* loghid_attribute_list[HA_psfile] = rnd_strdup("default?");*/ @@ -125,7 +125,7 @@ pcb_hid_nogui_init(&loghid_exp); /* gui version */ - loghid_gui.struct_size = sizeof(pcb_hid_t); + loghid_gui.struct_size = sizeof(rnd_hid_t); loghid_gui.name = "loghid-gui"; loghid_gui.description = "log GUI HID calls"; loghid_gui.gui = 1; @@ -136,7 +136,7 @@ pcb_hid_register_hid(&loghid_gui); /* export version */ - loghid_exp.struct_size = sizeof(pcb_hid_t); + loghid_exp.struct_size = sizeof(rnd_hid_t); loghid_exp.name = "loghid-exp"; loghid_exp.description = "log export HID calls"; loghid_exp.exporter = 1; Index: trunk/src_plugins/millpath/toolpath.c =================================================================== --- trunk/src_plugins/millpath/toolpath.c (revision 30970) +++ trunk/src_plugins/millpath/toolpath.c (revision 30971) @@ -220,7 +220,7 @@ static void setup_remove_poly(pcb_board_t *pcb, pcb_tlp_session_t *result, pcb_layergrp_t *grp, int polarity) { int has_otl; - pcb_layergrp_id_t i; + rnd_layergrp_id_t i; pcb_layergrp_t *g; result->grp = grp; @@ -239,7 +239,7 @@ pcb_arc_t *arc; rnd_rtree_it_t it; rnd_rnd_box_t otlbb; - pcb_layer_id_t lid; + rnd_layer_id_t lid; otlbb.X1 = otlbb.Y1 = PCB_MAX_COORD; otlbb.X2 = otlbb.Y2 = -PCB_MAX_COORD; Index: trunk/src_plugins/order/order.c =================================================================== --- trunk/src_plugins/order/order.c (revision 30970) +++ trunk/src_plugins/order/order.c (revision 30971) @@ -171,7 +171,7 @@ { rnd_rnd_box_t bb; long l; - pcb_layergrp_id_t gid; + rnd_layergrp_id_t gid; switch(f->autoload) { case PCB_OAL_none: return; Index: trunk/src_plugins/order/order.h =================================================================== --- trunk/src_plugins/order/order.h (revision 30970) +++ trunk/src_plugins/order/order.h (revision 30971) @@ -64,7 +64,7 @@ typedef struct pcb_order_field_s { pcb_hid_attr_type_t type; - pcb_hid_attr_val_t val; + rnd_hid_attr_val_t val; char **enum_vals; char *help; pcb_order_autoload_t autoload; Index: trunk/src_plugins/order_pcbway/pcbway.c =================================================================== --- trunk/src_plugins/order_pcbway/pcbway.c (revision 30970) +++ trunk/src_plugins/order_pcbway/pcbway.c (revision 30971) @@ -448,7 +448,7 @@ return 0; } -static void pcbway_quote_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void pcbway_quote_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { order_ctx_t *octx = caller_data; pcbway_form_t *form = octx->odata; Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 30970) +++ trunk/src_plugins/propedit/propdlg.c (revision 30971) @@ -61,10 +61,10 @@ free(ctx); } -static void prop_filter_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_ign) +static void prop_filter_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_ign) { propdlg_t *ctx = caller_data; - pcb_hid_attribute_t *attr, *attr_inp; + rnd_hid_attribute_t *attr, *attr_inp; pcb_hid_tree_t *tree; const char *text; int have_filter_text; @@ -86,7 +86,7 @@ static void prop_pcb2dlg(propdlg_t *ctx) { - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wtree]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wtree]; pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *r; htsp_entry_t *sorted, *e; @@ -130,7 +130,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wtree, &hv); free(cursor_path); @@ -138,7 +138,7 @@ /* set scope */ { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; gds_t scope; int n, inv; long *l; @@ -210,13 +210,13 @@ } } -static void prop_prv_expose_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_gc_t gc, const pcb_hid_expose_ctx_t *e) +static void prop_prv_expose_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, rnd_hid_gc_t gc, const rnd_hid_expose_ctx_t *e) { } -static rnd_bool prop_prv_mouse_cb(pcb_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) +static rnd_bool prop_prv_mouse_cb(rnd_hid_attribute_t *attrib, pcb_hid_preview_t *prv, pcb_hid_mouse_ev_t kind, rnd_coord_t x, rnd_coord_t y) { return pcb_false; /* don't redraw */ } @@ -223,7 +223,7 @@ static void prop_valedit_update(propdlg_t *ctx, pcb_props_t *p, pcb_propval_t *pv) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; /* do not update the value if widget is numeric and the user wants a relative value */ switch(p->type) { @@ -263,8 +263,8 @@ static void prop_vals_update(propdlg_t *ctx, pcb_props_t *p) { - pcb_hid_attr_val_t hv; - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wvals]; + rnd_hid_attr_val_t hv; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wvals]; pcb_hid_tree_t *tree = attr->wdata; htprop_entry_t *e; pvsort_t *pvs; @@ -303,7 +303,7 @@ free(pvs); } -static void prop_select_node_cb(pcb_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) +static void prop_select_node_cb(rnd_hid_attribute_t *attrib, void *hid_ctx, pcb_hid_row_t *row) { pcb_hid_tree_t *tree = attrib->wdata; propdlg_t *ctx = tree->user_ctx; @@ -316,7 +316,7 @@ } -static void prop_data_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr, int force_update) +static void prop_data_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr, int force_update) { propdlg_t *ctx = caller_data; pcb_hid_row_t *r = pcb_dad_tree_get_selected(&ctx->dlg[ctx->wtree]); @@ -370,18 +370,18 @@ } } -static void prop_data_auto_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prop_data_auto_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { prop_data_cb(hid_ctx, caller_data, attr, 0); } -static void prop_data_force_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prop_data_force_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { prop_data_cb(hid_ctx, caller_data, attr, 1); } -static void prop_add_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prop_add_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { PCB_DAD_DECL(dlg) propdlg_t *ctx = caller_data; @@ -416,7 +416,7 @@ PCB_DAD_FREE(dlg); } -static void prop_del_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prop_del_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { propdlg_t *ctx = caller_data; pcb_hid_row_t *r = pcb_dad_tree_get_selected(&ctx->dlg[ctx->wtree]); @@ -435,7 +435,7 @@ prop_refresh(ctx); } -static void prop_preset_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prop_preset_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { propdlg_t *ctx = caller_data; pcb_hid_row_t *rv = pcb_dad_tree_get_selected(&ctx->dlg[ctx->wvals]); @@ -451,7 +451,7 @@ } -static void prop_refresh_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void prop_refresh_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { prop_refresh((propdlg_t *)caller_data); } @@ -459,7 +459,7 @@ static void prop_refresh(propdlg_t *ctx) { - pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wtree]; + rnd_hid_attribute_t *attr = &ctx->dlg[ctx->wtree]; prop_pcb2dlg(ctx); prop_select_node_cb(attr, ctx->dlg_hid_ctx, pcb_dad_tree_get_selected(attr)); } @@ -586,7 +586,7 @@ pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; static rnd_rnd_box_t prvbb = {0, 0, PCB_MM_TO_COORD(10), PCB_MM_TO_COORD(10)}; int n; - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; PCB_DAD_BEGIN_VBOX(ctx->dlg); PCB_DAD_COMPFLAG(ctx->dlg, PCB_HATF_EXPFILL); Index: trunk/src_plugins/propedit/propedit.c =================================================================== --- trunk/src_plugins/propedit/propedit.c (revision 30970) +++ trunk/src_plugins/propedit/propedit.c (revision 30971) @@ -42,7 +42,7 @@ #include "crosshair.h" #include -extern pcb_layergrp_id_t pcb_actd_EditGroup_gid; +extern rnd_layergrp_id_t pcb_actd_EditGroup_gid; int prop_scope_add(pcb_propedit_t *pe, const char *cmd, int quiet) { @@ -172,7 +172,7 @@ } } -extern pcb_layergrp_id_t pcb_actd_EditGroup_gid; +extern rnd_layergrp_id_t pcb_actd_EditGroup_gid; static const char pcb_acts_propset[] = "propset([scope], name, value)"; static const char pcb_acth_propset[] = "Change the named property of scope or all selected objects to/by value. Scope is documented at PropEdit()."; @@ -354,12 +354,12 @@ { PCB_API_CHK_VER; - if (sizeof(long) < sizeof(pcb_layer_id_t)) { + if (sizeof(long) < sizeof(rnd_layer_id_t)) { rnd_message(RND_MSG_ERROR, "can't load propedig: layer id type wider than long\n"); return -1; } - if (sizeof(long) < sizeof(pcb_layergrp_id_t)) { + if (sizeof(long) < sizeof(rnd_layergrp_id_t)) { rnd_message(RND_MSG_ERROR, "can't load propedig: layergrp id type wider than long\n"); return -1; } Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 30970) +++ trunk/src_plugins/query/query_access.c (revision 30971) @@ -409,7 +409,7 @@ /* process from .layer */ static int layer_of_obj(pcb_qry_exec_t *ec, pcb_qry_node_t *fld, pcb_qry_val_t *res, pcb_layer_type_t mask) { - pcb_layer_id_t id; + rnd_layer_id_t id; const char *s1; if (pcb_layer_list(PCB, mask, &id, 1) != 1) Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 30970) +++ trunk/src_plugins/report/report.c (revision 30971) @@ -161,7 +161,7 @@ (((obj)->term != NULL) ? (obj)->term : ""), \ (((obj)->term != NULL) ? "\n" : "") -static const char *grpname(pcb_layergrp_id_t gid) +static const char *grpname(rnd_layergrp_id_t gid) { pcb_layergrp_t *grp = pcb_get_layergrp(PCB, gid); if (grp == NULL) @@ -808,7 +808,7 @@ printf("Filename: %s\n", PCB->hidlib.filename); pcb_printf("Size: %ml x %ml mils, %mm x %mm mm\n", PCB->hidlib.size_x, PCB->hidlib.size_y, PCB->hidlib.size_x, PCB->hidlib.size_y); for (i = 0; i < PCB_MAX_LAYER; i++) { - pcb_layergrp_id_t lg = pcb_layer_get_group(PCB, i); + rnd_layergrp_id_t lg = pcb_layer_get_group(PCB, i); unsigned int gflg = pcb_layergrp_flags(PCB, lg); for (j = 0; j < PCB_MAX_LAYER; j++) putchar(j == lg ? '#' : '-'); Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 30970) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 30971) @@ -354,7 +354,7 @@ struct rinfo { int type; - pcb_layergrp_id_t group; + rnd_layergrp_id_t group; pcb_pstk_t *pstk; rnd_point_t *point; rubber_ctx_t *rbnd; @@ -414,7 +414,7 @@ * passed line, the scanned line is added to the 'rubberband' list */ static void CheckLinePointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *LinePoint, int delta_index) { - const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); + const rnd_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); if (board == NULL) @@ -439,7 +439,7 @@ info.delta_index = delta_index; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -455,7 +455,7 @@ * the scanned arc is added to the 'rubberband' list */ static void CheckLinePointForRubberbandArcConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line, rnd_point_t *LinePoint, rnd_bool Exact) { - const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); + const rnd_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); if (board == NULL) @@ -480,7 +480,7 @@ info.delta_index = 0; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -496,7 +496,7 @@ * the scanned line is added to the 'rubberband' list */ static void CheckArcPointForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc, int *end_pt, rnd_bool Exact) { - const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); + const rnd_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); if (board == NULL) @@ -526,7 +526,7 @@ info.delta_index = end; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -546,7 +546,7 @@ struct rubber_info info; int which; rnd_coord_t t = Arc->Thickness / 2, ex, ey; - const pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); + const rnd_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); if (board == NULL) @@ -573,7 +573,7 @@ info.delta_index = which; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -592,7 +592,7 @@ static void CheckEntireArcForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_arc_t *Arc) { pcb_board_t *board = pcb_data_get_top(PCB->Data); - pcb_layergrp_id_t group; + rnd_layergrp_id_t group; if (board == NULL) board = PCB; @@ -606,7 +606,7 @@ const int comb = Layer->comb & PCB_LYC_SUB; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -659,7 +659,7 @@ static void CheckPolygonForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_poly_t *Polygon) { const rnd_bool clearpoly = PCB_FLAG_TEST(PCB_FLAG_CLEARPOLY, Polygon); - pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); + rnd_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); if (board == NULL) @@ -671,7 +671,7 @@ const int comb = Layer->comb & PCB_LYC_SUB; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -726,7 +726,7 @@ * the scanned line is added to the 'rubberband' list */ static void CheckLineForRubberbandConnection(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_line_t *Line) { - pcb_layergrp_id_t group = pcb_layer_get_group_(Layer); + rnd_layergrp_id_t group = pcb_layer_get_group_(Layer); pcb_board_t *board = pcb_data_get_top(PCB->Data); if (board == NULL) @@ -738,7 +738,7 @@ const int comb = Layer->comb & PCB_LYC_SUB; for(entry = 0; entry < length; ++entry) { - const pcb_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; + const rnd_layer_id_t layer_id = board->LayerGroups.grp[group].lid[entry]; pcb_layer_t *layer = &PCB->Data->Layer[layer_id]; if (layer->meta.real.vis && ((layer->comb & PCB_LYC_SUB) == comb)) { @@ -790,8 +790,8 @@ * 'rubberband' list. */ static void CheckPadStackForRubberbandConnection(rubber_ctx_t *rbnd, pcb_pstk_t *pstk) { - pcb_layergrp_id_t top; - pcb_layergrp_id_t bottom; + rnd_layergrp_id_t top; + rnd_layergrp_id_t bottom; pcb_bb_type_t bb_type; bb_type = pcb_pstk_bbspan(PCB, pstk, &top, &bottom, NULL); @@ -1393,7 +1393,7 @@ /* TODO: Add more elaberate techniques for rubberbanding with an attached arc. */ - pcb_layer_id_t layerid = pcb_layer_id(PCB->Data, arcptr->Layer); + rnd_layer_id_t layerid = pcb_layer_id(PCB->Data, arcptr->Layer); pcb_arc_t arc = *(arcptr->Arc); rnd_point_t startpoint; rnd_point_t endpoint; Index: trunk/src_plugins/script/live_script.c =================================================================== --- trunk/src_plugins/script/live_script.c (revision 30970) +++ trunk/src_plugins/script/live_script.c (revision 30971) @@ -175,7 +175,7 @@ #endif -static void lvs_button_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr_btn) +static void lvs_button_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr_btn) { live_script_t *lvs = caller_data; const char *arg; @@ -280,7 +280,7 @@ static int live_run(rnd_hidlib_t *hl, live_script_t *lvs) { - pcb_hid_attribute_t *atxt = &lvs->dlg[lvs->wtxt]; + rnd_hid_attribute_t *atxt = &lvs->dlg[lvs->wtxt]; pcb_hid_text_t *txt = atxt->wdata; FILE *f; char *src, *fn, *lang; @@ -350,7 +350,7 @@ static int live_load(rnd_hidlib_t *hl, live_script_t *lvs, const char *fn) { - pcb_hid_attribute_t *atxt = &lvs->dlg[lvs->wtxt]; + rnd_hid_attribute_t *atxt = &lvs->dlg[lvs->wtxt]; pcb_hid_text_t *txt = atxt->wdata; FILE *f; gds_t tmp; @@ -391,7 +391,7 @@ static int live_save(rnd_hidlib_t *hl, live_script_t *lvs, const char *fn) { - pcb_hid_attribute_t *atxt = &lvs->dlg[lvs->wtxt]; + rnd_hid_attribute_t *atxt = &lvs->dlg[lvs->wtxt]; pcb_hid_text_t *txt = atxt->wdata; FILE *f; char *src; Index: trunk/src_plugins/script/script_act.c =================================================================== --- trunk/src_plugins/script/script_act.c (revision 30970) +++ trunk/src_plugins/script/script_act.c (revision 30971) @@ -73,7 +73,7 @@ static void script_dlg_s2d_act(script_dlg_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[2]; @@ -106,7 +106,7 @@ static void script_dlg_s2d(script_dlg_t *ctx) { - pcb_hid_attribute_t *attr; + rnd_hid_attribute_t *attr; pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[4], *cursor_path = NULL; @@ -136,7 +136,7 @@ /* restore cursor */ if (cursor_path != NULL) { - pcb_hid_attr_val_t hv; + rnd_hid_attr_val_t hv; hv.str = cursor_path; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wslist, &hv); free(cursor_path); @@ -157,7 +157,7 @@ memset(ctx, 0, sizeof(script_dlg_t)); /* reset all states to the initial - includes ctx->active = 0; */ } -static void btn_unload_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_unload_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { script_dlg_t *ctx = caller_data; pcb_hid_row_t *row = pcb_dad_tree_get_selected(&ctx->dlg[ctx->wslist]); @@ -168,7 +168,7 @@ script_dlg_s2d(ctx); } -static void btn_reload_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_reload_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { script_dlg_t *ctx = caller_data; pcb_hid_row_t *row = pcb_dad_tree_get_selected(&ctx->dlg[ctx->wslist]); @@ -179,12 +179,12 @@ script_dlg_s2d(ctx); } -static void slist_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void slist_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { script_dlg_s2d_act((script_dlg_t *)caller_data); } -static void btn_load_cb(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void btn_load_cb(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { script_dlg_t *ctx = caller_data; int failed; Index: trunk/src_plugins/shape/shape_dialog.c =================================================================== --- trunk/src_plugins/shape/shape_dialog.c (revision 30970) +++ trunk/src_plugins/shape/shape_dialog.c (revision 30971) @@ -43,7 +43,7 @@ } } -static void shp_chg_regpoly(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void shp_chg_regpoly(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ctx_t *shp = caller_data; @@ -63,7 +63,7 @@ shp->dlg[shp->pcx].val.crd, shp->dlg[shp->pcy].val.crd); } -static void shp_chg_roundrect(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void shp_chg_roundrect(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ctx_t *shp = caller_data; pcb_shape_corner_t corner[4]; @@ -98,7 +98,7 @@ corner, shp->dlg[shp->rres].val.dbl); } -static void shp_chg_circle(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void shp_chg_circle(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { ctx_t *shp = caller_data; rnd_coord_t dia = shp->dlg[shp->dia].val.crd; @@ -132,7 +132,7 @@ } } -static void shp_chg_tab(void *hid_ctx, void *caller_data, pcb_hid_attribute_t *attr) +static void shp_chg_tab(void *hid_ctx, void *caller_data, rnd_hid_attribute_t *attr) { shape_layer_chg(NULL, NULL, 0, NULL); } Index: trunk/src_plugins/sketch_route/sketch_route.c =================================================================== --- trunk/src_plugins/sketch_route/sketch_route.c (revision 30970) +++ trunk/src_plugins/sketch_route/sketch_route.c (revision 30971) @@ -761,7 +761,7 @@ static void sketches_init() { - pcb_layer_id_t lid[PCB_MAX_LAYER]; + rnd_layer_id_t lid[PCB_MAX_LAYER]; int i, num; num = pcb_layer_list(PCB, PCB_LYT_COPPER, lid, PCB_MAX_LAYER); Index: trunk/tests/conf/conftest.c =================================================================== --- trunk/tests/conf/conftest.c (revision 30970) +++ trunk/tests/conf/conftest.c (revision 30971) @@ -14,7 +14,7 @@ int global_notify = 0; rnd_conf_hid_id_t hid_id; const char *hid_cookie = "conftest cookie"; -pcb_hid_t *pcb_gui = NULL; +rnd_hid_t *pcb_gui = NULL; const char *pcb_hidlib_default_embedded_menu = ""; const char *pcbhl_menu_file_paths[] = { "./", "~/.pcb-rnd/", PCBSHAREDIR "/", NULL }; const char *pcbhl_menu_name_fmt = "pcb-menu-%s.lht"; Index: trunk/tests/librnd/glue.c =================================================================== --- trunk/tests/librnd/glue.c (revision 30970) +++ trunk/tests/librnd/glue.c (revision 30971) @@ -61,10 +61,10 @@ { } -void pcbhl_expose_main(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *region, pcb_xform_t *xform_caller) +void pcbhl_expose_main(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *region, rnd_xform_t *xform_caller) { } -void pcbhl_expose_preview(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *e) +void pcbhl_expose_preview(rnd_hid_t *hid, const rnd_hid_expose_ctx_t *e) { }