Exemple #1
0
STATIC ASM SAVEDS VOID filter_display(REG(a0,struct Hook *h), REG(a2,char **array), REG(a1,struct filter *ent))
{
	if (ent)
	{
		static char buf[300];
		utf8tostr(ent->name, buf, sizeof(buf), user.config.default_codeset);

		*array = buf;
	}
}
/**
 * Display function for address groups.
 */
STATIC ASM SAVEDS VOID addressgroup_display(REG(a0,struct Hook *h),REG(a2,Object *obj), REG(a1,struct NList_DisplayMessage *msg))
{
	char **array = msg->strings;
	struct addressbook_group *grp = (struct addressbook_group*)msg->entry;
	struct AddressGroupList_Data *data = (struct AddressGroupList_Data*)h->h_Data;

	if (grp)
	{
		utf8tostr(grp->name, data->name_buf, sizeof(data->name_buf), user.config.default_codeset);
		utf8tostr(grp->description, data->description_buf, sizeof(data->description_buf), user.config.default_codeset);

		*array++ = data->name_buf;
		*array++ = data->description_buf;
	} else
	{
	 *array++ = (char*)_("Name");
	 *array++ = (char*)_("Description");
	}
}