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