Index: trunk/src/undo_old_str.h =================================================================== --- trunk/src/undo_old_str.h (revision 32264) +++ trunk/src/undo_old_str.h (nonexistent) @@ -1,66 +0,0 @@ -TODO("cleanup: move this back to undo_old.c") - -typedef struct { /* information about a change command */ - char *Name; -} ChangeNameType, *ChangeNameTypePtr; - -typedef struct { /* information about a move command */ - rnd_coord_t DX, DY; /* movement vector */ -} MoveType, *MoveTypePtr; - -typedef struct { - long p_subc_id; /* parent subc ID (0 if parent is not a subc) */ - int p_subc_layer; /* parent subc layer index, for layer objects */ -} Removed; - -typedef struct { /* information about removed polygon points */ - rnd_coord_t X, Y; /* data */ - int ID; - rnd_cardinal_t Index; /* index in a polygons array of points */ - rnd_bool last_in_contour; /* Whether the point was the last in its contour */ -} RemovedPointType, *RemovedPointTypePtr; - -typedef struct { /* information about rotation */ - rnd_coord_t CenterX, CenterY; /* center of rotation */ - rnd_cardinal_t Steps; /* number of steps */ -} RotateType, *RotateTypePtr; - -typedef struct { /* information about moves between layers */ - rnd_cardinal_t OriginalLayer; /* the index of the original layer */ -} MoveToLayer; - -typedef struct { /* information about poly clear/restore */ - rnd_bool Clear; /* rnd_true was clear, rnd_false was restore */ - pcb_layer_t *Layer; -} ClearPolyType, *ClearPolyTypePtr; - -typedef struct { - rnd_angle_t angle[2]; -} AngleChangeType; - -typedef struct { /* information about netlist lib changes */ - pcb_net_t *old; - pcb_net_t *lib; -} NetlistChangeType, *NetlistChangeTypePtr; - -typedef struct { /* holds information about an operation */ - int Serial; /* serial number of operation */ - int Type; /* type of operation */ - pcb_objtype_t Kind; /* type of object with given ID */ - long int ID; /* object ID */ - union { /* some additional information */ - ChangeNameType ChangeName; - MoveType Move; - Removed Removed; - RemovedPointType RemovedPoint; - RotateType Rotate; - MoveToLayer MoveToLayer; - pcb_flag_t Flags; - rnd_coord_t Size; - ClearPolyType ClearPoly; - NetlistChangeType NetlistChange; - long int CopyID; - AngleChangeType AngleChange; - rnd_angle_t Angle; - } Data; -} UndoListType, *UndoListTypePtr; Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 32264) +++ trunk/src/Makefile.dep (revision 32265) @@ -10387,7 +10387,7 @@ librnd/core/compat_misc.h search.h undo.h undo_old.h flag_str.h \ conf_core.h librnd/core/conf.h librnd/core/rnd_printf.h \ ../src_3rd/liblihata/lihata.h librnd/core/list_conf.h netlist.h \ - obj_poly_draw.h obj_term.h brave.h undo_old_str.h + obj_poly_draw.h obj_term.h brave.h view.o: view.c ../config.h librnd/config.h idpath.h \ ../src_3rd/genlist/gendlist.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ Index: trunk/src/undo_old.c =================================================================== --- trunk/src/undo_old.c (revision 32264) +++ trunk/src/undo_old.c (revision 32265) @@ -75,8 +75,77 @@ #define Locked pcb_undoing() -#include "undo_old_str.h" +/*** undo_old_str ***/ +typedef struct { /* information about a change command */ + char *Name; +} ChangeNameType, *ChangeNameTypePtr; + +typedef struct { /* information about a move command */ + rnd_coord_t DX, DY; /* movement vector */ +} MoveType, *MoveTypePtr; + +typedef struct { + long p_subc_id; /* parent subc ID (0 if parent is not a subc) */ + int p_subc_layer; /* parent subc layer index, for layer objects */ +} Removed; + +typedef struct { /* information about removed polygon points */ + rnd_coord_t X, Y; /* data */ + int ID; + rnd_cardinal_t Index; /* index in a polygons array of points */ + rnd_bool last_in_contour; /* Whether the point was the last in its contour */ +} RemovedPointType, *RemovedPointTypePtr; + +typedef struct { /* information about rotation */ + rnd_coord_t CenterX, CenterY; /* center of rotation */ + rnd_cardinal_t Steps; /* number of steps */ +} RotateType, *RotateTypePtr; + +typedef struct { /* information about moves between layers */ + rnd_cardinal_t OriginalLayer; /* the index of the original layer */ +} MoveToLayer; + +typedef struct { /* information about poly clear/restore */ + rnd_bool Clear; /* rnd_true was clear, rnd_false was restore */ + pcb_layer_t *Layer; +} ClearPolyType, *ClearPolyTypePtr; + +typedef struct { + rnd_angle_t angle[2]; +} AngleChangeType; + +typedef struct { /* information about netlist lib changes */ + pcb_net_t *old; + pcb_net_t *lib; +} NetlistChangeType, *NetlistChangeTypePtr; + +typedef struct { /* holds information about an operation */ + int Serial; /* serial number of operation */ + int Type; /* type of operation */ + pcb_objtype_t Kind; /* type of object with given ID */ + long int ID; /* object ID */ + union { /* some additional information */ + ChangeNameType ChangeName; + MoveType Move; + Removed Removed; + RemovedPointType RemovedPoint; + RotateType Rotate; + MoveToLayer MoveToLayer; + pcb_flag_t Flags; + rnd_coord_t Size; + ClearPolyType ClearPoly; + NetlistChangeType NetlistChange; + long int CopyID; + AngleChangeType AngleChange; + rnd_angle_t Angle; + } Data; +} UndoListType, *UndoListTypePtr; + + +/*** undo_old */ + + #define DRAW_FLAGS (PCB_FLAG_RAT | PCB_FLAG_SELECTED | PCB_FLAG_HIDENAME | PCB_FLAG_HOLE | PCB_FLAG_OCTAGON | PCB_FLAG_FOUND | PCB_FLAG_CLEARLINE | PCB_FLAG_CLEARPOLY | PCB_FLAG_CLEARPOLYPOLY) #define CLIP_FLAGS (PCB_FLAG_CLEARLINE | PCB_FLAG_CLEARPOLY | PCB_FLAG_CLEARPOLYPOLY)