You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
530 B

  1. #include <stdio.h>
  2. #include "strutl.h"
  3. #include <stdlib.h>
  4. int main(int argc, char**argv)
  5. {
  6. char *buf;
  7. char *S1 = "99 bottles of beer on the\rwall, 99 bottles\r of beer, take one down, pass it around";
  8. char *S2 = "99bottlesofbeeronthewall,99bottlesofbeer,takeonedown,passitaround";
  9. buf = reflowtext(30, S1);
  10. printf("Original text:\n%s\n---\nReflowed text:\n%s\n\n", S1, buf);
  11. free(buf);
  12. buf = reflowtext(30, S2);
  13. printf("Original text:\n%s\n---\nReflowed text:\n%s\n\n", S2, buf);
  14. free(buf);
  15. return 0;
  16. }