Репозиторий Sisyphus
Последнее обновление: 20 сентября 2019 | Пакетов: 17455 | Посещений: 15130704
en ru br
Репозитории ALT
S:0.0.4-alt2
5.1: 0.0.4-alt1
4.1: 0.0.4-alt1
4.0: 0.0.4-alt1
3.0: 0.0.4-alt1
www.altlinux.org/Changes

Группа :: Архивирование/Резервное копирование
Пакет: dvbackup

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

Патч: dvbackup-0.0.4-alt-rsbep.diff
Скачать


--- rsbep0.0.5/rsbep.c.orig	2001-11-10 16:41:17 +0300
+++ rsbep0.0.5/rsbep.c	2004-04-08 16:13:07 +0400
@@ -174,7 +174,7 @@
                                                 }
                                                 else
                                                 {       //on we go:
-                                                        sscanf(phdr,"%9s %d %d %d %20s",&nam,&rsb,&rsd,&bep,&mag);
+                                                        sscanf(phdr,"%9s %d %d %d %20s",nam,&rsb,&rsd,&bep,mag);
                                                         if( 0!=strncmp(RSBEP_HDR,nam,strlen(RSBEP_HDR)) ||
 							    0!=strncmp(RSBEP_MAGIC_NUM,mag,strlen(RSBEP_MAGIC_NUM)) || 
                                                             (!override && (rs_bsize!=rsb || rs_dsize!=rsd || bep_size!=bep)) )
@@ -300,19 +300,19 @@
         }
         else if(!override)
         {
-                sscanf(phdr,"%9s %d %d %d %s",&name,&rs_bsize,&rs_dsize,&bep_size,&mag);
+                sscanf(phdr,"%9s %ld %ld %ld %s",name,&rs_bsize,&rs_dsize,&bep_size,mag);
                 if( 0!=strcmp(RSBEP_HDR,name) || rs_bsize>255 || rs_dsize>253 ||
                     bep_size<rs_bsize || rs_bsize<32 || rs_dsize<30 || 
 		    0!=strncmp(RSBEP_MAGIC_NUM,mag,strlen(RSBEP_MAGIC_NUM)))
                 {
-                        if(!quiet) fprintf(stderr,"%s: got non rsbep-stream, bailing (rs_bsize=%d, rs_dsize=%d, bep_size=%d).\n",
+                        if(!quiet) fprintf(stderr,"%s: got non rsbep-stream, bailing (rs_bsize=%ld, rs_dsize=%ld, bep_size=%ld).\n",
                                   argv[0],rs_bsize,rs_dsize,bep_size);
                         exit(-1);
                 }
         }
         else
         {
-                if(!quiet) fprintf(stderr,"%s: overriding header-settings (rs_bsize=%d, rs_dsize=%d, bep_size=%d).\n",
+                if(!quiet) fprintf(stderr,"%s: overriding header-settings (rs_bsize=%ld, rs_dsize=%ld, bep_size=%ld).\n",
                            argv[0],rs_bsize,rs_dsize,bep_size);
         }
         //get the buffers we need (here we know how large):
@@ -345,7 +345,7 @@
                 {
                         int rsb,rsd,bep;
                         char nam[PHDR_LEN];
-                        sscanf(phdr,"%9s %d %d %d %20s",&nam,&rsb,&rsd,&bep,&mag);
+                        sscanf(phdr,"%9s %d %d %d %20s",nam,&rsb,&rsd,&bep,mag);
                         if( 0!=strncmp(RSBEP_HDR,nam,strlen(RSBEP_HDR)) || 
 			    0!=strncmp(RSBEP_MAGIC_NUM,mag,strlen(RSBEP_MAGIC_NUM)) || 
                             (!override && (rs_bsize!=rsb || rs_dsize!=rsd || bep_size!=bep)) )
@@ -388,7 +388,7 @@
         while (!feof(stdin))
         {
                 //write header for every rsbep-buffer-block:
-                fprintf(stdout,"%s %d %d %d %s\n",RSBEP_HDR,rs_bsize,rs_dsize,bep_size,RSBEP_MAGIC_NUM);
+                fprintf(stdout,"%s %ld %ld %ld %s\n",RSBEP_HDR,rs_bsize,rs_dsize,bep_size,RSBEP_MAGIC_NUM);
                 //now encode and write the block:
                 for(i=0;i<bep_size;i++)
                 {
--- rsbep0.0.5/rs32.c.orig	2001-08-28 17:07:44 +0400
+++ rsbep0.0.5/rs32.c	2004-04-08 16:26:32 +0400
@@ -247,8 +247,7 @@
 	int syn_error, count;
 	unsigned char st[NN-KK];
 
-/*#define noasm */
-#ifdef noasm
+#ifndef ASM_I386
 	memset(st,0,sizeof(st));
 	for(i=254;i>=0;i--)
 		for(j=0;j<32;j++)
--- rsbep0.0.5/rs32.h.orig	2001-08-28 17:07:44 +0400
+++ rsbep0.0.5/rs32.h	2004-04-08 16:29:28 +0400
@@ -40,7 +40,7 @@
  * bb[] may lie past the end of the data, e.g., for (255,223):
  *	encode_rs(&data[0],&data[223]);
  */
-int rs32e(dtype data[KK], dtype bb[NN-KK]);
+int rse32(dtype data[KK], dtype bb[NN-KK]);
 
 /* Reed-Solomon erasures-and-errors decoding
  * The received block goes into data[], and a list of zero-origin
@@ -50,4 +50,4 @@
  * the number of corrected symbols. If the codeword is illegal or
  * uncorrectible, the data array is unchanged and -1 is returned
  */
-int rs32d(dtype data[NN], int eras_pos[], int no_eras);
+int rsd32(dtype data[NN], int eras_pos[], int no_eras);
--- rsbep0.0.5/rs32.c.orig	2004-04-08 16:30:23 +0400
+++ rsbep0.0.5/rs32.c	2004-04-08 16:31:24 +0400
@@ -11,6 +11,7 @@
  * for the Pentium.
  */
 #include <stdio.h>
+#include <string.h>
 #include "rs32.h"
 
 /* Primitive polynomials - see Lin & Costello, Appendix A,
--- rsbep0.0.5/rs.h.orig	2001-08-28 17:07:44 +0400
+++ rsbep0.0.5/rs.h	2004-04-11 14:05:24 +0400
@@ -3,13 +3,15 @@
  */
 /* Set one of these to enable encoder/decoder debugging and error checking,
  * at the expense of speed */
-#undef DEBUG 1
-#undef DEBUG 2
+/* #define DEBUG 1 */
+/* #define DEBUG 2 */
+#undef DEBUG
 
 /* To select the CCSDS standard (255,223) code, define CCSDS. This
  * implies standard values for MM, KK, B0 and PRIM.
  */
-#undef CCSDS 1
+/* define CCSDS 1 */
+#undef CCSDS
 #ifndef CCSDS
 
 /* Otherwise, leave CCSDS undefined and set the parameters below:
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin