Changeset 2355 in MondoRescue for branches/2.2.9/mondo/src/common
- Timestamp:
- Aug 29, 2009, 12:56:50 AM (16 years ago)
- Location:
- branches/2.2.9/mondo/src/common
- Files:
-
- 3 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);
Note:
See TracChangeset
for help on using the changeset viewer.