Changeset 2352 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-string.c
- Timestamp:
- Aug 28, 2009, 2:46:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-string.c
r2334 r2352 599 599 * @param flaws_str_B Where to put the second 74-or-less characters. 600 600 * @param flaws_str_C Where to put the rest. 601 * @param res The result of the original evaluate_mountlist() operation. 602 * @return TRUE if res == 0, FALSE otherwise. 603 */ 604 bool 601 */ 602 void 605 603 spread_flaws_across_three_lines(char *flaws_str, char *flaws_str_A, 606 char *flaws_str_B, char *flaws_str_C, 607 int res) 604 char *flaws_str_B, char *flaws_str_C) 608 605 { 609 606 … … 612 609 613 610 /*@ initialize ****************************************************** */ 614 assert(flaws_str_A != NULL);615 assert(flaws_str_B != NULL);616 assert(flaws_str_C != NULL);617 611 assert(flaws_str != NULL); 618 612 619 if (!res && !strlen(flaws_str)) {620 return (TRUE);621 }622 613 if (strlen(flaws_str) > 0) { 623 paranoid_free(flaws_str_A);624 614 mr_asprintf(flaws_str_A, "%s", flaws_str + 1); 625 615 } 626 616 if (strlen(flaws_str_A) >= 74) { 627 617 for (i = 74; flaws_str_A[i] != ' '; i--); 628 paranoid_free(flaws_str_B);629 618 mr_asprintf(flaws_str_B, "%s", flaws_str_A + i + 1); 630 619 flaws_str_A[i] = '\0'; … … 632 621 if (strlen(flaws_str_B) >= 74) { 633 622 for (i = 74; flaws_str_B[i] != ' '; i--); 634 paranoid_free(flaws_str_C);635 623 mr_asprintf(flaws_str_C, "%s", flaws_str_B + i + 1); 636 624 flaws_str_B[i] = '\0'; 637 }638 if (res) {639 return (FALSE);640 } else {641 return (TRUE);642 625 } 643 626 }
Note:
See TracChangeset
for help on using the changeset viewer.