*** dump.c.bak	Tue Mar  2 04:41:36 1999
--- dump.c	Thu Apr  8 17:08:43 1999
***************
*** 23,28 ****
--- 23,32 ----
  
  #include "../config.h"
  
+ #include <stdxlib.h>
+ #include <unixstd.h>
+ #include <strdefs.h>
+ 
  #include <stdio.h>
  #ifdef HAVE_TERMIOS_H
  #include <termios.h>
***************
*** 47,52 ****
--- 51,57 ----
  struct termio newtty;
  #endif
  
+ void
  reset_tty(){
  #ifdef HAVE_TERMIOS_H
    if(tcsetattr(0, TCSANOW, &savetty) == -1)
***************
*** 59,64 ****
--- 64,70 ----
      }
  }
  
+ void
  set_tty(){
  #ifdef HAVE_TERMIOS_H
    if(tcsetattr(0, TCSANOW, &newtty) == -1)
***************
*** 94,104 ****
  }
  
  
! 
  crsr2(int row, int col){
    printf("\033[%d;%dH",row,col);
  }
  
  showblock(int flag){
    unsigned int k;
    int i, j;
--- 100,111 ----
  }
  
  
! void
  crsr2(int row, int col){
    printf("\033[%d;%dH",row,col);
  }
  
+ void
  showblock(int flag){
    unsigned int k;
    int i, j;
***************
*** 176,182 ****
        crsr2(20,1);
        printf("Enter new search string:");
        fgets((char *)search,sizeof(search),stdin);
!       while(search[strlen(search)-1] == '\n') search[strlen(search)-1] = 0;
        crsr2(20,1);
        printf("                                     ");
      };
--- 183,189 ----
        crsr2(20,1);
        printf("Enter new search string:");
        fgets((char *)search,sizeof(search),stdin);
!       while(search[strlen((char *)search)-1] == '\n') search[strlen((char *)search)-1] = 0;
        crsr2(20,1);
        printf("                                     ");
      };
