亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? iso9660.c

?? C51程序
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*C**************************************************************************
* NAME:         iso9660.c
*----------------------------------------------------------------------------
* Copyright (c) 2003 Atmel.
*----------------------------------------------------------------------------
* RELEASE:      snd1c-refd-nf-4_0_3      
* REVISION:     1.3     
*----------------------------------------------------------------------------
* PURPOSE:
* ISO9660 file-system basics functions
* 
* NOTES:
*   Some variables are shared with fat.c module :
*     data  Uint32 fat_ptr_data
*     data  Uint16 fat_fclust_byte_count
*     idata Uint16 fat_dclust_byte_count
*     idata Uint32 fat_dir_current_sect
*     idata Uint16 fat_dir_list_index
*     xdata char   ext[]
*     xdata Byte   fat_buf_sector[]
*   Global variable :
*     pdata Byte   gl_buffer[]
*
*****************************************************************************/

/*_____ I N C L U D E S ____________________________________________________*/

#include "config.h"                         /* system configuration */
#include "..\mem\hard.h"                    /* low level function definition */
#include "file.h"                           /* file function definition */
#include "iso9660.h"                        /* iso9660 file-system definition */


/*_____ M A C R O S ________________________________________________________*/


/*_____ D E F I N I T I O N ________________________________________________*/

/* shared variables with fat.c module */
extern  data  Uint32 fat_ptr_data;
extern  data  Uint16 fat_fclust_byte_count;
extern  idata Uint16 fat_dclust_byte_count;
extern  idata Uint32 fat_dir_current_sect;
extern  xdata Uint16 fat_dir_list_index;   
extern  xdata char   ext[]; 
extern  xdata Byte   fat_buf_sector[];
extern  pdata Byte   gl_buffer[];
extern  xdata Uint32 fat_dir_start_sect;   
extern  xdata Uint16  fat_dir_list_last;    
extern  xdata Byte current_ext;
extern  idata Uint16  fat_dchain_index;
extern  idata Uint16  fat_fchain_nb_clust;  


extern xdata  Byte    fat_fchain_index_save;         
extern xdata  Byte    fat_fchain_nb_clust_save;
extern xdata  Uint16  fat_fclust_byte_count_save;



#define iso_dir_current_sect      fat_dir_current_sect
#define iso_dir_byte_count        fat_dclust_byte_count
#define iso_f_current_sect        fat_ptr_data
#define iso_current_byte_counter  fat_fclust_byte_count
#define iso_current_dir_file      fat_buf_sector
#define iso_file_index            fat_dir_list_index
#define iso_file_max_index        fat_dir_list_last
#define iso_dir_start_sect        fat_dir_start_sect
#define iso_dir_size              fat_dchain_index

#define iso_f_nb_sector_save      fat_fclust_byte_count_save
#define iso_f_nb_byte_save        fat_fchain_nb_clust


extern  char    pdata *lfn_name;                  /* long filename limited to MAX_FILENAME_LEN chars  */
extern  xdata iso_VolumeDescriptor iso_header;    /* iso header informations                          */
extern  xdata iso_cache  iso_file_cache;          /* cache for the current file                       */
extern  idata Uint16  iso_f_nb_sector;
extern  idata Uint16  iso_f_max_sector;
extern  bdata bit     iso_cd;                     /* if set to one cd is iso else cd is joliet format  */

/*_____ D E C L A R A T I O N ______________________________________________*/
Uint16 iso_dgetw(void);




/*F**************************************************************************
* NAME: fat_install
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*   - OK: intallation succeeded
*   - KO: no primary or supplementary volume descriptor found
*         
*----------------------------------------------------------------------------
* PURPOSE:
*   Install the iso file system
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_install(void)
{

  iso_f_current_sect = Hard_iso_read_toc() + 1 + 16;
  iso_cd = 0;

  if (Hard_iso_read_open(iso_f_current_sect) == OK)
  {
    if ((Hard_iso_read_word() & 0xFF) == 0x01)                    /* ISO CD */
    {
      iso_f_current_sect--;
      iso_cd = 1;
    }
    Hard_iso_read_close();
  }
  
  if (iso_read_volume_descriptor(iso_f_current_sect) == OK)   /* read volume descriptor */
    return OK;
  else
    return KO;
}


/*F**************************************************************************
* NAME: iso_read_volume_descriptor
*----------------------------------------------------------------------------
* PARAMS:
*   sector: firt sector of ISO block location
* return:
*   - OK: intallation succeeded
*   - KO: error
*----------------------------------------------------------------------------
* PURPOSE:
*   Read CD volumes descriptors.
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_read_volume_descriptor (Uint32 sector)
{
Byte i;
Uint16 tmp_word;

  /* settting current offset */
  iso_dir_current_sect = sector;
  
  if (Hard_iso_read_open(iso_dir_current_sect) == OK)
  {
    /* Byte 1 - 2 : Volume descriptor type & Standard identifier                          */
    /* Byte 3 - 4 : Standard identifier                                                   */
    /* Byte 5 - 6 : Standard identifier                                                   */
    /* Standard identifier is 'CD001'                                                     */
    tmp_word  = Hard_iso_read_word();
    if ( (((Byte*)&tmp_word)[0] != 0x43) ||   /* check if it is a standard iso cd volume  */
         (Hard_iso_read_word() != 0x3044) ||  /* string 0D                                */
         (Hard_iso_read_word() != 0x3130))    /* string 10                                */
    {
      Hard_iso_read_close();
      return KO;
    }
    
    switch (((Byte*)&tmp_word)[1])
    {
      case TYPE_BOOT_RECORD:                  /* Boot record                              */
      {
        break;
      }

      case TYPE_PRIMARY_VD:                   /* Primary Volume Descriptor or             */
      case TYPE_SUPPLEMENTARY_VD:             /* Supplementary Volume Descriptor          */
      {
        i = 3;
        while (i != 40)
        {
          Hard_iso_read_word();               /* dummy read                               */
          i++;
        }
        
        iso_header.volume_size = Hard_iso_read_word();                /* Byte 81 - 82 */
        iso_header.volume_size += ((Uint32)(Hard_iso_read_word()) << 16);          /* Byte 83 - 84 */
        Hard_iso_read_word();                                         /* Byte 85 - 86 */
        Hard_iso_read_word();                                         /* Byte 87 - 88 */
        i = 44;
        while (i != 64)
        {
          Hard_iso_read_word();               /* dummy read                               */
          i++;
        }
        
        /* Byte 129 - 132 : Logical Block Size - Both byte order                          */
        iso_header.logical_block_size = Hard_iso_read_word();
        Hard_iso_read_word();

        while (i != 76)
        {
          tmp_word = Hard_iso_read_word();    /* dummy read                               */
          i++;
        }
        /* Byte 157 - 190 : Directory record for root directory                           */
        /* Sbyte 1 : Length of directoy record                                            */
        /* Sbyte 2 : Extended attribute record length                                     */ 
        iso_header.root.length = (Hard_iso_read_word() & 0xFF); 
        /* Sbyte 3 - 10 : Location of extent - Both byte order                            */
        iso_header.root.extend_location = Hard_iso_read_word();
        iso_header.root.extend_location += ((Uint32)(Hard_iso_read_word()) << 16);
        Hard_iso_read_word();
        Hard_iso_read_word();
        /* Sbyte 11 - 18 : Data Length - Both Byte order                                  */ 
        iso_header.root.data_length = Hard_iso_read_word();
        iso_header.root.data_length += ((Uint32)(Hard_iso_read_word()) << 16);
        iso_dir_size = iso_header.root.data_length / iso_header.logical_block_size;
        break;
      }
  
      case TYPE_PARTITION_VD:               /* Partition Volume Descriptor                */
      {
        break;
      }
      case TYPE_VOLUME_SET_TERMINATOR:      /* Volume set terminator                      */
      {
        break;
      }

      default:                              /* error                                      */
      {
        return KO;
      }
    }
    Hard_iso_read_close();
    return OK;
  }
  else
    return KO;
}


/*F**************************************************************************
* NAME: iso_fseek
*----------------------------------------------------------------------------
* PARAMS:
*   offset: relative signed seek offset in file
*
* return:
*   seek status:  - OK: seek done
*                 - KO: out of file seek
*----------------------------------------------------------------------------
* PURPOSE:
*   Change file pointer of an openned file
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   Seek is done with byte boundary
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_fseek(Int16 offset)
{
Uint16 i;         /* generic counter */
Uint32 file_pos;

  file_pos = ((iso_f_current_sect - iso_file_cache.info.extend_location) * iso_header.logical_block_size) 
             + (Uint32)(iso_current_byte_counter);

  if ((file_pos + offset) < 0)
    return KO;

  file_pos += offset;

  iso_f_nb_sector = (file_pos / iso_header.logical_block_size);
  iso_f_current_sect = (Uint32)(iso_f_nb_sector) + iso_file_cache.info.extend_location;
  iso_current_byte_counter =  ((Uint16)file_pos % iso_header.logical_block_size);

  Hard_iso_read_close();
  Hard_iso_read_open(iso_f_current_sect);
  for (i = 0; i < iso_current_byte_counter; i++)
  {
    Hard_iso_read_byte();
  }
  return OK;
}



