Index: trunk/doc/developer/plugin/conf.h =================================================================== --- trunk/doc/developer/plugin/conf.h (revision 30944) +++ trunk/doc/developer/plugin/conf.h (revision 30945) @@ -8,8 +8,8 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN enable; /* Enable the plugin */ - CFT_INTEGER snow; /* intensity of snowing, 0..100 */ + RND_CFT_BOOLEAN enable; /* Enable the plugin */ + RND_CFT_INTEGER snow; /* intensity of snowing, 0..100 */ } foobar; } plugins; } conf_foobar_t; Index: trunk/scconfig/gen_conf.sh =================================================================== --- trunk/scconfig/gen_conf.sh (revision 30944) +++ trunk/scconfig/gen_conf.sh (revision 30945) @@ -48,7 +48,7 @@ function gen(path, src_line,state_tags, id, name, type, array, desc, flags,path_tmp,type2,fn) { name=src_line - sub("^.*CFT_", "CFN_", name) + sub("^.*CFT_", "RND_CFN_", name) sub(";.*", "", name) type=name sub("[ \t]*[^ \t]*$", "", type) Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 30944) +++ trunk/src/brave.c (revision 30945) @@ -91,7 +91,7 @@ } /* Upon a change in the config, parse the new config string and set the brave bits */ -static void brave_conf_chg(conf_native_t *cfg, int arr_idx) +static void brave_conf_chg(rnd_conf_native_t *cfg, int arr_idx) { char *curr, *next, old; desc_t *d; @@ -287,7 +287,7 @@ void pcb_brave_init(void) { - conf_native_t *n = pcb_conf_get_field("rc/brave"); + rnd_conf_native_t *n = pcb_conf_get_field("rc/brave"); brave_conf_id = pcb_conf_hid_reg(brave_cookie, NULL); if (n != NULL) { Index: trunk/src/conf_core.c =================================================================== --- trunk/src/conf_core.c (revision 30944) +++ trunk/src/conf_core.c (revision 30945) @@ -29,7 +29,7 @@ *((type *)(&var)) = max; \ } while(0) -static void pcb_conf_legacy_(conf_native_t *ndst, conf_native_t *nlegacy) +static void pcb_conf_legacy_(rnd_conf_native_t *ndst, rnd_conf_native_t *nlegacy) { gds_t tmp; const char *dst_path = ndst->hash_path; @@ -43,8 +43,8 @@ void pcb_conf_legacy(const char *dst_path, const char *legacy_path) { - conf_native_t *nlegacy = pcb_conf_get_field(legacy_path); - conf_native_t *ndst = pcb_conf_get_field(dst_path); + rnd_conf_native_t *nlegacy = pcb_conf_get_field(legacy_path); + rnd_conf_native_t *ndst = pcb_conf_get_field(dst_path); if (nlegacy == NULL) { rnd_message(PCB_MSG_ERROR, "pcb_conf_legacy: invalid legacy path '%s' for %s\n", legacy_path, dst_path); return; @@ -63,7 +63,7 @@ { htpp_entry_t *e; - conf_clamp_to(CFT_COORD, conf_core.design.line_thickness, PCB_MIN_THICKNESS, PCB_MAX_THICKNESS, PCB_MIL_TO_COORD(10)); + conf_clamp_to(RND_CFT_COORD, conf_core.design.line_thickness, PCB_MIN_THICKNESS, PCB_MAX_THICKNESS, PCB_MIL_TO_COORD(10)); conf_force_set_bool(conf_core.rc.have_regex, 1); pcb_conf_ro("rc/have_regex"); @@ -73,16 +73,16 @@ conf_force_set_str(conf_core.rc.path.share, PCBSHAREDIR); pcb_conf_ro("rc/path/share"); for(e = htpp_first(&legacy_new2old); e != NULL; e = htpp_next(&legacy_new2old, e)) { - conf_native_t *nlegacy = e->value, *ndst = e->key; + rnd_conf_native_t *nlegacy = e->value, *ndst = e->key; if (nlegacy->rnd_conf_rev > ndst->rnd_conf_rev) pcb_conf_legacy_(ndst, nlegacy); } } -static void conf_legacy_chg(conf_native_t *ndst, int arr_idx) +static void conf_legacy_chg(rnd_conf_native_t *ndst, int arr_idx) { /* check if a legacy nde changes so we need to update a new node */ - conf_native_t *nlegacy; + rnd_conf_native_t *nlegacy; static int lock = 0; if (lock) Index: trunk/src/conf_core.h =================================================================== --- trunk/src/conf_core.h (revision 30944) +++ trunk/src/conf_core.h (revision 30945) @@ -13,60 +13,60 @@ typedef struct { struct { - CFT_BOOLEAN rat_warn; /* rats nest has set warnings */ - CFT_BOOLEAN clip_inhibit_chg; /* dummy node to inform the menu about clip inhibit change */ + RND_CFT_BOOLEAN rat_warn; /* rats nest has set warnings */ + RND_CFT_BOOLEAN clip_inhibit_chg; /* dummy node to inform the menu about clip inhibit change */ } temp; const struct { /* editor */ - CFT_REAL zoom; /* default zoom */ - CFT_INTEGER buffer_number; /* number of the current buffer */ - CFT_BOOLEAN clear_line; /* new lines/arc clear polygons. */ - CFT_BOOLEAN clear_polypoly; /* new polygons clear polygons. */ - CFT_BOOLEAN full_poly; /* new polygons are full polygons. */ - CFT_BOOLEAN unique_names; /* OBSOLETE: force unique names */ - CFT_BOOLEAN snap_pin; /* snap to pins and pads */ - CFT_BOOLEAN snap_offgrid_line; /* Snap to certain off-grid points along a line. */ - CFT_BOOLEAN marker_snaps; /* marker snaps to grid or snap points, as any other click */ - CFT_BOOLEAN highlight_on_point; /* Highlight if crosshair is on endpoints. */ - CFT_BOOLEAN show_solder_side; /* mirror output */ - CFT_BOOLEAN save_last_command; /* OBSOLETE: use the session-persistent command line history instead (press the up arrow) */ - CFT_INTEGER line_refraction; /* value for line lookahead setting */ - CFT_BOOLEAN save_in_tmp; /* emergency save unsaved PCB data (despite the user clicks don't save) when: user starts a new PCB; user quits pcb-rnd. Does not affect the on-crash emergency save. */ - CFT_BOOLEAN all_direction_lines; /* enable lines to all directions */ - CFT_BOOLEAN rubber_band_mode; /* move, rotate use rubberband connections */ - CFT_BOOLEAN rubber_band_keep_midlinedir; /* keep line direction when a middle line is moved */ - CFT_BOOLEAN swap_start_direction; /* change starting direction after each click */ - CFT_BOOLEAN show_drc; /* show drc region on crosshair */ - CFT_BOOLEAN auto_drc; /* when set, PCB doesn't let you place copper that violates DRC. */ - CFT_BOOLEAN conn_find_rat; /* connection find includes rats; when off, only existing galvanic connections are mapped */ - CFT_BOOLEAN show_number; /* OBSOLETE: pinout shows number */ - CFT_BOOLEAN orthogonal_moves; /* move items orthogonally. */ - CFT_BOOLEAN reset_after_element; /* OBSOLETE: reset connections after each element while saving all connections */ - CFT_BOOLEAN lock_names; /* lock down text so they can not be moved or selected */ - CFT_BOOLEAN only_names; /* lock down everything else but text so only text objects can be moved or selected */ - CFT_BOOLEAN thin_draw; /* if set, objects on the screen are drawn as outlines (lines are drawn as center-lines). This lets you see line endpoints hidden under pins, for example. */ - CFT_BOOLEAN thin_draw_poly; /* if set, polygons on the screen are drawn as outlines. */ - CFT_BOOLEAN as_drawn_poly; /* if set, also draw the as-drawn outline of polygons */ - CFT_BOOLEAN wireframe_draw; /* if set, lines and arcs on the screen are drawn as outlines. */ - CFT_BOOLEAN local_ref; /* use local reference for moves, by setting the mark at the beginning of each move. */ - CFT_BOOLEAN check_planes; /* when set, only polygons and their clearances are drawn, to see if polygons have isolated regions. */ - CFT_BOOLEAN hide_names; /* when set, subc floater text objects (typical use case: refdes text) are not drawn. */ - CFT_BOOLEAN description; /* obsolete - DO NOT USE - kept for compatibility */ - CFT_BOOLEAN name_on_pcb; /* obsolete - DO NOT USE - kept for compatibility */ - CFT_STRING subc_id; /* subcircuit ID template for diplaying the subcircuit label on the subcircuit layer; default to displaying the refes, if empty; syntax if the same as for DYNTEXT */ - CFT_STRING term_id; /* terminal ID template for diplaying the subcircuit label on the subcircuit layer; default to displaying termid[intconn], if empty; syntax if the same as for DYNTEXT */ - CFT_BOOLEAN move_linepoint_uses_route; /* Moving a line point calculates a new line route. This allows 45/90 line modes when editing lines. */ - CFT_BOOLEAN auto_via; /* when drawing traces and switching layers or when moving an object from one layer to another, try to keep connections by automatically inserting vias. */ - CFT_REAL route_radius; /* temporary: route draw helper's arc radius at corners (factor of the trace thickness) */ + RND_CFT_REAL zoom; /* default zoom */ + RND_CFT_INTEGER buffer_number; /* number of the current buffer */ + RND_CFT_BOOLEAN clear_line; /* new lines/arc clear polygons. */ + RND_CFT_BOOLEAN clear_polypoly; /* new polygons clear polygons. */ + RND_CFT_BOOLEAN full_poly; /* new polygons are full polygons. */ + RND_CFT_BOOLEAN unique_names; /* OBSOLETE: force unique names */ + RND_CFT_BOOLEAN snap_pin; /* snap to pins and pads */ + RND_CFT_BOOLEAN snap_offgrid_line; /* Snap to certain off-grid points along a line. */ + RND_CFT_BOOLEAN marker_snaps; /* marker snaps to grid or snap points, as any other click */ + RND_CFT_BOOLEAN highlight_on_point; /* Highlight if crosshair is on endpoints. */ + RND_CFT_BOOLEAN show_solder_side; /* mirror output */ + RND_CFT_BOOLEAN save_last_command; /* OBSOLETE: use the session-persistent command line history instead (press the up arrow) */ + RND_CFT_INTEGER line_refraction; /* value for line lookahead setting */ + RND_CFT_BOOLEAN save_in_tmp; /* emergency save unsaved PCB data (despite the user clicks don't save) when: user starts a new PCB; user quits pcb-rnd. Does not affect the on-crash emergency save. */ + RND_CFT_BOOLEAN all_direction_lines; /* enable lines to all directions */ + RND_CFT_BOOLEAN rubber_band_mode; /* move, rotate use rubberband connections */ + RND_CFT_BOOLEAN rubber_band_keep_midlinedir; /* keep line direction when a middle line is moved */ + RND_CFT_BOOLEAN swap_start_direction; /* change starting direction after each click */ + RND_CFT_BOOLEAN show_drc; /* show drc region on crosshair */ + RND_CFT_BOOLEAN auto_drc; /* when set, PCB doesn't let you place copper that violates DRC. */ + RND_CFT_BOOLEAN conn_find_rat; /* connection find includes rats; when off, only existing galvanic connections are mapped */ + RND_CFT_BOOLEAN show_number; /* OBSOLETE: pinout shows number */ + RND_CFT_BOOLEAN orthogonal_moves; /* move items orthogonally. */ + RND_CFT_BOOLEAN reset_after_element; /* OBSOLETE: reset connections after each element while saving all connections */ + RND_CFT_BOOLEAN lock_names; /* lock down text so they can not be moved or selected */ + RND_CFT_BOOLEAN only_names; /* lock down everything else but text so only text objects can be moved or selected */ + RND_CFT_BOOLEAN thin_draw; /* if set, objects on the screen are drawn as outlines (lines are drawn as center-lines). This lets you see line endpoints hidden under pins, for example. */ + RND_CFT_BOOLEAN thin_draw_poly; /* if set, polygons on the screen are drawn as outlines. */ + RND_CFT_BOOLEAN as_drawn_poly; /* if set, also draw the as-drawn outline of polygons */ + RND_CFT_BOOLEAN wireframe_draw; /* if set, lines and arcs on the screen are drawn as outlines. */ + RND_CFT_BOOLEAN local_ref; /* use local reference for moves, by setting the mark at the beginning of each move. */ + RND_CFT_BOOLEAN check_planes; /* when set, only polygons and their clearances are drawn, to see if polygons have isolated regions. */ + RND_CFT_BOOLEAN hide_names; /* when set, subc floater text objects (typical use case: refdes text) are not drawn. */ + RND_CFT_BOOLEAN description; /* obsolete - DO NOT USE - kept for compatibility */ + RND_CFT_BOOLEAN name_on_pcb; /* obsolete - DO NOT USE - kept for compatibility */ + RND_CFT_STRING subc_id; /* subcircuit ID template for diplaying the subcircuit label on the subcircuit layer; default to displaying the refes, if empty; syntax if the same as for DYNTEXT */ + RND_CFT_STRING term_id; /* terminal ID template for diplaying the subcircuit label on the subcircuit layer; default to displaying termid[intconn], if empty; syntax if the same as for DYNTEXT */ + RND_CFT_BOOLEAN move_linepoint_uses_route; /* Moving a line point calculates a new line route. This allows 45/90 line modes when editing lines. */ + RND_CFT_BOOLEAN auto_via; /* when drawing traces and switching layers or when moving an object from one layer to another, try to keep connections by automatically inserting vias. */ + RND_CFT_REAL route_radius; /* temporary: route draw helper's arc radius at corners (factor of the trace thickness) */ - CFT_BOOLEAN io_incomp_popup; /* wether to enable popping up the io incompatibility list dialog on save incompatibility errors */ - CFT_STRING io_incomp_style; /* view listing style (list or simple), when io_incomp_popup is true */ + RND_CFT_BOOLEAN io_incomp_popup; /* wether to enable popping up the io incompatibility list dialog on save incompatibility errors */ + RND_CFT_STRING io_incomp_style; /* view listing style (list or simple), when io_incomp_popup is true */ - CFT_INTEGER click_time; /* default time for click expiration, in ms */ + RND_CFT_INTEGER click_time; /* default time for click expiration, in ms */ struct { - CFT_BOOLEAN disable_negative; /* selection box behaviour: disable the negative-direction selection - any selection box will select only what's fully within the box */ - CFT_BOOLEAN symmetric_negative; /* selection box behaviour: when set, the selection direction is considered negative only if the box has negative size in the X direction */ + RND_CFT_BOOLEAN disable_negative; /* selection box behaviour: disable the negative-direction selection - any selection box will select only what's fully within the box */ + RND_CFT_BOOLEAN symmetric_negative; /* selection box behaviour: when set, the selection direction is considered negative only if the box has negative size in the X direction */ } selection; @@ -74,152 +74,152 @@ reasons to keep it here: - the original pcb and pcb-rnd file formats already have named/numbered flags for it, so io_pcb needs it - more than one router plugins may share it */ - CFT_BOOLEAN live_routing; /* autorouter shows tracks in progress */ + RND_CFT_BOOLEAN live_routing; /* autorouter shows tracks in progress */ /* Keep it here instead of the router plugin: more than one router plugin may share these */ - CFT_BOOLEAN beep_when_finished; /* flag if a signal should be produced when searching of connections is done */ + RND_CFT_BOOLEAN beep_when_finished; /* flag if a signal should be produced when searching of connections is done */ - CFT_INTEGER undo_warning_size; /* warn the user when undo list exceeds this amount of kilobytes in memory */ + RND_CFT_INTEGER undo_warning_size; /* warn the user when undo list exceeds this amount of kilobytes in memory */ - CFT_STRING subc_conv_refdes; /* automatic refdes value assigned to new subcircuits on conversion from objects - if empty, no refdes text or attribute is added; if the value is , the refdes text object is added but no refdes attribute is created */ + RND_CFT_STRING subc_conv_refdes; /* automatic refdes value assigned to new subcircuits on conversion from objects - if empty, no refdes text or attribute is added; if the value is , the refdes text object is added but no refdes attribute is created */ } editor; struct { struct { - CFT_STRING method; /* method/strategy of placement; one of: disperse, frame, fit */ - CFT_STRING location; /* placement coordinate for methods that require it; if empty, use fixed coordinates at x,y; if non-empty, it may be: mark, center */ - CFT_COORD x; /* for some methods if location is empty, X coordinate of placement */ - CFT_COORD y; /* for some methods if location is empty, Y coordinate of placement */ - CFT_COORD disperse; /* dispersion distance for the disperse method */ + RND_CFT_STRING method; /* method/strategy of placement; one of: disperse, frame, fit */ + RND_CFT_STRING location; /* placement coordinate for methods that require it; if empty, use fixed coordinates at x,y; if non-empty, it may be: mark, center */ + RND_CFT_COORD x; /* for some methods if location is empty, X coordinate of placement */ + RND_CFT_COORD y; /* for some methods if location is empty, Y coordinate of placement */ + RND_CFT_COORD disperse; /* dispersion distance for the disperse method */ } footprint_placement; struct { - CFT_STRING method; /* method/strategy of removal; one of: */ + RND_CFT_STRING method; /* method/strategy of removal; one of: */ } footprint_removal; } import; const struct { /* rc */ - CFT_REAL file_changed_interval; /* how often to check if the file has changed on the disk (in seconds); 0 or negative means no check at all */ - CFT_INTEGER backup_interval; /* time between two backups in seconds; 0 means disabled (no backups) */ - CFT_STRING brave; /* brave mode flags: when non-empty, enable various experimental (unstable) features - useful for testers */ - CFT_STRING font_command; /* file name template; if not empty, run this command and read its output for loading the font; %f is the file name */ - CFT_STRING file_command; /* file name template; if not empty, run this command and read its output for loading a pcb file; %f is the file name, %p is the conf setting rc.file_path */ - CFT_STRING file_path; - CFT_STRING library_shell; - CFT_LIST library_search_paths; + RND_CFT_REAL file_changed_interval; /* how often to check if the file has changed on the disk (in seconds); 0 or negative means no check at all */ + RND_CFT_INTEGER backup_interval; /* time between two backups in seconds; 0 means disabled (no backups) */ + RND_CFT_STRING brave; /* brave mode flags: when non-empty, enable various experimental (unstable) features - useful for testers */ + RND_CFT_STRING font_command; /* file name template; if not empty, run this command and read its output for loading the font; %f is the file name */ + RND_CFT_STRING file_command; /* file name template; if not empty, run this command and read its output for loading a pcb file; %f is the file name, %p is the conf setting rc.file_path */ + RND_CFT_STRING file_path; + RND_CFT_STRING library_shell; + RND_CFT_LIST library_search_paths; - CFT_STRING emergency_name; /* file name template for emergency save anonymous .pcb files (when pcb-rnd crashes); optional field: %ld --> pid; must be shorter than 240 characters. Don't do emergency save if this item is empty. */ - CFT_STRING emergency_format; /* if set, use this format for the backups; if unset, use the default format */ - CFT_STRING backup_name; /* file name template for periodic backup of board files; optional fields (the usual % substitutions work) */ - CFT_STRING backup_format; /* if set, use this format for the backups; if unset or set to 'original', use the original format */ + RND_CFT_STRING emergency_name; /* file name template for emergency save anonymous .pcb files (when pcb-rnd crashes); optional field: %ld --> pid; must be shorter than 240 characters. Don't do emergency save if this item is empty. */ + RND_CFT_STRING emergency_format; /* if set, use this format for the backups; if unset, use the default format */ + RND_CFT_STRING backup_name; /* file name template for periodic backup of board files; optional fields (the usual % substitutions work) */ + RND_CFT_STRING backup_format; /* if set, use this format for the backups; if unset or set to 'original', use the original format */ - CFT_STRING save_command; /* command to pipe the pcb, footprint or buffer file into, when saving (makes lihata persist impossible) */ - CFT_BOOLEAN keep_save_backups; /* a copy is made before a save operation overwrites an existing file; if this setting is true, keep the copy even after a successful save */ - CFT_LIST default_font_file; /* name of default font file (list of names to search) */ - CFT_LIST default_pcb_file; + RND_CFT_STRING save_command; /* command to pipe the pcb, footprint or buffer file into, when saving (makes lihata persist impossible) */ + RND_CFT_BOOLEAN keep_save_backups; /* a copy is made before a save operation overwrites an existing file; if this setting is true, keep the copy even after a successful save */ + RND_CFT_LIST default_font_file; /* name of default font file (list of names to search) */ + RND_CFT_LIST default_pcb_file; - CFT_BOOLEAN silently_create_on_load; /* do not generate an error message if the board does not exist on load from command line argument, silently create it in memory */ + RND_CFT_BOOLEAN silently_create_on_load; /* do not generate an error message if the board does not exist on load from command line argument, silently create it in memory */ - CFT_STRING script_filename; /* PCB Actions script to execute on startup */ - CFT_STRING action_string; /* PCB Actions string to execute on startup */ - CFT_STRING rat_path; - CFT_STRING rat_command; /* file name template; if not empty, run this command and read its output for loading a rats; %f is the file name, %p is the rc.rat_path conf setting */ + RND_CFT_STRING script_filename; /* PCB Actions script to execute on startup */ + RND_CFT_STRING action_string; /* PCB Actions string to execute on startup */ + RND_CFT_STRING rat_path; + RND_CFT_STRING rat_command; /* file name template; if not empty, run this command and read its output for loading a rats; %f is the file name, %p is the rc.rat_path conf setting */ - CFT_STRING save_final_fallback_fmt;/* when a new file is created (by running pcb-rnd with the file name) there won't be a known format; pcb-rnd will guess from the file name (extension) but eventhat may fail. This format is the final fallback that'll be used if no other guessing mechanism worked. The user can override this by save as. */ - CFT_STRING save_fp_fmt; /* when saving a buffer element/subcircuit, prefer this format by default */ + RND_CFT_STRING save_final_fallback_fmt;/* when a new file is created (by running pcb-rnd with the file name) there won't be a known format; pcb-rnd will guess from the file name (extension) but eventhat may fail. This format is the final fallback that'll be used if no other guessing mechanism worked. The user can override this by save as. */ + RND_CFT_STRING save_fp_fmt; /* when saving a buffer element/subcircuit, prefer this format by default */ /***** automatically set (in postproc) *****/ - CFT_BOOLEAN have_regex; /* whether we have regex compiled in */ + RND_CFT_BOOLEAN have_regex; /* whether we have regex compiled in */ struct { - CFT_STRING prefix; /* e.g. /usr/local */ - CFT_STRING lib; /* e.g. /usr/lib/pcb-rnd */ - CFT_STRING bin; /* e.g. /usr/bin */ - CFT_STRING share; /* e.g. /usr/share/pcb-rnd */ + RND_CFT_STRING prefix; /* e.g. /usr/local */ + RND_CFT_STRING lib; /* e.g. /usr/lib/pcb-rnd */ + RND_CFT_STRING bin; /* e.g. /usr/bin */ + RND_CFT_STRING share; /* e.g. /usr/share/pcb-rnd */ - CFT_STRING design; /* directory path of the current design, or if the current design doesn't have a file name yet */ + RND_CFT_STRING design; /* directory path of the current design, or if the current design doesn't have a file name yet */ } path; } rc; const struct { /* design: defaults of a new layout */ - CFT_COORD via_thickness; - CFT_COORD via_drilling_hole; - CFT_COORD line_thickness; - CFT_COORD clearance; + RND_CFT_COORD via_thickness; + RND_CFT_COORD via_drilling_hole; + RND_CFT_COORD line_thickness; + RND_CFT_COORD clearance; /* old drc settings */ - CFT_COORD bloat; /* minimum space between copper features on different networks */ - CFT_COORD shrink; /* minimum overlap between connected copper features */ - CFT_COORD min_wid; /* minimum copper width */ - CFT_COORD min_slk; /* minimum silk width */ - CFT_COORD min_drill; /* minimum drill diameter */ - CFT_COORD min_ring; /* minimum annular ring */ + RND_CFT_COORD bloat; /* minimum space between copper features on different networks */ + RND_CFT_COORD shrink; /* minimum overlap between connected copper features */ + RND_CFT_COORD min_wid; /* minimum copper width */ + RND_CFT_COORD min_slk; /* minimum silk width */ + RND_CFT_COORD min_drill; /* minimum drill diameter */ + RND_CFT_COORD min_ring; /* minimum annular ring */ struct { /* drc: new, flexible drc settings */ - CFT_COORD min_copper_clearance; /* minimum space between copper features on different networks (default when the net attributes or other settings don't specify a different value) */ - CFT_COORD min_copper_overlap; /* minimum overlap between connected copper features (default when the net attributes or other settings don't specify a different value)*/ + RND_CFT_COORD min_copper_clearance; /* minimum space between copper features on different networks (default when the net attributes or other settings don't specify a different value) */ + RND_CFT_COORD min_copper_overlap; /* minimum overlap between connected copper features (default when the net attributes or other settings don't specify a different value)*/ } drc; struct { /* disable drc checks on a per rule basis */ - CFT_BOOLEAN dummy; /* placeholder, not used */ + RND_CFT_BOOLEAN dummy; /* placeholder, not used */ } drc_disable; - CFT_INTEGER text_scale; /* text scaling in % */ - CFT_COORD text_thickness; /* override stroke font text thickness */ - CFT_INTEGER text_font_id; - CFT_REAL poly_isle_area; /* polygon min area */ - CFT_STRING fab_author; /* Full name of author for FAB drawings */ - CFT_STRING initial_layer_stack; /* deprecated. */ + RND_CFT_INTEGER text_scale; /* text scaling in % */ + RND_CFT_COORD text_thickness; /* override stroke font text thickness */ + RND_CFT_INTEGER text_font_id; + RND_CFT_REAL poly_isle_area; /* polygon min area */ + RND_CFT_STRING fab_author; /* Full name of author for FAB drawings */ + RND_CFT_STRING initial_layer_stack; /* deprecated. */ - CFT_COORD paste_adjust; /* Adjust paste thickness */ + RND_CFT_COORD paste_adjust; /* Adjust paste thickness */ } design; /* @path appearance/color */ const struct { /* appearance */ - CFT_BOOLEAN compact; /* when set: optimize GUI widget arrangement for small screen; may be wasting some screen space on large screen */ - CFT_COORD rat_thickness; - CFT_COORD mark_size; /* relative marker size */ - CFT_BOOLEAN text_host_bbox; /* when moving a text object, the outline thin-draw should also include the bounding box */ - CFT_REAL term_label_size; /* size of terminal labels, in pcb font scale (100 is for the normal size) */ - CFT_BOOLEAN subc_layer_per_side; /* hide top or bottom placed subcircuit annotations if the view is showing the other side */ - CFT_BOOLEAN invis_other_groups; /* render non-current group layers with the inivisble color */ - CFT_BOOLEAN black_current_group; /* render all layers of the current group black, for maximum contrast */ + RND_CFT_BOOLEAN compact; /* when set: optimize GUI widget arrangement for small screen; may be wasting some screen space on large screen */ + RND_CFT_COORD rat_thickness; + RND_CFT_COORD mark_size; /* relative marker size */ + RND_CFT_BOOLEAN text_host_bbox; /* when moving a text object, the outline thin-draw should also include the bounding box */ + RND_CFT_REAL term_label_size; /* size of terminal labels, in pcb font scale (100 is for the normal size) */ + RND_CFT_BOOLEAN subc_layer_per_side; /* hide top or bottom placed subcircuit annotations if the view is showing the other side */ + RND_CFT_BOOLEAN invis_other_groups; /* render non-current group layers with the inivisble color */ + RND_CFT_BOOLEAN black_current_group; /* render all layers of the current group black, for maximum contrast */ struct { /* color */ - CFT_COLOR crosshair; /* obsolete - DO NOT USE - kept for compatibility (use appearance/color/cross instead) */ - CFT_COLOR attached; /* color of the non-layer corsshair-attached objects drawn in XOR (e.g. when padstack or buffer outline before placed; layer-objects like lines and arcs typically onherit the layer color) */ - CFT_COLOR drc; /* color of the on-screen drc clearance indication while routing */ - CFT_COLOR mark; /* color of the on-screen marks (user placed mark and automatic 'grabbed' mark) */ - CFT_COLOR selected; /* generic object selection color */ - CFT_COLOR via; /* non-terminal padstack shape on current layer */ - CFT_COLOR via_far; /* non-terminal padstack shape on non-current ('far side') layer */ - CFT_COLOR pin; /* terminal padstack shape on current layer */ - CFT_COLOR pin_far; /* terminal padstack shape on non-current ('far side') layer */ - CFT_COLOR pin_name; /* on-screen terminal number/name labels */ - CFT_COLOR subc; /* on-screen subcircuit marks */ - CFT_COLOR subc_nonetlist; /* on-screen subcircuit marks for subcircuits with the nonetlist flag */ - CFT_COLOR extobj; /* on-screen marks of extended objects */ - CFT_COLOR padstackmark; /* on-screen center mark cross for padstacks */ - CFT_COLOR rat; /* on-screen rat lines */ - CFT_COLOR invisible_objects; /* other-side objects and padstack shapes on non-current layer */ - CFT_COLOR connected; /* 'connected' highlight (galvanic connections found) */ - CFT_COLOR warn; /* warning highlight (e.g. object found to cause a short) */ - CFT_COLOR layer[PCB_MAX_LAYER]; /* default layer colors; when a new layer is created, a color from this list is assigned initially */ - CFT_COLOR mask; /* default mask layer color (when a new mask layer is created) */ - CFT_COLOR paste; /* default paste layer color (when a new paste layer is created) */ - CFT_COLOR element; /* default silk layer color (when a new silk layer is created) */ + RND_CFT_COLOR crosshair; /* obsolete - DO NOT USE - kept for compatibility (use appearance/color/cross instead) */ + RND_CFT_COLOR attached; /* color of the non-layer corsshair-attached objects drawn in XOR (e.g. when padstack or buffer outline before placed; layer-objects like lines and arcs typically onherit the layer color) */ + RND_CFT_COLOR drc; /* color of the on-screen drc clearance indication while routing */ + RND_CFT_COLOR mark; /* color of the on-screen marks (user placed mark and automatic 'grabbed' mark) */ + RND_CFT_COLOR selected; /* generic object selection color */ + RND_CFT_COLOR via; /* non-terminal padstack shape on current layer */ + RND_CFT_COLOR via_far; /* non-terminal padstack shape on non-current ('far side') layer */ + RND_CFT_COLOR pin; /* terminal padstack shape on current layer */ + RND_CFT_COLOR pin_far; /* terminal padstack shape on non-current ('far side') layer */ + RND_CFT_COLOR pin_name; /* on-screen terminal number/name labels */ + RND_CFT_COLOR subc; /* on-screen subcircuit marks */ + RND_CFT_COLOR subc_nonetlist; /* on-screen subcircuit marks for subcircuits with the nonetlist flag */ + RND_CFT_COLOR extobj; /* on-screen marks of extended objects */ + RND_CFT_COLOR padstackmark; /* on-screen center mark cross for padstacks */ + RND_CFT_COLOR rat; /* on-screen rat lines */ + RND_CFT_COLOR invisible_objects; /* other-side objects and padstack shapes on non-current layer */ + RND_CFT_COLOR connected; /* 'connected' highlight (galvanic connections found) */ + RND_CFT_COLOR warn; /* warning highlight (e.g. object found to cause a short) */ + RND_CFT_COLOR layer[PCB_MAX_LAYER]; /* default layer colors; when a new layer is created, a color from this list is assigned initially */ + RND_CFT_COLOR mask; /* default mask layer color (when a new mask layer is created) */ + RND_CFT_COLOR paste; /* default paste layer color (when a new paste layer is created) */ + RND_CFT_COLOR element; /* default silk layer color (when a new silk layer is created) */ } color; struct { - CFT_INTEGER cross_thick; /* cross thickness in pixels - 0 means disable crosses */ - CFT_COORD cross_size; /* cross size in word coords - size of one arm of the cross (minus the hole radius) */ + RND_CFT_INTEGER cross_thick; /* cross thickness in pixels - 0 means disable crosses */ + RND_CFT_COORD cross_size; /* cross size in word coords - size of one arm of the cross (minus the hole radius) */ } padstack; struct { - CFT_INTEGER dash_freq; /* how dense the dashed outline should be; -1 means do not display the dashed outline; 0 means solid outline; 1..32 means dashed outline */ + RND_CFT_INTEGER dash_freq; /* how dense the dashed outline should be; -1 means do not display the dashed outline; 0 means solid outline; 1..32 means dashed outline */ } subc; struct { - CFT_INTEGER char_per_line; /* width of an output line in characters (used by separator drawing in find.c) */ + RND_CFT_INTEGER char_per_line; /* width of an output line in characters (used by separator drawing in find.c) */ } messages; struct { - CFT_INTEGER volume; /* the speakers volume -100..100 */ + RND_CFT_INTEGER volume; /* the speakers volume -100..100 */ } misc; } appearance; Index: trunk/src/layer_vis.c =================================================================== --- trunk/src/layer_vis.c (revision 30944) +++ trunk/src/layer_vis.c (revision 30945) @@ -210,7 +210,7 @@ static conf_hid_id_t layer_vis_conf_id; -void layer_vis_chg_mask(conf_native_t *cfg, int arr_idx) +void layer_vis_chg_mask(rnd_conf_native_t *cfg, int arr_idx) { pcb_layer_id_t n; int chg = 0; @@ -350,7 +350,7 @@ void pcb_layer_vis_init(void) { - conf_native_t *n_mask = pcb_conf_get_field("editor/show_mask"); + rnd_conf_native_t *n_mask = pcb_conf_get_field("editor/show_mask"); static conf_hid_callbacks_t cbs_mask; layer_vis_conf_id = pcb_conf_hid_reg(layer_vis_cookie, NULL); Index: trunk/src/librnd/core/conf.c =================================================================== --- trunk/src/librnd/core/conf.c (revision 30944) +++ trunk/src/librnd/core/conf.c (revision 30945) @@ -108,7 +108,7 @@ return lht_dom_hash_get(cwd, pcb_conf_list_name); } -int pcb_conf_insert_tree_as(conf_role_t role, lht_node_t *root) +int pcb_conf_insert_tree_as(rnd_conf_role_t role, lht_node_t *root) { lht_doc_t *d; @@ -163,7 +163,7 @@ return d; } -int pcb_conf_load_as(conf_role_t role, const char *fn, int fn_is_text) +int pcb_conf_load_as(rnd_conf_role_t role, const char *fn, int fn_is_text) { lht_doc_t *d; const char *ifn, *role_name = pcb_conf_role_name(role); @@ -246,7 +246,7 @@ } -static int conf_merge_plug(lht_doc_t *d, conf_role_t role, const char *path) +static int conf_merge_plug(lht_doc_t *d, rnd_conf_role_t role, const char *path) { lht_err_t err; @@ -265,7 +265,7 @@ } /* Load plugin config files */ -static int conf_load_plug_files(conf_role_t role, const char *dir) +static int conf_load_plug_files(rnd_conf_role_t role, const char *dir) { char path[PCB_PATH_MAX], *fn; int dlen, cnt = 0; @@ -302,7 +302,7 @@ return cnt; } -static int conf_load_plug_interns(conf_role_t role) +static int conf_load_plug_interns(rnd_conf_role_t role) { int cnt = 0; htsi_entry_t *e; @@ -324,21 +324,21 @@ return cnt; } -conf_native_type_t pcb_conf_native_type_parse(const char *s) +rnd_conf_native_type_t pcb_conf_native_type_parse(const char *s) { - if (rnd_strcasecmp(s, "string") == 0) return CFN_STRING; - if (rnd_strcasecmp(s, "str") == 0) return CFN_STRING; - if (rnd_strcasecmp(s, "boolean") == 0) return CFN_BOOLEAN; - if (rnd_strcasecmp(s, "bool") == 0) return CFN_BOOLEAN; - if (rnd_strcasecmp(s, "integer") == 0) return CFN_INTEGER; - if (rnd_strcasecmp(s, "real") == 0) return CFN_REAL; - if (rnd_strcasecmp(s, "coord") == 0) return CFN_COORD; - if (rnd_strcasecmp(s, "unit") == 0) return CFN_UNIT; - if (rnd_strcasecmp(s, "color") == 0) return CFN_COLOR; - if (rnd_strcasecmp(s, "list") == 0) return CFN_LIST; - if (rnd_strcasecmp(s, "hlist") == 0) return CFN_HLIST; + if (rnd_strcasecmp(s, "string") == 0) return RND_CFN_STRING; + if (rnd_strcasecmp(s, "str") == 0) return RND_CFN_STRING; + if (rnd_strcasecmp(s, "boolean") == 0) return RND_CFN_BOOLEAN; + if (rnd_strcasecmp(s, "bool") == 0) return RND_CFN_BOOLEAN; + if (rnd_strcasecmp(s, "integer") == 0) return RND_CFN_INTEGER; + if (rnd_strcasecmp(s, "real") == 0) return RND_CFN_REAL; + if (rnd_strcasecmp(s, "coord") == 0) return RND_CFN_COORD; + if (rnd_strcasecmp(s, "unit") == 0) return RND_CFN_UNIT; + if (rnd_strcasecmp(s, "color") == 0) return RND_CFN_COLOR; + if (rnd_strcasecmp(s, "list") == 0) return RND_CFN_LIST; + if (rnd_strcasecmp(s, "hlist") == 0) return RND_CFN_HLIST; - return CFN_max; + return RND_CFN_max; } @@ -363,7 +363,7 @@ return "(unknown)"; } -conf_role_t pcb_conf_role_parse(const char *s) +rnd_conf_role_t pcb_conf_role_parse(const char *s) { if (rnd_strcasecmp(s, "internal") == 0) return CFR_INTERNAL; if (rnd_strcasecmp(s, "system") == 0) return CFR_SYSTEM; @@ -376,7 +376,7 @@ return CFR_invalid; } -const char *pcb_conf_role_name(conf_role_t r) +const char *pcb_conf_role_name(rnd_conf_role_t r) { switch(r) { case CFR_INTERNAL: return "internal"; @@ -503,7 +503,7 @@ return NULL; } -int pcb_conf_parse_text(rnd_confitem_t *dst, int idx, conf_native_type_t type, const char *text, lht_node_t *err_node) +int pcb_conf_parse_text(rnd_confitem_t *dst, int idx, rnd_conf_native_type_t type, const char *text, lht_node_t *err_node) { const char *strue[] = {"true", "yes", "on", "1", NULL}; const char *sfalse[] = {"false", "no", "off", "0", NULL}; @@ -515,10 +515,10 @@ const pcb_unit_t *u; switch(type) { - case CFN_STRING: + case RND_CFN_STRING: dst->string[idx] = text; break; - case CFN_BOOLEAN: + case RND_CFN_BOOLEAN: while(isspace(*text)) text++; for(s = strue; *s != NULL; s++) if (rnd_strncasecmp(*s, text, strlen(*s)) == 0) { @@ -532,7 +532,7 @@ } pcb_hid_cfg_error(err_node, "Invalid boolean value: %s\n", text); return -1; - case CFN_INTEGER: + case RND_CFN_INTEGER: if ((text[0] == '0') && (text[1] == 'x')) { text += 2; base = 16; @@ -546,7 +546,7 @@ } pcb_hid_cfg_error(err_node, "Invalid integer value: %s\n", text); return -1; - case CFN_REAL: + case RND_CFN_REAL: d = strtod(text, &end); if (*end == '\0') { dst->real[idx] = d; @@ -554,7 +554,7 @@ } pcb_hid_cfg_error(err_node, "Invalid numeric value: %s\n", text); return -1; - case CFN_COORD: + case RND_CFN_COORD: { rnd_bool succ; dst->coord[idx] = pcb_get_value(text, NULL, NULL, &succ); @@ -562,7 +562,7 @@ pcb_hid_cfg_error(err_node, "Invalid numeric value (coordinate): %s\n", text); } break; - case CFN_UNIT: + case RND_CFN_UNIT: u = get_unit_struct(text); if (u == NULL) pcb_hid_cfg_error(err_node, "Invalid unit: %s\n", text); @@ -569,7 +569,7 @@ else dst->unit[idx] = u; break; - case CFN_COLOR: + case RND_CFN_COLOR: if (rnd_color_load_str(&dst->color[idx], text) != 0) { pcb_hid_cfg_error(err_node, "Invalid color value: '%s'\n", text); return -1; @@ -582,7 +582,7 @@ return 0; } -int pcb_conf_merge_patch_text(conf_native_t *dest, lht_node_t *src, int prio, rnd_conf_policy_t pol) +int pcb_conf_merge_patch_text(rnd_conf_native_t *dest, lht_node_t *src, int prio, rnd_conf_policy_t pol) { if ((pol == RND_POL_DISABLE) || (dest->prop[0].prio > prio)) return 0; @@ -601,7 +601,7 @@ return 0; } -static void conf_insert_arr(conf_native_t *dest, int offs) +static void conf_insert_arr(rnd_conf_native_t *dest, int offs) { #define CASE_PCB_MOVE(typ, fld) \ case typ: memmove(dest->val.fld+offs, dest->val.fld, dest->used * sizeof(dest->val.fld[0])); return @@ -609,16 +609,16 @@ memmove(dest->prop+offs, dest->prop, dest->used * sizeof(dest->prop[0])); if (dest->used > 0) { switch(dest->type) { - CASE_PCB_MOVE(CFN_STRING, string); - CASE_PCB_MOVE(CFN_BOOLEAN, boolean); - CASE_PCB_MOVE(CFN_INTEGER, integer); - CASE_PCB_MOVE(CFN_REAL, real); - CASE_PCB_MOVE(CFN_COORD, coord); - CASE_PCB_MOVE(CFN_UNIT, unit); - CASE_PCB_MOVE(CFN_COLOR, color); - CASE_PCB_MOVE(CFN_LIST, list); - CASE_PCB_MOVE(CFN_HLIST, list); - case CFN_max: break; + CASE_PCB_MOVE(RND_CFN_STRING, string); + CASE_PCB_MOVE(RND_CFN_BOOLEAN, boolean); + CASE_PCB_MOVE(RND_CFN_INTEGER, integer); + CASE_PCB_MOVE(RND_CFN_REAL, real); + CASE_PCB_MOVE(RND_CFN_COORD, coord); + CASE_PCB_MOVE(RND_CFN_UNIT, unit); + CASE_PCB_MOVE(RND_CFN_COLOR, color); + CASE_PCB_MOVE(RND_CFN_LIST, list); + CASE_PCB_MOVE(RND_CFN_HLIST, list); + case RND_CFN_max: break; } } #undef CASE_MOVE @@ -625,7 +625,7 @@ abort(); /* unhandled type */ } -int pcb_conf_merge_patch_array(conf_native_t *dest, lht_node_t *src_lst, int prio, rnd_conf_policy_t pol) +int pcb_conf_merge_patch_array(rnd_conf_native_t *dest, lht_node_t *src_lst, int prio, rnd_conf_policy_t pol) { lht_node_t *s; int res, idx, didx, maxpr; @@ -683,7 +683,7 @@ return res; } -int pcb_conf_merge_patch_list(conf_native_t *dest, lht_node_t *src_lst, int prio, rnd_conf_policy_t pol) +int pcb_conf_merge_patch_list(rnd_conf_native_t *dest, lht_node_t *src_lst, int prio, rnd_conf_policy_t pol) { lht_node_t *s, *prev; int res = 0; @@ -702,7 +702,7 @@ else prev = NULL; - if ((s->type == LHT_TEXT) || ((s->type == LHT_HASH) && (dest->type == CFN_HLIST))) { + if ((s->type == LHT_TEXT) || ((s->type == LHT_HASH) && (dest->type == RND_CFN_HLIST))) { i = calloc(sizeof(pcb_conf_listitem_t), 1); i->name = s->name; i->val.string = &i->payload; @@ -711,7 +711,7 @@ } if (s->type == LHT_TEXT) { - if (pcb_conf_parse_text(&i->val, 0, CFN_STRING, s->data.text.value, s) != 0) { + if (pcb_conf_parse_text(&i->val, 0, RND_CFN_STRING, s->data.text.value, s) != 0) { free(i); continue; } @@ -718,11 +718,11 @@ pcb_conflist_insert(dest->val.list, i); dest->used |= 1; } - else if ((s->type == LHT_HASH) && (dest->type == CFN_HLIST)) { + else if ((s->type == LHT_HASH) && (dest->type == RND_CFN_HLIST)) { i->val.any = NULL; pcb_conflist_insert(dest->val.list, i); dest->used |= 1; - if ((dest->type == CFN_HLIST) || (s->user_data == NULL)) { + if ((dest->type == RND_CFN_HLIST) || (s->user_data == NULL)) { conf_hid_global_cb_ptr(dest, i, new_hlist_item_post); s->user_data = pcb_cast_f2d((pcb_fptr_t)pcb_conf_merge_patch_list); } @@ -742,7 +742,7 @@ /* fall through */ case RND_POL_APPEND: for(s = src_lst->data.list.first; s != NULL; s = s->next) { - if ((s->type == LHT_TEXT) || ((s->type == LHT_HASH) && (dest->type == CFN_HLIST))) { + if ((s->type == LHT_TEXT) || ((s->type == LHT_HASH) && (dest->type == RND_CFN_HLIST))) { i = calloc(sizeof(pcb_conf_listitem_t), 1); i->name = s->name; i->val.string = &i->payload; @@ -750,7 +750,7 @@ i->prop.src = s; } if (s->type == LHT_TEXT) { - if (pcb_conf_parse_text(&i->val, 0, CFN_STRING, s->data.text.value, s) != 0) { + if (pcb_conf_parse_text(&i->val, 0, RND_CFN_STRING, s->data.text.value, s) != 0) { free(i); continue; } @@ -757,11 +757,11 @@ pcb_conflist_append(dest->val.list, i); dest->used |= 1; } - else if ((s->type == LHT_HASH) && (dest->type == CFN_HLIST)) { + else if ((s->type == LHT_HASH) && (dest->type == RND_CFN_HLIST)) { pcb_conflist_append(dest->val.list, i); i->val.any = NULL; dest->used |= 1; - if ((dest->type == CFN_HLIST) && (s->user_data == NULL)) { + if ((dest->type == RND_CFN_HLIST) && (s->user_data == NULL)) { conf_hid_global_cb_ptr(dest, i, new_hlist_item_post); s->user_data = pcb_cast_f2d((pcb_fptr_t)pcb_conf_merge_patch_list); } @@ -776,7 +776,7 @@ return res; } -int pcb_conf_merge_patch_recurse(lht_node_t *sect, conf_role_t role, int default_prio, rnd_conf_policy_t default_policy, const char *path_prefix); +int pcb_conf_merge_patch_recurse(lht_node_t *sect, rnd_conf_role_t role, int default_prio, rnd_conf_policy_t default_policy, const char *path_prefix); typedef struct conf_ignore_s { const char *name; @@ -845,9 +845,9 @@ } -int pcb_conf_merge_patch_item(const char *path, lht_node_t *n, conf_role_t role, int default_prio, rnd_conf_policy_t default_policy) +int pcb_conf_merge_patch_item(const char *path, lht_node_t *n, rnd_conf_role_t role, int default_prio, rnd_conf_policy_t default_policy) { - conf_native_t *target = pcb_conf_get_field(path); + rnd_conf_native_t *target = pcb_conf_get_field(path); int res = 0; if ((role == CFR_DESIGN) || (role == CFR_PROJECT)) { @@ -871,7 +871,7 @@ case LHT_LIST: if (target == NULL) conf_warn_unknown_paths(path, n); - else if ((target->type == CFN_LIST) || (target->type == CFN_HLIST)) + else if ((target->type == RND_CFN_LIST) || (target->type == RND_CFN_HLIST)) res |= pcb_conf_merge_patch_list(target, n, default_prio, default_policy); else if (target->array_size > 1) res |= pcb_conf_merge_patch_array(target, n, default_prio, default_policy); @@ -891,7 +891,7 @@ /* merge main subtree of a patch */ -int pcb_conf_merge_patch_recurse(lht_node_t *sect, conf_role_t role, int default_prio, rnd_conf_policy_t default_policy, const char *path_prefix) +int pcb_conf_merge_patch_recurse(lht_node_t *sect, rnd_conf_role_t role, int default_prio, rnd_conf_policy_t default_policy, const char *path_prefix) { lht_dom_iterator_t it; lht_node_t *n; @@ -922,7 +922,7 @@ return res; } -int pcb_conf_merge_patch(lht_node_t *root, conf_role_t role, long gprio) +int pcb_conf_merge_patch(lht_node_t *root, rnd_conf_role_t role, long gprio) { rnd_conf_policy_t gpolicy; lht_node_t *n; @@ -944,7 +944,7 @@ } typedef struct { - conf_role_t role; + rnd_conf_role_t role; long prio; rnd_conf_policy_t policy; lht_node_t *subtree; @@ -964,7 +964,7 @@ vmst_t merge_subtree; /* automatically initialized to all-zero */ -static void add_subtree(conf_role_t role, lht_node_t *subtree_parent_root, lht_node_t *subtree_root) +static void add_subtree(rnd_conf_role_t role, lht_node_t *subtree_parent_root, lht_node_t *subtree_root) { merge_subtree_t *m; @@ -985,7 +985,7 @@ return -1; } -static void conf_merge_all_top(conf_role_t role, const char *path, lht_node_t *cr) +static void conf_merge_all_top(rnd_conf_role_t role, const char *path, lht_node_t *cr) { lht_node_t *r, *r2; for(r = cr->data.list.first; r != NULL; r = r->next) { @@ -1028,7 +1028,7 @@ return ret; } -static void conf_field_clear(conf_native_t *f) +static void conf_field_clear(rnd_conf_native_t *f) { if (strncmp(f->hash_path, "temp", 4) == 0) return; @@ -1035,15 +1035,15 @@ if (f->used > 0) { #define clr(field) memset(f->val.field, 0, sizeof(*(f->val.field)) * f->used) switch(f->type) { - case CFN_STRING: clr(string); break; - case CFN_BOOLEAN: clr(boolean); break; - case CFN_INTEGER: clr(integer); break; - case CFN_REAL: clr(real); break; - case CFN_COORD: clr(coord); break; - case CFN_UNIT: clr(unit); break; - case CFN_COLOR: clr(color); break; - case CFN_LIST: - case CFN_HLIST: + case RND_CFN_STRING: clr(string); break; + case RND_CFN_BOOLEAN: clr(boolean); break; + case RND_CFN_INTEGER: clr(integer); break; + case RND_CFN_REAL: clr(real); break; + case RND_CFN_COORD: clr(coord); break; + case RND_CFN_UNIT: clr(unit); break; + case RND_CFN_COLOR: clr(color); break; + case RND_CFN_LIST: + case RND_CFN_HLIST: while(pcb_conflist_first(f->val.list)) { /* need to free all items of a list before clearing the main struct */ pcb_conf_listitem_t *i = pcb_conflist_first(f->val.list); pcb_conflist_remove(i); @@ -1051,9 +1051,9 @@ } clr(list); break; - case CFN_max: break; + case RND_CFN_max: break; } - memset(f->prop, 0, sizeof(confprop_t) * f->used); + memset(f->prop, 0, sizeof(rnd_confprop_t) * f->used); #undef clr } @@ -1064,14 +1064,14 @@ int rnd_conf_rev = 0; void pcb_conf_update(const char *path, int arr_idx) { - conf_native_t *n; + rnd_conf_native_t *n; /* clear memory-bin data first */ if (path == NULL) { htsp_entry_t *e; conf_fields_foreach(e) { - conf_hid_global_cb((conf_native_t *)e->value, -1, val_change_pre); - conf_hid_local_cb((conf_native_t *)e->value, -1, val_change_pre); + conf_hid_global_cb((rnd_conf_native_t *)e->value, -1, val_change_pre); + conf_hid_local_cb((rnd_conf_native_t *)e->value, -1, val_change_pre); conf_field_clear(e->value); } } @@ -1110,8 +1110,8 @@ if (path == NULL) { htsp_entry_t *e; conf_fields_foreach(e) { - conf_hid_local_cb((conf_native_t *)e->value, -1, val_change_post); - conf_hid_global_cb((conf_native_t *)e->value, -1, val_change_post); + conf_hid_local_cb((rnd_conf_native_t *)e->value, -1, val_change_post); + conf_hid_global_cb((rnd_conf_native_t *)e->value, -1, val_change_post); } } else { @@ -1156,7 +1156,7 @@ return ov; } -lht_node_t *pcb_conf_lht_get_first(conf_role_t target, int create) +lht_node_t *pcb_conf_lht_get_first(rnd_conf_role_t target, int create) { assert(target != CFR_invalid); assert(target >= 0); @@ -1166,7 +1166,7 @@ return conf_lht_get_first_(pcb_conf_main_root[target]->root, POL_ANY, create); } -lht_node_t *pcb_conf_lht_get_first_plug(conf_role_t target, int create) +lht_node_t *pcb_conf_lht_get_first_plug(rnd_conf_role_t target, int create) { assert(target != CFR_invalid); assert(target >= 0); @@ -1176,7 +1176,7 @@ return conf_lht_get_first_(pcb_conf_plug_root[target]->root, POL_ANY, create); } -lht_node_t *pcb_conf_lht_get_first_pol(conf_role_t target, rnd_conf_policy_t pol, int create) +lht_node_t *pcb_conf_lht_get_first_pol(rnd_conf_role_t target, rnd_conf_policy_t pol, int create) { assert(target != CFR_invalid); assert(target >= 0); @@ -1186,7 +1186,7 @@ return conf_lht_get_first_(pcb_conf_main_root[target]->root, pol, create); } -static lht_node_t *conf_lht_get_at_(conf_role_t target, const char *conf_path, const char *lht_path, int allow_plug, int create) +static lht_node_t *conf_lht_get_at_(rnd_conf_role_t target, const char *conf_path, const char *lht_path, int allow_plug, int create) { lht_node_t *n, *r = NULL; @@ -1211,7 +1211,7 @@ return r; } -lht_node_t *pcb_conf_lht_get_at_mainplug(conf_role_t target, const char *path, int allow_plug, int create) +lht_node_t *pcb_conf_lht_get_at_mainplug(rnd_conf_role_t target, const char *path, int allow_plug, int create) { lht_node_t *r; char *pc, *end; @@ -1237,7 +1237,7 @@ return r; } -lht_node_t *pcb_conf_lht_get_at(conf_role_t target, const char *path, int create) +lht_node_t *pcb_conf_lht_get_at(rnd_conf_role_t target, const char *path, int create) { return pcb_conf_lht_get_at_mainplug(target, path, 0, create); } @@ -1294,9 +1294,9 @@ pcb_conf_update(NULL, -1); } -conf_native_t *pcb_conf_reg_field_(void *value, int array_size, conf_native_type_t type, const char *path, const char *desc, rnd_conf_flag_t flags) +rnd_conf_native_t *pcb_conf_reg_field_(void *value, int array_size, rnd_conf_native_type_t type, const char *path, const char *desc, rnd_conf_flag_t flags) { - conf_native_t *node; + rnd_conf_native_t *node; if (pcb_conf_fields == NULL) { pcb_conf_fields = htsp_alloc(strhash, strkeyeq); @@ -1306,11 +1306,11 @@ assert(htsp_get(pcb_conf_fields, path) == NULL); - node = calloc(sizeof(conf_native_t), 1); + node = calloc(sizeof(rnd_conf_native_t), 1); node->array_size = array_size; node->type = type; node->val.any = value; - node->prop = calloc(sizeof(confprop_t), array_size); + node->prop = calloc(sizeof(rnd_confprop_t), array_size); node->description = desc; node->hash_path = path; node->flags = flags; @@ -1323,7 +1323,7 @@ return node; } -int pcb_conf_grow_list_(conf_native_t *node, int new_size) +int pcb_conf_grow_list_(rnd_conf_native_t *node, int new_size) { void *v; int old_size = node->array_size; @@ -1333,19 +1333,19 @@ if (new_size < old_size) return -1; - v = realloc(node->prop, sizeof(confprop_t) * new_size); + v = realloc(node->prop, sizeof(rnd_confprop_t) * new_size); if (v == NULL) return -1; node->array_size = new_size; node->prop = v; - memset(node->prop + old_size, 0, sizeof(confprop_t) * (new_size - old_size)); + memset(node->prop + old_size, 0, sizeof(rnd_confprop_t) * (new_size - old_size)); return 0; } -void pcb_conf_free_native(conf_native_t *node) +void pcb_conf_free_native(rnd_conf_native_t *node) { - if ((node->type == CFN_LIST) || (node->type == CFN_HLIST)) { + if ((node->type == RND_CFN_LIST) || (node->type == RND_CFN_HLIST)) { while(pcb_conflist_first(node->val.list) != NULL) { pcb_conf_listitem_t *first = pcb_conflist_first(node->val.list); pcb_conflist_remove(first); @@ -1383,7 +1383,7 @@ } } -void pcb_conf_unreg_field(conf_native_t *field) +void pcb_conf_unreg_field(rnd_conf_native_t *field) { htsp_pop(pcb_conf_fields, field->hash_path); pcb_conf_free_native(field); @@ -1390,15 +1390,15 @@ } -conf_native_t *pcb_conf_get_field(const char *path) +rnd_conf_native_t *pcb_conf_get_field(const char *path) { return htsp_get(pcb_conf_fields, path); } -int pcb_conf_set_dry(conf_role_t target, const char *path_, int arr_idx, const char *new_val, rnd_conf_policy_t pol, int mkdirp) +int pcb_conf_set_dry(rnd_conf_role_t target, const char *path_, int arr_idx, const char *new_val, rnd_conf_policy_t pol, int mkdirp) { char *path, *basename, *next, *last, *sidx; - conf_native_t *nat; + rnd_conf_native_t *nat; lht_node_t *cwd, *nn; lht_node_type_t ty; int idx = -1; @@ -1501,7 +1501,7 @@ } while(next != NULL); /* add the last part of the path, which is either a list or a text node */ - if ((nat->array_size > 1) || (nat->type == CFN_LIST) || (nat->type == CFN_HLIST)) + if ((nat->array_size > 1) || (nat->type == RND_CFN_LIST) || (nat->type == RND_CFN_HLIST)) ty = LHT_LIST; else ty = LHT_TEXT; @@ -1616,7 +1616,7 @@ return 0; } -int pcb_conf_set(conf_role_t target, const char *path, int arr_idx, const char *new_val, rnd_conf_policy_t pol) +int pcb_conf_set(rnd_conf_role_t target, const char *path, int arr_idx, const char *new_val, rnd_conf_policy_t pol) { int res; res = pcb_conf_set_dry(target, path, arr_idx, new_val, pol, 1); @@ -1626,7 +1626,7 @@ return 0; } -int pcb_conf_del(conf_role_t target, const char *path, int arr_idx) +int pcb_conf_del(rnd_conf_role_t target, const char *path, int arr_idx) { int res; res = pcb_conf_set_dry(target, path, arr_idx, NULL, RND_POL_OVERWRITE, 0); @@ -1638,13 +1638,13 @@ int pcb_conf_grow(const char *path, int new_size) { - conf_native_t *nat = pcb_conf_get_field(path); + rnd_conf_native_t *nat = pcb_conf_get_field(path); if (nat == NULL) return -1; return pcb_conf_grow_list_(nat, new_size); } -int pcb_conf_set_native(conf_native_t *field, int arr_idx, const char *new_val) +int pcb_conf_set_native(rnd_conf_native_t *field, int arr_idx, const char *new_val) { lht_node_t *node; @@ -1703,8 +1703,8 @@ return -1; } if (op == NULL) { - conf_native_t *n = pcb_conf_get_field(arg); - if ((n == NULL) || (n->type != CFN_BOOLEAN)) { + rnd_conf_native_t *n = pcb_conf_get_field(arg); + if ((n == NULL) || (n->type != RND_CFN_BOOLEAN)) { free(arg); *why = "value not specified for non-boolean variable; syntax is path=val"; return -1; @@ -1766,7 +1766,7 @@ conf_fields_foreach(e) { if ((prefix == NULL) || (strncmp(prefix, e->key, pl) == 0)) { - conf_native_t *n = e->value; + rnd_conf_native_t *n = e->value; if (n->flags & RND_CFF_USAGE) { int kl = strlen(n->hash_path); char *s, *name = malloc(kl+32); @@ -1777,16 +1777,16 @@ if (*s == '_') *s = '-'; switch(n->type) { - case CFN_BOOLEAN: /* implicit true */ break; - case CFN_STRING: strcpy(s, " str"); break; - case CFN_INTEGER: strcpy(s, " int"); break; - case CFN_REAL: strcpy(s, " num"); break; - case CFN_COORD: strcpy(s, " coord"); break; - case CFN_UNIT: strcpy(s, " unit"); break; - case CFN_COLOR: strcpy(s, " color"); break; - case CFN_LIST: strcpy(s, " "); break; - case CFN_HLIST: strcpy(s, " "); break; - case CFN_max: break; + case RND_CFN_BOOLEAN: /* implicit true */ break; + case RND_CFN_STRING: strcpy(s, " str"); break; + case RND_CFN_INTEGER: strcpy(s, " int"); break; + case RND_CFN_REAL: strcpy(s, " num"); break; + case RND_CFN_COORD: strcpy(s, " coord"); break; + case RND_CFN_UNIT: strcpy(s, " unit"); break; + case RND_CFN_COLOR: strcpy(s, " color"); break; + case RND_CFN_LIST: strcpy(s, " "); break; + case RND_CFN_HLIST: strcpy(s, " "); break; + case RND_CFN_max: break; } print(name, n->description); free(name); @@ -1795,7 +1795,7 @@ } } -int pcb_conf_replace_subtree(conf_role_t dst_role, const char *dst_path, conf_role_t src_role, const char *src_path) +int pcb_conf_replace_subtree(rnd_conf_role_t dst_role, const char *dst_path, rnd_conf_role_t src_role, const char *src_path) { lht_node_t *dst = pcb_conf_lht_get_at(dst_role, dst_path, 1); lht_node_t *src, *new_src = NULL; @@ -1804,7 +1804,7 @@ char *name; lht_node_t *ch = NULL; int isarr, i; - conf_native_t *n = pcb_conf_get_field(src_path); + rnd_conf_native_t *n = pcb_conf_get_field(src_path); if (n == NULL) return -1; @@ -1820,7 +1820,7 @@ gds_t s; gds_init(&s); - if ((n->type == CFN_LIST) || (n->type == CFN_HLIST)) { + if ((n->type == RND_CFN_LIST) || (n->type == RND_CFN_HLIST)) { pcb_conf_listitem_t *it; ch = lht_dom_node_alloc(LHT_LIST, name+1); for(it = pcb_conflist_first(n->val.list); it != NULL; it = pcb_conflist_next(it)) { @@ -1878,7 +1878,7 @@ } -int pcb_conf_save_file(rnd_hidlib_t *hidlib, const char *project_fn, const char *pcb_fn, conf_role_t role, const char *fn) +int pcb_conf_save_file(rnd_hidlib_t *hidlib, const char *project_fn, const char *pcb_fn, rnd_conf_role_t role, const char *fn) { int fail = 1; lht_node_t *r = pcb_conf_lht_get_first(role, 0); @@ -1953,7 +1953,7 @@ return fail; } -int pcb_conf_export_to_file(rnd_hidlib_t *hidlib, const char *fn, conf_role_t role, const char *conf_path) +int pcb_conf_export_to_file(rnd_hidlib_t *hidlib, const char *fn, rnd_conf_role_t role, const char *conf_path) { lht_node_t *at = pcb_conf_lht_get_at(role, conf_path, 0); lht_err_t r; @@ -1978,7 +1978,7 @@ item_li = pcb_conflist_first(list); if (item_li == NULL) return NULL; - if (item_li->type == CFN_STRING) { + if (item_li->type == RND_CFN_STRING) { *item_str = item_li->val.string[0]; return item_li; } @@ -1989,7 +1989,7 @@ { while((item_li = pcb_conflist_next(item_li)) != NULL) { (*idx)++; - if (item_li->type != CFN_STRING) + if (item_li->type != RND_CFN_STRING) continue; /* found next string */ *item_str = item_li->val.string[0]; @@ -2016,7 +2016,7 @@ for (n = 0, ci = pcb_conflist_first((pcb_conflist_t *)lst); ci != NULL; ci = pcb_conflist_next(ci), n++) { const char *p = ci->val.string[0]; - if (ci->type != CFN_STRING) + if (ci->type != RND_CFN_STRING) continue; if (n > 0) gds_append(buff, sep); @@ -2025,33 +2025,33 @@ return buff->array; } -void pcb_conf_lock(conf_role_t target) +void pcb_conf_lock(rnd_conf_role_t target) { pcb_conf_main_root_lock[target] = 1; } -void pcb_conf_unlock(conf_role_t target) +void pcb_conf_unlock(rnd_conf_role_t target) { pcb_conf_main_root_lock[target] = 0; } -int pcb_conf_islocked(conf_role_t target) +int pcb_conf_islocked(rnd_conf_role_t target) { return pcb_conf_main_root_lock[target]; } -int pcb_conf_isdirty(conf_role_t target) +int pcb_conf_isdirty(rnd_conf_role_t target) { return pcb_conf_lht_dirty[target]; } -void pcb_conf_makedirty(conf_role_t target) +void pcb_conf_makedirty(rnd_conf_role_t target) { pcb_conf_lht_dirty[target]++; } -conf_role_t pcb_conf_lookup_role(const lht_node_t *nd) +rnd_conf_role_t pcb_conf_lookup_role(const lht_node_t *nd) { - conf_role_t r; + rnd_conf_role_t r; for(r = 0; r < CFR_max_real; r++) if (pcb_conf_main_root[r] == nd->doc) return r; @@ -2063,7 +2063,7 @@ return CFR_invalid; } -void pcb_conf_reset(conf_role_t target, const char *source_fn) +void pcb_conf_reset(rnd_conf_role_t target, const char *source_fn) { lht_node_t *n; @@ -2103,19 +2103,19 @@ } \ } while(0) -int pcb_conf_print_native_field(conf_pfn pfn, void *ctx, int verbose, rnd_confitem_t *val, conf_native_type_t type, confprop_t *prop, int idx) +int pcb_conf_print_native_field(conf_pfn pfn, void *ctx, int verbose, rnd_confitem_t *val, rnd_conf_native_type_t type, rnd_confprop_t *prop, int idx) { int ret = 0; switch(type) { - case CFN_STRING: print_str_or_null(pfn, ctx, verbose, val->string[idx], val->string[idx]); break; - case CFN_BOOLEAN: ret += pfn(ctx, "%d", val->boolean[idx]); break; - case CFN_INTEGER: ret += pfn(ctx, "%ld", val->integer[idx]); break; - case CFN_REAL: ret += pfn(ctx, "%f", val->real[idx]); break; - case CFN_COORD: ret += pfn(ctx, "%$mS", val->coord[idx]); break; - case CFN_UNIT: print_str_or_null(pfn, ctx, verbose, val->unit[idx], val->unit[idx]->suffix); break; - case CFN_COLOR: print_str_or_null(pfn, ctx, verbose, val->color[idx].str, val->color[idx].str); break; - case CFN_LIST: - case CFN_HLIST: + case RND_CFN_STRING: print_str_or_null(pfn, ctx, verbose, val->string[idx], val->string[idx]); break; + case RND_CFN_BOOLEAN: ret += pfn(ctx, "%d", val->boolean[idx]); break; + case RND_CFN_INTEGER: ret += pfn(ctx, "%ld", val->integer[idx]); break; + case RND_CFN_REAL: ret += pfn(ctx, "%f", val->real[idx]); break; + case RND_CFN_COORD: ret += pfn(ctx, "%$mS", val->coord[idx]); break; + case RND_CFN_UNIT: print_str_or_null(pfn, ctx, verbose, val->unit[idx], val->unit[idx]->suffix); break; + case RND_CFN_COLOR: print_str_or_null(pfn, ctx, verbose, val->color[idx].str, val->color[idx].str); break; + case RND_CFN_LIST: + case RND_CFN_HLIST: { pcb_conf_listitem_t *n; if (pcb_conflist_length(val->list) > 0) { @@ -2134,7 +2134,7 @@ } } break; - case CFN_max: break; + case RND_CFN_max: break; } if (verbose) { ret += pfn(ctx, " <used <= 0) && (!verbose)) @@ -2223,7 +2223,7 @@ pcb_conf_files_uninit(); } -void pcb_conf_setf(conf_role_t role, const char *path, int idx, const char *fmt, ...) +void pcb_conf_setf(rnd_conf_role_t role, const char *path, int idx, const char *fmt, ...) { char *tmp; va_list ap; @@ -2259,7 +2259,7 @@ void pcb_conf_ro(const char *path) { - conf_native_t *n = pcb_conf_get_field(path); + rnd_conf_native_t *n = pcb_conf_get_field(path); if (n != NULL) { n->used = 1; n->random_flags.read_only = 1; Index: trunk/src/librnd/core/conf.h =================================================================== --- trunk/src/librnd/core/conf.h (revision 30944) +++ trunk/src/librnd/core/conf.h (revision 30945) @@ -54,28 +54,28 @@ } rnd_conf_flag_t; -typedef const char * CFT_STRING; -typedef int CFT_BOOLEAN; -typedef long CFT_INTEGER; -typedef double CFT_REAL; -typedef rnd_coord_t CFT_COORD; -typedef pcb_unit_t * CFT_UNIT; -typedef rnd_color_t CFT_COLOR; -typedef pcb_conflist_t CFT_LIST; -typedef pcb_conflist_t CFT_HLIST; +typedef const char * RND_CFT_STRING; +typedef int RND_CFT_BOOLEAN; +typedef long RND_CFT_INTEGER; +typedef double RND_CFT_REAL; +typedef rnd_coord_t RND_CFT_COORD; +typedef pcb_unit_t * RND_CFT_UNIT; +typedef rnd_color_t RND_CFT_COLOR; +typedef pcb_conflist_t RND_CFT_LIST; +typedef pcb_conflist_t RND_CFT_HLIST; typedef enum { - CFN_STRING, - CFN_BOOLEAN, - CFN_INTEGER, /* signed long */ - CFN_REAL, /* double */ - CFN_COORD, - CFN_UNIT, - CFN_COLOR, - CFN_LIST, - CFN_HLIST, - CFN_max -} conf_native_type_t; + RND_CFN_STRING, + RND_CFN_BOOLEAN, + RND_CFN_INTEGER, /* signed long */ + RND_CFN_REAL, /* double */ + RND_CFN_COORD, + RND_CFN_UNIT, + RND_CFN_COLOR, + RND_CFN_LIST, + RND_CFN_HLIST, + RND_CFN_max +} rnd_conf_native_type_t; union rnd_confitem_u { const char **string; @@ -92,7 +92,7 @@ typedef struct { int prio; lht_node_t *src; -} confprop_t; +} rnd_confprop_t; typedef struct { /* static fields defined by the macros */ @@ -99,7 +99,7 @@ const char *description; const char *hash_path; /* points to the hash key once its added in the hash (else: NULL) */ int array_size; - conf_native_type_t type; + rnd_conf_native_type_t type; rnd_conf_flag_t flags; struct { unsigned io_pcb_no_attrib:1; @@ -111,7 +111,7 @@ /* dynamic fields loaded from lihata */ rnd_confitem_t val; /* value is always an array (len 1 for the common case) */ - confprop_t *prop; /* an array of properties allocated as big as val's array */ + rnd_confprop_t *prop; /* an array of properties allocated as big as val's array */ int used; /* number of items actually used in the arrays */ int rnd_conf_rev; /* last changed rev */ @@ -120,13 +120,13 @@ vtp0_t hid_callbacks; /* vector of (const conf_hid_callbacks_t *) */ const char *gui_edit_act; /* if non-zero, run this action for GUI editing; args: role_name, full_list_conf_path, item_name */ -} conf_native_t; +} rnd_conf_native_t; struct conf_listitem_s { - conf_native_type_t type; + rnd_conf_native_type_t type; rnd_confitem_t val; /* value is always an array (len 1 for the common case) */ - confprop_t prop; /* an array of properties allocated as big as val's array */ + rnd_confprop_t prop; /* an array of properties allocated as big as val's array */ const char *name; const char *payload; gdl_elem_t link; @@ -149,7 +149,7 @@ CFR_max_alloc, /* all the above should have a root */ CFR_invalid -} conf_role_t; +} rnd_conf_role_t; extern const int pcb_conf_default_prio[]; extern long pcb_conf_main_root_replace_cnt[CFR_max_alloc]; /* number of times the root has been replaced */ @@ -169,11 +169,11 @@ extern int pcb_conf_in_production; /* Load a file or a string as a role */ -int pcb_conf_load_as(conf_role_t role, const char *fn, int fn_is_text); +int pcb_conf_load_as(rnd_conf_role_t role, const char *fn, int fn_is_text); /* copy root to be the new config of role; root must be a li:pcb-rnd-conf-v1 return 0 on success and removes/invalidates root */ -int pcb_conf_insert_tree_as(conf_role_t role, lht_node_t *root); +int pcb_conf_insert_tree_as(rnd_conf_role_t role, lht_node_t *root); /* Load a project file into CFR_PROJECT. Both project_fn and pcb_fn can't be NULL. Leaves an initialized but empty CFR_PROJECT root if no project file was @@ -185,10 +185,10 @@ /* Update the binary representation from the memory-lht representation */ void pcb_conf_update(const char *path, int arr_idx); -conf_native_t *pcb_conf_get_field(const char *path); -conf_native_t *pcb_conf_reg_field_(void *value, int array_size, conf_native_type_t type, const char *path, const char *desc, rnd_conf_flag_t flags); +rnd_conf_native_t *pcb_conf_get_field(const char *path); +rnd_conf_native_t *pcb_conf_reg_field_(void *value, int array_size, rnd_conf_native_type_t type, const char *path, const char *desc, rnd_conf_flag_t flags); -void pcb_conf_unreg_field(conf_native_t *field); +void pcb_conf_unreg_field(rnd_conf_native_t *field); void pcb_conf_unreg_fields(const char *prefix); /* Set the value of path[arr_idx] in memory-lht role target to new_val using @@ -195,11 +195,11 @@ policy pol. Only lists should be indexed. Indexing can be a [n] suffix on path or a non-negative arr_idx. Updates the in-memory binary as well. If new_val is NULL, the selected subtree is removed from the lihata document. */ -int pcb_conf_set(conf_role_t target, const char *path, int arr_idx, const char *new_val, rnd_conf_policy_t pol); +int pcb_conf_set(rnd_conf_role_t target, const char *path, int arr_idx, const char *new_val, rnd_conf_policy_t pol); /* Remove the subtree of path[arr_idx] in memory-lht role target. Same considerations as in pcb_conf_set. */ -int pcb_conf_del(conf_role_t target, const char *path, int arr_idx); +int pcb_conf_del(rnd_conf_role_t target, const char *path, int arr_idx); /* Increase the size of a list (array) to new_size; returns 0 on success */ int pcb_conf_grow(const char *path, int new_size); @@ -207,11 +207,11 @@ /* Same as pcb_conf_set, but without updating the binary - useful for multiple pcb_conf_set_dry calls and a single all-tree conf_udpate(NULL) for transactions. If mkdirp is non-zero, automatically create the policy subtree if it doesn't exist. */ -int pcb_conf_set_dry(conf_role_t target, const char *path_, int arr_idx, const char *new_val, rnd_conf_policy_t pol, int mkdirp); +int pcb_conf_set_dry(rnd_conf_role_t target, const char *path_, int arr_idx, const char *new_val, rnd_conf_policy_t pol, int mkdirp); /* Same as pcb_conf_set, but doesn't look up where to set things: change the value of the lihata node backing the native field */ -int pcb_conf_set_native(conf_native_t *field, int arr_idx, const char *new_val); +int pcb_conf_set_native(rnd_conf_native_t *field, int arr_idx, const char *new_val); /* Process a command line argument arg_ (if val == NULL) or a pair of command line arguments arg_ and val. In the first case assume arg_ has both a config path @@ -234,8 +234,8 @@ #define pcb_conf_reg_field(globvar, field,isarray,type_name,cpath,cname, desc, flags) \ pcb_conf_reg_field_ ## isarray(globvar, field,type_name,cpath "/" cname, desc, flags) -/* convert type name t type - return CFN_max on error */ -conf_native_type_t pcb_conf_native_type_parse(const char *s); +/* convert type name t type - return RND_CFN_max on error */ +rnd_conf_native_type_t pcb_conf_native_type_parse(const char *s); /* convert a policy text to policy value - return RND_POL_invalid on error */ rnd_conf_policy_t pcb_conf_policy_parse(const char *s); @@ -244,10 +244,10 @@ const char *pcb_conf_policy_name(rnd_conf_policy_t p); /* convert a role text to role value - return CFR_invalid on error */ -conf_role_t pcb_conf_role_parse(const char *s); +rnd_conf_role_t pcb_conf_role_parse(const char *s); /* Return the name of the role - always a static string, even for invalid roles */ -const char *pcb_conf_role_name(conf_role_t r); +const char *pcb_conf_role_name(rnd_conf_role_t r); /* Lock/unlock the structure of a role. In a locked role value of existing fields may be modified but the structure of the tree is static (can't @@ -255,26 +255,26 @@ only a subset of settings: it can build the CFR_DESIGN tree, lock it so settings that it wouldn't know how to save won't appear. NOTE: io_pcb supports all settings via attributes so does not lock. */ -void pcb_conf_lock(conf_role_t target); -void pcb_conf_unlock(conf_role_t target); +void pcb_conf_lock(rnd_conf_role_t target); +void pcb_conf_unlock(rnd_conf_role_t target); /* replace dst_role:dst_path with a copy of src_role:src_path */ -int pcb_conf_replace_subtree(conf_role_t dst_role, const char *dst_path, conf_role_t src_role, const char *src_path); +int pcb_conf_replace_subtree(rnd_conf_role_t dst_role, const char *dst_path, rnd_conf_role_t src_role, const char *src_path); /* Throw out a subtree (remove all nodes from the lihata representation). Useful for io_ plugins, on CFR_DESIGN, before loading a new file. */ -void pcb_conf_reset(conf_role_t target, const char *source_fn); +void pcb_conf_reset(rnd_conf_role_t target, const char *source_fn); /* Save an in-memory lihata representation to the disk */ -int pcb_conf_save_file(rnd_hidlib_t *hidlib, const char *project_fn, const char *pcb_fn, conf_role_t role, const char *fn); +int pcb_conf_save_file(rnd_hidlib_t *hidlib, const char *project_fn, const char *pcb_fn, rnd_conf_role_t role, const char *fn); /* Returns whether a given lihata tree is locked */ -int pcb_conf_islocked(conf_role_t target); +int pcb_conf_islocked(rnd_conf_role_t target); /* Returns whether a given lihata tree has changed since load or last save */ -int pcb_conf_isdirty(conf_role_t target); -void pcb_conf_makedirty(conf_role_t target); +int pcb_conf_isdirty(rnd_conf_role_t target); +void pcb_conf_makedirty(rnd_conf_role_t target); /* all configuration fields ever seen */ extern htsp_t *pcb_conf_fields; @@ -287,12 +287,12 @@ a single element of an array, but prints lists as lists. Returns the sum of conf_pfn call return values - this is usually the number of bytes printed. */ -int pcb_conf_print_native_field(conf_pfn pfn, void *ctx, int verbose, rnd_confitem_t *val, conf_native_type_t type, confprop_t *prop, int idx); +int pcb_conf_print_native_field(conf_pfn pfn, void *ctx, int verbose, rnd_confitem_t *val, rnd_conf_native_type_t type, rnd_confprop_t *prop, int idx); /* Prints the value of a node in a form that is suitable for lihata. Prints full arrays. Returns the sum of conf_pfn call return values - this is usually the number of bytes printed. */ -int pcb_conf_print_native(conf_pfn pfn, void *ctx, const char * prefix, int verbose, conf_native_t *node); +int pcb_conf_print_native(conf_pfn pfn, void *ctx, const char * prefix, int verbose, rnd_conf_native_t *node); /* Mark a path read-only */ void pcb_conf_ro(const char *path); @@ -303,7 +303,7 @@ #define rnd_conf_is_read_only(role) \ (((role) == CFR_INTERNAL) || ((role) == CFR_SYSTEM) || ((role) == CFR_DEFAULTPCB)) -void pcb_conf_setf(conf_role_t role, const char *path, int idx, const char *fmt, ...); +void pcb_conf_setf(rnd_conf_role_t role, const char *path, int idx, const char *fmt, ...); #define conf_list_foreach_path_first(hidlib, res, conf_list, call) \ do { \ @@ -354,13 +354,13 @@ conf_set_editor_("editor/" sfield, !pcbhl_conf.editor.field) /* For temporary modification/restoration of variables (hack) */ -#define conf_force_set_bool(var, val) *((CFT_BOOLEAN *)(&var)) = val -#define conf_force_set_str(var, val) *((CFT_STRING *)(&var)) = val +#define conf_force_set_bool(var, val) *((RND_CFT_BOOLEAN *)(&var)) = val +#define conf_force_set_str(var, val) *((RND_CFT_STRING *)(&var)) = val /* get the first config subtree node (it's a hash and its children are "design", "rc", ...); if create is 1, and the subtree doesn't exist, create an "overwrite". */ -lht_node_t *pcb_conf_lht_get_first(conf_role_t target, int create); +lht_node_t *pcb_conf_lht_get_first(rnd_conf_role_t target, int create); /* loop helper */ pcb_conf_listitem_t *pcb_conf_list_first_str(pcb_conflist_t *list, const char **item_str, int *idx); @@ -383,15 +383,15 @@ void pcb_conf_usage(const char *prefix, void (*print)(const char *name, const char *help)); /* Determine under which role a node is */ -conf_role_t pcb_conf_lookup_role(const lht_node_t *nd); +rnd_conf_role_t pcb_conf_lookup_role(const lht_node_t *nd); /* Return the lihata node of a path in target, optionally creating it with the right type; if allow_plug is 1, fall back returning node from plugin conf */ -lht_node_t *pcb_conf_lht_get_at(conf_role_t target, const char *path, int create); -lht_node_t *pcb_conf_lht_get_at_mainplug(conf_role_t target, const char *path, int allow_plug, int create); +lht_node_t *pcb_conf_lht_get_at(rnd_conf_role_t target, const char *path, int create); +lht_node_t *pcb_conf_lht_get_at_mainplug(rnd_conf_role_t target, const char *path, int allow_plug, int create); /* Write an existing conf subtree to a file */ -int pcb_conf_export_to_file(rnd_hidlib_t *hidlib, const char *fn, conf_role_t role, const char *conf_path); +int pcb_conf_export_to_file(rnd_hidlib_t *hidlib, const char *fn, rnd_conf_role_t role, const char *conf_path); /* Determine the policy and priority of a config lihata node; returns 0 on success but may not fill in both values, caller is @@ -400,7 +400,7 @@ /* Parse text and convert the value into native form and store in one of dst fields depending on type */ -int pcb_conf_parse_text(rnd_confitem_t *dst, int idx, conf_native_type_t type, const char *text, lht_node_t *err_node); +int pcb_conf_parse_text(rnd_confitem_t *dst, int idx, rnd_conf_native_type_t type, const char *text, lht_node_t *err_node); /* Returns the user configuration file name */ const char *pcb_conf_get_user_conf_name(); @@ -410,7 +410,7 @@ /* Get the first subtree that matches pol within target; allocate new subtree if needed */ -lht_node_t *pcb_conf_lht_get_first_pol(conf_role_t target, rnd_conf_policy_t pol, int create); +lht_node_t *pcb_conf_lht_get_first_pol(rnd_conf_role_t target, rnd_conf_policy_t pol, int create); /* (un)register a custom config file name (not path, just file name); if intern is not NULL, it is the internal (executable-embedded) @@ -427,9 +427,9 @@ /*** mass resolve (useful to avoid conf_core dep) ***/ typedef struct { const char *path; /* full conf path to look up */ - conf_native_type_t type; /* accept only if type matches */ + rnd_conf_native_type_t type; /* accept only if type matches */ int allow_array; /* if 0, refuse arrays */ - conf_native_t *nat; /* NULL if refused or not found */ + rnd_conf_native_t *nat; /* NULL if refused or not found */ } pcb_conf_resolve_t; /* Resolve a single nat or an array of them (until a terminaltor where Index: trunk/src/librnd/core/conf_act.c =================================================================== --- trunk/src/librnd/core/conf_act.c (revision 30944) +++ trunk/src/librnd/core/conf_act.c (revision 30945) @@ -69,7 +69,7 @@ const char *path, *val; char valbuff[128]; rnd_conf_policy_t pol = RND_POL_OVERWRITE; - conf_role_t role = CFR_invalid; + rnd_conf_role_t role = CFR_invalid; int rs; if (argc < 4) { @@ -96,7 +96,7 @@ if (op == F_Delta) { double d; char *end; - conf_native_t *n = pcb_conf_get_field(a1); + rnd_conf_native_t *n = pcb_conf_get_field(a1); if (n == 0) { rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': no such path\n", argv[1]); @@ -104,7 +104,7 @@ } switch(n->type) { - case CFN_REAL: + case RND_CFN_REAL: d = strtod(val, &end); if (*end != '\0') { rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': invalid delta value\n", a1); @@ -114,8 +114,8 @@ sprintf(valbuff, "%f", d); val = valbuff; break; - case CFN_COORD: - case CFN_INTEGER: + case RND_CFN_COORD: + case RND_CFN_INTEGER: default: rnd_message(PCB_MSG_ERROR, "Can't delta-set '%s': not a numeric item\n", a1); return FGW_ERR_ARG_CONV; @@ -123,7 +123,7 @@ } if (role == CFR_invalid) { - conf_native_t *n = pcb_conf_get_field(a1); + rnd_conf_native_t *n = pcb_conf_get_field(a1); if (n == NULL) { rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); return FGW_ERR_ARG_CONV; @@ -144,7 +144,7 @@ const char *path, *val; int rs; gds_t nval; - conf_native_t *n; + rnd_conf_native_t *n; if (argc != 4) { rnd_message(PCB_MSG_ERROR, "conf(iseq) needs two arguments"); @@ -171,9 +171,9 @@ } else if (op == F_Toggle) { - conf_native_t *n = pcb_conf_get_field(a1); + rnd_conf_native_t *n = pcb_conf_get_field(a1); const char *new_value; - conf_role_t role = CFR_invalid; + rnd_conf_role_t role = CFR_invalid; int res; if (n == NULL) { @@ -180,7 +180,7 @@ rnd_message(PCB_MSG_ERROR, "Invalid conf field '%s': no such path\n", a1); return FGW_ERR_UNKNOWN; } - if (n->type != CFN_BOOLEAN) { + if (n->type != RND_CFN_BOOLEAN) { rnd_message(PCB_MSG_ERROR, "Can not toggle '%s': not a boolean\n", a1); return FGW_ERR_UNKNOWN; } @@ -212,7 +212,7 @@ } else if (op == F_Reset) { - conf_role_t role; + rnd_conf_role_t role; role = pcb_conf_role_parse(a1); if (role == CFR_invalid) { rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", a1); Index: trunk/src/librnd/core/conf_hid.c =================================================================== --- trunk/src/librnd/core/conf_hid.c (revision 30944) +++ trunk/src/librnd/core/conf_hid.c (revision 30945) @@ -10,7 +10,7 @@ conf_hid_id_t id; } conf_hid_t; -void *pcb_conf_hid_set_data(conf_native_t *cfg, conf_hid_id_t id, void *data) +void *pcb_conf_hid_set_data(rnd_conf_native_t *cfg, conf_hid_id_t id, void *data) { void **old = vtp0_get(&cfg->hid_data, id, 0); vtp0_set(&cfg->hid_data, id, data); @@ -17,13 +17,13 @@ return old == NULL ? NULL : *old; } -void *pcb_conf_hid_get_data(conf_native_t *cfg, conf_hid_id_t id) +void *pcb_conf_hid_get_data(rnd_conf_native_t *cfg, conf_hid_id_t id) { void **old = vtp0_get(&cfg->hid_data, id, 0); return old == NULL ? NULL : *old; } -const conf_hid_callbacks_t *pcb_conf_hid_set_cb(conf_native_t *cfg, conf_hid_id_t id, const conf_hid_callbacks_t *cbs) +const conf_hid_callbacks_t *pcb_conf_hid_set_cb(rnd_conf_native_t *cfg, conf_hid_id_t id, const conf_hid_callbacks_t *cbs) { void **old; assert(id >= 0); @@ -87,7 +87,7 @@ /* remove local callbacks */ conf_fields_foreach(e) { int len; - conf_native_t *cfg = e->value; + rnd_conf_native_t *cfg = e->value; len = vtp0_len(&cfg->hid_callbacks); conf_hid_local_cb(cfg, -1, unreg_item); @@ -106,7 +106,7 @@ if ((h->cb != NULL) && (h->cb->unreg_item != NULL)) { conf_fields_foreach(e) { - conf_native_t *cfg = e->value; + rnd_conf_native_t *cfg = e->value; h->cb->unreg_item(cfg, -1); } } @@ -114,8 +114,8 @@ free(h); } -typedef void (*cbi_t)(conf_native_t *cfg, int arr_idx); -void pcb_conf_hid_global_cb_int(conf_native_t *item, int arr_idx, int offs) +typedef void (*cbi_t)(rnd_conf_native_t *cfg, int arr_idx); +void pcb_conf_hid_global_cb_int(rnd_conf_native_t *item, int arr_idx, int offs) { htpp_entry_t *e; if (conf_hid_ids == NULL) @@ -132,8 +132,8 @@ } } -typedef void (*cbp_t)(conf_native_t *cfg, void *ptr); -void pcb_conf_hid_global_cb_ptr(conf_native_t *item, void *ptr, int offs) +typedef void (*cbp_t)(rnd_conf_native_t *cfg, void *ptr); +void pcb_conf_hid_global_cb_ptr(rnd_conf_native_t *item, void *ptr, int offs) { htpp_entry_t *e; if (conf_hid_ids == NULL) Index: trunk/src/librnd/core/conf_hid.h =================================================================== --- trunk/src/librnd/core/conf_hid.h (revision 30944) +++ trunk/src/librnd/core/conf_hid.h (revision 30945) @@ -6,27 +6,27 @@ typedef struct conf_hid_callbacks_s { /* Called before/after a value of a config item is updated - this doesn't necessarily mean the value actually changes */ - void (*val_change_pre)(conf_native_t *cfg, int arr_idx); - void (*val_change_post)(conf_native_t *cfg, int arr_idx); + void (*val_change_pre)(rnd_conf_native_t *cfg, int arr_idx); + void (*val_change_post)(rnd_conf_native_t *cfg, int arr_idx); /* Called when a new config item is added to the database; global-only */ - void (*new_item_post)(conf_native_t *cfg, int arr_idx); - void (*new_hlist_item_post)(conf_native_t *cfg, pcb_conf_listitem_t *i); + void (*new_item_post)(rnd_conf_native_t *cfg, int arr_idx); + void (*new_hlist_item_post)(rnd_conf_native_t *cfg, pcb_conf_listitem_t *i); /* Called during pcb_conf_hid_unreg to get hid-data cleaned up */ - void (*unreg_item)(conf_native_t *cfg, int arr_idx); + void (*unreg_item)(rnd_conf_native_t *cfg, int arr_idx); } conf_hid_callbacks_t; typedef int conf_hid_id_t; /* Set local hid data in a native item; returns the previous value set or NULL */ -void *pcb_conf_hid_set_data(conf_native_t *cfg, conf_hid_id_t id, void *data); +void *pcb_conf_hid_set_data(rnd_conf_native_t *cfg, conf_hid_id_t id, void *data); /* Returns local hid data in a native item */ -void *pcb_conf_hid_get_data(conf_native_t *cfg, conf_hid_id_t id); +void *pcb_conf_hid_get_data(rnd_conf_native_t *cfg, conf_hid_id_t id); /* Set local callbacks in a native item; returns the previous callbacks set or NULL */ -const conf_hid_callbacks_t *pcb_conf_hid_set_cb(conf_native_t *cfg, conf_hid_id_t id, const conf_hid_callbacks_t *cbs); +const conf_hid_callbacks_t *pcb_conf_hid_set_cb(rnd_conf_native_t *cfg, conf_hid_id_t id, const conf_hid_callbacks_t *cbs); /* register a hid with a cookie; this is necessary only if: @@ -77,7 +77,7 @@ void pcb_conf_loglevel_props(enum pcb_message_level level, const char **tag, int *popup); /****** Internal ******/ -void pcb_conf_hid_global_cb_int(conf_native_t *item, int arr_idx, int offs); -void pcb_conf_hid_global_cb_ptr(conf_native_t *item, void *ptr, int offs); +void pcb_conf_hid_global_cb_int(rnd_conf_native_t *item, int arr_idx, int offs); +void pcb_conf_hid_global_cb_ptr(rnd_conf_native_t *item, void *ptr, int offs); #endif Index: trunk/src/librnd/core/hid_init.c =================================================================== --- trunk/src/librnd/core/hid_init.c (revision 30944) +++ trunk/src/librnd/core/hid_init.c (revision 30945) @@ -334,7 +334,7 @@ if (hidlib_conffile.used > 0) { int n; for(n = 0; n < hidlib_conffile.used; n++) { - conf_role_t role = CFR_CLI; + rnd_conf_role_t role = CFR_CLI; char *srole, *sep, *fn = hidlib_conffile.array[n]; sep = strchr(fn, ';'); if (sep != NULL) { Index: trunk/src/librnd/core/hidlib_conf.h =================================================================== --- trunk/src/librnd/core/hidlib_conf.h (revision 30944) +++ trunk/src/librnd/core/hidlib_conf.h (revision 30945) @@ -42,63 +42,63 @@ typedef struct { struct { - CFT_BOOLEAN click_cmd_entry_active;/* true if the command line is active when the user click - this gives the command interpreter a chance to capture the click and use the coords */ + RND_CFT_BOOLEAN click_cmd_entry_active;/* true if the command line is active when the user click - this gives the command interpreter a chance to capture the click and use the coords */ } temp; const struct { /* rc */ - CFT_INTEGER verbose; - CFT_INTEGER quiet; /* print only errors on stderr */ - CFT_BOOLEAN dup_log_to_stderr; /* copy log messages to stderr even if there is a HID that can show them */ - CFT_STRING cli_prompt; /* plain text prompt to prefix the command entry */ - CFT_STRING cli_backend; /* command parser action */ - CFT_BOOLEAN export_basename; /* if an exported file contains the source file name, remove path from it, keeping the basename only */ - CFT_STRING menu_file; /* where to load the default menu file from. If empty/unset, fall back to the legacy 'per hid ow menu file' setup. If contains slash, take it as a full path, if no slash, do a normal menu search for pcb-menu-NAME.lht */ - CFT_LIST preferred_gui; /* if set, try GUI HIDs in this order when no GUI is explicitly selected */ - CFT_BOOLEAN hid_fallback; /* if there is no explicitly specified HID (--gui) and the preferred GUI fails, automatically fall back on other HIDs, eventually running in batch mode */ + RND_CFT_INTEGER verbose; + RND_CFT_INTEGER quiet; /* print only errors on stderr */ + RND_CFT_BOOLEAN dup_log_to_stderr; /* copy log messages to stderr even if there is a HID that can show them */ + RND_CFT_STRING cli_prompt; /* plain text prompt to prefix the command entry */ + RND_CFT_STRING cli_backend; /* command parser action */ + RND_CFT_BOOLEAN export_basename; /* if an exported file contains the source file name, remove path from it, keeping the basename only */ + RND_CFT_STRING menu_file; /* where to load the default menu file from. If empty/unset, fall back to the legacy 'per hid ow menu file' setup. If contains slash, take it as a full path, if no slash, do a normal menu search for pcb-menu-NAME.lht */ + RND_CFT_LIST preferred_gui; /* if set, try GUI HIDs in this order when no GUI is explicitly selected */ + RND_CFT_BOOLEAN hid_fallback; /* if there is no explicitly specified HID (--gui) and the preferred GUI fails, automatically fall back on other HIDs, eventually running in batch mode */ const struct { - CFT_STRING home; /* user's home dir, determined run-time */ - CFT_STRING exec_prefix; /* exec prefix path (extracted from argv[0]) */ + RND_CFT_STRING home; /* user's home dir, determined run-time */ + RND_CFT_STRING exec_prefix; /* exec prefix path (extracted from argv[0]) */ } path; } rc; const struct { - CFT_REAL layer_alpha; /* alpha value for layer drawing */ - CFT_REAL drill_alpha; /* alpha value for drill drawing */ + RND_CFT_REAL layer_alpha; /* alpha value for layer drawing */ + RND_CFT_REAL drill_alpha; /* alpha value for drill drawing */ const struct { - CFT_STRING debug_tag; /* log style tag of debug messages */ - CFT_BOOLEAN debug_popup; /* whether a debug line should pop up the log window */ - CFT_STRING info_tag; /* log style tag of info messages */ - CFT_BOOLEAN info_popup; /* whether an info line should pop up the log window */ - CFT_STRING warning_tag; /* log style tag of warnings */ - CFT_BOOLEAN warning_popup; /* whether a warning should pop up the log window */ - CFT_STRING error_tag; /* log style tag of errors */ - CFT_BOOLEAN error_popup; /* whether an error should pop up the log window */ + RND_CFT_STRING debug_tag; /* log style tag of debug messages */ + RND_CFT_BOOLEAN debug_popup; /* whether a debug line should pop up the log window */ + RND_CFT_STRING info_tag; /* log style tag of info messages */ + RND_CFT_BOOLEAN info_popup; /* whether an info line should pop up the log window */ + RND_CFT_STRING warning_tag; /* log style tag of warnings */ + RND_CFT_BOOLEAN warning_popup; /* whether a warning should pop up the log window */ + RND_CFT_STRING error_tag; /* log style tag of errors */ + RND_CFT_BOOLEAN error_popup; /* whether an error should pop up the log window */ } loglevels; const struct { - CFT_COLOR background; /* background and cursor color ... */ - CFT_COLOR off_limit; /* on-screen background beyond the configured drawing area */ - CFT_COLOR grid; /* on-screen grid */ - CFT_COLOR cross; /* on-screen crosshair color (inverted) */ + RND_CFT_COLOR background; /* background and cursor color ... */ + RND_CFT_COLOR off_limit; /* on-screen background beyond the configured drawing area */ + RND_CFT_COLOR grid; /* on-screen grid */ + RND_CFT_COLOR cross; /* on-screen crosshair color (inverted) */ } color; } appearance; const struct { - CFT_INTEGER mode; /* currently active tool */ - CFT_UNIT grid_unit; /* select whether you draw in mm or mil */ - CFT_COORD grid; /* grid in pcb-units */ - CFT_LIST grids; /* grid in grid-string format */ - CFT_INTEGER grids_idx; /* the index of the currently active grid from grids */ - CFT_BOOLEAN draw_grid; /* draw grid points */ - CFT_BOOLEAN auto_place; /* force placement of GUI windows (dialogs), trying to override the window manager */ - CFT_BOOLEAN fullscreen; /* hide widgets to make more room for the drawing */ - CFT_INTEGER crosshair_shape_idx; /* crosshair shape as defined in pcb_crosshair_shape_e */ - CFT_BOOLEAN enable_stroke; /* Enable libstroke gestures on middle mouse button when non-zero */ + RND_CFT_INTEGER mode; /* currently active tool */ + RND_CFT_UNIT grid_unit; /* select whether you draw in mm or mil */ + RND_CFT_COORD grid; /* grid in pcb-units */ + RND_CFT_LIST grids; /* grid in grid-string format */ + RND_CFT_INTEGER grids_idx; /* the index of the currently active grid from grids */ + RND_CFT_BOOLEAN draw_grid; /* draw grid points */ + RND_CFT_BOOLEAN auto_place; /* force placement of GUI windows (dialogs), trying to override the window manager */ + RND_CFT_BOOLEAN fullscreen; /* hide widgets to make more room for the drawing */ + RND_CFT_INTEGER crosshair_shape_idx; /* crosshair shape as defined in pcb_crosshair_shape_e */ + RND_CFT_BOOLEAN enable_stroke; /* Enable libstroke gestures on middle mouse button when non-zero */ const struct { - CFT_BOOLEAN flip_x; /* view: flip the board along the X (horizontal) axis */ - CFT_BOOLEAN flip_y; /* view: flip the board along the Y (vertical) axis */ + RND_CFT_BOOLEAN flip_x; /* view: flip the board along the X (horizontal) axis */ + RND_CFT_BOOLEAN flip_y; /* view: flip the board along the Y (vertical) axis */ } view; } editor; Index: trunk/src/librnd/core/paths.c =================================================================== --- trunk/src/librnd/core/paths.c (revision 30944) +++ trunk/src/librnd/core/paths.c (revision 30945) @@ -220,7 +220,7 @@ start = next; end = strchr(next, ')'); if (end != NULL) { - conf_native_t *cn; + rnd_conf_native_t *cn; char path[256], *q; size_t len = end - start; if (len > sizeof(path) - 1) { @@ -239,7 +239,7 @@ rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: not found in the conf tree\n", path); goto error; } - if (cn->type != CFN_STRING) { + if (cn->type != RND_CFN_STRING) { if (!(flags & PCB_SUBST_QUIET)) rnd_message(PCB_MSG_ERROR, "pcb_strdup_subst(): can't resolve $(%s) conf var: value type is not string\n", path); goto error; Index: trunk/src/librnd/core/safe_fs.c =================================================================== --- trunk/src/librnd/core/safe_fs.c (revision 30944) +++ trunk/src/librnd/core/safe_fs.c (revision 30945) @@ -356,7 +356,7 @@ char *real_p; size_t pl; - if (ci->type != CFN_STRING) + if (ci->type != RND_CFN_STRING) continue; if (*p == '?') p++; Index: trunk/src/librnd/pcb_compat.h =================================================================== --- trunk/src/librnd/pcb_compat.h (revision 30944) +++ trunk/src/librnd/pcb_compat.h (revision 30945) @@ -226,3 +226,26 @@ #define POL_invalid RND_POL_invalid #define conf_flag_t rnd_conf_flag_t #define CFF_USAGE RND_CFF_USAGE +#define CFT_STRING RND_CFT_STRING +#define CFT_BOOLEAN RND_CFT_BOOLEAN +#define CFT_INTEGER RND_CFT_INTEGER +#define CFT_REAL RND_CFT_REAL +#define CFT_COORD RND_CFT_COORD +#define CFT_UNIT RND_CFT_UNIT +#define CFT_COLOR RND_CFT_COLOR +#define CFT_LIST RND_CFT_LIST +#define CFT_HLIST RND_CFT_HLIST +#define CFN_STRING RND_CFN_STRING +#define CFN_BOOLEAN RND_CFN_BOOLEAN +#define CFN_INTEGER RND_CFN_INTEGER +#define CFN_REAL RND_CFN_REAL +#define CFN_COORD RND_CFN_COORD +#define CFN_UNIT RND_CFN_UNIT +#define CFN_COLOR RND_CFN_COLOR +#define CFN_LIST RND_CFN_LIST +#define CFN_HLIST RND_CFN_HLIST +#define CFN_max RND_CFN_max +#define conf_native_type_t rnd_conf_native_type_t +#define confprop_t rnd_confprop_t +#define conf_native_t rnd_conf_native_t +#define conf_role_t rnd_conf_role_t Index: trunk/src/main_act.c =================================================================== --- trunk/src/main_act.c (revision 30944) +++ trunk/src/main_act.c (revision 30945) @@ -231,8 +231,8 @@ { htsp_entry_t *e; conf_fields_foreach(e) { - conf_native_t *n = e->value; - if ((strncmp(n->hash_path, "rc/path/", 8) == 0) && (n->type == CFN_STRING) && (n->used == 1)) + rnd_conf_native_t *n = e->value; + if ((strncmp(n->hash_path, "rc/path/", 8) == 0) && (n->type == RND_CFN_STRING) && (n->used == 1)) printf("%-32s = %s\n", n->hash_path, n->val.string[0]); } printf("rc/default_font_file ="); print_list(&conf_core.rc.default_font_file); Index: trunk/src/plug_import.h =================================================================== --- trunk/src/plug_import.h (revision 30944) +++ trunk/src/plug_import.h (revision 30945) @@ -80,10 +80,10 @@ sets the value in verbose if conf node present, else sets it ti 0 */ #define PCB_IMPORT_SCH_VERBOSE(verbose) \ do { \ - conf_native_t *vn; \ + rnd_conf_native_t *vn; \ verbose = 0; \ vn = pcb_conf_get_field("plugins/import_sch/verbose"); \ - if ((vn != NULL) && (vn->type == CFN_BOOLEAN)) \ + if ((vn != NULL) && (vn->type == RND_CFN_BOOLEAN)) \ verbose = *(vn->val.boolean); \ } while(0) Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 30944) +++ trunk/src/plug_io.c (revision 30945) @@ -518,7 +518,7 @@ char *new_filename; pcb_board_t *newPCB = pcb_board_new_(pcb_false); pcb_board_t *oldPCB; - conf_role_t settings_dest; + rnd_conf_role_t settings_dest; #ifdef DEBUG double elapsed; clock_t start, end; Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 30944) +++ trunk/src/plug_io.h (revision 30945) @@ -80,7 +80,7 @@ Conf subtree at settings_dest is replaced by settings loaded from the file unless it's CFR_invalid. Return 0 on success. */ - int (*parse_pcb)(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); + int (*parse_pcb)(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); /* Attempt to load an element from Filename to Ptr. Return 0 on success. */ int (*parse_footprint)(pcb_plug_io_t *ctx, pcb_data_t *Ptr, const char *name, const char *subfpname); Index: trunk/src/tool_logic.c =================================================================== --- trunk/src/tool_logic.c (revision 30944) +++ trunk/src/tool_logic.c (revision 30945) @@ -60,7 +60,7 @@ } } -static void tool_logic_chg_mode(conf_native_t *cfg, int arr_idx) +static void tool_logic_chg_mode(rnd_conf_native_t *cfg, int arr_idx) { pcb_tool_chg_mode(&PCB->hidlib); } @@ -70,7 +70,7 @@ { static conf_hid_callbacks_t cbs_mode; static conf_hid_id_t tool_conf_id; - conf_native_t *n_mode = pcb_conf_get_field("editor/mode"); + rnd_conf_native_t *n_mode = pcb_conf_get_field("editor/mode"); tool_conf_id = pcb_conf_hid_reg(tool_logic_cookie, NULL); if (n_mode != NULL) { Index: trunk/src_plugins/asm/asm_conf.h =================================================================== --- trunk/src_plugins/asm/asm_conf.h (revision 30944) +++ trunk/src_plugins/asm/asm_conf.h (revision 30945) @@ -6,8 +6,8 @@ typedef struct { const struct { const struct { - CFT_STRING group_template; /* asm template that determines grouping (parts resulting in the same string will be put in the same group) */ - CFT_STRING sort_template; /* asm template that determines order of groups and parts within groups */ + RND_CFT_STRING group_template; /* asm template that determines grouping (parts resulting in the same string will be put in the same group) */ + RND_CFT_STRING sort_template; /* asm template that determines order of groups and parts within groups */ } asm1; } plugins; } conf_asm_t; Index: trunk/src_plugins/cam/cam_conf.h =================================================================== --- trunk/src_plugins/cam/cam_conf.h (revision 30944) +++ trunk/src_plugins/cam/cam_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_LIST jobs; /* named cam scripts */ + RND_CFT_LIST jobs; /* named cam scripts */ } cam; } plugins; } conf_cam_t; Index: trunk/src_plugins/cam/cam_gui.c =================================================================== --- trunk/src_plugins/cam/cam_gui.c (revision 30944) +++ trunk/src_plugins/cam/cam_gui.c (revision 30945) @@ -45,7 +45,7 @@ pcb_hid_tree_t *tree; pcb_hid_row_t *r; char *cell[2], *cursor_path = NULL; - conf_native_t *cn; + rnd_conf_native_t *cn; attr = &ctx->dlg[ctx->wjobs]; tree = attr->wdata; Index: trunk/src_plugins/ddraft/constraint_gui.c =================================================================== --- trunk/src_plugins/ddraft/constraint_gui.c (revision 30944) +++ trunk/src_plugins/ddraft/constraint_gui.c (revision 30945) @@ -172,7 +172,7 @@ rnd_actionva(&PCB->hidlib, "tang", NULL); } -void cons_gui_confchg(conf_native_t *cfg, int arr_idx) +void cons_gui_confchg(rnd_conf_native_t *cfg, int arr_idx) { if (!cnstgui_ctx.active || cnstgui_ctx.inhibit_confchg) return; Index: trunk/src_plugins/ddraft/ddraft.c =================================================================== --- trunk/src_plugins/ddraft/ddraft.c (revision 30944) +++ trunk/src_plugins/ddraft/ddraft.c (revision 30945) @@ -517,7 +517,7 @@ }; -static void mode_confchg(conf_native_t *cfg, int arr_idx) +static void mode_confchg(rnd_conf_native_t *cfg, int arr_idx) { static int ddraft_tool_selected = 0; @@ -549,7 +549,7 @@ int pplg_init_ddraft(void) { - conf_native_t *cn; + rnd_conf_native_t *cn; conf_hid_id_t confid; PCB_API_CHK_VER; Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 30944) +++ trunk/src_plugins/diag/diag.c (revision 30945) @@ -77,7 +77,7 @@ break; case F_Lihata: { - conf_role_t role; + rnd_conf_role_t role; const char *srole, *prefix = ""; RND_PCB_ACT_CONVARG(2, FGW_STR, DumpConf, srole = argv[2].val.str); rnd_PCB_ACT_MAY_CONVARG(3, FGW_STR, DumpConf, prefix = argv[3].val.str); @@ -116,7 +116,7 @@ static fgw_error_t pcb_act_EvalConf(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *path; - conf_native_t *nat; + rnd_conf_native_t *nat; int role; RND_PCB_ACT_CONVARG(1, FGW_STR, EvalConf, path = argv[1].val.str); Index: trunk/src_plugins/diag/diag_conf.c =================================================================== --- trunk/src_plugins/diag/diag_conf.c (revision 30944) +++ trunk/src_plugins/diag/diag_conf.c (revision 30945) @@ -36,7 +36,7 @@ pl = strlen(match_prefix); for (e = htsp_first(pcb_conf_fields); e; e = htsp_next(pcb_conf_fields, e)) { - conf_native_t *node = (conf_native_t *)e->value; + rnd_conf_native_t *node = (rnd_conf_native_t *)e->value; if (match_prefix != NULL) { if (strncmp(node->hash_path, match_prefix, pl) != 0) continue; Index: trunk/src_plugins/diag/diag_conf.h =================================================================== --- trunk/src_plugins/diag/diag_conf.h (revision 30944) +++ trunk/src_plugins/diag/diag_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN auto_integrity; /* Enable (expensive) automatic integrity check after each user action */ + RND_CFT_BOOLEAN auto_integrity; /* Enable (expensive) automatic integrity check after each user action */ } diag; } plugins; } conf_diag_t; Index: trunk/src_plugins/dialogs/dlg_pref.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref.c (revision 30945) @@ -56,22 +56,22 @@ conf_hid_id_t pref_hid; static const char *role_names[] = { "user", "project", "design", "cli", NULL }; -static const conf_role_t roles[] = { CFR_USER, CFR_PROJECT, CFR_DESIGN, CFR_CLI, 0 }; +static const rnd_conf_role_t roles[] = { CFR_USER, CFR_PROJECT, CFR_DESIGN, CFR_CLI, 0 }; -void pcb_pref_conf2dlg_item(conf_native_t *cn, pref_confitem_t *item) +void pcb_pref_conf2dlg_item(rnd_conf_native_t *cn, pref_confitem_t *item) { switch(cn->type) { - case CFN_COORD: + case RND_CFN_COORD: PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, crd, cn->val.coord[0]); break; - case CFN_BOOLEAN: - case CFN_INTEGER: + case RND_CFN_BOOLEAN: + case RND_CFN_INTEGER: PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, lng, cn->val.integer[0]); break; - case CFN_REAL: + case RND_CFN_REAL: PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, dbl, cn->val.real[0]); break; - case CFN_STRING: + case RND_CFN_STRING: PCB_DAD_SET_VALUE(pref_ctx.dlg_hid_ctx, item->wid, str, cn->val.string[0]); break; default: rnd_message(PCB_MSG_ERROR, "pcb_pref_conf2dlg_item(): widget type not handled\n"); @@ -81,7 +81,7 @@ void pcb_pref_dlg2conf_item(pref_ctx_t *ctx, pref_confitem_t *item, pcb_hid_attribute_t *attr) { pref_confitem_t *old = ctx->pcb_conf_lock; - conf_native_t *cn = pcb_conf_get_field(item->confpath); + rnd_conf_native_t *cn = pcb_conf_get_field(item->confpath); if (cn == NULL) return; @@ -88,20 +88,20 @@ ctx->pcb_conf_lock = item; switch(cn->type) { - case CFN_COORD: + case RND_CFN_COORD: if (cn->val.coord[0] != attr->val.crd) pcb_conf_setf(ctx->role, item->confpath, -1, "%.8$mm", attr->val.crd); break; - case CFN_BOOLEAN: - case CFN_INTEGER: + case RND_CFN_BOOLEAN: + case RND_CFN_INTEGER: if (cn->val.integer[0] != attr->val.lng) pcb_conf_setf(ctx->role, item->confpath, -1, "%d", attr->val.lng); break; - case CFN_REAL: + case RND_CFN_REAL: if (cn->val.real[0] != attr->val.dbl) pcb_conf_setf(ctx->role, item->confpath, -1, "%f", attr->val.dbl); break; - case CFN_STRING: + case RND_CFN_STRING: if (strcmp(cn->val.string[0], attr->val.str) != 0) pcb_conf_set(ctx->role, item->confpath, -1, attr->val.str, RND_POL_OVERWRITE); break; @@ -127,7 +127,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)) { - conf_native_t *cn = pcb_conf_get_field(item->confpath); + rnd_conf_native_t *cn = pcb_conf_get_field(item->confpath); if (cn == NULL) { rnd_message(PCB_MSG_ERROR, "Internal error: pcb_pref_create_conf_item(): invalid conf node %s\n", item->confpath); @@ -139,7 +139,7 @@ PCB_DAD_HELP(ctx->dlg, cn->description); switch(cn->type) { - case CFN_COORD: + case RND_CFN_COORD: PCB_DAD_COORD(ctx->dlg, ""); item->wid = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, 0, PCB_MAX_COORD); @@ -147,7 +147,7 @@ PCB_DAD_HELP(ctx->dlg, cn->description); PCB_DAD_CHANGE_CB(ctx->dlg, change_cb); break; - case CFN_BOOLEAN: + case RND_CFN_BOOLEAN: PCB_DAD_BOOL(ctx->dlg, ""); item->wid = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_DEFAULT_NUM(ctx->dlg, cn->val.integer[0]); @@ -154,7 +154,7 @@ PCB_DAD_HELP(ctx->dlg, cn->description); PCB_DAD_CHANGE_CB(ctx->dlg, change_cb); break; - case CFN_INTEGER: + case RND_CFN_INTEGER: PCB_DAD_INTEGER(ctx->dlg, ""); item->wid = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, 0, INT_MAX); @@ -162,7 +162,7 @@ PCB_DAD_HELP(ctx->dlg, cn->description); PCB_DAD_CHANGE_CB(ctx->dlg, change_cb); break; - case CFN_REAL: + case RND_CFN_REAL: PCB_DAD_REAL(ctx->dlg, ""); item->wid = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, 0, INT_MAX); @@ -170,7 +170,7 @@ PCB_DAD_HELP(ctx->dlg, cn->description); PCB_DAD_CHANGE_CB(ctx->dlg, change_cb); break; - case CFN_STRING: + case RND_CFN_STRING: PCB_DAD_STRING(ctx->dlg); item->wid = PCB_DAD_CURRENT(ctx->dlg); ctx->dlg[item->wid].val.str = rnd_strdup(cn->val.string[0]); @@ -198,7 +198,7 @@ { pref_confitem_t *c; for(c = list; c->confpath != NULL; c++) { - conf_native_t *cn = pcb_conf_get_field(c->confpath); + rnd_conf_native_t *cn = pcb_conf_get_field(c->confpath); c->cnext = NULL; if (cn != NULL) pcb_conf_hid_set_data(cn, pref_hid, NULL); @@ -359,7 +359,7 @@ pref_win_brd2dlg(ctx); } -void pref_conf_changed(conf_native_t *cfg, int arr_idx) +void pref_conf_changed(rnd_conf_native_t *cfg, int arr_idx) { pref_confitem_t *i; Index: trunk/src_plugins/dialogs/dlg_pref.h =================================================================== --- trunk/src_plugins/dialogs/dlg_pref.h (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref.h (revision 30945) @@ -34,7 +34,7 @@ pref_win_t win; pref_conf_t conf; - conf_role_t role; /* where changes are saved to */ + rnd_conf_role_t role; /* where changes are saved to */ pref_confitem_t *pcb_conf_lock; /* the item being changed - should be ignored in a conf change callback */ vtp0_t auto_free; /* free() each item on close */ Index: trunk/src_plugins/dialogs/dlg_pref_color.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_color.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_color.c (revision 30945) @@ -32,7 +32,7 @@ static void pref_color_brd2dlg(pref_ctx_t *ctx) { - conf_native_t *nat; + rnd_conf_native_t *nat; int n; if (ctx->color.wlayer != NULL) { @@ -88,7 +88,7 @@ void pcb_dlg_pref_color_create(pref_ctx_t *ctx) { static const char *tabs[] = { "Generic colors", "Default layer colors", NULL }; - conf_native_t *nat; + rnd_conf_native_t *nat; htsp_entry_t *e; int n, pl, w; const char *path_prefix = "appearance/color"; @@ -105,7 +105,7 @@ ctx->color.ngen = 0; conf_fields_foreach(e) { nat = e->value; - if ((strncmp(e->key, path_prefix, pl) == 0) && (nat->type == CFN_COLOR) && (nat->array_size == 1)) + if ((strncmp(e->key, path_prefix, pl) == 0) && (nat->type == RND_CFN_COLOR) && (nat->array_size == 1)) ctx->color.ngen++; } ctx->color.wgen = calloc(sizeof(int), ctx->color.ngen); @@ -113,7 +113,7 @@ n = 0; conf_fields_foreach(e) { nat = e->value; - if ((strncmp(e->key, path_prefix, pl) == 0) && (nat->type == CFN_COLOR) && (nat->array_size == 1)) { + if ((strncmp(e->key, path_prefix, pl) == 0) && (nat->type == RND_CFN_COLOR) && (nat->array_size == 1)) { PCB_DAD_BEGIN_HBOX(ctx->dlg); PCB_DAD_BEGIN_VBOX(ctx->dlg); PCB_DAD_COLOR(ctx->dlg); @@ -131,7 +131,7 @@ PCB_DAD_BEGIN_VBOX(ctx->dlg); /* layer */ PCB_DAD_COMPFLAG(ctx->dlg, PCB_HATF_EXPFILL | PCB_HATF_SCROLL); nat = pcb_conf_get_field("appearance/color/layer"); - if (nat->type == CFN_COLOR) { + if (nat->type == RND_CFN_COLOR) { PCB_DAD_LABEL(ctx->dlg, "NOTE: these colors are used only\nwhen creating new layers."); ctx->color.wlayer = calloc(sizeof(int), nat->used); PCB_DAD_BEGIN_TABLE(ctx->dlg, 2); Index: trunk/src_plugins/dialogs/dlg_pref_conf.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_conf.c (revision 30945) @@ -31,7 +31,7 @@ #include "conf_core.h" #include -static const char *pref_conf_get_val(const lht_node_t *nd, const conf_native_t *nat, int idx); +static const char *pref_conf_get_val(const lht_node_t *nd, const rnd_conf_native_t *nat, int idx); #include "dlg_pref_confedit.c" /* how many chars per line in conf node description (determines window width vs. @@ -38,7 +38,7 @@ window height */ #define DESC_WRAP_WIDTH 50 -static const char *type_tabs[CFN_max+2] = /* MUST MATCH conf_native_type_t */ +static const char *type_tabs[RND_CFN_max+2] = /* MUST MATCH rnd_conf_native_type_t */ {"STRING", "BOOLEAN", "INTEGER", "REAL", "COORD", "UNIT", "COLOR", "LIST", "invalid", NULL}; static int conf_tree_cmp(const void *v1, const void *v2) @@ -68,7 +68,7 @@ for(n = 0; n < num_paths; n++) { char *basename, *bnsep; pcb_hid_row_t *parent; - conf_native_t *nat; + rnd_conf_native_t *nat; e = sorted[n]; if (strlen(e->key) > sizeof(path) - 1) { @@ -109,7 +109,7 @@ free(sorted); } -static const char *pref_conf_get_val(const lht_node_t *nd, const conf_native_t *nat, int idx) +static const char *pref_conf_get_val(const lht_node_t *nd, const rnd_conf_native_t *nat, int idx) { lht_node_t *ni; @@ -136,9 +136,9 @@ return ""; } -static void setup_intree(pref_ctx_t *ctx, conf_native_t *nat, int idx) +static void setup_intree(pref_ctx_t *ctx, rnd_conf_native_t *nat, int idx) { - conf_role_t n; + rnd_conf_role_t n; pcb_hid_attribute_t *attr = &ctx->dlg[ctx->conf.wintree]; pcb_hid_tree_t *tree = attr->wdata; pcb_hid_row_t *r; @@ -166,27 +166,27 @@ } } -static const char *print_conf_val(conf_native_type_t type, const rnd_confitem_t *val, char *buf, int sizebuf) +static const char *print_conf_val(rnd_conf_native_type_t type, const rnd_confitem_t *val, char *buf, int sizebuf) { const char *ret = buf; *buf = '\0'; switch(type) { - case CFN_STRING: if (*val->string != NULL) ret = *val->string; break; - case CFN_BOOLEAN: strcpy(buf, *val->boolean ? "true" : "false"); break; - case CFN_INTEGER: sprintf(buf, "%ld", *val->integer); break; - case CFN_REAL: sprintf(buf, "%f", *val->real); break; - case CFN_COORD: pcb_snprintf(buf, sizebuf, "%mH\n%mm\n%ml", *val->coord, *val->coord, *val->coord); break; - case CFN_UNIT: strcpy(buf, (*val->unit)->suffix); break; - case CFN_COLOR: strcpy(buf, val->color->str); break; - case CFN_LIST: strcpy(buf, ""); break; - case CFN_HLIST: strcpy(buf, ""); break; - case CFN_max: strcpy(buf, ""); break; + case RND_CFN_STRING: if (*val->string != NULL) ret = *val->string; break; + case RND_CFN_BOOLEAN: strcpy(buf, *val->boolean ? "true" : "false"); break; + case RND_CFN_INTEGER: sprintf(buf, "%ld", *val->integer); break; + case RND_CFN_REAL: sprintf(buf, "%f", *val->real); break; + case RND_CFN_COORD: pcb_snprintf(buf, sizebuf, "%mH\n%mm\n%ml", *val->coord, *val->coord, *val->coord); break; + case RND_CFN_UNIT: strcpy(buf, (*val->unit)->suffix); break; + case RND_CFN_COLOR: strcpy(buf, val->color->str); break; + case RND_CFN_LIST: strcpy(buf, ""); break; + case RND_CFN_HLIST: strcpy(buf, ""); break; + case RND_CFN_max: strcpy(buf, ""); break; } return ret; } -static void dlg_conf_select_node(pref_ctx_t *ctx, const char *path, conf_native_t *nat, int idx) +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; char *tmp, buf[128]; @@ -208,7 +208,7 @@ pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wdesc, &hv); setup_intree(ctx, NULL, 0); - hv.lng = CFN_max; + hv.lng = RND_CFN_max; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wnattype, &hv); return; @@ -230,7 +230,7 @@ hv.lng = nat->type; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->conf.wnattype, &hv); - if ((nat->type == CFN_LIST) || (nat->type == CFN_HLIST)) { + 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]]; pcb_hid_tree_t *tree = attr->wdata; @@ -241,7 +241,7 @@ for (n = pcb_conflist_first(&nat->val.list[idx]); n != NULL; n = pcb_conflist_next(n)) { const char *strval; rolename = pcb_conf_role_name(pcb_conf_lookup_role(n->prop.src)); - if (nat->type == CFN_HLIST) + if (nat->type == RND_CFN_HLIST) strval = n->name; else strval = print_conf_val(n->type, &n->val, buf, sizeof(buf)); @@ -276,7 +276,7 @@ { pcb_hid_tree_t *tree = attrib->wdata; char *end, *end2; - conf_native_t *nat; + rnd_conf_native_t *nat; if (row == NULL) { /* deselect */ dlg_conf_select_node((pref_ctx_t *)tree->user_ctx, NULL, NULL, 0); @@ -311,7 +311,7 @@ } -void pcb_pref_dlg_conf_changed_cb(pref_ctx_t *ctx, conf_native_t *cfg, int arr_idx) +void pcb_pref_dlg_conf_changed_cb(pref_ctx_t *ctx, rnd_conf_native_t *cfg, int arr_idx) { if (ctx->conf.selected_nat == cfg) dlg_conf_select_node(ctx, NULL, cfg, ctx->conf.selected_idx); Index: trunk/src_plugins/dialogs/dlg_pref_conf.h =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_conf.h (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_conf.h (revision 30945) @@ -5,8 +5,8 @@ typedef struct { int wtree, wintree, wdesc, wname, wmainp, wnattype, wfilter; - int wnatval[CFN_max+1], wsrc[CFN_max+1]; - conf_native_t *selected_nat; + int wnatval[RND_CFN_max+1], wsrc[RND_CFN_max+1]; + rnd_conf_native_t *selected_nat; int selected_idx; } pref_conf_t; @@ -14,6 +14,6 @@ void pcb_dlg_pref_conf_create(pref_ctx_t *ctx); void pcb_dlg_pref_conf_open(pref_ctx_t *ctx, const char *tabarg); -void pcb_pref_dlg_conf_changed_cb(pref_ctx_t *ctx, conf_native_t *cfg, int arr_idx); /* global conf change */ +void pcb_pref_dlg_conf_changed_cb(pref_ctx_t *ctx, rnd_conf_native_t *cfg, int arr_idx); /* global conf change */ #endif Index: trunk/src_plugins/dialogs/dlg_pref_confedit.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_confedit.c (revision 30945) @@ -33,9 +33,9 @@ typedef struct { PCB_DAD_DECL_NOINIT(dlg) - conf_native_t *nat; + rnd_conf_native_t *nat; int idx; - conf_role_t role; + rnd_conf_role_t role; int wnewval, winsa; } confedit_ctx_t; @@ -59,24 +59,24 @@ val = pref_conf_get_val(nd, ctx->nat, ctx->idx); switch(ctx->nat->type) { - case CFN_STRING: + case RND_CFN_STRING: hv.str = val; pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; - case CFN_BOOLEAN: - case CFN_INTEGER: + case RND_CFN_BOOLEAN: + case RND_CFN_INTEGER: hv.lng = atoi(val); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; - case CFN_REAL: + case RND_CFN_REAL: hv.dbl = strtod(val, NULL); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; - case CFN_COORD: + case RND_CFN_COORD: hv.crd = pcb_get_value(val, NULL, NULL, NULL); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; - case CFN_UNIT: + case RND_CFN_UNIT: { const pcb_unit_t *u = get_unit_struct(val); if (u != NULL) @@ -86,12 +86,12 @@ pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); } break; - case CFN_COLOR: + case RND_CFN_COLOR: hv.clr = ctx->nat->val.color[ctx->idx]; rnd_color_load_str(&hv.clr, val); pcb_gui->attr_dlg_set_value(ctx->dlg_hid_ctx, ctx->wnewval, &hv); break; - case CFN_LIST: + case RND_CFN_LIST: { pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_tree_t *tree = attr->wdata; @@ -107,11 +107,11 @@ } } break; - case CFN_HLIST: + case RND_CFN_HLIST: /* rnd_message(PCB_MSG_ERROR, "ERROR: can not import hash lists on GUI\n");*/ /* Nothing to do, for now it's just a bunch of buttons */ break; - case CFN_max: + case RND_CFN_max: rnd_message(PCB_MSG_ERROR, "ERROR: invalid conf node type\n"); break; } @@ -130,18 +130,18 @@ attr = &ctx->dlg[ctx->wnewval]; switch(ctx->nat->type) { - case CFN_STRING: val = attr->val.str; break; - case CFN_BOOLEAN: - case CFN_INTEGER: sprintf(buf, "%ld", attr->val.lng); break; - case CFN_REAL: sprintf(buf, "%f", attr->val.dbl); break; - case CFN_COORD: pcb_snprintf(buf, sizeof(buf), "%.08$mH", attr->val.crd); break; - case CFN_UNIT: + case RND_CFN_STRING: val = attr->val.str; break; + case RND_CFN_BOOLEAN: + case RND_CFN_INTEGER: sprintf(buf, "%ld", attr->val.lng); break; + case RND_CFN_REAL: sprintf(buf, "%f", attr->val.dbl); break; + case RND_CFN_COORD: pcb_snprintf(buf, sizeof(buf), "%.08$mH", attr->val.crd); break; + case RND_CFN_UNIT: if ((attr->val.lng < 0) || (attr->val.lng >= pcb_get_n_units(0))) return; val = pcb_units[attr->val.lng].suffix; break; - case CFN_COLOR: val = attr->val.clr.str; break; - case CFN_LIST: + case RND_CFN_COLOR: val = attr->val.clr.str; break; + case RND_CFN_LIST: { pcb_hid_attribute_t *attr = &ctx->dlg[ctx->wnewval]; pcb_hid_tree_t *tree = attr->wdata; @@ -171,8 +171,8 @@ pcb_conf_update(ctx->nat->hash_path, ctx->idx); } return; - case CFN_HLIST: - case CFN_max: + case RND_CFN_HLIST: + case RND_CFN_max: return; } @@ -270,7 +270,7 @@ return; } - if (pctx->conf.selected_nat->type == CFN_HLIST) { + if (pctx->conf.selected_nat->type == RND_CFN_HLIST) { if (pctx->conf.selected_nat->gui_edit_act == NULL) { rnd_message(PCB_MSG_ERROR, "ERROR: can not edit hash lists on GUI\n"); return; @@ -288,7 +288,7 @@ PCB_DAD_LABEL(ctx->dlg, ctx->nat->hash_path); switch(ctx->nat->type) { - case CFN_STRING: + case RND_CFN_STRING: PCB_DAD_STRING(ctx->dlg); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_BUTTON(ctx->dlg, "apply"); @@ -295,12 +295,12 @@ PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); b[0] = PCB_DAD_CURRENT(ctx->dlg); break; - case CFN_BOOLEAN: + case RND_CFN_BOOLEAN: PCB_DAD_BOOL(ctx->dlg, ""); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); break; - case CFN_INTEGER: + case RND_CFN_INTEGER: PCB_DAD_INTEGER(ctx->dlg, ""); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, -(1<<30), +(1<<30)); @@ -308,7 +308,7 @@ PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); b[0] = PCB_DAD_CURRENT(ctx->dlg); break; - case CFN_REAL: + case RND_CFN_REAL: PCB_DAD_REAL(ctx->dlg, ""); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, -(1<<30), +(1<<30)); @@ -316,7 +316,7 @@ PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); b[0] = PCB_DAD_CURRENT(ctx->dlg); break; - case CFN_COORD: + case RND_CFN_COORD: PCB_DAD_COORD(ctx->dlg, ""); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_MINMAX(ctx->dlg, -PCB_MM_TO_COORD(1000), +PCB_MM_TO_COORD(1000)); @@ -324,17 +324,17 @@ PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); b[0] = PCB_DAD_CURRENT(ctx->dlg); break; - case CFN_UNIT: + case RND_CFN_UNIT: PCB_DAD_UNIT(ctx->dlg, 0x3fff); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); break; - case CFN_COLOR: + case RND_CFN_COLOR: PCB_DAD_COLOR(ctx->dlg); ctx->wnewval = PCB_DAD_CURRENT(ctx->dlg); PCB_DAD_CHANGE_CB(ctx->dlg, pref_conf_editval_cb); break; - case CFN_LIST: + case RND_CFN_LIST: PCB_DAD_BEGIN_VBOX(ctx->dlg); PCB_DAD_COMPFLAG(ctx->dlg, PCB_HATF_EXPFILL); PCB_DAD_TREE(ctx->dlg, 1, 0, NULL); @@ -356,7 +356,7 @@ PCB_DAD_END(ctx->dlg); PCB_DAD_END(ctx->dlg); break; - case CFN_HLIST: + case RND_CFN_HLIST: { gdl_iterator_t it; pcb_conf_listitem_t *i; @@ -371,7 +371,7 @@ PCB_DAD_END(ctx->dlg); } break; - case CFN_max: + case RND_CFN_max: PCB_DAD_LABEL(ctx->dlg, "ERROR: invalid conf node type"); } Index: trunk/src_plugins/dialogs/dlg_pref_lib.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_lib.c (revision 30945) @@ -63,7 +63,7 @@ /* Current libraries from config to dialog box: remove everything from the widget first */ -static void pref_lib_conf2dlg_pre(conf_native_t *cfg, int arr_idx) +static void pref_lib_conf2dlg_pre(rnd_conf_native_t *cfg, int arr_idx) { pcb_hid_attribute_t *attr; pcb_hid_tree_t *tree; @@ -96,7 +96,7 @@ /* Current libraries from config to dialog box: after the change, fill in all widget rows from the conf */ -static void pref_lib_conf2dlg_post(conf_native_t *cfg, int arr_idx) +static void pref_lib_conf2dlg_post(rnd_conf_native_t *cfg, int arr_idx) { pcb_conf_listitem_t *i; int idx; @@ -406,7 +406,7 @@ PCB_DAD_LABEL(ctx->dlg, "The following $(variables) can be used in the path:"); PCB_DAD_BEGIN_TABLE(ctx->dlg, 2); conf_fields_foreach(e) { - conf_native_t *nat = e->value; + rnd_conf_native_t *nat = e->value; char tmp[256]; if (strncmp(e->key, "rc/path/", 8) != 0) @@ -477,7 +477,7 @@ void pcb_dlg_pref_lib_open(pref_ctx_t *ctx) { - conf_native_t *cn = pcb_conf_get_field("rc/library_search_paths"); + rnd_conf_native_t *cn = pcb_conf_get_field("rc/library_search_paths"); pref_lib_conf2dlg_post(cn, -1); } @@ -484,7 +484,7 @@ void pcb_dlg_pref_lib_init(pref_ctx_t *ctx) { static conf_hid_callbacks_t cbs_spth; - conf_native_t *cn = pcb_conf_get_field("rc/library_search_paths"); + rnd_conf_native_t *cn = pcb_conf_get_field("rc/library_search_paths"); if (cn != NULL) { memset(&cbs_spth, 0, sizeof(conf_hid_callbacks_t)); Index: trunk/src_plugins/dialogs/dlg_pref_sizes.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_sizes.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_sizes.c (revision 30945) @@ -73,7 +73,7 @@ pcb_pref_dlg2conf_table(ctx, drc_sizes, attr); } -static void pref_isle_brd2dlg(conf_native_t *cfg, int arr_idx) +static void pref_isle_brd2dlg(rnd_conf_native_t *cfg, int arr_idx) { if ((pref_ctx.sizes.lock) || (!pref_ctx.active)) return; @@ -159,7 +159,7 @@ void pcb_dlg_pref_sizes_init(pref_ctx_t *ctx) { static conf_hid_callbacks_t cbs_isle; - conf_native_t *cn = pcb_conf_get_field("design/poly_isle_area"); + rnd_conf_native_t *cn = pcb_conf_get_field("design/poly_isle_area"); if (cn != NULL) { memset(&cbs_isle, 0, sizeof(conf_hid_callbacks_t)); Index: trunk/src_plugins/dialogs/dlg_pref_win.c =================================================================== --- trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30944) +++ trunk/src_plugins/dialogs/dlg_pref_win.c (revision 30945) @@ -33,7 +33,7 @@ #include "../src_plugins/lib_hid_common/dialogs_conf.h" extern const conf_dialogs_t dialogs_conf; -extern void pcb_wplc_save_to_role(conf_role_t role); +extern void pcb_wplc_save_to_role(rnd_conf_role_t role); extern int pcb_wplc_save_to_file(const char *fn); static void pref_win_brd2dlg(pref_ctx_t *ctx) Index: trunk/src_plugins/djopt/djopt_conf.h =================================================================== --- trunk/src_plugins/djopt/djopt_conf.h (revision 30944) +++ trunk/src_plugins/djopt/djopt_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN auto_only; /* Operate on autorouted tracks only */ + RND_CFT_BOOLEAN auto_only; /* Operate on autorouted tracks only */ } djopt; } plugins; } conf_djopt_t; Index: trunk/src_plugins/draw_fab/draw_fab_conf.h =================================================================== --- trunk/src_plugins/draw_fab/draw_fab_conf.h (revision 30944) +++ trunk/src_plugins/draw_fab/draw_fab_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN omit_date; /* do not draw date (useful for testing) */ + RND_CFT_BOOLEAN omit_date; /* do not draw date (useful for testing) */ } draw_fab; } plugins; } conf_draw_fab_t; Index: trunk/src_plugins/drc_orig/drc_orig_conf.h =================================================================== --- trunk/src_plugins/drc_orig/drc_orig_conf.h (revision 30944) +++ trunk/src_plugins/drc_orig/drc_orig_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN disable; /* disable the whole engine */ + RND_CFT_BOOLEAN disable; /* disable the whole engine */ } drc_orig; } plugins; } conf_drc_orig_t; Index: trunk/src_plugins/drc_query/dlg.c =================================================================== --- trunk/src_plugins/drc_query/dlg.c (revision 30944) +++ trunk/src_plugins/drc_query/dlg.c (revision 30945) @@ -41,7 +41,7 @@ typedef struct{ PCB_DAD_DECL_NOINIT(dlg) - conf_role_t role; + rnd_conf_role_t role; char *rule, *path; int wtype, wtitle, wdisable, wdesc, wquery, wsave, wsaveroles; gdl_elem_t link; @@ -48,7 +48,7 @@ } rule_edit_ctx_t; static const char *save_roles[] = {"user", "project", "design", "cli", NULL}; -static conf_role_t save_rolee[] = { CFR_USER, CFR_PROJECT, CFR_DESIGN, CFR_CLI}; +static rnd_conf_role_t save_rolee[] = { CFR_USER, CFR_PROJECT, CFR_DESIGN, CFR_CLI}; #define save_role_defaulti 2 gdl_list_t rule_edit_dialogs; @@ -173,7 +173,7 @@ rule_edit_ctx_t *ctx = caller_data; int ri = ctx->dlg[ctx->wsaveroles].val.lng; lht_node_t *nd; - conf_role_t role; + rnd_conf_role_t role; pcb_hid_attribute_t *atxt = &ctx->dlg[ctx->wquery]; pcb_hid_text_t *txt = atxt->wdata; @@ -219,7 +219,7 @@ #undef MKDIR_ND -static int pcb_dlg_rule_edit(conf_role_t role, const char *rule) +static int pcb_dlg_rule_edit(rnd_conf_role_t role, const char *rule) { pcb_hid_dad_buttons_t clbtn[] = {{"Close", 0}, {NULL, 0}}; char *info, *path; @@ -327,7 +327,7 @@ static fgw_error_t pcb_act_DrcQueryEditRule(fgw_arg_t *res, int argc, fgw_arg_t *argv) { const char *srole, *spath, *srule = NULL; - conf_role_t role; + rnd_conf_role_t role; RND_PCB_ACT_CONVARG(1, FGW_STR, DrcQueryEditRule, srole = argv[1].val.str); RND_PCB_ACT_CONVARG(2, FGW_STR, DrcQueryEditRule, spath = argv[2].val.str); @@ -390,7 +390,7 @@ pcb_conflist_foreach(&conf_drc_query.plugins.drc_query.rules, &it, i) { int *dis, dis_ = 0; - conf_role_t role; + rnd_conf_role_t role; lht_node_t *rule = i->prop.src; st = pcb_drcq_stat_get(rule->name); @@ -473,7 +473,7 @@ { drc_rlist_ctx_t *ctx = caller_data; pcb_hid_row_t *row = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wlist])); - conf_role_t role; + rnd_conf_role_t role; rlist_fetch(); @@ -486,7 +486,7 @@ pcb_hid_row_t *row = pcb_dad_tree_get_selected(&(ctx->dlg[ctx->wlist])); lht_node_t *nd; const char *script; - conf_role_t role; + rnd_conf_role_t role; pcb_view_list_t *view; pcb_board_t *pcb = (pcb_board_t *)pcb_gui->get_dad_hidlib(hid_ctx); @@ -512,7 +512,7 @@ drc_rlist_ctx_t *ctx = tree->user_ctx; lht_node_t *nd; gds_t tmp; - conf_role_t role; + rnd_conf_role_t role; pcb_drcq_stat_t *st; rlist_fetch(); Index: trunk/src_plugins/drc_query/drc_query.c =================================================================== --- trunk/src_plugins/drc_query/drc_query.c (revision 30944) +++ trunk/src_plugins/drc_query/drc_query.c (revision 30945) @@ -193,9 +193,9 @@ static int *drc_get_disable(const char *name) { char *path = pcb_concat(DRC_CONF_PATH_DISABLE, name, NULL); - conf_native_t *nat = pcb_conf_get_field(path); + rnd_conf_native_t *nat = pcb_conf_get_field(path); free(path); - if ((nat == NULL) || (nat->type != CFN_BOOLEAN)) + if ((nat == NULL) || (nat->type != RND_CFN_BOOLEAN)) return NULL; return nat->val.boolean; } @@ -238,9 +238,9 @@ } static vtp0_t free_drc_conf_nodes; -static conf_native_t *nat_defs = NULL; -static conf_native_t *nat_rules = NULL; -static void drc_query_newconf(conf_native_t *cfg, pcb_conf_listitem_t *i) +static rnd_conf_native_t *nat_defs = NULL; +static rnd_conf_native_t *nat_rules = NULL; +static void drc_query_newconf(rnd_conf_native_t *cfg, pcb_conf_listitem_t *i) { if (nat_rules == NULL) { if (strncmp(cfg->hash_path, DRC_CONF_PATH_RULES, strlen(DRC_CONF_PATH_RULES)-1) == 0) { @@ -261,7 +261,7 @@ if (pcb_conf_get_field(path) == NULL) { const char *sdesc; - conf_native_t *nat; + rnd_conf_native_t *nat; pcb_bool_t *b; lht_node_t *ndesc; @@ -269,7 +269,7 @@ if ((ndesc != NULL) && (ndesc->type == LHT_TEXT)) sdesc = ndesc->data.text.value; b = calloc(sizeof(pcb_bool_t), 1); - nat = pcb_conf_reg_field_(b, 1, CFN_BOOLEAN, path, rnd_strdup(sdesc), 0); + nat = pcb_conf_reg_field_(b, 1, RND_CFN_BOOLEAN, path, rnd_strdup(sdesc), 0); if (nat == NULL) { free(b); rnd_message(PCB_MSG_ERROR, "drc_query: failed to register conf node '%s'\n", path); @@ -297,13 +297,13 @@ void *ptr; char *str; } anyval; - conf_native_t *nat; + rnd_conf_native_t *nat; lht_node_t *ndesc = lht_dom_hash_get(nd, "desc"); lht_node_t *ntype = lht_dom_hash_get(nd, "type"); lht_node_t *ndefault = lht_dom_hash_get(nd, "default"); lht_node_t *nlegacy = lht_dom_hash_get(nd, "legacy"); const char *sdesc = "n/a", *stype = NULL, *sdefault = NULL, *slegacy = NULL; - conf_native_type_t type; + rnd_conf_native_type_t type; if ((ndesc != NULL) && (ndesc->type == LHT_TEXT)) sdesc = ndesc->data.text.value; if ((ntype != NULL) && (ntype->type == LHT_TEXT)) stype = ntype->data.text.value; if ((ndefault != NULL) && (ndefault->type == LHT_TEXT)) sdefault = ndefault->data.text.value; @@ -316,7 +316,7 @@ } type = pcb_conf_native_type_parse(stype); - if (type >= CFN_LIST) { + if (type >= RND_CFN_LIST) { rnd_message(PCB_MSG_ERROR, "drc_query: invalid type '%s' for %s\n", stype, nd->name); goto fail; } Index: trunk/src_plugins/drc_query/drc_query_conf.h =================================================================== --- trunk/src_plugins/drc_query/drc_query_conf.h (revision 30944) +++ trunk/src_plugins/drc_query/drc_query_conf.h (revision 30945) @@ -6,9 +6,9 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN disable; /* disable the whole engine */ - CFT_HLIST definitions; /* DRC constant definitions */ - CFT_HLIST rules; /* inline rules */ + RND_CFT_BOOLEAN disable; /* disable the whole engine */ + RND_CFT_HLIST definitions; /* DRC constant definitions */ + RND_CFT_HLIST rules; /* inline rules */ } drc_query; } plugins; } conf_drc_query_t; Index: trunk/src_plugins/export_excellon/excellon_conf.h =================================================================== --- trunk/src_plugins/export_excellon/excellon_conf.h (revision 30944) +++ trunk/src_plugins/export_excellon/excellon_conf.h (revision 30945) @@ -6,8 +6,8 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN plated_g85_slot; /* use G85 (drill cycle instead of route) for plated slots */ - CFT_BOOLEAN unplated_g85_slot; /* use G85 (drill cycle instead of route) for unplated slots */ + RND_CFT_BOOLEAN plated_g85_slot; /* use G85 (drill cycle instead of route) for plated slots */ + RND_CFT_BOOLEAN unplated_g85_slot; /* use G85 (drill cycle instead of route) for unplated slots */ } export_excellon; } plugins; } conf_excellon_t; Index: trunk/src_plugins/export_gerber/gerber_conf.h =================================================================== --- trunk/src_plugins/export_gerber/gerber_conf.h (revision 30944) +++ trunk/src_plugins/export_gerber/gerber_conf.h (revision 30945) @@ -6,8 +6,8 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN plated_g85_slot; /* use G85 (drill cycle instead of route) for plated slots - only affects direct gerber export, DO NOT USE, check excellon's config instead */ - CFT_BOOLEAN unplated_g85_slot; /* use G85 (drill cycle instead of route) for unplated slots - only affects direct gerber export, DO NOT USE, check excellon's config instead */ + RND_CFT_BOOLEAN plated_g85_slot; /* use G85 (drill cycle instead of route) for plated slots - only affects direct gerber export, DO NOT USE, check excellon's config instead */ + RND_CFT_BOOLEAN unplated_g85_slot; /* use G85 (drill cycle instead of route) for unplated slots - only affects direct gerber export, DO NOT USE, check excellon's config instead */ } export_gerber; } plugins; } conf_gerber_t; Index: trunk/src_plugins/export_xy/xy_conf.h =================================================================== --- trunk/src_plugins/export_xy/xy_conf.h (revision 30944) +++ trunk/src_plugins/export_xy/xy_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_LIST templates; + RND_CFT_LIST templates; } export_xy; } plugins; } conf_xy_t; Index: trunk/src_plugins/fp_wget/fp_wget_conf.h =================================================================== --- trunk/src_plugins/fp_wget/fp_wget_conf.h (revision 30944) +++ trunk/src_plugins/fp_wget/fp_wget_conf.h (revision 30945) @@ -6,9 +6,9 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN auto_update_gedasymbols; /* update the index of gedasymbols on startup automatically */ - CFT_BOOLEAN auto_update_edakrill; /* update the index of edakrill on startup automatically */ - CFT_STRING cache_dir; /* where to build the cache */ + RND_CFT_BOOLEAN auto_update_gedasymbols; /* update the index of gedasymbols on startup automatically */ + RND_CFT_BOOLEAN auto_update_edakrill; /* update the index of edakrill on startup automatically */ + RND_CFT_STRING cache_dir; /* where to build the cache */ } fp_wget; } plugins; } conf_fp_wget_t; Index: trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c =================================================================== --- trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30944) +++ trunk/src_plugins/hid_gtk2_gdk/gtkhid-gdk.c (revision 30945) @@ -459,21 +459,21 @@ gdk_gc_set_foreground(priv->grid_gc, &priv->grid_color); } -static void ghid_gdk_set_special_colors(conf_native_t *cfg) +static void ghid_gdk_set_special_colors(rnd_conf_native_t *cfg) { render_priv_t *priv = ghidgui->port.render_priv; - if (((CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.background) && priv->bg_gc) { + if (((RND_CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.background) && priv->bg_gc) { if (map_color(&cfg->val.color[0], &priv->bg_color)) { gdk_gc_set_foreground(priv->bg_gc, &priv->bg_color); set_special_grid_color(); } } - else if (((CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.off_limit) && priv->offlimits_gc) { + else if (((RND_CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.off_limit) && priv->offlimits_gc) { if (map_color(&cfg->val.color[0], &priv->offlimits_color)) gdk_gc_set_foreground(priv->offlimits_gc, &priv->offlimits_color); } - else if (((CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.grid) && priv->grid_gc) { + else if (((RND_CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.grid) && priv->grid_gc) { if (map_color(&cfg->val.color[0], &priv->grid_color)) set_special_grid_color(); } Index: trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c =================================================================== --- trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30944) +++ trunk/src_plugins/hid_gtk2_gl/gtkhid-gl.c (revision 30945) @@ -260,17 +260,17 @@ rnd_color_load_int(&priv->grid_color, r, g, b, 255); } -void ghid_gl_set_special_colors(conf_native_t *cfg) +void ghid_gl_set_special_colors(rnd_conf_native_t *cfg) { render_priv_t *priv = ghidgui->port.render_priv; - if (((CFT_COLOR *) cfg->val.color == &pcbhl_conf.appearance.color.background)) { + if (((RND_CFT_COLOR *) cfg->val.color == &pcbhl_conf.appearance.color.background)) { priv->bg_color = cfg->val.color[0]; } - else if ((CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.off_limit) { + else if ((RND_CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.off_limit) { priv->offlimits_color = cfg->val.color[0]; } - else if (((CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.grid)) { + else if (((RND_CFT_COLOR *)cfg->val.color == &pcbhl_conf.appearance.color.grid)) { priv->grid_color = cfg->val.color[0]; set_special_grid_color(); } Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 30944) +++ trunk/src_plugins/hid_lesstif/main.c (revision 30945) @@ -2769,7 +2769,7 @@ return 0; } -static void lesstif_globconf_change_post(conf_native_t *cfg, int arr_idx) +static void lesstif_globconf_change_post(rnd_conf_native_t *cfg, int arr_idx) { if (!lesstif_active) return; @@ -2786,9 +2786,9 @@ TODO("decide if we'll ever need this") #if 0 -static void init_conf_watch(conf_hid_callbacks_t *cbs, const char *path, void (*func)(conf_native_t *, int)) +static void init_conf_watch(conf_hid_callbacks_t *cbs, const char *path, void (*func)(rnd_conf_native_t *, int)) { - conf_native_t *n = pcb_conf_get_field(path); + rnd_conf_native_t *n = pcb_conf_get_field(path); if (n != NULL) { memset(cbs, 0, sizeof(conf_hid_callbacks_t)); cbs->val_change_post = func; Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 30944) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 30945) @@ -396,7 +396,7 @@ } } -static void lesstif_confchg_checkbox(conf_native_t *cfg, int arr_idx) +static void lesstif_confchg_checkbox(rnd_conf_native_t *cfg, int arr_idx) { lesstif_update_widget_flags(NULL, NULL); } @@ -499,7 +499,7 @@ if (uo != NULL) { static conf_hid_callbacks_t cbs; static int cbs_inited = 0; - conf_native_t *nat = pcb_conf_get_field(uo); + rnd_conf_native_t *nat = pcb_conf_get_field(uo); if (nat != NULL) { if (!cbs_inited) { Index: trunk/src_plugins/import_gnetlist/import_gnetlist_conf.h =================================================================== --- trunk/src_plugins/import_gnetlist/import_gnetlist_conf.h (revision 30944) +++ trunk/src_plugins/import_gnetlist/import_gnetlist_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_STRING gnetlist_program; /* gnetlist program name */ + RND_CFT_STRING gnetlist_program; /* gnetlist program name */ } import_gnetlist; } plugins; } conf_import_gnetlist_t; Index: trunk/src_plugins/import_mentor_sch/mentor_sch_conf.h =================================================================== --- trunk/src_plugins/import_mentor_sch/mentor_sch_conf.h (revision 30944) +++ trunk/src_plugins/import_mentor_sch/mentor_sch_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_LIST map_search_paths; /* parts map file search paths */ + RND_CFT_LIST map_search_paths; /* parts map file search paths */ } import_mentor_sch; } plugins; } conf_mentor_sch_t; Index: trunk/src_plugins/import_sch2/import_sch_conf.h =================================================================== --- trunk/src_plugins/import_sch2/import_sch_conf.h (revision 30944) +++ trunk/src_plugins/import_sch2/import_sch_conf.h (revision 30945) @@ -6,13 +6,13 @@ typedef struct { const struct { const struct { - CFT_STRING import_fmt; /* name of the input format */ - CFT_LIST args; /* import_fmt arguments, typically file names */ - CFT_BOOLEAN verbose; /* verbose logging of the import code */ + RND_CFT_STRING import_fmt; /* name of the input format */ + RND_CFT_LIST args; /* import_fmt arguments, typically file names */ + RND_CFT_BOOLEAN verbose; /* verbose logging of the import code */ /* obsolete: temporary compatibility with import_sch for the transition period */ - CFT_STRING gnetlist_program; /* DEPRECATED: gnetlist program name */ - CFT_STRING make_program; /* DEPRECATED: make program name */ + RND_CFT_STRING gnetlist_program; /* DEPRECATED: gnetlist program name */ + RND_CFT_STRING make_program; /* DEPRECATED: make program name */ } import_sch; } plugins; } conf_import_sch_t; Index: trunk/src_plugins/import_sch2/import_sch_dlg.c =================================================================== --- trunk/src_plugins/import_sch2/import_sch_dlg.c (revision 30944) +++ trunk/src_plugins/import_sch2/import_sch_dlg.c (revision 30945) @@ -359,7 +359,7 @@ return 0; } -static void isch_cfg_chg(conf_native_t *cfg, int arr_idx) +static void isch_cfg_chg(rnd_conf_native_t *cfg, int arr_idx) { if ((isch_conf_lock == 0) && isch_ctx.active) isch_pcb2dlg(); Index: trunk/src_plugins/io_autotrax/read.c =================================================================== --- trunk/src_plugins/io_autotrax/read.c (revision 30944) +++ trunk/src_plugins/io_autotrax/read.c (revision 30945) @@ -104,7 +104,7 @@ typedef struct { pcb_board_t *pcb; const char *Filename; - conf_role_t settings_dest; + rnd_conf_role_t settings_dest; pcb_layer_id_t protel_to_stackup[14]; int lineno; rnd_coord_t mask_clearance; @@ -1072,7 +1072,7 @@ } -int io_autotrax_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) +int io_autotrax_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int readres = 0; rnd_box_t board_size, *box; Index: trunk/src_plugins/io_autotrax/read.h =================================================================== --- trunk/src_plugins/io_autotrax/read.h (revision 30944) +++ trunk/src_plugins/io_autotrax/read.h (revision 30945) @@ -31,4 +31,4 @@ #include "data.h" int io_autotrax_test_parse(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_autotrax_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); +int io_autotrax_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 30944) +++ trunk/src_plugins/io_dsn/read.c (revision 30945) @@ -1827,7 +1827,7 @@ return 0; } -int io_dsn_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, conf_role_t settings_dest) +int io_dsn_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest) { dsn_read_t rdctx; gsxl_node_t *rn; Index: trunk/src_plugins/io_dsn/read.h =================================================================== --- trunk/src_plugins/io_dsn/read.h (revision 30944) +++ trunk/src_plugins/io_dsn/read.h (revision 30945) @@ -1,4 +1,4 @@ #include "plug_io.h" int io_dsn_test_parse(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_dsn_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); +int io_dsn_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 30944) +++ trunk/src_plugins/io_eagle/read.c (revision 30945) @@ -1696,7 +1696,7 @@ } -int io_eagle_read_pcb_xml(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, conf_role_t settings_dest) +int io_eagle_read_pcb_xml(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest) { int pp_res, res, old_leni; read_state_t st; @@ -1759,7 +1759,7 @@ return -1; } -int io_eagle_read_pcb_bin(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, conf_role_t settings_dest) +int io_eagle_read_pcb_bin(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest) { int pp_res, res, old_leni; read_state_t st; Index: trunk/src_plugins/io_eagle/read.h =================================================================== --- trunk/src_plugins/io_eagle/read.h (revision 30944) +++ trunk/src_plugins/io_eagle/read.h (revision 30945) @@ -3,8 +3,8 @@ #include "plug_io.h" int io_eagle_test_parse_xml(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_eagle_read_pcb_xml(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); +int io_eagle_read_pcb_xml(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); int io_eagle_test_parse_bin(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_eagle_read_pcb_bin(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, conf_role_t settings_dest); +int io_eagle_read_pcb_bin(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest); Index: trunk/src_plugins/io_eagle/read_dru.c =================================================================== --- trunk/src_plugins/io_eagle/read_dru.c (revision 30944) +++ trunk/src_plugins/io_eagle/read_dru.c (revision 30945) @@ -157,7 +157,7 @@ pcb_conf_set(CFR_DESIGN, "design/min_drill", -1, val, RND_POL_OVERWRITE); } -int io_eagle_read_pcb_dru(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, conf_role_t settings_dest) +int io_eagle_read_pcb_dru(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest) { FILE *f; char *efn; Index: trunk/src_plugins/io_eagle/read_dru.h =================================================================== --- trunk/src_plugins/io_eagle/read_dru.h (revision 30944) +++ trunk/src_plugins/io_eagle/read_dru.h (revision 30945) @@ -7,7 +7,7 @@ #ifndef PCB_EAGLE_DRU_PARSER_TEST #include "plug_io.h" int io_eagle_test_parse_dru(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_eagle_read_pcb_dru(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, conf_role_t settings_dest); +int io_eagle_read_pcb_dru(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest); #endif /*** low level ***/ Index: trunk/src_plugins/io_hyp/io_hyp.c =================================================================== --- trunk/src_plugins/io_hyp/io_hyp.c (revision 30944) +++ trunk/src_plugins/io_hyp/io_hyp.c (revision 30945) @@ -144,7 +144,7 @@ return 0; } -int io_hyp_read_pcb(pcb_plug_io_t * ctx, pcb_board_t * pcb, const char *Filename, conf_role_t settings_dest) +int io_hyp_read_pcb(pcb_plug_io_t * ctx, pcb_board_t * pcb, const char *Filename, rnd_conf_role_t settings_dest) { int res = hyp_parse(pcb->Data, Filename, 0); pcb_layer_auto_fixup(pcb); Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 30944) +++ trunk/src_plugins/io_kicad/read.c (revision 30945) @@ -93,7 +93,7 @@ pcb_board_t *pcb; pcb_data_t *fp_data; const char *Filename; - conf_role_t settings_dest; + rnd_conf_role_t settings_dest; gsxl_dom_t dom; unsigned auto_layers:1; unsigned module_pre_create:1; @@ -2719,7 +2719,7 @@ return res; } -int io_kicad_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) +int io_kicad_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int readres = 0; read_state_t st; Index: trunk/src_plugins/io_kicad/read.h =================================================================== --- trunk/src_plugins/io_kicad/read.h (revision 30944) +++ trunk/src_plugins/io_kicad/read.h (revision 30945) @@ -31,7 +31,7 @@ #include "data.h" int io_kicad_test_parse(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_kicad_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); +int io_kicad_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); int io_kicad_parse_module(pcb_plug_io_t *ctx, pcb_data_t *Ptr, const char *name, const char *subfpname); pcb_plug_fp_map_t *io_kicad_map_footprint(pcb_plug_io_t *ctx, FILE *f, const char *fn, pcb_plug_fp_map_t *head, int need_tags); Index: trunk/src_plugins/io_lihata/lht_conf.h =================================================================== --- trunk/src_plugins/io_lihata/lht_conf.h (revision 30944) +++ trunk/src_plugins/io_lihata/lht_conf.h (revision 30945) @@ -6,10 +6,10 @@ typedef struct { const struct { const struct { - CFT_STRING aux_pcb_pattern; /* [obsolete] file name pattern to use when generating the .pcb backup */ - CFT_BOOLEAN omit_font; /* [dangerous] do not save the font subtree in board files */ - CFT_BOOLEAN omit_config; /* [dangerous] do not save the config subtree in board files */ - CFT_BOOLEAN omit_styles; /* do not save the routing styles subtree in board files */ + RND_CFT_STRING aux_pcb_pattern; /* [obsolete] file name pattern to use when generating the .pcb backup */ + RND_CFT_BOOLEAN omit_font; /* [dangerous] do not save the font subtree in board files */ + RND_CFT_BOOLEAN omit_config; /* [dangerous] do not save the config subtree in board files */ + RND_CFT_BOOLEAN omit_styles; /* do not save the routing styles subtree in board files */ } io_lihata; } plugins; } conf_io_lihata_t; Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 30944) +++ trunk/src_plugins/io_lihata/read.c (revision 30945) @@ -65,7 +65,7 @@ vtp0_t post_ids, post_thermal_old, post_thermal_heavy; static int rdver; unsigned long warned, old_model_warned; -static conf_role_t cfg_dest; +static rnd_conf_role_t cfg_dest; static pcb_data_t DUMMY_BUFFER_SUBC; @@ -2340,7 +2340,7 @@ return 0; } -int io_lihata_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) +int io_lihata_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int res; char *errmsg = NULL, *realfn; Index: trunk/src_plugins/io_lihata/read.h =================================================================== --- trunk/src_plugins/io_lihata/read.h (revision 30944) +++ trunk/src_plugins/io_lihata/read.h (revision 30945) @@ -27,7 +27,7 @@ #include "plug_io.h" int io_lihata_test_parse(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); -int io_lihata_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); +int io_lihata_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); int io_lihata_parse_font(pcb_plug_io_t *ctx, pcb_font_t *Ptr, const char *Filename); int io_lihata_parse_subc(pcb_plug_io_t *ctx, pcb_data_t *Ptr, const char *name, const char *subfpname); int io_lihata_parse_buffer(pcb_plug_io_t *ctx, pcb_buffer_t *buff, const char *filename); Index: trunk/src_plugins/io_mentor_cell/read.c =================================================================== --- trunk/src_plugins/io_mentor_cell/read.c (revision 30944) +++ trunk/src_plugins/io_mentor_cell/read.c (revision 30945) @@ -1394,7 +1394,7 @@ #include "read_net.c" #include "read_pstk.c" -int io_mentor_cell_read_pcb(pcb_plug_io_t *pctx, pcb_board_t *pcb, const char *fn, conf_role_t settings_dest) +int io_mentor_cell_read_pcb(pcb_plug_io_t *pctx, pcb_board_t *pcb, const char *fn, rnd_conf_role_t settings_dest) { hkp_ctx_t ctx; int res = -1; Index: trunk/src_plugins/io_mentor_cell/read.h =================================================================== --- trunk/src_plugins/io_mentor_cell/read.h (revision 30944) +++ trunk/src_plugins/io_mentor_cell/read.h (revision 30945) @@ -1,2 +1,2 @@ -int io_mentor_cell_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *fn, conf_role_t settings_dest); +int io_mentor_cell_read_pcb(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *fn, rnd_conf_role_t settings_dest); int io_mentor_cell_test_parse(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); Index: trunk/src_plugins/io_pcb/attribs.c =================================================================== --- trunk/src_plugins/io_pcb/attribs.c (revision 30944) +++ trunk/src_plugins/io_pcb/attribs.c (revision 30945) @@ -74,13 +74,13 @@ continue; } if (n->type == LHT_TEXT) { - conf_native_t *nv = pcb_conf_get_field(path); + rnd_conf_native_t *nv = pcb_conf_get_field(path); if ((nv != NULL) && (!nv->random_flags.io_pcb_no_attrib)) rnd_attribute_put(&pcb->Attributes, apath, n->data.text.value); } else if (n->type == LHT_LIST) { lht_node_t *i; - conf_native_t *nv = pcb_conf_get_field(path); + rnd_conf_native_t *nv = pcb_conf_get_field(path); if ((nv != NULL) && (!nv->random_flags.io_pcb_no_attrib)) { gds_t conc; gds_init(&conc); @@ -111,10 +111,10 @@ for (n = 0; n < pcb->Attributes.Number; n++) { if (path_ok(pcb->Attributes.List[n].name)) { - conf_native_t *nv = pcb_conf_get_field(pcb->Attributes.List[n].name + conf_attr_prefix_len); + rnd_conf_native_t *nv = pcb_conf_get_field(pcb->Attributes.List[n].name + conf_attr_prefix_len); if (nv == NULL) continue; - if (nv->type == CFN_LIST) { + if (nv->type == RND_CFN_LIST) { char *tmp = rnd_strdup(pcb->Attributes.List[n].value); char *next, *curr; for(curr = tmp; curr != NULL; curr = next) { Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 30944) +++ trunk/src_plugins/io_pcb/file.c (revision 30945) @@ -239,12 +239,12 @@ static void conf_update_pcb_flag(pcb_flag_t *dest, const char *hash_path, int binflag) { - conf_native_t *n = pcb_conf_get_field(hash_path); + rnd_conf_native_t *n = pcb_conf_get_field(hash_path); struct { pcb_flag_t Flags; } *tmp = (void *)dest; - if ((n == NULL) || (n->type != CFN_BOOLEAN) || (n->used < 0) || (!n->val.boolean[0])) + if ((n == NULL) || (n->type != RND_CFN_BOOLEAN) || (n->used < 0) || (!n->val.boolean[0])) PCB_FLAG_CLEAR(binflag, tmp); else PCB_FLAG_SET(binflag, tmp); Index: trunk/src_plugins/io_pcb/parse_common.h =================================================================== --- trunk/src_plugins/io_pcb/parse_common.h (revision 30944) +++ trunk/src_plugins/io_pcb/parse_common.h (revision 30945) @@ -36,7 +36,7 @@ #include "config.h" #include "plug_io.h" -int io_pcb_ParsePCB(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); +int io_pcb_ParsePCB(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); int io_pcb_ParseElement(pcb_plug_io_t *ctx, pcb_data_t *, const char *, const char *); int io_pcb_ParseFont(pcb_plug_io_t *ctx, pcb_font_t *, const char *); Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 30944) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 30945) @@ -943,7 +943,7 @@ pcb_subc_t *yysubc; rnd_coord_t yysubc_ox, yysubc_oy; pcb_font_t * yyFont; -conf_role_t yy_settings_dest; +rnd_conf_role_t yy_settings_dest; pcb_flag_t yy_pcb_flags; int *yyFontkitValid; int yy_parse_tags; @@ -2739,7 +2739,7 @@ have hardwired flags again in a "don't save these in attributes" list. */ #define CONF_NO_ATTRIB(path) \ do { \ - conf_native_t *n = pcb_conf_get_field(path); \ + rnd_conf_native_t *n = pcb_conf_get_field(path); \ if (n != NULL) \ n->random_flags.io_pcb_no_attrib = 1; \ } while(0) \ @@ -2750,7 +2750,7 @@ pcb_conf_set(target, path, arr_idx, new_val, pol); \ } while(0) \ -int io_pcb_ParsePCB(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) +int io_pcb_ParsePCB(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int retval; const char *fcmd; Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 30944) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 30945) @@ -74,7 +74,7 @@ pcb_subc_t *yysubc; rnd_coord_t yysubc_ox, yysubc_oy; pcb_font_t * yyFont; -conf_role_t yy_settings_dest; +rnd_conf_role_t yy_settings_dest; pcb_flag_t yy_pcb_flags; int *yyFontkitValid; int yy_parse_tags; @@ -356,7 +356,7 @@ have hardwired flags again in a "don't save these in attributes" list. */ #define CONF_NO_ATTRIB(path) \ do { \ - conf_native_t *n = pcb_conf_get_field(path); \ + rnd_conf_native_t *n = pcb_conf_get_field(path); \ if (n != NULL) \ n->random_flags.io_pcb_no_attrib = 1; \ } while(0) \ @@ -367,7 +367,7 @@ pcb_conf_set(target, path, arr_idx, new_val, pol); \ } while(0) \ -int io_pcb_ParsePCB(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) +int io_pcb_ParsePCB(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int retval; const char *fcmd; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 30944) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 30945) @@ -154,7 +154,7 @@ extern rnd_bool yyFontReset; extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ -extern conf_role_t yy_settings_dest; +extern rnd_conf_role_t yy_settings_dest; extern pcb_flag_t yy_pcb_flags; extern int *yyFontkitValid; extern int yyElemFixLayers; Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 30944) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 30945) @@ -77,7 +77,7 @@ extern rnd_bool yyFontReset; extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ -extern conf_role_t yy_settings_dest; +extern rnd_conf_role_t yy_settings_dest; extern pcb_flag_t yy_pcb_flags; extern int *yyFontkitValid; extern int yyElemFixLayers; Index: trunk/src_plugins/io_tedax/io_tedax.c =================================================================== --- trunk/src_plugins/io_tedax/io_tedax.c (revision 30944) +++ trunk/src_plugins/io_tedax/io_tedax.c (revision 30945) @@ -224,7 +224,7 @@ return 0; } -int io_tedax_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) +int io_tedax_parse_pcb(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest) { int res; Index: trunk/src_plugins/io_tedax/tdrc.c =================================================================== --- trunk/src_plugins/io_tedax/tdrc.c (revision 30944) +++ trunk/src_plugins/io_tedax/tdrc.c (revision 30945) @@ -62,7 +62,7 @@ fputc('\n', f); for(n = 0, r = rules; n < NUM_RULES; r++,n++) { - conf_native_t *nat = pcb_conf_get_field(r->conf); + rnd_conf_native_t *nat = pcb_conf_get_field(r->conf); if ((nat == NULL) || (nat->prop->src == NULL)) continue; pcb_fprintf(f, " rule all %s %s %.06mm pcb_rnd_old_drc_from_conf\n", r->ttype, r->tkind, nat->val.coord[0]); Index: trunk/src_plugins/lib_gtk_common/bu_menu.c =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30944) +++ trunk/src_plugins/lib_gtk_common/bu_menu.c (revision 30945) @@ -159,7 +159,7 @@ const char *tip = pcb_hid_cfg_menu_field_str(sub_res, PCB_MF_TIP); if (checked) { /* TOGGLE ITEM */ - conf_native_t *nat = NULL; + rnd_conf_native_t *nat = NULL; gchar *name = g_strdup_printf("MainMenuAction%d", action_counter++); action = GTK_ACTION(gtk_toggle_action_new(name, menu_label, tip, NULL)); /* checked=foo is a binary flag (checkbox) Index: trunk/src_plugins/lib_gtk_common/bu_menu.h =================================================================== --- trunk/src_plugins/lib_gtk_common/bu_menu.h (revision 30944) +++ trunk/src_plugins/lib_gtk_common/bu_menu.h (revision 30945) @@ -20,7 +20,7 @@ typedef struct pcb_gtk_menu_ctx_s { GtkWidget *menu_bar; conf_hid_id_t ghid_menuconf_id; - void (*confchg_checkbox)(conf_native_t *cfg, int arr_idx); + void (*confchg_checkbox)(rnd_conf_native_t *cfg, int arr_idx); rnd_hidlib_t *hidlib; } pcb_gtk_menu_ctx_t; Index: trunk/src_plugins/lib_gtk_common/glue_common.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30944) +++ trunk/src_plugins/lib_gtk_common/glue_common.c (revision 30945) @@ -76,7 +76,7 @@ static const char *cookie_menu = "gtk hid menu"; -static void ghid_confchg_fullscreen(conf_native_t *cfg, int arr_idx) +static void ghid_confchg_fullscreen(rnd_conf_native_t *cfg, int arr_idx) { if (ghidgui->hid_active) ghid_fullscreen_apply(&ghidgui->topwin); @@ -83,18 +83,18 @@ } -void ghid_confchg_checkbox(conf_native_t *cfg, int arr_idx) +void ghid_confchg_checkbox(rnd_conf_native_t *cfg, int arr_idx) { if ((ghidgui->hid_active) && (ghidgui->hidlib != NULL)) ghid_update_toggle_flags(ghidgui->hidlib, &ghidgui->topwin, NULL); } -static void ghid_confchg_cli(conf_native_t *cfg, int arr_idx) +static void ghid_confchg_cli(rnd_conf_native_t *cfg, int arr_idx) { ghid_command_update_prompt(&ghidgui->topwin.cmd); } -static void ghid_confchg_spec_color(conf_native_t *cfg, int arr_idx) +static void ghid_confchg_spec_color(rnd_conf_native_t *cfg, int arr_idx) { if (!ghidgui->hid_active) return; @@ -105,9 +105,9 @@ -static void init_conf_watch(conf_hid_callbacks_t *cbs, const char *path, void (*func)(conf_native_t *, int)) +static void init_conf_watch(conf_hid_callbacks_t *cbs, const char *path, void (*func)(rnd_conf_native_t *, int)) { - conf_native_t *n = pcb_conf_get_field(path); + rnd_conf_native_t *n = pcb_conf_get_field(path); if (n != NULL) { memset(cbs, 0, sizeof(conf_hid_callbacks_t)); cbs->val_change_post = func; Index: trunk/src_plugins/lib_gtk_common/hid_gtk_conf.h =================================================================== --- trunk/src_plugins/lib_gtk_common/hid_gtk_conf.h (revision 30944) +++ trunk/src_plugins/lib_gtk_common/hid_gtk_conf.h (revision 30945) @@ -6,71 +6,71 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN listen; /* @usage Listen for actions on stdin. */ - CFT_STRING bg_image; /* @usage File name of an image to put into the background of the GUI canvas. The image is read via GdkPixbuf library. It can be any size, and will be automatically scaled to fit the canvas. */ + RND_CFT_BOOLEAN listen; /* @usage Listen for actions on stdin. */ + RND_CFT_STRING bg_image; /* @usage File name of an image to put into the background of the GUI canvas. The image is read via GdkPixbuf library. It can be any size, and will be automatically scaled to fit the canvas. */ - CFT_BOOLEAN compact_horizontal; /* OBSOLETE: ignored; use central appearance/compact instead */ - CFT_BOOLEAN compact_vertical; /* OBSOLETE: ignored; use central appearance/compact instead */ - CFT_INTEGER history_size; /* OBSOLETE: ignored; use plugins/lib_hid_common/cli_history/slots instead */ - CFT_INTEGER n_mode_button_columns; /* OBSOLETE: always have horizontal mode buttons */ + RND_CFT_BOOLEAN compact_horizontal; /* OBSOLETE: ignored; use central appearance/compact instead */ + RND_CFT_BOOLEAN compact_vertical; /* OBSOLETE: ignored; use central appearance/compact instead */ + RND_CFT_INTEGER history_size; /* OBSOLETE: ignored; use plugins/lib_hid_common/cli_history/slots instead */ + RND_CFT_INTEGER n_mode_button_columns; /* OBSOLETE: always have horizontal mode buttons */ const struct { - CFT_BOOLEAN enable; /* enable local grid to draw grid points only in a small radius around the crosshair - speeds up software rendering on large screens */ - CFT_INTEGER radius; /* radius, in number of grid points, around the local grid */ + RND_CFT_BOOLEAN enable; /* enable local grid to draw grid points only in a small radius around the crosshair - speeds up software rendering on large screens */ + RND_CFT_INTEGER radius; /* radius, in number of grid points, around the local grid */ } local_grid; const struct { - CFT_INTEGER min_dist_px; /* never try to draw a grid so dense that the distance between grid points is smaller than this */ - CFT_BOOLEAN sparse; /* enable drawing sparse grid: when zoomed out beyond min_dist_px draw every 2nd, 4th, 8th, etc. grid point; if disabled the grid is turned off when it'd get too dense */ + RND_CFT_INTEGER min_dist_px; /* never try to draw a grid so dense that the distance between grid points is smaller than this */ + RND_CFT_BOOLEAN sparse; /* enable drawing sparse grid: when zoomed out beyond min_dist_px draw every 2nd, 4th, 8th, etc. grid point; if disabled the grid is turned off when it'd get too dense */ } global_grid; const struct { - CFT_BOOLEAN to_design; /* OBSOLETE: use plugins/dialogs/auto_save_window_geometry/to_design instead */ - CFT_BOOLEAN to_project; /* OBSOLETE: use plugins/dialogs/auto_save_window_geometry/to_project instead */ - CFT_BOOLEAN to_user; /* OBSOLETE: use plugins/dialogs/auto_save_window_geometry/to_user instead */ + RND_CFT_BOOLEAN to_design; /* OBSOLETE: use plugins/dialogs/auto_save_window_geometry/to_design instead */ + RND_CFT_BOOLEAN to_project; /* OBSOLETE: use plugins/dialogs/auto_save_window_geometry/to_project instead */ + RND_CFT_BOOLEAN to_user; /* OBSOLETE: use plugins/dialogs/auto_save_window_geometry/to_user instead */ } auto_save_window_geometry; const struct { - CFT_INTEGER top_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER top_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER top_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER top_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER top_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER top_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER top_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER top_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER log_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER log_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER log_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER log_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER log_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER log_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER log_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER log_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER drc_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER drc_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER drc_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER drc_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER drc_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER drc_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER drc_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER drc_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER library_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER library_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER library_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER library_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER library_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER library_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER library_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER library_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER keyref_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER keyref_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER keyref_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER keyref_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER keyref_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER keyref_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER keyref_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER keyref_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER netlist_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER netlist_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER netlist_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER netlist_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER netlist_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER netlist_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER netlist_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER netlist_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER pinout_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER pinout_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER pinout_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ - CFT_INTEGER pinout_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER pinout_x; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER pinout_y; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER pinout_height; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ + RND_CFT_INTEGER pinout_width; /* OBSOLETE: use plugins/dialogs/window_geometry/ instead */ } window_geometry; const struct { - CFT_BOOLEAN transient_modal; /* modal dialogs are transient to the main window */ - CFT_BOOLEAN transient_modeless; /* modeless dialogs are transient to the main window */ - CFT_BOOLEAN auto_present; /* present (pop up to the top) new dialogs automatically */ + RND_CFT_BOOLEAN transient_modal; /* modal dialogs are transient to the main window */ + RND_CFT_BOOLEAN transient_modeless; /* modeless dialogs are transient to the main window */ + RND_CFT_BOOLEAN auto_present; /* present (pop up to the top) new dialogs automatically */ } dialog; } hid_gtk; } plugins; Index: trunk/src_plugins/lib_gtk_common/lib_gtk_config.c =================================================================== --- trunk/src_plugins/lib_gtk_common/lib_gtk_config.c (revision 30944) +++ trunk/src_plugins/lib_gtk_common/lib_gtk_config.c (revision 30945) @@ -95,7 +95,7 @@ const char **p; static int dummy_gtk_conf_init; int dirty[CFR_max_real] = {0}; - conf_role_t r; + rnd_conf_role_t r; ghid_conf_id = pcb_conf_hid_reg(lib_gtk_config_cookie, NULL); @@ -105,7 +105,7 @@ /* check for legacy win geo settings */ for(p = legacy_paths; *p != NULL; p+=2) { - conf_native_t *nat; + rnd_conf_native_t *nat; char *end, dirname[128]; pcb_conf_update(p[0], -1); @@ -123,7 +123,7 @@ assert(end != NULL); *end = '\0'; if (pcb_conf_get_field(p[1]) == NULL) - pcb_conf_reg_field_(&dummy_gtk_conf_init, 1, CFN_INTEGER, p[1], "", 0); + pcb_conf_reg_field_(&dummy_gtk_conf_init, 1, RND_CFN_INTEGER, p[1], "", 0); r = pcb_conf_lookup_role(nat->prop->src); pcb_conf_setf(r, p[1], -1, "%d", nat->val.integer[0]); dirty[r] = 1; Index: trunk/src_plugins/lib_gtk_common/pcb_gtk.h =================================================================== --- trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30944) +++ trunk/src_plugins/lib_gtk_common/pcb_gtk.h (revision 30945) @@ -70,7 +70,7 @@ rnd_bool (*map_color)(const rnd_color_t *inclr, pcb_gtk_color_t *color); const gchar *(*get_color_name)(pcb_gtk_color_t *color); - void (*set_special_colors)(conf_native_t *cfg); + void (*set_special_colors)(rnd_conf_native_t *cfg); void (*draw_pixmap)(rnd_hidlib_t *hidlib, pcb_gtk_pixmap_t *gpm, rnd_coord_t ox, rnd_coord_t oy, rnd_coord_t dw, rnd_coord_t dh); }; Index: trunk/src_plugins/lib_hid_common/dialogs_conf.h =================================================================== --- trunk/src_plugins/lib_hid_common/dialogs_conf.h (revision 30944) +++ trunk/src_plugins/lib_hid_common/dialogs_conf.h (revision 30945) @@ -10,30 +10,30 @@ const struct { const struct { const struct { - CFT_BOOLEAN to_design; - CFT_BOOLEAN to_project; - CFT_BOOLEAN to_user; + RND_CFT_BOOLEAN to_design; + RND_CFT_BOOLEAN to_project; + RND_CFT_BOOLEAN to_user; } auto_save_window_geometry; const struct { const struct { - CFT_INTEGER x; - CFT_INTEGER y; - CFT_INTEGER width; - CFT_INTEGER height; + RND_CFT_INTEGER x; + RND_CFT_INTEGER y; + RND_CFT_INTEGER width; + RND_CFT_INTEGER height; } example_template; } window_geometry; const struct { - CFT_BOOLEAN save_as_format_guess; /* enable format guessing by default in the 'save as' dialog */ + RND_CFT_BOOLEAN save_as_format_guess; /* enable format guessing by default in the 'save as' dialog */ } file_select_dialog; const struct { - CFT_BOOLEAN dont_ask; /* don't ever ask, just go ahead and overwrite existing files */ + RND_CFT_BOOLEAN dont_ask; /* don't ever ask, just go ahead and overwrite existing files */ } file_overwrite_dialog; } dialogs; const struct { const struct { - CFT_STRING file; /* Path to the history file (empty/unset means history is not preserved) */ - CFT_INTEGER slots; /* Number of commands to store in the history */ + RND_CFT_STRING file; /* Path to the history file (empty/unset means history is not preserved) */ + RND_CFT_INTEGER slots; /* Number of commands to store in the history */ } cli_history; } lib_hid_common; Index: trunk/src_plugins/lib_hid_common/grid_menu.c =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30944) +++ trunk/src_plugins/lib_hid_common/grid_menu.c (revision 30945) @@ -37,11 +37,11 @@ #define ANCH "@grid" -static pcb_conf_resolve_t grids_idx = {"editor.grids_idx", CFN_INTEGER, 0, NULL}; +static pcb_conf_resolve_t grids_idx = {"editor.grids_idx", RND_CFN_INTEGER, 0, NULL}; static void grid_install_menu(void *ctx, pcb_hid_cfg_t *cfg, lht_node_t *node, char *path) { - conf_native_t *nat; + rnd_conf_native_t *nat; pcb_conflist_t *lst; pcb_conf_listitem_t *li; char *end = path + strlen(path); @@ -53,7 +53,7 @@ if (nat == NULL) return; - if (nat->type != CFN_LIST) { + if (nat->type != RND_CFN_LIST) { rnd_message(PCB_MSG_ERROR, "grid_install_menu(): conf node editor/grids should be a list\n"); return; } @@ -92,7 +92,7 @@ static int grid_lock = 0; -void pcb_grid_update_conf(conf_native_t *cfg, int arr_idx) +void pcb_grid_update_conf(rnd_conf_native_t *cfg, int arr_idx) { if (grid_lock) return; grid_lock++; Index: trunk/src_plugins/lib_hid_common/grid_menu.h =================================================================== --- trunk/src_plugins/lib_hid_common/grid_menu.h (revision 30944) +++ trunk/src_plugins/lib_hid_common/grid_menu.h (revision 30945) @@ -1,5 +1,5 @@ #include #include -void pcb_grid_update_conf(conf_native_t *cfg, int arr_idx); +void pcb_grid_update_conf(rnd_conf_native_t *cfg, int arr_idx); void pcb_grid_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); Index: trunk/src_plugins/lib_hid_common/lib_hid_common.c =================================================================== --- trunk/src_plugins/lib_hid_common/lib_hid_common.c (revision 30944) +++ trunk/src_plugins/lib_hid_common/lib_hid_common.c (revision 30945) @@ -54,7 +54,7 @@ static const char *wplc_cookie = "lib_hid_common/window_placement"; extern void pcb_dad_spin_update_global_coords(void); -static void grid_unit_chg_ev(conf_native_t *cfg, int arr_idx) +static void grid_unit_chg_ev(rnd_conf_native_t *cfg, int arr_idx) { pcb_dad_spin_update_global_coords(); } @@ -110,7 +110,7 @@ int pplg_init_lib_hid_common(void) { static conf_hid_callbacks_t ccb, ccbu; - conf_native_t *nat; + rnd_conf_native_t *nat; PCB_API_CHK_VER; #define conf_reg(field,isarray,type_name,cpath,cname,desc,flags) \ Index: trunk/src_plugins/lib_hid_common/menu_helper.c =================================================================== --- trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30944) +++ trunk/src_plugins/lib_hid_common/menu_helper.c (revision 30945) @@ -50,10 +50,10 @@ cp = strchr(name, '('); if (cp == NULL) { - conf_native_t *n = pcb_conf_get_field(name); + rnd_conf_native_t *n = pcb_conf_get_field(name); if (n == NULL) return -1; - if ((n->type != CFN_BOOLEAN) || (n->used != 1)) + if ((n->type != RND_CFN_BOOLEAN) || (n->used != 1)) return -1; return n->val.boolean[0]; } Index: trunk/src_plugins/lib_hid_common/place.c =================================================================== --- trunk/src_plugins/lib_hid_common/place.c (revision 30944) +++ trunk/src_plugins/lib_hid_common/place.c (revision 30945) @@ -117,23 +117,23 @@ return s; } -static void place_conf_set(conf_role_t role, const char *path, int val) +static void place_conf_set(rnd_conf_role_t role, const char *path, int val) { static int dummy; if (pcb_conf_get_field(path) == NULL) - pcb_conf_reg_field_(&dummy, 1, CFN_INTEGER, str_cleanup_later(path), "", 0); + pcb_conf_reg_field_(&dummy, 1, RND_CFN_INTEGER, str_cleanup_later(path), "", 0); pcb_conf_setf(role, path, -1, "%d", val); } -static void place_conf_load(conf_role_t role, const char *path, int *val) +static void place_conf_load(rnd_conf_role_t role, const char *path, int *val) { - conf_native_t *nat = pcb_conf_get_field(path); - conf_role_t crole; + rnd_conf_native_t *nat = pcb_conf_get_field(path); + rnd_conf_role_t crole; static int dummy; if (pcb_conf_get_field(path) == NULL) { - pcb_conf_reg_field_(&dummy, 1, CFN_INTEGER, str_cleanup_later(path), "", 0); + pcb_conf_reg_field_(&dummy, 1, RND_CFN_INTEGER, str_cleanup_later(path), "", 0); pcb_conf_update(path, -1); } @@ -159,7 +159,7 @@ } #define BASEPATH "plugins/dialogs/window_geometry/" -void pcb_wplc_load(conf_role_t role) +void pcb_wplc_load(rnd_conf_role_t role) { char *end, *end2, path[128 + sizeof(BASEPATH)]; lht_node_t *nd, *root; @@ -195,7 +195,7 @@ } -static void place_maybe_save(rnd_hidlib_t *hidlib, conf_role_t role, int force) +static void place_maybe_save(rnd_hidlib_t *hidlib, rnd_conf_role_t role, int force) { htsw_entry_t *e; char path[128 + sizeof(BASEPATH)]; @@ -247,7 +247,7 @@ pcb_wplc_load(CFR_DESIGN); } -void pcb_wplc_save_to_role(rnd_hidlib_t *hidlib, conf_role_t role) +void pcb_wplc_save_to_role(rnd_hidlib_t *hidlib, rnd_conf_role_t role) { place_maybe_save(hidlib, role, 1); } Index: trunk/src_plugins/lib_hid_common/place.h =================================================================== --- trunk/src_plugins/lib_hid_common/place.h (revision 30944) +++ trunk/src_plugins/lib_hid_common/place.h (revision 30945) @@ -1,5 +1,5 @@ #include -void pcb_wplc_load(conf_role_t role); +void pcb_wplc_load(rnd_conf_role_t role); /*** for internal use ***/ Index: trunk/src_plugins/lib_hid_common/toolbar.c =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.c (revision 30944) +++ trunk/src_plugins/lib_hid_common/toolbar.c (revision 30945) @@ -201,7 +201,7 @@ } } -void pcb_toolbar_update_conf(conf_native_t *cfg, int arr_idx) +void pcb_toolbar_update_conf(rnd_conf_native_t *cfg, int arr_idx) { toolbar_pcb2dlg(); } @@ -210,10 +210,10 @@ static const char *toolbar_cookie = "lib_hid_pcbui/toolbar"; -static conf_hid_id_t install_events(const char *cookie, const char *paths[], conf_hid_callbacks_t cb[], void (*update_cb)(conf_native_t*,int)) +static conf_hid_id_t install_events(const char *cookie, const char *paths[], conf_hid_callbacks_t cb[], void (*update_cb)(rnd_conf_native_t*,int)) { const char **rp; - conf_native_t *nat; + rnd_conf_native_t *nat; int n; conf_hid_id_t conf_id; Index: trunk/src_plugins/lib_hid_common/toolbar.h =================================================================== --- trunk/src_plugins/lib_hid_common/toolbar.h (revision 30944) +++ trunk/src_plugins/lib_hid_common/toolbar.h (revision 30945) @@ -9,6 +9,6 @@ /* Alternatively, the caller can bind these */ void pcb_toolbar_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); void pcb_toolbar_reg_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_toolbar_update_conf(conf_native_t *cfg, int arr_idx); +void pcb_toolbar_update_conf(rnd_conf_native_t *cfg, int arr_idx); Index: trunk/src_plugins/lib_hid_pcbui/infobar.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/infobar.c (revision 30944) +++ trunk/src_plugins/lib_hid_pcbui/infobar.c (revision 30945) @@ -67,7 +67,7 @@ } } -static void pcb_infobar_update_conf(conf_native_t *cfg, int arr_idx) +static void pcb_infobar_update_conf(rnd_conf_native_t *cfg, int arr_idx) { if ((!infobar_gui_inited) || (last_interval == conf_core.rc.file_changed_interval)) return; Index: trunk/src_plugins/lib_hid_pcbui/lib_hid_pcbui.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/lib_hid_pcbui.c (revision 30944) +++ trunk/src_plugins/lib_hid_pcbui/lib_hid_pcbui.c (revision 30945) @@ -93,10 +93,10 @@ rnd_toolbar_uninit(); } -static conf_hid_id_t install_events(const char *cookie, const char *paths[], conf_hid_callbacks_t cb[], void (*update_cb)(conf_native_t*,int)) +static conf_hid_id_t install_events(const char *cookie, const char *paths[], conf_hid_callbacks_t cb[], void (*update_cb)(rnd_conf_native_t*,int)) { const char **rp; - conf_native_t *nat; + rnd_conf_native_t *nat; int n; conf_hid_id_t conf_id; Index: trunk/src_plugins/lib_hid_pcbui/routest.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30944) +++ trunk/src_plugins/lib_hid_pcbui/routest.c (revision 30945) @@ -216,7 +216,7 @@ rst_update(); } -void pcb_rst_update_conf(conf_native_t *cfg, int arr_idx) +void pcb_rst_update_conf(rnd_conf_native_t *cfg, int arr_idx) { if ((PCB != NULL) && (pcb_gui != NULL)) { if (pcb_gui->update_menu_checkbox != NULL) Index: trunk/src_plugins/lib_hid_pcbui/routest.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/routest.h (revision 30944) +++ trunk/src_plugins/lib_hid_pcbui/routest.h (revision 30945) @@ -4,7 +4,7 @@ void pcb_rst_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); void pcb_rst_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_rst_update_conf(conf_native_t *cfg, int arr_idx); +void pcb_rst_update_conf(rnd_conf_native_t *cfg, int arr_idx); extern const char pcb_acts_AdjustStyle[]; Index: trunk/src_plugins/lib_hid_pcbui/status.c =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.c (revision 30944) +++ trunk/src_plugins/lib_hid_pcbui/status.c (revision 30945) @@ -319,12 +319,12 @@ } } -void pcb_status_st_update_conf(conf_native_t *cfg, int arr_idx) +void pcb_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx) { status_st_pcb2dlg(); } -void pcb_status_rd_update_conf(conf_native_t *cfg, int arr_idx) +void pcb_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx) { status_rd_pcb2dlg(); } Index: trunk/src_plugins/lib_hid_pcbui/status.h =================================================================== --- trunk/src_plugins/lib_hid_pcbui/status.h (revision 30944) +++ trunk/src_plugins/lib_hid_pcbui/status.h (revision 30945) @@ -3,8 +3,8 @@ #include void pcb_status_gui_init_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); -void pcb_status_st_update_conf(conf_native_t *cfg, int arr_idx); -void pcb_status_rd_update_conf(conf_native_t *cfg, int arr_idx); +void pcb_status_st_update_conf(rnd_conf_native_t *cfg, int arr_idx); +void pcb_status_rd_update_conf(rnd_conf_native_t *cfg, int arr_idx); void pcb_status_st_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); void pcb_status_rd_update_ev(rnd_hidlib_t *hidlib, void *user_data, int argc, pcb_event_arg_t argv[]); Index: trunk/src_plugins/lib_vfs/lib_vfs.c =================================================================== --- trunk/src_plugins/lib_vfs/lib_vfs.c (revision 30944) +++ trunk/src_plugins/lib_vfs/lib_vfs.c (revision 30945) @@ -508,7 +508,7 @@ static int vfs_access_conf(pcb_board_t *pcb, const char *path, gds_t *buff, int wr, int *isdir) { - conf_native_t *nat = pcb_conf_get_field(path); + rnd_conf_native_t *nat = pcb_conf_get_field(path); if (nat == NULL) { if (isdir != NULL) *isdir = 1; Index: trunk/src_plugins/mincut/rats_mincut_conf.h =================================================================== --- trunk/src_plugins/mincut/rats_mincut_conf.h (revision 30944) +++ trunk/src_plugins/mincut/rats_mincut_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN enable; /* Enable calculating mincut on shorts (rats_mincut.c) when non-zero */ + RND_CFT_BOOLEAN enable; /* Enable calculating mincut on shorts (rats_mincut.c) when non-zero */ } mincut; } plugins; } conf_mincut_t; Index: trunk/src_plugins/oldactions/oldactions.c =================================================================== --- trunk/src_plugins/oldactions/oldactions.c (revision 30944) +++ trunk/src_plugins/oldactions/oldactions.c (revision 30945) @@ -45,14 +45,14 @@ #include #include "netlist.h" -static void conf_toggle(conf_role_t role, const char *path) +static void conf_toggle(rnd_conf_role_t role, const char *path) { - conf_native_t *n = pcb_conf_get_field(path); + rnd_conf_native_t *n = pcb_conf_get_field(path); if (n == NULL) { rnd_message(PCB_MSG_ERROR, "Error: can't find config node %s to toggle\n", path); return; } - if (n->type != CFN_BOOLEAN) { + if (n->type != RND_CFN_BOOLEAN) { rnd_message(PCB_MSG_ERROR, "Error: config node %s is not a boolean, can't toggle\n", path); return; } Index: trunk/src_plugins/order/order_conf.h =================================================================== --- trunk/src_plugins/order/order_conf.h (revision 30944) +++ trunk/src_plugins/order/order_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_STRING cache; /* path to the cache directory where order related vendor data are saved */ + RND_CFT_STRING cache; /* path to the cache directory where order related vendor data are saved */ } order; } plugins; } conf_order_t; Index: trunk/src_plugins/order_pcbway/order_pcbway_conf.h =================================================================== --- trunk/src_plugins/order_pcbway/order_pcbway_conf.h (revision 30944) +++ trunk/src_plugins/order_pcbway/order_pcbway_conf.h (revision 30945) @@ -6,9 +6,9 @@ typedef struct { const struct { const struct { - CFT_STRING api_key; - CFT_BOOLEAN verbose; /* print log messages about the web traffic the plugin does */ - CFT_INTEGER cache_update_sec; /* re-download cached vendor files if they are older than the value specified here, in sec */ + RND_CFT_STRING api_key; + RND_CFT_BOOLEAN verbose; /* print log messages about the web traffic the plugin does */ + RND_CFT_INTEGER cache_update_sec; /* re-download cached vendor files if they are older than the value specified here, in sec */ } order_pcbway; } plugins; } conf_order_pcbway_t; Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 30944) +++ trunk/src_plugins/propedit/propdlg.c (revision 30945) @@ -678,7 +678,7 @@ return 0; } -static void propdlg_unit_change(conf_native_t *cfg, int arr_idx) +static void propdlg_unit_change(rnd_conf_native_t *cfg, int arr_idx) { propdlg_t *ctx; gdl_iterator_t it; @@ -693,7 +693,7 @@ void pcb_propdlg_init(void) { static conf_hid_callbacks_t cbs; - conf_native_t *n = pcb_conf_get_field("editor/grid_unit"); + rnd_conf_native_t *n = pcb_conf_get_field("editor/grid_unit"); propdlg_conf_id = pcb_conf_hid_reg(propdlg_cookie, NULL); if (n != NULL) { Index: trunk/src_plugins/query/fnc_glue.c =================================================================== --- trunk/src_plugins/query/fnc_glue.c (revision 30944) +++ trunk/src_plugins/query/fnc_glue.c (revision 30945) @@ -208,7 +208,7 @@ static int fnc_getconf(pcb_qry_exec_t *ectx, int argc, pcb_qry_val_t *argv, pcb_qry_val_t *res) { - conf_native_t *nat; + rnd_conf_native_t *nat; if (argc != 1) return -1; @@ -220,15 +220,15 @@ PCB_QRY_RET_INV(res); switch(nat->type) { - case CFN_STRING: PCB_QRY_RET_STR(res, nat->val.string[0]); - case CFN_BOOLEAN: PCB_QRY_RET_INT(res, nat->val.boolean[0]); - case CFN_INTEGER: PCB_QRY_RET_INT(res, nat->val.integer[0]); - case CFN_REAL: PCB_QRY_RET_DBL(res, nat->val.real[0]); - case CFN_COORD: PCB_QRY_RET_COORD(res, nat->val.coord[0]); + case RND_CFN_STRING: PCB_QRY_RET_STR(res, nat->val.string[0]); + case RND_CFN_BOOLEAN: PCB_QRY_RET_INT(res, nat->val.boolean[0]); + case RND_CFN_INTEGER: PCB_QRY_RET_INT(res, nat->val.integer[0]); + case RND_CFN_REAL: PCB_QRY_RET_DBL(res, nat->val.real[0]); + case RND_CFN_COORD: PCB_QRY_RET_COORD(res, nat->val.coord[0]); - case CFN_COLOR: PCB_QRY_RET_STR(res, nat->val.color[0].str); + case RND_CFN_COLOR: PCB_QRY_RET_STR(res, nat->val.color[0].str); - case CFN_UNIT: + case RND_CFN_UNIT: if (nat->val.unit[0] == NULL) PCB_QRY_RET_INV(res); else @@ -235,9 +235,9 @@ PCB_QRY_RET_STR(res, nat->val.unit[0]->suffix); break; - case CFN_LIST: - case CFN_HLIST: - case CFN_max: + case RND_CFN_LIST: + case RND_CFN_HLIST: + case RND_CFN_max: PCB_QRY_RET_INV(res); } return 0; Index: trunk/src_plugins/report/report_conf.h =================================================================== --- trunk/src_plugins/report/report_conf.h (revision 30944) +++ trunk/src_plugins/report/report_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_INTEGER columns; /* @usage number of columns for found pin report */ + RND_CFT_INTEGER columns; /* @usage number of columns for found pin report */ } report; } plugins; } conf_report_t; Index: trunk/src_plugins/rubberband_orig/rubberband_conf.h =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband_conf.h (revision 30944) +++ trunk/src_plugins/rubberband_orig/rubberband_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN enable_rubberband_arcs; /* TODO: Enable to allow attached arcs to rubberband. */ + RND_CFT_BOOLEAN enable_rubberband_arcs; /* TODO: Enable to allow attached arcs to rubberband. */ } rubberband_orig; } plugins; } conf_rubberband_orig_t; Index: trunk/src_plugins/serpentine/serpentine_conf.h =================================================================== --- trunk/src_plugins/serpentine/serpentine_conf.h (revision 30944) +++ trunk/src_plugins/serpentine/serpentine_conf.h (revision 30945) @@ -6,8 +6,8 @@ typedef struct { const struct plugins { const struct serpentine { - CFT_REAL pitch; /* This value multiplied by the line width gives the serpentine pitch */ - CFT_BOOLEAN show_length; /* If true, show the length gained by adding the serpentine to an existing line */ + RND_CFT_REAL pitch; /* This value multiplied by the line width gives the serpentine pitch */ + RND_CFT_BOOLEAN show_length; /* If true, show the length gained by adding the serpentine to an existing line */ } serpentine; } plugins; } conf_serpentine_t; Index: trunk/src_plugins/stroke/stroke_conf.h =================================================================== --- trunk/src_plugins/stroke/stroke_conf.h (revision 30944) +++ trunk/src_plugins/stroke/stroke_conf.h (revision 30945) @@ -6,8 +6,8 @@ typedef struct { const struct { const struct { - CFT_LIST gestures; - CFT_BOOLEAN warn4unknown; /* Warn for unknown sequences */ + RND_CFT_LIST gestures; + RND_CFT_BOOLEAN warn4unknown; /* Warn for unknown sequences */ } stroke; } plugins; } conf_stroke_t; Index: trunk/src_plugins/vendordrill/vendor_conf.h =================================================================== --- trunk/src_plugins/vendordrill/vendor_conf.h (revision 30944) +++ trunk/src_plugins/vendordrill/vendor_conf.h (revision 30945) @@ -6,7 +6,7 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN enable; /* Enable vendor mapping */ + RND_CFT_BOOLEAN enable; /* Enable vendor mapping */ } vendor; } plugins; } conf_vendor_t; Index: trunk/tests/conf/conftest.c =================================================================== --- trunk/tests/conf/conftest.c (revision 30944) +++ trunk/tests/conf/conftest.c (revision 30945) @@ -50,23 +50,23 @@ } -void watch_pre(conf_native_t *cfg, int idx) +void watch_pre(rnd_conf_native_t *cfg, int idx) { printf("watch_pre: '%s' old value\n", cfg->hash_path); } -void watch_post(conf_native_t *cfg, int idx) +void watch_post(rnd_conf_native_t *cfg, int idx) { printf("watch_post: '%s' new value\n", cfg->hash_path); } -void notify_pre(conf_native_t *cfg, int idx) +void notify_pre(rnd_conf_native_t *cfg, int idx) { if (global_notify) printf("notify_pre: '%s' old value\n", cfg->hash_path); } -void notify_post(conf_native_t *cfg, int idx) +void notify_post(rnd_conf_native_t *cfg, int idx) { if (global_notify) printf("notify_post: '%s' new value\n", cfg->hash_path); @@ -89,7 +89,7 @@ conf_dump(stdout, "", 1, arg); } else if (strncmp(arg, "lihata", 6) == 0) { - conf_role_t role; + rnd_conf_role_t role; arg+=7; while(isspace(*arg)) arg++; role = pcb_conf_role_parse(arg); @@ -108,7 +108,7 @@ void cmd_print(char *arg) { - conf_native_t *node; + rnd_conf_native_t *node; gds_t s; if (arg == NULL) { @@ -129,7 +129,7 @@ void cmd_load(char *arg, int is_text) { char *fn; - conf_role_t role ; + rnd_conf_role_t role ; if (arg == NULL) { help:; @@ -159,7 +159,7 @@ } rnd_conf_policy_t current_policy = RND_POL_OVERWRITE; -conf_role_t current_role = CFR_DESIGN; +rnd_conf_role_t current_role = CFR_DESIGN; void cmd_policy(char *arg) { @@ -172,7 +172,7 @@ void cmd_role(char *arg) { - conf_role_t nr = pcb_conf_role_parse(arg); + rnd_conf_role_t nr = pcb_conf_role_parse(arg); if (nr == CFR_invalid) rnd_message(PCB_MSG_ERROR, "Invalid/unknown role: '%s'", arg); else @@ -258,7 +258,7 @@ void cmd_watch(char *arg, int add) { - conf_native_t *n = pcb_conf_get_field(arg); + rnd_conf_native_t *n = pcb_conf_get_field(arg); if (n == NULL) { rnd_message(PCB_MSG_ERROR, "unknown path"); return; @@ -294,7 +294,7 @@ pcb_conf_reset(n, ""); } else { - conf_role_t role = pcb_conf_role_parse(arg); + rnd_conf_role_t role = pcb_conf_role_parse(arg); if (role == CFR_invalid) { rnd_message(PCB_MSG_ERROR, "Invalid role: '%s'", arg); return; Index: trunk/tests/librnd/glue.c =================================================================== --- trunk/tests/librnd/glue.c (revision 30944) +++ trunk/tests/librnd/glue.c (revision 30945) @@ -33,7 +33,7 @@ void conf_core_init() { - pcb_conf_reg_field_(NULL, 1, CFN_COORD, "should_never_match", "dummy", 0); + pcb_conf_reg_field_(NULL, 1, RND_CFN_COORD, "should_never_match", "dummy", 0); } void pcb_hidlib_adjust_attached_objects(rnd_hidlib_t *hl) Index: trunk/util/gsch2pcb-rnd/gsch2pcb.c =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 30944) +++ trunk/util/gsch2pcb-rnd/gsch2pcb.c (revision 30945) @@ -434,12 +434,12 @@ pcb_conf_load_project(NULL, local_project_pcb_name); if (!have_cli_schematics) { /* load all schematics from the project file unless we have schematics from the cli */ - conf_native_t *nat = pcb_conf_get_field("utils/gsch2pcb_rnd/schematics"); + rnd_conf_native_t *nat = pcb_conf_get_field("utils/gsch2pcb_rnd/schematics"); if (nat != NULL) { pcb_conf_listitem_t *ci; for (ci = pcb_conflist_first(nat->val.list); ci != NULL; ci = pcb_conflist_next(ci)) { const char *p = ci->val.string[0]; - if (ci->type != CFN_STRING) + if (ci->type != RND_CFN_STRING) continue; add_schematic(p); } Index: trunk/util/gsch2pcb-rnd/gsch2pcb_rnd_conf.h =================================================================== --- trunk/util/gsch2pcb-rnd/gsch2pcb_rnd_conf.h (revision 30944) +++ trunk/util/gsch2pcb-rnd/gsch2pcb_rnd_conf.h (revision 30945) @@ -6,16 +6,16 @@ typedef struct { const struct utils { const struct gsch2pcb_rnd { - CFT_BOOLEAN remove_unfound_elements; /* = TRUE */ - CFT_BOOLEAN quiet_mode; /* = FALSE */ - CFT_INTEGER verbose; - CFT_BOOLEAN preserve; - CFT_BOOLEAN fix_elements; - CFT_STRING sch_basename; - CFT_STRING default_pcb; /* override default pcb with a given file */ - CFT_STRING empty_footprint_name; - CFT_STRING method; - CFT_LIST schematics; /* use these schematics as input */ + RND_CFT_BOOLEAN remove_unfound_elements; /* = TRUE */ + RND_CFT_BOOLEAN quiet_mode; /* = FALSE */ + RND_CFT_INTEGER verbose; + RND_CFT_BOOLEAN preserve; + RND_CFT_BOOLEAN fix_elements; + RND_CFT_STRING sch_basename; + RND_CFT_STRING default_pcb; /* override default pcb with a given file */ + RND_CFT_STRING empty_footprint_name; + RND_CFT_STRING method; + RND_CFT_LIST schematics; /* use these schematics as input */ } gsch2pcb_rnd; } utils; } conf_gsch2pcb_rnd_t;