version 1.3, 1997/02/25 00:04:28 |
version 1.4, 2001/11/19 19:02:18 |
|
|
} |
} |
|
|
zz_write(p, n) |
zz_write(p, n) |
register char *p; |
char *p; |
register n; |
int n; |
{ |
{ |
if (tt.tt_nmodes != tt.tt_modes) |
if (tt.tt_nmodes != tt.tt_modes) |
zz_setmodes(tt.tt_nmodes); |
zz_setmodes(tt.tt_nmodes); |
|
|
} |
} |
|
|
zz_move(row, col) |
zz_move(row, col) |
register row, col; |
int row, col; |
{ |
{ |
register x; |
int x; |
|
|
if (tt.tt_row == row) { |
if (tt.tt_row == row) { |
same_row: |
same_row: |
|
|
zz_rint(p, n) |
zz_rint(p, n) |
char *p; |
char *p; |
{ |
{ |
register i; |
int i; |
register char *q; |
char *q; |
|
|
if (!zz_ecc) |
if (!zz_ecc) |
return n; |
return n; |
for (i = n, q = p; --i >= 0;) { |
for (i = n, q = p; --i >= 0;) { |
register c = (unsigned char) *p++; |
int c = (unsigned char) *p++; |
|
|
if (zz_lastc == 0) { |
if (zz_lastc == 0) { |
switch (c) { |
switch (c) { |
|
|
} |
} |
|
|
zz_checksum(p, n) |
zz_checksum(p, n) |
register char *p; |
char *p; |
register n; |
int n; |
{ |
{ |
while (--n >= 0) { |
while (--n >= 0) { |
register c = *p++ & 0x7f; |
int c = *p++ & 0x7f; |
c ^= zz_sum; |
c ^= zz_sum; |
zz_sum = c << 1 | c >> 11 & 1; |
zz_sum = c << 1 | c >> 11 & 1; |
} |
} |