| 161 | |
| 162 | #ifdef HAVE_NCURSES |
| 163 | static void interface_adv_ncurses(disk_t *disk, const int rewrite, list_part_t *list_part, const list_part_t *current_element, const int offset) |
| 164 | { |
| 165 | list_part_t *element; |
| 166 | int i; |
| 167 | if(rewrite!=0) |
| 168 | { |
| 169 | aff_copy(stdscr); |
| 170 | wmove(stdscr,4,0); |
| 171 | wprintw(stdscr,"%s",disk->description(disk)); |
| 172 | if(list_part!=NULL) |
| 173 | mvwaddstr(stdscr,6,0,msg_PART_HEADER_LONG); |
| 174 | } |
| 175 | for(i=0,element=list_part; element!=NULL && i<offset+INTER_ADV;element=element->next,i++) |
| 176 | { |
| 177 | if(i<offset) |
| 178 | continue; |
| 179 | wmove(stdscr,7+i-offset,0); |
| 180 | wclrtoeol(stdscr); /* before addstr for BSD compatibility */ |
| 181 | if(element==current_element) |
| 182 | { |
| 183 | wattrset(stdscr, A_REVERSE); |
| 184 | waddstr(stdscr, ">"); |
| 185 | aff_part(stdscr,AFF_PART_ORDER|AFF_PART_STATUS,disk,element->part); |
| 186 | wattroff(stdscr, A_REVERSE); |
| 187 | } else |
| 188 | { |
| 189 | waddstr(stdscr, " "); |
| 190 | aff_part(stdscr,AFF_PART_ORDER|AFF_PART_STATUS,disk,element->part); |
| 191 | } |
| 192 | } |
| 193 | wmove(stdscr,7+INTER_ADV,5); |
| 194 | wclrtoeol(stdscr); |
| 195 | if(element!=NULL) |
| 196 | wprintw(stdscr, "Next"); |
| 197 | if(current_element==NULL) |
| 198 | { |
| 199 | wmove(stdscr,7,0); |
| 200 | wattrset(stdscr, A_REVERSE); |
| 201 | wprintw(stdscr,"No partition available."); |
| 202 | wattroff(stdscr, A_REVERSE); |
| 203 | } |
| 204 | } |
| 205 | #endif |
| 206 | |
| 207 | static int adv_string_to_command(char**current_cmd, list_part_t **current_element, list_part_t *list_part) |
no test coverage detected