Source Code File 15-05_undump

15-05_undump.c

#include <ncurses.h>

int main()
{
    int r;

    initscr();

    addstr("Press Enter to restore the screen");
    refresh();
    getch();

/* restore the window */
    r = scr_restore("dump.win");
    if( r == ERR)
        addstr("Error reading window file");
    refresh();
    getch();

    endwin();
    return(0);
}

Output Screenshot

Notes

* The screen saved from the source code for 15-04_dumpwin.c is restored as the output.