OpenSDE Packages Database (without history before r20070)
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.

90 lines
3.1 KiB

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