home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2001 September / PC-WELT 9-2001.ISO / software / hw / brennen / flask_src.exe / Input / IFOParser / print_ifo_ptt.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-06  |  1.7 KB  |  69 lines

  1.  
  2. /*
  3.  * PART OF TITLE
  4.  *
  5.  * Copyright (C) 1998,1999  Thomas Mirlacher
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2 of the License, or
  10.  * (at your option) any later version.
  11.  * 
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  * 
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  * 
  21.  * The author may be reached as dent@cosy.sbg.ac.at, or
  22.  * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
  23.  * Austria
  24.  *
  25.  *------------------------------------------------------------
  26.  *
  27.  */
  28.  
  29.  
  30. #ifdef PARSER
  31. #include <stdio.h>
  32. #endif
  33. #include <stdlib.h>
  34. //#include <unistd.h>
  35. #include <sys/types.h>
  36. #include "ifo.h"
  37.  
  38. #include "misc.h"
  39. #include "decode.h"
  40.  
  41.  
  42. /**
  43.  *
  44.  */
  45.  
  46. void ifoPrint_ptt (ifo_ptt_t *ptt)
  47. {
  48.     int i, s;
  49.  
  50.     if (!ptt)
  51.         return;
  52.  
  53.     printf ("\nPART OF TITLE\n");
  54.     printf ("---\n");
  55.     printf ("number of titles: %d\n", ptt->num);    
  56.  
  57.     for (i=0; i<ptt->num; i++) {
  58.         ifo_ptt_sub_t *title = ptt->title+i;
  59.  
  60.         printf ("\n\tTitle: 0x%x\tnumber of chapters: %d\n", i+1, title->num);
  61.  
  62.         for (s=0; s<title->num; s++) {
  63.             printf ("\t\t Chapter: 0x%02x", s+1);
  64.             printf ("\t PGC: 0x%02x", title->data[s].pgc);
  65.             printf ("\t PG: 0x%02x\n",title->data[s].pg);
  66.         }
  67.     }
  68. }    
  69.