]>
Commit | Line | Data |
---|---|---|
c8d89499 PG |
1 | ;;; php-mode.el --- major mode for editing PHP code |
2 | ||
3 | ;; Copyright (C) 1999-2001 Turadg Aleahmad | |
4 | ||
5 | ;; Maintainer: Turadg Aleahmad <turadg at users.sourceforge.net> | |
6 | ;; Keywords: php languages oop | |
7 | ;; Created: 1999-05-17 | |
8 | ;; Modified: 2002-01-22 | |
9 | ;; X-URL: http://php-mode.sf.net/ | |
10 | ||
11 | (defconst php-version "1.0.2" | |
12 | "PHP Mode version number.") | |
13 | ||
14 | ;;; License | |
15 | ||
16 | ;; This program is free software; you can redistribute it and/or | |
17 | ;; modify it under the terms of the GNU General Public License | |
18 | ;; as published by the Free Software Foundation; either version 2 | |
19 | ;; of the License, or (at your option) any later version. | |
20 | ||
21 | ;; This program is distributed in the hope that it will be useful, | |
22 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24 | ;; GNU General Public License for more details. | |
25 | ||
26 | ;; You should have received a copy of the GNU General Public License | |
27 | ;; along with this program; if not, write to the Free Software | |
28 | ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
29 | ||
30 | ;;; Usage | |
31 | ||
32 | ;; Place this file in your Emacs lisp path (eg. site-lisp) | |
33 | ;; and add to your .emacs file: | |
34 | ;; (load-library "php-mode-102") | |
35 | ||
36 | ;; If you want colorization, turn on global-font-lock or | |
37 | ;; add this to your .emacs: | |
38 | ;; (add-hook 'php-mode-user-hook 'turn-on-font-lock) | |
39 | ||
40 | ;; To make php-mode compatible with html-mode, see php-mode.sf.net | |
41 | ||
42 | ;; Many options available under Help:Customize | |
43 | ;; Options specific to php-mode are in | |
44 | ;; Programming/Languages/Php | |
45 | ;; Since it inherits much functionality from c-mode, look there too | |
46 | ;; Programming/Languages/C | |
47 | ||
48 | ;;; Commentary: | |
49 | ||
50 | ;; PHP mode is a major mode for editing PHP 3 and 4 source code. It's | |
51 | ;; an extension of C mode; thus it inherits all C mode's navigation | |
52 | ;; functionality. But it colors according to the PHP grammar and indents | |
53 | ;; according to the PEAR coding guidelines. It also includes a couple | |
54 | ;; handy IDE-type features such as documentation search and a source | |
55 | ;; and class browser. | |
56 | ||
57 | ||
58 | ;;; Changelog: | |
59 | ||
60 | ;; 1.02 | |
61 | ;; Highlight HTML tags and entities (see site for more on HTML) | |
62 | ;; Highlight more constants by default | |
63 | ;; Fixed problem with $-line indenting inside switch (see comments) | |
64 | ;; Fix to show keymap in help mode (Ryan Sammartino) | |
65 | ;; Added .phps to default extensions to match (John Keller) | |
66 | ||
67 | ;; 1.0.1 | |
68 | ;; Fix for some speedbar problems | |
69 | ||
70 | ;; 1.0.0 | |
71 | ;; Function indentation fix (Craig Andrews) | |
72 | ;; Added option to open speedbar on buffer load | |
73 | ;; Fixed PEAR filename matching regexps and bug with mmm-mode | |
74 | ;; Added preference option to always use PEAR standards | |
75 | ;; Fixed PEAR hook bug with XEmacs | |
76 | ;; Took out warning for empty parens in "new Object()" | |
77 | ;; Fixed keyword highlighting of 'this' at start of variable | |
78 | ;; Removed "goto" references | |
79 | ;; Added 'next' as keyword | |
80 | ||
81 | ;; 0.9.9 | |
82 | ;; Fixed highlights for targets of gotos and 'default' within a switch | |
83 | ;; Changed my e-mail and URL to SourceForge | |
84 | ;; Changed name of hook variable (update your .emacs) | |
85 | ;; Wrapped PEAR standards into a PEAR hook | |
86 | ;; Disabled coloring non-core constants (see comments to re-enable) | |
87 | ||
88 | ;; 0.9.8 | |
89 | ;; Thanks to a patch from Stig Saether Bakken: | |
90 | ;; Checks for PEAR before setting indent-tabs-mode to nil | |
91 | ;; Adds some keywords that got lost | |
92 | ;; Highlights function $foo and class::method | |
93 | ;; Removes C++ template from speedbar search expression :) | |
94 | ;; Adds about a thousand constants | |
95 | ;; So many that if you want to recompile php-mode-098.el | |
96 | ;; you'll have to greatly increase max-specpdl-size | |
97 | ||
98 | ;; 0.9.7 | |
99 | ;; This version marks a huge advance and will become 1.0.0 | |
100 | ;; after I wait a bit for possible bug reports. | |
101 | ;; | |
102 | ;; The primary improvement is support for shell-style comments | |
103 | ;; in both GNU Emacs and XEmacs. Thank for this goes to Fred | |
104 | ;; Yankowski <fred@ontosys.com>. | |
105 | ;; | |
106 | ;; Customization of mode hook (Roland Rosenfeld) | |
107 | ;; Fontifies object references much more intelligently | |
108 | ;; Added .inc to filename and Speedbar patterns | |
109 | ;; PEAR coding standards (tabs -> 4 spaces) | |
110 | ;; Fontify ASP-style tag (Fred) | |
111 | ;; Rudimentary coloration of HTML tags (Fred) | |
112 | ;; Buges fixed: | |
113 | ;; Extraneous newline at end of file (Fred) | |
114 | ;; Colored functions within comments | |
115 | ;; Didn't recognize keywords in caps | |
116 | ;; Colored functions as variables when referenced by an object | |
117 | ||
118 | ;; 0.9.6 2001-01-28 | |
119 | ;; Keyboard shortcuts for menu functions (Boris Folgmann) | |
120 | ;; Fixed default regexp for detecting PHP files (Mathias Meyer) | |
121 | ;; Changed PHP3 menu to simply PHP | |
122 | ||
123 | ;; 0.9.5 2001-01-14 | |
124 | ;; Been told that problems with XEmacs are no longer | |
125 | ;; Search documention command actually works | |
126 | ;; Browse manual customization improved | |
127 | ||
128 | ;; 0.9.4 2001-01-08 | |
129 | ;; Search documentation command | |
130 | ;; Browse manual function | |
131 | ;; Simplified file patterns for which to load php-mode | |
132 | ;; PHP awareness in Speedbar | |
133 | ;; Customization options for all of the above | |
134 | ||
135 | ;; 0.9.3 2000-11-12 | |
136 | ;; imenu support for classes and functions (Rex McMaster) | |
137 | ;; Dramatically improved regexps (Kevin Blake) | |
138 | ;; Fix for XEmacs font-lock-pre-idle-hook problem? (Doug Marcey) | |
139 | ;; Progress on PHP3 menu functions (Sean Champ) | |
140 | ;; Added "foreach" to list of keywords (Sean Champ) | |
141 | ;; More file suffixes observed (Vinai Kopp) | |
142 | ||
143 | ;; 0.9.2 2000-03-08 | |
144 | ;; Fixed bug with 1-character identifiers | |
145 | ;; Fixed bug with class declaration coloring | |
146 | ;; Added coloring for true, false, null | |
147 | ;; Officially not supporting XEmacs | |
148 | ||
149 | ;; 0.9.1 2000-02-21 | |
150 | ;; Disabled keywords in XEmacs for compatibility | |
151 | ;; Added usage info to comments | |
152 | ||
153 | ;; 0.9 2000-01-09 | |
154 | ;; Clarified bug with XEmacs (Juanjo) | |
155 | ;; Fixed minor bug with comment highlighting (Juanjo) | |
156 | ;; Syntax parsing from PHP3 lexical scanner (Torsten Martinsen) | |
157 | ;; Highlights function and method names now | |
158 | ;; Highlights "this" as keyword when used as an object in variable names | |
159 | ||
160 | ;; 0.8 1999-05-17 | |
161 | ;; Initial release. | |
162 | ||
163 | ||
164 | ;;; Code: | |
165 | ||
166 | (require 'speedbar) | |
167 | (require 'font-lock) | |
168 | (require 'regexp-opt) | |
169 | (require 'cc-mode) | |
170 | (require 'custom) | |
171 | ||
172 | ;; Local variables | |
173 | (defgroup php nil | |
174 | "Major mode for editing PHP code." | |
175 | :prefix "php-" | |
176 | :group 'languages) | |
177 | ||
178 | (defcustom php-speedbar-config t | |
179 | "*When set to true automatically configures Speedbar to observe PHP files.\ | |
180 | Ignores php-file patterns option; fixed to expression \"\\.\\(inc\\|php[s34]?\\)\"" | |
181 | :type 'boolean | |
182 | :group 'php) | |
183 | ||
184 | (defcustom php-mode-speedbar-open nil | |
185 | "Normally php-mode starts with the speedbar closed.\ | |
186 | Turning this on will open it whenever php-mode is loaded." | |
187 | :type 'boolean | |
188 | :group 'php) | |
189 | ||
190 | (defcustom php-manual-url "http://www.php.net/manual/en/manual.php" | |
191 | "*URL at which to find PHP manual.\ | |
192 | You can replace \"en\" with your ISO language code." | |
193 | :type 'string | |
194 | :group 'php) | |
195 | ||
196 | (defcustom php-search-url "http://www.php.net/" | |
197 | "*URL at which to search for documentation on a word" | |
198 | :type 'string | |
199 | :group 'php) | |
200 | ||
201 | (defcustom php-file-patterns (list "\\.php[s34]?\\'" "\\.phtml\\'" "\\.inc\\'") | |
202 | "*List of file patterns for which to automatically invoke php-mode." | |
203 | :type '(repeat (regexp :tag "Pattern")) | |
204 | :group 'php) | |
205 | ||
206 | (defcustom php-mode-user-hook nil | |
207 | "List of functions to be executed on entry to php-mode" | |
208 | :type 'hook | |
209 | :group 'php) | |
210 | ||
211 | (defcustom php-mode-force-pear nil | |
212 | "Normally PEAR coding rules are enforced only when the filename contains \"PEAR\"\ | |
213 | Turning this on will force PEAR rules on all PHP files." | |
214 | :type 'boolean | |
215 | :group 'php) | |
216 | ||
217 | ;; Note whether we're in XEmacs | |
218 | (defconst xemacsp (string-match "Lucid\\|XEmacs" emacs-version) | |
219 | "Non nil if using XEmacs.") | |
220 | ||
221 | ;;;###autoload | |
222 | (define-derived-mode php-mode c-mode "PHP" | |
223 | "Major mode for editing PHP code.\n\n\\{php-mode-map}" | |
224 | ||
225 | (setq comment-start "// " | |
226 | comment-end "" | |
227 | comment-start-skip "// *") | |
228 | ||
229 | (defvar php-mode-syntax-table php-mode-syntax-table) | |
230 | ;; underscore considered part of word | |
231 | (modify-syntax-entry ?_ "w" php-mode-syntax-table) | |
232 | ;; dollar-sign considered punctuation, not part of word | |
233 | ;; 2002-01-22: I don't remember saying the above so I'm commenting | |
234 | ;; this out because it kills indenting of case lines that begin with $ | |
235 | ;; Let me know if you have a case for keeping it in, preferably | |
236 | ;; along with a solution to the switch indenting problem | |
237 | ; (modify-syntax-entry ?$ "." php-mode-syntax-table) | |
238 | ||
239 | ;; The above causes Xemacs to handle shell-style comments correctly, | |
240 | ;; but fails to work in GNU Emacs which fails to interpret \n as the | |
241 | ;; end of the comment. | |
242 | (if xemacsp (progn | |
243 | (modify-syntax-entry ?# "< b" php-mode-syntax-table) | |
244 | (modify-syntax-entry ?\n "> b" php-mode-syntax-table) | |
245 | )) | |
246 | ||
247 | (make-local-variable 'font-lock-defaults) | |
248 | (setq font-lock-defaults | |
249 | '((php-font-lock-keywords-1 | |
250 | php-font-lock-keywords-2 | |
251 | ;; Comment-out the next line if the font-coloring is too | |
252 | ;; extreme/ugly for you. | |
253 | php-font-lock-keywords-3 | |
254 | ) | |
255 | nil ; KEYWORDS-ONLY | |
256 | T ; CASE-FOLD | |
257 | nil ; SYNTAX-ALIST | |
258 | nil ; SYNTAX-BEGIN | |
259 | (font-lock-syntactic-keywords . php-font-lock-syntactic-keywords))) | |
260 | ||
261 | (setq font-lock-maximum-decoration t | |
262 | case-fold-search t ; PHP vars are case-sensitive | |
263 | imenu-generic-expression cc-imenu-php-generic-expression) | |
264 | ||
265 | ;; Do not force newline at end of file. Such newlines can cause | |
266 | ;; trouble if the PHP file is included in another file before calls | |
267 | ;; to header() or cookie(). | |
268 | (set (make-local-variable 'require-final-newline) nil) | |
269 | (set (make-local-variable 'next-line-add-newlines) nil) | |
270 | ||
271 | ;; PEAR coding standards | |
272 | (make-local-hook 'php-mode-pear-hook) | |
273 | (add-hook 'php-mode-pear-hook | |
274 | (lambda nil (set (make-local-variable 'tab-width) 4)) nil t) | |
275 | (add-hook 'php-mode-pear-hook | |
276 | (lambda nil (set (make-local-variable 'c-basic-offset) 4)) nil t) | |
277 | (add-hook 'php-mode-pear-hook | |
278 | (lambda nil (set (make-local-variable 'c-hanging-comment-ender-p) nil)) nil t) | |
279 | (add-hook 'php-mode-pear-hook | |
280 | (lambda nil (set (make-local-variable 'indent-tabs-mode) nil)) nil t) | |
281 | (add-hook 'php-mode-pear-hook | |
282 | (lambda nil (c-set-offset 'block-open' - )) nil t) | |
283 | (add-hook 'php-mode-pear-hook | |
284 | (lambda nil (c-set-offset 'block-close' 0 )) nil t) | |
285 | ||
286 | (if (or php-mode-force-pear | |
287 | (and (stringp buffer-file-name) | |
288 | (string-match "PEAR\\|pear" | |
289 | (buffer-file-name)) | |
290 | (string-match "\\.php$" (buffer-file-name)))) | |
291 | (run-hooks 'php-mode-pear-hook)) | |
292 | ||
293 | (run-hooks 'php-mode-user-hook) | |
294 | ) | |
295 | ||
296 | ;; Make php-mode the default mode for PHP source code buffers. | |
297 | ;;;###autoload | |
298 | (let ((php-file-patterns-temp php-file-patterns)) | |
299 | (while php-file-patterns-temp | |
300 | (add-to-list 'auto-mode-alist | |
301 | (cons (car php-file-patterns-temp) 'php-mode)) | |
302 | (setq php-file-patterns-temp (cdr php-file-patterns-temp)))) | |
303 | ||
304 | ;; Handle Speedbar | |
305 | (if php-mode-speedbar-open | |
306 | (speedbar 1)) | |
307 | (if (and php-speedbar-config (symbolp 'speedbar)) | |
308 | (speedbar-add-supported-extension "\\.\\(inc\\|php[s34]?\\)")) | |
309 | ||
310 | ;; Make a menu keymap (with a prompt string) | |
311 | ;; and make it the menu bar item's definition. | |
312 | (define-key php-mode-map [menu-bar] (make-sparse-keymap)) | |
313 | (define-key php-mode-map [menu-bar php] | |
314 | (cons "PHP" (make-sparse-keymap "PHP"))) | |
315 | ||
316 | ;; Define specific subcommands in this menu. | |
317 | (define-key php-mode-map [menu-bar php complete-function] | |
318 | '("Complete function name" . php-complete-function)) | |
319 | (define-key php-mode-map | |
320 | [menu-bar php browse-manual] | |
321 | '("Browse manual" . php-browse-manual)) | |
322 | (define-key php-mode-map | |
323 | [menu-bar php search-documentation] | |
324 | '("Search documentation" . php-search-documentation)) | |
325 | ||
326 | ;; Define function name completion function | |
327 | (defun php-complete-function () | |
328 | "Complete the function name at the point from known PHP functions." | |
329 | (interactive) | |
330 | (message "php-complete-function not implemented yet") | |
331 | ;; how to read the list of functions from a separate file? | |
332 | ) | |
333 | ||
334 | ;; Define function documentation function | |
335 | (defun php-search-documentation () | |
336 | "Search PHP documentation for the word at the point." | |
337 | (interactive) | |
338 | (browse-url (concat php-search-url (current-word t))) | |
339 | ) | |
340 | ||
341 | ;; Define function for browsing manual | |
342 | (defun php-browse-manual () | |
343 | "Bring up manual for PHP." | |
344 | (interactive) | |
345 | (browse-url php-manual-url) | |
346 | ) | |
347 | ||
348 | ;; Define shortcut | |
349 | (define-key php-mode-map | |
350 | "\C-c\C-f" | |
351 | 'php-search-documentation) | |
352 | ||
353 | ;; Define shortcut | |
354 | (define-key php-mode-map | |
355 | "\C-c\C-m" | |
356 | 'php-browse-manual) | |
357 | ||
358 | ;; Define abbreviations and their expansions | |
359 | (define-abbrev php-mode-abbrev-table "ex" "extends") | |
360 | (define-abbrev php-mode-abbrev-table "fu" "function") | |
361 | (define-abbrev php-mode-abbrev-table "GL" "GLOBAL") | |
362 | (define-abbrev php-mode-abbrev-table "req" "require(") | |
363 | (define-abbrev php-mode-abbrev-table "ret" "return") | |
364 | ||
365 | (defconst php-constants | |
366 | (eval-when-compile | |
367 | (regexp-opt | |
368 | '(;; core constants | |
369 | "__LINE__" "__FILE__" | |
370 | "PHP_OS" "PHP_VERSION" | |
371 | "TRUE" "FALSE" "NULL" | |
372 | "E_ERROR" "E_NOTICE" "E_PARSE" "E_WARNING" "E_ALL" | |
373 | "E_USER_ERROR" "E_USER_WARNING" "E_USER_NOTICE" | |
374 | "DEFAULT_INCLUDE_PATH" "PEAR_INSTALL_DIR" "PEAR_EXTENSION_DIR" | |
375 | "PHP_BINDIR" "PHP_LIBDIR" "PHP_DATADIR" "PHP_SYSCONFDIR" | |
376 | "PHP_LOCALSTATEDIR" "PHP_CONFIG_FILE_PATH" | |
377 | ||
378 | ;; from ext/standard: | |
379 | "EXTR_OVERWRITE" "EXTR_SKIP" "EXTR_PREFIX_SAME" | |
380 | "EXTR_PREFIX_ALL" "EXTR_PREFIX_INVALID" "SORT_ASC" "SORT_DESC" | |
381 | "SORT_REGULAR" "SORT_NUMERIC" "SORT_STRING" "ASSERT_ACTIVE" | |
382 | "ASSERT_CALLBACK" "ASSERT_BAIL" "ASSERT_WARNING" | |
383 | "ASSERT_QUIET_EVAL" "CONNECTION_ABORTED" "CONNECTION_NORMAL" | |
384 | "CONNECTION_TIMEOUT" "M_E" "M_LOG2E" "M_LOG10E" "M_LN2" | |
385 | "M_LN10" "M_PI" "M_PI_2" "M_PI_4" "M_1_PI" "M_2_PI" | |
386 | "M_2_SQRTPI" "M_SQRT2" "M_SQRT1_2" "CRYPT_SALT_LENGTH" | |
387 | "CRYPT_STD_DES" "CRYPT_EXT_DES" "CRYPT_MD5" "CRYPT_BLOWFISH" | |
388 | "DIRECTORY_SEPARATOR" "SEEK_SET" "SEEK_CUR" "SEEK_END" | |
389 | "LOCK_SH" "LOCK_EX" "LOCK_UN" "LOCK_NB" "HTML_SPECIALCHARS" | |
390 | "HTML_ENTITIES" "ENT_COMPAT" "ENT_QUOTES" "ENT_NOQUOTES" | |
391 | "INFO_GENERAL" "INFO_CREDITS" "INFO_CONFIGURATION" | |
392 | "INFO_ENVIRONMENT" "INFO_VARIABLES" "INFO_LICENSE" "INFO_ALL" | |
393 | "CREDITS_GROUP" "CREDITS_GENERAL" "CREDITS_SAPI" | |
394 | "CREDITS_MODULES" "CREDITS_DOCS" "CREDITS_FULLPAGE" | |
395 | "CREDITS_QA" "CREDITS_ALL" "PHP_OUTPUT_HANDLER_START" | |
396 | "PHP_OUTPUT_HANDLER_CONT" "PHP_OUTPUT_HANDLER_END" | |
397 | "STR_PAD_LEFT" "STR_PAD_RIGHT" "STR_PAD_BOTH" | |
398 | "PATHINFO_DIRNAME" "PATHINFO_BASENAME" "PATHINFO_EXTENSION" | |
399 | "CHAR_MAX" "LC_CTYPE" "LC_NUMERIC" "LC_TIME" "LC_COLLATE" | |
400 | "LC_MONETARY" "LC_ALL" "LC_MESSAGES" "LOG_EMERG" "LOG_ALERT" | |
401 | "LOG_CRIT" "LOG_ERR" "LOG_WARNING" "LOG_NOTICE" "LOG_INFO" | |
402 | "LOG_DEBUG" "LOG_KERN" "LOG_USER" "LOG_MAIL" "LOG_DAEMON" | |
403 | "LOG_AUTH" "LOG_SYSLOG" "LOG_LPR" "LOG_NEWS" "LOG_UUCP" | |
404 | "LOG_CRON" "LOG_AUTHPRIV" "LOG_LOCAL0" "LOG_LOCAL1" | |
405 | "LOG_LOCAL2" "LOG_LOCAL3" "LOG_LOCAL4" "LOG_LOCAL5" | |
406 | "LOG_LOCAL6" "LOG_LOCAL7" "LOG_PID" "LOG_CONS" "LOG_ODELAY" | |
407 | "LOG_NDELAY" "LOG_NOWAIT" "LOG_PERROR" | |
408 | ||
409 | ;; Disabled by default because they slow buffer loading | |
410 | ;; If you have use for them, decomment the strings | |
411 | ;; that you want colored. | |
412 | ;; To compile, you may have to increase 'max-specpdl-size' | |
413 | ||
414 | ;; from other bundled extensions: | |
415 | ; "CAL_EASTER_TO_xxx" "VT_NULL" "VT_EMPTY" "VT_UI1" "VT_I2" | |
416 | ; "VT_I4" "VT_R4" "VT_R8" "VT_BOOL" "VT_ERROR" "VT_CY" "VT_DATE" | |
417 | ; "VT_BSTR" "VT_DECIMAL" "VT_UNKNOWN" "VT_DISPATCH" "VT_VARIANT" | |
418 | ; "VT_I1" "VT_UI2" "VT_UI4" "VT_INT" "VT_UINT" "VT_ARRAY" | |
419 | ; "VT_BYREF" "CP_ACP" "CP_MACCP" "CP_OEMCP" "CP_SYMBOL" | |
420 | ; "CP_THREAD_ACP" "CP_UTF7" "CP_UTF8" "CPDF_PM_NONE" | |
421 | ; "CPDF_PM_OUTLINES" "CPDF_PM_THUMBS" "CPDF_PM_FULLSCREEN" | |
422 | ; "CPDF_PL_SINGLE" "CPDF_PL_1COLUMN" "CPDF_PL_2LCOLUMN" | |
423 | ; "CPDF_PL_2RCOLUMN" "CURLOPT_PORT" "CURLOPT_FILE" | |
424 | ; "CURLOPT_INFILE" "CURLOPT_INFILESIZE" "CURLOPT_URL" | |
425 | ; "CURLOPT_PROXY" "CURLOPT_VERBOSE" "CURLOPT_HEADER" | |
426 | ; "CURLOPT_HTTPHEADER" "CURLOPT_NOPROGRESS" "CURLOPT_NOBODY" | |
427 | ; "CURLOPT_FAILONERROR" "CURLOPT_UPLOAD" "CURLOPT_POST" | |
428 | ; "CURLOPT_FTPLISTONLY" "CURLOPT_FTPAPPEND" "CURLOPT_NETRC" | |
429 | ; "CURLOPT_FOLLOWLOCATION" "CURLOPT_FTPASCII" "CURLOPT_PUT" | |
430 | ; "CURLOPT_MUTE" "CURLOPT_USERPWD" "CURLOPT_PROXYUSERPWD" | |
431 | ; "CURLOPT_RANGE" "CURLOPT_TIMEOUT" "CURLOPT_POSTFIELDS" | |
432 | ; "CURLOPT_REFERER" "CURLOPT_USERAGENT" "CURLOPT_FTPPORT" | |
433 | ; "CURLOPT_LOW_SPEED_LIMIT" "CURLOPT_LOW_SPEED_TIME" | |
434 | ; "CURLOPT_RESUME_FROM" "CURLOPT_COOKIE" "CURLOPT_SSLCERT" | |
435 | ; "CURLOPT_SSLCERTPASSWD" "CURLOPT_WRITEHEADER" | |
436 | ; "CURLOPT_COOKIEFILE" "CURLOPT_SSLVERSION" | |
437 | ; "CURLOPT_TIMECONDITION" "CURLOPT_TIMEVALUE" | |
438 | ; "CURLOPT_CUSTOMREQUEST" "CURLOPT_STDERR" "CURLOPT_TRANSFERTEXT" | |
439 | ; "CURLOPT_RETURNTRANSFER" "CURLOPT_QUOTE" "CURLOPT_POSTQUOTE" | |
440 | ; "CURLOPT_INTERFACE" "CURLOPT_KRB4LEVEL" | |
441 | ; "CURLOPT_HTTPPROXYTUNNEL" "CURLOPT_FILETIME" | |
442 | ; "CURLOPT_WRITEFUNCTION" "CURLOPT_READFUNCTION" | |
443 | ; "CURLOPT_PASSWDFUNCTION" "CURLOPT_HEADERFUNCTION" | |
444 | ; "CURLOPT_MAXREDIRS" "CURLOPT_MAXCONNECTS" "CURLOPT_CLOSEPOLICY" | |
445 | ; "CURLOPT_FRESH_CONNECT" "CURLOPT_FORBID_REUSE" | |
446 | ; "CURLOPT_RANDOM_FILE" "CURLOPT_EGDSOCKET" | |
447 | ; "CURLOPT_CONNECTTIMEOUT" "CURLOPT_SSL_VERIFYPEER" | |
448 | ; "CURLOPT_CAINFO" "CURLOPT_BINARYTRANSER" | |
449 | ; "CURLCLOSEPOLICY_LEAST_RECENTLY_USED" "CURLCLOSEPOLICY_OLDEST" | |
450 | ; "CURLINFO_EFFECTIVE_URL" "CURLINFO_HTTP_CODE" | |
451 | ; "CURLINFO_HEADER_SIZE" "CURLINFO_REQUEST_SIZE" | |
452 | ; "CURLINFO_TOTAL_TIME" "CURLINFO_NAMELOOKUP_TIME" | |
453 | ; "CURLINFO_CONNECT_TIME" "CURLINFO_PRETRANSFER_TIME" | |
454 | ; "CURLINFO_SIZE_UPLOAD" "CURLINFO_SIZE_DOWNLOAD" | |
455 | ; "CURLINFO_SPEED_DOWNLOAD" "CURLINFO_SPEED_UPLOAD" | |
456 | ; "CURLINFO_FILETIME" "CURLE_OK" "CURLE_UNSUPPORTED_PROTOCOL" | |
457 | ; "CURLE_FAILED_INIT" "CURLE_URL_MALFORMAT" | |
458 | ; "CURLE_URL_MALFORMAT_USER" "CURLE_COULDNT_RESOLVE_PROXY" | |
459 | ; "CURLE_COULDNT_RESOLVE_HOST" "CURLE_COULDNT_CONNECT" | |
460 | ; "CURLE_FTP_WEIRD_SERVER_REPLY" "CURLE_FTP_ACCESS_DENIED" | |
461 | ; "CURLE_FTP_USER_PASSWORD_INCORRECT" | |
462 | ; "CURLE_FTP_WEIRD_PASS_REPLY" "CURLE_FTP_WEIRD_USER_REPLY" | |
463 | ; "CURLE_FTP_WEIRD_PASV_REPLY" "CURLE_FTP_WEIRD_227_FORMAT" | |
464 | ; "CURLE_FTP_CANT_GET_HOST" "CURLE_FTP_CANT_RECONNECT" | |
465 | ; "CURLE_FTP_COULDNT_SET_BINARY" "CURLE_PARTIAL_FILE" | |
466 | ; "CURLE_FTP_COULDNT_RETR_FILE" "CURLE_FTP_WRITE_ERROR" | |
467 | ; "CURLE_FTP_QUOTE_ERROR" "CURLE_HTTP_NOT_FOUND" | |
468 | ; "CURLE_WRITE_ERROR" "CURLE_MALFORMAT_USER" | |
469 | ; "CURLE_FTP_COULDNT_STOR_FILE" "CURLE_READ_ERROR" | |
470 | ; "CURLE_OUT_OF_MEMORY" "CURLE_OPERATION_TIMEOUTED" | |
471 | ; "CURLE_FTP_COULDNT_SET_ASCII" "CURLE_FTP_PORT_FAILED" | |
472 | ; "CURLE_FTP_COULDNT_USE_REST" "CURLE_FTP_COULDNT_GET_SIZE" | |
473 | ; "CURLE_HTTP_RANGE_ERROR" "CURLE_HTTP_POST_ERROR" | |
474 | ; "CURLE_SSL_CONNECT_ERROR" "CURLE_FTP_BAD_DOWNLOAD_RESUME" | |
475 | ; "CURLE_FILE_COULDNT_READ_FILE" "CURLE_LDAP_CANNOT_BIND" | |
476 | ; "CURLE_LDAP_SEARCH_FAILED" "CURLE_LIBRARY_NOT_FOUND" | |
477 | ; "CURLE_FUNCTION_NOT_FOUND" "CURLE_ABORTED_BY_CALLBACK" | |
478 | ; "CURLE_BAD_FUNCTION_ARGUMENT" "CURLE_BAD_CALLING_ORDER" | |
479 | ; "CURLE_HTTP_PORT_FAILED" "CURLE_BAD_PASSWORD_ENTERED" | |
480 | ; "CURLE_TOO_MANY_REDIRECTS" "CURLE_UNKOWN_TELNET_OPTION" | |
481 | ; "CURLE_TELNET_OPTION_SYNTAX" "CURLE_ALREADY_COMPLETE" | |
482 | ; "DBX_MYSQL" "DBX_ODBC" "DBX_PGSQL" "DBX_MSSQL" "DBX_PERSISTENT" | |
483 | ; "DBX_RESULT_INFO" "DBX_RESULT_INDEX" "DBX_RESULT_ASSOC" | |
484 | ; "DBX_CMP_TEXT" "DBX_CMP_NUMBER" "XML_ELEMENT_NODE" | |
485 | ; "XML_ATTRIBUTE_NODE" "XML_TEXT_NODE" "XML_CDATA_SECTION_NODE" | |
486 | ; "XML_ENTITY_REF_NODE" "XML_ENTITY_NODE" "XML_PI_NODE" | |
487 | ; "XML_COMMENT_NODE" "XML_DOCUMENT_NODE" "XML_DOCUMENT_TYPE_NODE" | |
488 | ; "XML_DOCUMENT_FRAG_NODE" "XML_NOTATION_NODE" | |
489 | ; "XML_HTML_DOCUMENT_NODE" "XML_DTD_NODE" "XML_ELEMENT_DECL_NODE" | |
490 | ; "XML_ATTRIBUTE_DECL_NODE" "XML_ENTITY_DECL_NODE" | |
491 | ; "XML_NAMESPACE_DECL_NODE" "XML_GLOBAL_NAMESPACE" | |
492 | ; "XML_LOCAL_NAMESPACE" "XML_ATTRIBUTE_CDATA" "XML_ATTRIBUTE_ID" | |
493 | ; "XML_ATTRIBUTE_IDREF" "XML_ATTRIBUTE_IDREFS" | |
494 | ; "XML_ATTRIBUTE_ENTITY" "XML_ATTRIBUTE_NMTOKEN" | |
495 | ; "XML_ATTRIBUTE_NMTOKENS" "XML_ATTRIBUTE_ENUMERATION" | |
496 | ; "XML_ATTRIBUTE_NOTATION" "XPATH_UNDEFINED" "XPATH_NODESET" | |
497 | ; "XPATH_BOOLEAN" "XPATH_NUMBER" "XPATH_STRING" "XPATH_POINT" | |
498 | ; "XPATH_RANGE" "XPATH_LOCATIONSET" "XPATH_USERS" "FBSQL_ASSOC" | |
499 | ; "FBSQL_NUM" "FBSQL_BOTH" "FDFValue" "FDFStatus" "FDFFile" | |
500 | ; "FDFID" "FDFFf" "FDFSetFf" "FDFClearFf" "FDFFlags" "FDFSetF" | |
501 | ; "FDFClrF" "FDFAP" "FDFAS" "FDFAction" "FDFAA" "FDFAPRef" | |
502 | ; "FDFIF" "FDFEnter" "FDFExit" "FDFDown" "FDFUp" "FDFFormat" | |
503 | ; "FDFValidate" "FDFKeystroke" "FDFCalculate" | |
504 | ; "FRIBIDI_CHARSET_UTF8" "FRIBIDI_CHARSET_8859_6" | |
505 | ; "FRIBIDI_CHARSET_8859_8" "FRIBIDI_CHARSET_CP1255" | |
506 | ; "FRIBIDI_CHARSET_CP1256" "FRIBIDI_CHARSET_ISIRI_3342" | |
507 | ; "FTP_ASCII" "FTP_BINARY" "FTP_IMAGE" "FTP_TEXT" "IMG_GIF" | |
508 | ; "IMG_JPG" "IMG_JPEG" "IMG_PNG" "IMG_WBMP" "IMG_COLOR_TILED" | |
509 | ; "IMG_COLOR_STYLED" "IMG_COLOR_BRUSHED" | |
510 | ; "IMG_COLOR_STYLEDBRUSHED" "IMG_COLOR_TRANSPARENT" | |
511 | ; "IMG_ARC_ROUNDED" "IMG_ARC_PIE" "IMG_ARC_CHORD" | |
512 | ; "IMG_ARC_NOFILL" "IMG_ARC_EDGED" "GMP_ROUND_ZERO" | |
513 | ; "GMP_ROUND_PLUSINF" "GMP_ROUND_MINUSINF" "HW_ATTR_LANG" | |
514 | ; "HW_ATTR_NR" "HW_ATTR_NONE" "IIS_READ" "IIS_WRITE" | |
515 | ; "IIS_EXECUTE" "IIS_SCRIPT" "IIS_ANONYMOUS" "IIS_BASIC" | |
516 | ; "IIS_NTLM" "NIL" "OP_DEBUG" "OP_READONLY" "OP_ANONYMOUS" | |
517 | ; "OP_SHORTCACHE" "OP_SILENT" "OP_PROTOTYPE" "OP_HALFOPEN" | |
518 | ; "OP_EXPUNGE" "OP_SECURE" "CL_EXPUNGE" "FT_UID" "FT_PEEK" | |
519 | ; "FT_NOT" "FT_INTERNAL" "FT_PREFETCHTEXT" "ST_UID" "ST_SILENT" | |
520 | ; "ST_SET" "CP_UID" "CP_MOVE" "SE_UID" "SE_FREE" "SE_NOPREFETCH" | |
521 | ; "SO_FREE" "SO_NOSERVER" "SA_MESSAGES" "SA_RECENT" "SA_UNSEEN" | |
522 | ; "SA_UIDNEXT" "SA_UIDVALIDITY" "SA_ALL" "LATT_NOINFERIORS" | |
523 | ; "LATT_NOSELECT" "LATT_MARKED" "LATT_UNMARKED" "SORTDATE" | |
524 | ; "SORTARRIVAL" "SORTFROM" "SORTSUBJECT" "SORTTO" "SORTCC" | |
525 | ; "SORTSIZE" "TYPETEXT" "TYPEMULTIPART" "TYPEMESSAGE" | |
526 | ; "TYPEAPPLICATION" "TYPEAUDIO" "TYPEIMAGE" "TYPEVIDEO" | |
527 | ; "TYPEOTHER" "ENC7BIT" "ENC8BIT" "ENCBINARY" "ENCBASE64" | |
528 | ; "ENCQUOTEDPRINTABLE" "ENCOTHER" "INGRES_ASSOC" "INGRES_NUM" | |
529 | ; "INGRES_BOTH" "IBASE_DEFAULT" "IBASE_TEXT" "IBASE_UNIXTIME" | |
530 | ; "IBASE_READ" "IBASE_COMMITTED" "IBASE_CONSISTENCY" | |
531 | ; "IBASE_NOWAIT" "IBASE_TIMESTAMP" "IBASE_DATE" "IBASE_TIME" | |
532 | ; "LDAP_DEREF_NEVER" "LDAP_DEREF_SEARCHING" "LDAP_DEREF_FINDING" | |
533 | ; "LDAP_DEREF_ALWAYS" "LDAP_OPT_DEREF" "LDAP_OPT_SIZELIMIT" | |
534 | ; "LDAP_OPT_TIMELIMIT" "LDAP_OPT_PROTOCOL_VERSION" | |
535 | ; "LDAP_OPT_ERROR_NUMBER" "LDAP_OPT_REFERRALS" "LDAP_OPT_RESTART" | |
536 | ; "LDAP_OPT_HOST_NAME" "LDAP_OPT_ERROR_STRING" | |
537 | ; "LDAP_OPT_MATCHED_DN" "LDAP_OPT_SERVER_CONTROLS" | |
538 | ; "LDAP_OPT_CLIENT_CONTROLS" "GSLC_SSL_NO_AUTH" | |
539 | ; "GSLC_SSL_ONEWAY_AUTH" "GSLC_SSL_TWOWAY_AUTH" "MCAL_SUNDAY" | |
540 | ; "MCAL_MONDAY" "MCAL_TUESDAY" "MCAL_WEDNESDAY" "MCAL_THURSDAY" | |
541 | ; "MCAL_FRIDAY" "MCAL_SATURDAY" "MCAL_JANUARY" "MCAL_FEBRUARY" | |
542 | ; "MCAL_MARCH" "MCAL_APRIL" "MCAL_MAY" "MCAL_JUNE" "MCAL_JULY" | |
543 | ; "MCAL_AUGUST" "MCAL_SEPTEMBER" "MCAL_OCTOBER" "MCAL_NOVEMBER" | |
544 | ; "MCAL_RECUR_NONE" "MCAL_RECUR_DAILY" "MCAL_RECUR_WEEKLY" | |
545 | ; "MCAL_RECUR_MONTHLY_MDAY" "MCAL_RECUR_MONTHLY_WDAY" | |
546 | ; "MCAL_RECUR_YEARLY" "MCAL_M_SUNDAY" "MCAL_M_MONDAY" | |
547 | ; "MCAL_M_TUESDAY" "MCAL_M_WEDNESDAY" "MCAL_M_THURSDAY" | |
548 | ; "MCAL_M_FRIDAY" "MCAL_M_SATURDAY" "MCAL_M_WEEKDAYS" | |
549 | ; "MCAL_M_WEEKEND" "MCAL_M_ALLDAYS" "MCRYPT_" "MCRYPT_" | |
550 | ; "MCRYPT_ENCRYPT" "MCRYPT_DECRYPT" "MCRYPT_DEV_RANDOM" | |
551 | ; "MCRYPT_DEV_URANDOM" "MCRYPT_RAND" "SWFBUTTON_HIT" | |
552 | ; "SWFBUTTON_DOWN" "SWFBUTTON_OVER" "SWFBUTTON_UP" | |
553 | ; "SWFBUTTON_MOUSEUPOUTSIDE" "SWFBUTTON_DRAGOVER" | |
554 | ; "SWFBUTTON_DRAGOUT" "SWFBUTTON_MOUSEUP" "SWFBUTTON_MOUSEDOWN" | |
555 | ; "SWFBUTTON_MOUSEOUT" "SWFBUTTON_MOUSEOVER" | |
556 | ; "SWFFILL_RADIAL_GRADIENT" "SWFFILL_LINEAR_GRADIENT" | |
557 | ; "SWFFILL_TILED_BITMAP" "SWFFILL_CLIPPED_BITMAP" | |
558 | ; "SWFTEXTFIELD_HASLENGTH" "SWFTEXTFIELD_NOEDIT" | |
559 | ; "SWFTEXTFIELD_PASSWORD" "SWFTEXTFIELD_MULTILINE" | |
560 | ; "SWFTEXTFIELD_WORDWRAP" "SWFTEXTFIELD_DRAWBOX" | |
561 | ; "SWFTEXTFIELD_NOSELECT" "SWFTEXTFIELD_HTML" | |
562 | ; "SWFTEXTFIELD_ALIGN_LEFT" "SWFTEXTFIELD_ALIGN_RIGHT" | |
563 | ; "SWFTEXTFIELD_ALIGN_CENTER" "SWFTEXTFIELD_ALIGN_JUSTIFY" | |
564 | ; "UDM_FIELD_URLID" "UDM_FIELD_URL" "UDM_FIELD_CONTENT" | |
565 | ; "UDM_FIELD_TITLE" "UDM_FIELD_KEYWORDS" "UDM_FIELD_DESC" | |
566 | ; "UDM_FIELD_DESCRIPTION" "UDM_FIELD_TEXT" "UDM_FIELD_SIZE" | |
567 | ; "UDM_FIELD_RATING" "UDM_FIELD_SCORE" "UDM_FIELD_MODIFIED" | |
568 | ; "UDM_FIELD_ORDER" "UDM_FIELD_CRC" "UDM_FIELD_CATEGORY" | |
569 | ; "UDM_PARAM_PAGE_SIZE" "UDM_PARAM_PAGE_NUM" | |
570 | ; "UDM_PARAM_SEARCH_MODE" "UDM_PARAM_CACHE_MODE" | |
571 | ; "UDM_PARAM_TRACK_MODE" "UDM_PARAM_PHRASE_MODE" | |
572 | ; "UDM_PARAM_CHARSET" "UDM_PARAM_STOPTABLE" | |
573 | ; "UDM_PARAM_STOP_TABLE" "UDM_PARAM_STOPFILE" | |
574 | ; "UDM_PARAM_STOP_FILE" "UDM_PARAM_WEIGHT_FACTOR" | |
575 | ; "UDM_PARAM_WORD_MATCH" "UDM_PARAM_MAX_WORD_LEN" | |
576 | ; "UDM_PARAM_MAX_WORDLEN" "UDM_PARAM_MIN_WORD_LEN" | |
577 | ; "UDM_PARAM_MIN_WORDLEN" "UDM_PARAM_ISPELL_PREFIXES" | |
578 | ; "UDM_PARAM_ISPELL_PREFIX" "UDM_PARAM_PREFIXES" | |
579 | ; "UDM_PARAM_PREFIX" "UDM_PARAM_CROSS_WORDS" | |
580 | ; "UDM_PARAM_CROSSWORDS" "UDM_LIMIT_CAT" "UDM_LIMIT_URL" | |
581 | ; "UDM_LIMIT_TAG" "UDM_LIMIT_LANG" "UDM_LIMIT_DATE" | |
582 | ; "UDM_PARAM_FOUND" "UDM_PARAM_NUM_ROWS" "UDM_PARAM_WORDINFO" | |
583 | ; "UDM_PARAM_WORD_INFO" "UDM_PARAM_SEARCHTIME" | |
584 | ; "UDM_PARAM_SEARCH_TIME" "UDM_PARAM_FIRST_DOC" | |
585 | ; "UDM_PARAM_LAST_DOC" "UDM_MODE_ALL" "UDM_MODE_ANY" | |
586 | ; "UDM_MODE_BOOL" "UDM_MODE_PHRASE" "UDM_CACHE_ENABLED" | |
587 | ; "UDM_CACHE_DISABLED" "UDM_TRACK_ENABLED" "UDM_TRACK_DISABLED" | |
588 | ; "UDM_PHRASE_ENABLED" "UDM_PHRASE_DISABLED" | |
589 | ; "UDM_CROSS_WORDS_ENABLED" "UDM_CROSSWORDS_ENABLED" | |
590 | ; "UDM_CROSS_WORDS_DISABLED" "UDM_CROSSWORDS_DISABLED" | |
591 | ; "UDM_PREFIXES_ENABLED" "UDM_PREFIX_ENABLED" | |
592 | ; "UDM_ISPELL_PREFIXES_ENABLED" "UDM_ISPELL_PREFIX_ENABLED" | |
593 | ; "UDM_PREFIXES_DISABLED" "UDM_PREFIX_DISABLED" | |
594 | ; "UDM_ISPELL_PREFIXES_DISABLED" "UDM_ISPELL_PREFIX_DISABLED" | |
595 | ; "UDM_ISPELL_TYPE_AFFIX" "UDM_ISPELL_TYPE_SPELL" | |
596 | ; "UDM_ISPELL_TYPE_DB" "UDM_ISPELL_TYPE_SERVER" "UDM_MATCH_WORD" | |
597 | ; "UDM_MATCH_BEGIN" "UDM_MATCH_SUBSTR" "UDM_MATCH_END" | |
598 | ; "MSQL_ASSOC" "MSQL_NUM" "MSQL_BOTH" "MYSQL_ASSOC" "MYSQL_NUM" | |
599 | ; "MYSQL_BOTH" "MYSQL_USE_RESULT" "MYSQL_STORE_RESULT" | |
600 | ; "OCI_DEFAULT" "OCI_DESCRIBE_ONLY" "OCI_COMMIT_ON_SUCCESS" | |
601 | ; "OCI_EXACT_FETCH" "SQLT_BFILEE" "SQLT_CFILEE" "SQLT_CLOB" | |
602 | ; "SQLT_BLOB" "SQLT_RDD" "OCI_B_SQLT_NTY" "OCI_SYSDATE" | |
603 | ; "OCI_B_BFILE" "OCI_B_CFILEE" "OCI_B_CLOB" "OCI_B_BLOB" | |
604 | ; "OCI_B_ROWID" "OCI_B_CURSOR" "OCI_B_BIN" "OCI_ASSOC" "OCI_NUM" | |
605 | ; "OCI_BOTH" "OCI_RETURN_NULLS" "OCI_RETURN_LOBS" | |
606 | ; "OCI_DTYPE_FILE" "OCI_DTYPE_LOB" "OCI_DTYPE_ROWID" "OCI_D_FILE" | |
607 | ; "OCI_D_LOB" "OCI_D_ROWID" "ODBC_TYPE" "ODBC_BINMODE_PASSTHRU" | |
608 | ; "ODBC_BINMODE_RETURN" "ODBC_BINMODE_CONVERT" "SQL_ODBC_CURSORS" | |
609 | ; "SQL_CUR_USE_DRIVER" "SQL_CUR_USE_IF_NEEDED" "SQL_CUR_USE_ODBC" | |
610 | ; "SQL_CONCURRENCY" "SQL_CONCUR_READ_ONLY" "SQL_CONCUR_LOCK" | |
611 | ; "SQL_CONCUR_ROWVER" "SQL_CONCUR_VALUES" "SQL_CURSOR_TYPE" | |
612 | ; "SQL_CURSOR_FORWARD_ONLY" "SQL_CURSOR_KEYSET_DRIVEN" | |
613 | ; "SQL_CURSOR_DYNAMIC" "SQL_CURSOR_STATIC" "SQL_KEYSET_SIZE" | |
614 | ; "SQL_CHAR" "SQL_VARCHAR" "SQL_LONGVARCHAR" "SQL_DECIMAL" | |
615 | ; "SQL_NUMERIC" "SQL_BIT" "SQL_TINYINT" "SQL_SMALLINT" | |
616 | ; "SQL_INTEGER" "SQL_BIGINT" "SQL_REAL" "SQL_FLOAT" "SQL_DOUBLE" | |
617 | ; "SQL_BINARY" "SQL_VARBINARY" "SQL_LONGVARBINARY" "SQL_DATE" | |
618 | ; "SQL_TIME" "SQL_TIMESTAMP" "SQL_TYPE_DATE" "SQL_TYPE_TIME" | |
619 | ; "SQL_TYPE_TIMESTAMP" "SQL_BEST_ROWID" "SQL_ROWVER" | |
620 | ; "SQL_SCOPE_CURROW" "SQL_SCOPE_TRANSACTION" "SQL_SCOPE_SESSION" | |
621 | ; "SQL_NO_NULLS" "SQL_NULLABLE" "SQL_INDEX_UNIQUE" | |
622 | ; "SQL_INDEX_ALL" "SQL_ENSURE" "SQL_QUICK" | |
623 | ; "X509_PURPOSE_SSL_CLIENT" "X509_PURPOSE_SSL_SERVER" | |
624 | ; "X509_PURPOSE_NS_SSL_SERVER" "X509_PURPOSE_SMIME_SIGN" | |
625 | ; "X509_PURPOSE_SMIME_ENCRYPT" "X509_PURPOSE_CRL_SIGN" | |
626 | ; "X509_PURPOSE_ANY" "PKCS7_DETACHED" "PKCS7_TEXT" | |
627 | ; "PKCS7_NOINTERN" "PKCS7_NOVERIFY" "PKCS7_NOCHAIN" | |
628 | ; "PKCS7_NOCERTS" "PKCS7_NOATTR" "PKCS7_BINARY" "PKCS7_NOSIGS" | |
629 | ; "OPENSSL_PKCS1_PADDING" "OPENSSL_SSLV23_PADDING" | |
630 | ; "OPENSSL_NO_PADDING" "OPENSSL_PKCS1_OAEP_PADDING" | |
631 | ; "ORA_BIND_INOUT" "ORA_BIND_IN" "ORA_BIND_OUT" | |
632 | ; "ORA_FETCHINTO_ASSOC" "ORA_FETCHINTO_NULLS" | |
633 | ; "PREG_PATTERN_ORDER" "PREG_SET_ORDER" "PREG_SPLIT_NO_EMPTY" | |
634 | ; "PREG_SPLIT_DELIM_CAPTURE" "PGSQL_ASSOC" "PGSQL_NUM" | |
635 | ; "PGSQL_BOTH" "PRINTER_COPIES" "PRINTER_MODE" "PRINTER_TITLE" | |
636 | ; "PRINTER_DEVICENAME" "PRINTER_DRIVERVERSION" | |
637 | ; "PRINTER_RESOLUTION_Y" "PRINTER_RESOLUTION_X" "PRINTER_SCALE" | |
638 | ; "PRINTER_BACKGROUND_COLOR" "PRINTER_PAPER_LENGTH" | |
639 | ; "PRINTER_PAPER_WIDTH" "PRINTER_PAPER_FORMAT" | |
640 | ; "PRINTER_FORMAT_CUSTOM" "PRINTER_FORMAT_LETTER" | |
641 | ; "PRINTER_FORMAT_LEGAL" "PRINTER_FORMAT_A3" "PRINTER_FORMAT_A4" | |
642 | ; "PRINTER_FORMAT_A5" "PRINTER_FORMAT_B4" "PRINTER_FORMAT_B5" | |
643 | ; "PRINTER_FORMAT_FOLIO" "PRINTER_ORIENTATION" | |
644 | ; "PRINTER_ORIENTATION_PORTRAIT" "PRINTER_ORIENTATION_LANDSCAPE" | |
645 | ; "PRINTER_TEXT_COLOR" "PRINTER_TEXT_ALIGN" "PRINTER_TA_BASELINE" | |
646 | ; "PRINTER_TA_BOTTOM" "PRINTER_TA_TOP" "PRINTER_TA_CENTER" | |
647 | ; "PRINTER_TA_LEFT" "PRINTER_TA_RIGHT" "PRINTER_PEN_SOLID" | |
648 | ; "PRINTER_PEN_DASH" "PRINTER_PEN_DOT" "PRINTER_PEN_DASHDOT" | |
649 | ; "PRINTER_PEN_DASHDOTDOT" "PRINTER_PEN_INVISIBLE" | |
650 | ; "PRINTER_BRUSH_SOLID" "PRINTER_BRUSH_CUSTOM" | |
651 | ; "PRINTER_BRUSH_DIAGONAL" "PRINTER_BRUSH_CROSS" | |
652 | ; "PRINTER_BRUSH_DIAGCROSS" "PRINTER_BRUSH_FDIAGONAL" | |
653 | ; "PRINTER_BRUSH_HORIZONTAL" "PRINTER_BRUSH_VERTICAL" | |
654 | ; "PRINTER_FW_THIN" "PRINTER_FW_ULTRALIGHT" "PRINTER_FW_LIGHT" | |
655 | ; "PRINTER_FW_NORMAL" "PRINTER_FW_MEDIUM" "PRINTER_FW_BOLD" | |
656 | ; "PRINTER_FW_ULTRABOLD" "PRINTER_FW_HEAVY" "PRINTER_ENUM_LOCAL" | |
657 | ; "PRINTER_ENUM_NAME" "PRINTER_ENUM_SHARED" | |
658 | ; "PRINTER_ENUM_DEFAULT" "PRINTER_ENUM_CONNECTIONS" | |
659 | ; "PRINTER_ENUM_NETWORK" "PRINTER_ENUM_REMOTE" "PSPELL_FAST" | |
660 | ; "PSPELL_NORMAL" "PSPELL_BAD_SPELLERS" "PSPELL_RUN_TOGETHER" | |
661 | ; "SID" "SID" "AF_UNIX" "AF_INET" "SOCK_STREAM" "SOCK_DGRAM" | |
662 | ; "SOCK_RAW" "SOCK_SEQPACKET" "SOCK_RDM" "MSG_OOB" "MSG_WAITALL" | |
663 | ; "MSG_PEEK" "MSG_DONTROUTE" "SO_DEBUG" "SO_REUSEADDR" | |
664 | ; "SO_KEEPALIVE" "SO_DONTROUTE" "SO_LINGER" "SO_BROADCAST" | |
665 | ; "SO_OOBINLINE" "SO_SNDBUF" "SO_RCVBUF" "SO_SNDLOWAT" | |
666 | ; "SO_RCVLOWAT" "SO_SNDTIMEO" "SO_RCVTIMEO" "SO_TYPE" "SO_ERROR" | |
667 | ; "SOL_SOCKET" "PHP_NORMAL_READ" "PHP_BINARY_READ" | |
668 | ; "PHP_SYSTEM_READ" "SOL_TCP" "SOL_UDP" "MOD_COLOR" "MOD_MATRIX" | |
669 | ; "TYPE_PUSHBUTTON" "TYPE_MENUBUTTON" "BSHitTest" "BSDown" | |
670 | ; "BSOver" "BSUp" "OverDowntoIdle" "IdletoOverDown" | |
671 | ; "OutDowntoIdle" "OutDowntoOverDown" "OverDowntoOutDown" | |
672 | ; "OverUptoOverDown" "OverUptoIdle" "IdletoOverUp" "ButtonEnter" | |
673 | ; "ButtonExit" "MenuEnter" "MenuExit" "XML_ERROR_NONE" | |
674 | ; "XML_ERROR_NO_MEMORY" "XML_ERROR_SYNTAX" | |
675 | ; "XML_ERROR_NO_ELEMENTS" "XML_ERROR_INVALID_TOKEN" | |
676 | ; "XML_ERROR_UNCLOSED_TOKEN" "XML_ERROR_PARTIAL_CHAR" | |
677 | ; "XML_ERROR_TAG_MISMATCH" "XML_ERROR_DUPLICATE_ATTRIBUTE" | |
678 | ; "XML_ERROR_JUNK_AFTER_DOC_ELEMENT" "XML_ERROR_PARAM_ENTITY_REF" | |
679 | ; "XML_ERROR_UNDEFINED_ENTITY" "XML_ERROR_RECURSIVE_ENTITY_REF" | |
680 | ; "XML_ERROR_ASYNC_ENTITY" "XML_ERROR_BAD_CHAR_REF" | |
681 | ; "XML_ERROR_BINARY_ENTITY_REF" | |
682 | ; "XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF" | |
683 | ; "XML_ERROR_MISPLACED_XML_PI" "XML_ERROR_UNKNOWN_ENCODING" | |
684 | ; "XML_ERROR_INCORRECT_ENCODING" | |
685 | ; "XML_ERROR_UNCLOSED_CDATA_SECTION" | |
686 | ; "XML_ERROR_EXTERNAL_ENTITY_HANDLING" "XML_OPTION_CASE_FOLDING" | |
687 | ; "XML_OPTION_TARGET_ENCODING" "XML_OPTION_SKIP_TAGSTART" | |
688 | ; "XML_OPTION_SKIP_WHITE" "YPERR_BADARGS" "YPERR_BADDB" | |
689 | ; "YPERR_BUSY" "YPERR_DOMAIN" "YPERR_KEY" "YPERR_MAP" | |
690 | ; "YPERR_NODOM" "YPERR_NOMORE" "YPERR_PMAP" "YPERR_RESRC" | |
691 | ; "YPERR_RPC" "YPERR_YPBIND" "YPERR_YPERR" "YPERR_YPSERV" | |
692 | ; "YPERR_VERS" "FORCE_GZIP" "FORCE_DEFLATE" | |
693 | ||
694 | ;; PEAR constants | |
695 | ; "PEAR_ERROR_RETURN" "PEAR_ERROR_PRINT" "PEAR_ERROR_TRIGGER" | |
696 | ; "PEAR_ERROR_DIE" "PEAR_ERROR_CALLBACK" "OS_WINDOWS" "OS_UNIX" | |
697 | ; "PEAR_OS" "DB_OK" "DB_ERROR" "DB_ERROR_SYNTAX" | |
698 | ; "DB_ERROR_CONSTRAINT" "DB_ERROR_NOT_FOUND" | |
699 | ; "DB_ERROR_ALREADY_EXISTS" "DB_ERROR_UNSUPPORTED" | |
700 | ; "DB_ERROR_MISMATCH" "DB_ERROR_INVALID" "DB_ERROR_NOT_CAPABLE" | |
701 | ; "DB_ERROR_TRUNCATED" "DB_ERROR_INVALID_NUMBER" | |
702 | ; "DB_ERROR_INVALID_DATE" "DB_ERROR_DIVZERO" | |
703 | ; "DB_ERROR_NODBSELECTED" "DB_ERROR_CANNOT_CREATE" | |
704 | ; "DB_ERROR_CANNOT_DELETE" "DB_ERROR_CANNOT_DROP" | |
705 | ; "DB_ERROR_NOSUCHTABLE" "DB_ERROR_NOSUCHFIELD" | |
706 | ; "DB_ERROR_NEED_MORE_DATA" "DB_ERROR_NOT_LOCKED" | |
707 | ; "DB_ERROR_VALUE_COUNT_ON_ROW" "DB_ERROR_INVALID_DSN" | |
708 | ; "DB_ERROR_CONNECT_FAILED" "DB_WARNING" "DB_WARNING_READ_ONLY" | |
709 | ; "DB_PARAM_SCALAR" "DB_PARAM_OPAQUE" "DB_BINMODE_PASSTHRU" | |
710 | ; "DB_BINMODE_RETURN" "DB_BINMODE_CONVERT" "DB_FETCHMODE_DEFAULT" | |
711 | ; "DB_FETCHMODE_ORDERED" "DB_FETCHMODE_ASSOC" | |
712 | ; "DB_FETCHMODE_FLIPPED" "DB_GETMODE_ORDERED" "DB_GETMODE_ASSOC" | |
713 | ; "DB_GETMODE_FLIPPED" "DB_TABLEINFO_ORDER" | |
714 | ; "DB_TABLEINFO_ORDERTABLE" "DB_TABLEINFO_FULL" | |
715 | ||
716 | ) t)) | |
717 | "PHP constants.") | |
718 | ||
719 | (defconst php-keywords | |
720 | (eval-when-compile | |
721 | (regexp-opt | |
722 | ;; "class", "new" and "extends" get special treatment | |
723 | ;; "case" and "default" get special treatment elsewhere | |
724 | '("and" "as" "break" "continue" "declare" "do" "echo" "else" "elseif" | |
725 | "endfor" "endforeach" "endif" "endswitch" "endwhile" "exit" | |
726 | "extends" "for" "foreach" "global" "if" "include" "include_once" | |
727 | "next" "or" "require" "require_once" "return" "static" "switch" | |
728 | "then" "var" "while" "xor") t)) | |
729 | "PHP keywords.") | |
730 | ||
731 | (defconst php-identifier | |
732 | (eval-when-compile | |
733 | '"[a-zA-Z\_\x7f-\xff][a-zA-Z0-9\_\x7f-\xff]*") | |
734 | "Characters in a PHP identifier.") | |
735 | ||
736 | (defconst php-types | |
737 | (eval-when-compile | |
738 | (regexp-opt '("array" "bool" "char" "const" "double" "float" "int" | |
739 | "integer" "long" "mixed" "object" "real" | |
740 | "string") t)) | |
741 | "PHP types.") | |
742 | ||
743 | ;; Set up font locking | |
744 | (defconst php-font-lock-keywords-1 | |
745 | (list | |
746 | ;; Fontify constants | |
747 | (cons | |
748 | (concat "\\<\\(" php-constants "\\)\\>") | |
749 | 'font-lock-constant-face) | |
750 | ||
751 | ;; Fontify keywords | |
752 | (cons | |
753 | (concat "\\<\\(" php-keywords "\\)\\>") | |
754 | 'font-lock-keyword-face) | |
755 | ||
756 | ;; Fontify keywords and targets, and case default tags. | |
757 | (list "\\<\\(break\\|case\\|continue\\)\\>[ \t]*\\(-?\\sw+\\)?" | |
758 | '(1 font-lock-keyword-face) '(2 font-lock-constant-face t t)) | |
759 | ;; This must come after the one for keywords and targets. | |
760 | '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$" | |
761 | (beginning-of-line) (end-of-line) | |
762 | (1 font-lock-constant-face))) | |
763 | ||
764 | ;; treat 'print' as keyword only when not used like a function name | |
765 | '("\\<print\\s-*(" . default) | |
766 | '("\\<print\\>" . font-lock-keyword-face) | |
767 | ||
768 | ;; Fontify PHP tag | |
769 | '("<\\?\\(php\\)?" . font-lock-constant-face) | |
770 | '("\\?>" . font-lock-constant-face) | |
771 | ||
772 | ;; Fontify ASP-style tag | |
773 | '("<\\%\\(=\\)?" . font-lock-constant-face) | |
774 | '("\\%>" . font-lock-constant-face) | |
775 | ||
776 | ) | |
777 | "Subdued level highlighting for PHP mode.") | |
778 | ||
779 | (defconst php-font-lock-keywords-2 | |
780 | (append | |
781 | php-font-lock-keywords-1 | |
782 | (list | |
783 | ||
784 | ;; Fontify class declaration | |
785 | '("^[ \t]*\\(class\\)[ \t]*\\(\\sw+\\)?" | |
786 | (1 font-lock-keyword-face) (2 font-lock-type-face nil t)) | |
787 | ||
788 | ;; Fontify function declaration | |
789 | '("^[ \t]*\\(function\\)\\s-+&?\\(\\sw+\\)\\s-*(" | |
790 | (1 font-lock-keyword-face) | |
791 | (2 font-lock-function-name-face nil t)) | |
792 | ||
793 | ;; handle several words specially, to include following word, | |
794 | ;; thereby excluding it from unknown-symbol checks later | |
795 | '("\\<\\(new\\|extends\\)\\s-+\\$?\\(\\sw+\\)" | |
796 | (1 font-lock-keyword-face) (2 font-lock-type-face)) | |
797 | )) | |
798 | "Medium level highlighting for PHP mode.") | |
799 | ||
800 | (defconst php-font-lock-keywords-3 | |
801 | (append | |
802 | php-font-lock-keywords-2 | |
803 | (list | |
804 | ||
805 | ;; <word> or </word> for HTML | |
806 | '("</?\\sw+[^>]*>" . font-lock-constant-face) | |
807 | ||
808 | ;; HTML entities | |
809 | '("&\\w+;" . font-lock-variable-name-face) | |
810 | ||
811 | ;; warn about '$' immediately after -> | |
812 | '("\\$\\sw+->\\s-*\\(\\$\\)\\(\\sw+\\)" | |
813 | (1 font-lock-warning-face) (2 default)) | |
814 | ||
815 | ;; warn about $word.word -- it could be a valid concatenation, | |
816 | ;; but without any spaces we'll assume $word->word was meant. | |
817 | '("\\$\\sw+\\(\\.\\)\\sw" | |
818 | 1 font-lock-warning-face) | |
819 | ||
820 | ;; Warn about ==> instead of => | |
821 | '("==+>" . font-lock-warning-face) | |
822 | ||
823 | ;; exclude casts from bare-word treatment | |
824 | `(,(concat "(\\(" php-types "\\))") | |
825 | 1 font-lock-type-face) | |
826 | ||
827 | ;; Fontify variables and function calls | |
828 | '("\\$\\(this\\)\\W" (1 font-lock-constant-face nil nil)) ; "this" as constant | |
829 | '("\\$\\(\\sw+\\)" (1 font-lock-variable-name-face)) ; $variable | |
830 | '("->\\(\\sw+\\)" (1 font-lock-variable-name-face t t)) ; ->variable | |
831 | '("->\\(\\sw+\\)\\s-*(" . (1 default t t)) ; ->function_call | |
832 | '("\\sw+::\\sw+\\s-*(" . default) ; class::method call | |
833 | '("\\<\\sw+\\s-*[[(]" . default) ; word( or word[ | |
834 | '("\\<[0-9]+" . default) ; number (also matches word) | |
835 | ||
836 | ;; Warn on any words not already fontified | |
837 | '("\\<\\sw+\\>" . font-lock-warning-face) | |
838 | )) | |
839 | "Gauchy level highlighting for PHP mode.") | |
840 | ||
841 | (defconst php-font-lock-syntactic-keywords | |
842 | (if xemacsp nil | |
843 | ;; Mark shell-style comments. font-lock handles this in a | |
844 | ;; separate pass from normal syntactic scanning (somehow), so we | |
845 | ;; get a chance to mark these in addition to C and C++ style | |
846 | ;; comments. This only works in GNU Emacs, not Xemacs 21 which | |
847 | ;; seems to ignore this same code if we try to use it. | |
848 | (list | |
849 | ;; Mark _all_ # chars as being comment-start. That will be | |
850 | ;; ignored when inside a quoted string. | |
851 | '("\\(\#\\)" | |
852 | (1 (11 . nil))) | |
853 | ;; Mark all newlines ending a line with # as being comment-end. | |
854 | ;; This causes a problem, premature end-of-comment, when '#' | |
855 | ;; appears inside a multiline C-style comment. Oh well. | |
856 | '("#.*\\([\n]\\)" | |
857 | (1 (12 . nil))) | |
858 | ))) | |
859 | ||
860 | ;; imenu- from cc-mode | |
861 | (defvar cc-imenu-php-generic-expression | |
862 | (` | |
863 | (("class" | |
864 | (, (concat | |
865 | "^" ; beginning of line is required | |
866 | "class[ \t\n]+" | |
867 | "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get | |
868 | "\\([ \t]+extends[ \t]+[a-zA-Z0-9_]+\\)?" ; may be inherited | |
869 | "[ \t\n]*{" | |
870 | )) 2) | |
871 | ("function" | |
872 | (, (concat | |
873 | "^" ; beginning of line is required | |
874 | "[ \t]*function[ \t\n]+&?" | |
875 | "\\([a-zA-Z0-9_]+\\)[ \t\n]*(.*)" ; this is the string we want to get | |
876 | "[ \t\n]*{" | |
877 | )) 2) | |
878 | )) | |
879 | ) | |
880 | ||
881 | ;; Create "default" symbol for GNU Emacs so that both Xemacs and GNU | |
882 | ;; emacs can refer to the default face by a variable named "default". | |
883 | (unless (boundp 'default) | |
884 | (defvar default 'default)) | |
885 | ||
886 | ;; Create faces for XEmacs | |
887 | (unless (boundp 'font-lock-keyword-face) | |
888 | (copy-face 'bold 'font-lock-keyword-face)) | |
889 | (unless (boundp 'font-lock-constant-face) | |
890 | (copy-face 'font-lock-keyword-face 'font-lock-constant-face)) | |
891 | ||
892 | (provide 'php-mode) | |
893 | ||
894 | ;;; php-mode.el ends here |