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

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

?? fat32.c

?? C51程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
  for (i = (fat_dir_current_offs / SECTOR_SIZE / fat_cluster_size) + 1; i != 0; i--)
  {
    if (dclusters[fat_dchain_index].number == fat_dchain_nb_clust)
    { /* new fragment */
      fat_dchain_index++;
      fat_dchain_nb_clust = 1;
    }
    else
    { /* no new fragment */
      fat_dchain_nb_clust++;
    }
  }
  i = fat_dir_current_offs / SECTOR_SIZE;
  fat_dir_current_sect = (((Uint32)(dclusters[fat_dchain_index].cluster + fat_dchain_nb_clust - 1) * 
                                    fat_cluster_size)
                         + fat_ptr_data + (i % fat_cluster_size));

  if ((fat_dclust_byte_count == 0)/* && (fat_dchain_index == 0)*/)     /* If we are at the beginning of a directory */
    if (fat_dchain_nb_clust == 1)
      fat_dchain_nb_clust = 0;
}


/*F**************************************************************************
* NAME: fat_clear_dir_info
*----------------------------------------------------------------------------
* PARAMS:
*   
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Reset directory chain cluster value
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   
*****************************************************************************/
void fat_clear_dir_info(void)
{
  fat_dchain_nb_clust = 0;    /* position of a cluster for selected chain idx */
  fat_dchain_index = 0;       /* chain index position */  
  fat_dclust_byte_count = 0;  /* byte position inside a directory cluster */
  fat_dir_current_offs = 0;   /* general offset from the start of a directory */
}

/*F**************************************************************************
* NAME: fat_up_down_load_sector
*----------------------------------------------------------------------------
* PARAMS:
*   - sector address to load/download   
*   - bit to indicate if it's a download or an upload
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Download or upload a sector of 512b
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   
*****************************************************************************/
void fat_up_down_load_sector(Uint32 sector, bit up_down)
{
  if (up_down == UPLOAD)
  {
    Hard_read_open(sector);     
    Hard_load_sector();
    Hard_read_close();
  }
  else
  {
    Hard_write_open(sector);
    Hard_download_sector();
    Hard_write_close();
  }
}

/*F**************************************************************************
* NAME: fat_get_dir_file_list
*----------------------------------------------------------------------------
* PARAMS:
*   id: file extension to select
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Give information about the directory :
*     - total number of entries
*     - number of deleted entries
*     - number of filtered entries (filter is done by checking id value)
*     - total number of clusters used by the directory
*----------------------------------------------------------------------------
* EXAMPLE:
*
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*   
*****************************************************************************/
void fat_get_dir_file_list (Byte id)
{
Byte   i;
bit   exit = FALSE;

  current_ext = id;                         /* save current extension */
  fat_last_dir_cluster_full = FALSE;        /* reset flag for full cluster */
  fat_no_entries_free = FALSE;              /* reset flag for presence of free entries inside a directory cluster */
  fat_dir_list_last = 0;                    /* last filtered directory entry */
  fat_dir_start_sect = fat_dir_current_sect;/* set fat_dir_start_sect (use by fat_dseek()) */
  fat_nb_deleted_entries = 0;               /* reset the number of entries that is marker as deleted */
  fat_nb_total_entries = 0;                 /* reset the number of total entries in the directory */
  fat_total_clusters = 0;                   /* reset the total number of clusters for a directory */

  for (i = 0; i <= fat_last_dclust_index; i++)
  {
    fat_total_clusters += dclusters[i].number;  /* calculate the total numbers of clusters */
  }

  fat_clear_dir_info();                         /* clear directory variable */
  
  Hard_read_open(fat_dir_start_sect);
  do
  {
    for (i = 0; i < DIR_SIZE; i++)
      gl_buffer[i] = fat_dgetc();

    if (gl_buffer[0] != FILE_NOT_EXIST)
    {
      if (gl_buffer[0] != FILE_DELETED)
      {
        fat_nb_total_entries++;                             /* increase total number of entries   */
        while (gl_buffer[11] == ATTR_LFN_ENTRY)
        {
          for (i = 0; i < DIR_SIZE; i++)
            gl_buffer[i] = fat_dgetc();
          fat_nb_total_entries++;                           /* increase total number of entries   */
        }
        
        fat_cache.current.attributes = gl_buffer[11];       /* filter on the file type */
        ext[0] = gl_buffer[8];
        ext[1] = gl_buffer[9];
        ext[2] = gl_buffer[10];
        if ((fat_check_ext() & current_ext) != FILE_XXX)    /* Check if file type is OK */
        {
          fat_dir_list_last++;          /* increase the number of selected entries */
        }
      }
      else
      {
        fat_nb_deleted_entries++;       /* increase number of deleted entries */
        fat_nb_total_entries++;         /* increase total number of entries   */
      }
    }
    else
    {
      exit = TRUE;                      /* "not exist" entries mark the end of directory */
    }

    if  ((((Byte*)&fat_dclust_byte_count)[1] == 0x00) &&
        ((((Byte*)&fat_dclust_byte_count)[0] & fat_cluster_mask) == 0x00) && 
        (fat_last_dclust_index == fat_dchain_index))
    {
      exit = TRUE;                          /* if the last entries of the last cluster is reached */
      fat_last_dir_cluster_full = TRUE;     /* then exit and set this flag                        */
    }
  }
  while (!exit);

  Hard_read_close();                        /* close disk */
  if (fat_last_dir_cluster_full)            /* if the last directory cluster is full        */
  {
    if (!fat_nb_deleted_entries)            /* and if there is no deleted entries detected  */
    {
      fat_no_entries_free = TRUE;           /* set this flag that there is no free entries  */
    }
  }

  fat_dir_current_sect = fat_dir_start_sect;
  fat_clear_dir_info();                     /* reset directory variable */

}


