Changeset 2355 in MondoRescue
- Timestamp:
- Aug 29, 2009, 12:56:50 AM (16 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-string-EXT.h
r2350 r2355 21 21 char *s); 22 22 extern int special_dot_char(int i); 23 extern void spread_flaws_across_three_lines(char *flaws_str,24 char *flaws_str_A,25 char *flaws_str_B,26 char *flaws_str_C);27 23 extern int strcmp_inc_numbers(char *stringA, char *stringB); 28 24 extern char *strip_afio_output_line(char *input); -
branches/2.2.9/mondo/src/common/libmondo-string.c
r2350 r2355 598 598 return ('.'); 599 599 } 600 601 602 603 604 /**605 * Wrap @p flaws_str across three lines. The first two are no more than 74 characters wide.606 * @param flaws_str The original string to split.607 * @param flaws_str_A Where to put the first 74-or-less characters.608 * @param flaws_str_B Where to put the second 74-or-less characters.609 * @param flaws_str_C Where to put the rest.610 */611 void612 spread_flaws_across_three_lines(char *flaws_str, char *flaws_str_A,613 char *flaws_str_B, char *flaws_str_C)614 {615 616 /*@ int ************************************************************* */617 int i = 0;618 619 /*@ initialize ****************************************************** */620 assert(flaws_str != NULL);621 622 if (strlen(flaws_str) > 0) {623 mr_asprintf(&flaws_str_A, "%s", flaws_str + 1);624 }625 if (strlen(flaws_str_A) >= 74) {626 for (i = 74; flaws_str_A[i] != ' '; i--);627 mr_asprintf(&flaws_str_B, "%s", flaws_str_A + i + 1);628 flaws_str_A[i] = '\0';629 }630 if (strlen(flaws_str_B) >= 74) {631 for (i = 74; flaws_str_B[i] != ' '; i--);632 mr_asprintf(&flaws_str_C, "%s", flaws_str_B + i + 1);633 flaws_str_B[i] = '\0';634 }635 }636 637 600 638 601 -
branches/2.2.9/mondo/src/common/libmondo-string.h
r2350 r2355 17 17 char *slice_fname(long bigfileno, long sliceno, char *path, char *s); 18 18 int special_dot_char(int i); 19 void spread_flaws_across_three_lines(char *flaws_str, char *flaws_str_A,20 char *flaws_str_B, char *flaws_str_C);21 19 int strcmp_inc_numbers(char *stringA, char *stringB); 22 20 char *strip_afio_output_line(char *input); -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-newt.c
r2350 r2355 1976 1976 while (!finished) { 1977 1977 flaws_str = evaluate_mountlist(mountlist, &res); 1978 spread_flaws_across_three_lines(flaws_str, flaws_str_A, flaws_str_B, flaws_str_C); 1979 1978 if (strlen(flaws_str) > 0) { 1979 mr_asprintf(&flaws_str_A, "%s", flaws_str + 1); 1980 } else { 1981 mr_asprintf(&flaws_str_A, ""); 1982 } 1983 if (strlen(flaws_str_A) >= 74) { 1984 for (i = 74; flaws_str_A[i] != ' '; i--); 1985 mr_asprintf(&flaws_str_B, "%s", flaws_str_A + i + 1); 1986 flaws_str_A[i] = '\0'; 1987 } else { 1988 mr_asprintf(&flaws_str_B, ""); 1989 } 1990 if (strlen(flaws_str_B) >= 74) { 1991 for (i = 74; flaws_str_B[i] != ' '; i--); 1992 mr_asprintf(&flaws_str_C, "%s", flaws_str_B + i + 1); 1993 flaws_str_B[i] = '\0'; 1994 } else { 1995 mr_asprintf(&flaws_str_C, ""); 1996 } 1980 1997 mr_free(flaws_str); 1981 1998 -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-newt.h
r2350 r2355 180 180 void setup_newt_stuff(void); 181 181 long size_of_specific_device(struct mountlist_itself *, char *); 182 void spread_flaws_across_three_lines(char *, char *, char *, char *);183 182 char *turn_raid_level_number_to_string(int); 184 183 void update_evalcall_form(int);
Note:
See TracChangeset
for help on using the changeset viewer.