Changeset 146 in MondoRescue for trunk/mondo/mondo/common/newt-specific.c
- Timestamp:
- Dec 1, 2005, 10:00:14 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/newt-specific.c
r127 r146 313 313 314 314 system 315 ("gzip -9c /var/log/mondo-archive.log> /tmp/MA.log.gz 2> /dev/null");315 ("gzip -9c "MONDO_LOGFILE" > /tmp/MA.log.gz 2> /dev/null"); 316 316 if (!strstr(g_version, "cvs") && !strstr(g_version, "svn")) { 317 317 printf("Please try the latest SVN version "); … … 686 686 * @param title The title of the dialog box. 687 687 * @param b The blurb (e.g. what you want the user to enter). 688 * @param output The string to put the user's answer in. 688 * @param output The string to put the user's answer in. It has to be freed by the caller 689 689 * @param maxsize The size in bytes allocated to @p output. 690 690 * @return TRUE if the user pressed OK, FALSE if they pressed Cancel. … … 707 707 char *blurb; 708 708 char *original_contents; 709 int n = 0; 709 710 710 711 assert_string_is_neither_NULL_nor_zerolength(title); 711 712 assert(b != NULL); 712 assert(output != NULL);713 713 714 714 if (g_text_mode) { … … 716 716 ("---promptstring---1--- %s\r\n---promptstring---2--- %s\r\n---promptstring---Q---\r\n--> ", 717 717 title, b); 718 (void) fgets(output, maxsize, stdin);718 (void) getline(&output, &n, stdin); 719 719 if (output[strlen(output) - 1] == '\n') 720 720 output[strlen(output) - 1] = '\0'; … … 723 723 asprintf(&blurb, b); 724 724 text = newtTextboxReflowed(2, 1, blurb, 48, 5, 5, 0); 725 asprintf(&original_contents, output);726 output[0] = '\0'; 725 original_contents = output; 726 727 727 type_here = 728 728 newtEntry(2, newtTextboxGetNumLines(text) + 2, … … 745 745 paranoid_free(blurb); 746 746 b_res = newtRunForm(myForm); 747 strcpy(output, entry_value);747 output = entry_value; 748 748 newtPopHelpLine(); 749 749 newtFormDestroy(myForm); 750 750 newtPopWindow(); 751 751 if (b_res == b_2) { 752 strcpy(output, original_contents); 752 paranoid_free(output); 753 output = original_contents; 753 754 paranoid_free(original_contents); 754 755 return (FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.