~ubuntu-branches/ubuntu/lucid/graphviz/lucid-updates

« back to all changes in this revision

Viewing changes to lib/filter/filter.c

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: filter.c,v 1.1 2008/02/26 19:33:14 ellson Exp $ $Revision: 1.1 $ */
 
2
/* vim:set shiftwidth=4 ts=8: */
 
3
 
 
4
/**********************************************************
 
5
*      This software is part of the graphviz package      *
 
6
*                http://www.graphviz.org/                 *
 
7
*                                                         *
 
8
*            Copyright (c) 1994-2004 AT&T Corp.           *
 
9
*                and is licensed under the                *
 
10
*            Common Public License, Version 1.0           *
 
11
*                      by AT&T Corp.                      *
 
12
*                                                         *
 
13
*        Information and Software Systems Research        *
 
14
*              AT&T Research, Florham Park NJ             *
 
15
**********************************************************/
 
16
 
 
17
#include "filter.h"
 
18
 
 
19
int clear_filter(tv_filter* f)
 
20
{
 
21
        delete_node(f->root);
 
22
}
 
23
 
 
24
int init_filters(tv_filters* filters)
 
25
{
 
26
        filters->filter_count=0;
 
27
        filters->filters=0;
 
28
}
 
29
int add_filter_to_filters(tv_filters* filters,tv_filter* filter)
 
30
{
 
31
        filters->filters=realloc(filters->filters,sizeof(tv_filter*)*(filters->filter_count+1));
 
32
        filters->filters[filters->filter_count]=filter;
 
33
        filters->filter_count++;
 
34
}
 
35
int clear_filters(tv_filters* filters)
 
36
{
 
37
        //deep clear
 
38
        int ind=0;
 
39
        for (ind =0;ind < filters->filter_count ; ind ++)
 
40
        {
 
41
                clear_filter(filters->filters[ind]);
 
42
                free(filters->filters[ind]);
 
43
        }
 
44
        filters->filter_count=0;
 
45
}
 
46
int union_filter(tv_filter* f1,tv_filter* f2)
 
47
{
 
48
                
 
49
}
 
50
int intersect_filter(tv_filter* f1,tv_filter* f2);