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.

75 lines
2.5 KiB

  1. http://pybliographer.org/help/recode states:
  2. Pybliographer uses GNU Recode in order to convert between different character
  3. sets, especially LaTeX and HTML. The latest version of GNU Recode (3.6)
  4. contains a bug that makes it unsuitable for Pybliographer (but not for
  5. standalone use). This bug is pending since a long time.
  6. --- recode-3.6.orig/src/libiconv.c
  7. +++ recode-3.6/src/libiconv.c
  8. @@ -1,5 +1,5 @@
  9. /* Conversion of files between different charsets and surfaces.
  10. - Copyright � 1999, 2000 Free Software Foundation, Inc.
  11. + Copyright � 1999, 2000, 2001 Free Software Foundation, Inc.
  12. Contributed by Fran�ois Pinard <pinard@iro.umontreal.ca>, 1999,
  13. and Bruno Haible <haible@clisp.cons.org>, 2000.
  14. @@ -195,12 +195,17 @@
  15. memcpy() doesn't do here, because the regions might overlap.
  16. memmove() isn't worth it, because we rarely have to move more
  17. than 12 bytes. */
  18. - if (input > input_buffer && input_left > 0)
  19. + cursor = input_buffer;
  20. + if (input_left > 0)
  21. {
  22. - cursor = input_buffer;
  23. - do
  24. - *cursor++ = *input++;
  25. - while (--input_left > 0);
  26. + if (input > input_buffer)
  27. + {
  28. + do
  29. + *cursor++ = *input++;
  30. + while (--input_left > 0);
  31. + }
  32. + else
  33. + cursor += input_left;
  34. }
  35. }
  36. --- recode-3.6.orig/src/request.c
  37. +++ recode-3.6/src/request.c
  38. @@ -1073,7 +1073,7 @@
  39. if (task->output.cursor + 4 >= task->output.limit)
  40. {
  41. RECODE_OUTER outer = task->request->outer;
  42. - size_t old_size = task->output.limit - task->output.buffer;
  43. + size_t old_size = task->output.cursor - task->output.buffer;
  44. size_t new_size = task->output.cursor + 4 - task->output.buffer;
  45. /* FIXME: Rethink about how the error should be reported. */
  46. --- recode-3.6.orig/src/task.c
  47. +++ recode-3.6/src/task.c
  48. @@ -1198,6 +1198,8 @@
  49. else
  50. success = transform_mere_copy (subtask);
  51. + task->output = subtask->output;
  52. +
  53. if (subtask->input.name && *subtask->input.name)
  54. fclose (subtask->input.file);
  55. if (subtask->output.name && *subtask->output.name)
  56. --- recode-3.6.orig/src/hash.h
  57. +++ recode-3.6/src/hash.h
  58. @@ -21,6 +21,11 @@
  59. /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
  60. obstacks instead of malloc, and recompile `hash.c' with same setting. */
  61. +#define hash_lookup recode_hash_lookup
  62. +#define hash_delete recode_hash_delete
  63. +#define hash_free recode_hash_free
  64. +#define hash_insert recode_hash_insert
  65. +
  66. #ifndef PARAMS
  67. # if PROTOTYPES || __STDC__
  68. # define PARAMS(Args) Args