X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fgraph_instance.c;h=93fc3c58cadd80ef4f50d6016b460469f0c28647;hb=7173d20ea5c32867ccb6a10f3417a632e41bfe66;hp=317c381f77f7c48aad0dd664d4279161290ed032;hpb=8a3753760230b270c8f4615891cba2586a661d21;p=collection4.git diff --git a/src/graph_instance.c b/src/graph_instance.c index 317c381..93fc3c5 100644 --- a/src/graph_instance.c +++ b/src/graph_instance.c @@ -1,3 +1,26 @@ +/** + * collection4 - graph_instance.c + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #include #include #include @@ -410,6 +433,12 @@ int inst_get_params (graph_config_t *cfg, graph_instance_t *inst, /* {{{ */ return (0); } /* }}} int inst_get_params */ +int inst_compare (const graph_instance_t *i0, /* {{{ */ + const graph_instance_t *i1) +{ + return (ident_compare (i0->select, i1->select)); +} /* }}} int inst_compare */ + int inst_compare_ident (graph_instance_t *inst, /* {{{ */ const graph_ident_t *ident) { @@ -422,8 +451,10 @@ int inst_compare_ident (graph_instance_t *inst, /* {{{ */ _Bool inst_ident_matches (graph_instance_t *inst, /* {{{ */ const graph_ident_t *ident) { +#if C4_DEBUG if ((inst == NULL) || (ident == NULL)) return (0); +#endif return (ident_matches (inst->select, ident)); } /* }}} _Bool inst_ident_matches */