Mercurial > hg > waaad
changeset 81:94e85f845b69
Cosmetic: set order only when position is FIXED
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 11 Jul 2008 18:27:35 +0900 |
parents | 4349f4ec01dd |
children | 3af3e35edc07 |
files | waaad/dict-base.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/waaad/dict-base.c Fri Jul 11 18:05:39 2008 +0900 +++ b/waaad/dict-base.c Fri Jul 11 18:27:35 2008 +0900 @@ -67,15 +67,18 @@ int template; } loc_rules_def_t; +#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) + #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ dict_rule_data_t __data = { NULL, \ (_rulearray)[__ar].position, \ - 1, /* at most 1 fixed rule in base protocol */ \ + 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max, \ (_rulearray)[__ar].template}; \ + __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_dict_search( DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \