attr.c (navit-0.5.5) | : | attr.c (navit-0.5.6) | ||
---|---|---|---|---|
skipping to change at line 679 | skipping to change at line 679 | |||
} | } | |||
/** | /** | |||
* @brief Removes an attribute from an attribute list. | * @brief Removes an attribute from an attribute list. | |||
* | * | |||
* If `attrs` contains `attr`, a new attribute list is created (which contains a ll attributes, except | * If `attrs` contains `attr`, a new attribute list is created (which contains a ll attributes, except | |||
* for `attr`) and both `attrs` (the original attribute list) and `attr` are fre ed. | * for `attr`) and both `attrs` (the original attribute list) and `attr` are fre ed. | |||
* | * | |||
* If `attrs` does not contain `attr`, this function is a no-op. | * If `attrs` does not contain `attr`, this function is a no-op. | |||
* | * | |||
* Attributes are matched based on their `type` and `u.data` members, thus `attr | ||||
` can be a shallow copy | ||||
* of the attribute, and can match multiple attributes in the list. The `attr` a | ||||
rgument itself is not | ||||
* changed. | ||||
* | ||||
* @param attrs The attribute list | * @param attrs The attribute list | |||
* @param attr The attribute to remove from the list | * @param attr The attribute to remove from the list | |||
* | * | |||
* @return The new attribute list | * @return The new attribute list | |||
*/ | */ | |||
struct attr ** | struct attr ** | |||
attr_generic_remove_attr(struct attr **attrs, struct attr *attr) { | attr_generic_remove_attr(struct attr **attrs, struct attr *attr) { | |||
struct attr **curr=attrs; | struct attr **curr=attrs; | |||
int i,j,count=0,found=0; | int i,j,count=0,found=0; | |||
while (curr && *curr) { | while (curr && *curr) { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added |