Skip to content

Commit 3b1f419

Browse files
author
ohtorii
committed
1st commit.
0 parents  commit 3b1f419

11 files changed

+6539
-0
lines changed

macro/demangle.exe

129 KB
Binary file not shown.

macro/demangle.mac

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
/*�f�}���O������G�ۃ}�N��
2+
3+
�i����j
4+
-�ҏW���̃e�L�X�g�ɂ͕ύX�������܂���B�f�}���O���������ʂ�
5+
�u�V�����E�C���h�E�A�܂��́A�A�E�g�v�b�g�g�v�֏o�͂��܂��B
6+
7+
-�I��͈͂���i��s�j
8+
�I��͈͂��f�}���O�����ĕ\���B
9+
10+
-�I��͈͂���i�����s�j
11+
�I���̊J�n�s����I���s�܂ł���s�P�ʂŃf�}���O�����ĕ\�����܂��B
12+
13+
-�I��͈͖���
14+
���߂̃}���O�����ꂽ���O���ۂ��ӏ����f�}���O�����ĕ\���B
15+
16+
-��`�I��
17+
�u�I��͈͂���i�����s�j�v�Ɠ�������
18+
19+
20+
ohtorii
21+
http://d.hatena.ne.jp/ohtorii/
22+
https://github.com/ohtorii
23+
*/
24+
25+
////////////////////////////////////////////////////////////////////////////
26+
// ���[�U�[�J�X�^�}�C�Y
27+
////////////////////////////////////////////////////////////////////////////
28+
$g_exe_abs_path = currentmacrodirectory + "\\" + "demangle.exe";
29+
$g_dll_dengaku_abs_path = hidemarudir + "\\" + "DengakuDLL.dll";
30+
31+
////////////////////////////////////////////////////////////////////////////
32+
// ���C������
33+
////////////////////////////////////////////////////////////////////////////
34+
35+
$g_mangle_names = "";
36+
$old_searchbuffer = searchbuffer;
37+
#old_searchoption = searchoption;
38+
//����‹����Œ艻����B
39+
//�܂肽���݂��ێ�,�����ҏW���ێ�,�͈͑I��,�Ō�Ɉړ�
40+
//�}�N���I�����Ɍ��ɖ߂�B
41+
setcompatiblemode 0x0003|0x000c|0x0200|0x2000;
42+
call LoadDengaku;
43+
if(result){
44+
call Main;
45+
if(#g_load_dengaku){
46+
freedll;
47+
}
48+
}
49+
setsearch $old_searchbuffer, #old_searchoption;
50+
endmacro;
51+
52+
53+
54+
55+
Main:
56+
disabledraw;
57+
##old_column=column;
58+
##old_lineno=lineno;
59+
if(rectselecting){
60+
call DoRecselecting;
61+
}else{
62+
if(selecting) {
63+
if(seltoplineno==selendlineno){
64+
call DoSelectingSingle;
65+
}else{
66+
call DoSelectingMulti;
67+
}
68+
}else{
69+
call DoNoSelecting;
70+
}
71+
}
72+
call DoDemangle;
73+
movetolineno 1+##old_column,##old_lineno;
74+
return ;
75+
76+
DoRecselecting:
77+
##old_seltopcolumn=seltopcolumn;
78+
##old_seltoplineno=seltoplineno;
79+
##old_selendlineno=selendlineno;
80+
while(##old_seltoplineno <= ##old_selendlineno){
81+
movetolineno 1+##old_seltopcolumn,##old_seltoplineno;
82+
call DoNoSelecting;
83+
##old_seltoplineno=##old_seltoplineno+1;
84+
}
85+
return ;
86+
87+
DoSelectingMulti:
88+
##old_seltoplineno=seltoplineno;
89+
##old_selendlineno=selendlineno;
90+
while(##old_seltoplineno <= ##old_selendlineno){
91+
movetolineno 1,##old_seltoplineno;
92+
selectline;
93+
$$str = gettext2(seltopcolumn,seltoplineno,selendcolumn,selendlineno);
94+
$$str = dllfuncstr("RTRIM",$$str);
95+
$g_mangle_names=$g_mangle_names + " " + $$str;
96+
##old_seltoplineno=##old_seltoplineno+1;
97+
}
98+
return ;
99+
100+
DoSelectingSingle:
101+
$$str = gettext2(seltopcolumn,seltoplineno,selendcolumn,selendlineno);
102+
$$str = dllfuncstr("RTRIM",$$str);
103+
$g_mangle_names=$g_mangle_names + " " + $$str;
104+
return ;
105+
106+
DoNoSelecting:
107+
call DoNoSelecting_Move;
108+
##old_lineno = lineno;
109+
searchdown2 "[\\c@?$]+", regular,nocasesense,nohilight;
110+
if(result && selecting && (##old_lineno==lineno)){
111+
$$str = gettext2(seltopcolumn,seltoplineno,selendcolumn,selendlineno);
112+
$$str = dllfuncstr("RTRIM",$$str);
113+
$g_mangle_names=$g_mangle_names + " " + $$str;
114+
}
115+
return ;
116+
117+
/*�J�[�\�����}���O�������ꂽ�i�Ǝv����j���O�̐擪�ֈړ�����B*/
118+
DoNoSelecting_Move:
119+
##old_column = column;
120+
##u = unicode;
121+
while((0x20<##u) && (##u<0x7f)){
122+
left;
123+
if(! result){
124+
break;
125+
}
126+
##u = unicode;
127+
}
128+
/*�J�[�\���ʒu����
129+
�i�O�j
130+
| name
131+
�i��j
132+
|name
133+
*/
134+
if(column < ##old_column){
135+
right;
136+
}
137+
return ;
138+
139+
DoDemangle:
140+
if( strlen($g_mangle_names)){
141+
$$cmd_exe = "\"" + $g_exe_abs_path + "\"";
142+
$$cmd = $$cmd_exe + " " + $g_mangle_names;
143+
//message $$cmd;
144+
runex $$cmd
145+
, 0 //sync 0:async 1:sync
146+
, 5, "" //stdin 0:none 1:auto 2:file 3:(reserve) 4:all 5:select
147+
, 7, "" //stdout 0:none 1:auto 2:file 3:add file 4:new 5:insert 6:replace
148+
, 1, "" //stderr 0:none 1:=out 2:file 3:add file 4:new 5:insert 6:replace
149+
, 0, "" //folder 0:none 1:current 2:specify 3:(reserve) 4:exe's folder
150+
, 2 //show 0:auto 1:show 2:hide
151+
, 1 //nodraw 0:draw 1:no draw
152+
, 0 //unicode 0:ansi 2:unicode
153+
;
154+
}
155+
return ;
156+
157+
158+
LoadDengaku:
159+
loaddll $g_dll_dengaku_abs_path;
160+
if (!result) {
161+
message "�c�yDLL�̃��[�h�Ɏ��s���܂���\n" + "DengakuDLL.dll���G�ۂ̃f�B���N�g���ɑ��݂��邩�m�F���Ă�������";
162+
return false;
163+
}
164+
#g_load_dengaku = true;
165+
return true;

readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
C/C++のシンボル名デマングルする秀丸マクロ
2+

0 commit comments

Comments
 (0)