NAVDEF.H
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:3k
源码类别:

DVD

开发平台:

Others

  1. /***********************************************************************/
  2. /* File:                                                               */
  3. /* =====                                                               */
  4. /* Descripton:                                                         */
  5. /* ===========                                                         */
  6. /*                                                                     */
  7. /* Log:                                                                */
  8. /* =====                                                                 */
  9. /*
  10.  $Name: V_1_11 V_1_10 V_1_08 V_1_06 V_1_05 V_1_04 V_1_03 V_1_02 V_1_01 V_1_00 B_0_90.1 B_0_90 B_0_87 B_0_86 B_0_84 B_0_82 B_0_81 B_0_8 A_0_5 A_0_4 A_0_3 A_0_2 A_0_1 $                                                             
  11.  $Header: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/NAVDEF.H 3     12/30/03 11:28a Leonh $                                                           
  12.  $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/NAVDEF.H $                                                              
  13.  * 
  14.  * 3     12/30/03 11:28a Leonh
  15.  * Angieh:Change for DVD AUDIO navigator header.
  16.  * 
  17.  * 1     03-04-28 11:15 Fwang
  18.  * Initial for DVDA
  19.  * 
  20.  * 2     23/04/02 9:34 Nirm
  21.  * - Added dependency in "Config.h".
  22.  * 
  23.  * 1     2/17/02 12:12 Rinata
  24.  * 
  25.  * 1     2/17/02 11:38 Rinata
  26.  * 
  27.  * 3     17/01/02 16:13 Nirm
  28.  * replaced dbprintf's.
  29.  * 
  30.  * 2     8/01/02 16:24 Nirm
  31.  * Corrected Include-Paths.
  32.  Revision 1.3  2000/05/20 03:58:59Z  tia                                                              
  33.  Revision 1.2  2000/04/18 18:54:42  tia                                                              
  34.  Revision 1.1  2000/04/14 02:02:10  tia                                                              
  35.  Initial revision                                                              
  36.  */
  37. /***********************************************************************/
  38. #include "Config.h" // Global Configuration - do not remove!
  39. #ifndef __NAVDEF_H
  40. #define __NAVDEF_H
  41. #include <stdlib.h>
  42. #include <stdio.h>
  43. #include <string.h>
  44. #include "Includesysdefs.h"
  45. #define ULONG_MAX 0xFFFFFFFFL
  46. // logical block (LB) size
  47. #define LB_size 2048
  48. //#define ASSERT( condition ) if (condition) dbg_printf(("ASSERTION ERRORn"));
  49. // C translation of FPOS class
  50. typedef struct {
  51. LBN block;
  52. DWORD offset;
  53. }S_FPOS;
  54. void fpos_normalize( S_FPOS *fpos, LBN b, DWORD p );
  55. void fpos_normalize_ulong( S_FPOS *fpos, DWORD n );
  56. void fpos_sum( S_FPOS *sum, S_FPOS *op1, S_FPOS *op2 );
  57. S_FPOS *fpos_sum_imm( S_FPOS *fpos_op, DWORD imm_op );
  58. #define LBN2FPOS( fposp, val ) { (fposp)->block = val; (fposp)->offset = 0; }
  59. // Retrives block number from any FPOS
  60. #define FPOS2LBN( fposp )  ((fposp)->block)
  61. // The offset in bytes between a FPOS and a logical block number
  62. #define FPOS_OFFSET( fposp, b ) ( (DWORD) (((fposp)->block - b) << 11) + (fpos)->offset)
  63. // Implements logical non-zero tests
  64. #define FPOS_TEST( fposp ) ( (fposp)->block || (fposp)->offset)
  65. #endif // __SYSDEFS_H