diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
commit | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch) | |
tree | 326578f0505cbed07cfe60de530022822dc237ac /app/bin/cundo.c | |
parent | 16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff) |
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/bin/cundo.c')
-rw-r--r-- | app/bin/cundo.c | 17 |
1 files changed, 14 insertions, 3 deletions
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 <time.h> #include <stdarg.h> #include <errno.h> +#include <string.h> + +#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; |