/*F**************************************************************************
* NAME: fat_fetch_file_info
*----------------------------------------------------------------------------
* PARAMS:
*   entry: directory entry structure
*
* return:
*----------------------------------------------------------------------------
* PURPOSE:
*   Get information about a directory or file entry
*----------------------------------------------------------------------------
* EXAMPLE:
*----------------------------------------------------------------------------
* NOTE:
*   
*----------------------------------------------------------------------------
* REQUIREMENTS:
*****************************************************************************/
void fat_fetch_file_info (fat_st_dir_entry xdata *entry, bit direction)
{
Uint16 i;
Uint16 j;
bit entry_found = FALSE;

  /* clear the name buffer */
  for (i = MAX_FILENAME_LEN; i != 0; lfn_name[--i] = '\0');

  if (direction == FETCH_PREV)
  {
    /* fetch previous file */
    fat_current_start_entry_position--;                             /* seek to the previous entry  */
    fat_dir_current_offs = (fat_current_start_entry_position) * DIR_SIZE; /* update fat_dir_current_offs */
    fat_calc_cluster();                                             /* update directory position variable */
    j = (fat_current_start_entry_position % 16) * DIR_SIZE;         /* seek to the previous entry */
    fat_up_down_load_sector(fat_dir_current_sect, UPLOAD);          /* load the directory sector */
    do
    {
      if (fat_buf_sector[j] != FILE_DELETED)                    /* if it's not a deleted entries */
      {
        entry->attributes = fat_buf_sector[j + 11];
        ext[0]= fat_buf_sector[j + 8];
        ext[1]= fat_buf_sector[j + 9];
        ext[2]= fat_buf_sector[j + 10];
        if ((fat_check_ext() & current_ext) != FILE_XXX)            /* check id of entry */ 
        {
          entry_found = TRUE;
        }
      }

      if (!entry_found )                   /* if id is not correct   */
      {
        fat_dir_current_offs -= DIR_SIZE;                           /* seek to previous entry */
        if (j == 0)                                                 /* sector change          */
        {
          fat_calc_cluster();
          fat_up_down_load_sector(fat_dir_current_sect, UPLOAD);    /* load the directory sector */
          j = SECTOR_SIZE - DIR_SIZE;
        }
        else
        {
          j -= DIR_SIZE;
        }
        fat_current_start_entry_position--;
      }
    }
    while (!entry_found);

    if (fat_current_start_entry_position != 0)
    {
      /* we find an entry. Now seek to previous entry for the process LFN */
      fat_dir_current_offs -= DIR_SIZE;                           /* seek to previous entry */
      if (j == 0)                                                 /* sector change          */
      {
        fat_calc_cluster();
        fat_up_down_load_sector(fat_dir_current_sect, UPLOAD);    /* load the directory sector */
        j = SECTOR_SIZE - DIR_SIZE;
      }
      else
      {
        j -= DIR_SIZE;
      }
      fat_current_start_entry_position--;
      if (fat_buf_sector[j + 11] != ATTR_LFN_ENTRY)
      {
        fat_dir_current_offs += DIR_SIZE;
        fat_current_start_entry_position++;
      }
      else
      {
        while ((fat_buf_sector[j + 11] == ATTR_LFN_ENTRY) && (fat_current_start_entry_position != 0))
        {
          fat_dir_current_offs -= DIR_SIZE;
          fat_current_start_entry_position--;
          if (j == 0)                                                 /* sector change          */
          {
            fat_calc_cluster();
            fat_up_down_load_sector(fat_dir_current_sect, UPLOAD);    /* load the directory sector */
            j = SECTOR_SIZE - DIR_SIZE;
          }
          else
          {
            j -= DIR_SIZE;
          }
        }
    
        if (fat_current_start_entry_position)
        {
          fat_dir_current_offs += DIR_SIZE;
          fat_current_start_entry_position++;
        }
      }

    }

    fat_current_end_entry_position = fat_current_start_entry_position;
    fat_dseek(0);
  }
  else      /* fetch next file */
  {
    fat_dseek((fat_current_end_entry_position - fat_current_start_entry_position) << 5);
  }

  do
  {
    fat_current_start_entry_position = fat_current_end_entry_position;
    for (i = 0; i < DIR_SIZE; i++)
      gl_buffer[i] = fat_dgetc();

    while (gl_buffer[0] == FILE_DELETED)                          /* find a non deleted file */
    {
      fat_current_start_entry_position++;
      fat_dir_current_offs += DIR_SIZE;
      for (i = 0; i < DIR_SIZE; i++)
        gl_buffer[i] = fat_dgetc();
    }

    fat_current_end_entry_position = fat_current_start_entry_position;

    if (gl_buffer[11] == ATTR_LFN_ENTRY)
    {
      for (j = gl_buffer[0] & 0x0F; j != 0; j--)                  /* computes lfn name */
      {
        for (i = 0; i < 5; i++)
          lfn_name[i + 13 * (j - 1)] = gl_buffer[2 * i + 1];
        for (i = 0; i < 6; i++)
          lfn_name[i + 5 + 13 * (j - 1)] = gl_buffer[2 * i + 14];
        for (i = 0; i < 2; i++)
          lfn_name[i + 11 + 13 * (j - 1)] = gl_buffer[2 * i + 28];
  
        for (i = 0; i < DIR_SIZE; i++)                            /* read the directory entry */
          gl_buffer[i] = fat_dgetc();
        fat_current_end_entry_position++;
      }
      i = 0;
      while (lfn_name[i] != '\0')                                 /* search for the end of the string */
      { 
        i++;
      }
      if (i <= 14)                                                /* append spaces for display reason (no scrolling) */
      { 
        while (i != 14)                                 
        {
          lfn_name[i++] = ' ';
        }
      }
      else
      { /* append beginning of name to ease scrolling display */
        lfn_name[i++] = ' ';

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品人人做| 日本一区二区免费在线观看视频| 色综合一个色综合| 欧美tk—视频vk| 亚洲视频一二三| 国产福利精品导航| 久久女同性恋中文字幕| 国产伦精品一区二区三区免费| 欧美电视剧在线观看完整版| 伊人色综合久久天天人手人婷| 奇米色一区二区三区四区| 在线视频一区二区免费| 亚洲欧美日韩中文字幕一区二区三区| 蜜桃视频在线观看一区| 91精品国产综合久久精品| 亚洲黄一区二区三区| 国产成人精品免费在线| 91精品国产高清一区二区三区蜜臀| 亚洲国产美女搞黄色| 一本大道综合伊人精品热热| 国产精品久久久久影视| 99久久免费国产| 国产精品成人一区二区三区夜夜夜 | 中文字幕久久午夜不卡| 国产一区二区精品久久99| 久久99这里只有精品| 色妹子一区二区| 日韩av二区在线播放| 久久综合给合久久狠狠狠97色69| 国产不卡视频在线观看| 亚洲黄色av一区| 欧美大片在线观看一区二区| 欧美综合一区二区三区| 国产高清无密码一区二区三区| 在线播放亚洲一区| 色综合亚洲欧洲| 一色桃子久久精品亚洲| 欧美夫妻性生活| 国产一区二区中文字幕| 日韩久久一区二区| 欧美三级三级三级| 色av成人天堂桃色av| 972aa.com艺术欧美| 成人精品视频一区二区三区尤物| 国产精品系列在线播放| 久久精品国产99久久6| 成人小视频在线| 国产美女在线观看一区| 国产一区二区三区在线看麻豆| 日韩精品色哟哟| 国内外成人在线| 国产ts人妖一区二区| 韩国午夜理伦三级不卡影院| 日本美女视频一区二区| 免费的成人av| 成人久久久精品乱码一区二区三区 | 一本一本久久a久久精品综合麻豆| 日本欧美在线观看| 国产精品久久久久久久久图文区 | 亚洲国产岛国毛片在线| av在线一区二区| 日本成人中文字幕在线视频| ...中文天堂在线一区| 91精选在线观看| 97久久久精品综合88久久| 午夜电影一区二区三区| 7777精品伊人久久久大香线蕉完整版 | 国产一区二区三区电影在线观看 | 一区二区三区四区乱视频| 欧美精品精品一区| 欧美日韩国产美| 欧美精品日韩一区| 欧美精品久久一区二区三区| 欧美日韩精品一区视频| 国产在线麻豆精品观看| 亚洲a一区二区| 国产伦精品一区二区三区在线观看 | www.爱久久.com| 精品99999| 国产一区啦啦啦在线观看| 久久精品久久精品| av在线一区二区| 欧美一区二区三区视频免费| 国产精品久久久久久久久免费丝袜 | 成人激情动漫在线观看| 在线观看亚洲精品| 91.成人天堂一区| 国产视频亚洲色图| 亚洲18色成人| 97精品电影院| 国产日本欧洲亚洲| 国产亚洲一区二区在线观看| 亚洲女性喷水在线观看一区| 日韩激情av在线| 精品国产电影一区二区| 久久精品理论片| 欧美激情一区三区| 91亚洲男人天堂| 亚洲一区二区三区四区在线免费观看| 成人综合在线观看| 一区av在线播放| 日韩一区二区免费视频| 七七婷婷婷婷精品国产| 日韩亚洲欧美一区二区三区| 亚洲v精品v日韩v欧美v专区 | 一区二区三区免费看视频| 在线观看日韩电影| 亚洲国产精品麻豆| 欧美精品免费视频| 精品99一区二区| 亚洲欧美电影院| 一本到不卡免费一区二区| 国产精品视频麻豆| 成人av资源网站| 中文字幕+乱码+中文字幕一区| 日产欧产美韩系列久久99| 欧美夫妻性生活| 日韩电影在线看| 日韩一区国产二区欧美三区| 日韩国产一二三区| 91超碰这里只有精品国产| 亚洲国产一区视频| 4438亚洲最大| 青青草国产精品亚洲专区无| 日本不卡一二三| 国产婷婷色一区二区三区| 8x8x8国产精品| 99综合电影在线视频| 国产一区不卡在线| 另类小说综合欧美亚洲| 午夜欧美大尺度福利影院在线看| 久久综合av免费| 成人福利视频网站| 亚洲综合久久久久| 色综合天天天天做夜夜夜夜做| 亚洲图片欧美综合| 91视频在线观看| 欧美96一区二区免费视频| 欧美日韩亚洲丝袜制服| 久久久夜色精品亚洲| 91亚洲大成网污www| 国产一区二区三区日韩| 一区二区三区四区中文字幕| 精品国产污污免费网站入口| 色哟哟亚洲精品| 国产中文字幕一区| 麻豆精品国产91久久久久久| 亚洲乱码中文字幕综合| 国产婷婷一区二区| 久久影院午夜片一区| 欧美一区永久视频免费观看| 成人黄色777网| 国产福利一区在线| 久久av老司机精品网站导航| 亚洲成a人片在线不卡一二三区| 自拍偷拍亚洲激情| 国产精品国产三级国产有无不卡 | 美女在线一区二区| 蜜桃久久久久久久| 国产一区二区在线观看免费| 极品美女销魂一区二区三区 | 色综合久久久久综合体桃花网| 国内成人自拍视频| 国产精品中文字幕欧美| 国产一区二区三区免费在线观看| 免费在线观看精品| 激情综合一区二区三区| 老司机免费视频一区二区| 精品午夜久久福利影院| 国产精品一区二区久久精品爱涩 | 99久久国产综合精品麻豆| 91视频免费观看| 欧美成人精品福利| 国产精品污网站| 免费在线视频一区| 不卡视频在线看| 欧美人牲a欧美精品| 国产精品青草久久| 毛片不卡一区二区| 北条麻妃一区二区三区| 欧美精品18+| 亚洲伦在线观看| 国产在线国偷精品产拍免费yy| 在线观看网站黄不卡| 国产精品卡一卡二| 国产又粗又猛又爽又黄91精品| 日本高清成人免费播放| 欧美激情资源网| 国模无码大尺度一区二区三区| 欧美人伦禁忌dvd放荡欲情| 亚洲精品你懂的| 色域天天综合网| 亚洲色图在线播放| 91在线国产观看| 中文字幕永久在线不卡| 成人深夜福利app| 欧美经典三级视频一区二区三区| 男女男精品视频网| 欧美一区二区三区四区久久| 亚洲国产视频网站|