/** * Returns TRUE if c can match anything in the set S (err. the connector table ct). */ static inline bool matches_S(connector_table *ct, Connector * c) { Connector * e; for (e = ct[hash_S(c)]; e != NULL; e = e->tableNext) { if (easy_match(e->string, c->string)) return true; } return false; }
/** * This function puts connector c into the connector table * if one like it isn't already there. */ static void insert_connector(connector_table *ct, Connector * c) { unsigned int h; Connector * e; h = hash_S(c); for (e = ct[h]; e != NULL; e = e->tableNext) { if (string_set_cmp(c->string, e->string)) return; } c->tableNext = ct[h]; ct[h] = c; }
/** * Returns TRUE if c can match anything in the set S (err. the connector table ct). */ static inline bool matches_S(connector_table *ct, Connector * c, char dir) { Connector * e; unsigned int h = hash_S(c); if (dir == '-') { for (e = ct[h]; e != NULL; e = e->tableNext) { if (prune_match(e, c)) return true; } return false; } else { for (e = ct[h]; e != NULL; e = e->tableNext) { if (prune_match(c, e)) return true; } return false; } }