mirror of the now-defunct rocklinux.org
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.

94 lines
3.3 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/recode/recode-3.6.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. http://pybliographer.org/help/recode states:
  20. Pybliographer uses GNU Recode in order to convert between different character
  21. sets, especially LaTeX and HTML. The latest version of GNU Recode (3.6)
  22. contains a bug that makes it unsuitable for Pybliographer (but not for
  23. standalone use). This bug is pending since a long time.
  24. --- recode-3.6.orig/src/libiconv.c
  25. +++ recode-3.6/src/libiconv.c
  26. @@ -1,5 +1,5 @@
  27. /* Conversion of files between different charsets and surfaces.
  28. - Copyright � 1999, 2000 Free Software Foundation, Inc.
  29. + Copyright � 1999, 2000, 2001 Free Software Foundation, Inc.
  30. Contributed by Fran�ois Pinard <pinard@iro.umontreal.ca>, 1999,
  31. and Bruno Haible <haible@clisp.cons.org>, 2000.
  32. @@ -195,12 +195,17 @@
  33. memcpy() doesn't do here, because the regions might overlap.
  34. memmove() isn't worth it, because we rarely have to move more
  35. than 12 bytes. */
  36. - if (input > input_buffer && input_left > 0)
  37. + cursor = input_buffer;
  38. + if (input_left > 0)
  39. {
  40. - cursor = input_buffer;
  41. - do
  42. - *cursor++ = *input++;
  43. - while (--input_left > 0);
  44. + if (input > input_buffer)
  45. + {
  46. + do
  47. + *cursor++ = *input++;
  48. + while (--input_left > 0);
  49. + }
  50. + else
  51. + cursor += input_left;
  52. }
  53. }
  54. --- recode-3.6.orig/src/request.c
  55. +++ recode-3.6/src/request.c
  56. @@ -1073,7 +1073,7 @@
  57. if (task->output.cursor + 4 >= task->output.limit)
  58. {
  59. RECODE_OUTER outer = task->request->outer;
  60. - size_t old_size = task->output.limit - task->output.buffer;
  61. + size_t old_size = task->output.cursor - task->output.buffer;
  62. size_t new_size = task->output.cursor + 4 - task->output.buffer;
  63. /* FIXME: Rethink about how the error should be reported. */
  64. --- recode-3.6.orig/src/task.c
  65. +++ recode-3.6/src/task.c
  66. @@ -1198,6 +1198,8 @@
  67. else
  68. success = transform_mere_copy (subtask);
  69. + task->output = subtask->output;
  70. +
  71. if (subtask->input.name && *subtask->input.name)
  72. fclose (subtask->input.file);
  73. if (subtask->output.name && *subtask->output.name)
  74. --- recode-3.6.orig/src/hash.h
  75. +++ recode-3.6/src/hash.h
  76. @@ -21,6 +21,11 @@
  77. /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
  78. obstacks instead of malloc, and recompile `hash.c' with same setting. */
  79. +#define hash_lookup recode_hash_lookup
  80. +#define hash_delete recode_hash_delete
  81. +#define hash_free recode_hash_free
  82. +#define hash_insert recode_hash_insert
  83. +
  84. #ifndef PARAMS
  85. # if PROTOTYPES || __STDC__
  86. # define PARAMS(Args) Args