1 --- rpm-4.2/build/rpmfc.c.wiget Mon Jan 20 23:16:09 2003
2 +++ rpm-4.2/build/rpmfc.c Tue Apr 1 09:56:51 2003
5 { "perl script text", RPMFC_PERL|RPMFC_INCLUDE },
6 { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE },
8 + { "PHP script text", RPMFC_PHP|RPMFC_INCLUDE },
10 { "current ar archive", RPMFC_STATIC|RPMFC_LIBRARY|RPMFC_ARCHIVE|RPMFC_INCLUDE },
14 fc->sb_java = freeStringBuf(fc->sb_java);
15 fc->sb_perl = freeStringBuf(fc->sb_perl);
16 + fc->sb_php = freeStringBuf(fc->sb_php);
17 fc->sb_python = freeStringBuf(fc->sb_python);
21 fc->fcolor->vals[fc->ix] |= RPMFC_PERL;
22 else if (!strcmp(bn, "python"))
23 fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
24 + else if (!strcmp(bn, "php"))
25 + fc->fcolor->vals[fc->ix] |= RPMFC_PHP;
31 xx = rpmfcHelper(fc, 'R', "python");
33 + if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) {
34 + xx = rpmfcHelper(fc, 'P', "php");
35 + xx = rpmfcHelper(fc, 'R', "php");
42 static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
43 { rpmfcELF, RPMFC_ELF },
44 - { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL) },
45 + { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PHP) },
49 @@ -1167,6 +1177,10 @@
50 if (slen >= sizeof(".pm") && !strcmp(s+slen-(sizeof(".pm")-1), ".pm"))
51 strcpy(fm->obuf, "Perl5 module source text");
53 + /* XXX all files with extension ".php" are PHP modules for now. */
54 + if (slen >= sizeof(".php") && !strcmp(s+slen-(sizeof(".php")-1), ".php"))
55 + strcpy(fm->obuf, "PHP script text");
58 rpmMessage(RPMMESS_DEBUG, "%s: %s\n", s, se);
60 --- rpm-4.2/build/rpmfc.h.wiget Tue Apr 1 10:00:23 2003
61 +++ rpm-4.2/build/rpmfc.h Tue Apr 1 10:01:22 2003
63 StringBuf sb_java; /*!< concatenated list of java colored files. */
64 StringBuf sb_perl; /*!< concatenated list of perl colored files. */
65 StringBuf sb_python;/*!< concatenated list of python colored files. */
66 + StringBuf sb_php; /*!< concatenated list of php colored files. */