[BACK]Return to display.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / hexdump

Diff for /src/usr.bin/hexdump/display.c between version 1.4 and 1.5

version 1.4, 1997/01/17 07:12:37 version 1.5, 1998/12/16 01:28:24
Line 216 
Line 216 
         static u_char *curp, *savp;          static u_char *curp, *savp;
         register int n;          register int n;
         int need, nread;          int need, nread;
           int valid_save = 0;
         u_char *tmpp;          u_char *tmpp;
   
         if (!curp) {          if (!curp) {
Line 226 
Line 227 
                 curp = savp;                  curp = savp;
                 savp = tmpp;                  savp = tmpp;
                 address = savaddress += blocksize;                  address = savaddress += blocksize;
                   valid_save = 1;
         }          }
         for (need = blocksize, nread = 0;;) {          for (need = blocksize, nread = 0;;) {
                 /*                  /*
Line 236 
Line 238 
                 if (!length || ateof && !next((char **)NULL)) {                  if (!length || ateof && !next((char **)NULL)) {
                         if (need == blocksize)                          if (need == blocksize)
                                 return((u_char *)NULL);                                  return((u_char *)NULL);
                         if (vflag != ALL && !bcmp(curp, savp, nread)) {                          if (vflag != ALL && valid_save &&
                               !bcmp(curp, savp, nread)) {
                                 if (vflag != DUP)                                  if (vflag != DUP)
                                         (void)printf("*\n");                                          (void)printf("*\n");
                                 return((u_char *)NULL);                                  return((u_char *)NULL);
Line 258 
Line 261 
                 if (length != -1)                  if (length != -1)
                         length -= n;                          length -= n;
                 if (!(need -= n)) {                  if (!(need -= n)) {
                         if (vflag == ALL || vflag == FIRST ||                          if (vflag == ALL || vflag == FIRST || !valid_save ||
                             bcmp(curp, savp, blocksize)) {                              bcmp(curp, savp, blocksize)) {
                                 if (vflag == DUP || vflag == FIRST)                                  if (vflag == DUP || vflag == FIRST)
                                         vflag = WAIT;                                          vflag = WAIT;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5