PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/libs/libidn/patches/010-fix-idn-error-usage.patch

https://github.com/jmccrohan/packages
Patch | 119 lines | 105 code | 14 blank | 0 comment | 0 complexity | 8c959a643cdffa127ea0dc094891d2fc MD5 | raw file
Possible License(s): GPL-2.0
  1. --- a/src/idn.c
  2. +++ b/src/idn.c
  3. @@ -169,7 +169,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. @@ -184,7 +184,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. @@ -199,7 +199,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 (readbuf[strlen (readbuf) - 1] == '\n')
  26. @@ -216,7 +216,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. @@ -241,7 +241,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. }