From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- app/bin/cundo.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'app/bin/cundo.c') diff --git a/app/bin/cundo.c b/app/bin/cundo.c index 13d7af0..e27ee75 100644 --- a/app/bin/cundo.c +++ b/app/bin/cundo.c @@ -24,9 +24,18 @@ #include #include #include +#include + +#include "cselect.h" +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "paths.h" #include "track.h" #include "trackx.h" -#include "i18n.h" +#include "cundo.h" + /***************************************************************************** * @@ -148,10 +157,11 @@ static BOOL_T UndoFail( char * cause, long val, char * fileName, int lineNumber undoStack_p us; FILE * outf; time_t clock; - char temp[STR_SIZE]; + char *temp; NoticeMessage( MSG_UNDO_ASSERT, _("Ok"), NULL, fileName, lineNumber, val, val, cause ); - sprintf( temp, "%s%s%s", workingDir, FILE_SEP_CHAR, sUndoF ); + MakeFullpath(&temp, workingDir, sUndoF, NULL); outf = fopen( temp, "a+" ); + free(temp); if ( outf == NULL ) { NoticeMessage( MSG_OPEN_FAIL, _("Ok"), NULL, _("Undo Trace"), temp, strerror(errno) ); return FALSE; @@ -361,6 +371,7 @@ static BOOL_T ReadObject( stream_p stream, BOOL_T needRedo ) tempTrk.extraData = trk->extraData; if (!ReadStream( stream, tempTrk.extraData, tempTrk.extraSize )) return FALSE; + RebuildTrackSegs(&tempTrk); //If we had an array of Segs - recreate it if (recordUndo) Rprintf( "Restore T%D(%d) @ %lx\n", trk->index, tempTrk.index, (long)trk ); tempTrk.index = trk->index; tempTrk.next = trk->next; -- cgit v1.2.3