re 匹配代码的正则表达式

#include <stdio.h>

//被替换函数
void test(void)
{
    int a=10;
    char s[10]={0};
    printf("a=%d,s=%s\n",a,s);
}

int main(int argc ,char **argv)
{
    test();
    printf("hello world!\n");
    return 0;
}

//替换函数
int func(int a){
    int fd=open("/dev/kd_camera_hw",O_RWD);
    if(fd < 0){
        printf("camera open fail\n");
        return -1;
    }else{
        printf("camera open success!\n");
        return 0;
    }
}

 

posted @ 2017-03-11 16:35  ezway  阅读(266)  评论(0编辑  收藏  举报