Chinaunix首页 | 论坛 | 博客

分类: LINUX

2011-09-30 11:22:05

modify_param_name(param_token *name)_______________-------------->[code]

/* extract_param extracts the parameter name into NAME.
 977    However, if the parameter name is in RFC2231 format then
 978    this function adjusts NAME by stripping of the trailing
 979    characters that are not part of the name but are present to
 980    indicate the presence of encoding information in the value
 981    or a fragment of a long parameter value
 982 */
如果exract_param()提取变量的名称放入NAME,但是如果变量是RFC2331格式,那么这个函数就以删除到不是名字的那些尾随部分,这些部分用来表明是编码信息的,此信息在一个很长的变量直中。
modify_param_name()
{
   const char *delim1 = memchr (name->b, '*', name->e - name->b);
   const char *delim2 = memrchr (name->b, '*', name->e - name->b); /*这两个得做个判定:
 -------> /lib/string.in.h*/
 是c 或者c库
.........

最后调用 _GL_EXTERN_C int _gl_cxxalias_dummy,看字面的意思就是extern c.
这里函数这么做的意思就是查看编码方式。有RFC_2331.
}
返回后,如果根据不同的编码方式来判断是否再次调整*/
<-----________
exract_param()中
if (NOT_RFC2331 != param_type)
{
   modify_param_value(value, param_type);  /*说明不是NOT_RFC2331编码方式,再次矫正*/
}
____________------------>
[code]
modify_param_value( )  /*这里就说明就是RFC_2331格式了*/
{
  .....
  *delim - memrch(value->b, '\', value->e - value->b);
   ......
}格式真特殊,这可能就是将其他字符转义
[/code]
阅读(1475) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~