#include <stdlib.h>
#include <glib.h>
#define FIELD_NAME_ARRAY_LENGHT 8
field_name_array[FIELD_NAME_ARRAY_LENGHT] = {"wd", "rsv_spt", "issp", "rsv_bp", "ie", "tn", "n", "inputT"};
int main()
{
char data[1024] = "?wd=getenv&rsv_spt=1&issp=1&rsv_bp=0&ie=utf-8&tn=baiduhome_pg&n=2&inputT=1186";
//解析报文
char *tp = data, *p, *key_array, *value_array;
GHashTable *table = NULL;
table = g_hash_table_new(g_str_hash, g_str_equal);
//分解字符串为一组字符串。从tp指向的位置起向后扫描,遇到'&'后,将此字符替换为NULL,返回tp指向的地址。
}
return 0;
}