[原创] 实用工具 在BBS中高亮显示C/C++中的关键字
本帖最后由 lxyppc 于 2012-5-25 17:22 编辑CodePaint 1.1 源代码
CodePaint 1.1 可执行程序
由VS2003编译 2
词法分析部分是由lex编写
文件包中包含lex编译程序"flex.exe"
编译过程
1. 用CFlex.bat调用flex.exe,把Parser.l编译成Parser.cpp
2. 用VS编译工程
功能:
将C/C++中的关键字、字符串、数字以及注释用高亮的方式在论坛中显示出来
可以在代码前面加上行号,方便阅读
使用方法:
将源代码粘贴至上面的文本框中,点击Convert按钮
在下面的文本框中会生成BBS中的代码,同时内容被复制到剪切板中,在论坛中粘贴即可
不带行号的效果
// The system calls this function to obtain the cursor to display while the user drags
//the minimized window.
HCURSOR CUIParserDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
void CUIParserDlg::OnEnChangeRichedit21()
{
// TODO:If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO:Add your control notification handler code here
} 顶一贴 好东西! 不错不错,这个要顶。 记下来了 MARk 确实有用 /*0001*/if(GPIO_ReadInputPin(GPIOG, GPIO_PIN_2)==0x04) 占首页观望:victory: 不错,有用,顶 谢谢 :lol
http://www.chinadavinci.com/gd/images/**2.gifwww.chinadavinci.com :)
http://www.chinadavinci.com/gd/images/**2.gif
www.chinadavinci.com 试试 哈
BYTE GetPINInfo(void)
{
BYTE xdata k[0x20]; //20101011
WORD data key_id;
BYTE data sw;
if (0 == G_APDU_Ln)
{
if (G_APDU_P1)
return SW6A86;
key_id = PIN_TYPE_ID | G_APDU_P2;
sw = Get_Key(k, key_id, 0x10);
if (sw != SW9000)
return sw;
key_id = DFLT_PIN_TYPE_ID | G_APDU_P2;
sw = Get_Key(G_APDU_Data, key_id, 0x10);
if (sw != SW9000)
return sw;
if (UHL_MemCmp(k + KEY_VALUE_OFFSET, G_APDU_Data + KEY_VALUE_OFFSET, k[0] - 6))//PIN Changed
k[6] |= 0x80;
UHL_MemSet(G_APDU_Data, 0x10, 0);
G_APDU_Data[0] = k[5]; mark!! mark :) mark 这种语法已经是不被推荐使用的了.都是使用style了.lz是最原始的方法,成为程序员噩梦的方法.
我做过更好的.不过不能公开.
页:
[1]
2