Changeset 1710


Ignore:
Timestamp:
01/25/07 15:56:18 (6 years ago)
Author:
sam
Message:
  • Grrr, fixed a bug in finfo() that corrupted the display.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/zzuf.c

    r1709 r1710  
    8383static void *get_entry(char const *); 
    8484#endif 
    85 static void finfo(FILE *, struct opts *); 
     85static void finfo(FILE *, struct opts *, uint32_t); 
    8686#if defined HAVE_REGEX_H 
    8787static char *merge_regex(char *, char *); 
     
    426426    { 
    427427        _zz_md5_fini(md5sum, ctx); 
    428         finfo(stdout, opts); 
     428        finfo(stdout, opts, opts->seed); 
    429429        fprintf(stdout, "%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x" 
    430430                "%.02x%.02x%.02x%.02x%.02x%.02x\n", md5sum[0], md5sum[1], 
     
    439439} 
    440440 
    441 static void finfo(FILE *fp, struct opts *opts) 
     441static void finfo(FILE *fp, struct opts *opts, uint32_t seed) 
    442442{ 
    443443    if(opts->minratio == opts->maxratio) 
    444         fprintf(fp, "zzuf[s=%i,r=%g]: ", opts->seed, opts->minratio); 
     444        fprintf(fp, "zzuf[s=%i,r=%g]: ", seed, opts->minratio); 
    445445    else 
    446         fprintf(fp, "zzuf[s=%i,r=%g:%g]: ", opts->seed, 
     446        fprintf(fp, "zzuf[s=%i,r=%g:%g]: ", seed, 
    447447                opts->minratio, opts->maxratio); 
    448448} 
     
    613613    if(opts->verbose) 
    614614    { 
    615         finfo(stderr, opts); 
     615        finfo(stderr, opts, opts->child[i].seed); 
    616616        fprintf(stderr, "launched %s\n", opts->newargv[0]); 
    617617    } 
     
    641641            if(opts->verbose) 
    642642            { 
    643                 finfo(stderr, opts); 
     643                finfo(stderr, opts, opts->child[i].seed); 
    644644                fprintf(stderr, "data output exceeded, sending SIGTERM\n"); 
    645645            } 
     
    655655            if(opts->verbose) 
    656656            { 
    657                 finfo(stderr, opts); 
     657                finfo(stderr, opts, opts->child[i].seed); 
    658658                fprintf(stderr, "running time exceeded, sending SIGTERM\n"); 
    659659            } 
     
    672672            if(opts->verbose) 
    673673            { 
    674                 finfo(stderr, opts); 
     674                finfo(stderr, opts, opts->child[i].seed); 
    675675                fprintf(stderr, "not responding, sending SIGKILL\n"); 
    676676            } 
     
    702702        if(opts->checkexit && WIFEXITED(status) && WEXITSTATUS(status)) 
    703703        { 
    704             finfo(stderr, opts); 
     704            finfo(stderr, opts, opts->child[i].seed); 
    705705            fprintf(stderr, "exit %i\n", WEXITSTATUS(status)); 
    706706            opts->crashes++; 
     
    710710                       && opts->child[i].status == STATUS_SIGTERM)) 
    711711        { 
    712             finfo(stderr, opts); 
     712            finfo(stderr, opts, opts->child[i].seed); 
    713713            fprintf(stderr, "signal %i%s%s\n", 
    714714                    WTERMSIG(status), sig2str(WTERMSIG(status)), 
     
    726726        { 
    727727            _zz_md5_fini(md5sum, opts->child[i].ctx); 
    728             finfo(stdout, opts); 
     728            finfo(stdout, opts, opts->child[i].seed); 
    729729            fprintf(stdout, "%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x%.02x" 
    730730                    "%.02x%.02x%.02x%.02x%.02x%.02x%.02x\n", md5sum[0], 
Note: See TracChangeset for help on using the changeset viewer.