tmore fixes - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6932098c9fc67a291ff44881c76ab7785873cf09
 (DIR) parent 946b8d7086d5e1aa97e19bac52fc1a416a56110e
 (HTM) Author: rsc <devnull@localhost>
       Date:   Sat, 21 Apr 2007 20:49:30 +0000
       
       more fixes
       
       Diffstat:
         M src/cmd/venti/srv/fixarenas.c       |       1 +
         M src/cmd/venti/srv/httpd.c           |       9 ++-------
         M src/cmd/venti/srv/mirrorarenas.c    |       1 +
         M src/cmd/venti/srv/mkfile            |       6 ++----
       
       4 files changed, 6 insertions(+), 11 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/venti/srv/fixarenas.c b/src/cmd/venti/srv/fixarenas.c
       t@@ -1357,6 +1357,7 @@ guessarena(vlong offset0, int anum, ArenaHead *head, Arena *arena,
                         * (the same pattern gets written many times in a row)
                         * and should never happen during regular use.
                         */
       +                magic = 0;
                        if((n = isclump(p, &cl, &magic)) > 0){
                                /*
                                 * If we were in the middle of some corrupted data,
 (DIR) diff --git a/src/cmd/venti/srv/httpd.c b/src/cmd/venti/srv/httpd.c
       t@@ -168,11 +168,6 @@ httpproc(void *v)
                        if(hparsereq(c, 0) < 0)
                                break;
                        
       -                if(c->req.search)
       -                        c->req.searchpairs = hparsequery(c, c->req.search);
       -                else
       -                        c->req.searchpairs = nil;
       -
                        for(i = 0; i < MaxObjs && objs[i].name[0]; i++){
                                n = strlen(objs[i].name);
                                if((objs[i].name[n-1] == '/' && strncmp(c->req.uri, objs[i].name, n) == 0)
       t@@ -791,7 +786,7 @@ pctdiffgraph(Stats *s, Stats *t, void *va)
        }
        
        static long
       -div(long a, long b)
       +xdiv(long a, long b)
        {
                if(b == 0)
                        b++;
       t@@ -804,7 +799,7 @@ divdiffgraph(Stats *s, Stats *t, void *va)
                Arg *a;
        
                a = va;
       -        return div(t->n[a->index] - s->n[a->index], t->n[a->index2] - s->n[a->index2]);
       +        return xdiv(t->n[a->index] - s->n[a->index], t->n[a->index2] - s->n[a->index2]);
        }
        
        static long
 (DIR) diff --git a/src/cmd/venti/srv/mirrorarenas.c b/src/cmd/venti/srv/mirrorarenas.c
       t@@ -301,6 +301,7 @@ mirror(Arena *sa, Arena *da)
                if(ewritepart(dst, base - blocksize, buf, blocksize) < 0)
                        return;
        
       +        shaoff = 0;
                ds = nil;
                if(sa->diskstats.sealed && scorecmp(sa->score, zeroscore) != 0){
                        /* start sha1 state with header */
 (DIR) diff --git a/src/cmd/venti/srv/mkfile b/src/cmd/venti/srv/mkfile
       t@@ -40,7 +40,7 @@ LIBOFILES=\
        
        SLIB=libvs.a
        
       -LIB=$SLIB $LIBDIR/libnventi.a
       +LIB=$SLIB $LIBDIR/libventi.a
        
        HFILES=        dat.h\
                fns.h\
       t@@ -73,9 +73,7 @@ it:V: $O.venti
        
        CLEANFILES=$CLEANFILES $SLIB
        
       -<$PLAN9/src/cmd/mkmany
       -
       -CFLAGS=$CFLAGS -I.
       +<$PLAN9/src/mkmany
        
        $SLIB: $LIBOFILES
                ar rvc $SLIB $LIBOFILES