ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_lpc.php
Go to the documentation of this file.
1 <?php
2 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
3 if (!isset ($BEAUT_PATH)) return;
4 require_once("$BEAUT_PATH/Beautifier/HFile.php");
5  class HFile_lpc extends HFile{
6  function HFile_lpc(){
7  $this->HFile();
8 /*************************************/
9 // Beautifier Highlighting Configuration File
10 // LPC
11 /*************************************/
12 // Flags
13 
14 $this->nocase = "0";
15 $this->notrim = "0";
16 $this->perl = "0";
17 
18 // Colours
19 
20 $this->colours = array("blue", "purple", "gray", "brown", "blue", "purple", "gray");
21 $this->quotecolour = "blue";
22 $this->blockcommentcolour = "green";
23 $this->linecommentcolour = "green";
24 
25 // Indent Strings
26 
27 $this->indent = array("{");
28 $this->unindent = array("}");
29 
30 // String characters and delimiters
31 
32 $this->stringchars = array("\"");
33 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "[", "]", "{", "}", "-", "+", "=", "|", "\\", "/", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
34 $this->escchar = "";
35 
36 // Comment settings
37 
38 $this->linecommenton = array("//");
39 $this->blockcommenton = array("/*");
40 $this->blockcommentoff = array("*/");
41 
42 // Keywords (keyword mapping to colour number)
43 
44 $this->keywords = array(
45  "array" => "1",
46  "class" => "1",
47  "double" => "1",
48  "float" => "1",
49  "function" => "1",
50  "int" => "1",
51  "mixed" => "1",
52  "mapping" => "1",
53  "nomask" => "1",
54  "object" => "1",
55  "public" => "1",
56  "private" => "1",
57  "static" => "1",
58  "string" => "1",
59  "void" => "1",
60  "varargs" => "1",
61  "break" => "2",
62  "case" => "2",
63  "continue" => "2",
64  "default" => "2",
65  "do" => "2",
66  "else" => "2",
67  "for" => "2",
68  "foreach" => "2",
69  "if" => "2",
70  "in" => "2",
71  "return" => "2",
72  "switch" => "2",
73  "while" => "2",
74  "abs" => "3",
75  "absolute_path" => "3",
76  "adlog_file" => "3",
77  "adminlist" => "3",
78  "adminp" => "3",
79  "arch" => "3",
80  "assure_save_dir" => "3",
81  "assure_user_save_dir" => "3",
82  "base_name" => "3",
83  "cat" => "3",
84  "clone_object" => "4",
85  "creator_file" => "3",
86  "data_dir" => "3",
87  "data_file" => "3",
88  "debug_info" => "4",
89  "directory_exists" => "3",
90  "exclude_array" => "3",
91  "exclude_element" => "3",
92  "exec" => "3",
93  "expand" => "3",
94  "export_uid" => "4",
95  "extract" => "3",
96  "file_exists" => "3",
97  "filter" => "4",
98  "find_items" => "3",
99  "find_short" => "3",
100  "first_inventory" => "3",
101  "format_string" => "3",
102  "format_time" => "3",
103  "get_logdir" => "3",
104  "get_logdir_logname" => "3",
105  "get_logfile" => "3",
106  "get_object" => "3",
107  "get_objects" => "3",
108  "getoid" => "3",
109  "gettype" => "3",
110  "hiddenp" => "3",
111  "identify" => "3",
112  "int_string" => "3",
113  "intl_date_stamp" => "3",
114  "log_file" => "3",
115  "max" => "3",
116  "maxelt" => "3",
117  "min" => "3",
118  "minelt" => "3",
119  "mkdirs" => "3",
120  "mud_name" => "3",
121  "mud_port" => "3",
122  "mudlib_name" => "3",
123  "mudlib_version" => "3",
124  "next_inventory" => "3",
125  "objective" => "3",
126  "possessive" => "3",
127  "ppossessive" => "3",
128  "previous_living" => "3",
129  "process_string" => "3",
130  "process_value" => "3",
131  "query_snoop" => "3",
132  "query_snooping" => "3",
133  "reduce_to_tilde_path" => "3",
134  "seniorlist" => "3",
135  "seniorp" => "3",
136  "set_default_fail_msg" => "3",
137  "set_eval_limit" => "4",
138  "shadowp" => "3",
139  "shutdown" => "3",
140  "snoop" => "3",
141  "sorted_inventory" => "3",
142  "strtype" => "3",
143  "subjective" => "3",
144  "sumofarr" => "3",
145  "tail" => "3",
146  "temp_file" => "3",
147  "testcharp" => "3",
148  "transfer" => "3",
149  "trim_spaces" => "3",
150  "trimpath" => "3",
151  "uniq_array" => "3",
152  "update_file" => "3",
153  "user_data_dir" => "3",
154  "user_data_file" => "3",
155  "user_path" => "3",
156  "userp" => "3",
157  "version" => "3",
158  "wizardp" => "3",
159  "wrap" => "3",
160  "write_log_file" => "3",
161  "allocate" => "4",
162  "allocate_buffer" => "4",
163  "acos" => "4",
164  "asin" => "4",
165  "atan" => "4",
166  "add_action" => "4",
167  "allocate_mapping" => "4",
168  "arrayp" => "4",
169  "author_stats" => "4",
170  "all_inventory" => "4",
171  "all_previous_objects" => "4",
172  "bind" => "4",
173  "bufferp" => "4",
174  "crc32" => "4",
175  "call_other" => "4",
176  "call_out" => "4",
177  "call_stack" => "4",
178  "catch" => "4",
179  "cp" => "4",
180  "ceil" => "4",
181  "cos" => "4",
182  "copy" => "4",
183  "command" => "4",
184  "commands" => "4",
185  "cache_stats" => "4",
186  "classp" => "4",
187  "children" => "4",
188  "clonep" => "4",
189  "capitalize" => "4",
190  "clear_bit" => "4",
191  "crypt" => "4",
192  "call_out_info" => "4",
193  "check_memory" => "4",
194  "ctime" => "4",
195  "disable_commands" => "4",
196  "disable_wizard" => "4",
197  "debugmalloc" => "4",
198  "dump_file_descriptors" => "4",
199  "dump_prog" => "4",
200  "dump_socket_status" => "4",
201  "dumpallobj" => "4",
202  "domain_stats" => "4",
203  "deep_inventory" => "4",
204  "destruct" => "4",
205  "deep_inherit_list" => "4",
206  "evaluate" => "4",
207  "exp" => "4",
208  "ed" => "4",
209  "ed_cmd" => "4",
210  "ed_start" => "4",
211  "enable_commands" => "4",
212  "enable_wizard" => "4",
213  "environment" => "4",
214  "explode" => "4",
215  "error" => "4",
216  "eval_cost" => "4",
217  "external_start" => "4",
218  "filter_array" => "4",
219  "file_length" => "4",
220  "file_name" => "4",
221  "file_size" => "4",
222  "floor" => "4",
223  "function_owner" => "4",
224  "fetch_variable" => "4",
225  "find_player" => "4",
226  "filter_mapping" => "4",
227  "floatp" => "4",
228  "functionp" => "4",
229  "find_living" => "4",
230  "find_object" => "4",
231  "find_call_out" => "4",
232  "flush_messages" => "4",
233  "function_exists" => "4",
234  "function_profile" => "4",
235  "functions" => "4",
236  "generate_source" => "4",
237  "get_dir" => "4",
238  "get_char" => "4",
239  "get_config" => "4",
240  "geteuid" => "4",
241  "getuid" => "4",
242  "heart_beat_info" => "4",
243  "heart_beats" => "4",
244  "in_edit" => "4",
245  "in_input" => "4",
246  "input_to" => "4",
247  "interactive" => "4",
248  "intp" => "4",
249  "implode" => "4",
250  "inherit_list" => "4",
251  "inherits" => "4",
252  "keys" => "4",
253  "link" => "4",
254  "log" => "4",
255  "living" => "4",
256  "livings" => "4",
257  "load_object" => "4",
258  "lower_case" => "4",
259  "localtime" => "4",
260  "lpc_info" => "4",
261  "map_array" => "4",
262  "member_array" => "4",
263  "mkdir" => "4",
264  "map" => "4",
265  "message" => "4",
266  "malloc_status" => "4",
267  "memory_info" => "4",
268  "mud_status" => "4",
269  "map_delete" => "4",
270  "map_mapping" => "4",
271  "match_path" => "4",
272  "mapp" => "4",
273  "master" => "4",
274  "move_object" => "4",
275  "max_eval_cost" => "4",
276  "memory_summary" => "4",
277  "new" => "4",
278  "notify_fail" => "4",
279  "named_livings" => "4",
280  "origin" => "4",
281  "opcprof" => "4",
282  "objectp" => "4",
283  "objects" => "4",
284  "previous_object" => "4",
285  "pow" => "4",
286  "printf" => "4",
287  "pointerp" => "4",
288  "present" => "4",
289  "pluralize" => "4",
290  "program_info" => "4",
291  "query_shadowing" => "4",
292  "query_ed_mode" => "4",
293  "query_host_name" => "4",
294  "query_idle" => "4",
295  "query_ip_name" => "4",
296  "query_ip_number" => "4",
297  "query_ip_port" => "4",
298  "query_notify_fail" => "4",
299  "query_verb" => "4",
300  "query_load_average" => "4",
301  "query_privs" => "4",
302  "query_heart_beat" => "4",
303  "read_buffer" => "4",
304  "remove_call_out" => "4",
305  "remove_shadow" => "4",
306  "read_bytes" => "4",
307  "read_file" => "4",
308  "rename" => "4",
309  "rm" => "4",
310  "rmdir" => "4",
311  "restore_variable" => "4",
312  "receive" => "4",
313  "remove_action" => "4",
314  "remove_interactive" => "4",
315  "resolve" => "4",
316  "refs" => "4",
317  "rusage" => "4",
318  "random" => "4",
319  "reload_object" => "4",
320  "restore_object" => "4",
321  "reg_assoc" => "4",
322  "regexp" => "4",
323  "repeat_string" => "4",
324  "replace_string" => "4",
325  "reclaim_objects" => "4",
326  "replace_program" => "4",
327  "replaceable" => "4",
328  "reset_eval_cost" => "4",
329  "sort_array" => "4",
330  "shadow" => "4",
331  "stat" => "4",
332  "sin" => "4",
333  "sqrt" => "4",
334  "save_variable" => "4",
335  "sizeof" => "4",
336  "store_variable" => "4",
337  "say" => "4",
338  "set_this_player" => "4",
339  "shout" => "4",
340  "set_debug_level" => "4",
341  "set_malloc_mask" => "4",
342  "swap" => "4",
343  "stringp" => "4",
344  "set_author" => "4",
345  "set_light" => "4",
346  "set_living_name" => "4",
347  "set_privs" => "4",
348  "seteuid" => "4",
349  "save_object" => "4",
350  "set_heart_beat" => "4",
351  "set_hide" => "4",
352  "socket_accept" => "4",
353  "socket_acquire" => "4",
354  "socket_address" => "4",
355  "socket_bind" => "4",
356  "socket_close" => "4",
357  "socket_create" => "4",
358  "socket_error" => "4",
359  "socket_listen" => "4",
360  "socket_release" => "4",
361  "socket_write" => "4",
362  "set_bit" => "4",
363  "sprintf" => "4",
364  "sscanf" => "4",
365  "strcmp" => "4",
366  "strlen" => "4",
367  "strsrch" => "4",
368  "set_reset" => "4",
369  "shallow_inherit_list" => "4",
370  "this_object" => "4",
371  "throw" => "4",
372  "tan" => "4",
373  "to_float" => "4",
374  "to_int" => "4",
375  "typeof" => "4",
376  "this_interactive" => "4",
377  "this_player" => "4",
378  "this_user" => "4",
379  "time_expression" => "4",
380  "trace" => "4",
381  "traceprefix" => "4",
382  "tell_object" => "4",
383  "tell_room" => "4",
384  "terminal_colour" => "4",
385  "test_bit" => "4",
386  "time" => "4",
387  "unique_array" => "4",
388  "users" => "4",
389  "unique_mapping" => "4",
390  "undefinedp" => "4",
391  "upper_case" => "4",
392  "uptime" => "4",
393  "values" => "4",
394  "virtualp" => "4",
395  "variables" => "4",
396  "write_buffer" => "4",
397  "write_bytes" => "4",
398  "write_file" => "4",
399  "write" => "4",
400  "inherit" => "5",
401  "#define" => "5",
402  "#include" => "5",
403  "#if" => "5",
404  "#else" => "5",
405  "#ifdef" => "5",
406  "#pragma" => "5",
407  "#endif" => "5",
408  "#ifndef" => "5",
409  "#undef//" => "5",
410  "{" => "6",
411  "}" => "6",
412  "attack" => "7",
413  "add_boost" => "7",
414  "add_hp" => "7",
415  "add_sp" => "7",
416  "add_money" => "7",
417  "add_extra_attack" => "7",
418  "add_name" => "7",
419  "create" => "7",
420  "clear_opponents" => "7",
421  "do_command" => "7",
422  "evade_attack" => "7",
423  "get_weapon" => "7",
424  "heart_beat" => "7",
425  "hit_player" => "7",
426  "hold_attack" => "7",
427  "init" => "7",
428  "load_chat" => "7",
429  "load_a_chat" => "7",
430  "move_living" => "7",
431  "move" => "7",
432  "move_or_destruct" => "7",
433  "notify_died" => "7",
434  "notify_killed" => "7",
435  "notify_softkilled" => "7",
436  "notify_got_hit" => "7",
437  "notify_sold" => "7",
438  "notify_softdied" => "7",
439  "notify_moved" => "7",
440  "query_guild_data" => "7",
441  "query_objective" => "7",
442  "query_opponents" => "7",
443  "query_possessive" => "7",
444  "query_name" => "7",
445  "query_pronoun" => "7",
446  "query_short" => "7",
447  "query_long" => "7",
448  "query_fightable" => "7",
449  "query_use" => "7",
450  "query_ac" => "7",
451  "query_sc" => "7",
452  "query_wc" => "7",
453  "query_hp" => "7",
454  "query_sp" => "7",
455  "query_no_get" => "7",
456  "query_no_drop" => "7",
457  "query_opponent" => "7",
458  "query_npc" => "7",
459  "query_living" => "7",
460  "query_vis" => "7",
461  "query_value" => "7",
462  "query_light" => "7",
463  "query_total_boost" => "7",
464  "query_origin" => "7",
465  "query_level" => "7",
466  "query_str" => "7",
467  "query_dex" => "7",
468  "query_con" => "7",
469  "query_int" => "7",
470  "query_wis" => "7",
471  "query_cha" => "7",
472  "query_protection" => "7",
473  "query_location" => "7",
474  "remove_object" => "7",
475  "receive_object" => "7",
476  "remove_item_boost" => "7",
477  "reset" => "7",
478  "remove_boost" => "7",
479  "remove_extra_short" => "7",
480  "register_notify" => "7",
481  "register_prevent" => "7",
482  "release_object" => "7",
483  "set_ac" => "7",
484  "set_al" => "7",
485  "set_gender" => "7",
486  "set_guild_data" => "7",
487  "set_female" => "7",
488  "set_male" => "7",
489  "set_name" => "7",
490  "set_neuter" => "7",
491  "set_race" => "7",
492  "set_sc" => "7",
493  "set_stats" => "7",
494  "set_value" => "7",
495  "set_wc" => "7",
496  "set_weight" => "7",
497  "set_type" => "7",
498  "set_long" => "7",
499  "set_short" => "7",
500  "set_softkill" => "7",
501  "set_fightable_msg" => "7",
502  "set_weapon" => "7",
503  "set_locations" => "7",
504  "set_location_prob" => "7",
505  "spell_player" => "7",
506  "stop_attack" => "7",
507  "start_attack" => "7",
508  "start_attack_allowed" => "7",
509  "set_immunity" => "7",
510  "set_humanoid" => "7",
511  "set_aggressive" => "7",
512  "second_life" => "7",
513  "set_property" => "7",
514  "set_no_drop" => "7",
515  "set_no_get" => "7",
516  "unregister_notify" => "7",
517  "unregister_prevent" => "7");
518 
519 // Special extensions
520 
521 // Each category can specify a PHP function that returns an altered
522 // version of the keyword.
523 
524 
525 
526 $this->linkscripts = array(
527  "1" => "donothing",
528  "2" => "donothing",
529  "3" => "donothing",
530  "4" => "donothing",
531  "5" => "donothing",
532  "6" => "donothing",
533  "7" => "donothing");
534 }
535 
536 
537 function donothing($keywordin)
538 {
539  return $keywordin;
540 }
541 
542 }?>