parent
b0ae8a46a0
commit
c5bfba483f
15 changed files with 279 additions and 271 deletions
|
|
@ -497,7 +497,7 @@ void
|
||||||
xls(int argc, char **argv)
|
xls(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *err, *name, *xname, *f[4], buf[4096];
|
char *err, *name, *xname, *f[4], buf[4096];
|
||||||
int nf, i, j, l, sort;
|
int i, j, l, sort;
|
||||||
int lflag, dflag, tflag, n, len[4];
|
int lflag, dflag, tflag, n, len[4];
|
||||||
Dir *d;
|
Dir *d;
|
||||||
CFid *fid;
|
CFid *fid;
|
||||||
|
|
@ -569,7 +569,7 @@ xls(int argc, char **argv)
|
||||||
d[i].dev = 0;
|
d[i].dev = 0;
|
||||||
snprint(buf, sizeof buf, "%d %s %s %lld",
|
snprint(buf, sizeof buf, "%d %s %s %lld",
|
||||||
d[i].dev, d[i].uid, d[i].gid, d[i].length);
|
d[i].dev, d[i].uid, d[i].gid, d[i].length);
|
||||||
nf = getfields(buf, f, 4, 0, " ");
|
getfields(buf, f, 4, 0, " ");
|
||||||
for(j=0; j<4; j++){
|
for(j=0; j<4; j++){
|
||||||
l = strlen(f[j]);
|
l = strlen(f[j]);
|
||||||
if(l > len[j])
|
if(l > len[j])
|
||||||
|
|
|
||||||
|
|
@ -337,6 +337,7 @@ parsedefn(char *p, Type *t, char **pp)
|
||||||
oops();
|
oops();
|
||||||
sign = (*p == 's');
|
sign = (*p == 's');
|
||||||
p++;
|
p++;
|
||||||
|
ischar = 0;
|
||||||
if(*p == 'c'){
|
if(*p == 'c'){
|
||||||
ischar = 1;
|
ischar = 1;
|
||||||
p++;
|
p++;
|
||||||
|
|
@ -353,6 +354,8 @@ parsedefn(char *p, Type *t, char **pp)
|
||||||
t->printfmt = 'd';
|
t->printfmt = 'd';
|
||||||
else
|
else
|
||||||
t->printfmt = 'x';
|
t->printfmt = 'x';
|
||||||
|
USED(bits);
|
||||||
|
USED(ischar);
|
||||||
break;
|
break;
|
||||||
case 'R': /* fp type */
|
case 'R': /* fp type */
|
||||||
n = parseint(&p);
|
n = parseint(&p);
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ moon(void)
|
||||||
* planetary terms in parallax
|
* planetary terms in parallax
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spterms = spterms;
|
//spterms = spterms;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* computation of longitude
|
* computation of longitude
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ p9crclient(Conv *c)
|
||||||
res = nil;
|
res = nil;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
attr = c->attr;
|
attr = c->attr;
|
||||||
|
astype = -1;
|
||||||
|
|
||||||
if(c->proto == &p9cr){
|
if(c->proto == &p9cr){
|
||||||
astype = AuthChal;
|
astype = AuthChal;
|
||||||
|
|
@ -131,6 +132,7 @@ p9crclient(Conv *c)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
USED(astype);
|
||||||
keyclose(k);
|
keyclose(k);
|
||||||
if(c->attr != attr)
|
if(c->attr != attr)
|
||||||
freeattr(attr);
|
freeattr(attr);
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,6 @@ getdsakey(int argc, char **argv, int needprivate, Attr **pa)
|
||||||
char *file, *s, *p;
|
char *file, *s, *p;
|
||||||
DSApriv *key;
|
DSApriv *key;
|
||||||
Biobuf *b;
|
Biobuf *b;
|
||||||
int regen;
|
|
||||||
Attr *a;
|
Attr *a;
|
||||||
|
|
||||||
if(argc == 0)
|
if(argc == 0)
|
||||||
|
|
@ -190,7 +189,6 @@ getdsakey(int argc, char **argv, int needprivate, Attr **pa)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
regen = 0;
|
|
||||||
a = _parseattr(s+4);
|
a = _parseattr(s+4);
|
||||||
if(a == nil){
|
if(a == nil){
|
||||||
werrstr("empty key");
|
werrstr("empty key");
|
||||||
|
|
|
||||||
|
|
@ -973,6 +973,7 @@ runmsg(Aconn *a)
|
||||||
|
|
||||||
case SSH_AGENTC_RSA_CHALLENGE:
|
case SSH_AGENTC_RSA_CHALLENGE:
|
||||||
n = get4(&m);
|
n = get4(&m);
|
||||||
|
USED(n);
|
||||||
ek = getmp(&m);
|
ek = getmp(&m);
|
||||||
mod = getmp(&m);
|
mod = getmp(&m);
|
||||||
chal = getmp(&m);
|
chal = getmp(&m);
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------*/
|
/*-------------------------------------------------------------*/
|
||||||
/*--- Private header file for the library. ---*/
|
/*--- Private header file for the library. ---*/
|
||||||
/*--- bzlib_private.h ---*/
|
/*--- bzlib_private.h ---*/
|
||||||
/*-------------------------------------------------------------*/
|
/*-------------------------------------------------------------*/
|
||||||
|
|
||||||
/*--
|
/*--
|
||||||
|
|
@ -27,24 +27,24 @@
|
||||||
are met:
|
are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
1. Redistributions of source code must retain the above copyright
|
||||||
notice, this list of conditions and the following disclaimer.
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. The origin of this software must not be misrepresented; you must
|
2. The origin of this software must not be misrepresented; you must
|
||||||
not claim that you wrote the original software. If you use this
|
not claim that you wrote the original software. If you use this
|
||||||
software in a product, an acknowledgment in the product
|
software in a product, an acknowledgment in the product
|
||||||
documentation would be appreciated but is not required.
|
documentation would be appreciated but is not required.
|
||||||
|
|
||||||
3. Altered source versions must be plainly marked as such, and must
|
3. Altered source versions must be plainly marked as such, and must
|
||||||
not be misrepresented as being the original software.
|
not be misrepresented as being the original software.
|
||||||
|
|
||||||
4. The name of the author may not be used to endorse or promote
|
4. The name of the author may not be used to endorse or promote
|
||||||
products derived from this software without specific prior written
|
products derived from this software without specific prior written
|
||||||
permission.
|
permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
|
@ -58,14 +58,14 @@
|
||||||
bzip2/libbzip2 version 1.0 of 21 March 2000
|
bzip2/libbzip2 version 1.0 of 21 March 2000
|
||||||
|
|
||||||
This program is based on (at least) the work of:
|
This program is based on (at least) the work of:
|
||||||
Mike Burrows
|
Mike Burrows
|
||||||
David Wheeler
|
David Wheeler
|
||||||
Peter Fenwick
|
Peter Fenwick
|
||||||
Alistair Moffat
|
Alistair Moffat
|
||||||
Radford Neal
|
Radford Neal
|
||||||
Ian H. Witten
|
Ian H. Witten
|
||||||
Robert Sedgewick
|
Robert Sedgewick
|
||||||
Jon L. Bentley
|
Jon L. Bentley
|
||||||
|
|
||||||
For more information on these sources, see the manual.
|
For more information on these sources, see the manual.
|
||||||
--*/
|
--*/
|
||||||
|
|
@ -85,29 +85,29 @@
|
||||||
/* these #defines can be overridden by bzlib_stdio.h */
|
/* these #defines can be overridden by bzlib_stdio.h */
|
||||||
extern void bz_internal_error ( int errcode );
|
extern void bz_internal_error ( int errcode );
|
||||||
#define AssertH(cond,errcode) \
|
#define AssertH(cond,errcode) \
|
||||||
{ if (!(cond)) bz_internal_error ( errcode ); }
|
{ if (!(cond)) bz_internal_error ( errcode ); }
|
||||||
#define AssertD(cond,msg) /* */
|
#define AssertD(cond,msg) /* */
|
||||||
#define VPrintf0(zf) /* */
|
#define VPrintf0(zf) USED(zf)
|
||||||
#define VPrintf1(zf,za1) /* */
|
#define VPrintf1(zf,za1) do { USED(zf); USED(za1); } while(0)
|
||||||
#define VPrintf2(zf,za1,za2) /* */
|
#define VPrintf2(zf,za1,za2) do { USED(zf); USED(za1); USED(za2); } while(0)
|
||||||
#define VPrintf3(zf,za1,za2,za3) /* */
|
#define VPrintf3(zf,za1,za2,za3) do { USED(zf); USED(za1); USED(za2); USED(za3); } while(0)
|
||||||
#define VPrintf4(zf,za1,za2,za3,za4) /* */
|
#define VPrintf4(zf,za1,za2,za3,za4) do { USED(zf); USED(za1); USED(za2); USED(za3); USED(za4); } while(0)
|
||||||
#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */
|
#define VPrintf5(zf,za1,za2,za3,za4,za5) do { USED(zf); USED(za1); USED(za2); USED(za3); USED(za4); USED(za5); } while(0)
|
||||||
|
|
||||||
#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1)
|
#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1)
|
||||||
#define BZFREE(ppp) (strm->bzfree)(strm->opaque,(ppp))
|
#define BZFREE(ppp) (strm->bzfree)(strm->opaque,(ppp))
|
||||||
|
|
||||||
|
|
||||||
/*-- Constants for the back end. --*/
|
/*-- Constants for the back end. --*/
|
||||||
|
|
||||||
#define BZ_MAX_ALPHA_SIZE 258
|
#define BZ_MAX_ALPHA_SIZE 258
|
||||||
#define BZ_MAX_CODE_LEN 23
|
#define BZ_MAX_CODE_LEN 23
|
||||||
|
|
||||||
#define BZ_RUNA 0
|
#define BZ_RUNA 0
|
||||||
#define BZ_RUNB 1
|
#define BZ_RUNB 1
|
||||||
|
|
||||||
#define BZ_N_GROUPS 6
|
#define BZ_N_GROUPS 6
|
||||||
#define BZ_G_SIZE 50
|
#define BZ_G_SIZE 50
|
||||||
#define BZ_N_ITERS 4
|
#define BZ_N_ITERS 4
|
||||||
|
|
||||||
#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))
|
#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))
|
||||||
|
|
@ -118,23 +118,23 @@ extern void bz_internal_error ( int errcode );
|
||||||
|
|
||||||
extern Int32 BZ2_rNums[512];
|
extern Int32 BZ2_rNums[512];
|
||||||
|
|
||||||
#define BZ_RAND_DECLS \
|
#define BZ_RAND_DECLS \
|
||||||
Int32 rNToGo; \
|
Int32 rNToGo; \
|
||||||
Int32 rTPos \
|
Int32 rTPos \
|
||||||
|
|
||||||
#define BZ_RAND_INIT_MASK \
|
#define BZ_RAND_INIT_MASK \
|
||||||
s->rNToGo = 0; \
|
s->rNToGo = 0; \
|
||||||
s->rTPos = 0 \
|
s->rTPos = 0 \
|
||||||
|
|
||||||
#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0)
|
#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0)
|
||||||
|
|
||||||
#define BZ_RAND_UPD_MASK \
|
#define BZ_RAND_UPD_MASK \
|
||||||
if (s->rNToGo == 0) { \
|
if (s->rNToGo == 0) { \
|
||||||
s->rNToGo = BZ2_rNums[s->rTPos]; \
|
s->rNToGo = BZ2_rNums[s->rTPos]; \
|
||||||
s->rTPos++; \
|
s->rTPos++; \
|
||||||
if (s->rTPos == 512) s->rTPos = 0; \
|
if (s->rTPos == 512) s->rTPos = 0; \
|
||||||
} \
|
} \
|
||||||
s->rNToGo--;
|
s->rNToGo--;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -142,34 +142,34 @@ extern Int32 BZ2_rNums[512];
|
||||||
|
|
||||||
extern UInt32 BZ2_crc32Table[256];
|
extern UInt32 BZ2_crc32Table[256];
|
||||||
|
|
||||||
#define BZ_INITIALISE_CRC(crcVar) \
|
#define BZ_INITIALISE_CRC(crcVar) \
|
||||||
{ \
|
{ \
|
||||||
crcVar = 0xffffffffL; \
|
crcVar = 0xffffffffL; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BZ_FINALISE_CRC(crcVar) \
|
#define BZ_FINALISE_CRC(crcVar) \
|
||||||
{ \
|
{ \
|
||||||
crcVar = ~(crcVar); \
|
crcVar = ~(crcVar); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BZ_UPDATE_CRC(crcVar,cha) \
|
#define BZ_UPDATE_CRC(crcVar,cha) \
|
||||||
{ \
|
{ \
|
||||||
crcVar = (crcVar << 8) ^ \
|
crcVar = (crcVar << 8) ^ \
|
||||||
BZ2_crc32Table[(crcVar >> 24) ^ \
|
BZ2_crc32Table[(crcVar >> 24) ^ \
|
||||||
((UChar)cha)]; \
|
((UChar)cha)]; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*-- States and modes for compression. --*/
|
/*-- States and modes for compression. --*/
|
||||||
|
|
||||||
#define BZ_M_IDLE 1
|
#define BZ_M_IDLE 1
|
||||||
#define BZ_M_RUNNING 2
|
#define BZ_M_RUNNING 2
|
||||||
#define BZ_M_FLUSHING 3
|
#define BZ_M_FLUSHING 3
|
||||||
#define BZ_M_FINISHING 4
|
#define BZ_M_FINISHING 4
|
||||||
|
|
||||||
#define BZ_S_OUTPUT 1
|
#define BZ_S_OUTPUT 1
|
||||||
#define BZ_S_INPUT 2
|
#define BZ_S_INPUT 2
|
||||||
|
|
||||||
#define BZ_N_RADIX 2
|
#define BZ_N_RADIX 2
|
||||||
#define BZ_N_QSORT 12
|
#define BZ_N_QSORT 12
|
||||||
|
|
@ -182,76 +182,76 @@ extern UInt32 BZ2_crc32Table[256];
|
||||||
/*-- Structure holding all the compression-side stuff. --*/
|
/*-- Structure holding all the compression-side stuff. --*/
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
struct {
|
struct {
|
||||||
/* pointer back to the struct bz_stream */
|
/* pointer back to the struct bz_stream */
|
||||||
bz_stream* strm;
|
bz_stream* strm;
|
||||||
|
|
||||||
/* mode this stream is in, and whether inputting */
|
/* mode this stream is in, and whether inputting */
|
||||||
/* or outputting data */
|
/* or outputting data */
|
||||||
Int32 mode;
|
Int32 mode;
|
||||||
Int32 state;
|
Int32 state;
|
||||||
|
|
||||||
/* remembers avail_in when flush/finish requested */
|
/* remembers avail_in when flush/finish requested */
|
||||||
UInt32 avail_in_expect;
|
UInt32 avail_in_expect;
|
||||||
|
|
||||||
/* for doing the block sorting */
|
/* for doing the block sorting */
|
||||||
UInt32* arr1;
|
UInt32* arr1;
|
||||||
UInt32* arr2;
|
UInt32* arr2;
|
||||||
UInt32* ftab;
|
UInt32* ftab;
|
||||||
Int32 origPtr;
|
Int32 origPtr;
|
||||||
|
|
||||||
/* aliases for arr1 and arr2 */
|
/* aliases for arr1 and arr2 */
|
||||||
UInt32* ptr;
|
UInt32* ptr;
|
||||||
UChar* block;
|
UChar* block;
|
||||||
UInt16* mtfv;
|
UInt16* mtfv;
|
||||||
UChar* zbits;
|
UChar* zbits;
|
||||||
|
|
||||||
/* for deciding when to use the fallback sorting algorithm */
|
/* for deciding when to use the fallback sorting algorithm */
|
||||||
Int32 workFactor;
|
Int32 workFactor;
|
||||||
|
|
||||||
/* run-length-encoding of the input */
|
/* run-length-encoding of the input */
|
||||||
UInt32 state_in_ch;
|
UInt32 state_in_ch;
|
||||||
Int32 state_in_len;
|
Int32 state_in_len;
|
||||||
BZ_RAND_DECLS;
|
BZ_RAND_DECLS;
|
||||||
|
|
||||||
/* input and output limits and current posns */
|
/* input and output limits and current posns */
|
||||||
Int32 nblock;
|
Int32 nblock;
|
||||||
Int32 nblockMAX;
|
Int32 nblockMAX;
|
||||||
Int32 numZ;
|
Int32 numZ;
|
||||||
Int32 state_out_pos;
|
Int32 state_out_pos;
|
||||||
|
|
||||||
/* map of bytes used in block */
|
/* map of bytes used in block */
|
||||||
Int32 nInUse;
|
Int32 nInUse;
|
||||||
Bool inUse[256];
|
Bool inUse[256];
|
||||||
UChar unseqToSeq[256];
|
UChar unseqToSeq[256];
|
||||||
|
|
||||||
/* the buffer for bit stream creation */
|
/* the buffer for bit stream creation */
|
||||||
UInt32 bsBuff;
|
UInt32 bsBuff;
|
||||||
Int32 bsLive;
|
Int32 bsLive;
|
||||||
|
|
||||||
/* block and combined CRCs */
|
/* block and combined CRCs */
|
||||||
UInt32 blockCRC;
|
UInt32 blockCRC;
|
||||||
UInt32 combinedCRC;
|
UInt32 combinedCRC;
|
||||||
|
|
||||||
/* misc administratium */
|
/* misc administratium */
|
||||||
Int32 verbosity;
|
Int32 verbosity;
|
||||||
Int32 blockNo;
|
Int32 blockNo;
|
||||||
Int32 blockSize100k;
|
Int32 blockSize100k;
|
||||||
|
|
||||||
/* stuff for coding the MTF values */
|
/* stuff for coding the MTF values */
|
||||||
Int32 nMTF;
|
Int32 nMTF;
|
||||||
Int32 mtfFreq [BZ_MAX_ALPHA_SIZE];
|
Int32 mtfFreq [BZ_MAX_ALPHA_SIZE];
|
||||||
UChar selector [BZ_MAX_SELECTORS];
|
UChar selector [BZ_MAX_SELECTORS];
|
||||||
UChar selectorMtf[BZ_MAX_SELECTORS];
|
UChar selectorMtf[BZ_MAX_SELECTORS];
|
||||||
|
|
||||||
UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
Int32 code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
Int32 code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
Int32 rfreq [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
Int32 rfreq [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
/* second dimension: only 3 needed; 4 makes index calculations faster */
|
/* second dimension: only 3 needed; 4 makes index calculations faster */
|
||||||
UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4];
|
UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4];
|
||||||
|
|
||||||
}
|
}
|
||||||
EState;
|
EState;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -276,50 +276,50 @@ BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
|
||||||
|
|
||||||
/*-- states for decompression. --*/
|
/*-- states for decompression. --*/
|
||||||
|
|
||||||
#define BZ_X_IDLE 1
|
#define BZ_X_IDLE 1
|
||||||
#define BZ_X_OUTPUT 2
|
#define BZ_X_OUTPUT 2
|
||||||
|
|
||||||
#define BZ_X_MAGIC_1 10
|
#define BZ_X_MAGIC_1 10
|
||||||
#define BZ_X_MAGIC_2 11
|
#define BZ_X_MAGIC_2 11
|
||||||
#define BZ_X_MAGIC_3 12
|
#define BZ_X_MAGIC_3 12
|
||||||
#define BZ_X_MAGIC_4 13
|
#define BZ_X_MAGIC_4 13
|
||||||
#define BZ_X_BLKHDR_1 14
|
#define BZ_X_BLKHDR_1 14
|
||||||
#define BZ_X_BLKHDR_2 15
|
#define BZ_X_BLKHDR_2 15
|
||||||
#define BZ_X_BLKHDR_3 16
|
#define BZ_X_BLKHDR_3 16
|
||||||
#define BZ_X_BLKHDR_4 17
|
#define BZ_X_BLKHDR_4 17
|
||||||
#define BZ_X_BLKHDR_5 18
|
#define BZ_X_BLKHDR_5 18
|
||||||
#define BZ_X_BLKHDR_6 19
|
#define BZ_X_BLKHDR_6 19
|
||||||
#define BZ_X_BCRC_1 20
|
#define BZ_X_BCRC_1 20
|
||||||
#define BZ_X_BCRC_2 21
|
#define BZ_X_BCRC_2 21
|
||||||
#define BZ_X_BCRC_3 22
|
#define BZ_X_BCRC_3 22
|
||||||
#define BZ_X_BCRC_4 23
|
#define BZ_X_BCRC_4 23
|
||||||
#define BZ_X_RANDBIT 24
|
#define BZ_X_RANDBIT 24
|
||||||
#define BZ_X_ORIGPTR_1 25
|
#define BZ_X_ORIGPTR_1 25
|
||||||
#define BZ_X_ORIGPTR_2 26
|
#define BZ_X_ORIGPTR_2 26
|
||||||
#define BZ_X_ORIGPTR_3 27
|
#define BZ_X_ORIGPTR_3 27
|
||||||
#define BZ_X_MAPPING_1 28
|
#define BZ_X_MAPPING_1 28
|
||||||
#define BZ_X_MAPPING_2 29
|
#define BZ_X_MAPPING_2 29
|
||||||
#define BZ_X_SELECTOR_1 30
|
#define BZ_X_SELECTOR_1 30
|
||||||
#define BZ_X_SELECTOR_2 31
|
#define BZ_X_SELECTOR_2 31
|
||||||
#define BZ_X_SELECTOR_3 32
|
#define BZ_X_SELECTOR_3 32
|
||||||
#define BZ_X_CODING_1 33
|
#define BZ_X_CODING_1 33
|
||||||
#define BZ_X_CODING_2 34
|
#define BZ_X_CODING_2 34
|
||||||
#define BZ_X_CODING_3 35
|
#define BZ_X_CODING_3 35
|
||||||
#define BZ_X_MTF_1 36
|
#define BZ_X_MTF_1 36
|
||||||
#define BZ_X_MTF_2 37
|
#define BZ_X_MTF_2 37
|
||||||
#define BZ_X_MTF_3 38
|
#define BZ_X_MTF_3 38
|
||||||
#define BZ_X_MTF_4 39
|
#define BZ_X_MTF_4 39
|
||||||
#define BZ_X_MTF_5 40
|
#define BZ_X_MTF_5 40
|
||||||
#define BZ_X_MTF_6 41
|
#define BZ_X_MTF_6 41
|
||||||
#define BZ_X_ENDHDR_2 42
|
#define BZ_X_ENDHDR_2 42
|
||||||
#define BZ_X_ENDHDR_3 43
|
#define BZ_X_ENDHDR_3 43
|
||||||
#define BZ_X_ENDHDR_4 44
|
#define BZ_X_ENDHDR_4 44
|
||||||
#define BZ_X_ENDHDR_5 45
|
#define BZ_X_ENDHDR_5 45
|
||||||
#define BZ_X_ENDHDR_6 46
|
#define BZ_X_ENDHDR_6 46
|
||||||
#define BZ_X_CCRC_1 47
|
#define BZ_X_CCRC_1 47
|
||||||
#define BZ_X_CCRC_2 48
|
#define BZ_X_CCRC_2 48
|
||||||
#define BZ_X_CCRC_3 49
|
#define BZ_X_CCRC_3 49
|
||||||
#define BZ_X_CCRC_4 50
|
#define BZ_X_CCRC_4 50
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -333,132 +333,132 @@ BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
|
||||||
/*-- Structure holding all the decompression-side stuff. --*/
|
/*-- Structure holding all the decompression-side stuff. --*/
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
struct {
|
struct {
|
||||||
/* pointer back to the struct bz_stream */
|
/* pointer back to the struct bz_stream */
|
||||||
bz_stream* strm;
|
bz_stream* strm;
|
||||||
|
|
||||||
/* state indicator for this stream */
|
/* state indicator for this stream */
|
||||||
Int32 state;
|
Int32 state;
|
||||||
|
|
||||||
/* for doing the final run-length decoding */
|
/* for doing the final run-length decoding */
|
||||||
UChar state_out_ch;
|
UChar state_out_ch;
|
||||||
Int32 state_out_len;
|
Int32 state_out_len;
|
||||||
Bool blockRandomised;
|
Bool blockRandomised;
|
||||||
BZ_RAND_DECLS;
|
BZ_RAND_DECLS;
|
||||||
|
|
||||||
/* the buffer for bit stream reading */
|
/* the buffer for bit stream reading */
|
||||||
UInt32 bsBuff;
|
UInt32 bsBuff;
|
||||||
Int32 bsLive;
|
Int32 bsLive;
|
||||||
|
|
||||||
/* misc administratium */
|
/* misc administratium */
|
||||||
Int32 blockSize100k;
|
Int32 blockSize100k;
|
||||||
Bool smallDecompress;
|
Bool smallDecompress;
|
||||||
Int32 currBlockNo;
|
Int32 currBlockNo;
|
||||||
Int32 verbosity;
|
Int32 verbosity;
|
||||||
|
|
||||||
/* for undoing the Burrows-Wheeler transform */
|
/* for undoing the Burrows-Wheeler transform */
|
||||||
Int32 origPtr;
|
Int32 origPtr;
|
||||||
UInt32 tPos;
|
UInt32 tPos;
|
||||||
Int32 k0;
|
Int32 k0;
|
||||||
Int32 unzftab[256];
|
Int32 unzftab[256];
|
||||||
Int32 nblock_used;
|
Int32 nblock_used;
|
||||||
Int32 cftab[257];
|
Int32 cftab[257];
|
||||||
Int32 cftabCopy[257];
|
Int32 cftabCopy[257];
|
||||||
|
|
||||||
/* for undoing the Burrows-Wheeler transform (FAST) */
|
/* for undoing the Burrows-Wheeler transform (FAST) */
|
||||||
UInt32 *tt;
|
UInt32 *tt;
|
||||||
|
|
||||||
/* for undoing the Burrows-Wheeler transform (SMALL) */
|
/* for undoing the Burrows-Wheeler transform (SMALL) */
|
||||||
UInt16 *ll16;
|
UInt16 *ll16;
|
||||||
UChar *ll4;
|
UChar *ll4;
|
||||||
|
|
||||||
/* stored and calculated CRCs */
|
/* stored and calculated CRCs */
|
||||||
UInt32 storedBlockCRC;
|
UInt32 storedBlockCRC;
|
||||||
UInt32 storedCombinedCRC;
|
UInt32 storedCombinedCRC;
|
||||||
UInt32 calculatedBlockCRC;
|
UInt32 calculatedBlockCRC;
|
||||||
UInt32 calculatedCombinedCRC;
|
UInt32 calculatedCombinedCRC;
|
||||||
|
|
||||||
/* map of bytes used in block */
|
/* map of bytes used in block */
|
||||||
Int32 nInUse;
|
Int32 nInUse;
|
||||||
Bool inUse[256];
|
Bool inUse[256];
|
||||||
Bool inUse16[16];
|
Bool inUse16[16];
|
||||||
UChar seqToUnseq[256];
|
UChar seqToUnseq[256];
|
||||||
|
|
||||||
/* for decoding the MTF values */
|
/* for decoding the MTF values */
|
||||||
UChar mtfa [MTFA_SIZE];
|
UChar mtfa [MTFA_SIZE];
|
||||||
Int32 mtfbase[256 / MTFL_SIZE];
|
Int32 mtfbase[256 / MTFL_SIZE];
|
||||||
UChar selector [BZ_MAX_SELECTORS];
|
UChar selector [BZ_MAX_SELECTORS];
|
||||||
UChar selectorMtf[BZ_MAX_SELECTORS];
|
UChar selectorMtf[BZ_MAX_SELECTORS];
|
||||||
UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
|
|
||||||
Int32 limit [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
Int32 limit [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||||
Int32 minLens[BZ_N_GROUPS];
|
Int32 minLens[BZ_N_GROUPS];
|
||||||
|
|
||||||
/* save area for scalars in the main decompress code */
|
/* save area for scalars in the main decompress code */
|
||||||
Int32 save_i;
|
Int32 save_i;
|
||||||
Int32 save_j;
|
Int32 save_j;
|
||||||
Int32 save_t;
|
Int32 save_t;
|
||||||
Int32 save_alphaSize;
|
Int32 save_alphaSize;
|
||||||
Int32 save_nGroups;
|
Int32 save_nGroups;
|
||||||
Int32 save_nSelectors;
|
Int32 save_nSelectors;
|
||||||
Int32 save_EOB;
|
Int32 save_EOB;
|
||||||
Int32 save_groupNo;
|
Int32 save_groupNo;
|
||||||
Int32 save_groupPos;
|
Int32 save_groupPos;
|
||||||
Int32 save_nextSym;
|
Int32 save_nextSym;
|
||||||
Int32 save_nblockMAX;
|
Int32 save_nblockMAX;
|
||||||
Int32 save_nblock;
|
Int32 save_nblock;
|
||||||
Int32 save_es;
|
Int32 save_es;
|
||||||
Int32 save_N;
|
Int32 save_N;
|
||||||
Int32 save_curr;
|
Int32 save_curr;
|
||||||
Int32 save_zt;
|
Int32 save_zt;
|
||||||
Int32 save_zn;
|
Int32 save_zn;
|
||||||
Int32 save_zvec;
|
Int32 save_zvec;
|
||||||
Int32 save_zj;
|
Int32 save_zj;
|
||||||
Int32 save_gSel;
|
Int32 save_gSel;
|
||||||
Int32 save_gMinlen;
|
Int32 save_gMinlen;
|
||||||
Int32* save_gLimit;
|
Int32* save_gLimit;
|
||||||
Int32* save_gBase;
|
Int32* save_gBase;
|
||||||
Int32* save_gPerm;
|
Int32* save_gPerm;
|
||||||
|
|
||||||
}
|
}
|
||||||
DState;
|
DState;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*-- Macros for decompression. --*/
|
/*-- Macros for decompression. --*/
|
||||||
|
|
||||||
#define BZ_GET_FAST(cccc) \
|
#define BZ_GET_FAST(cccc) \
|
||||||
s->tPos = s->tt[s->tPos]; \
|
s->tPos = s->tt[s->tPos]; \
|
||||||
cccc = (UChar)(s->tPos & 0xff); \
|
cccc = (UChar)(s->tPos & 0xff); \
|
||||||
s->tPos >>= 8;
|
s->tPos >>= 8;
|
||||||
|
|
||||||
#define BZ_GET_FAST_C(cccc) \
|
#define BZ_GET_FAST_C(cccc) \
|
||||||
c_tPos = c_tt[c_tPos]; \
|
c_tPos = c_tt[c_tPos]; \
|
||||||
cccc = (UChar)(c_tPos & 0xff); \
|
cccc = (UChar)(c_tPos & 0xff); \
|
||||||
c_tPos >>= 8;
|
c_tPos >>= 8;
|
||||||
|
|
||||||
#define SET_LL4(i,n) \
|
#define SET_LL4(i,n) \
|
||||||
{ if (((i) & 0x1) == 0) \
|
{ if (((i) & 0x1) == 0) \
|
||||||
s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \
|
s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \
|
||||||
s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \
|
s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_LL4(i) \
|
#define GET_LL4(i) \
|
||||||
((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)
|
((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)
|
||||||
|
|
||||||
#define SET_LL(i,n) \
|
#define SET_LL(i,n) \
|
||||||
{ s->ll16[i] = (UInt16)(n & 0x0000ffff); \
|
{ s->ll16[i] = (UInt16)(n & 0x0000ffff); \
|
||||||
SET_LL4(i, n >> 16); \
|
SET_LL4(i, n >> 16); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_LL(i) \
|
#define GET_LL(i) \
|
||||||
(((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
|
(((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
|
||||||
|
|
||||||
#define BZ_GET_SMALL(cccc) \
|
#define BZ_GET_SMALL(cccc) \
|
||||||
cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \
|
cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \
|
||||||
s->tPos = GET_LL(s->tPos);
|
s->tPos = GET_LL(s->tPos);
|
||||||
|
|
||||||
|
|
||||||
/*-- externs for decompression. --*/
|
/*-- externs for decompression. --*/
|
||||||
|
|
@ -471,7 +471,7 @@ BZ2_decompress ( DState* );
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
|
BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
|
||||||
Int32, Int32, Int32 );
|
Int32, Int32, Int32 );
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -492,5 +492,5 @@ extern void
|
||||||
default_bzfree( void*, void* );
|
default_bzfree( void*, void* );
|
||||||
|
|
||||||
/*-------------------------------------------------------------*/
|
/*-------------------------------------------------------------*/
|
||||||
/*--- end bzlib_private.h ---*/
|
/*--- end bzlib_private.h ---*/
|
||||||
/*-------------------------------------------------------------*/
|
/*-------------------------------------------------------------*/
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,8 @@ readpsfontdesc(char *fontname, int trindex) {
|
||||||
startchar = RUNEGETCHAR(start);
|
startchar = RUNEGETCHAR(start);
|
||||||
endfont = RUNEGETGROUP(end);
|
endfont = RUNEGETGROUP(end);
|
||||||
endchar = RUNEGETCHAR(end);
|
endchar = RUNEGETCHAR(end);
|
||||||
|
USED(startchar);
|
||||||
|
USED(endchar);
|
||||||
pfid = findpfn(psfontnam, 1);
|
pfid = findpfn(psfontnam, 1);
|
||||||
if (startfont != endfont) {
|
if (startfont != endfont) {
|
||||||
error(WARNING, "font descriptions must not cross 256 glyph block boundary\n");
|
error(WARNING, "font descriptions must not cross 256 glyph block boundary\n");
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,7 @@ main(int argc, char *argv[])
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
}ARGEND
|
}ARGEND
|
||||||
|
USED(defmnt);
|
||||||
|
|
||||||
if(pipe(p) < 0)
|
if(pipe(p) < 0)
|
||||||
error("pipe failed");
|
error("pipe failed");
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ textgen(void)
|
||||||
int i, sub, nstr, at, with, hset;
|
int i, sub, nstr, at, with, hset;
|
||||||
double xwith, ywith, h, w, x0, y0, x1, y1;
|
double xwith, ywith, h, w, x0, y0, x1, y1;
|
||||||
obj *p, *ppos;
|
obj *p, *ppos;
|
||||||
static double prevh = 0;
|
|
||||||
static double prevw = 0;
|
|
||||||
Attr *ap;
|
Attr *ap;
|
||||||
|
|
||||||
at = with = nstr = hset = 0;
|
at = with = nstr = hset = 0;
|
||||||
|
|
@ -90,8 +88,6 @@ textgen(void)
|
||||||
cury = y1;
|
cury = y1;
|
||||||
else
|
else
|
||||||
cury = y0;
|
cury = y0;
|
||||||
prevh = h;
|
|
||||||
prevw = w;
|
|
||||||
return(p);
|
return(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ void n_setwd(void)
|
||||||
int delim, emsz, k;
|
int delim, emsz, k;
|
||||||
int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1;
|
int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1;
|
||||||
|
|
||||||
base = numtabp[ST].val = numtabp[ST].val = wid = numtabp[CT].val = 0;
|
base = numtabp[ST].val = numtabp[SB].val = wid = numtabp[CT].val = 0;
|
||||||
if (ismot(i = getch()))
|
if (ismot(i = getch()))
|
||||||
return;
|
return;
|
||||||
delim = cbits(i);
|
delim = cbits(i);
|
||||||
|
|
|
||||||
|
|
@ -217,11 +217,15 @@ void xbits(Tchar i, int bitf)
|
||||||
|
|
||||||
Tchar t_setch(int c)
|
Tchar t_setch(int c)
|
||||||
{
|
{
|
||||||
|
#ifndef UNICODE
|
||||||
int j;
|
int j;
|
||||||
|
#endif
|
||||||
char temp[50];
|
char temp[50];
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
|
#ifndef UNICODE
|
||||||
j = 0;
|
j = 0;
|
||||||
|
#endif
|
||||||
s = temp;
|
s = temp;
|
||||||
if (c == '(') { /* \(xx */
|
if (c == '(') { /* \(xx */
|
||||||
if ((*s++ = getach()) == 0 || (*s++ = getach()) == 0)
|
if ((*s++ = getach()) == 0 || (*s++ = getach()) == 0)
|
||||||
|
|
@ -711,9 +715,8 @@ char *strdupl(const char *s) /* make a copy of s */
|
||||||
int
|
int
|
||||||
setfp(int pos, int f, char *truename, int print) /* mount font f at position pos[0...nfonts] */
|
setfp(int pos, int f, char *truename, int print) /* mount font f at position pos[0...nfonts] */
|
||||||
{
|
{
|
||||||
char pathname[NS], shortname[NS], *sl;
|
char pathname[NS], shortname[NS];
|
||||||
|
|
||||||
sl = (char*)0;
|
|
||||||
zapwcache(0);
|
zapwcache(0);
|
||||||
if (truename)
|
if (truename)
|
||||||
strcpy(shortname, truename);
|
strcpy(shortname, truename);
|
||||||
|
|
|
||||||
|
|
@ -682,6 +682,7 @@ vacstat(VacFile *parent, VacDir *vd, uchar *p, int np)
|
||||||
if(ext == nil)
|
if(ext == nil)
|
||||||
return 0;
|
return 0;
|
||||||
n = vacfileread(vf, ext, size, 0);
|
n = vacfileread(vf, ext, size, 0);
|
||||||
|
USED(n);
|
||||||
ext[size] = 0;
|
ext[size] = 0;
|
||||||
vacfiledecref(vf);
|
vacfiledecref(vf);
|
||||||
if(vd->mode & ModeLink){
|
if(vd->mode & ModeLink){
|
||||||
|
|
|
||||||
|
|
@ -4536,6 +4536,7 @@ validptr(void* p)
|
||||||
static char c;
|
static char c;
|
||||||
|
|
||||||
c = *((char*)p);
|
c = *((char*)p);
|
||||||
|
USED(c);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ nfs3errstr(Nfs3Status status)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i=0; i<nelem(etab); i++){
|
for(i=0; i<nelem(etab); i++){
|
||||||
if(etab[i].status == status){
|
if((int)etab[i].status == (int)status){
|
||||||
werrstr(etab[i].msg);
|
werrstr(etab[i].msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue