Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/archivers/lha/files/patch-crcio.c
16147 views
1
--- src/crcio.c.orig 2000-10-04 14:57:38 UTC
2
+++ src/crcio.c
3
@@ -66,8 +66,7 @@ calccrc(p, n)
4
5
/* ------------------------------------------------------------------------ */
6
void
7
-fillbuf(n) /* Shift bitbuf n bits left, read n bits */
8
- unsigned char n;
9
+fillbuf(unsigned char n) /* Shift bitbuf n bits left, read n bits */
10
{
11
while (n > bitcount) {
12
n -= bitcount;
13
@@ -87,8 +86,7 @@ fillbuf(n) /* Shift bitbuf n bits left
14
15
/* ------------------------------------------------------------------------ */
16
unsigned short
17
-getbits(n)
18
- unsigned char n;
19
+getbits(unsigned char n)
20
{
21
unsigned short x;
22
23
@@ -99,9 +97,7 @@ getbits(n)
24
25
/* ------------------------------------------------------------------------ */
26
void
27
-putcode(n, x) /* Write rightmost n bits of x */
28
- unsigned char n;
29
- unsigned short x;
30
+putcode(unsigned char n, unsigned short x) /* Write rightmost n bits of x */
31
{
32
while (n >= bitcount) {
33
n -= bitcount;
34
@@ -126,9 +122,7 @@ putcode(n, x) /* Write rightmost n bit
35
36
/* ------------------------------------------------------------------------ */
37
void
38
-putbits(n, x) /* Write rightmost n bits of x */
39
- unsigned char n;
40
- unsigned short x;
41
+putbits(unsigned char n, unsigned short x) /* Write rightmost n bits of x */
42
{
43
x <<= USHRT_BIT - n;
44
while (n >= bitcount) {
45
@@ -308,7 +302,7 @@ fread_txt(p, n, fp)
46
c = '\r';
47
}
48
#ifdef EUC
49
- else if (euc_mode && (c == 0x8E || 0xA0 < c && c < 0xFF)) {
50
+ else if (euc_mode && (c == 0x8E || (0xA0 < c && c < 0xFF))) {
51
int d = fgetc(fp);
52
if (d == EOF) {
53
*p++ = c;
54
55