2012年11月8日

__builtin_expect详解[转]

摘要: 转自:http://babybandf.blog.163.com/blog/static/619935320105942336930/在GTK+2.0源码中有很多这样的宏:G_LIKELY和G_UNLIKELY。比如下面这段代码:if (G_LIKELY (acat == 1)) /* allocate through magazine layer */ { ThreadMemory *tmem = thread_memory_from_self(); guint ix = SLAB_INDEX (allocator, chunk_size);... 阅读全文

posted @ 2012-11-08 14:22 Lo0ong 阅读(667) 评论(0) 推荐(0) 编辑

getopt

摘要: getopt(分析命令行参数) 相关函数 表头文件 #include<unistd.h> 定义函数 int getopt(int argc,char * const argv[ ],const char * optstring); extern char *optarg; extern int optind, opterr, optopt; 函数说明 getopt()用来分析命令行参数。参数argc和argv是由main()传递的参数个数和内容。参数 optstring为选项字符串, 告知 getopt()可以处理哪个选项以及哪个选项需要参数,如果选项字符串里的字母后接着冒号“:” 阅读全文

posted @ 2012-11-08 10:05 Lo0ong 阅读(179) 评论(0) 推荐(0) 编辑

CentOS安装SCIM

摘要: 转自:http://blog.chinaunix.net/space.php?uid=20583479&do=blog&id=1920053一.安装中文支持方法1。在安装光盘中找到一下包进行安装.rpm -ivh fonts-chinese-3.02-9.6.el5.noarch.rpmrpm -ivh fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm方法二2.yum install fonts-chineseyum install fonts-ISO8859-2二。安装scim中文输入法安装光盘内的 scim-1.4.4-39.el5.i38 阅读全文

posted @ 2012-11-08 09:34 Lo0ong 阅读(2050) 评论(0) 推荐(0) 编辑

导航