int cat_in (int cat, sc * sc){ sc_cat_iterator i; sc_for_each_cat(sc,i) if(sc_getcat(sc,i)==cat) return 1; return 0; }