config: add and use index-of helpers for cat/subcat array iteration
these 'index-of' helpers find the index for the given cat/subcat. this allows us to de-duplicate the code from the other helper functions (both for those that already exist and ones to be added in further commits). they loop based upon array length rather than looking out for some particular condition of varying properties in an end marker record, allowing us to also drop those. i used an index-of design here rather than have functions that return pointers because there will be a secondary use for index-of helpers in later commits.
Please register or sign in to comment