Changeset 3188 in MondoRescue for branches/3.0/mondo/src/common/newt-specific.c
- Timestamp:
- Sep 25, 2013, 8:55:39 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/newt-specific.c
r3185 r3188 97 97 extern int g_current_media_number; 98 98 pid_t g_main_pid = 0; ///< The PID of the main Mondo process. 99 long g_maximum_progress = 999 ; ///< The maximum amount of progress (100%) for the currently opened progress form.99 long g_maximum_progress = 999L; ///< The maximum amount of progress (100%) for the currently opened progress form. 100 100 long g_current_progress = -999; ///< The current amount of progress (filelist #, etc.) for the currently opened progress form. 101 long g_start_time = 0 ; ///< The time (in seconds since the epoch) that the progress form was opened.101 long g_start_time = 0L; ///< The time (in seconds since the epoch) that the progress form was opened. 102 102 bool g_text_mode = TRUE; ///< If FALSE, use a newt interface; if TRUE, use an ugly (but more compatible) dumb terminal interface. 103 char g_xmondo_stdin[MAX_NEWT_COMMENT_LEN], ///< ... @bug Unneeded w/current XMondo.104 g_xmondo_stdout[MAX_NEWT_COMMENT_LEN]; ///< .... @bug Unneeded w/current XMondo.105 bool g_called_by_xmondo = FALSE; ///< @bug Unneeded w/current XMondo.106 103 char *g_selfmounted_isodir; ///< Holds the NETFS mountpoint if mounted via mondoarchive. 107 104 108 105 /* @} - end of globalGroup */ 109 110 //int g_fd_in=-1, g_fd_out=-1;111 106 112 107 void popup_and_OK(char *); … … 125 120 126 121 /*@ buffers ********************************************************** */ 127 int i ;128 char * p;122 int i = 0; 123 char *tmp = NULL; 129 124 130 125 assert_string_is_neither_NULL_nor_zerolength(prompt); … … 136 131 } 137 132 if (g_text_mode) { 138 139 char *tmp;140 tmp = malloc(MAX_NEWT_COMMENT_LEN);141 142 133 while (1) { 143 paranoid_system("sync"); 144 printf 145 ("---promptdialogYN---1--- %s\n---promptdialogYN---Q--- [yes] [no] ---\n--> ", 146 prompt); 147 p= fgets(tmp, MAX_NEWT_COMMENT_LEN, stdin); 148 if (!p) { 149 //FIXME 150 } 134 sync(); 135 printf("---promptdialogYN---1--- %s\n---promptdialogYN---Q--- [yes] [no] ---\n--> ", prompt); 136 mr_getline(tmp, stdin); 151 137 if (tmp[strlen(tmp) - 1] == '\n') 152 138 tmp[strlen(tmp) - 1] = '\0'; … … 157 143 } 158 144 if (strstr("yesYES", tmp)) { 159 paranoid_free(tmp);145 mr_free(tmp); 160 146 return (TRUE); 161 147 } else if (strstr("NOno", tmp)) { 162 paranoid_free(tmp);148 mr_free(tmp); 163 149 return (FALSE); 164 150 } else { 165 paranoid_system("sync"); 166 printf 167 ("Please enter either YES or NO (or yes or no, or y or n, or...)\n"); 151 sync(); 152 printf("Please enter either YES or NO (or yes or no, or y or n, or...)\n"); 168 153 } 169 154 } … … 183 168 184 169 /*@ buffer *********************************************************** */ 185 char *tmp; 186 char *p; 170 char *tmp = NULL; 187 171 int i; 188 172 … … 193 177 finish(1); 194 178 } 195 tmp = malloc(MAX_NEWT_COMMENT_LEN); 179 196 180 if (g_text_mode) { 197 paranoid_system("sync"); 198 printf 199 ("---promptdialogOKC---1--- %s\n---promptdialogOKC---Q--- [OK] [Cancel] ---\n--> ", 200 prompt); 201 p = fgets(tmp, MAX_NEWT_COMMENT_LEN, stdin); 202 if (!p) { 203 // FIXME 204 } 181 sync(); 182 printf("---promptdialogOKC---1--- %s\n---promptdialogOKC---Q--- [OK] [Cancel] ---\n--> ", prompt); 183 mr_getline(tmp, stdin); 205 184 if (tmp[strlen(tmp) - 1] == '\n') 206 185 tmp[strlen(tmp) - 1] = '\0'; … … 211 190 } 212 191 if (strstr("okOKOkYESyes", tmp)) { 213 paranoid_free(tmp);192 mr_free(tmp); 214 193 return (TRUE); 215 194 } else { 216 paranoid_free(tmp);195 mr_free(tmp); 217 196 return (FALSE); 218 197 } 219 198 } else { 220 paranoid_free(tmp);221 199 return (popup_with_buttons(prompt, " Okay ", "Cancel")); 222 200 } … … 264 242 } 265 243 if (g_current_progress == -999) { 266 log_msg(2, 267 "Trying to close the progress form when it ain't open!"); 244 log_msg(2, "Trying to close the progress form when it ain't open!"); 268 245 return; 269 246 } … … 301 278 mr_asprintf(tmp1,"kill `%s`", tmp); 302 279 run_program_and_log_output(tmp1, TRUE); 303 paranoid_free(tmp1);304 } 305 paranoid_free(tmp);280 mr_free(tmp1); 281 } 282 mr_free(tmp); 306 283 } 307 284 … … 312 289 * @note This function never returns. 313 290 */ 314 void 315 fatal_error(char *error_string) { 291 void fatal_error(char *error_string) { 292 316 293 /*@ buffers ***************************************************** */ 317 char fatalstr[MAX_NEWT_COMMENT_LEN] = 318 "-------FATAL ERROR---------"; 319 char *tmp; 320 char *command; 294 char *command = NULL; 321 295 static bool already_exiting = FALSE; 322 296 323 297 /*@ end vars **************************************************** */ 324 298 325 malloc_string(command);326 tmp = malloc(MAX_NEWT_COMMENT_LEN);327 299 set_signals(FALSE); // link to external func 328 300 g_exiting = TRUE; … … 332 304 log_msg(2, "mastermind %d is exiting", (int) getpid()); 333 305 kill(g_main_pid, SIGTERM); 334 paranoid_free(tmp);335 306 finish(1); 336 307 } … … 340 311 log_msg(2, "non-m/m %d is exiting", (int) getpid()); 341 312 kill(g_main_pid, SIGTERM); 342 paranoid_free(tmp);343 313 finish(1); 344 314 } … … 348 318 if (already_exiting) { 349 319 log_msg(3, "...I'm already exiting. Give me time, Julian!"); 350 paranoid_free(tmp);351 320 finish(1); 352 321 } … … 359 328 kill_anything_like_this("ntfsclone"); 360 329 sync(); 361 /*362 sprintf(tmp, "umount %s", g_tmpfs_mountpt);363 for (i = 0; i < 10 && run_program_and_log_output(tmp, 5); i++) {364 log_msg(2, "Waiting for child processes to terminate");365 sleep(1);366 run_program_and_log_output(tmp, 5);367 }368 */369 330 370 331 if (chdir("/")) { … … 372 333 } 373 334 if (g_selfmounted_isodir) { 374 sprintf(command, "umount -d %s", g_selfmounted_isodir);335 mr_asprintf(command, "umount -d %s", g_selfmounted_isodir); 375 336 run_program_and_log_output(command, 5); 376 sprintf(command, "rmdir %s", g_selfmounted_isodir); 337 mr_free(command); 338 mr_asprintf(command, "rmdir %s", g_selfmounted_isodir); 377 339 run_program_and_log_output(command, 5); 340 mr_free(command); 378 341 } 379 342 380 343 if (!g_text_mode) { 381 log_msg(0, fatalstr);344 log_msg(0, "-------FATAL ERROR---------"); 382 345 log_msg(0, error_string); 383 // popup_and_OK (error_string);384 newtFinished();385 346 } 386 347 387 348 printf("---FATALERROR--- %s\n", error_string); 388 printf 389 ("If you require technical support, please contact the mailing list.\n"); 349 printf("If you require technical support, please contact the mailing list.\n"); 390 350 printf("See http://www.mondorescue.org for details.\n"); 391 printf 392 ("The list's members can help you, if you attach that file to your e-mail.\n"); 351 printf("The list's members can help you, if you attach that file to your e-mail.\n"); 393 352 printf("Log file: %s\n", MONDO_LOGFILE); 394 353 printf("Mondo has aborted.\n"); … … 396 355 log_msg(3, "FYI - g_main_pid is blank"); 397 356 } 398 paranoid_free(tmp);399 paranoid_free(command);400 357 finish(254); 401 358 } … … 420 377 * @note This function never returns. 421 378 */ 422 void 423 finish(int signal) { 379 void finish(int signal) { 380 424 381 char *command = NULL; 425 426 /* if (signal==0) { popup_and_OK("Please press <enter> to quit."); } */427 428 /* newtPopHelpLine(); */429 382 430 383 /* Before removing dir, make sure we're out of them */ … … 436 389 mr_asprintf(command, "umount -d %s", g_selfmounted_isodir); 437 390 run_program_and_log_output(command, 1); 438 paranoid_free(command); 391 mr_free(command); 392 439 393 mr_asprintf(command, "rmdir %s", g_selfmounted_isodir); 440 394 run_program_and_log_output(command, 1); 441 paranoid_free(command); 442 } 395 mr_free(command); 396 } 397 if (bkpinfo->tmpdir) { 398 log_msg(8,"tempdir is %s",bkpinfo->tmpdir); 399 if (strstr(bkpinfo->tmpdir ,"mondo.tmp.") != NULL) { 400 log_msg(8,"erasing tempdir %s",bkpinfo->tmpdir); 401 mr_asprintf(command, "rm -Rf %s", bkpinfo->tmpdir); 402 paranoid_system(command); 403 mr_free(command); 404 } 405 } 406 if (bkpinfo->scratchdir) { 407 log_msg(8,"scratchdir is %s", bkpinfo->scratchdir); 408 if (strstr(bkpinfo->scratchdir ,"mondo.scratch.") != NULL) { 409 log_msg(8,"erasing scratchdir %s",bkpinfo->scratchdir); 410 mr_asprintf(command, "rm -Rf %s", bkpinfo->scratchdir); 411 paranoid_system(command); 412 mr_free(command); 413 } 414 } 415 /* Free all allocated strings in bkpinfo */ 416 mr_free(bkpinfo->netfs_user); 417 mr_free(bkpinfo->netfs_proto); 418 mr_free(bkpinfo->exclude_devs); 419 mr_free(bkpinfo->exclude_paths); 420 mr_free(bkpinfo->subdir); 421 /* Then free the structure */ 422 paranoid_free(bkpinfo); 423 424 free_libmondo_global_strings(); 425 free_newt_stuff(); 443 426 if (!g_text_mode) { 444 427 if (does_file_exist("/THIS-IS-A-RAMDISK")) { … … 452 435 printf("Execution run ended; result=%d\n", signal); 453 436 printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE); 454 if (bkpinfo->tmpdir) {455 log_msg(8,"tempdir is %s",bkpinfo->tmpdir);456 if (strstr(bkpinfo->tmpdir ,"mondo.tmp.") != NULL) {457 log_msg(8,"erasing tempdir %s",bkpinfo->tmpdir);458 mr_asprintf(command, "rm -Rf %s", bkpinfo->tmpdir);459 paranoid_system(command);460 mr_free(command);461 }462 }463 if (bkpinfo->scratchdir) {464 log_msg(8,"scratchdir is %s", bkpinfo->scratchdir);465 if (strstr(bkpinfo->scratchdir ,"mondo.scratch.") != NULL) {466 log_msg(8,"erasing scratchdir %s",bkpinfo->scratchdir);467 mr_asprintf(command, "rm -Rf %s", bkpinfo->scratchdir);468 paranoid_system(command);469 mr_free(command);470 }471 }472 /* Free all allocated strings in bkpinfo */473 mr_free(bkpinfo->netfs_user);474 mr_free(bkpinfo->netfs_proto);475 mr_free(bkpinfo->exclude_devs);476 mr_free(bkpinfo->exclude_paths);477 mr_free(bkpinfo->subdir);478 479 /* Then free the structure */480 paranoid_free(bkpinfo);481 free_libmondo_global_strings();482 free_newt_stuff();483 437 exit(signal); 484 438 } 485 486 487 488 439 489 440 … … 494 445 * @param grep_for_me If not "", then only give lines in @p filename that match this regular expression. 495 446 */ 496 void 497 log_file_end_to_screen(char *filename, char *grep_for_me) { 447 void log_file_end_to_screen(char *filename, char *grep_for_me) { 498 448 499 449 /*@ buffers ********************************************************** */ … … 515 465 } 516 466 if (grep_for_me[0] != '\0') { 517 mr_asprintf(command, "grep '%s' %s | tail -n%d", 518 grep_for_me, filename, g_noof_log_lines); 519 } else { 520 mr_asprintf(command, "tail -n%d %s", g_noof_log_lines, 521 filename); 467 mr_asprintf(command, "grep '%s' %s | tail -n%d", grep_for_me, filename, g_noof_log_lines); 468 } else { 469 mr_asprintf(command, "tail -n%d %s", g_noof_log_lines, filename); 522 470 } 523 471 fin = popen(command, "r"); … … 557 505 * @note The message is also written to the logfile. 558 506 */ 559 void 560 log_to_screen(const char *fmt, ...) { 507 void log_to_screen(const char *fmt, ...) { 561 508 562 509 /*@ int ************************************************************** */ … … 614 561 * @param output The string to write. 615 562 */ 616 void 617 mvaddstr_and_log_it(int y, int x, char *output) { 563 void mvaddstr_and_log_it(int y, int x, char *output) { 564 618 565 assert_string_is_neither_NULL_nor_zerolength(output); 619 566 log_msg(0, output); … … 633 580 * @param ttl The title to use for the evalcall form. 634 581 */ 635 void 636 open_evalcall_form(char *ttl) { 582 void open_evalcall_form(char *ttl) { 637 583 638 584 /*@ buffers ********************************************************* */ 639 char *title; 640 char *tmp; 585 char *tmp = NULL; 641 586 642 587 /*@ initialize ****************************************************** */ 643 588 g_isoform_old_progress = -1; 644 589 g_mysterious_dot_counter = 0; 645 malloc_string(title); 590 591 assert(ttl != NULL); 646 592 malloc_string(tmp); 647 648 assert(ttl != NULL); 649 strcpy(title, ttl); 650 strcpy(g_isoform_header_str, title); 651 // center_string (title, 80); 593 strcpy(g_isoform_header_str, ttl); 652 594 if (g_text_mode) { 653 log_msg(0, t itle);654 } else { 655 strcpy(tmp, t itle);595 log_msg(0, ttl); 596 } else { 597 strcpy(tmp, ttl); 656 598 center_string(tmp, 80); 657 599 newtPushHelpLine(tmp); … … 664 606 g_isoform_header = newtLabel(1, 1, g_isoform_header_str); 665 607 g_isoform_scale = newtScale(3, 3, 34, 100); 666 // newtOpenWindow (20, 6, 40, 7, title); // "Please Wait"); 667 newtCenteredWindow(40, 7, title); 608 newtCenteredWindow(40, 7, ttl); 668 609 g_isoform_main = newtForm(NULL, NULL, 0); 669 610 g_isoform_timeline = newtLabel(1, 5, " "); … … 677 618 update_evalcall_form(0); 678 619 paranoid_free(tmp); 679 paranoid_free(title);680 620 } 681 621 … … 691 631 * @param max_val The maximum amount of progress (number of filesets, etc.) 692 632 */ 693 void 694 open_progress_form(char *title, char *b1, char *b2, char *b3, 695 long max_val) { 633 void open_progress_form(char *title, char *b1, char *b2, char *b3, long max_val) { 696 634 697 635 /*@ buffers ********************************************************* */ 698 636 char *b1c; 699 char *blurb1 ;700 char *blurb2 ;701 char *blurb3 ;637 char *blurb1 = NULL; 638 char *blurb2 = NULL; 639 char *blurb3 = NULL; 702 640 703 641 /*@ initialize ****************************************************** */ … … 705 643 706 644 malloc_string(b1c); 707 malloc_string(blurb1);708 malloc_string(blurb2);709 malloc_string(blurb3);710 645 711 646 assert(title != NULL); … … 714 649 assert(b3 != NULL); 715 650 716 strcpy(blurb1, b1); 717 strcpy(blurb2, b2); 718 strcpy(blurb3, b3); 651 mr_asprintf(blurb1, "%s", b1); 652 mr_asprintf(blurb2, "%s", b2); 653 mr_asprintf(blurb3, "%s", b3); 654 719 655 strcpy(b1c, b1); 720 656 center_string(b1c, 80); … … 737 673 g_blurb2 = newtLabel(2, 2, blurb3); 738 674 g_blurb3 = newtLabel(2, 4, blurb2); 739 // newtOpenWindow (10, 4, 60, 11, title);740 675 newtCenteredWindow(60, 11, title); 741 g_scale = newtScale(3, 6, 54, g_maximum_progress);676 g_scale = newtScale(3, 6, 54, (long long)g_maximum_progress); 742 677 g_progressForm = newtForm(NULL, NULL, 0); 743 678 g_percentline = newtLabel(10, 9, " "); 744 679 g_timeline = newtLabel(10, 8, " "); 745 newtFormAddComponents(g_progressForm, g_percentline, 746 g_timeline, g_scale, g_blurb1, g_blurb3, 747 g_blurb2, NULL); 680 newtFormAddComponents(g_progressForm, g_percentline, g_timeline, g_scale, g_blurb1, g_blurb3, g_blurb2, NULL); 748 681 newtPushHelpLine(b1c); 749 682 newtDrawForm(g_progressForm); … … 752 685 update_progress_form_full(blurb1, blurb2, blurb3); 753 686 paranoid_free(b1c); 754 paranoid_free(blurb1);755 paranoid_free(blurb2);756 paranoid_free(blurb3);687 mr_free(blurb1); 688 mr_free(blurb2); 689 mr_free(blurb3); 757 690 } 758 691 … … 761 694 * @param prompt The message. 762 695 */ 763 void 764 popup_and_OK(char *prompt) { 696 void popup_and_OK(char *prompt) { 697 765 698 char ch; 766 699 … … 769 702 log_msg(0, prompt); 770 703 if (g_text_mode) { 771 printf 772 ("---promptpopup---1--- %s\n---promptpopup---Q--- [OK] ---\n--> ", 773 prompt); 704 printf("---promptpopup---1--- %s\n---promptpopup---Q--- [OK] ---\n--> ", prompt); 774 705 while (((ch = getchar()) != '\n') && (ch != EOF)); 775 706 } else { … … 786 717 * @return TRUE if the user pressed OK, FALSE if they pressed Cancel. 787 718 */ 788 bool popup_and_get_string(char *title, char *b, char *output, 789 int maxsize) { 719 bool popup_and_get_string(char *title, char *b, char *output, int maxsize) { 790 720 791 721 /*@ newt ************************************************************ */ … … 801 731 802 732 /*@ buffers ********************************************************** */ 803 char *blurb ;733 char *blurb = NULL; 804 734 char *p; 805 char *original_contents; 806 807 blurb = malloc(MAX_NEWT_COMMENT_LEN); 808 original_contents = malloc(MAX_NEWT_COMMENT_LEN); 735 char *original_contents = NULL; 736 809 737 assert_string_is_neither_NULL_nor_zerolength(title); 810 738 assert(b != NULL); … … 812 740 813 741 if (g_text_mode) { 814 printf 815 ("---promptstring---1--- %s\n---promptstring---2--- %s\n---promptstring---Q---\n--> ", 816 title, b); 742 printf("---promptstring---1--- %s\n---promptstring---2--- %s\n---promptstring---Q---\n--> ", title, b); 817 743 p = fgets(output, maxsize, stdin); 818 744 if (!p) { … … 821 747 if (output[strlen(output) - 1] == '\n') 822 748 output[strlen(output) - 1] = '\0'; 823 paranoid_free(blurb);824 paranoid_free(original_contents);825 749 return (TRUE); 826 750 } 751 752 blurb = malloc(MAX_NEWT_COMMENT_LEN); 827 753 strcpy(blurb, b); 828 754 text = newtTextboxReflowed(2, 1, blurb, 48, 5, 5, 0); 829 strcpy(original_contents, output);755 mr_asprintf(original_contents, "%s", output); 830 756 output[0] = '\0'; 831 type_here = 832 newtEntry(2, newtTextboxGetNumLines(text) + 2, 833 original_contents, 50, 757 type_here = newtEntry(2, newtTextboxGetNumLines(text) + 2, original_contents, 50, 834 758 #ifdef __cplusplus 835 759 0, NEWT_FLAG_RETURNEXIT … … 840 764 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, " OK "); 841 765 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, "Cancel"); 842 // newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title);843 766 newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title); 844 767 myForm = newtForm(NULL, NULL, 0); … … 851 774 newtFormDestroy(myForm); 852 775 newtPopWindow(); 776 paranoid_free(blurb); 777 853 778 if (b_res == b_2) { 854 779 strcpy(output, original_contents); 855 paranoid_free(blurb); 856 paranoid_free(original_contents); 780 mr_free(original_contents); 857 781 return (FALSE); 858 782 } else { 859 paranoid_free(blurb); 860 paranoid_free(original_contents); 783 mr_free(original_contents); 861 784 return (TRUE); 862 785 } … … 871 794 * @return TRUE if @p button1 was pushed, FALSE otherwise. 872 795 */ 873 796 bool popup_with_buttons(char *p, char *button1, char *button2) { 874 797 875 798 /*@ buffers *********************************************************** */ 876 char *prompt; 877 char *q; 799 char *prompt = NULL; 878 800 879 801 /*@ newt ************************************************************** */ … … 887 809 assert(button1 != NULL); 888 810 assert(button2 != NULL); 889 prompt = malloc(MAX_NEWT_COMMENT_LEN);890 811 if (g_text_mode) { 891 812 if (strlen(button2) == 0) { … … 894 815 printf("%s (%s or %s) --> ", p, button1, button2); 895 816 } 896 for (prompt[0] = '\0'; 897 strcmp(prompt, button1) && (strlen(button2) == 0 898 || strcmp(prompt, button2));) { 817 mr_getline(prompt, stdin); 818 while (strcmp(prompt, button1) && (strlen(button2) == 0 || strcmp(prompt, button2))) { 899 819 printf("--> "); 900 q = fgets(prompt, MAX_NEWT_COMMENT_LEN, stdin); 901 if (!q) { 902 // FIXME 903 } 820 mr_free(prompt); 821 mr_getline(prompt, stdin); 904 822 } 905 823 if (!strcmp(prompt, button1)) { 906 paranoid_free(prompt);824 mr_free(prompt); 907 825 return (TRUE); 908 826 } else { 909 paranoid_free(prompt);827 mr_free(prompt); 910 828 return (FALSE); 911 829 } 912 830 } 913 831 832 prompt = malloc(MAX_NEWT_COMMENT_LEN); 914 833 strncpy(prompt, p, MAX_NEWT_COMMENT_LEN - 1); 915 834 prompt[MAX_NEWT_COMMENT_LEN - 1] = '\0'; 916 835 text = newtTextboxReflowed(1, 1, prompt, 40, 5, 5, 0); 917 b_1 = 918 newtButton(20 - 919 ((button2[0] != 920 '\0') ? strlen(button1) + 921 2 : strlen(button1) / 2), 922 newtTextboxGetNumLines(text) + 3, button1); 836 b_1 = newtButton(20 - ((button2[0] != '\0') ? strlen(button1) + 2 : strlen(button1) / 2), newtTextboxGetNumLines(text) + 3, button1); 923 837 if (button2[0] != '\0') { 924 b_2 = 925 newtButton(24, newtTextboxGetNumLines(text) + 3, button2); 838 b_2 = newtButton(24, newtTextboxGetNumLines(text) + 3, button2); 926 839 } else { 927 840 b_2 = NULL; 928 841 } 929 // newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert");930 842 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert"); 931 843 myForm = newtForm(NULL, NULL, 0); … … 953 865 * on the screen. 954 866 */ 955 void 956 refresh_log_screen() { 867 void refresh_log_screen() { 957 868 958 869 /*@ int *********************************************************** */ … … 981 892 * only allocate some memory. 982 893 */ 983 void 984 setup_newt_stuff() { 894 void setup_newt_stuff() { 985 895 986 896 /*@ int *********************************************************** */ … … 991 901 newtInit(); 992 902 newtCls(); 993 newtPushHelpLine 994 ("Welcome to Mondo Rescue, by Dev Team and the Internet. All rights reversed."); 995 /* newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */ 903 newtPushHelpLine("Welcome to Mondo Rescue, by Dev Team and the Internet. All rights reversed."); 996 904 newtDrawRootText(18, 0, WELCOME_STRING); 997 905 newtRefresh(); … … 1000 908 } 1001 909 1002 err_log_lines = 1003 (char **) malloc(sizeof(char *) * g_noof_log_lines); 1004 if (!err_log_lines) { 1005 fatal_error("Out of memory"); 1006 } 910 err_log_lines = (char **) mr_malloc(sizeof(char *) * g_noof_log_lines); 1007 911 1008 912 for (i = 0; i < g_noof_log_lines; i++) { 1009 err_log_lines[i] = (char *) malloc(MAX_NEWT_COMMENT_LEN); 1010 if (!err_log_lines[i]) { 1011 fatal_error("Out of memory"); 1012 } 913 err_log_lines[i] = (char *) mr_malloc(MAX_NEWT_COMMENT_LEN); 1013 914 } 1014 915 … … 1024 925 * @param denom The denomenator of the ratio. 1025 926 */ 1026 void 1027 update_evalcall_form_ratio(int num, int denom) { 927 void update_evalcall_form_ratio(int num, int denom) { 1028 928 1029 929 /*@ long ************************************************************ */ 1030 long current_time = 0 ;1031 long time_taken = 0 ;1032 long time_total_est = 0 ;1033 long time_remaining = 0 ;930 long current_time = 0L; 931 long time_taken = 0L; 932 long time_total_est = 0L; 933 long time_remaining = 0L; 1034 934 1035 935 /*@ buffers ********************************************************** */ 1036 char *timeline_str ;936 char *timeline_str = NULL; 1037 937 char *pcline_str = NULL; 1038 938 char *taskprogress = NULL; … … 1043 943 int j = 0; 1044 944 1045 malloc_string(timeline_str);1046 timeline_str[0] = '\0';1047 // log_it("update_eval_call_form called");1048 945 if (num * 100 < denom) { 1049 946 percentage = 1; … … 1058 955 time_remaining = time_total_est - time_taken; 1059 956 } else { 1060 time_remaining = 0 ;957 time_remaining = 0L; 1061 958 } 1062 959 if (!g_text_mode) { … … 1069 966 || percentage > g_isoform_old_progress) { 1070 967 g_isoform_old_progress = percentage; 1071 sprintf(timeline_str, 1072 "%2ld:%02ld taken %2ld:%02ld remaining", 1073 (long) time_taken / 60, (long) time_taken % 60, (long) time_remaining / 60, 1074 (long) time_remaining % 60); 968 mr_asprintf(timeline_str, "%2ld:%02ld taken %2ld:%02ld remaining", (long) time_taken / 60, (long) time_taken % 60, (long) time_remaining / 60, (long) time_remaining % 60); 1075 969 if (percentage < 3) { 1076 970 mr_asprintf(pcline_str, " Working"); … … 1083 977 mr_strcat(pcline_str, " %c", special_dot_char(g_mysterious_dot_counter)); 1084 978 } else { 1085 mr_asprintf(pcline_str, " %3d%% done %3d%% to go", 1086 percentage, 100 - percentage); 979 mr_asprintf(pcline_str, " %3d%% done %3d%% to go", percentage, 100 - percentage); 1087 980 } 1088 981 if (g_text_mode) { … … 1095 988 } 1096 989 if (percentage >= 3) { 1097 mr_strcat(taskprogress, "] %3d%% done; %2ld:%02ld to go", percentage, 1098 (long) time_remaining / 60, (long) time_remaining % 60); 1099 printf("---evalcall---1--- %s\n", 1100 g_isoform_header_str); 990 mr_strcat(taskprogress, "] %3d%% done; %2ld:%02ld to go", percentage, (long) time_remaining / 60, (long) time_remaining % 60); 991 printf("---evalcall---1--- %s\n", g_isoform_header_str); 1101 992 printf("---evalcall---2--- %s\n", taskprogress); 1102 993 printf("---evalcall---E---\n"); 1103 994 } 1104 paranoid_free(taskprogress);995 mr_free(taskprogress); 1105 996 } else { 1106 newtScaleSet(g_isoform_scale, 1107 (unsigned long long) percentage); 997 newtScaleSet(g_isoform_scale, (unsigned long long) percentage); 1108 998 if (g_isoform_pcline) { 1109 999 newtLabelSetText(g_isoform_pcline, pcline_str); … … 1113 1003 } 1114 1004 } 1115 paranoid_free(pcline_str); 1005 mr_free(pcline_str); 1006 mr_free(timeline_str); 1116 1007 } 1117 1008 if (!g_text_mode) { 1118 // log_it("refreshing");1119 1009 newtDrawForm(g_isoform_main); 1120 1010 newtRefresh(); 1121 1011 } 1122 paranoid_free(timeline_str);1123 1012 } 1124 1013 … … 1129 1018 * @param curr The current amount of progress (percentage) in the evalcall form. 1130 1019 */ 1131 void 1132 update_evalcall_form(int curr) { 1020 void update_evalcall_form(int curr) { 1021 1133 1022 update_evalcall_form_ratio(curr, 100); 1134 1023 } 1135 1024 1136 1025 … … 1141 1030 * @param blurb3 The new third line of the blurb; use @p g_blurb_str_2 (no, that's not a typo) to keep it the same. 1142 1031 */ 1143 void 1144 update_progress_form(char *blurb3) { 1145 /* log_it("update_progress_form --- called"); */ 1032 void update_progress_form(char *blurb3) { 1033 1146 1034 if (g_current_progress == -999) { 1147 /* log_it("You're trying to update progress form when it ain't open. Aww, that's OK. I'll let it go. It's a bit naughty but it's a nonfatal error. No prob, Bob."); */1148 1035 return; 1149 1036 } 1150 1037 strcpy(g_blurb_str_2, blurb3); 1151 update_progress_form_full(g_blurb_str_1, g_blurb_str_2, 1152 g_blurb_str_3); 1153 } 1038 update_progress_form_full(g_blurb_str_1, g_blurb_str_2, g_blurb_str_3); 1039 } 1154 1040 1155 1041 … … 1160 1046 * @param blurb3 The third line of the blurb. Use @p g_blurb_str_2 (no, that's not a typo either) to keep it the same. 1161 1047 */ 1162 void 1163 update_progress_form_full(char *blurb1, char *blurb2, char *blurb3) { 1048 void update_progress_form_full(char *blurb1, char *blurb2, char *blurb3) { 1049 1164 1050 /*@ long ***************************************************** */ 1165 1051 long current_time = 0L; … … 1173 1059 1174 1060 /*@ buffers *************************************************** */ 1175 char *percentline_str ;1176 char *timeline_str ;1061 char *percentline_str = NULL; 1062 char *timeline_str = NULL; 1177 1063 char *taskprogress = NULL; 1178 char *tmp; 1179 1180 // log_msg(1, "'%s' '%s' '%s'", blurb1, blurb2, blurb3); 1181 percentline_str = malloc(MAX_NEWT_COMMENT_LEN); 1182 timeline_str = malloc(MAX_NEWT_COMMENT_LEN); 1183 malloc_string(tmp); 1064 1184 1065 if (!g_text_mode) { 1185 1066 assert(blurb1 != NULL); … … 1189 1070 } 1190 1071 1191 percentline_str[0] = '\0';1192 1193 1072 current_time = get_time(); 1194 1073 time_taken = current_time - g_start_time; … … 1197 1076 } else { 1198 1077 if (g_current_progress > g_maximum_progress) { 1199 sprintf(tmp, 1200 "update_progress_form_full(%s,%s,%s) --- g_current_progress=%ld; g_maximum_progress=%ld", 1201 blurb1, blurb2, blurb3, g_current_progress, 1202 g_maximum_progress); 1203 log_msg(0, tmp); 1078 log_msg(0, "update_progress_form_full(%s,%s,%s) --- g_current_progress=%ld; g_maximum_progress=%ld", blurb1, blurb2, blurb3, g_current_progress, g_maximum_progress); 1204 1079 g_current_progress = g_maximum_progress; 1205 1080 } 1206 percentage = 1207 (int) ((g_current_progress * 100L) / g_maximum_progress); 1081 percentage = (int) ((g_current_progress * 100L) / g_maximum_progress); 1208 1082 } 1209 1083 if (percentage < 1) { … … 1214 1088 } 1215 1089 if (g_current_progress) { 1216 time_total_est = 1217 time_taken * (long) g_maximum_progress / 1218 (long) (g_current_progress); 1090 time_total_est = time_taken * (long) g_maximum_progress / (long) g_current_progress; 1219 1091 time_remaining = time_total_est - time_taken; 1220 1092 } else { … … 1222 1094 } 1223 1095 g_mysterious_dot_counter = (g_mysterious_dot_counter + 1) % 27; 1224 sprintf(timeline_str,1225 "%2ld:%02ld taken %2ld:%02ld remaining ",1226 (long) time_taken / 60, time_taken % 60, time_remaining / 60,1227 time_remaining % 60);1228 sprintf(percentline_str, " %3d%% done %3d%% to go",1229 percentage, 100 - percentage);1230 1231 1096 if (g_text_mode) { 1232 1097 printf("---progress-form---1--- %s\n", blurb1); … … 1244 1109 log_msg(2, "percentage = %d", percentage); 1245 1110 } 1246 mr_strcat(taskprogress, "] %3d%% done; %2ld:%02ld to go", percentage, 1247 (long) time_remaining / 60, (long) time_remaining % 60); 1111 mr_strcat(taskprogress, "] %3d%% done; %2ld:%02ld to go", percentage, (long) time_remaining / 60, (long) time_remaining % 60); 1248 1112 printf("---progress-form---4--- %s\n", taskprogress); 1249 1113 paranoid_free(taskprogress); 1250 1114 } else { 1115 mr_asprintf(timeline_str, "%2ld:%02ld taken %2ld:%02ld remaining ", (long) time_taken / 60, (long) time_taken % 60, (long) time_remaining / 60, (long) time_remaining % 60); 1116 mr_asprintf(percentline_str, " %3d%% done %3d%% to go", percentage, 100 - percentage); 1117 1251 1118 center_string(blurb1, 54); 1252 1119 center_string(blurb2, 54); … … 1265 1132 newtLabelSetText(g_timeline, timeline_str); 1266 1133 } 1134 mr_free(timeline_str); 1135 1267 1136 if (g_percentline) { 1268 1137 newtLabelSetText(g_percentline, percentline_str); 1269 1138 } 1139 mr_free(percentline_str); 1140 1270 1141 newtDrawForm(g_progressForm); 1271 1142 newtRefresh(); 1272 1143 } 1273 paranoid_free(percentline_str); 1274 paranoid_free(timeline_str); 1275 paranoid_free(tmp); 1276 } 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1144 } 1289 1145 1290 1146 … … 1297 1153 * @return The backup type chosen, or @c none if the user chose "Exit to shell". 1298 1154 */ 1299 1155 t_bkptype which_backup_media_type(bool restoring) { 1300 1156 1301 1157 /*@ char ************************************************************ */ … … 1304 1160 1305 1161 /*@ newt ************************************************************ */ 1306 char *title_sz; 1307 char *minimsg_sz; 1308 static t_bkptype possible_bkptypes[] = 1309 { none, cdr, cdrw, dvd, tape, cdstream, udev, netfs, iso }; 1310 static char *possible_responses[] = 1311 { "none", "cdr", "cdrw", "dvd", "tape", "cdstream", "udev", 1312 "netfs", "iso", NULL }; 1313 char *outstr; 1314 char *p; 1162 char *title_sz = NULL; 1163 char *minimsg_sz = NULL; 1164 static t_bkptype possible_bkptypes[] = { none, cdr, cdrw, dvd, tape, cdstream, udev, netfs, iso }; 1165 static char *possible_responses[] = { "none", "cdr", "cdrw", "dvd", "tape", "cdstream", "udev", "netfs", "iso", NULL }; 1166 char *outstr = NULL; 1315 1167 t_bkptype backup_type; 1316 1168 int i; … … 1327 1179 newtComponent myForm; 1328 1180 1329 title_sz = malloc(MAX_NEWT_COMMENT_LEN);1330 minimsg_sz = malloc(MAX_NEWT_COMMENT_LEN);1331 outstr = malloc(MAX_NEWT_COMMENT_LEN);1332 1181 if (g_text_mode) { 1333 1182 for (backup_type = none; backup_type == none;) { … … 1338 1187 } 1339 1188 printf(")\n--> "); 1340 p = fgets(outstr, MAX_NEWT_COMMENT_LEN, stdin); 1341 if (!p) { 1342 // FIXME 1343 } 1344 strip_spaces(outstr); 1189 mr_getline(outstr, stdin); 1190 mr_strip_spaces(outstr); 1345 1191 for (i = 0; possible_responses[i]; i++) { 1346 1192 if (!strcmp(possible_responses[i], outstr)) { … … 1348 1194 } 1349 1195 } 1350 } 1351 paranoid_free(title_sz); 1352 paranoid_free(minimsg_sz); 1353 paranoid_free(outstr); 1196 mr_free(outstr); 1197 } 1354 1198 return (backup_type); 1355 1199 } 1356 1200 newtDrawRootText(18, 0, WELCOME_STRING); 1357 1201 if (restoring) { 1358 strcpy(title_sz, 1359 "Please choose the backup media from which you want to read data."); 1360 strcpy(minimsg_sz, "Read from:"); 1361 } else { 1362 strcpy(title_sz, 1363 "Please choose the backup media to which you want to archive data."); 1364 strcpy(minimsg_sz, "Backup to:"); 1202 mr_asprintf(title_sz, "Please choose the backup media from which you want to read data."); 1203 mr_asprintf(minimsg_sz, "Read from:"); 1204 } else { 1205 mr_asprintf(title_sz, "Please choose the backup media to which you want to archive data."); 1206 mr_asprintf(minimsg_sz, "Backup to:"); 1365 1207 } 1366 1208 newtPushHelpLine(title_sz); 1367 // newtOpenWindow (23, 3, 34, 17, minimsg_sz);1368 1209 newtCenteredWindow(34, 17, minimsg_sz); 1369 1210 b1 = newtButton(1, 1, "CD-R disks "); … … 1399 1240 } 1400 1241 newtPopHelpLine(); 1401 paranoid_free(title_sz); 1402 paranoid_free(minimsg_sz); 1403 paranoid_free(outstr); 1242 mr_free(title_sz); 1243 mr_free(minimsg_sz); 1404 1244 return (output); 1405 1245 } … … 1423 1263 newtComponent b2; 1424 1264 newtComponent b3; 1425 //newtComponent b4;1265 newtComponent b4; 1426 1266 newtComponent b5; 1427 1267 newtComponent b_res; … … 1435 1275 b2 = newtButton(18, 1, "gzip"); 1436 1276 b3 = newtButton(4, 5, "lzo"); 1437 //b4 = newtButton(18, 5, "lzma");1277 b4 = newtButton(18, 5, "lzma"); 1438 1278 b5 = newtButton(4, 9, " Exit "); 1439 1279 myForm = newtForm(NULL, NULL, 0); … … 1448 1288 } else if (b_res == b3) { 1449 1289 mr_asprintf(output, "%s", "lzo"); 1450 //} else if (b_res == b4) {1451 //mr_asprintf(output, "%s", "lzma");1290 } else if (b_res == b4) { 1291 mr_asprintf(output, "%s", "lzma"); 1452 1292 } 1453 1293 newtPopHelpLine(); … … 1461 1301 * @return The compression level (0-9) chosen, or -1 for "Exit". 1462 1302 */ 1463 int 1464 which_compression_level() { 1303 int which_compression_level() { 1465 1304 1466 1305 /*@ char ************************************************************ */ … … 1479 1318 1480 1319 newtDrawRootText(18, 0, WELCOME_STRING); 1481 newtPushHelpLine 1482 (" Please specify the level of compression that you want."); 1483 // newtOpenWindow (23, 3, 34, 13, "How much compression?"); 1320 newtPushHelpLine(" Please specify the level of compression that you want."); 1484 1321 newtCenteredWindow(34, 13, "How much compression?"); 1485 1322 b1 = newtButton(4, 1, "Maximum (9)"); … … 1518 1355 * @param source_file The file containing a list of filenames to load into @p filelist. 1519 1356 */ 1520 int load_filelist_into_array(struct s_filelist *filelist, 1521 char *source_file) { 1357 int load_filelist_into_array(struct s_filelist *filelist, char *source_file) { 1358 1522 1359 int i; 1523 1360 int j = 0; 1524 1361 bool done; 1525 char *tmp; 1526 char *p; 1362 char *tmp = NULL; 1527 1363 char *tmp1 = NULL; 1528 1364 FILE *fin, *fout; … … 1543 1379 if (!(fout = fopen(tmp1, "a"))) { 1544 1380 log_msg(2, "Can't write to %s", tmp1); 1381 mr_free(tmp1); 1545 1382 return(1); 1546 1383 } 1547 1384 1548 malloc_string(tmp);1549 1385 log_msg(2, "Loading %s", source_file); 1550 for (filelist->entries = 0; filelist->entries <= ARBITRARY_MAXIMUM; 1551 filelist->entries++) { 1552 god_i_hate_gotos: 1386 for (filelist->entries = 0; filelist->entries <= ARBITRARY_MAXIMUM; ) { 1387 mr_free(tmp); 1553 1388 if (feof(fin)) { 1554 1389 break; 1555 1390 } 1556 p = fgets(tmp, MAX_NEWT_COMMENT_LEN, fin); 1557 if (!p) { 1558 // FIXME 1559 } 1391 mr_getline(tmp, fin); 1560 1392 i = (int) strlen(tmp); 1561 1393 if (i < 2) { 1562 goto god_i_hate_gotos;1394 continue; 1563 1395 } 1564 1396 if (tmp[i - 1] < 32) { … … 1566 1398 } 1567 1399 if (i < 2) { 1568 goto god_i_hate_gotos;1400 continue; 1569 1401 } 1570 1402 if (!does_file_exist(tmp) && !feof(fin)) { 1571 1403 j++; 1572 1404 fprintf(fout, "%s\n", tmp); 1573 1574 goto god_i_hate_gotos; 1575 } 1576 filelist->el[filelist->entries].severity = 1577 severity_of_difference(tmp, NULL); 1405 continue; 1406 } 1407 filelist->el[filelist->entries].severity = severity_of_difference(tmp, NULL); 1578 1408 strcpy(filelist->el[filelist->entries].filename, tmp); 1579 1409 if (feof(fin)) { 1580 1410 break; 1581 1411 } 1582 } 1412 filelist->entries++; 1413 } 1414 mr_free(tmp); 1583 1415 paranoid_fclose(fin); 1584 1416 paranoid_fclose(fout); … … 1586 1418 log_to_screen("%d files listed in %s/changed.files have been deleted since backup was made\nand are referenced in %s", j, bkpinfo->tmpdir,tmp1); 1587 1419 } 1588 paranoid_free(tmp1);1420 mr_free(tmp1); 1589 1421 if (filelist->entries >= ARBITRARY_MAXIMUM) { 1590 1422 log_to_screen("Arbitrary limits suck, man!"); 1591 paranoid_free(tmp);1592 1423 return (1); 1593 1424 } … … 1617 1448 } 1618 1449 } 1619 paranoid_free(tmp);1620 1450 log_it("leaving"); 1621 1451 return (0); 1622 1452 } 1623 1624 1453 1625 1454 … … 1630 1459 * @note The returned value points to static storage that will be overwritten with each call. 1631 1460 */ 1632 1461 char *filelist_entry_to_string(struct s_filelist_entry *flentry) { 1633 1462 static char comment[100]; 1634 1463 char *tmp = NULL; 1635 1464 1636 log_ it("entering");1465 log_msg(8, "entering"); 1637 1466 assert(flentry != NULL); 1638 1467 if (flentry->severity == 0) { … … 1648 1477 mr_strcat(tmp, flentry->filename); 1649 1478 strncpy(comment, tmp, 99); 1650 paranoid_free(tmp);1479 mr_free(tmp); 1651 1480 1652 1481 log_it("leaving"); 1653 1482 return (comment); 1654 1483 } 1655 1656 1657 1658 1484 1659 1485 … … 1663 1489 * @param source_file The file containing a list of changed files. 1664 1490 */ 1665 void popup_changelist_from_file(char *source_file) { 1666 char *reason; 1491 void popup_changelist_from_file(char *source_file) { 1492 1493 char *reason = NULL; 1667 1494 newtComponent myForm; 1668 1495 newtComponent bClose; … … 1685 1512 1686 1513 /*@ buffers ********************************************************* */ 1687 char *tmp ;1688 char *differ_sz ;1514 char *tmp = NULL; 1515 char *differ_sz = NULL; 1689 1516 1690 1517 struct s_filelist *filelist; 1691 malloc_string(reason);1692 tmp = malloc(5000);1693 malloc_string(differ_sz);1694 1518 assert_string_is_neither_NULL_nor_zerolength(source_file); 1695 1519 if (g_text_mode) { 1696 1520 log_msg(2, "Text mode. Therefore, no popup list."); 1697 goto free_to_go;1521 return; 1698 1522 } 1699 1523 log_msg(2, "Examining file %s", source_file); … … 1702 1526 if (lng < 1) { 1703 1527 log_msg(2, "No lines in file. Therefore, no popup list."); 1704 paranoid_free(reason); 1705 goto free_to_go; 1528 return; 1706 1529 } else if (lng >= ARBITRARY_MAXIMUM) { 1707 1530 log_msg(2, "Too many files differ for me to list."); 1708 goto free_to_go;1531 return; 1709 1532 } 1710 1533 … … 1715 1538 1716 1539 if (load_filelist_into_array(filelist, source_file)) { 1717 log_msg(2, "Can't open %s; therefore, cannot popup list", 1718 source_file); 1719 paranoid_free(reason); 1540 log_msg(2, "Can't open %s; therefore, cannot popup list", source_file); 1720 1541 return; 1721 1542 } 1722 log_msg(2, "%d files loaded into filelist array", 1723 filelist->entries); 1543 log_msg(2, "%d files loaded into filelist array", filelist->entries); 1724 1544 for (i = 0; i < filelist->entries; i++) { 1725 1545 keylist[i] = (void *) i; … … 1730 1550 keylist[i]); 1731 1551 } 1732 sprintf(differ_sz, 1733 " %ld files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.", 1734 i); 1552 mr_asprintf(differ_sz, " %ld files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.", i); 1735 1553 newtPushHelpLine(differ_sz); 1554 mr_free(differ_sz); 1555 1736 1556 bClose = newtCompactButton(10, 15, " Close "); 1737 1557 bSelect = newtCompactButton(30, 15, " Select "); 1738 sprintf(tmp, "%-10s %-20s", "Priority", "Filename");1558 mr_asprintf(tmp, "%-10s %-20s", "Priority", "Filename"); 1739 1559 headerMsg = newtLabel(2, 1, tmp); 1560 mr_free(tmp); 1561 1740 1562 newtOpenWindow(5, 4, 70, 16, "Non-matching files"); 1741 1563 myForm = newtForm(NULL, NULL, 0); 1742 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, 1743 bSelect, NULL); 1564 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, bSelect, NULL); 1565 1744 1566 while (!finished) { 1745 1567 b_res = newtRunForm(myForm); … … 1756 1578 currline = i; 1757 1579 if (filelist->entries > 0) { 1758 severity_of_difference(filelist->el[currline].1759 filename,reason);1760 sprintf(tmp, "%s --- %s",1761 filelist->el[currline].filename, reason); 1580 malloc_string(reason); 1581 severity_of_difference(filelist->el[currline]. filename, &reason); 1582 mr_asprintf(tmp, "%s --- %s", filelist->el[currline].filename, reason); 1583 1762 1584 popup_and_OK(tmp); 1585 mr_free(tmp); 1586 paranoid_free(reason); 1763 1587 } 1764 1588 } … … 1768 1592 newtPopWindow(); 1769 1593 newtPopHelpLine(); 1770 free_to_go:1771 paranoid_free(reason);1772 paranoid_free(tmp);1773 paranoid_free(differ_sz);1774 1594 return; 1775 1595 }
Note:
See TracChangeset
for help on using the changeset viewer.