ATTR(flush_size)
ATTR(flush_time)
ATTR(zipfile_ref)
+ATTR(country_id)
/* boolean */
ATTR(overwrite)
ATTR2(0x0002ffff,type_int_end)
-
ATTR2(0x00030000,type_string_begin)
ATTR(type)
ATTR(label)
attr->u.str=gettext(country->name);
this->attr_next=attr_id;
return 1;
- case attr_id:
+ case attr_country_id:
attr->u.num=country->id;
this->attr_next=country->car ? attr_country_car : attr_country_iso2;
return 1;
{
struct country_search *ret=g_new(struct country_search, 1);
ret->search=*search;
- ret->len=strlen(search->u.str);
+ if (search->type != attr_country_id)
+ ret->len=strlen(search->u.str);
+ else
+ ret->len=0;
ret->partial=partial;
ret->count=0;
if (this->count >= sizeof(country)/sizeof(struct country))
return NULL;
this->country=&country[this->count++];
- if (match(this, attr_country_iso3, this->country->iso3) ||
+ if ((this->search.type == attr_country_id && this->search.u.num == this->country->id) ||
+ match(this, attr_country_iso3, this->country->iso3) ||
match(this, attr_country_iso2, this->country->iso2) ||
match(this, attr_country_car, this->country->car) ||
match(this, attr_country_name, gettext(this->country->name))) {
attr->u.num=(street->str->limit & 0x30) ? 1:0;
attr->u.num|=(street->str->limit & 0x03) ? 2:0;
}
+ street->attr_next=attr_country_id;
+ return 1;
+ case attr_country_id:
street->attr_next=attr_debug;
+ nameid=L(street->str->nameid);
+ if (! nameid)
+ return 0;
+ if (! street->name.len)
+ street_name_get_by_id(&street->name,street->name_file,nameid);
+ attr->u.num=street->name.country;
return 1;
case attr_debug:
street->attr_next=attr_none;
{
char *attr_name=attr_to_name(attr->type);
- if (attr->type == attr_limit)
+ if (attr->type >= attr_type_int_begin && attr->type <= attr_type_int_end)
popup_printf(menu, menu_type_menu, "%s: %d", attr_name, attr->u.num);
else
popup_printf(menu, menu_type_menu, "%s: %s", attr_name, attr->u.str);
le->parent=NULL;
else {
leu=&this_->levels[level-1];
+ if (! leu->curr)
+ break;
le->parent=leu->curr->data;
leu->last=leu->curr;
leu->curr=g_list_next(leu->curr);