***************
*** 183,194 ****
      if (c == '+') {
        while(1==1){
  	while(1==1){
! 	  c = getbyte(&file_addr);
  	  if (c == search[0]) break;
  	};
! 	for (j=1;j<strlen(search);j++) 
  	  if(search[j] != getbyte()) break;
! 	if(j==strlen(search)) break;
        };
        file_addr &= ~(PAGE-1);
        showblock(1);
--- 190,201 ----
      if (c == '+') {
        while(1==1){
  	while(1==1){
! 	  c = getbyte();
  	  if (c == search[0]) break;
  	};
! 	for (j=1;j<strlen((char *)search);j++) 
  	  if(search[j] != getbyte()) break;
! 	if(j==strlen((char *)search)) break;
        };
        file_addr &= ~(PAGE-1);
        showblock(1);
*** isodump.c.bak	Tue Mar  2 04:41:36 1999
--- isodump.c	Thu Apr  8 17:29:36 1999
***************
*** 24,29 ****
--- 24,33 ----
  
  #include "../config.h"
  
+ #include <stdxlib.h>
+ #include <unixstd.h>
+ #include <strdefs.h>
+ 
  #include <stdio.h>
  #ifdef HAVE_TERMIOS_H
  #include <termios.h>
***************
*** 136,141 ****
--- 140,146 ----
  struct termio newtty;
  #endif
  
+ void
  reset_tty(){
  #ifdef HAVE_TERMIOS_H
    if(tcsetattr(0, TCSANOW, &savetty) == -1)
***************
*** 148,153 ****
--- 153,159 ----
      }
  }
  
+ void
  set_tty(){
  #ifdef HAVE_TERMIOS_H
    if(tcsetattr(0, TCSANOW, &newtty) == -1)
***************
*** 183,188 ****
--- 189,195 ----
  
  
  
+ void
  crsr2(int row, int col){
    printf("\033[%d;%dH",row,col);
  }
***************
*** 212,225 ****
  		printf("%c%c", pnt[0], pnt[1]);
  		if(pnt[3] != 1) {
  		  printf("**BAD RRVERSION");
! 		  return;
  		};
  		ncount++;
  		if(pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff;
! 		if(strncmp(pnt, "PX", 2) == 0) flag2 |= 1;
! 		if(strncmp(pnt, "PN", 2) == 0) flag2 |= 2;
! 		if(strncmp(pnt, "SL", 2) == 0) flag2 |= 4;
! 		if(strncmp(pnt, "NM", 2) == 0) {
  		  slen = pnt[2] - 5;
  		  pnts = pnt+5;
  		  if( (pnt[4] & 6) != 0 )
--- 219,232 ----
  		printf("%c%c", pnt[0], pnt[1]);
  		if(pnt[3] != 1) {
  		  printf("**BAD RRVERSION");
! 		  return 0;	/* JS ??? Is this right ??? */
  		};
  		ncount++;
  		if(pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff;
! 		if(strncmp((char *)pnt, "PX", 2) == 0) flag2 |= 1;
! 		if(strncmp((char *)pnt, "PN", 2) == 0) flag2 |= 2;
! 		if(strncmp((char *)pnt, "SL", 2) == 0) flag2 |= 4;
! 		if(strncmp((char *)pnt, "NM", 2) == 0) {
  		  slen = pnt[2] - 5;
  		  pnts = pnt+5;
  		  if( (pnt[4] & 6) != 0 )
***************
*** 231,247 ****
  		  printf("=%s", name);
  		  flag2 |= 8;
  		}
! 		if(strncmp(pnt, "CL", 2) == 0) flag2 |= 16;
! 		if(strncmp(pnt, "PL", 2) == 0) flag2 |= 32;
! 		if(strncmp(pnt, "RE", 2) == 0) flag2 |= 64;
! 		if(strncmp(pnt, "TF", 2) == 0) flag2 |= 128;
  
! 		if(strncmp(pnt, "PX", 2) == 0) {
  			extent = isonum_733(pnt+12);
  			printf("=%x", extent);
  		};
  
! 		if(strncmp(pnt, "CE", 2) == 0) {
  			cont_extent = isonum_733(pnt+4);
  			cont_offset = isonum_733(pnt+12);
  			cont_size = isonum_733(pnt+20);
--- 238,254 ----
  		  printf("=%s", name);
  		  flag2 |= 8;
  		}
! 		if(strncmp((char *)pnt, "CL", 2) == 0) flag2 |= 16;
! 		if(strncmp((char *)pnt, "PL", 2) == 0) flag2 |= 32;
! 		if(strncmp((char *)pnt, "RE", 2) == 0) flag2 |= 64;
! 		if(strncmp((char *)pnt, "TF", 2) == 0) flag2 |= 128;
  
! 		if(strncmp((char *)pnt, "PX", 2) == 0) {
  			extent = isonum_733(pnt+12);
  			printf("=%x", extent);
  		};
  
! 		if(strncmp((char *)pnt, "CE", 2) == 0) {
  			cont_extent = isonum_733(pnt+4);
  			cont_offset = isonum_733(pnt+12);
  			cont_size = isonum_733(pnt+20);
***************
*** 249,260 ****
  			       cont_size);
  		};
  
! 		if(strncmp(pnt, "PL", 2) == 0 || strncmp(pnt, "CL", 2) == 0) {
  			extent = isonum_733(pnt+4);
  			printf("=%x", extent);
  		};
  
! 		if(strncmp(pnt, "SL", 2) == 0) {
  		        int cflag;
  
  			cflag = pnt[4];
--- 256,267 ----
  			       cont_size);
  		};
  
! 		if(strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) {
  			extent = isonum_733(pnt+4);
  			printf("=%x", extent);
  		};
  
! 		if(strncmp((char *)pnt, "SL", 2) == 0) {
  		        int cflag;
  
  			cflag = pnt[4];
***************
*** 263,269 ****
  			while(slen >= 1){
  				switch(pnts[0] & 0xfe){
  				case 0:
! 					strncat(symlink, pnts+2, pnts[1]);
  					break;
  				case 2:
  					strcat (symlink, ".");
--- 270,276 ----
  			while(slen >= 1){
  				switch(pnts[0] & 0xfe){
  				case 0:
! 					strncat(symlink, (char *)(pnts+2), pnts[1]);
  					break;
  				case 2:
  					strcat (symlink, ".");
***************
*** 283,289 ****
  					printf("Warning - host_name requested");
  					break;
  				default:
! 					printf("Reserved bit setting in symlink", goof++);
  					break;
  				};
  				if((pnts[0] & 0xfe) && pnts[1] != 0) {
--- 290,297 ----
  					printf("Warning - host_name requested");
  					break;
  				default:
! 					printf("Reserved bit setting in symlink");
! 					goof++;
  					break;
  				};
  				if((pnts[0] & 0xfe) && pnts[1] != 0) {
***************
*** 310,321 ****
  		};
  	};
  	if(ncount) printf("]");
! 	if (!cont_flag && flag1 != flag2) 
! 	  printf("Flag %x != %x", flag1, flag2, goof++);
  	return flag2;
  }
  
! int 
  dump_rr(struct iso_directory_record * idr)
  {
  	int len;
--- 318,331 ----
  		};
  	};
  	if(ncount) printf("]");
! 	if (!cont_flag && flag1 != flag2) {
! 	  printf("Flag %x != %x", flag1, flag2);
! 	  goof++;
! 	}
  	return flag2;
  }
  
! void
  dump_rr(struct iso_directory_record * idr)
  {
  	int len;
***************
*** 337,342 ****
--- 347,353 ----
  }
  
  
+ void
  showblock(int flag){
    unsigned int k;
    int i, j;
***************
*** 449,455 ****
        crsr2(20,1);
        printf("Enter new search string:");
        fgets((char *)search,sizeof(search),stdin);
!       while(search[strlen(search)-1] == '\n') search[strlen(search)-1] = 0;
        crsr2(20,1);
        printf("                                     ");
      };
--- 460,466 ----
        crsr2(20,1);
        printf("Enter new search string:");
        fgets((char *)search,sizeof(search),stdin);
!       while(search[strlen((char *)search)-1] == '\n') search[strlen((char *)search)-1] = 0;
        crsr2(20,1);
        printf("                                     ");
      };
***************
*** 456,467 ****
      if (c == '+') {
        while(1==1){
  	while(1==1){
! 	  c = getbyte(&file_addr);
  	  if (c == search[0]) break;
  	};
! 	for (j=1;j<strlen(search);j++) 
  	  if(search[j] != getbyte()) break;
! 	if(j==strlen(search)) break;
        };
        file_addr &= ~(blocksize-1);
        showblock(1);
--- 467,478 ----
      if (c == '+') {
        while(1==1){
  	while(1==1){
! 	  c = getbyte();
  	  if (c == search[0]) break;
  	};
! 	for (j=1;j<strlen((char *)search);j++) 
  	  if(search[j] != getbyte()) break;
! 	if(j==strlen((char *)search)) break;
        };
        file_addr &= ~(blocksize-1);
        showblock(1);
*** isoinfo.c.bak	Tue Mar  2 04:41:36 1999
--- isoinfo.c	Thu Apr  8 17:18:05 1999
***************
*** 36,41 ****
--- 36,45 ----
  
  #include "../config.h"
  
+ #include <stdxlib.h>
+ #include <unixstd.h>
+ #include <strdefs.h>
+ 
  #include <stdio.h>
  #include <signal.h>
  #include <sys/stat.h>
***************
*** 107,114 ****
  	return (isonum_731 ((char *)p));
  }
  
! 
! int dump_pathtab(int block, int size)
  {
      char * buffer;
      int    offset;
--- 111,118 ----
  	return (isonum_731 ((char *)p));
  }
  
! void
! dump_pathtab(int block, int size)
  {
      char * buffer;
      int    offset;
***************
*** 174,193 ****
  	while(len >= 4){
  		if(pnt[3] != 1) {
  		  printf("**BAD RRVERSION");
! 		  return;
  		};
  		ncount++;
  		if(pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff;
! 		if(strncmp(pnt, "PX", 2) == 0) flag2 |= 1;
! 		if(strncmp(pnt, "PN", 2) == 0) flag2 |= 2;
! 		if(strncmp(pnt, "SL", 2) == 0) flag2 |= 4;
! 		if(strncmp(pnt, "NM", 2) == 0) flag2 |= 8;
! 		if(strncmp(pnt, "CL", 2) == 0) flag2 |= 16;
! 		if(strncmp(pnt, "PL", 2) == 0) flag2 |= 32;
! 		if(strncmp(pnt, "RE", 2) == 0) flag2 |= 64;
! 		if(strncmp(pnt, "TF", 2) == 0) flag2 |= 128;
  
! 		if(strncmp(pnt, "PX", 2) == 0) {
  			fstat_buf.st_mode = isonum_733(pnt+4);
  			fstat_buf.st_nlink = isonum_733(pnt+12);
  			fstat_buf.st_uid = isonum_733(pnt+20);
--- 178,197 ----
  	while(len >= 4){
  		if(pnt[3] != 1) {
  		  printf("**BAD RRVERSION");
! 		  return 0;	/* JS ??? Is this right ??? */
  		};
  		ncount++;
  		if(pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff;
! 		if(strncmp((char *)pnt, "PX", 2) == 0) flag2 |= 1;
! 		if(strncmp((char *)pnt, "PN", 2) == 0) flag2 |= 2;
! 		if(strncmp((char *)pnt, "SL", 2) == 0) flag2 |= 4;
! 		if(strncmp((char *)pnt, "NM", 2) == 0) flag2 |= 8;
! 		if(strncmp((char *)pnt, "CL", 2) == 0) flag2 |= 16;
! 		if(strncmp((char *)pnt, "PL", 2) == 0) flag2 |= 32;
! 		if(strncmp((char *)pnt, "RE", 2) == 0) flag2 |= 64;
! 		if(strncmp((char *)pnt, "TF", 2) == 0) flag2 |= 128;
  
! 		if(strncmp((char *)pnt, "PX", 2) == 0) {
  			fstat_buf.st_mode = isonum_733(pnt+4);
  			fstat_buf.st_nlink = isonum_733(pnt+12);
  			fstat_buf.st_uid = isonum_733(pnt+20);
***************
*** 194,215 ****
  			fstat_buf.st_gid = isonum_733(pnt+28);
  		};
  
! 		if(strncmp(pnt, "NM", 2) == 0) {
! 		  strncpy(name_buf, pnt+5, pnt[2] - 5);
  		  name_buf[pnt[2] - 5] = 0;
  		}
  
! 		if(strncmp(pnt, "CE", 2) == 0) {
  			cont_extent = isonum_733(pnt+4);
  			cont_offset = isonum_733(pnt+12);
  			cont_size = isonum_733(pnt+20);
  		};
  
! 		if(strncmp(pnt, "PL", 2) == 0 || strncmp(pnt, "CL", 2) == 0) {
  			extent = isonum_733(pnt+4);
  		};
  
! 		if(strncmp(pnt, "SL", 2) == 0) {
  		        int cflag;
  
  			cflag = pnt[4];
--- 198,219 ----
  			fstat_buf.st_gid = isonum_733(pnt+28);
  		};
  
! 		if(strncmp((char *)pnt, "NM", 2) == 0) {
! 		  strncpy(name_buf, (char *)(pnt+5), pnt[2] - 5);
  		  name_buf[pnt[2] - 5] = 0;
  		}
  
! 		if(strncmp((char *)pnt, "CE", 2) == 0) {
  			cont_extent = isonum_733(pnt+4);
  			cont_offset = isonum_733(pnt+12);
  			cont_size = isonum_733(pnt+20);
  		};
  
! 		if(strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) {
  			extent = isonum_733(pnt+4);
  		};
  
! 		if(strncmp((char *)pnt, "SL", 2) == 0) {
  		        int cflag;
  
  			cflag = pnt[4];
***************
*** 218,224 ****
  			while(slen >= 1){
  				switch(pnts[0] & 0xfe){
  				case 0:
! 					strncat(symlink, pnts+2, pnts[1]);
  					break;
  				case 2:
  					strcat (symlink, ".");
--- 222,228 ----
  			while(slen >= 1){
  				switch(pnts[0] & 0xfe){
  				case 0:
! 					strncat(symlink, (char *)(pnts+2), pnts[1]);
  					break;
  				case 2:
  					strcat (symlink, ".");
***************
*** 266,272 ****
  	return flag2;
  }
  
! int 
  dump_rr(struct iso_directory_record * idr)
  {
  	int len;
--- 270,276 ----
  	return flag2;
  }
  
! void
  dump_rr(struct iso_directory_record * idr)
  {
  	int len;
***************
*** 300,305 ****
--- 304,310 ----
  char * months[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
  		       "Aug", "Sep", "Oct", "Nov", "Dec"};
  
+ void
  dump_stat(int extent)
  {
    int i;
***************
*** 368,373 ****
--- 373,379 ----
    printf("%s %s %s\n", outline, name_buf, xname);
  }
  
+ void
  extract_file(struct iso_directory_record * idr)
  {
    int extent, len, tlen;
***************
*** 387,392 ****
--- 393,399 ----
      }
  }
  
+ void
  parse_dir(char * rootname, int extent, int len){
    unsigned int k;
    char testname[256];
***************
*** 506,511 ****
--- 513,519 ----
      }
  }
  
+ void
  usage()
  {
    fprintf(stderr, "isoinfo -i filename [-l] [-R] [-x filename] [-f] [-N nsect]\n");
*** isovfy.c.bak	Tue Mar  2 04:41:36 1999
--- isovfy.c	Thu Apr  8 17:32:06 1999
***************
*** 22,27 ****
--- 22,33 ----
  
  static char rcsid[] ="$Id: isovfy.c,v 1.5 1999/03/02 03:41:36 eric Exp $";
  
+ #include "../config.h"
+ 
+ #include <stdxlib.h>
+ #include <unixstd.h>
+ #include <strdefs.h>
+ 
  #include <stdio.h>
  #include <signal.h>
  
***************
*** 83,88 ****
--- 89,100 ----
  };
  
  int
+ isonum_721 (char * p)
+ {
+ 	return ((p[0] & 0xff) | ((p[1] & 0xff) << 8));
+ }
+ 
+ int
  isonum_723 (char * p)
  {
  #if 0
***************
*** 95,106 ****
  }
  
  int
- isonum_721 (char * p)
- {
- 	return ((p[0] & 0xff) | ((p[1] & 0xff) << 8));
- }
- 
- int
  isonum_711 (char * p)
  {
  	return (*p & 0xff);
--- 107,112 ----
***************
*** 142,169 ****
  int rr_goof;
  
  
- int 
- dump_rr(struct iso_directory_record * idr){
- 	int len;
- 	char * pnt;
- 
- 	len = idr->length[0] & 0xff;
- 	len -= (sizeof(struct iso_directory_record) - sizeof(idr->name));
- 	len -= idr->name_len[0];
- 	pnt = (char *) idr;
- 	pnt += (sizeof(struct iso_directory_record) - sizeof(idr->name));
- 	pnt += idr->name_len[0];
- 
- 	if((idr->name_len[0] & 1) == 0){
- 		pnt++;
- 		len--;
- 	};
- 
- 	rr_goof = 0;
- 	parse_rr(pnt, len, 0);
- 	return rr_goof;
- }
- 
  int parse_rr(unsigned char * pnt, int len, int cont_flag)
  {
  	int slen;
--- 148,153 ----
***************
*** 191,218 ****
  		if(pnt[0] < 'A' || pnt[0] > 'Z' || pnt[1] < 'A' || 
  		   pnt[1] > 'Z') {
  			sprintf(lbuffer+iline,"**BAD SUSP %d %d]", 
! 					 pnt[0], pnt[1], rr_goof++);
  			iline += strlen(lbuffer + iline);
  			return flag2;
  		};
  
  		if(pnt[3] != 1) {
! 			sprintf(lbuffer+iline,"**BAD RRVERSION", rr_goof++);
  			iline += strlen(lbuffer + iline);
  			return flag2;
  		};
  		ncount++;
  		if(pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff;
! 		if(strncmp(pnt, "PX", 2) == 0) flag2 |= 1;
! 		if(strncmp(pnt, "PN", 2) == 0) flag2 |= 2;
! 		if(strncmp(pnt, "SL", 2) == 0) flag2 |= 4;
! 		if(strncmp(pnt, "NM", 2) == 0) flag2 |= 8;
! 		if(strncmp(pnt, "CL", 2) == 0) flag2 |= 16;
! 		if(strncmp(pnt, "PL", 2) == 0) flag2 |= 32;
! 		if(strncmp(pnt, "RE", 2) == 0) flag2 |= 64;
! 		if(strncmp(pnt, "TF", 2) == 0) flag2 |= 128;
  
! 		if(strncmp(pnt, "CE", 2) == 0) {
  			cont_extent = isonum_733(pnt+4);
  			cont_offset = isonum_733(pnt+12);
  			cont_size = isonum_733(pnt+20);
--- 175,204 ----
  		if(pnt[0] < 'A' || pnt[0] > 'Z' || pnt[1] < 'A' || 
  		   pnt[1] > 'Z') {
  			sprintf(lbuffer+iline,"**BAD SUSP %d %d]", 
! 					 pnt[0], pnt[1]);
! 			rr_goof++;
  			iline += strlen(lbuffer + iline);
  			return flag2;
  		};
  
  		if(pnt[3] != 1) {
! 			sprintf(lbuffer+iline,"**BAD RRVERSION");
! 			rr_goof++;
  			iline += strlen(lbuffer + iline);
  			return flag2;
  		};
  		ncount++;
  		if(pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff;
! 		if(strncmp((char *)pnt, "PX", 2) == 0) flag2 |= 1;
! 		if(strncmp((char *)pnt, "PN", 2) == 0) flag2 |= 2;
! 		if(strncmp((char *)pnt, "SL", 2) == 0) flag2 |= 4;
! 		if(strncmp((char *)pnt, "NM", 2) == 0) flag2 |= 8;
! 		if(strncmp((char *)pnt, "CL", 2) == 0) flag2 |= 16;
! 		if(strncmp((char *)pnt, "PL", 2) == 0) flag2 |= 32;
! 		if(strncmp((char *)pnt, "RE", 2) == 0) flag2 |= 64;
! 		if(strncmp((char *)pnt, "TF", 2) == 0) flag2 |= 128;
  
! 		if(strncmp((char *)pnt, "CE", 2) == 0) {
  			cont_extent = isonum_733(pnt+4);
  			cont_offset = isonum_733(pnt+12);
  			cont_size = isonum_733(pnt+20);
***************
*** 221,239 ****
  			iline += strlen(lbuffer + iline);
  		      };
  
! 		if(strncmp(pnt, "PL", 2) == 0 || strncmp(pnt, "CL", 2) == 0) {
  			extent = isonum_733(pnt+4);
  		        sprintf(lbuffer+iline,"=%x", extent);
  			iline += strlen(lbuffer + iline);
  			if(extent == 0) rr_goof++;
  		};
! 		if(strncmp(pnt, "SL", 2) == 0) {
  			pnts = pnt+5;
  			slen = pnt[2] - 5;
  			while(slen >= 1){
  				switch(pnts[0] & 0xfe){
  				case 0:
! 					strncat(symlink, pnts+2, pnts[1]);
  					break;
  				case 2:
  					strcat (symlink, ".");
--- 207,225 ----
  			iline += strlen(lbuffer + iline);
  		      };
  
! 		if(strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) {
  			extent = isonum_733(pnt+4);
  		        sprintf(lbuffer+iline,"=%x", extent);
  			iline += strlen(lbuffer + iline);
  			if(extent == 0) rr_goof++;
  		};
! 		if(strncmp((char *)pnt, "SL", 2) == 0) {
  			pnts = pnt+5;
  			slen = pnt[2] - 5;
  			while(slen >= 1){
  				switch(pnts[0] & 0xfe){
  				case 0:
! 					strncat(symlink, (char *)(pnts+2), pnts[1]);
  					break;
  				case 2:
  					strcat (symlink, ".");
***************
*** 255,261 ****
  					iline += strlen(lbuffer + iline);
  					break;
  				default:
! 					sprintf(lbuffer+iline,"Reserved bit setting in symlink", rr_goof++);
  					iline += strlen(lbuffer + iline);
  					break;
  				};
--- 241,248 ----
  					iline += strlen(lbuffer + iline);
  					break;
  				default:
! 					sprintf(lbuffer+iline,"Reserved bit setting in symlink");
! 					rr_goof++;
  					iline += strlen(lbuffer + iline);
  					break;
  				};
***************
*** 292,309 ****
  	  }
  	if (!cont_flag && flag1 && flag1 != flag2) 
  	  {
! 	    sprintf(lbuffer+iline,"Flag %x != %x", flag1, flag2, rr_goof++);
  	    iline += strlen(lbuffer + iline);
  	  }
  	return flag2;
  }
  
  
  int dir_count = 0;
  int dir_size_count = 0;
  int ngoof = 0;
  
! 
  check_tree(int file_addr, int file_size, int parent_addr){
    unsigned char buffer[2048];
    unsigned int k;
--- 279,319 ----
  	  }
  	if (!cont_flag && flag1 && flag1 != flag2) 
  	  {
! 	    sprintf(lbuffer+iline,"Flag %x != %x", flag1, flag2);
! 	    rr_goof++;
  	    iline += strlen(lbuffer + iline);
  	  }
  	return flag2;
  }
  
+ int 
+ dump_rr(struct iso_directory_record * idr){
+ 	int len;
+ 	char * pnt;
  
+ 	len = idr->length[0] & 0xff;
+ 	len -= (sizeof(struct iso_directory_record) - sizeof(idr->name));
+ 	len -= idr->name_len[0];
+ 	pnt = (char *) idr;
+ 	pnt += (sizeof(struct iso_directory_record) - sizeof(idr->name));
+ 	pnt += idr->name_len[0];
+ 
+ 	if((idr->name_len[0] & 1) == 0){
+ 		pnt++;
+ 		len--;
+ 	};
+ 
+ 	rr_goof = 0;
+ 	parse_rr((unsigned char *)pnt, len, 0);
+ 	return rr_goof;
+ }
+ 
+ 
  int dir_count = 0;
  int dir_size_count = 0;
  int ngoof = 0;
  
! void
  check_tree(int file_addr, int file_size, int parent_addr){
    unsigned char buffer[2048];
    unsigned int k;
***************
*** 351,357 ****
  		  if(idr->name_len[0] > 33)
  		    {
  		      sprintf(&lbuffer[iline],"File name length=(%d)",
! 			      idr->name_len[0], goof++);
  		      iline += strlen(lbuffer + iline);
  		    }
  		  else if(idr->name_len[0] == 1 && idr->name[0] == 0) {
--- 361,368 ----
  		  if(idr->name_len[0] > 33)
  		    {
  		      sprintf(&lbuffer[iline],"File name length=(%d)",
! 			      idr->name_len[0]);
! 		      goof++;
  		      iline += strlen(lbuffer + iline);
  		    }
  		  else if(idr->name_len[0] == 1 && idr->name[0] == 0) {
***************
*** 360,371 ****
  			  rflag = 0;
  			  if(orig_file_addr !=isonum_733(idr->extent) + isonum_711((char *) idr->ext_attr_length))
  			    {
! 			      sprintf(&lbuffer[iline],"***** Directory has null extent.", goof++);
  			      iline += strlen(lbuffer + iline);
  			    }
  			  if(i1)
  			    {
! 			      sprintf(&lbuffer[iline],"***** . not  first entry.", rr_goof++);
  			      iline += strlen(lbuffer + iline);
  			    }
  		  } else if(idr->name_len[0] == 1 && idr->name[0] == 1) {
--- 371,384 ----
  			  rflag = 0;
  			  if(orig_file_addr !=isonum_733(idr->extent) + isonum_711((char *) idr->ext_attr_length))
  			    {
! 			      sprintf(&lbuffer[iline],"***** Directory has null extent.");
! 			      goof++;
  			      iline += strlen(lbuffer + iline);
  			    }
  			  if(i1)
  			    {
! 			      sprintf(&lbuffer[iline],"***** . not  first entry.");
! 			      rr_goof++;
  			      iline += strlen(lbuffer + iline);
  			    }
  		  } else if(idr->name_len[0] == 1 && idr->name[0] == 1) {
***************
*** 374,385 ****
  			  rflag = 0;
  			  if(parent_file_addr !=isonum_733(idr->extent) + isonum_711((char *) idr->ext_attr_length))
  			    {
! 			      sprintf(&lbuffer[iline],"***** Directory has null extent.", goof++);
  			      iline += strlen(lbuffer + iline);
  			    }
  			  if(i1 != 1)
  			    {
! 			      sprintf(&lbuffer[iline],"***** .. not second entry.", rr_goof++);
  			      iline += strlen(lbuffer + iline);
  			    }
  			  
--- 387,400 ----
  			  rflag = 0;
  			  if(parent_file_addr !=isonum_733(idr->extent) + isonum_711((char *) idr->ext_attr_length))
  			    {
! 			      sprintf(&lbuffer[iline],"***** Directory has null extent.");
! 			      goof++;
  			      iline += strlen(lbuffer + iline);
  			    }
  			  if(i1 != 1)
  			    {
! 			      sprintf(&lbuffer[iline],"***** .. not second entry.");
! 			      rr_goof++;
  			      iline += strlen(lbuffer + iline);
  			    }
  			  
***************
*** 386,392 ****
  		  } else {
  		          if(i1 < 2) 
  			    {
! 			      sprintf(&lbuffer[iline]," Improper sorting.", rr_goof++);
  			    }
  			  for(j=0; j<idr->name_len[0]; j++) 
  			    {
--- 401,408 ----
  		  } else {
  		          if(i1 < 2) 
  			    {
! 			      sprintf(&lbuffer[iline]," Improper sorting.");
! 			      rr_goof++;
  			    }
  			  for(j=0; j<idr->name_len[0]; j++) 
  			    {
***************
*** 402,408 ****
  
  		  if(size && extent == 0) 
  		    {
! 		      sprintf(&lbuffer[iline],"****Extent==0, size != 0", goof++);
  		      iline += strlen(lbuffer + iline);
  		    }
  #if 0
--- 418,425 ----
  
  		  if(size && extent == 0) 
  		    {
! 		      sprintf(&lbuffer[iline],"****Extent==0, size != 0");
! 		      goof++;
  		      iline += strlen(lbuffer + iline);
  		    }
  #if 0
***************
*** 409,415 ****
  		  /* This is apparently legal. */
  		  if(size == 0 && extent) 
  		    {
! 		      sprintf(&lbuffer[iline],"****Extent!=0, size == 0", goof++);
  		      iline += strlen(lbuffer + iline);
  		    }
  #endif
--- 426,433 ----
  		  /* This is apparently legal. */
  		  if(size == 0 && extent) 
  		    {
! 		      sprintf(&lbuffer[iline],"****Extent!=0, size == 0");
! 		      goof++;
  		      iline += strlen(lbuffer + iline);
  		    }
  #endif
***************
*** 416,433 ****
  
  		  if(idr->flags[0] & 0xf5)
  		    {
! 			  sprintf(&lbuffer[iline],"Flags=(%x) ", idr->flags[0], goof++);
  			  iline += strlen(lbuffer + iline);
  		    }
  		  if(idr->interleave[0])
  		    {
! 			  sprintf(&lbuffer[iline],"Interleave=(%d) ", idr->interleave[0], goof++);
  			  iline += strlen(lbuffer + iline);
  		    }
  
  		  if(idr->file_unit_size[0])
  		    {
! 			sprintf(&lbuffer[iline],"File unit size=(%d) ", idr->file_unit_size[0], goof++);
  			iline += strlen(lbuffer + iline);
  		    }
  
--- 434,454 ----
  
  		  if(idr->flags[0] & 0xf5)
  		    {
! 			  sprintf(&lbuffer[iline],"Flags=(%x) ", idr->flags[0]);
! 			  goof++;
  			  iline += strlen(lbuffer + iline);
  		    }
  		  if(idr->interleave[0])
  		    {
! 			  sprintf(&lbuffer[iline],"Interleave=(%d) ", idr->interleave[0]);
! 			  goof++;
  			  iline += strlen(lbuffer + iline);
  		    }
  
  		  if(idr->file_unit_size[0])
  		    {
! 			sprintf(&lbuffer[iline],"File unit size=(%d) ", idr->file_unit_size[0]);
! 			goof++;
  			iline += strlen(lbuffer + iline);
  		    }
  
***************
*** 434,440 ****
  
  		  if(idr->volume_sequence_number[0] != 1)
  		    {
! 		      sprintf(&lbuffer[iline],"Volume sequence number=(%d) ", idr->volume_sequence_number[0], goof++);
  		      iline += strlen(lbuffer + iline);
  		    }
  
--- 455,462 ----
  
  		  if(idr->volume_sequence_number[0] != 1)
  		    {
! 		      sprintf(&lbuffer[iline],"Volume sequence number=(%d) ", idr->volume_sequence_number[0]);
! 		      goof++;
  		      iline += strlen(lbuffer + iline);
  		    }
  
***************
*** 475,481 ****
    unsigned short parent;
  };
  
! 
  check_path_tables(int typel_extent, int typem_extent, int path_table_size){
    int file_addr;
    int count;
--- 497,503 ----
    unsigned short parent;
  };
  
! void
  check_path_tables(int typel_extent, int typem_extent, int path_table_size){
    int file_addr;
    int count;
