Hi all,

I plan to NMU iat to fix #965589 and #999305.
Please see the debdiff as attachment.

My plan is I'll wait until 20th Dec. And then upload it to delay/10 queue.

Yours,
Paul

diff -Nru iat-0.1.3/debian/changelog iat-0.1.3/debian/changelog
--- iat-0.1.3/debian/changelog  2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/debian/changelog  2022-12-13 06:09:17.000000000 +0800
@@ -1,3 +1,12 @@
+iat (0.1.3-7.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Bump debhelper compat to 12. (Closes: #965589)
+  * Port to DebSrc3.0 (quilt)
+  * debian/rules: use dh (Closes: #999305)
+
+ -- Ying-Chun Liu (PaulLiu) <paul...@debian.org>  Tue, 13 Dec 2022 06:09:17 
+0800
+
 iat (0.1.3-7) unstable; urgency=low
 
   * My email address has been changed.
diff -Nru iat-0.1.3/debian/clean iat-0.1.3/debian/clean
--- iat-0.1.3/debian/clean      1970-01-01 08:00:00.000000000 +0800
+++ iat-0.1.3/debian/clean      2022-12-13 06:09:17.000000000 +0800
@@ -0,0 +1,9 @@
+Makefile.in
+Makefile
+config.status
+config.h
+config.log
+src/Makefile.in
+src/Makefile
+src/iat
+src/*.o
diff -Nru iat-0.1.3/debian/compat iat-0.1.3/debian/compat
--- iat-0.1.3/debian/compat     2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/debian/compat     1970-01-01 08:00:00.000000000 +0800
@@ -1 +0,0 @@
-5
diff -Nru iat-0.1.3/debian/control iat-0.1.3/debian/control
--- iat-0.1.3/debian/control    2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/debian/control    2022-12-13 06:09:17.000000000 +0800
@@ -1,13 +1,13 @@
 Source: iat
 Section: otherosfs
-Priority: extra
+Priority: optional
 Maintainer: Dmitry E. Oboukhov <un...@debian.org>
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper-compat (= 12)
 Standards-Version: 3.7.3
 
 Package: iat
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Converts many CD-ROM image formats to iso9660
  iat (Iso9660 Analyzer Tool) is a tool for detecting the structure 
  of many types of CD-ROM image file formats, such as BIN, MDF, PDI, 
diff -Nru iat-0.1.3/debian/patches/0001_iat_c.patch 
iat-0.1.3/debian/patches/0001_iat_c.patch
--- iat-0.1.3/debian/patches/0001_iat_c.patch   1970-01-01 08:00:00.000000000 
+0800
+++ iat-0.1.3/debian/patches/0001_iat_c.patch   2022-12-13 06:09:17.000000000 
+0800
@@ -0,0 +1,717 @@
+--- iat-0.1.3.orig/src/iat.c
++++ iat-0.1.3/src/iat.c
+@@ -14,84 +14,99 @@
+     along with this program; if not, write to the
+     Free Software Foundation, Inc.,
+     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+-*/
++    */
+ 
+-/* Support Large File */
+ 
++/*
++ * Modified by Dmitry E. Oboukhov <di...@avanto.org>
++ *  [+] Use 'getopt' function;
++ *  [+] Use STDOUT as output file (if not defined);
++ *  [*] Fix percent output.
++ */
++
++/* Support Large File */
+ #define _FILE_OFFSET_BITS 64
+ 
++#include <unistd.h>
+ #include <getopt.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <errno.h>
+ 
++
+ #define VERSION "0.1.3"
+ #define BLOCK_ISO_CD 2048
+ 
+-/* Signature for Image ISO-9660 */
+-const char ISO_9660_START[] = { 
+-  (char) 0x01,
+-  (char) 0x43,
+-  (char) 0x44,
+-  (char) 0x30,
+-  (char) 0x30,
+-  (char) 0x31,
+-  (char) 0x01,
+-  (char) 0x00
+-};
+-
+-const char ISO_9660[] = { 
+-  (char) 0x02,
+-  (char) 0x43,
+-  (char) 0x44,
+-  (char) 0x30,
+-  (char) 0x30,
+-  (char) 0x31,
+-  (char) 0x01,
+-  (char) 0x00
+-};
+-
+-const char ISO_9660_END[] = { 
+-  (char) 0xFF,
+-  (char) 0x43,
+-  (char) 0x44,
+-  (char) 0x30,
+-  (char) 0x30,
+-  (char) 0x31,
+-  (char) 0x01,
+-  (char) 0x00
+-};
+-
+-/* Signature for RAW image */
+-const char SYNC_RAW[12] = { 
+-  (char) 0x00,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0xFF,
+-  (char) 0x00
++
++#define OPTIONS_LIST   "h"
++
++
++static char *input_file=0, *output_file=0;
++
++/* Signature for Image ISO-9660 */
++const char ISO_9660_START[] = { 
++  (char) 0x01,
++  (char) 0x43,
++  (char) 0x44,
++  (char) 0x30,
++  (char) 0x30,
++  (char) 0x31,
++  (char) 0x01,
++  (char) 0x00
++};
++
++const char ISO_9660[] = { 
++  (char) 0x02,
++  (char) 0x43,
++  (char) 0x44,
++  (char) 0x30,
++  (char) 0x30,
++  (char) 0x31,
++  (char) 0x01,
++  (char) 0x00
++};
++
++const char ISO_9660_END[] = { 
++  (char) 0xFF,
++  (char) 0x43,
++  (char) 0x44,
++  (char) 0x30,
++  (char) 0x30,
++  (char) 0x31,
++  (char) 0x01,
++  (char) 0x00
++};
++
++/* Signature for RAW image */
++const char SYNC_RAW[12] = { 
++  (char) 0x00,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0xFF,
++  (char) 0x00
+ };
+ 
+ const char SYNC_RAW_2[8] = {
+-  (char) 0x00,
+-  (char) 0x00,
+-  (char) 0x08,
+-  (char) 0x00,
+-  (char) 0x00,
+-  (char) 0x00,
+-  (char) 0x08,
+-  (char) 0x00,
++  (char) 0x00,
++  (char) 0x00,
++  (char) 0x08,
++  (char) 0x00,
++  (char) 0x00,
++  (char) 0x00,
++  (char) 0x08,
++  (char) 0x00,
+ };
+ 
+ 
+-long img_size;
++long img_size;
+ int  img_detect = 2;
+ 
+ int  img_header = 0;
+@@ -106,260 +121,321 @@
+ 
+ int previous_percent=-1;
+ void main_percent (int percent_bar)
+-// Prints a progress bar, takes a percentage as argument.
++  // Prints a progress bar, takes a percentage as argument.
+ {
+   //int progress_bar, progress_space;
+-  
++
+   if (percent_bar==previous_percent) return;  // Nothing changed, don't waste 
CPU cycles.
+-  
+-  printf("%3d%% 
[:%.*s>%.*s:]\r",percent_bar,percent_bar/5,"====================",
+-                                        20-(percent_bar/5),"                  
  ");
+ 
++  if (isatty(fileno(stderr)))
++  {
++  fprintf(stderr, 
++    "\r%3d%% [:%.*s>%.*s:]",
++    percent_bar,
++    percent_bar/5,
++    "====================",
++    20-(percent_bar/5),
++    "                    ");
++  }
++  else
++  {
++    if (previous_percent==-1) fprintf(stderr, "Working ");
++    if ((percent_bar/5)*5==percent_bar) fprintf(stderr, ".");
++  }
++  previous_percent=percent_bar;
+ }
+ 
+ 
+-void
++  void
+ usage ()
+ {
+-
+-  printf ("Web     : http://developer.berlios.de/projects/iat\n";);
+-  printf ("Email   : salvatore.santag...@gmail.com\n");
+-  printf ("Irc     : irc.freenode.net #ignus\n");
+-  printf ("Note          : What's My Age Again? \n");
+-  
+-  printf ("Usage :\n");
+-  printf ("iat  OPTIONS[inputfile] OPTIONS[outputfile]\n\n");
+-//  printf ("OPTIONS\n");
+-//  printf ("\t-i     --iso                   Generate iso image from bin 
image\n");
+-//  printf ("\t-l     --log                   Generate log  for debug 
image\n");
+-//  printf ("\t-v     --verbose               Print verbose messages\n");
+-//  printf ("\t-o --output filename       Write output to file\n");
+-  printf ("\t-h --help                Display this notice\n\n");
++  fprintf (stderr, "Web     : http://developer.berlios.de/projects/iat\n";);
++  fprintf (stderr, "Email   : salvatore.santag...@gmail.com\n");
++  fprintf (stderr, "Irc     : irc.freenode.net #ignus\n\n");
++
++  fprintf (stderr, "Usage   : ");
++  fprintf (stderr, "iat  input_file [output_file.iso]\n\n");
++  fprintf (stderr, "\tIf output file name is not defined, \n"
++            "\tthen stdout will be used instead.\n");
++  //  printf ("OPTIONS\n");
++  //  printf ("\t-i   --iso                   Generate iso image from bin 
image\n");
++  //  printf ("\t-l   --log                   Generate log  for debug 
image\n");
++  //  printf ("\t-v   --verbose               Print verbose messages\n");
++  //  printf ("\t-o --output filename       Write output to file\n");
++  fprintf (stderr, "\nOptions :\n");
++  fprintf (stderr, "\t-h              Display this notice\n\n");
+ }
+ 
+ 
+ 
+ int image_convert()
+ {
+-      
+-      long source_length, i;
+-      char buf[2448];
+-
+-
+-      fseek (fsource, 0L, SEEK_END);
+-      source_length = (ftell (fsource) - img_offset) / img_size_sector;
+-      
+-        
+-            fseek (fsource, img_offset, SEEK_SET);
+-
+-            {
+-              for (i = 0; i < source_length; i++)
+-
+-                {
+-                  main_percent(i*100/source_length);
+-                      
+-                  fseek (fsource, img_header, SEEK_CUR);
+-                  if (fread (buf, sizeof (char),  BLOCK_ISO_CD, fsource));
+-
+-                  else
+-                    {
+-                      printf ("%s\n", strerror (errno));
+-                      exit (EXIT_FAILURE);
+-                    };
+-                  if (fwrite (buf, sizeof (char),  BLOCK_ISO_CD, fdest));
+-
+-                  else
+-                    {
+-                      printf ("%s\n", strerror (errno));
+-                      exit (EXIT_FAILURE);
+-                    };
+-                  fseek (fsource, img_ecc, SEEK_CUR);
+-              }
+-            }
+-      printf ("100%% [:=====================:]\n");   
+-return 0;
++
++  long source_length, i;
++  char buf[2448];
++
++
++  fseek (fsource, 0L, SEEK_END);
++  source_length = (ftell (fsource) - img_offset) / img_size_sector;
++
++
++  fseek (fsource, img_offset, SEEK_SET);
++
++  {
++    for (i = 0; i < source_length; i++)
++
++    {
++      main_percent(i*100/source_length);
++
++      fseek (fsource, img_header, SEEK_CUR);
++      if (fread (buf, sizeof (char),  BLOCK_ISO_CD, fsource));
++
++      else
++      {
++        fprintf (stderr, "%s\n", strerror (errno));
++        exit (EXIT_FAILURE);
++      };
++      if (fwrite (buf, sizeof (char),  BLOCK_ISO_CD, fdest));
++
++      else
++      {
++        fprintf (stderr, "%s\n", strerror (errno));
++        exit (EXIT_FAILURE);
++      };
++      fseek (fsource, img_ecc, SEEK_CUR);
++    }
++  }
++  if (isatty(fileno(stderr)))
++    fprintf (stderr, "\rDone                           \n");
++  else
++    fprintf (stderr, " Done\n");
++  return 0;
+ }
+ 
+ 
+-int image_detection() 
++int image_detection() 
+ {
+-    char buf[8];
+-    char raw[12];
+-    int i;
+-    int block_image_start = 0;
+-    int block_image_end = 0; 
+-    int block_image_temp = 0;
+-    int block_image = 0;
+-    int block_image_detect = 0;       
+-    int img_header_temp = 0;
+-    int raw_2_check = 0;
+-    int raw_check = 0;
+-
+-
+-    
        fseek(fsource, 0L, SEEK_END);
+-    
        img_size = (((ftell(fsource))) / 8);
+-
        for (i = 0; img_detect == 2; i = i + 1)
+-      {
+-              fseek(fsource, 0L, SEEK_SET);
+-              fseek(fsource, i, SEEK_CUR);
+-              fread(buf, sizeof(char), 8, fsource);
+-              fread(raw, sizeof(char), 12, fsource);
+-              
+-              if (!memcmp(ISO_9660_START, buf, 8))
+-              {
+-                      printf("Detect Signature ISO9660 START at %d\n", i);
+-                      if (block_image_start == 0) block_image_start = i ;
+-              }
+-      

                if (!memcmp(ISO_9660, buf, 8))
+-              {
+-                      printf("Detect Signature ISO9660 at %d\n", i);
+-                      if (block_image_end == 0)
+-                              {
+-                                      block_image_end = i;
+-                                      block_image_temp = block_image_end - 
block_image_start;
+-                              }
+-                              
+-                      img_detect++;
+-              }

                if (!memcmp(ISO_9660_END, buf, 8))
+-              {
+-                      printf("Detect Signature ISO9660 END at %d\n", i);
+-                      if (block_image_end == 0)
+-                              {
+-                                      block_image_end = i;
+-                                      block_image_temp = block_image_end - 
block_image_start;
+-                              }
+-                      img_detect++;
+-              }
+-         
+-
+-              if (!memcmp(SYNC_RAW_2, buf, 8)) 
+-              {
+-                      printf("Detect Signature RAW 2 at %d\n", i);
+-                      if (raw_2_check == 0) 
+-                      {
+-                              img_header = img_header + 8;
+-                              raw_2_check = 1;
+-                      } 
+-        
+-              }
                  
+-              if (!memcmp(SYNC_RAW, raw, 12))
+-              {
+-                      printf("Detect Signature RAW at %d\n", i);
+-                      if (raw_check == 0) 
+-                      {
+-                              img_header = img_header + 16;
+-                              raw_check = 1;
+-                      }
+-
+-              }  
+-
+-          
                if ((img_size * 8) <= i) 
+-              {
+-                      img_detect = -1;
+-                      printf("Image is broken\n");
+-                      return 0;
+-              }
                
+-      }
+-      
+-      /* Detect Block structure of image */
+-
+-      for (block_image_detect = 1; block_image_detect == 1; block_image_temp 
=(block_image_temp / 2))
+-              {
+-                      if (block_image_temp >= 2048)
+-                      {
+-                              switch (block_image_temp) 
+-                                      {
+-                                              case 2048  :                    
                                                block_image = block_image_temp;
+-                                                              
block_image_detect++;
+-                                                              break;
+-                                              case 2352  :    
+-                                                              block_image = 
block_image_temp;
+-                                                              
block_image_detect++;
+-                                                              break;
+-                                              case 2336  :
+-                                                              block_image = 
block_image_temp;
+-                                                              
block_image_detect++;
+-                                                              break;
+-                                              case 2448  :
+-                                                              block_image = 
block_image_temp;
+-                                                              
block_image_detect++;
+-                                                              break;
+-                                              default :
+-                                                              break;
+-                                      }
+-                      
+-                      }
+-
+-                      else block_image_detect = -1;
+-
+-              }
+-
+-      if (block_image_detect == -1);
+-      else      
+-              img_size_sector = block_image;  
+-
+-      /* Size header of image */
+-
+-     img_header_temp = block_image_start - block_image * 16;
+-
+-     if ((img_header_temp == 8) || (img_header_temp == 16) || 
(img_header_temp == 24))
+-     {     
+-      img_header = img_header_temp;     
+-     }        
+-
+-
+-     /* Size ECC of image */
+-
+-     img_ecc = block_image - img_header - BLOCK_ISO_CD;
+-
+-              
+-     /* Dump of image */
+-
+-    img_offset = block_image_start - block_image * 16 - img_header;   
+-
+-
+-    printf("\n Image offset start at %d", img_offset);
+-    printf("\n Sector header %d bit", img_header);
+-    printf("\n Sector ECC %d bit", img_ecc);
+-    printf("\n Block %d\n", block_image);     
++  char buf[8];
++  char raw[12];
++  int i;
++  int block_image_start = 0;
++  int block_image_end = 0;
++  int block_image_temp = 0;
++  int block_image = 0;
++  int block_image_detect = 0;
++  int img_header_temp = 0;
++  int raw_2_check = 0;
++  int raw_check = 0;
++
++
++  fseek(fsource, 0L, SEEK_END);
++  img_size = (((ftell(fsource))) / 8);
++  for (i = 0; img_detect == 2; i = i + 1)
++  {
++    fseek(fsource, 0L, SEEK_SET);
++    fseek(fsource, i, SEEK_CUR);
++    fread(buf, sizeof(char), 8, fsource);
++    fread(raw, sizeof(char), 12, fsource);
++
++    if (!memcmp(ISO_9660_START, buf, 8))
++    {
++      fprintf(stderr, "Detect Signature ISO9660 START at %d\n", i);
++      if (block_image_start == 0) block_image_start = i ;
++    }
++    if (!memcmp(ISO_9660, buf, 8))
++    {
++      fprintf(stderr, "Detect Signature ISO9660 at %d\n", i);
++      if (block_image_end == 0)
++      {
++        block_image_end = i;
++        block_image_temp = block_image_end - block_image_start;
++      }
++
++      img_detect++;
++    }
++
++    if (!memcmp(ISO_9660_END, buf, 8))
++    {
++      fprintf(stderr, "Detect Signature ISO9660 END at %d\n", i);
++      if (block_image_end == 0)
++      {
++        block_image_end = i;
++        block_image_temp = block_image_end - block_image_start;
++      }
++      img_detect++;
++    }
++
++
++    if (!memcmp(SYNC_RAW_2, buf, 8))
++    {
++      fprintf(stderr, "Detect Signature RAW 2 at %d\n", i);
++      if (raw_2_check == 0)
++      {
++        img_header = img_header + 8;
++        raw_2_check = 1;
++      }
++
++    }
++    if (!memcmp(SYNC_RAW, raw, 12))
++    {
++      fprintf(stderr, "Detect Signature RAW at %d\n", i);
++      if (raw_check == 0)
++      {
++        img_header = img_header + 16;
++        raw_check = 1;
++      }
++
++    }
++
++    if ((img_size * 8) <= i)
++    {
++      img_detect = -1;
++      fprintf(stderr, "Image is broken\n");
++      return 0;
++    }
++  }
++
++  /* Detect Block structure of image */
++
++  for (block_image_detect = 1; block_image_detect == 1; block_image_temp 
=(block_image_temp / 2))
++  {
++    if (block_image_temp >= 2048)
++    {
++      switch (block_image_temp)
++      {
++        case 2048  :                                                          
        block_image = block_image_temp;
++                                      block_image_detect++;
++                                      break;
++        case 2352  :
++                                      block_image = block_image_temp;
++                                      block_image_detect++;
++                                      break;
++        case 2336  :
++                                      block_image = block_image_temp;
++                                      block_image_detect++;
++                                      break;
++        case 2448  :
++                                      block_image = block_image_temp;
++                                      block_image_detect++;
++                                      break;
++        default :
++                                      break;
++      }
++
++    }
++
++    else block_image_detect = -1;
++
++  }
++
++  if (block_image_detect == -1);
++  else
++    img_size_sector = block_image;
++
++  /* Size header of image */
++
++  img_header_temp = block_image_start - block_image * 16;
++
++  if ((img_header_temp == 8) || (img_header_temp == 16) || (img_header_temp 
== 24))
++  {
++    img_header = img_header_temp;
++  }
++
++
++  /* Size ECC of image */
++
++  img_ecc = block_image - img_header - BLOCK_ISO_CD;
++
++
++  /* Dump of image */
++
++  img_offset = block_image_start - block_image * 16 - img_header;
++
++
++  fprintf(stderr, "\n Image offset start at %d", img_offset);
++  fprintf(stderr, "\n Sector header %d bit", img_header);
++  fprintf(stderr, "\n Sector ECC %d bit", img_ecc);
++  fprintf(stderr, "\n Block %d\n", block_image);
++
++  return 1;
++}
+ 
+-    
return 1;
+-
}
+ 
+-int main(int argc, char **argv) 
++void parse_options(int argc, char ** argv)
+ {
++  int c;
++  
++  for (c=getopt(argc, argv, OPTIONS_LIST);
++      c!=-1;
++      c=getopt(argc, argv, OPTIONS_LIST))
++  {
++    switch(c)
++    {
++      case 'h':
++        usage();
++        exit(0);
++
++      case '?':
++        break;
++
++      default:
++        fprintf (stderr, "?? getopt returned character code 0%o ??\n", c);
++
++    }
++  }
++
++  if (argc-optind<1 || argc-optind>2)
++  {
++    usage();
++    exit(EXIT_FAILURE);
++  }
+ 
+-      printf("Iso9660 Analyzer Tool v%s by Salvatore Santagati\n", VERSION);
+-      printf("Licensed under GPL v2 or later\n");
++  input_file=argv[optind];
++  if (argc-optind==2) output_file=argv[optind+1];
++}
+ 
+ 
+-      if ((fsource = fopen(argv[1], "rb")) != NULL)
+-              {
+-                      if (image_detection() == 0)
+-                              printf("This image is not CD IMAGE\n");
+-                      else if  (argc > 2)
+-                              {
+-                                      if ((fdest = fopen(argv[2],"wb")) != 
NULL)
+-                                      {
+-                                              image_convert();
+-                                              fclose(fdest);
+-                                      }
+-                                      else
+-                                              {                       
+-                                                      printf("%s\n", 
strerror(errno));
+-                                                      usage();
+-                                              }
+-                              }
+-                      
+-              }               
+-      else    
+-              {       
+-                      printf("%s\n", strerror(errno));
+-                      usage();
+-                      exit(EXIT_FAILURE);
+-              }       
+-      
+-      return 1;                               
+-       
+-}   
++int main(int argc, char **argv)
++{
++  fprintf(stderr, 
++    "Iso9660 Analyzer Tool v%s by Salvatore Santagati\n", VERSION);
++  fprintf(stderr, "Licensed under GPL v2 or later\n\n");
++
++  parse_options(argc, argv);
++
++  if ((fsource = fopen(input_file, "rb")) != NULL)
++  {
++    if (image_detection() == 0)
++    {
++      fprintf(stderr, "This image is not CD IMAGE\n");
++      exit(EXIT_FAILURE);
++    }
++    else
++    {
++      if (output_file)
++      {
++        if (!(fdest = fopen(output_file, "wb")))
++        {
++          fprintf(stderr, "%s\n", strerror(errno));
++          usage();
++          exit(EXIT_FAILURE);
++        }
++      }
++      else
++      {
++        fdest=stdout;
++      }
++      image_convert();
++      fclose(fdest);
++    }
++  }
++  else
++  {
++    fprintf(stderr, "%s\n", strerror(errno));
++    usage();
++    exit(EXIT_FAILURE);
++  }
++
++  return 0;
++}
+ 
diff -Nru iat-0.1.3/debian/patches/0002_add_manpage.patch 
iat-0.1.3/debian/patches/0002_add_manpage.patch
--- iat-0.1.3/debian/patches/0002_add_manpage.patch     1970-01-01 
08:00:00.000000000 +0800
+++ iat-0.1.3/debian/patches/0002_add_manpage.patch     2022-12-13 
06:09:17.000000000 +0800
@@ -0,0 +1,61 @@
+Index: iat-0.1.3/src/Makefile.am
+===================================================================
+--- iat-0.1.3.orig/src/Makefile.am
++++ iat-0.1.3/src/Makefile.am
+@@ -1,3 +1,4 @@
+ bin_PROGRAMS = iat
+ iat_SOURCES = iat.c
++man_MANS = iat.1
+ AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -Wall
+Index: iat-0.1.3/src/iat.1
+===================================================================
+--- /dev/null
++++ iat-0.1.3/src/iat.1
+@@ -0,0 +1,47 @@
++.TH iat 1 "Mon Apr 2 17:21:31 MSD 2007"
++.SH NAME
++.B iat
++- converts many CD-ROM image formats to iso9660.
++.SH SYNOPSIS
++.B iat input_image_file [output_iso_file]
++.PP
++.B iat -h
++.SH DESCRIPTION
++.PP
++iat  (Iso9660 Analyzer Tool) is a tool for detecting the structure
++of many types of CD-ROM image file formats, such as BIN, MDF, PDI,
++CDI, NRG, and B5I, and  converting them into ISO-9660.
++.PP
++If output file name is not defined, then STDOUT will be used instead.
++.SH EXAMPLES
++.PP
++.B iat my_image.mdf my_new_image.iso
++.PP 
++.RS 3
++- Convert MDF-image to ISO9660.
++.RE
++.PP
++.B iat my_image.bin > my_new_image.iso
++.PP
++.RS 3 
++- Convert BIN-image to ISO9660.
++.RE
++.PP
++.B iat my_image.mdf | cdrecord -
++.PP
++.RS 3
++- Write CD directly from MDF-format.
++.RE
++.PP
++.B iat -h
++.PP
++.RS 3
++- The help screen.
++.RE
++.SH AUTHOR
++Salvatore Santagati <salvatore.santag...@gmail.com>
++.SH SEE ALSO
++.B mkisofs
++(1),
++.B wodim
++(1)
diff -Nru iat-0.1.3/debian/patches/series iat-0.1.3/debian/patches/series
--- iat-0.1.3/debian/patches/series     1970-01-01 08:00:00.000000000 +0800
+++ iat-0.1.3/debian/patches/series     2022-12-13 06:09:17.000000000 +0800
@@ -0,0 +1,2 @@
+0001_iat_c.patch
+0002_add_manpage.patch
diff -Nru iat-0.1.3/debian/rules iat-0.1.3/debian/rules
--- iat-0.1.3/debian/rules      2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/debian/rules      2022-12-13 06:09:17.000000000 +0800
@@ -9,60 +9,12 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+%:
+       dh $@
 
-CFLAGS = -Wall -g
+override_dh_auto_configure:
+       dh_auto_configure -- --prefix=/usr --mandir=\$${prefix}/share/man 
--infodir=\$${prefix}/share/info
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
-
-config-stamp: 
-       dh_testdir
-       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" 2>&1 | tee $@
-
-
-build: build-stamp
-
-build-stamp:  config-stamp
-       dh_testdir
-       $(MAKE)
-       touch $@
-
-clean:
-       dh_testdir
-       dh_testroot
-       [ ! -f Makefile ] || [ ! -f config.status ] || $(MAKE) distclean
-       rm -f config-stamp build-stamp
-#          rm -f src/Makefile.in
-       dh_clean 
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
-       $(MAKE) DESTDIR=$(CURDIR)/debian/iat install
-
-
-binary-indep: build install
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs ChangeLog
-       dh_installdocs
-       dh_installexamples
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+override_dh_auto_clean:
+       dh_clean
+       dh_auto_clean
diff -Nru iat-0.1.3/debian/source/format iat-0.1.3/debian/source/format
--- iat-0.1.3/debian/source/format      1970-01-01 08:00:00.000000000 +0800
+++ iat-0.1.3/debian/source/format      2022-12-13 06:09:17.000000000 +0800
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru iat-0.1.3/Makefile.in iat-0.1.3/Makefile.in
--- iat-0.1.3/Makefile.in       2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/Makefile.in       2007-03-08 23:11:26.000000000 +0800
@@ -90,7 +90,6 @@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-GREP = @GREP@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -113,6 +112,7 @@
 STRIP = @STRIP@
 VERSION = @VERSION@
 ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
@@ -123,26 +123,19 @@
 bindir = @bindir@
 build_alias = @build_alias@
 datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
-htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
-localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
-psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
diff -Nru iat-0.1.3/src/iat.1 iat-0.1.3/src/iat.1
--- iat-0.1.3/src/iat.1 2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/src/iat.1 1970-01-01 08:00:00.000000000 +0800
@@ -1,47 +0,0 @@
-.TH iat 1 "Mon Apr 2 17:21:31 MSD 2007"
-.SH NAME
-.B iat
-- converts many CD-ROM image formats to iso9660.
-.SH SYNOPSIS
-.B iat input_image_file [output_iso_file]
-.PP
-.B iat -h
-.SH DESCRIPTION
-.PP
-iat  (Iso9660 Analyzer Tool) is a tool for detecting the structure
-of many types of CD-ROM image file formats, such as BIN, MDF, PDI,
-CDI, NRG, and B5I, and  converting them into ISO-9660.
-.PP
-If output file name is not defined, then STDOUT will be used instead.
-.SH EXAMPLES
-.PP
-.B iat my_image.mdf my_new_image.iso
-.PP 
-.RS 3
-- Convert MDF-image to ISO9660.
-.RE
-.PP
-.B iat my_image.bin > my_new_image.iso
-.PP
-.RS 3 
-- Convert BIN-image to ISO9660.
-.RE
-.PP
-.B iat my_image.mdf | cdrecord -
-.PP
-.RS 3
-- Write CD directly from MDF-format.
-.RE
-.PP
-.B iat -h
-.PP
-.RS 3
-- The help screen.
-.RE
-.SH AUTHOR
-Salvatore Santagati <salvatore.santag...@gmail.com>
-.SH SEE ALSO
-.B mkisofs
-(1),
-.B wodim
-(1)
diff -Nru iat-0.1.3/src/iat.c iat-0.1.3/src/iat.c
--- iat-0.1.3/src/iat.c 2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/src/iat.c 2007-03-08 23:39:49.000000000 +0800
@@ -14,99 +14,84 @@
     along with this program; if not, write to the
     Free Software Foundation, Inc.,
     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-    */
-
-
-/*
- * Modified by Dmitry E. Oboukhov <di...@avanto.org>
- *  [+] Use 'getopt' function;
- *  [+] Use STDOUT as output file (if not defined);
- *  [*] Fix percent output.
- */
+*/
 
 /* Support Large File */
+
 #define _FILE_OFFSET_BITS 64
 
-#include <unistd.h>
 #include <getopt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 
-
 #define VERSION "0.1.3"
 #define BLOCK_ISO_CD 2048
 
-
-#define OPTIONS_LIST   "h"
-
-
-static char *input_file=0, *output_file=0;
-
-/* Signature for Image ISO-9660 */
-const char ISO_9660_START[] = { 
-  (char) 0x01,
-  (char) 0x43,
-  (char) 0x44,
-  (char) 0x30,
-  (char) 0x30,
-  (char) 0x31,
-  (char) 0x01,
-  (char) 0x00
-};
-
-const char ISO_9660[] = { 
-  (char) 0x02,
-  (char) 0x43,
-  (char) 0x44,
-  (char) 0x30,
-  (char) 0x30,
-  (char) 0x31,
-  (char) 0x01,
-  (char) 0x00
-};
-
-const char ISO_9660_END[] = { 
-  (char) 0xFF,
-  (char) 0x43,
-  (char) 0x44,
-  (char) 0x30,
-  (char) 0x30,
-  (char) 0x31,
-  (char) 0x01,
-  (char) 0x00
-};
-
-/* Signature for RAW image */
-const char SYNC_RAW[12] = { 
-  (char) 0x00,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0xFF,
-  (char) 0x00
+/* Signature for Image ISO-9660 */
+const char ISO_9660_START[] = { 
+  (char) 0x01,
+  (char) 0x43,
+  (char) 0x44,
+  (char) 0x30,
+  (char) 0x30,
+  (char) 0x31,
+  (char) 0x01,
+  (char) 0x00
+};
+
+const char ISO_9660[] = { 
+  (char) 0x02,
+  (char) 0x43,
+  (char) 0x44,
+  (char) 0x30,
+  (char) 0x30,
+  (char) 0x31,
+  (char) 0x01,
+  (char) 0x00
+};
+
+const char ISO_9660_END[] = { 
+  (char) 0xFF,
+  (char) 0x43,
+  (char) 0x44,
+  (char) 0x30,
+  (char) 0x30,
+  (char) 0x31,
+  (char) 0x01,
+  (char) 0x00
+};
+
+/* Signature for RAW image */
+const char SYNC_RAW[12] = { 
+  (char) 0x00,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0xFF,
+  (char) 0x00
 };
 
 const char SYNC_RAW_2[8] = {
-  (char) 0x00,
-  (char) 0x00,
-  (char) 0x08,
-  (char) 0x00,
-  (char) 0x00,
-  (char) 0x00,
-  (char) 0x08,
-  (char) 0x00,
+  (char) 0x00,
+  (char) 0x00,
+  (char) 0x08,
+  (char) 0x00,
+  (char) 0x00,
+  (char) 0x00,
+  (char) 0x08,
+  (char) 0x00,
 };
 
 
-long img_size;
+long img_size;
 int  img_detect = 2;
 
 int  img_header = 0;
@@ -121,321 +106,260 @@
 
 int previous_percent=-1;
 void main_percent (int percent_bar)
-  // Prints a progress bar, takes a percentage as argument.
+// Prints a progress bar, takes a percentage as argument.
 {
   //int progress_bar, progress_space;
-
+  
   if (percent_bar==previous_percent) return;  // Nothing changed, don't waste 
CPU cycles.
+  
+  printf("%3d%% 
[:%.*s>%.*s:]\r",percent_bar,percent_bar/5,"====================",
+                                        20-(percent_bar/5),"                   
 ");
 
-  if (isatty(fileno(stderr)))
-  {
-  fprintf(stderr, 
-    "\r%3d%% [:%.*s>%.*s:]",
-    percent_bar,
-    percent_bar/5,
-    "====================",
-    20-(percent_bar/5),
-    "                    ");
-  }
-  else
-  {
-    if (previous_percent==-1) fprintf(stderr, "Working ");
-    if ((percent_bar/5)*5==percent_bar) fprintf(stderr, ".");
-  }
-  previous_percent=percent_bar;
 }
 
 
-  void
+void
 usage ()
 {
-  fprintf (stderr, "Web     : http://developer.berlios.de/projects/iat\n";);
-  fprintf (stderr, "Email   : salvatore.santag...@gmail.com\n");
-  fprintf (stderr, "Irc     : irc.freenode.net #ignus\n\n");
-
-  fprintf (stderr, "Usage   : ");
-  fprintf (stderr, "iat  input_file [output_file.iso]\n\n");
-  fprintf (stderr, "\tIf output file name is not defined, \n"
-            "\tthen stdout will be used instead.\n");
-  //  printf ("OPTIONS\n");
-  //  printf ("\t-i    --iso                   Generate iso image from bin 
image\n");
-  //  printf ("\t-l    --log                   Generate log  for debug 
image\n");
-  //  printf ("\t-v    --verbose               Print verbose messages\n");
-  //  printf ("\t-o --output filename       Write output to file\n");
-  fprintf (stderr, "\nOptions :\n");
-  fprintf (stderr, "\t-h               Display this notice\n\n");
+
+  printf ("Web     : http://developer.berlios.de/projects/iat\n";);
+  printf ("Email   : salvatore.santag...@gmail.com\n");
+  printf ("Irc     : irc.freenode.net #ignus\n");
+  printf ("Note           : What's My Age Again? \n");
+  
+  printf ("Usage :\n");
+  printf ("iat  OPTIONS[inputfile] OPTIONS[outputfile]\n\n");
+//  printf ("OPTIONS\n");
+//  printf ("\t-i      --iso                   Generate iso image from bin 
image\n");
+//  printf ("\t-l      --log                   Generate log  for debug 
image\n");
+//  printf ("\t-v      --verbose               Print verbose messages\n");
+//  printf ("\t-o --output filename       Write output to file\n");
+  printf ("\t-h --help                 Display this notice\n\n");
 }
 
 
 
 int image_convert()
 {
-
-  long source_length, i;
-  char buf[2448];
-
-
-  fseek (fsource, 0L, SEEK_END);
-  source_length = (ftell (fsource) - img_offset) / img_size_sector;
-
-
-  fseek (fsource, img_offset, SEEK_SET);
-
-  {
-    for (i = 0; i < source_length; i++)
-
-    {
-      main_percent(i*100/source_length);
-
-      fseek (fsource, img_header, SEEK_CUR);
-      if (fread (buf, sizeof (char),  BLOCK_ISO_CD, fsource));
-
-      else
-      {
-        fprintf (stderr, "%s\n", strerror (errno));
-        exit (EXIT_FAILURE);
-      };
-      if (fwrite (buf, sizeof (char),  BLOCK_ISO_CD, fdest));
-
-      else
-      {
-        fprintf (stderr, "%s\n", strerror (errno));
-        exit (EXIT_FAILURE);
-      };
-      fseek (fsource, img_ecc, SEEK_CUR);
-    }
-  }
-  if (isatty(fileno(stderr)))
-    fprintf (stderr, "\rDone                           \n");
-  else
-    fprintf (stderr, " Done\n");
-  return 0;
+       
+       long source_length, i;
+       char buf[2448];
+
+
+       fseek (fsource, 0L, SEEK_END);
+       source_length = (ftell (fsource) - img_offset) / img_size_sector;
+       
+         
+             fseek (fsource, img_offset, SEEK_SET);
+
+             {
+               for (i = 0; i < source_length; i++)
+
+                 {
+                   main_percent(i*100/source_length);
+                       
+                   fseek (fsource, img_header, SEEK_CUR);
+                   if (fread (buf, sizeof (char),  BLOCK_ISO_CD, fsource));
+
+                   else
+                     {
+                       printf ("%s\n", strerror (errno));
+                       exit (EXIT_FAILURE);
+                     };
+                   if (fwrite (buf, sizeof (char),  BLOCK_ISO_CD, fdest));
+
+                   else
+                     {
+                       printf ("%s\n", strerror (errno));
+                       exit (EXIT_FAILURE);
+                     };
+                   fseek (fsource, img_ecc, SEEK_CUR);
+               }
+             }
+       printf ("100%% [:=====================:]\n");   
+return 0;
 }
 
 
-int image_detection() 
+int image_detection() 
 {
-  char buf[8];
-  char raw[12];
-  int i;
-  int block_image_start = 0;
-  int block_image_end = 0;
-  int block_image_temp = 0;
-  int block_image = 0;
-  int block_image_detect = 0;
-  int img_header_temp = 0;
-  int raw_2_check = 0;
-  int raw_check = 0;
-
-
-  fseek(fsource, 0L, SEEK_END);
-  img_size = (((ftell(fsource))) / 8);
-  for (i = 0; img_detect == 2; i = i + 1)
-  {
-    fseek(fsource, 0L, SEEK_SET);
-    fseek(fsource, i, SEEK_CUR);
-    fread(buf, sizeof(char), 8, fsource);
-    fread(raw, sizeof(char), 12, fsource);
-
-    if (!memcmp(ISO_9660_START, buf, 8))
-    {
-      fprintf(stderr, "Detect Signature ISO9660 START at %d\n", i);
-      if (block_image_start == 0) block_image_start = i ;
-    }
-    if (!memcmp(ISO_9660, buf, 8))
-    {
-      fprintf(stderr, "Detect Signature ISO9660 at %d\n", i);
-      if (block_image_end == 0)
-      {
-        block_image_end = i;
-        block_image_temp = block_image_end - block_image_start;
-      }
-
-      img_detect++;
-    }
-
-    if (!memcmp(ISO_9660_END, buf, 8))
-    {
-      fprintf(stderr, "Detect Signature ISO9660 END at %d\n", i);
-      if (block_image_end == 0)
-      {
-        block_image_end = i;
-        block_image_temp = block_image_end - block_image_start;
-      }
-      img_detect++;
-    }
-
-
-    if (!memcmp(SYNC_RAW_2, buf, 8))
-    {
-      fprintf(stderr, "Detect Signature RAW 2 at %d\n", i);
-      if (raw_2_check == 0)
-      {
-        img_header = img_header + 8;
-        raw_2_check = 1;
-      }
-
-    }
-    if (!memcmp(SYNC_RAW, raw, 12))
-    {
-      fprintf(stderr, "Detect Signature RAW at %d\n", i);
-      if (raw_check == 0)
-      {
-        img_header = img_header + 16;
-        raw_check = 1;
-      }
-
-    }
-
-    if ((img_size * 8) <= i)
-    {
-      img_detect = -1;
-      fprintf(stderr, "Image is broken\n");
-      return 0;
-    }
-  }
-
-  /* Detect Block structure of image */
-
-  for (block_image_detect = 1; block_image_detect == 1; block_image_temp 
=(block_image_temp / 2))
-  {
-    if (block_image_temp >= 2048)
-    {
-      switch (block_image_temp)
-      {
-        case 2048  :                                                           
        block_image = block_image_temp;
-                                      block_image_detect++;
-                                      break;
-        case 2352  :
-                                      block_image = block_image_temp;
-                                      block_image_detect++;
-                                      break;
-        case 2336  :
-                                      block_image = block_image_temp;
-                                      block_image_detect++;
-                                      break;
-        case 2448  :
-                                      block_image = block_image_temp;
-                                      block_image_detect++;
-                                      break;
-        default :
-                                      break;
-      }
-
-    }
-
-    else block_image_detect = -1;
-
-  }
-
-  if (block_image_detect == -1);
-  else
-    img_size_sector = block_image;
-
-  /* Size header of image */
-
-  img_header_temp = block_image_start - block_image * 16;
-
-  if ((img_header_temp == 8) || (img_header_temp == 16) || (img_header_temp == 
24))
-  {
-    img_header = img_header_temp;
-  }
-
-
-  /* Size ECC of image */
-
-  img_ecc = block_image - img_header - BLOCK_ISO_CD;
-
-
-  /* Dump of image */
-
-  img_offset = block_image_start - block_image * 16 - img_header;
-
-
-  fprintf(stderr, "\n Image offset start at %d", img_offset);
-  fprintf(stderr, "\n Sector header %d bit", img_header);
-  fprintf(stderr, "\n Sector ECC %d bit", img_ecc);
-  fprintf(stderr, "\n Block %d\n", block_image);
-
-  return 1;
-}
+    char buf[8];
+    char raw[12];
+    int i;
+    int block_image_start = 0;
+    int block_image_end = 0; 
+    int block_image_temp = 0;
+    int block_image = 0;
+    int block_image_detect = 0;        
+    int img_header_temp = 0;
+    int raw_2_check = 0;
+    int raw_check = 0;
+
+
+    
        fseek(fsource, 0L, SEEK_END);
+    
        img_size = (((ftell(fsource))) / 8);
+
        for (i = 0; img_detect == 2; i = i + 1)
+       {
+               fseek(fsource, 0L, SEEK_SET);
+               fseek(fsource, i, SEEK_CUR);
+               fread(buf, sizeof(char), 8, fsource);
+               fread(raw, sizeof(char), 12, fsource);
+               
+               if (!memcmp(ISO_9660_START, buf, 8))
+               {
+                       printf("Detect Signature ISO9660 START at %d\n", i);
+                       if (block_image_start == 0) block_image_start = i ;
+               }
+       

                if (!memcmp(ISO_9660, buf, 8))
+               {
+                       printf("Detect Signature ISO9660 at %d\n", i);
+                       if (block_image_end == 0)
+                               {
+                                       block_image_end = i;
+                                       block_image_temp = block_image_end - 
block_image_start;
+                               }
+                               
+                       img_detect++;
+               }

                if (!memcmp(ISO_9660_END, buf, 8))
+               {
+                       printf("Detect Signature ISO9660 END at %d\n", i);
+                       if (block_image_end == 0)
+                               {
+                                       block_image_end = i;
+                                       block_image_temp = block_image_end - 
block_image_start;
+                               }
+                       img_detect++;
+               }
+          
+
+               if (!memcmp(SYNC_RAW_2, buf, 8)) 
+               {
+                       printf("Detect Signature RAW 2 at %d\n", i);
+                       if (raw_2_check == 0) 
+                       {
+                               img_header = img_header + 8;
+                               raw_2_check = 1;
+                       } 
+         
+               }
                  
+               if (!memcmp(SYNC_RAW, raw, 12))
+               {
+                       printf("Detect Signature RAW at %d\n", i);
+                       if (raw_check == 0) 
+                       {
+                               img_header = img_header + 16;
+                               raw_check = 1;
+                       }
+
+               }  
+
+           
                if ((img_size * 8) <= i) 
+               {
+                       img_detect = -1;
+                       printf("Image is broken\n");
+                       return 0;
+               }
                
+       }
+       
+       /* Detect Block structure of image */
+
+       for (block_image_detect = 1; block_image_detect == 1; block_image_temp 
=(block_image_temp / 2))
+               {
+                       if (block_image_temp >= 2048)
+                       {
+                               switch (block_image_temp) 
+                                       {
+                                               case 2048  :                    
                                                block_image = block_image_temp;
+                                                               
block_image_detect++;
+                                                               break;
+                                               case 2352  :    
+                                                               block_image = 
block_image_temp;
+                                                               
block_image_detect++;
+                                                               break;
+                                               case 2336  :
+                                                               block_image = 
block_image_temp;
+                                                               
block_image_detect++;
+                                                               break;
+                                               case 2448  :
+                                                               block_image = 
block_image_temp;
+                                                               
block_image_detect++;
+                                                               break;
+                                               default :
+                                                               break;
+                                       }
+                       
+                       }
+
+                       else block_image_detect = -1;
+
+               }
+
+      if (block_image_detect == -1);
+       else      
+               img_size_sector = block_image;  
+
+      /* Size header of image */
+
+     img_header_temp = block_image_start - block_image * 16;
+
+     if ((img_header_temp == 8) || (img_header_temp == 16) || (img_header_temp 
== 24))
+     {     
+       img_header = img_header_temp;     
+     } 
+
+
+     /* Size ECC of image */
+
+     img_ecc = block_image - img_header - BLOCK_ISO_CD;
+
+               
+     /* Dump of image */
+
+    img_offset = block_image_start - block_image * 16 - img_header;    
+
+
+    printf("\n Image offset start at %d", img_offset);
+    printf("\n Sector header %d bit", img_header);
+    printf("\n Sector ECC %d bit", img_ecc);
+    printf("\n Block %d\n", block_image);      
 
+    
return 1;
+
}
 
-void parse_options(int argc, char ** argv)
+int main(int argc, char **argv) 
 {
-  int c;
-  
-  for (c=getopt(argc, argv, OPTIONS_LIST);
-      c!=-1;
-      c=getopt(argc, argv, OPTIONS_LIST))
-  {
-    switch(c)
-    {
-      case 'h':
-        usage();
-        exit(0);
-
-      case '?':
-        break;
-
-      default:
-        fprintf (stderr, "?? getopt returned character code 0%o ??\n", c);
-
-    }
-  }
-
-  if (argc-optind<1 || argc-optind>2)
-  {
-    usage();
-    exit(EXIT_FAILURE);
-  }
 
-  input_file=argv[optind];
-  if (argc-optind==2) output_file=argv[optind+1];
-}
+       printf("Iso9660 Analyzer Tool v%s by Salvatore Santagati\n", VERSION);
+       printf("Licensed under GPL v2 or later\n");
 
 
-int main(int argc, char **argv)
-{
-  fprintf(stderr, 
-    "Iso9660 Analyzer Tool v%s by Salvatore Santagati\n", VERSION);
-  fprintf(stderr, "Licensed under GPL v2 or later\n\n");
-
-  parse_options(argc, argv);
-
-  if ((fsource = fopen(input_file, "rb")) != NULL)
-  {
-    if (image_detection() == 0)
-    {
-      fprintf(stderr, "This image is not CD IMAGE\n");
-      exit(EXIT_FAILURE);
-    }
-    else
-    {
-      if (output_file)
-      {
-        if (!(fdest = fopen(output_file, "wb")))
-        {
-          fprintf(stderr, "%s\n", strerror(errno));
-          usage();
-          exit(EXIT_FAILURE);
-        }
-      }
-      else
-      {
-        fdest=stdout;
-      }
-      image_convert();
-      fclose(fdest);
-    }
-  }
-  else
-  {
-    fprintf(stderr, "%s\n", strerror(errno));
-    usage();
-    exit(EXIT_FAILURE);
-  }
-
-  return 0;
-}
+       if ((fsource = fopen(argv[1], "rb")) != NULL)
+               {
+                       if (image_detection() == 0)
+                               printf("This image is not CD IMAGE\n");
+                       else if  (argc > 2)
+                               {
+                                       if ((fdest = fopen(argv[2],"wb")) != 
NULL)
+                                       {
+                                               image_convert();
+                                               fclose(fdest);
+                                       }
+                                       else
+                                               {                       
+                                                       printf("%s\n", 
strerror(errno));
+                                                       usage();
+                                               }
+                               }
+                       
+               }               
+       else    
+               {       
+                       printf("%s\n", strerror(errno));
+                       usage();
+                       exit(EXIT_FAILURE);
+               }       
+       
+       return 1;                               
+        
+}   
 
diff -Nru iat-0.1.3/src/Makefile.am iat-0.1.3/src/Makefile.am
--- iat-0.1.3/src/Makefile.am   2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/src/Makefile.am   2007-03-08 22:53:05.000000000 +0800
@@ -1,4 +1,3 @@
 bin_PROGRAMS = iat
-iat_SOURCES = iat.c 
-man_MANS = iat.1
+iat_SOURCES = iat.c
 AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -Wall
diff -Nru iat-0.1.3/src/Makefile.in iat-0.1.3/src/Makefile.in
--- iat-0.1.3/src/Makefile.in   2022-12-13 06:28:02.000000000 +0800
+++ iat-0.1.3/src/Makefile.in   2007-03-08 23:11:26.000000000 +0800
@@ -44,7 +44,7 @@
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_iat_OBJECTS = iat.$(OBJEXT)
@@ -59,9 +59,6 @@
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(iat_SOURCES)
 DIST_SOURCES = $(iat_SOURCES)
-man1dir = $(mandir)/man1
-NROFF = nroff
-MANS = $(man_MANS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -86,7 +83,6 @@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-GREP = @GREP@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -109,6 +105,7 @@
 STRIP = @STRIP@
 VERSION = @VERSION@
 ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
@@ -119,32 +116,24 @@
 bindir = @bindir@
 build_alias = @build_alias@
 datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
-htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
-localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
-psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-iat_SOURCES = iat.c 
-man_MANS = iat.1
+iat_SOURCES = iat.c
 AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -Wall
 all: all-am
 
@@ -228,51 +217,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
 uninstall-info-am:
-install-man1: $(man1_MANS) $(man_MANS)
-       @$(NORMAL_INSTALL)
-       test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
-       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.1*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           1*) ;; \
-           *) ext='1' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
-       done
-uninstall-man1:
-       @$(NORMAL_UNINSTALL)
-       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.1*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           1*) ;; \
-           *) ext='1' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
-       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -351,9 +295,9 @@
        done
 check-am: all-am
 check: check-am
-all-am: Makefile $(PROGRAMS) $(MANS)
+all-am: Makefile $(PROGRAMS)
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+       for dir in "$(DESTDIR)$(bindir)"; do \
          test -z "$$dir" || $(mkdir_p) "$$dir"; \
        done
 install: install-am
@@ -400,13 +344,13 @@
 
 info-am:
 
-install-data-am: install-man
+install-data-am:
 
 install-exec-am: install-binPROGRAMS
 
 install-info: install-info-am
 
-install-man: install-man1
+install-man:
 
 installcheck-am:
 
@@ -427,21 +371,18 @@
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
-
-uninstall-man: uninstall-man1
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
        clean-generic ctags distclean distclean-compile \
        distclean-generic distclean-tags distdir dvi dvi-am html \
        html-am info info-am install install-am install-binPROGRAMS \
        install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-man1 \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-binPROGRAMS \
-       uninstall-info-am uninstall-man uninstall-man1
+       install-info install-info-am install-man install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-binPROGRAMS uninstall-info-am
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Attachment: OpenPGP_0x44173FA13D058888.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to