浏览代码

ft: 代码调整

master
SisMaker 4 年前
父节点
当前提交
0ee4f5c5f2
共有 1 个文件被更改,包括 9 次插入11 次删除
  1. +9
    -11
      src/eAcs.erl

+ 9
- 11
src/eAcs.erl 查看文件

@ -136,7 +136,7 @@ getOutputIs(State) ->
replaceSw(BinStr) -> replaceSw(BinStr) ->
TotalSize = byte_size(BinStr), TotalSize = byte_size(BinStr),
MatchBIMWs = doMatchRs(BinStr, TotalSize - 1, _Index = 1, _State = 0, _MatchList = []), MatchBIMWs = doMatchRs(BinStr, TotalSize - 1, _Index = 1, _State = 0, _MatchList = []),
%io:format("IMY******************* ~p~n", [lists:reverse(MatchBIMWs)]),
io:format("IMY******************* ~p~n", [lists:reverse(MatchBIMWs)]),
doReplaceSw(lists:reverse(MatchBIMWs), BinStr, TotalSize, _StartPos = 0, <<>>). doReplaceSw(lists:reverse(MatchBIMWs), BinStr, TotalSize, _StartPos = 0, <<>>).
%% %%
@ -162,9 +162,8 @@ getMatchWords(0, _BinStr, ByteIndex, _BslCnt, _Utf8Code, FilterWs) ->
{ByteIndex, FilterWs}; {ByteIndex, FilterWs};
getMatchWords(MatchWordCnt, BinStr, ByteIndex, BslCnt, Utf8Code, FilterWs) -> getMatchWords(MatchWordCnt, BinStr, ByteIndex, BslCnt, Utf8Code, FilterWs) ->
Byte = binary:at(BinStr, ByteIndex), Byte = binary:at(BinStr, ByteIndex),
%io:format("IMY****************~p ~n", [Byte]),
if if
Byte band 2#10000000 == 0 ->
Byte < 128 ->
%% ASCII %% ASCII
case acsSpw:getSpw(Byte) of case acsSpw:getSpw(Byte) of
true -> true ->
@ -174,22 +173,21 @@ getMatchWords(MatchWordCnt, BinStr, ByteIndex, BslCnt, Utf8Code, FilterWs) ->
%% %%
getMatchWords(MatchWordCnt - 1, BinStr, ByteIndex - 1, 0, 0, [?RW | FilterWs]) getMatchWords(MatchWordCnt - 1, BinStr, ByteIndex - 1, 0, 0, [?RW | FilterWs])
end; end;
Byte band 2#10000000 == 128 ->
Code = Byte band 2#00111111,
Byte band 128 == 128 ->
Code = Byte band 63,
getMatchWords(MatchWordCnt, BinStr, ByteIndex - 1, BslCnt + 6, Code bsl BslCnt + Utf8Code, FilterWs); getMatchWords(MatchWordCnt, BinStr, ByteIndex - 1, BslCnt + 6, Code bsl BslCnt + Utf8Code, FilterWs);
true -> true ->
%io:format("IMY****************~p", [Byte]),
case BslCnt of case BslCnt of
6 -> 6 ->
Code = Byte band 2#00011111;
Code = Byte band 31;
12 -> 12 ->
Code = Byte band 2#00001111;
Code = Byte band 15;
18 -> 18 ->
Code = Byte band 2#00000111;
Code = Byte band 7;
24 -> 24 ->
Code = Byte band 2#00000011;
Code = Byte band 3;
30 -> 30 ->
Code = Byte band 2#00000001
Code = Byte band 1
end, end,
FullWord = Code bsl BslCnt + Utf8Code, FullWord = Code bsl BslCnt + Utf8Code,
case acsSpw:getSpw(FullWord) of case acsSpw:getSpw(FullWord) of

正在加载...
取消
保存