Ejemplo n.º 1
0
/*
 * Actions on history, only does one thing for now, but
 * we provide the function for future actions
 */
void
xtp_handle_hl(struct tab *t, uint8_t cmd, int id)
{
	struct history		*h, *next;
	int			i = 1;

	switch (cmd) {
	case XT_XTP_HL_REMOVE:
		/* walk backwards, as listed in reverse */
		for (h = RB_MAX(history_list, &hl); h != NULL; h = next) {
			next = RB_PREV(history_list, &hl, h);
			if (id == i) {
				RB_REMOVE(history_list, &hl, h);
				g_free((gpointer) h->title);
				g_free((gpointer) h->uri);
				g_free(h);
				break;
			}
			i++;
		}
		break;
	case XT_XTP_HL_LIST:
		/* Nothing - just xtp_page_hl() below */
		break;
	default:
		show_oops(t, "%s: unknown command", __func__);
		break;
	};

	xtp_page_hl(t, NULL);
}
Ejemplo n.º 2
0
cur_t *cur_prev(cur_t *cur)
    { return RB_PREV(curtree_s, &Head, cur); }
Ejemplo n.º 3
0
Archivo: tud.c Proyecto: stetre/luajack
tud_t *tud_prev(tud_t *tud)
	{ return RB_PREV(tudtree_s, &Head, tud); }
Ejemplo n.º 4
0
static udata_t *udata_prev(udata_t *udata)
    { return RB_PREV(udatatree_s, &Head, udata); }