Ejemplo n.º 1
0
static int line_cache_check_remove(void *key, LINE_CACHE_REC *cache,
				   time_t *now)
{
	if (cache->last_access+LINE_CACHE_KEEP_TIME > *now)
		return FALSE;

	line_cache_destroy(NULL, cache);
	return TRUE;
}
Ejemplo n.º 2
0
static int window_remove_linecache(void *key, LINE_CACHE_REC *cache, gpointer nowp)
{
	time_t now = (time_t) GPOINTER_TO_INT(nowp);

	if (cache->last_access+LINE_CACHE_KEEP_TIME > now)
		return FALSE;

	line_cache_destroy(NULL, cache);
	return TRUE;
}
Ejemplo n.º 3
0
void gui_window_cache_remove(GUI_WINDOW_REC *gui, LINE_REC *line)
{
    LINE_CACHE_REC *cache;

    g_return_if_fail(gui != NULL);
    g_return_if_fail(line != NULL);

    cache = g_hash_table_lookup(gui->line_cache, line);
    if (cache != NULL) {
        g_hash_table_remove(gui->line_cache, line);
        line_cache_destroy(NULL, cache);
    }
}