patch-qpe_c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. $OpenBSD: patch-qpe_c,v 1.1.1.1 2012/05/30 16:47:01 ajacoutot Exp $
  2. warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
  3. --- qpe.c.orig Sun Nov 16 09:45:45 2008
  4. +++ qpe.c Wed May 30 15:24:00 2012
  5. @@ -97,7 +97,7 @@ int qp_encode( char *out, size_t out_size, char *in, s
  6. op+= strlen(paragraph);// +3; /** jump the output + =\r\n **/
  7. out_remaining-= (strlen(paragraph)); // Was +3, updated to fix Outlook problems
  8. - QPD fprintf(stdout, "Soft break (%d + %d > 76 char) for '%s'\n", current_line_length, charout_size, paragraph);
  9. + QPD fprintf(stdout, "Soft break (%Zd + %d > 76 char) for '%s'\n", current_line_length, charout_size, paragraph);
  10. /** reinitialize the paragraph **/
  11. paragraph[0] = '\0';
  12. @@ -108,7 +108,7 @@ int qp_encode( char *out, size_t out_size, char *in, s
  13. }
  14. snprintf(pp, pp_remaining, "%s", charout);
  15. - QPD fprintf(stdout,"charout='%s', size=%d, pp_remain=%d result='%s'\n", charout, charout_size, pp_remaining, paragraph);
  16. + QPD fprintf(stdout,"charout='%s', size=%d, pp_remain=%Zd result='%s'\n", charout, charout_size, pp_remaining, paragraph);
  17. pp += charout_size;
  18. pp_remaining -= charout_size;
  19. p++;
  20. @@ -149,13 +149,13 @@ int qp_encode_from_file( char *fname )
  21. out_size = in_size *3;
  22. in_buffer = malloc( sizeof(char) *in_size +1);
  23. if (in_buffer == NULL) {
  24. - QPD fprintf(stdout,"Error allocating %d bytes for input buffer\n", in_size);
  25. + QPD fprintf(stdout,"Error allocating %Zd bytes for input buffer\n", in_size);
  26. return -1;
  27. }
  28. out_buffer = malloc( sizeof(char) *out_size *3 +1);
  29. if (in_buffer == NULL) {
  30. - QPD fprintf(stdout,"Error allocating %d bytes for output buffer\n", out_size);
  31. + QPD fprintf(stdout,"Error allocating %Zd bytes for output buffer\n", out_size);
  32. return -1;
  33. }
  34. @@ -169,7 +169,7 @@ int qp_encode_from_file( char *fname )
  35. ** we segfault ;) **/
  36. *(in_buffer +in_size) = '\0';
  37. - QPD fprintf(stdout,"file %s is loaded, size = %d\n", fname, in_size);
  38. + QPD fprintf(stdout,"file %s is loaded, size = %Zd\n", fname, in_size);
  39. qp_encode( out_buffer, out_size, in_buffer, in_size );