*** 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);
