Files
perl-Digest-Nilsimsa/no_undef_operation.patch
Lars Vogdt c24e3917aa Accepting request 41913 from home:jnweiger:branches:home:driesverachtert
Copy from home:jnweiger:branches:home:driesverachtert/perl-Digest-Nilsimsa via accept of submit request 41913 revision 8.
Request was accepted with message:
immer rein damit!

OBS-URL: https://build.opensuse.org/request/show/41913
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Digest-Nilsimsa?expand=0&rev=1
2010-06-22 15:42:45 +00:00

52 lines
1.4 KiB
Diff

--- Digest-Nilsimsa-0.06/_nilsimsa.c.orig 2002-06-13 06:15:03.000000000 +0200
+++ Digest-Nilsimsa-0.06/_nilsimsa.c 2010-06-22 01:05:21.000000000 +0200
@@ -256,7 +256,7 @@ int accbuf(unsigned char *buf,int buflen
* -3 error, buf contains illegal chars (>255)
*/
{unsigned int chcount;
- char msg[512];
+ // char msg[512];
int ch,lastch[4],hflag;
int illegalchars = 0;
catflag = noheaderflag = 0;
@@ -324,7 +324,9 @@ int accfile(FILE *file,struct nsrecord *
hflag=noheaderflag;
do {ch=mboxflag?defromulate(file):getc(file);
if (ch>=0)
+ {
if (hflag)
+ {
if ((lastch[0]=='\n' && lastch[1]=='\n')
||(lastch[0]=='\r' && lastch[1]=='\r')
||(lastch[0]=='\n' && lastch[1]=='\r' && lastch[2]=='\n' && lastch[3]=='\r'))
@@ -333,6 +335,7 @@ int accfile(FILE *file,struct nsrecord *
}
else
;
+ }
else
;
if (!hflag && ch>=0)
@@ -353,6 +356,7 @@ int accfile(FILE *file,struct nsrecord *
a->acc[tran3(lastch[3],lastch[2],ch,7)]++;
}
}
+ }
lastch[3]=lastch[2];
lastch[2]=lastch[1];
lastch[1]=lastch[0];
@@ -476,7 +480,12 @@ int codeorfile(struct nsrecord *a,char *
makecode(a);
if (ret==-3)
a->flag=INVALID;
- ret+=!++ret;
+
+ // he had this here: ret+=!++ret;
+ // I guess this was meant:
+ ret++;
+ if (!ret) ret++;
+
return ret;
}