Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4921) +++ trunk/doc-rnd/hacking/renames (revision 4922) @@ -484,3 +484,7 @@ RemoveFreeElement -> pcb_element_free FreeElementMemory -> pcb_element_free_fields GetElementLineMemory -> pcb_element_line_new +GetLineMemory -> pcb_line_new +RemoveFreeLine -> pcb_line_free +CreateNewLineOnLayer -> pcb_line_new_on_layer +CreateDrawnLineOnLayer -> pcb_line_new_on_layer_merge Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4921) +++ trunk/src/action_helper.c (revision 4922) @@ -796,7 +796,7 @@ if ((Crosshair.AttachedLine.Point1.X != Crosshair.AttachedLine.Point2.X || Crosshair.AttachedLine.Point1.Y != Crosshair.AttachedLine.Point2.Y) && (line = - CreateDrawnLineOnLayer(CURRENT, + pcb_line_new_on_layer_merge(CURRENT, Crosshair.AttachedLine.Point1.X, Crosshair.AttachedLine.Point1.Y, Crosshair.AttachedLine.Point2.X, @@ -837,7 +837,7 @@ } if (conf_core.editor.line_refraction && (Note.X != Crosshair.AttachedLine.Point2.X || Note.Y != Crosshair.AttachedLine.Point2.Y) && (line = - CreateDrawnLineOnLayer(CURRENT, + pcb_line_new_on_layer_merge(CURRENT, Crosshair.AttachedLine.Point2.X, Crosshair.AttachedLine.Point2.Y, Note.X, Note.Y, Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 4921) +++ trunk/src/data.c (revision 4922) @@ -216,7 +216,7 @@ } END_LOOP; - list_map0(&layer->Line, pcb_line_t, RemoveFreeLine); + list_map0(&layer->Line, pcb_line_t, pcb_line_free); list_map0(&layer->Arc, pcb_arc_t, pcb_arc_free); list_map0(&layer->Text, pcb_text_t, RemoveFreeText); POLYGON_LOOP(layer); Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4921) +++ trunk/src/obj_elem.c (revision 4922) @@ -101,7 +101,7 @@ list_map0(&element->Pin, pcb_pin_t, RemoveFreePin); list_map0(&element->Pad, pcb_pad_t, RemoveFreePad); - list_map0(&element->Line, pcb_line_t, RemoveFreeLine); + list_map0(&element->Line, pcb_line_t, pcb_line_free); list_map0(&element->Arc, pcb_arc_t, pcb_arc_free); pcb_attribute_free(&element->Attributes); @@ -182,7 +182,7 @@ pcb_buffer_clear(Buffer); ELEMENTLINE_LOOP(element); { - CreateNewLineOnLayer(&Buffer->Data->SILKLAYER, + pcb_line_new_on_layer(&Buffer->Data->SILKLAYER, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y, line->Thickness, 0, pcb_no_flags()); if (line) line->Number = pcb_strdup_null(NAMEONPCB_NAME(element)); @@ -211,7 +211,7 @@ PAD_LOOP(element); { pcb_line_t *line; - line = CreateNewLineOnLayer(PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? slayer : clayer, + line = pcb_line_new_on_layer(PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, pad) ? slayer : clayer, pad->Point1.X, pad->Point1.Y, pad->Point2.X, pad->Point2.Y, pad->Thickness, pad->Clearance, pcb_no_flags()); if (line) Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4921) +++ trunk/src/obj_line.c (revision 4922) @@ -52,7 +52,7 @@ /**** allocation ****/ /* get next slot for a line, allocates memory if necessary */ -pcb_line_t *GetLineMemory(pcb_layer_t * layer) +pcb_line_t *pcb_line_new(pcb_layer_t * layer) { pcb_line_t *new_obj; @@ -62,7 +62,7 @@ return new_obj; } -void RemoveFreeLine(pcb_line_t * data) +void pcb_line_free(pcb_line_t * data) { linelist_remove(data); free(data); @@ -146,7 +146,7 @@ /* creates a new line on a layer and checks for overlap and extension */ -pcb_line_t *CreateDrawnLineOnLayer(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_line_t *pcb_line_new_on_layer_merge(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags) { struct line_info info; pcb_box_t search; @@ -174,7 +174,7 @@ */ if (setjmp(info.env) == 0) { r_search(Layer->line_tree, &search, NULL, line_callback, &info, NULL); - return CreateNewLineOnLayer(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); + return pcb_line_new_on_layer(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); } if ((void *) info.ans == (void *) (-1)) @@ -188,14 +188,14 @@ Y1 = info.test.Point1.Y; Y2 = info.test.Point2.Y; } - return CreateNewLineOnLayer(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); + return pcb_line_new_on_layer(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); } -pcb_line_t *CreateNewLineOnLayer(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags) +pcb_line_t *pcb_line_new_on_layer(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags) { pcb_line_t *Line; - Line = GetLineMemory(Layer); + Line = pcb_line_new(Layer); if (!Line) return (Line); Line->ID = CreateIDGet(); @@ -249,7 +249,7 @@ pcb_line_t *line; pcb_layer_t *layer = &ctx->buffer.dst->Layer[GetLayerNumber(ctx->buffer.src, Layer)]; - line = CreateNewLineOnLayer(layer, Line->Point1.X, Line->Point1.Y, + line = pcb_line_new_on_layer(layer, Line->Point1.X, Line->Point1.Y, Line->Point2.X, Line->Point2.Y, Line->Thickness, Line->Clearance, pcb_flag_mask(Line->Flags, PCB_FLAG_FOUND | ctx->buffer.extraflg)); if (line && Line->Number) @@ -377,7 +377,7 @@ { pcb_line_t *line; - line = CreateDrawnLineOnLayer(Layer, Line->Point1.X + ctx->copy.DeltaX, + line = pcb_line_new_on_layer_merge(Layer, Line->Point1.X + ctx->copy.DeltaX, Line->Point1.Y + ctx->copy.DeltaY, Line->Point2.X + ctx->copy.DeltaX, Line->Point2.Y + ctx->copy.DeltaY, Line->Thickness, Line->Clearance, pcb_flag_mask(Line->Flags, PCB_FLAG_FOUND)); @@ -543,7 +543,7 @@ r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); free(Line->Number); - RemoveFreeLine(Line); + pcb_line_free(Line); return NULL; } @@ -693,7 +693,7 @@ /* we must create after playing with Line since creation may * invalidate the line pointer */ - if ((line = CreateDrawnLineOnLayer(Layer, ctx->insert.x, ctx->insert.y, X, Y, Line->Thickness, Line->Clearance, Line->Flags))) { + if ((line = pcb_line_new_on_layer_merge(Layer, ctx->insert.x, ctx->insert.y, X, Y, Line->Thickness, Line->Clearance, Line->Flags))) { AddObjectToCreateUndoList(PCB_TYPE_LINE, Layer, line, line); DrawLine(Layer, line); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, Layer, line); Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 4921) +++ trunk/src/obj_line.h (revision 4922) @@ -46,11 +46,11 @@ } pcb_attached_line_t; -pcb_line_t *GetLineMemory(pcb_layer_t * layer); -void RemoveFreeLine(pcb_line_t * data); +pcb_line_t *pcb_line_new(pcb_layer_t * layer); +void pcb_line_free(pcb_line_t * data); -pcb_line_t *CreateDrawnLineOnLayer(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags); -pcb_line_t *CreateNewLineOnLayer(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags); +pcb_line_t *pcb_line_new_on_layer_merge(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags); +pcb_line_t *pcb_line_new_on_layer(pcb_layer_t *Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t Thickness, pcb_coord_t Clearance, pcb_flag_t Flags); /* Add objects without creating them or making any "sanity modifications" to them */ void pcb_add_line_on_layer(pcb_layer_t *Layer, pcb_line_t *Line); Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 4921) +++ trunk/src/obj_rat.c (revision 4922) @@ -152,7 +152,7 @@ { pcb_line_t *newone; - newone = CreateDrawnLineOnLayer(CURRENT, Rat->Point1.X, Rat->Point1.Y, + newone = pcb_line_new_on_layer_merge(CURRENT, Rat->Point1.X, Rat->Point1.Y, ctx->insert.x, ctx->insert.y, conf_core.design.line_thickness, 2 * conf_core.design.clearance, Rat->Flags); if (!newone) return newone; @@ -159,7 +159,7 @@ AddObjectToCreateUndoList(PCB_TYPE_LINE, CURRENT, newone, newone); EraseRat(Rat); DrawLine(CURRENT, newone); - newone = CreateDrawnLineOnLayer(CURRENT, Rat->Point2.X, Rat->Point2.Y, + newone = pcb_line_new_on_layer_merge(CURRENT, Rat->Point2.X, Rat->Point2.Y, ctx->insert.x, ctx->insert.y, conf_core.design.line_thickness, 2 * conf_core.design.clearance, Rat->Flags); if (newone) { AddObjectToCreateUndoList(PCB_TYPE_LINE, CURRENT, newone, newone); @@ -181,7 +181,7 @@ else make a via and a wire, but 0-length wire not good else as before */ - newone = CreateNewLineOnLayer(ctx->move.dst_layer, Rat->Point1.X, Rat->Point1.Y, + newone = pcb_line_new_on_layer(ctx->move.dst_layer, Rat->Point1.X, Rat->Point1.Y, Rat->Point2.X, Rat->Point2.Y, conf_core.design.line_thickness, 2 * conf_core.design.clearance, Rat->Flags); if (conf_core.editor.clear_line) conf_set_editor(clear_line, 1); Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 4921) +++ trunk/src_plugins/autoplace/autoplace.c (revision 4922) @@ -195,10 +195,10 @@ pcb_cardinal_t i; pcb_layer_t *SLayer = &(PCB->Data->Layer[solder_silk_layer]); for (i = 0; i < blist->BoxN; i++) { - CreateNewLineOnLayer(SLayer, blist->Box[i].X1, blist->Box[i].Y1, blist->Box[i].X2, blist->Box[i].Y1, 1, 1, 0); - CreateNewLineOnLayer(SLayer, blist->Box[i].X1, blist->Box[i].Y2, blist->Box[i].X2, blist->Box[i].Y2, 1, 1, 0); - CreateNewLineOnLayer(SLayer, blist->Box[i].X1, blist->Box[i].Y1, blist->Box[i].X1, blist->Box[i].Y2, 1, 1, 0); - CreateNewLineOnLayer(SLayer, blist->Box[i].X2, blist->Box[i].Y1, blist->Box[i].X2, blist->Box[i].Y2, 1, 1, 0); + pcb_line_new_on_layer(SLayer, blist->Box[i].X1, blist->Box[i].Y1, blist->Box[i].X2, blist->Box[i].Y1, 1, 1, 0); + pcb_line_new_on_layer(SLayer, blist->Box[i].X1, blist->Box[i].Y2, blist->Box[i].X2, blist->Box[i].Y2, 1, 1, 0); + pcb_line_new_on_layer(SLayer, blist->Box[i].X1, blist->Box[i].Y1, blist->Box[i].X1, blist->Box[i].Y2, 1, 1, 0); + pcb_line_new_on_layer(SLayer, blist->Box[i].X2, blist->Box[i].Y1, blist->Box[i].X2, blist->Box[i].Y2, 1, 1, 0); } } #endif Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4921) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4922) @@ -1339,16 +1339,16 @@ #if 1 if (b.Y1 == b.Y2 || b.X1 == b.X2) thickness = 5; - line = CreateNewLineOnLayer(LAYER_PTR(component_silk_layer), b.X1, b.Y1, b.X2, b.Y1, thickness, 0, pcb_flag_make(0)); + line = pcb_line_new_on_layer(LAYER_PTR(component_silk_layer), b.X1, b.Y1, b.X2, b.Y1, thickness, 0, pcb_flag_make(0)); AddObjectToCreateUndoList(PCB_TYPE_LINE, LAYER_PTR(component_silk_layer), line, line); if (b.Y1 != b.Y2) { - line = CreateNewLineOnLayer(LAYER_PTR(component_silk_layer), b.X1, b.Y2, b.X2, b.Y2, thickness, 0, pcb_flag_make(0)); + line = pcb_line_new_on_layer(LAYER_PTR(component_silk_layer), b.X1, b.Y2, b.X2, b.Y2, thickness, 0, pcb_flag_make(0)); AddObjectToCreateUndoList(PCB_TYPE_LINE, LAYER_PTR(component_silk_layer), line, line); } - line = CreateNewLineOnLayer(LAYER_PTR(component_silk_layer), b.X1, b.Y1, b.X1, b.Y2, thickness, 0, pcb_flag_make(0)); + line = pcb_line_new_on_layer(LAYER_PTR(component_silk_layer), b.X1, b.Y1, b.X1, b.Y2, thickness, 0, pcb_flag_make(0)); AddObjectToCreateUndoList(PCB_TYPE_LINE, LAYER_PTR(component_silk_layer), line, line); if (b.X1 != b.X2) { - line = CreateNewLineOnLayer(LAYER_PTR(component_silk_layer), b.X2, b.Y1, b.X2, b.Y2, thickness, 0, pcb_flag_make(0)); + line = pcb_line_new_on_layer(LAYER_PTR(component_silk_layer), b.X2, b.Y1, b.X2, b.Y2, thickness, 0, pcb_flag_make(0)); AddObjectToCreateUndoList(PCB_TYPE_LINE, LAYER_PTR(component_silk_layer), line, line); } #endif @@ -2986,7 +2986,7 @@ if (conf_core.editor.live_routing) { pcb_layer_t *layer = LAYER_PTR(PCB->LayerGroups.Entries[rb->group][0]); - pcb_line_t *line = CreateNewLineOnLayer(layer, qX1, qY1, qX2, qY2, + pcb_line_t *line = pcb_line_new_on_layer(layer, qX1, qY1, qX2, qY2, 2 * qhthick, 0, pcb_flag_make(0)); rb->livedraw_obj.line = line; if (line != NULL) @@ -4470,7 +4470,7 @@ b.X2 = t; } /* using CreateDrawn instead of CreateNew concatenates sequential lines */ - p->parent.line = CreateDrawnLineOnLayer + p->parent.line = pcb_line_new_on_layer_merge (layer, b.X1, b.Y1, b.X2, b.Y2, p->style->Thick, p->style->Clearance * 2, pcb_flag_make(PCB_FLAG_AUTO | (conf_core.editor.clear_line ? PCB_FLAG_CLEARLINE : 0))); Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 4921) +++ trunk/src_plugins/djopt/djopt.c (revision 4922) @@ -451,7 +451,7 @@ pcb_layer_t *lyr = LAYER_PTR(layer); from = (char *) linelist_first(&lyr->Line); - nl = CreateNewLineOnLayer(PCB->Data->Layer + layer, x1, y1, x2, y2, thick, clear, flags); + nl = pcb_line_new_on_layer(PCB->Data->Layer + layer, x1, y1, x2, y2, thick, clear, flags); AddObjectToCreateUndoList(PCB_TYPE_LINE, lyr, nl, nl); to = (char *) linelist_first(&lyr->Line); Index: trunk/src_plugins/fontmode/fontmode.c =================================================================== --- trunk/src_plugins/fontmode/fontmode.c (revision 4921) +++ trunk/src_plugins/fontmode/fontmode.c (revision 4922) @@ -118,12 +118,12 @@ maxy = font->MaxHeight; for (l = 0; l < symbol->LineN; l++) { - CreateDrawnLineOnLayer(lfont, + pcb_line_new_on_layer_merge(lfont, symbol->Line[l].Point1.X + ox, symbol->Line[l].Point1.Y + oy, symbol->Line[l].Point2.X + ox, symbol->Line[l].Point2.Y + oy, symbol->Line[l].Thickness, symbol->Line[l].Thickness, pcb_no_flags()); - CreateDrawnLineOnLayer(lorig, symbol->Line[l].Point1.X + ox, + pcb_line_new_on_layer_merge(lorig, symbol->Line[l].Point1.X + ox, symbol->Line[l].Point1.Y + oy, symbol->Line[l].Point2.X + ox, symbol->Line[l].Point2.Y + oy, symbol->Line[l].Thickness, symbol->Line[l].Thickness, pcb_no_flags()); @@ -133,16 +133,16 @@ maxx = symbol->Line[l].Point2.X; } w = maxx + symbol->Delta + ox; - CreateDrawnLineOnLayer(lwidth, w, miny + oy, w, maxy + oy, PCB_MIL_TO_COORD(1), PCB_MIL_TO_COORD(1), pcb_no_flags()); + pcb_line_new_on_layer_merge(lwidth, w, miny + oy, w, maxy + oy, PCB_MIL_TO_COORD(1), PCB_MIL_TO_COORD(1), pcb_no_flags()); } for (l = 0; l < 16; l++) { int x = (l + 1) * CELL_SIZE; - CreateDrawnLineOnLayer(lgrid, x, 0, x, PCB->MaxHeight, PCB_MIL_TO_COORD(1), PCB_MIL_TO_COORD(1), pcb_no_flags()); + pcb_line_new_on_layer_merge(lgrid, x, 0, x, PCB->MaxHeight, PCB_MIL_TO_COORD(1), PCB_MIL_TO_COORD(1), pcb_no_flags()); } for (l = 0; l <= MAX_FONTPOSITION / 16 + 1; l++) { int y = (l + 1) * CELL_SIZE; - CreateDrawnLineOnLayer(lgrid, 0, y, PCB->MaxWidth, y, PCB_MIL_TO_COORD(1), PCB_MIL_TO_COORD(1), pcb_no_flags()); + pcb_line_new_on_layer_merge(lgrid, 0, y, PCB->MaxWidth, y, PCB_MIL_TO_COORD(1), PCB_MIL_TO_COORD(1), pcb_no_flags()); } return 0; } Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c (revision 4921) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c (revision 4922) @@ -70,7 +70,7 @@ { void *line; - line = CreateNewLineOnLayer (CURRENT, x1, y1, x2, y2, thickness, clearance, get_flags(flags)); + line = pcb_line_new_on_layer(CURRENT, x1, y1, x2, y2, thickness, clearance, get_flags(flags)); if (line != NULL) { AddObjectToCreateUndoList (PCB_TYPE_LINE, CURRENT, line, line); return line; Index: trunk/src_plugins/hid_gtk/ghid-propedit.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4921) +++ trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4922) @@ -335,7 +335,7 @@ PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(50), PCB_MIL_TO_COORD(10), 0, PCB_MIL_TO_COORD(20), "", pcb_no_flags()); - CreateNewLineOnLayer(preview_pcb.Data->Layer+0, + pcb_line_new_on_layer(preview_pcb.Data->Layer+0, PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(1000), PCB_MIL_TO_COORD(1300), PCB_MIL_TO_COORD(20), PCB_MIL_TO_COORD(20), pcb_flag_make(PCB_FLAG_CLEARLINE)); Index: trunk/src_plugins/import_dsn/dsn.c =================================================================== --- trunk/src_plugins/import_dsn/dsn.c (revision 4921) +++ trunk/src_plugins/import_dsn/dsn.c (revision 4922) @@ -143,7 +143,7 @@ x1 = dim1; y1 = dim2; if (x0 != 0 || y0 != 0) { - line = CreateDrawnLineOnLayer(rlayer, x0, PCB->MaxHeight - y0, + line = pcb_line_new_on_layer_merge(rlayer, x0, PCB->MaxHeight - y0, x1, PCB->MaxHeight - y1, linethick, lineclear, pcb_flag_make(PCB_FLAG_AUTO | PCB_FLAG_CLEARLINE)); ClearFromPolygon(PCB->Data, PCB_TYPE_LINE, rlayer, line); } Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 4921) +++ trunk/src_plugins/io_kicad/read.c (revision 4922) @@ -454,7 +454,7 @@ } required = BV(0) | BV(1) | BV(2) | BV(3); if ((tally & required) == required) { /* need start, end, layer, thickness at a minimum */ - CreateNewLineOnLayer( &st->PCB->Data->Layer[PCBLayer], X1, Y1, X2, Y2, Thickness, Clearance, Flags); + pcb_line_new_on_layer( &st->PCB->Data->Layer[PCBLayer], X1, Y1, X2, Y2, Thickness, Clearance, Flags); pcb_printf("\tnew gr_line on layer created\n"); return 0; } @@ -827,7 +827,7 @@ } required = BV(0) | BV(1) | BV(2) | BV(3); if ((tally & required) == required) { /* need start, end, layer, thickness at a minimum */ - CreateNewLineOnLayer( &st->PCB->Data->Layer[PCBLayer], X1, Y1, X2, Y2, Thickness, Clearance, Flags); + pcb_line_new_on_layer( &st->PCB->Data->Layer[PCBLayer], X1, Y1, X2, Y2, Thickness, Clearance, Flags); pcb_printf("\tnew segment on layer created\n"); return 0; } Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4921) +++ trunk/src_plugins/io_lihata/read.c (revision 4922) @@ -341,7 +341,7 @@ pcb_line_t *line; if (ly != NULL) - line = GetLineMemory(ly); + line = pcb_line_new(ly); else if (el != NULL) line = pcb_element_line_new(el); else Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 4921) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 4922) @@ -2253,7 +2253,7 @@ case 92: #line 947 "parse_y.y" /* yacc.c:1646 */ { - CreateNewLineOnLayer(Layer, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), + pcb_line_new_on_layer(Layer, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), (yyvsp[-1].flagtype)); } #line 2260 "parse_y.c" /* yacc.c:1646 */ @@ -2262,7 +2262,7 @@ case 93: #line 956 "parse_y.y" /* yacc.c:1646 */ { - CreateNewLineOnLayer(Layer, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), + pcb_line_new_on_layer(Layer, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), pcb_flag_old((yyvsp[-1].integer))); } #line 2269 "parse_y.c" /* yacc.c:1646 */ @@ -2273,7 +2273,7 @@ { /* eliminate old-style rat-lines */ if ((IV ((yyvsp[-1].measure)) & PCB_FLAG_RAT) == 0) - CreateNewLineOnLayer(Layer, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), + pcb_line_new_on_layer(Layer, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), 200*GROUNDPLANEFRAME, pcb_flag_old(IV ((yyvsp[-1].measure)))); } #line 2280 "parse_y.c" /* yacc.c:1646 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 4921) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 4922) @@ -945,7 +945,7 @@ /* x1, y1, x2, y2, thickness, clearance, flags */ : T_LINE '[' measure measure measure measure measure measure flags ']' { - CreateNewLineOnLayer(Layer, NU ($3), NU ($4), NU ($5), NU ($6), + pcb_line_new_on_layer(Layer, NU ($3), NU ($4), NU ($5), NU ($6), NU ($7), NU ($8), $9); } ; @@ -954,7 +954,7 @@ /* x1, y1, x2, y2, thickness, clearance, flags */ : T_LINE '(' measure measure measure measure measure measure INTEGER ')' { - CreateNewLineOnLayer(Layer, OU ($3), OU ($4), OU ($5), OU ($6), + pcb_line_new_on_layer(Layer, OU ($3), OU ($4), OU ($5), OU ($6), OU ($7), OU ($8), pcb_flag_old($9)); } ; @@ -965,7 +965,7 @@ { /* eliminate old-style rat-lines */ if ((IV ($8) & PCB_FLAG_RAT) == 0) - CreateNewLineOnLayer(Layer, OU ($3), OU ($4), OU ($5), OU ($6), OU ($7), + pcb_line_new_on_layer(Layer, OU ($3), OU ($4), OU ($5), OU ($6), OU ($7), 200*GROUNDPLANEFRAME, pcb_flag_old(IV ($8))); } ; Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4921) +++ trunk/src_plugins/jostle/jostle.c (revision 4922) @@ -273,7 +273,7 @@ { pcb_line_t *line; - line = CreateNewLineOnLayer(layer, a[0], a[1], b[0], b[1], thickness, clearance, flags); + line = pcb_line_new_on_layer(layer, a[0], a[1], b[0], b[1], thickness, clearance, flags); if (line) { AddObjectToCreateUndoList(PCB_TYPE_LINE, layer, line, line); } Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4921) +++ trunk/src_plugins/puller/puller.c (revision 4922) @@ -1625,7 +1625,7 @@ Extra *e; pcb_printf("create_line from %#mD to %#mD\n", x1, y1, x2, y2); #endif - pcb_line_t *line = CreateNewLineOnLayer(CURRENT, x1, y1, x2, y2, + pcb_line_t *line = pcb_line_new_on_layer(CURRENT, x1, y1, x2, y2, sample->Thickness, sample->Clearance, sample->Flags); AddObjectToCreateUndoList(PCB_TYPE_LINE, CURRENT, line, line); Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 4921) +++ trunk/src_plugins/toporouter/toporouter.c (revision 4922) @@ -5531,7 +5531,7 @@ { gdouble d = 0.; pcb_line_t *line; - line = CreateDrawnLineOnLayer(LAYER_PTR(layer), x0, y0, x1, y1, + line = pcb_line_new_on_layer_merge(LAYER_PTR(layer), x0, y0, x1, y1, thickness, clearance, pcb_flag_make(PCB_FLAG_AUTO | (PCB_FLAG_TEST(CLEARNEWFLAG, PCB) ? PCB_FLAG_CLEARLINE : 0))); if (line) { @@ -8205,7 +8205,7 @@ /* if (gui->shift_is_pressed ()) pcb_chg_obj_thermal(PCB_TYPE_VIA, via, via, via, PCB->ThermStyle);*/ DrawVia(via); - if ((line = CreateDrawnLineOnLayer(CURRENT, pad->Point1.X + 1., pad->Point1.Y + 1., viax + 1., viay + 1., + if ((line = pcb_line_new_on_layer_merge(CURRENT, pad->Point1.X + 1., pad->Point1.Y + 1., viax + 1., viay + 1., Settings.LineThickness, 2 * Settings.Clearance, pcb_no_flags()))) { AddObjectToCreateUndoList(PCB_TYPE_LINE, CURRENT, line, line);