Changeset 59 in MondoRescue for trunk/mondo/mondo/common/newt-specific.c
- Timestamp:
- Oct 11, 2005, 1:34:31 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/newt-specific.c
r58 r59 112 112 * @return TRUE for yes; FALSE for no. 113 113 */ 114 114 bool ask_me_yes_or_no(char *prompt) { 115 115 116 116 /*@ buffers ********************************************************** */ … … 119 119 size_t n = 0; 120 120 121 assert_string_is_neither_NULL_nor_zerolength(prompt);121 assert_string_is_neither_NULL_nor_zerolength(prompt); 122 122 123 123 if (g_text_mode) { … … 221 221 * Close the currently opened progress form. 222 222 */ 223 void224 close_progress_form() {225 if (g_text_mode) {226 return;227 }228 if (g_current_progress == -999) {229 log_msg(2,230 "Trying to close the progress form when it ain't open!");231 return;232 }233 g_current_progress = g_maximum_progress;234 update_progress_form("Complete");235 sleep(1);236 if (g_text_mode) {237 log_msg(2, "Closing progress form");238 return;239 }240 newtPopHelpLine();241 newtFormDestroy(g_progressForm);242 newtPopWindow();243 g_progressForm = NULL;244 g_current_progress = -999;245 }223 void 224 close_progress_form() { 225 if (g_text_mode) { 226 return; 227 } 228 if (g_current_progress == -999) { 229 log_msg(2, 230 "Trying to close the progress form when it ain't open!"); 231 return; 232 } 233 g_current_progress = g_maximum_progress; 234 update_progress_form("Complete"); 235 sleep(1); 236 if (g_text_mode) { 237 log_msg(2, "Closing progress form"); 238 return; 239 } 240 newtPopHelpLine(); 241 newtFormDestroy(g_progressForm); 242 newtPopWindow(); 243 g_progressForm = NULL; 244 g_current_progress = -999; 245 } 246 246 247 247 … … 422 422 } 423 423 if (grep_for_me[0] != '\0') { 424 asprintf(&command, "cat %s | grep \"%s\" | tail -n%d", filename,425 grep_for_me, g_noof_log_lines);424 asprintf(&command, "cat %s | grep \"%s\" | tail -n%d", 425 filename, grep_for_me, g_noof_log_lines); 426 426 } else { 427 427 asprintf(&command, "cat %s | tail -n%d", filename, 428 g_noof_log_lines);428 g_noof_log_lines); 429 429 } 430 430 fin = popen(command, "r"); … … 1202 1202 static char *possible_responses[] = 1203 1203 { "none", "cdr", "cdrw", "dvd", "tape", "cdstream", "udev", 1204 "nfs", "iso", NULL }; 1204 "nfs", "iso", NULL 1205 }; 1205 1206 char *outstr; 1206 1207 t_bkptype backup_type;
Note:
See TracChangeset
for help on using the changeset viewer.