Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37564556
en ru br
Репозитории ALT
S:3.7.12-alt1
5.1: 3.6-alt8
4.1: 3.6-alt6.1.0
4.0: 3.6-alt6.1.0
3.0: 3.6-alt6
www.altlinux.org/Changes

Группа :: Работа с текстами
Пакет: recode

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: recode4python.patch
Скачать


diff -Naurp recode-3.6.orig/src/hash.h recode-3.6/src/hash.h
--- recode-3.6.orig/src/hash.h	2000-08-03 04:21:15 +0300
+++ recode-3.6/src/hash.h	2004-12-03 09:20:16 +0200
@@ -21,6 +21,11 @@
 /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use
    obstacks instead of malloc, and recompile `hash.c' with same setting.  */
 
+#define hash_lookup recode_hash_lookup
+#define hash_delete recode_hash_delete
+#define hash_free   recode_hash_free
+#define hash_insert recode_hash_insert
+
 #ifndef PARAMS
 # if PROTOTYPES || __STDC__
 #  define PARAMS(Args) Args
diff -Naurp recode-3.6.orig/src/libiconv.c recode-3.6/src/libiconv.c
--- recode-3.6.orig/src/libiconv.c	2000-07-01 20:13:25 +0300
+++ recode-3.6/src/libiconv.c	2004-12-03 09:20:16 +0200
@@ -1,5 +1,5 @@
 /* Conversion of files between different charsets and surfaces.
-   Copyright ╘ 1999, 2000 Free Software Foundation, Inc.
+   Copyright ╘ 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by FranГois Pinard <pinard@iro.umontreal.ca>, 1999,
    and Bruno Haible <haible@clisp.cons.org>, 2000.
 
@@ -195,12 +195,17 @@ wrapped_transform (iconv_t conversion, i
 	 memcpy() doesn't do here, because the regions might overlap.
 	 memmove() isn't worth it, because we rarely have to move more
 	 than 12 bytes.  */
-      if (input > input_buffer && input_left > 0)
+      cursor = input_buffer;
+      if (input_left > 0)
 	{
-	  cursor = input_buffer;
-	  do
-	    *cursor++ = *input++;
-	  while (--input_left > 0);
+	  if (input > input_buffer)
+	    {
+	      do
+		*cursor++ = *input++;
+	      while (--input_left > 0);
+	    }
+	  else
+	    cursor += input_left;
 	}
     }
 
diff -Naurp recode-3.6.orig/src/request.c recode-3.6/src/request.c
--- recode-3.6.orig/src/request.c	2000-06-28 21:40:21 +0300
+++ recode-3.6/src/request.c	2004-12-03 09:20:16 +0200
@@ -1073,7 +1073,7 @@ guarantee_nul_terminator (RECODE_TASK ta
   if (task->output.cursor + 4 >= task->output.limit)
     {
       RECODE_OUTER outer = task->request->outer;
-      size_t old_size = task->output.limit - task->output.buffer;
+      size_t old_size = task->output.cursor - task->output.buffer;
       size_t new_size = task->output.cursor + 4 - task->output.buffer;
 
       /* FIXME: Rethink about how the error should be reported.  */
diff -Naurp recode-3.6.orig/src/task.c recode-3.6/src/task.c
--- recode-3.6.orig/src/task.c	2000-07-01 20:50:43 +0300
+++ recode-3.6/src/task.c	2004-12-03 09:20:16 +0200
@@ -1198,6 +1198,8 @@ recode_perform_task (RECODE_TASK task)
       else
 	success = transform_mere_copy (subtask);
 
+      task->output = subtask->output;
+       
       if (subtask->input.name && *subtask->input.name)
 	fclose (subtask->input.file);
       if (subtask->output.name && *subtask->output.name)
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin