MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / copy_progress

Function copy_progress

src/dirn.c:59–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57#define MAX_DIR_NBR 256
58
59static int copy_progress(WINDOW *window, const unsigned int copy_ok, const unsigned int copy_bad)
60{
61 static time_t prev_time=0;
62 const time_t tmp=time(NULL);
63 if(tmp!=prev_time)
64 {
65 prev_time=tmp;
66 wmove(window,5,0);
67 wclrtoeol(window);
68 if(has_colors())
69 {
70 if(copy_bad > 0)
71 wbkgdset(window,' ' | A_BOLD | COLOR_PAIR(1));
72 else
73 wbkgdset(window,' ' | A_BOLD | COLOR_PAIR(2));
74 }
75 wprintw(window,"Copying, please wait... %u ok, %u failed", copy_ok, copy_bad);
76 if(has_colors())
77 wbkgdset(window,' ' | COLOR_PAIR(0));
78 wrefresh(window);
79 }
80 return check_enter_key_or_s(window);
81}
82
83static void copy_done(WINDOW *window, const unsigned int copy_ok, const unsigned int copy_bad, const copy_dir_t copy_stopped)
84{

Callers 3

dir_aff_ncursesFunction · 0.85
copy_dirFunction · 0.85
copy_selectionFunction · 0.85

Calls 1

check_enter_key_or_sFunction · 0.85

Tested by

no test coverage detected