RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 01-Apr-2011 05:21:25 Branch: rpm-5_3 Handle: 2011040103212500 Modified files: (Branch: rpm-5_3) rpm/lib rpmfc.c Log: nicer for .gemspec suffix Summary: Revision Changes Path 1.73.2.2 +2 -3 rpm/lib/rpmfc.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/lib/rpmfc.c ============================================================================ $ cvs diff -u -r1.73.2.1 -r1.73.2.2 rpmfc.c --- rpm/lib/rpmfc.c 1 Apr 2011 02:06:24 -0000 1.73.2.1 +++ rpm/lib/rpmfc.c 1 Apr 2011 03:21:25 -0000 1.73.2.2 @@ -1036,10 +1036,9 @@ if (!strncmp(fn, "/python", sizeof("/python")-1)) fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON; else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) { - const char *gem = strstr(fn, "specifications"); fc->fcolor->vals[fc->ix] |= RPMFC_RUBY; - if (gem && (gem = strstr(gem, ".gemspec")) && - gem[sizeof(".gemspec")-1] == '\0') + if ((fn = strstr(fn, "/specifications/")) && + (fn = rindex(fn, '.')) && !strcmp(fn, ".gemspec")) fc->fcolor->vals[fc->ix] |= RPMFC_MODULE; } } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org