/* File: in_memory_undo.c * * This file is part of XSCHEM, * a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit * simulation. * Copyright (C) 1998-2020 Stefan Frederik Schippers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xschem.h" #ifdef IN_MEMORY_UNDO typedef struct { char *gptr; char *vptr; char *sptr; char *kptr; char *eptr; int *lines; int *rects; int *polygons; int *arcs; int wires; int texts; int instances; xLine **lptr; xRect **bptr; xPoly **pptr; xArc **aptr; xWire *wptr; xText *tptr; xInstance *iptr; } Undo_slot; static Undo_slot uslot[MAX_UNDO]; static int initialized=0; void init_undo() { int slot; for(slot=0;slot