摘要: 原文地址:http://blog.csdn.net/wooin/archive/2006/04/29/697106.aspx我们在C语言编程中会遇到一些参数个数可变的函数,例如printf()这个函数,它的定义是这样的: int printf( const char* format, ...); 它除了有一个参数format固定以外,后面跟的参数的个数和类型是可变的,例如我们可以有以下不同的调用方法: printf("%d",i); printf("%s",s); printf("the number is %d ,string is:%s&q 阅读全文
posted @ 2011-06-18 14:15 wangkangluo1 阅读(386) 评论(0) 推荐(0)
摘要: 参考地址:http://blogold.chinaunix.net/u/2260/showart_199482.htmlhttp://chuna2.787528.xyz/wangkangluo1/archive/2011/06/02/2068788.htmlconfigure.ac# -*- Autoconf -*- # Process this file with autoconf to produce a configure script.AC_PREREQ([2.65])AC_INIT(maintest, 10.32, [email protected])AM_INIT_AUTOMAKE()# 阅读全文
posted @ 2011-06-17 17:14 wangkangluo1 阅读(371) 评论(0) 推荐(0)
摘要: 需要指定目录:SUBDIRS = src cgibas spd Makefile.amAUTOMAKE_OPTIONS=foreignlib_LTLIBRARIES=libbas2plugin.la libbas2plugin_la_SOURCES = basAffair.c\ basComment.c\ basDiscussion.c\ basPlugin.c\ basEgg.c\ basNews.c\ basPost.c\ basTopic.c\ basWord.c\ spdComment.c \ spdPostStorage.c\ spdPost.clibbas2plugin_la_CP 阅读全文
posted @ 2011-06-17 14:08 wangkangluo1 阅读(822) 评论(0) 推荐(0)
摘要: c 数据库框架:main.c#include <errno.h>#include <math.h> #include <stdio.h> #include <stdlib.h>#include <string.h>#include "config.h"/* * === FUNCTION ====================================================================== * Name: main * Description: main function * = 阅读全文
posted @ 2011-06-17 12:09 wangkangluo1 阅读(944) 评论(0) 推荐(0)
摘要: 项目下如下指定源码目录SUBDIRS = lib lib/test plugin plugin/utest cgi 源码目录下:AUTOMAKE_OPTIONS=foreignbin_PROGRAMS= bas.fcgibas_fcgi_SOURCES=basFCGI.c\ basCgiAux.c\ basCommon.c\ basOperation.c\ basSearchOp.c\ eggDAO.c\ utility.c\ stringDeal.c\ getString.c\ getQuery.c\ caluPageNum.c\ config.cbas_fcgi_CFLAGS=$(glib 阅读全文
posted @ 2011-06-16 19:10 wangkangluo1 阅读(270) 评论(0) 推荐(0)
摘要: glib简单使用:#include <errno.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <glib.h>/* * === FUNCTION ====================================================================== * Name: main * Description: main function * ============== 阅读全文
posted @ 2011-06-16 09:01 wangkangluo1 阅读(440) 评论(0) 推荐(0)
摘要: 多线程实例2:#include <stdio.h> #include <stdio.h>#include <pthread.h>void thread(void) { int i; for(i=0;i<3;i++) printf("This is a pthread.\n"); }int main(void) { pthread_t id; int i,ret; ret=pthread_create(&id,NULL,(void *) thread,NULL); if(ret!=0){ printf ("Creat 阅读全文
posted @ 2011-06-16 07:46 wangkangluo1 阅读(718) 评论(1) 推荐(0)
摘要: 多线程实例 :lp.c#include <pthread.h>#include <stdio.h>#include <sys/time.h>#include <string.h>#define MAX 10pthread_t thread[2];pthread_mutex_t mut;int number=0, i;void *thread1(){ printf ("thread1 : I'm thread 1\n"); for (i = 0; i < MAX; i++) { printf("threa 阅读全文
posted @ 2011-06-16 07:44 wangkangluo1 阅读(1023) 评论(0) 推荐(0)
摘要: makefile:AUTOMAKE_OPTIONS=foreign bin_PROGRAMS= bas.fcgi\ bbs.fcgi bas_fcgi_SOURCES=basFCGI.c\ ... 阅读全文
posted @ 2011-06-15 21:08 wangkangluo1 阅读(345) 评论(0) 推荐(0)
摘要: search_callback({ "result":50000, "pageAct":500, "useTime":12.861029, "body": [ { "post_title":"日本留学生谈日本\“大学泡沫化\”", "post_summary":"日本留学生谈日本\“大学泡沫化\”恰好,前几天我去采访日本早稻田大学公共经营研究科教授福岛淑彦时谈到这个...", "post_url":"htt 阅读全文
posted @ 2011-06-12 21:45 wangkangluo1 阅读(265) 评论(0) 推荐(0)