Hi again: * Mark M. Hoffman <mhoffman at lightlink.com> [2006-12-19 08:11:01 -0500]: > In fact, given the code below... you could do something like this for the sake > of efficiency: > > if (name = strchr(name + 5, '_')) > return SENSORS_FEATURE_TEMP; > Err, of course I meant to write (!(name = strchr(name + 5, '_'))) I guess that means we *would* be better off using regcomp(3). > + if (strstr(name, "hyst")) > + return SENSORS_FEATURE_TEMP_HYST; > > And then the above would become: > > if (!strncmp(name + 1, "hyst", 4)) > > etc. Regards, -- Mark M. Hoffman mhoffman at lightlink.com