010-fix-idn-error-usage.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. --- a/src/idn.c
  2. +++ b/src/idn.c
  3. @@ -170,7 +170,7 @@ main (int argc, char *argv[])
  4. (args_info.idna_to_unicode_given ? 1 : 0) +
  5. (args_info.nfkc_given ? 1 : 0) != 1)
  6. {
  7. - error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified"));
  8. + error (0, 0, "%s", _("only one of -s, -e, -d, -a, -u or -n can be specified"));
  9. usage (EXIT_FAILURE);
  10. }
  11. @@ -185,7 +185,7 @@ main (int argc, char *argv[])
  12. if (!args_info.quiet_given
  13. && args_info.inputs_num == 0
  14. && isatty (fileno (stdin)))
  15. - fprintf (stderr, _("Type each input string on a line by itself, "
  16. + fprintf (stderr, "%s", _("Type each input string on a line by itself, "
  17. "terminated by a newline character.\n"));
  18. do
  19. @@ -197,7 +197,7 @@ main (int argc, char *argv[])
  20. if (feof (stdin))
  21. break;
  22. - error (EXIT_FAILURE, errno, _("input error"));
  23. + error (EXIT_FAILURE, errno, "%s", _("input error"));
  24. }
  25. if (strlen (line) > 0)
  26. @@ -215,7 +215,7 @@ main (int argc, char *argv[])
  27. if (!q)
  28. {
  29. free (p);
  30. - error (EXIT_FAILURE, 0,
  31. + error (EXIT_FAILURE, 0, "%s",
  32. _("could not convert from UTF-8 to UCS-4"));
  33. }
  34. @@ -240,7 +240,7 @@ main (int argc, char *argv[])
  35. if (!q)
  36. {
  37. free (r);
  38. - error (EXIT_FAILURE, 0,
  39. + error (EXIT_FAILURE, 0, "%s",
  40. _("could not convert from UTF-8 to UCS-4"));
  41. }
  42. @@ -277,7 +277,7 @@ main (int argc, char *argv[])
  43. q = stringprep_utf8_to_ucs4 (p, -1, &len);
  44. free (p);
  45. if (!q)
  46. - error (EXIT_FAILURE, 0,
  47. + error (EXIT_FAILURE, 0, "%s",
  48. _("could not convert from UTF-8 to UCS-4"));
  49. if (args_info.debug_given)
  50. @@ -336,7 +336,7 @@ main (int argc, char *argv[])
  51. r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
  52. free (q);
  53. if (!r)
  54. - error (EXIT_FAILURE, 0,
  55. + error (EXIT_FAILURE, 0, "%s",
  56. _("could not convert from UCS-4 to UTF-8"));
  57. p = stringprep_utf8_to_locale (r);
  58. @@ -360,7 +360,7 @@ main (int argc, char *argv[])
  59. q = stringprep_utf8_to_ucs4 (p, -1, NULL);
  60. free (p);
  61. if (!q)
  62. - error (EXIT_FAILURE, 0,
  63. + error (EXIT_FAILURE, 0, "%s",
  64. _("could not convert from UCS-4 to UTF-8"));
  65. if (args_info.debug_given)
  66. @@ -438,7 +438,7 @@ main (int argc, char *argv[])
  67. if (!q)
  68. {
  69. free (p);
  70. - error (EXIT_FAILURE, 0,
  71. + error (EXIT_FAILURE, 0, "%s",
  72. _("could not convert from UCS-4 to UTF-8"));
  73. }
  74. @@ -494,7 +494,7 @@ main (int argc, char *argv[])
  75. r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
  76. free (q);
  77. if (!r)
  78. - error (EXIT_FAILURE, 0,
  79. + error (EXIT_FAILURE, 0, "%s",
  80. _("could not convert from UTF-8 to UCS-4"));
  81. p = stringprep_utf8_to_locale (r);
  82. @@ -523,7 +523,7 @@ main (int argc, char *argv[])
  83. if (!q)
  84. {
  85. free (p);
  86. - error (EXIT_FAILURE, 0,
  87. + error (EXIT_FAILURE, 0, "%s",
  88. _("could not convert from UTF-8 to UCS-4"));
  89. }
  90. @@ -537,7 +537,7 @@ main (int argc, char *argv[])
  91. r = stringprep_utf8_nfkc_normalize (p, -1);
  92. free (p);
  93. if (!r)
  94. - error (EXIT_FAILURE, 0, _("could not do NFKC normalization"));
  95. + error (EXIT_FAILURE, 0, "%s", _("could not do NFKC normalization"));
  96. if (args_info.debug_given)
  97. {
  98. @@ -547,7 +547,7 @@ main (int argc, char *argv[])
  99. if (!q)
  100. {
  101. free (r);
  102. - error (EXIT_FAILURE, 0,
  103. + error (EXIT_FAILURE, 0, "%s",
  104. _("could not convert from UTF-8 to UCS-4"));
  105. }