static int extract_cookie(cookie *c, char * const cs) { char *semicolon = strchr(cs, ';'), *domain = strstr(cs, "domain="), *expires = strstr(cs, "expires="), *path = strstr(cs, "path="); if(semicolon == NULL) return -1; strncpy(c->content, cs, semicolon - cs); copy_property(domain, 7); copy_property(expires, 8); copy_property(path, 5); c->magic_cookie = COOKIE_MAGIC; return 0; }
void set_ob_property(Object *ob, bProperty *propc) { bProperty *prop; prop = get_ob_property(ob, propc->name); if (prop) { free_property(prop); BLI_remlink(&ob->prop, prop); } BLI_addtail(&ob->prop, copy_property(propc)); }
void copy_properties(ListBase *lbn, ListBase *lbo) { bProperty *prop, *propn; free_properties(lbn); /* in case we are copying to an object with props */ prop = lbo->first; while (prop) { propn = copy_property(prop); BLI_addtail(lbn, propn); prop = prop->next; } }