Index: trunk/doc/developer/renames =================================================================== --- trunk/doc/developer/renames (revision 9331) +++ trunk/doc/developer/renames (revision 9332) @@ -1673,3 +1673,18 @@ SetSubcSquare -> pcb_subcop_set_square ChangeSubcSquare -> pcb_subcop_change_square ChgFlagSubc -> pcb_subcop_change_flag +AddTextToBuffer -> pcb_textop_add_to_buffer +MoveTextToBuffer -> pcb_textop_move_to_buffer +ChangeTextSize -> pcb_textop_change_size +ChangeTextName -> pcb_textop_change_name +ChangeTextJoin -> pcb_textop_change_join +SetTextJoin -> pcb_textop_set_join +ClrTextJoin -> pcb_textop_clear_join +CopyText -> pcb_textop_copy +MoveText -> pcb_textop_move +MoveTextToLayerLowLevel -> pcb_textop_move_to_layer_low +MoveTextToLayer -> pcb_textop_move_to_layer +DestroyText -> pcb_textop_destroy +RemoveText_op -> pcb_textop_remove +Rotate90Text -> pcb_textop_rotate90 +ChgFlagText -> pcb_textop_change_flag Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 9331) +++ trunk/src/buffer.c (revision 9332) @@ -54,7 +54,7 @@ */ static pcb_opfunc_t AddBufferFunctions = { pcb_lineop_add_to_buffer, - AddTextToBuffer, + pcb_textop_add_to_buffer, pcb_polyop_add_to_buffer, pcb_viaop_add_to_buffer, pcb_elemop_add_to_buffer, @@ -71,7 +71,7 @@ static pcb_opfunc_t MoveBufferFunctions = { pcb_lineop_move_to_buffer, - MoveTextToBuffer, + pcb_textop_move_to_buffer, pcb_polyop_move_to_buffer, pcb_viaop_move_to_buffer, pcb_elemop_move_to_buffer, @@ -633,7 +633,7 @@ PCB_END_LOOP; PCB_TEXT_LOOP(sourcelayer); { - if (CopyText(&ctx, destlayer, text)) + if (pcb_textop_copy(&ctx, destlayer, text)) changed = 1; } PCB_END_LOOP; Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 9331) +++ trunk/src/change.c (revision 9332) @@ -46,7 +46,7 @@ */ static pcb_opfunc_t ChangeSizeFunctions = { pcb_lineop_change_size, - ChangeTextSize, + pcb_textop_change_size, pcb_polyop_change_clear, pcb_viaop_change_size, pcb_elemop_change_size, /* changes silk screen line width */ @@ -63,7 +63,7 @@ static pcb_opfunc_t Change1stSizeFunctions = { pcb_lineop_change_size, - ChangeTextSize, + pcb_textop_change_size, pcb_polyop_change_clear, pcb_viaop_change_size, pcb_elemop_change_1st_size, @@ -131,7 +131,7 @@ static pcb_opfunc_t ChangeNameFunctions = { pcb_lineop_change_name, - ChangeTextName, + pcb_textop_change_name, NULL, pcb_viaop_change_name, pcb_elemop_change_name, @@ -199,7 +199,7 @@ static pcb_opfunc_t ChangeJoinFunctions = { pcb_lineop_change_join, - ChangeTextJoin, + pcb_textop_change_join, NULL, NULL, NULL, @@ -271,7 +271,7 @@ static pcb_opfunc_t SetJoinFunctions = { pcb_lineop_set_join, - SetTextJoin, + pcb_textop_set_join, NULL, NULL, NULL, @@ -322,7 +322,7 @@ static pcb_opfunc_t ClrJoinFunctions = { pcb_lineop_clear_join, - ClrTextJoin, + pcb_textop_clear_join, NULL, NULL, NULL, Index: trunk/src/copy.c =================================================================== --- trunk/src/copy.c (revision 9331) +++ trunk/src/copy.c (revision 9332) @@ -44,7 +44,7 @@ */ static pcb_opfunc_t CopyFunctions = { pcb_lineop_copy, - CopyText, + pcb_textop_copy, pcb_polyop_copy, pcb_viaop_copy, pcb_elemop_copy, Index: trunk/src/flag.c =================================================================== --- trunk/src/flag.c (revision 9331) +++ trunk/src/flag.c (revision 9332) @@ -33,7 +33,7 @@ pcb_opfunc_t ChgFlagFunctions = { pcb_lineop_change_flag, - ChgFlagText, + pcb_textop_change_flag, pcb_polyop_change_flag, NULL, NULL, Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 9331) +++ trunk/src/move.c (revision 9332) @@ -50,7 +50,7 @@ */ pcb_opfunc_t MoveFunctions = { pcb_lineop_move, - MoveText, + pcb_textop_move, pcb_polyop_move, pcb_viaop_move, pcb_elemop_move, @@ -67,7 +67,7 @@ static pcb_opfunc_t MoveToLayerFunctions = { pcb_lineop_move_to_layer, - MoveTextToLayer, + pcb_textop_move_to_layer, pcb_polyop_move_to_layer, NULL, NULL, Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 9331) +++ trunk/src/obj_text.c (revision 9332) @@ -257,7 +257,7 @@ /*** ops ***/ /* copies a text to buffer */ -void *AddTextToBuffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_add_to_buffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { pcb_layer_t *layer = &ctx->buffer.dst->Layer[pcb_layer_id(ctx->buffer.src, Layer)]; @@ -265,7 +265,7 @@ } /* moves a text to buffer without allocating memory for the name */ -void *MoveTextToBuffer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text) +void *pcb_textop_move_to_buffer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text) { pcb_layer_t *lay = &ctx->buffer.dst->Layer[pcb_layer_id(ctx->buffer.src, layer)]; @@ -286,7 +286,7 @@ } /* changes the scaling factor of a text object */ -void *ChangeTextSize(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { int value = ctx->chgsize.absolute ? PCB_COORD_TO_MIL(ctx->chgsize.absolute) : Text->Scale + PCB_COORD_TO_MIL(ctx->chgsize.delta); @@ -310,7 +310,7 @@ /* sets data of a text object and calculates bounding box; memory must have already been allocated the one for the new string is allocated */ -void *ChangeTextName(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_change_name(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { char *old = Text->TextString; @@ -330,7 +330,7 @@ } /* changes the clearance flag of a text */ -void *ChangeTextJoin(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_change_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text)) return (NULL); @@ -350,23 +350,23 @@ } /* sets the clearance flag of a text */ -void *SetTextJoin(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_set_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text) || PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Text)) return (NULL); - return ChangeTextJoin(ctx, Layer, Text); + return pcb_textop_change_join(ctx, Layer, Text); } /* clears the clearance flag of a text */ -void *ClrTextJoin(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_clear_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text) || !PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Text)) return (NULL); - return ChangeTextJoin(ctx, Layer, Text); + return pcb_textop_change_join(ctx, Layer, Text); } /* copies a text */ -void *CopyText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { pcb_text_t *text; @@ -378,7 +378,7 @@ } /* moves a text object */ -void *MoveText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); @@ -396,7 +396,7 @@ } /* moves a text object between layers; lowlevel routines */ -void *MoveTextToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination) +void *pcb_textop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Source, text); pcb_r_delete_entry(Source->text_tree, (pcb_box_t *) text); @@ -422,7 +422,7 @@ } /* moves a text object between layers */ -void *MoveTextToLayer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text) +void *pcb_textop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text) { if (PCB_FLAG_TEST(PCB_FLAG_LOCK, text)) { pcb_message(PCB_MSG_WARNING, _("Sorry, the object is locked\n")); @@ -432,7 +432,7 @@ pcb_undo_add_obj_to_move_to_layer(PCB_TYPE_TEXT, layer, text, text); if (layer->meta.real.vis) EraseText(layer, text); - text = MoveTextToLayerLowLevel(ctx, layer, text, ctx->move.dst_layer); + text = pcb_textop_move_to_layer_low(ctx, layer, text, ctx->move.dst_layer); if (ctx->move.dst_layer->meta.real.vis) DrawText(ctx->move.dst_layer, text); if (layer->meta.real.vis || ctx->move.dst_layer->meta.real.vis) @@ -442,7 +442,7 @@ } /* destroys a text from a layer */ -void *DestroyText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { free(Text->TextString); pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); @@ -453,7 +453,7 @@ } /* removes a text from a layer */ -void *RemoveText_op(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_remove(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { /* erase from screen */ if (Layer->meta.real.vis) { @@ -475,7 +475,7 @@ ctx.remove.bulk = pcb_false; ctx.remove.destroy_target = NULL; - return RemoveText_op(&ctx, Layer, Text); + return pcb_textop_remove(&ctx, Layer, Text); } /* rotates a text in 90 degree steps; only the bounding box is rotated, @@ -496,7 +496,7 @@ } /* rotates a text object and redraws it */ -void *Rotate90Text(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_rotate90(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { EraseText(Layer, Text); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); @@ -539,7 +539,7 @@ } #define PCB_TEXT_FLAGS (PCB_FLAG_FOUND | PCB_FLAG_CLEARLINE | PCB_FLAG_SELECTED | PCB_FLAG_AUTO | PCB_FLAG_LOCK | PCB_FLAG_VISIT) -void *ChgFlagText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_change_flag(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { if ((ctx->chgflag.flag & PCB_TEXT_FLAGS) != ctx->chgflag.flag) return NULL; Index: trunk/src/obj_text_op.h =================================================================== --- trunk/src/obj_text_op.h (revision 9331) +++ trunk/src/obj_text_op.h (revision 9332) @@ -28,19 +28,19 @@ #include "operation.h" -void *AddTextToBuffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *MoveTextToBuffer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text); -void *ChangeTextSize(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *ChangeTextName(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *ChangeTextJoin(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *SetTextJoin(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *ClrTextJoin(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *CopyText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *MoveText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *MoveTextToLayerLowLevel(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination); -void *MoveTextToLayer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text); -void *DestroyText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *RemoveText_op(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *Rotate90Text(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); -void *ChgFlagText(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_add_to_buffer(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_move_to_buffer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text); +void *pcb_textop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_change_name(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_change_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_set_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_clear_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination); +void *pcb_textop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text); +void *pcb_textop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_remove(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_rotate90(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_change_flag(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 9331) +++ trunk/src/remove.c (revision 9332) @@ -41,7 +41,7 @@ */ static pcb_opfunc_t RemoveFunctions = { pcb_lineop_remove, - RemoveText_op, + pcb_textop_remove, pcb_polyop_remove, pcb_viaop_remove, pcb_elemop_remove, @@ -58,7 +58,7 @@ static pcb_opfunc_t DestroyFunctions = { pcb_lineop_destroy, - DestroyText, + pcb_textop_destroy, pcb_polyop_destroy, pcb_viaop_destroy, pcb_elemop_destroy, Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 9331) +++ trunk/src/rotate.c (revision 9332) @@ -54,7 +54,7 @@ */ pcb_opfunc_t Rotate90Functions = { pcb_lineop_rotate90, - Rotate90Text, + pcb_textop_rotate90, pcb_polyop_rotate90, NULL, pcb_elemop_rotate90,