#include <bzlib.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
if(start+len>kk) split(I,V,kk,start+len-kk,h);
}
-static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize)
+static void qsufsort(off_t *I,off_t *V,uint8_t *old,off_t oldsize)
{
off_t buckets[256];
off_t i,h,len;
for(i=0;i<oldsize+1;i++) I[V[i]]=i;
}
-static off_t matchlen(u_char *old,off_t oldsize,u_char *new,off_t newsize)
+static off_t matchlen(uint8_t *old,off_t oldsize,uint8_t *new,off_t newsize)
{
off_t i;
return i;
}
-static off_t search(off_t *I,u_char *old,off_t oldsize,
- u_char *new,off_t newsize,off_t st,off_t en,off_t *pos)
+static off_t search(off_t *I,uint8_t *old,off_t oldsize,
+ uint8_t *new,off_t newsize,off_t st,off_t en,off_t *pos)
{
off_t x,y;
};
}
-static void offtout(off_t x,u_char *buf)
+static void offtout(off_t x,uint8_t *buf)
{
off_t y;
if(x<0) buf[7]|=0x80;
}
-int bsdiff(u_char* old, off_t oldsize, u_char* new, off_t newsize, FILE* pf)
+int bsdiff(uint8_t* old, off_t oldsize, uint8_t* new, off_t newsize, FILE* pf)
{
off_t *I,*V;
off_t scan,pos,len;
off_t overlap,Ss,lens;
off_t i;
off_t dblen,eblen;
- u_char *db,*eb;
- u_char buf[8];
- u_char header[32];
+ uint8_t *db,*eb;
+ uint8_t buf[8];
+ uint8_t header[32];
BZFILE * pfbz2;
int bz2err;
int main(int argc,char *argv[])
{
int fd;
- u_char *old,*new;
+ uint8_t *old,*new;
off_t oldsize,newsize;
FILE * pf;