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

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

?? dcu_in.pas

?? DeDe3.2004源碼
?? PAS
字號:
{$A+,B-,C+,D+,E-,F-,G+,H+,I+,J+,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
unit DCU_In;
(*
The input module of the DCU32INT utility by Alexei Hmelnov.
----------------------------------------------------------------------------
E-Mail: alex@monster.icc.ru
http://monster.icc.ru/~alex/DCU/
----------------------------------------------------------------------------

See the file "readme.txt" for more details.

------------------------------------------------------------------------
                             IMPORTANT NOTE:
This software is provided 'as-is', without any expressed or implied warranty.
In no event will the author be held liable for any damages arising from the
use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented, you must not
   claim that you wrote the original software.
2. Altered source versions must be plainly marked as such, and must not
   be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
   distribution.
*)
interface

uses
  SysUtils;

type
  TDCURecTag = Char;

  TNDX = integer;

  PName = PShortString;

  TInt64Rec = record
    Lo: Cardinal;
    Hi: Cardinal;
  end ;

type
  TScanState=record
    StartPos,CurPos,EndPos: PChar;
  end ;

var
  ScSt: TScanState;
  DefStart: Pointer;
  Tag: TDCURecTag;

procedure ChangeScanState(var State: TScanState; DP: Pointer; MaxSz: Cardinal);
procedure RestoreScanState(const State: TScanState);

function ReadByte: Cardinal;
function ReadTag: TDCURecTag;
function ReadULong: Cardinal;

procedure SkipBlock(Sz: Cardinal);
procedure ReadBlock(var B; Sz: Cardinal);

function ReadMem(Sz: Cardinal): Pointer;

function ReadStr: ShortString;
function ReadName: PShortString;

var
  NDXHi: LongInt;

function ReadUIndex: LongInt;
function ReadIndex: LongInt;

procedure ReadIndex64(var Res: TInt64Rec);
procedure ReadUIndex64(var Res: TInt64Rec);

function NDXToStr(NDXLo: LongInt): String;

function MemToInt(DP: Pointer; Sz: Cardinal; var Res: integer): boolean;
function MemToUInt(DP: Pointer; Sz: Cardinal; var Res: Cardinal): boolean;

procedure DCUError(Msg: String);
procedure DCUErrorFmt(Msg: String; Args: array of const);
procedure TagError(Msg: String);

implementation

uses
  DCU32{CurUnit};

procedure DCUError(Msg: String);
var
  US: String;
begin
  US := '';
  if CurUnit<>MainUnit then begin
    US := CurUnit.UnitName;
    if US='' then
      US := ChangeFileExt(ExtractFileName(CurUnit.FileName),'');
    US := Format('in %s ',[US]);
  end ;
  raise Exception.CreateFmt('Error at 0x%x %s(Def: 0x%x, Tag="%s"(0x%x)): %s',
    [ScSt.CurPos-ScSt.StartPos,US,PChar(DefStart)-ScSt.StartPos,Tag,Byte(Tag),Msg]);
end ;

procedure DCUErrorFmt(Msg: String; Args: array of const);
begin
  DCUError(Format(Msg,Args));
end ;

procedure TagError(Msg: String);
begin
  DCUErrorFmt('%s: wrong tag %s=0x%x',[Msg,Tag,Byte(Tag)]);
end ;

procedure ChangeScanState(var State: TScanState; DP: Pointer; MaxSz: Cardinal);
begin
  State := ScSt;
  ScSt.StartPos := DP;
  ScSt.CurPos := DP;
  ScSt.EndPos := PChar(DP)+MaxSz;
end ;

procedure RestoreScanState(const State: TScanState);
begin
  ScSt := State;
end ;

procedure ChkSize(Sz: Cardinal);
begin
  if integer(Sz)<0 then
    DCUErrorFmt('Negative block size %d',[Sz]);
  if ScSt.CurPos+Sz>ScSt.EndPos then
    DCUErrorFmt('Wrong block size %x',[Sz]);
end ;

function ReadByte: Cardinal;
begin
  ChkSize(1);
  Result := Byte(Pointer(ScSt.CurPos)^);
  Inc(ScSt.CurPos,1);
end ;

function ReadTag: TDCURecTag;
begin
  DefStart := ScSt.CurPos;
  Result := TDCURecTag(ReadByte);
end ;

function ReadULong: Cardinal;
begin
  ChkSize(4);
  Result := Cardinal(Pointer(ScSt.CurPos)^);
  Inc(ScSt.CurPos,4);
end ;

procedure SkipBlock(Sz: Cardinal);
begin
  ChkSize(Sz);
  Inc(ScSt.CurPos,Sz);
end ;

procedure ReadBlock(var B; Sz: Cardinal);
begin
  ChkSize(Sz);
  move(ScSt.CurPos^,B,Sz);
  Inc(ScSt.CurPos,Sz);
end ;

function ReadMem(Sz: Cardinal): Pointer;
begin
  Result := Pointer(ScSt.CurPos);
  SkipBlock(Sz);
end ;

function ReadStr: ShortString;
begin
  Result[0] := Char(ReadByte);
  ReadBlock(Result[1],Length(Result));
end ;

function ReadName: PShortString;
begin
  Result := Pointer(ScSt.CurPos);
  SkipBlock(ReadByte);
end ;

function ReadUIndex: LongInt;
type
  TR4 = packed record
    B: Byte;
    L: LongInt;
  end ;

var
  B: array[0..4]of byte;
  W: Word absolute B;
  L: cardinal absolute B;
  R4: TR4 absolute B;
begin
  NDXHi := 0;
  B[0] := ReadByte;
  if B[0] and $1=0 then
    Result := B[0] shr 1
  else begin
    B[1] := ReadByte;
    if B[0] and $2=0 then
      Result := W shr 2
    else begin
      B[2] := ReadByte;
      B[3] := 0;
      if B[0] and $4=0 then
        Result := L shr 3
      else begin
        B[3] := ReadByte;
        if B[0] and $8=0 then
          Result := L shr 4
        else begin
          B[4] := ReadByte;
          Result := R4.L;
          if (CurUnit.Ver>3)and(B[0] and $F0<>0) then
            NDXHi := ReadULong;
        end ;
      end ;
    end ;
  end ;
end ;

function ReadIndex: LongInt;
type
  TR4 = packed record
    B: Byte;
    L: LongInt;
  end ;

  TRL = packed record
    W: Word;
    i: SmallInt;
  end ;

var
  B: packed array[0..4]of byte;
  SB: ShortInt absolute B;
  W: SmallInt absolute B;
  L: LongInt absolute B;
  R4: TR4 absolute B;
  RL: TRL absolute B;
begin
  B[0] := ReadByte;
  if B[0] and $1=0 then
    Result := LongInt(SB) div 2//shr 1
  else begin
    B[1] := ReadByte;
    if B[0] and $2=0 then
      Result := LongInt(W) div 4//shr 2
    else begin
      B[2] := ReadByte;
      B[3] := 0;
      if B[0] and $4=0 then begin
        RL.i := ShortInt(B[2]);
        Result := L shr 3;
       end
      else begin
        B[3] := ReadByte;
        if B[0] and $8=0 then
          Result := L shr 4
        else begin
          B[4] := ReadByte;
          Result := R4.L;
          if (CurUnit.Ver>3)and(B[0] and $F0<>0) then begin
            NDXHi := ReadULong;
            Exit;
          end ;
        end ;
      end ;
    end ;
  end ;
  if Result<0 then
    NDXHi := -1
  else
    NDXHi := 0;
end ;

procedure ReadIndex64(var Res: TInt64Rec);
begin
  Res.Lo := ReadIndex;
  Res.Hi := NDXHi;
end ;

procedure ReadUIndex64(var Res: TInt64Rec);
begin
  Res.Lo := ReadUIndex;
  Res.Hi := NDXHi;
end ;

function NDXToStr(NDXLo: LongInt): String;
begin
  if NDXHi=0 then
    Result := Format('$%x',[NDXLo])
  else if NDXHi=-1 then
    Result := Format('-$%x',[-NDXLo])
  else if NDXHi<0 then
    Result := Format('-$%x%8.8x',[-NDXHi-1,-NDXLo])
  else
    Result := Format('$%x%8.8x',[NDXHi,NDXLo])
end ;

function MemToInt(DP: Pointer; Sz: Cardinal; var Res: integer): boolean;
begin
  Result := true;
  case Sz of
    1: Res := ShortInt(DP^);
    2: Res := SmallInt(DP^);
    4: Res := LongInt(DP^);
  else
    Result := false;
    Res := 0;
  end ;
end ;

function MemToUInt(DP: Pointer; Sz: Cardinal; var Res: Cardinal): boolean;
begin
  Result := true;
  case Sz of
    1: Res := Byte(DP^);
    2: Res := Word(DP^);
    4: Res := Cardinal(DP^);
  else
    Result := false;
    Res := 0;
  end ;
end ;

end.


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲自拍另类综合| 欧美日韩国产123区| 99综合影院在线| 99国产一区二区三精品乱码| 色综合久久久久综合| 欧洲中文字幕精品| 日韩欧美国产wwwww| 久久精品视频一区| 亚洲日韩欧美一区二区在线| 午夜精品影院在线观看| 蜜臀久久久久久久| 国产精品一区二区你懂的| 成人午夜精品在线| 欧美日韩激情在线| 久久众筹精品私拍模特| 国产精品三级av| 国产精品免费久久久久| 一区二区三区精密机械公司| 日韩极品在线观看| 国产一区二区美女诱惑| 97久久精品人人澡人人爽| 欧美视频一区二区三区| 精品黑人一区二区三区久久| 最近日韩中文字幕| 日韩激情一区二区| 99久久精品情趣| 91精品国产色综合久久久蜜香臀| 久久久久久一级片| 日韩电影在线看| 国产成人精品免费| 欧美日韩午夜影院| 国产亚洲自拍一区| 亚洲综合色网站| 丰满亚洲少妇av| 欧美日韩一区久久| 国产亚洲欧美日韩日本| 日本视频中文字幕一区二区三区| 成人免费av网站| 91精品久久久久久久99蜜桃| 最新久久zyz资源站| 蜜臀av性久久久久蜜臀aⅴ流畅| 成人午夜电影久久影院| 日韩无一区二区| 亚洲日本一区二区三区| 老司机免费视频一区二区| 91一区二区三区在线观看| 欧美mv日韩mv国产网站| 亚洲第四色夜色| 国内精品伊人久久久久av一坑| 欧洲精品视频在线观看| 国产欧美一区二区在线观看| 亚洲一区二区欧美激情| 国产精品夜夜嗨| 91精品国产免费| 亚洲日本韩国一区| 99在线视频精品| 久久精品视频网| 美女mm1313爽爽久久久蜜臀| 欧美日韩黄色一区二区| 最好看的中文字幕久久| 国产成人免费网站| 精品电影一区二区三区| 日韩av网站在线观看| 91九色最新地址| 亚洲精品欧美二区三区中文字幕| 国产成人精品免费在线| 日韩欧美中文字幕精品| 亚洲一区精品在线| 日本高清免费不卡视频| 国产精品视频免费看| 国产一区二区福利| 日韩欧美国产成人一区二区| 日产国产欧美视频一区精品| 欧美日韩综合在线| 亚洲成人免费看| 91久久免费观看| 樱桃视频在线观看一区| 欧美午夜片在线看| 一二三区精品视频| 国产不卡高清在线观看视频| 国产欧美视频在线观看| 国产一区欧美一区| 欧美日韩国产片| 日韩精品乱码免费| 91精品国产乱| 亚洲18影院在线观看| 在线不卡一区二区| 亚洲成人一区在线| 色吧成人激情小说| 亚洲激情图片qvod| 色吧成人激情小说| 亚洲成人激情综合网| 欧美性猛片aaaaaaa做受| 亚洲观看高清完整版在线观看| 欧美唯美清纯偷拍| 亚洲小说春色综合另类电影| 欧美日韩欧美一区二区| 同产精品九九九| 欧美午夜视频网站| 日韩电影在线观看电影| 日韩欧美在线网站| 粉嫩嫩av羞羞动漫久久久| 国产精品全国免费观看高清| 成人av电影在线播放| 亚洲大片免费看| 日韩一区二区中文字幕| 狠狠色丁香婷婷综合久久片| 国产精品免费av| 91麻豆国产福利精品| 亚洲第一av色| 国产午夜精品一区二区三区嫩草| 粉嫩久久99精品久久久久久夜 | 538在线一区二区精品国产| 日本在线不卡一区| 欧美大片日本大片免费观看| 国产一区不卡在线| 亚洲色图另类专区| 欧美亚洲国产一区在线观看网站| 亚洲猫色日本管| 日韩一区二区三区四区| 国内国产精品久久| 中文字幕乱码久久午夜不卡| 欧美日本免费一区二区三区| 精品在线你懂的| 亚洲日本韩国一区| 日韩三级视频中文字幕| 国产成人午夜电影网| 视频一区二区不卡| 欧美激情一区二区三区四区| 色婷婷精品久久二区二区蜜臂av | 欧美一区二区三区小说| 国产酒店精品激情| 午夜久久久影院| 欧美国产视频在线| 欧美日韩国产一二三| av一区二区不卡| 日日夜夜免费精品| 精品久久一区二区| 在线观看欧美黄色| 九九精品一区二区| 日韩欧美亚洲另类制服综合在线| av资源网一区| 免费三级欧美电影| wwwwww.欧美系列| 91在线视频在线| 男女男精品网站| 《视频一区视频二区| 精品久久久久99| 色偷偷久久人人79超碰人人澡| 国产一区二区三区在线观看免费| 亚洲免费观看高清完整版在线观看熊| 日韩区在线观看| 欧美精品丝袜久久久中文字幕| 丁香婷婷综合网| 日韩中文字幕一区二区三区| 中文字幕一区二区三区在线播放 | 亚洲精选在线视频| 精品国产乱码久久久久久夜甘婷婷 | 国产精品久久久99| 日韩丝袜美女视频| 欧美三级视频在线播放| 国产suv一区二区三区88区| 久久99久久久欧美国产| 亚洲成人一区在线| 日本一二三不卡| 亚洲国产精品二十页| 精品久久久久久亚洲综合网 | 青青草国产成人99久久| 亚洲女爱视频在线| 国产精品丝袜在线| 久久色.com| 日韩亚洲欧美高清| 欧美精品v国产精品v日韩精品| 成熟亚洲日本毛茸茸凸凹| 美女高潮久久久| 免费欧美高清视频| 一区二区三区波多野结衣在线观看| 国产视频一区不卡| 国产亚洲精品aa午夜观看| 欧美一区二区三区精品| 99国产精品99久久久久久| 成人国产精品免费观看视频| 美女视频一区二区| 一区二区三区欧美亚洲| 亚洲黄色小视频| 中文字幕一区二区三区不卡| 国产精品久久久一区麻豆最新章节| 欧美精品一区二区蜜臀亚洲| 欧美一区二区女人| 亚洲伊人伊色伊影伊综合网| 欧美日韩另类一区| 欧美日韩在线三区| 精品视频在线免费观看| 91超碰这里只有精品国产| 欧美精品v国产精品v日韩精品| 欧美日韩亚州综合| 91精品国产欧美一区二区| 精品久久久久久久久久久久包黑料 | 日韩视频免费观看高清完整版在线观看 | 国产日本欧美一区二区|