/*F**************************************************************************
* NAME: iso_fseek_abs
*----------------------------------------------------------------------------
* PARAMS:
*   offset: absolute seek offset in file
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Move ahead file read pointer of an openned file
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
bit iso_fseek_abs(Uint32 offset)
{
Uint16 i;         /* generic counter           */

  iso_f_nb_sector = (Uint16)(offset / iso_header.logical_block_size);
  iso_current_byte_counter = (Uint16)(offset % iso_header.logical_block_size);
  iso_f_current_sect = (Uint32)(iso_f_nb_sector) + iso_file_cache.info.extend_location;
  Hard_iso_read_close();
  Hard_iso_read_open(iso_f_current_sect);
  for (i = 0; i < iso_current_byte_counter; i++)
  {
    Hard_iso_read_byte();
  }
  return OK;
}

/*F**************************************************************************
* NAME: iso_dseek
*----------------------------------------------------------------------------
* PARAMS:
*   offset: offset to current position in signed word value
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Seek from the current position to a new offset computing relative 
*   poisition +/- scan size limited to a 16 bit offset
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/ 
bit iso_dseek(Int16 offset)
{
Uint16 i;         /* generic counter */
Uint32 dir_pos;

  dir_pos = ((iso_dir_current_sect - iso_header.root.extend_location) * iso_header.logical_block_size) 
            + iso_dir_byte_count;
  if ((dir_pos + offset) < 0)
    return KO;

  dir_pos += offset;

  iso_dir_current_sect = (dir_pos / iso_header.logical_block_size) 
                        + iso_header.root.extend_location;
  iso_dir_byte_count = dir_pos % iso_header.logical_block_size;

  Hard_iso_read_close();
  Hard_iso_read_open(iso_dir_current_sect);
  for (i = 0; i < iso_dir_byte_count; i++)
  {
    Hard_iso_read_byte();
  }
  return OK;
}


