⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 volspace.c

📁 存取UDF格式的DVD光盘的驱动程序
💻 C
字号:
#include <stdio.h>#include "chkudf.h"#include "protos.h"int track_volspace(UINT32 Location, UINT32 Length, char *Name){  int i, j, error;  error = 0;  if (Length > 0) {      //point to the location where the new extent is >= the list member    for (i = 0; (i < VolSpaceListLen) && (Location > VolSpace[i].Location); i++);    if (i > 0) {      if (((Location + Length - 1) >= VolSpace[i-1].Location) &&           (Location < (VolSpace[i-1].Location + VolSpace[i-1].Length))) {        Error.Code = ERR_VOL_SPACE_OVERLAP;        Error.Sector = Location;        error = TRUE;      }    }    if (i < VolSpaceListLen) {      if (((Location + Length - 1) >= VolSpace[i].Location) &&           (Location < (VolSpace[i].Location + VolSpace[i].Length))) {        Error.Code = ERR_VOL_SPACE_OVERLAP;        Error.Sector = Location;        error = TRUE;      }    }    if (VolSpaceListLen < MAX_VOL_EXTS - 1) {      for (j = VolSpaceListLen; j > i; j--) {        VolSpace[j] = VolSpace[j - 1];      }      VolSpace[i].Location = Location;      VolSpace[i].Length = Length;      VolSpace[i].Name = Name;      VolSpaceListLen++;    } else {      printf("**Too many volume extents.");    }  //  printf("\nVolume Allocation list:\n");  //  for (i = 0; i < VolSpaceListLen; i++) {  //    printf("  %8d %d\n", VolSpace[i].Location, VolSpace[i].Length);  //  }    if (error) {      DumpError();    }  }  return error;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -