Changeset 2356 in MondoRescue for branches/2.2.10/mondo/src/common
- Timestamp:
- Aug 29, 2009, 1:00:03 AM (16 years ago)
- Location:
- branches/2.2.10/mondo/src/common
- Files:
-
- 3 edited
-
libmondo-string-EXT.h (modified) (1 diff)
-
libmondo-string.c (modified) (1 diff)
-
libmondo-string.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-string-EXT.h
r2352 r2356 19 19 char *s); 20 20 extern int special_dot_char(int i); 21 extern void spread_flaws_across_three_lines(char *flaws_str,22 char *flaws_str_A,23 char *flaws_str_B,24 char *flaws_str_C);25 21 extern int strcmp_inc_numbers(char *stringA, char *stringB); 26 22 extern char *strip_afio_output_line(char *input); -
branches/2.2.10/mondo/src/common/libmondo-string.c
r2352 r2356 589 589 return ('.'); 590 590 } 591 592 593 594 595 /**596 * Wrap @p flaws_str across three lines. The first two are no more than 74 characters wide.597 * @param flaws_str The original string to split.598 * @param flaws_str_A Where to put the first 74-or-less characters.599 * @param flaws_str_B Where to put the second 74-or-less characters.600 * @param flaws_str_C Where to put the rest.601 */602 void603 spread_flaws_across_three_lines(char *flaws_str, char *flaws_str_A,604 char *flaws_str_B, char *flaws_str_C)605 {606 607 /*@ int ************************************************************* */608 int i = 0;609 610 /*@ initialize ****************************************************** */611 assert(flaws_str != NULL);612 613 if (strlen(flaws_str) > 0) {614 mr_asprintf(flaws_str_A, "%s", flaws_str + 1);615 }616 if (strlen(flaws_str_A) >= 74) {617 for (i = 74; flaws_str_A[i] != ' '; i--);618 mr_asprintf(flaws_str_B, "%s", flaws_str_A + i + 1);619 flaws_str_A[i] = '\0';620 }621 if (strlen(flaws_str_B) >= 74) {622 for (i = 74; flaws_str_B[i] != ' '; i--);623 mr_asprintf(flaws_str_C, "%s", flaws_str_B + i + 1);624 flaws_str_B[i] = '\0';625 }626 }627 628 591 629 592 -
branches/2.2.10/mondo/src/common/libmondo-string.h
r2352 r2356 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.
