Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 87794 Details for
Bug 132880
php5 patch for ctags
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
'const' keyword support added
ctags-5.5.4-php5.patch (text/plain), 1.66 KB, created by
Ilya Hegai
on 2006-05-29 04:53:47 UTC
(
hide
)
Description:
'const' keyword support added
Filename:
MIME Type:
Creator:
Ilya Hegai
Created:
2006-05-29 04:53:47 UTC
Size:
1.66 KB
patch
obsolete
>--- php.c.orig 2004-02-18 08:30:11.000000000 +0300 >+++ php.c 2006-05-29 14:37:32.000000000 +0400 >@@ -38,6 +38,16 @@ > { TRUE, 'v', "variable", "variables" } > }; > >+static const unsigned char *keywords[] = { >+"abstract", >+"public", >+"private", >+"protected", >+"static", >+"final", >+NULL >+}; >+ > /* > * FUNCTION DEFINITIONS > */ >@@ -57,9 +67,24 @@ > return (boolean)(isVarChar1 (c) || isdigit (c)); > } > >+static boolean isKeyword(const unsigned char *cp) { >+ int i=0; >+ size_t sl; >+ unsigned const char *kw; >+ >+ while (kw = keywords[i++]) { >+ sl = strlen(kw); >+ if (strncmp(cp, kw, sl)==0 && isspace(cp[sl])) { >+ return sl; >+ } >+ } >+ return 0; >+} >+ > static void findPhpTags (void) > { > vString *name = vStringNew (); >+ int cpa; > const unsigned char *line; > > while ((line = fileReadLine ()) != NULL) >@@ -69,6 +94,13 @@ > while (isspace (*cp)) > cp++; > >+ while (cpa = isKeyword(cp)) { >+ cp += cpa; >+ while (isspace (*cp)) >+ cp++; >+ } >+ >+ > if (*(const char*)cp == '$' && isVarChar1 (*(const char*)(cp+1))) > { > cp += 1; >@@ -153,6 +185,24 @@ > makeSimpleTag (name, PhpKinds, K_DEFINE); > vStringClear (name); > } >+ else if (strncmp ((const char*) cp, "const", (size_t) 5) == 0 && >+ ! isalnum ((int) cp [5])) >+ { >+ cp += 5; >+ >+ while (isspace ((int) *cp)) >+ ++cp; >+ >+ vStringClear (name); >+ while (isalnum ((int) *cp) || *cp == '_') >+ { >+ vStringPut (name, (int) *cp); >+ ++cp; >+ } >+ vStringTerminate (name); >+ makeSimpleTag (name, PhpKinds, K_DEFINE); >+ vStringClear (name); >+ } > } > vStringDelete (name); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 132880
:
86539
| 87794 |
108116