lxyppc 发表于 2009-9-18 17:52

[原创] 实用工具 在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中的代码,同时内容被复制到剪切板中,在论坛中粘贴即可

lxyppc 发表于 2009-9-18 17:55

不带行号的效果
// 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
}

huangqi412 发表于 2009-10-30 18:54

顶一贴

BitFu 发表于 2009-11-5 08:47

好东西!

kiton_law 发表于 2009-11-25 13:04

不错不错,这个要顶。

spydf 发表于 2010-1-3 10:01

记下来了

linhuaou 发表于 2010-2-1 18:30

MARk

juventus9554 发表于 2010-2-2 22:16

确实有用

bioe 发表于 2010-3-16 14:23

/*0001*/if(GPIO_ReadInputPin(GPIOG, GPIO_PIN_2)==0x04)

john_light 发表于 2010-4-1 15:39

占首页观望:victory:

xuyiyi 发表于 2010-4-30 04:48

不错,有用,顶

huangsongyou 发表于 2010-11-24 11:46

谢谢

chinadavinci 发表于 2010-12-10 10:28

:lol



http://www.chinadavinci.com/gd/images/**2.gifwww.chinadavinci.com

chinadavinci 发表于 2010-12-10 10:29

:)



http://www.chinadavinci.com/gd/images/**2.gif

www.chinadavinci.com

adams.gh 发表于 2011-3-24 19:28

试试 哈

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];

lixupengIC 发表于 2011-4-1 20:53

mark!!

wuguoyan 发表于 2011-4-17 17:20

mark

piaoyrf 发表于 2011-7-15 10:46

:)

lh0602 发表于 2011-12-6 14:03

mark

icecut 发表于 2011-12-6 22:59

这种语法已经是不被推荐使用的了.都是使用style了.lz是最原始的方法,成为程序员噩梦的方法.

我做过更好的.不过不能公开.
页: [1] 2
查看完整版本: [原创] 实用工具 在BBS中高亮显示C/C++中的关键字