/*F**************************************************************************
* NAME: iso_get_file_dir
*----------------------------------------------------------------------------
* PARAMS:
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Give information about the directory :
*     - total number of entries
*----------------------------------------------------------------------------
* EXAMPLE:
*
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   
*****************************************************************************/
void iso_get_file_dir(void)
{
Byte attributes;
Byte len;
Byte i;
Byte j;
Byte k;
Byte entry_len;
Byte tmp_byte;
Byte byte_to_read;
Byte padding_byte;
Byte entry_rel;
Uint16 tmp_word;
bit no_more_entry;
bit end_of_name;


  no_more_entry = FALSE;
  entry_rel = 0;
  fat_dir_list_index = 0;
  do
  {
    padding_byte = 0;
    do
    {
      tmp_word = iso_dgetw();
      padding_byte++;
      if ((iso_dir_current_sect - iso_dir_start_sect) >= iso_dir_size)
      {
        no_more_entry = TRUE;
      }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人在线综合网| 91美女在线视频| 亚洲精品国产精品乱码不99| 欧美丰满一区二区免费视频| 国产精品资源站在线| 亚洲成人资源网| 亚洲视频网在线直播| 精品欧美久久久| 欧美欧美欧美欧美| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩一区二区精品在线观看| 成人精品免费看| 久久99国内精品| 偷偷要91色婷婷| 一区二区三区欧美亚洲| 国产日韩av一区二区| 欧美一区二区三级| 欧洲一区在线电影| av电影在线观看完整版一区二区| 美女在线一区二区| 午夜精品视频在线观看| 中文字幕视频一区| 亚洲国产精品99久久久久久久久| 日韩三级.com| 91精品国产综合久久福利软件| 91免费观看视频| 成人av在线播放网址| 国产麻豆91精品| 久久99精品视频| 蜜臀av性久久久久蜜臀aⅴ| 午夜精品福利一区二区三区av| 亚洲综合一区二区| 亚洲男人的天堂网| 成人免费在线视频| 综合色天天鬼久久鬼色| 亚洲欧洲av在线| 中文字幕一区二区三区不卡| 中文字幕欧美三区| 中文字幕免费不卡| 国产精品久久三| 自拍偷拍欧美激情| 亚洲精品亚洲人成人网在线播放| 亚洲欧美色图小说| 悠悠色在线精品| 午夜欧美大尺度福利影院在线看| 亚洲国产视频一区二区| 天堂蜜桃91精品| 免费成人在线观看视频| 麻豆精品国产传媒mv男同| 九九九久久久精品| 国产成人精品一区二| 岛国一区二区在线观看| 91色乱码一区二区三区| 91精品福利视频| 欧美剧在线免费观看网站| 欧美电影影音先锋| 精品国产髙清在线看国产毛片| 欧美r级电影在线观看| 久久免费看少妇高潮| 国产精品麻豆欧美日韩ww| 亚洲日本中文字幕区| 亚洲国产精品一区二区www| 视频在线在亚洲| 国内久久婷婷综合| 国产a久久麻豆| 在线免费观看成人短视频| 欧美福利视频导航| 国产亚洲污的网站| 亚洲精品国久久99热| 日日夜夜精品视频天天综合网| 久久成人羞羞网站| jlzzjlzz欧美大全| 欧美精品xxxxbbbb| 久久久99精品久久| 有码一区二区三区| 国产尤物一区二区| 欧洲亚洲精品在线| 亚洲精品一区二区在线观看| 国产精品免费久久久久| 亚洲国产成人av网| 国产不卡免费视频| 欧美日韩午夜精品| 国产欧美一区二区精品婷婷| 一区二区三区在线视频观看| 久久se精品一区精品二区| 91在线观看视频| 欧美va在线播放| 亚洲日本在线天堂| 国产资源在线一区| 在线欧美一区二区| 欧美国产亚洲另类动漫| 日韩精品免费专区| 91在线国产福利| 精品国产一区二区三区av性色| 亚洲精品中文字幕乱码三区| 寂寞少妇一区二区三区| 欧美午夜精品一区二区三区| 国产亚洲婷婷免费| 日本最新不卡在线| 一本色道久久综合亚洲精品按摩| 日韩免费看的电影| 亚洲午夜日本在线观看| 国产激情偷乱视频一区二区三区| 欧美日韩国产在线观看| 国产精品国产自产拍高清av | 亚洲国产精品尤物yw在线观看| 国产馆精品极品| 日韩欧美一区在线| 亚洲一区二区三区美女| 成人av影视在线观看| 欧美精品一区二区三区蜜桃视频| 亚洲一区二区免费视频| 91美女福利视频| 亚洲国产精品高清| 国产精品综合视频| 日韩一区二区三区高清免费看看| 一区二区三区中文字幕电影| 成人午夜在线播放| 国产欧美日韩三级| 国产精品白丝jk黑袜喷水| 精品成人一区二区| 久久国内精品视频| 日韩区在线观看| 蜜桃av一区二区| 日韩一区二区影院| 麻豆国产精品777777在线| 91精品国产美女浴室洗澡无遮挡| 亚洲精品成人精品456| 91在线你懂得| 一区二区三区日韩欧美| 99国产精品视频免费观看| 国产精品久久久久久久久免费相片 | 亚洲一二三区在线观看| 波多野结衣中文字幕一区二区三区| 久久影院视频免费| 国产一区二区电影| 日本一二三不卡| 99久久婷婷国产综合精品电影| 国产精品久久福利| 一本色道**综合亚洲精品蜜桃冫| 亚洲欧美偷拍三级| 欧美四级电影网| 亚洲福利一二三区| 欧美日韩精品一区二区在线播放| 亚洲一区在线观看网站| 欧美日本韩国一区二区三区视频| 视频精品一区二区| 日韩精品一区在线| 欧美在线视频全部完| 亚洲免费观看高清完整版在线观看 | 欧洲国内综合视频| 亚州成人在线电影| 欧美一区二区三区影视| 久久99精品久久久久久国产越南| 久久综合久久综合久久| 国产精选一区二区三区| 国产精品久久久久久久久晋中| av福利精品导航| 亚洲一二三四在线| 欧美电影免费提供在线观看| 国产乱子伦视频一区二区三区| 国产精品视频九色porn| 91年精品国产| 视频一区欧美日韩| 久久婷婷成人综合色| av中文一区二区三区| 亚洲最大的成人av| 日韩免费观看2025年上映的电影| 国产成人在线视频免费播放| 中文字幕一区二区三中文字幕| 欧美在线不卡一区| 极品瑜伽女神91| 亚洲欧美日韩综合aⅴ视频| 91精品久久久久久久91蜜桃| 韩国午夜理伦三级不卡影院| 国产精品久久久久久久久免费樱桃| 精品视频在线免费| 黑人巨大精品欧美一区| 亚洲免费色视频| 精品久久一区二区三区| 91色porny蝌蚪| 久久精品99国产精品| 亚洲欧美自拍偷拍| 日韩精品一区二区三区在线观看| 成年人国产精品| 久久五月婷婷丁香社区| 在线观看国产91| 高清av一区二区| 男人的天堂久久精品| 日韩毛片视频在线看| 欧美一区二区美女| 一本色道久久综合亚洲aⅴ蜜桃 | 久久精品亚洲国产奇米99| 欧美在线999| 成人中文字幕合集| 免费精品视频最新在线| 亚洲欧美激情插 | 国产日韩欧美精品一区| 欧美日韩在线观看一区二区| k8久久久一区二区三区|