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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 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;
      }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区免费视频| 最新欧美精品一区二区三区| 国产三级一区二区| 综合久久久久久| 奇米影视一区二区三区| 国产ts人妖一区二区| 欧美午夜宅男影院| 欧美精品一区男女天堂| 亚洲素人一区二区| 免费在线看一区| aaa欧美日韩| 欧美一二区视频| 中文字幕字幕中文在线中不卡视频| 亚洲成人久久影院| 成人午夜激情视频| 欧美久久久久久久久久| 欧美国产综合色视频| 图片区小说区区亚洲影院| 夫妻av一区二区| 制服丝袜中文字幕亚洲| 亚洲欧洲日韩在线| 久久99久久久欧美国产| 在线亚洲+欧美+日本专区| 亚洲精品一区二区三区影院 | 波波电影院一区二区三区| 欧美三级在线看| 国产精品女同一区二区三区| 亚洲成人动漫在线免费观看| 国产成人免费高清| 91超碰这里只有精品国产| 国产精品九色蝌蚪自拍| 精品一区二区三区免费视频| 欧美性色黄大片| 国产精品三级视频| 极品尤物av久久免费看| 欧美日韩在线播放一区| 亚洲欧洲av一区二区三区久久| 激情亚洲综合在线| 欧美人牲a欧美精品| 亚洲男人天堂一区| 丁香婷婷综合激情五月色| 日韩一区国产二区欧美三区| 亚洲电影欧美电影有声小说| 91免费视频观看| 国产日韩欧美精品一区| 奇米综合一区二区三区精品视频| 在线观看视频一区| 国产精品国产三级国产普通话99| 久久成人麻豆午夜电影| 欧美剧在线免费观看网站| 亚洲男人天堂av| eeuss鲁片一区二区三区在线观看| 2024国产精品| 国内精品嫩模私拍在线| 精品日韩在线观看| 日本欧美一区二区| 欧美精品乱码久久久久久按摩| 一区二区免费看| 一本久久a久久免费精品不卡| 中文一区在线播放| 成人小视频免费在线观看| 国产清纯在线一区二区www| 国产福利一区在线| 26uuu久久天堂性欧美| 麻豆精品视频在线观看免费| 欧美一区二区三区爱爱| 午夜久久久久久久久| 欧美日韩国产综合一区二区三区| 亚洲一区二区三区视频在线| 欧美色视频一区| 亚洲18色成人| 在线播放日韩导航| 日本女人一区二区三区| 日韩一区二区精品葵司在线| 麻豆精品视频在线观看视频| 精品国产91洋老外米糕| 久久99精品网久久| 久久夜色精品国产噜噜av| 国产精品一区二区黑丝| 亚洲国产高清在线观看视频| 成人的网站免费观看| 国产精品久久久久久福利一牛影视| 成人久久久精品乱码一区二区三区| 国产精品理伦片| 91欧美激情一区二区三区成人| 亚洲另类色综合网站| 色老综合老女人久久久| 婷婷成人综合网| 欧美哺乳videos| 风间由美一区二区av101| 国产精品成人免费精品自在线观看| 97aⅴ精品视频一二三区| 亚洲国产欧美在线人成| 日韩三级在线免费观看| 国产一区二区三区精品视频| 亚洲国产精品成人综合色在线婷婷 | 色一区在线观看| 三级欧美韩日大片在线看| 亚洲精品一区二区三区香蕉| www.欧美精品一二区| 亚洲第一搞黄网站| 日韩一级黄色片| 国产精品99久久久久| 亚洲女人的天堂| 91精品午夜视频| 懂色一区二区三区免费观看| 亚洲精品久久嫩草网站秘色| 欧美一级在线观看| 成人黄色小视频在线观看| 亚洲妇女屁股眼交7| 精品国产免费一区二区三区四区| 成人免费三级在线| 亚洲v日本v欧美v久久精品| 欧美videos大乳护士334| 成人app下载| 亚洲成a人片在线不卡一二三区| 精品国产3级a| 91精彩视频在线观看| 精品一二三四区| 亚洲乱码中文字幕| 精品日韩av一区二区| 北条麻妃一区二区三区| 免费成人在线观看视频| 国产精品国产a| 91精品国产91久久综合桃花| 成人黄色av电影| 视频一区欧美日韩| 国产精品热久久久久夜色精品三区 | 国产欧美一区二区三区在线看蜜臀| 在线免费av一区| 国产精品自拍三区| 污片在线观看一区二区| 国产精品黄色在线观看| 337p亚洲精品色噜噜狠狠| 97久久精品人人爽人人爽蜜臀| 麻豆中文一区二区| 一区二区三区日本| 国产视频视频一区| 欧美电视剧在线看免费| 色av综合在线| 岛国一区二区在线观看| 麻豆精品久久精品色综合| 亚洲成精国产精品女| 国产欧美一区二区三区鸳鸯浴| 91精品国产入口| 91久久香蕉国产日韩欧美9色| 国产成人免费视频一区| 久久精品99国产国产精| 亚洲影视在线播放| 亚洲四区在线观看| 国产精品三级av在线播放| 欧美精品一区二| 欧美一区二区成人| 欧美精品久久一区二区三区| 色先锋久久av资源部| av高清久久久| 国产精品69毛片高清亚洲| 久久国产婷婷国产香蕉| 午夜久久久影院| 亚洲一区二区三区免费视频| 国产精品激情偷乱一区二区∴| 日本一区二区三区国色天香 | 麻豆国产一区二区| 日韩av电影一区| 亚洲成人自拍网| 亚洲综合在线电影| 亚洲日本一区二区三区| 国产精品久久久久久久久免费桃花 | 精品少妇一区二区| 91在线视频免费观看| 丰满岳乱妇一区二区三区| 精品无码三级在线观看视频| 男女视频一区二区| 日本不卡视频一二三区| 水蜜桃久久夜色精品一区的特点| 一区二区三区久久| 悠悠色在线精品| 亚洲欧美日韩国产综合| 综合久久综合久久| 亚洲人成在线观看一区二区| 亚洲乱码中文字幕综合| 一级中文字幕一区二区| 一区二区三区欧美在线观看| 亚洲综合免费观看高清完整版| 中文字幕亚洲精品在线观看 | 色婷婷综合久久久久中文一区二区| 99热99精品| 91免费观看视频| 在线视频国内自拍亚洲视频| 欧美日韩国产综合视频在线观看 | 久久国产精品72免费观看| 狠狠色丁香久久婷婷综合_中| 国产麻豆成人精品| 粉嫩av一区二区三区在线播放 | 亚洲欧美一区二区三区孕妇| 一区二区三区在线视频观看58| 一区二区三区91| 蜜臀国产一区二区三区在线播放| 久久国产三级精品| 福利一区在线观看|