ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_turboc.php
Go to the documentation of this file.
1<?php
2$BEAUT_PATH = realpath(".") . "/Services/COPage/syntax_highlight/php";
3if (!isset($BEAUT_PATH)) {
4 return;
5}
6require_once("$BEAUT_PATH/Beautifier/HFile.php");
7 class HFile_turboc extends HFile
8 {
9 public function HFile_turboc()
10 {
11 $this->HFile();
12 /*************************************/
13 // Beautifier Highlighting Configuration File
14 // Turbo C++
15 /*************************************/
16 // Flags
17
18 $this->nocase = "0";
19 $this->notrim = "0";
20 $this->perl = "0";
21
22 // Colours
23
24 $this->colours = array("blue", "purple", "gray", "brown", "blue");
25 $this->quotecolour = "blue";
26 $this->blockcommentcolour = "green";
27 $this->linecommentcolour = "green";
28
29 // Indent Strings
30
31 $this->indent = array("{");
32 $this->unindent = array("}");
33
34 // String characters and delimiters
35
36 $this->stringchars = array("\"", "'");
37 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "/", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", "?");
38 $this->escchar = "";
39
40 // Comment settings
41
42 $this->linecommenton = array("//");
43 $this->blockcommenton = array("/*");
44 $this->blockcommentoff = array("*/");
45
46 // Keywords (keyword mapping to colour number)
47
48 $this->keywords = array(
49 "#define" => "1",
50 "#elif" => "1",
51 "#else" => "1",
52 "#endif" => "1",
53 "#if" => "1",
54 "#ifdef" => "1",
55 "#ifndef" => "1",
56 "#include" => "1",
57 "#line" => "1",
58 "#pragma" => "1",
59 "#undef" => "1",
60 "auto" => "2",
61 "break" => "2",
62 "case" => "2",
63 "cdecl" => "2",
64 "char" => "2",
65 "const" => "2",
66 "continue" => "2",
67 "default" => "2",
68 "do" => "2",
69 "double" => "2",
70 "else" => "2",
71 "enum" => "2",
72 "extern" => "2",
73 "far" => "2",
74 "float" => "2",
75 "for" => "2",
76 "fortran" => "2",
77 "goto" => "2",
78 "huge" => "2",
79 "if" => "2",
80 "int" => "2",
81 "label" => "2",
82 "long" => "2",
83 "near" => "2",
84 "pascal" => "2",
85 "register" => "2",
86 "return" => "2",
87 "short" => "2",
88 "signed" => "2",
89 "sizeof" => "2",
90 "static" => "2",
91 "struct" => "2",
92 "switch" => "2",
93 "typedef" => "2",
94 "union" => "2",
95 "unsigned" => "2",
96 "void" => "2",
97 "volatile" => "2",
98 "while" => "2",
99 "FP_OFF" => "3",
100 "FP_SEG" => "3",
101 "MK_FP" => "3",
102 "_OvrInitEms" => "3",
103 "_OvrInitExt" => "3",
104 "___emit___" => "3",
105 "_chmod" => "3",
106 "_clear87" => "3",
107 "_close" => "3",
108 "_control87" => "3",
109 "_creat" => "3",
110 "_exit" => "3",
111 "_fpreset" => "3",
112 "_graphfreemem" => "3",
113 "_graphgetmem" => "3",
114 "_lrotl" => "3",
115 "_lrotr" => "3",
116 "_open" => "3",
117 "_read" => "3",
118 "_rtol" => "3",
119 "_rtor" => "3",
120 "_setcursortype" => "3",
121 "_status87" => "3",
122 "_strerror" => "3",
123 "_tolower" => "3",
124 "_toupper" => "3",
125 "_write" => "3",
126 "abort" => "3",
127 "abs" => "3",
128 "absread" => "3",
129 "abswrite" => "3",
130 "access" => "3",
131 "acos" => "3",
132 "alloc.h" => "3",
133 "allocmem" => "3",
134 "arc" => "3",
135 "arg" => "3",
136 "asctime" => "3",
137 "asin" => "3",
138 "assert" => "3",
139 "assert.h" => "3",
140 "atan" => "3",
141 "atan2" => "3",
142 "atexit" => "3",
143 "atof" => "3",
144 "atoi" => "3",
145 "atol" => "3",
146 "bar" => "3",
147 "bar3d" => "3",
148 "bcd" => "3",
149 "bcd.h" => "3",
150 "bdos" => "3",
151 "bdosptr" => "3",
152 "bios.h" => "3",
153 "bioscom" => "3",
154 "biosdisk" => "3",
155 "bioskey" => "3",
156 "biosmemory" => "3",
157 "biosprint" => "3",
158 "biostime" => "3",
159 "bisoequip" => "3",
160 "brk" => "3",
161 "bsearch" => "3",
162 "cabs" => "3",
163 "calloc" => "3",
164 "ceil" => "3",
165 "cgets" => "3",
166 "chdir" => "3",
167 "chmod" => "3",
168 "chsize" => "3",
169 "circle" => "3",
170 "cleardevice" => "3",
171 "clearerr" => "3",
172 "clearviewport" => "3",
173 "clock" => "3",
174 "close" => "3",
175 "closegraph" => "3",
176 "clreol" => "3",
177 "clrscr" => "3",
178 "complex" => "3",
179 "complex.h" => "3",
180 "conio.h" => "3",
181 "conj" => "3",
182 "coreleft" => "3",
183 "cos" => "3",
184 "cosh" => "3",
185 "country" => "3",
186 "cprintf" => "3",
187 "cputs" => "3",
188 "creat" => "3",
189 "creatnew" => "3",
190 "creattemp" => "3",
191 "cscanf" => "3",
192 "ctime" => "3",
193 "ctrlbrk" => "3",
194 "ctype.h" => "3",
195 "delay" => "3",
196 "delline" => "3",
197 "detectgraph" => "3",
198 "difftime" => "3",
199 "dir.h" => "3",
200 "disable" => "3",
201 "div" => "3",
202 "dos.h" => "3",
203 "dosexterr" => "3",
204 "dostounix" => "3",
205 "drawpoly" => "3",
206 "dup" => "3",
207 "dup2" => "3",
208 "ecvt" => "3",
209 "errno.h" => "3",
210 "execl" => "3",
211 "execle" => "3",
212 "execlp" => "3",
213 "execlpe" => "3",
214 "execv" => "3",
215 "execve" => "3",
216 "execvp" => "3",
217 "execvpe" => "3",
218 "exit" => "3",
219 "exp" => "3",
220 "fabs" => "3",
221 "farcalloc" => "3",
222 "farcoreleft" => "3",
223 "farfree" => "3",
224 "farheapcheck" => "3",
225 "farheapcheckfree" => "3",
226 "farheapchecknode" => "3",
227 "farheapfillfree" => "3",
228 "farheapwalk" => "3",
229 "farmalloc" => "3",
230 "farrealloc" => "3",
231 "fclose" => "3",
232 "fcloseall" => "3",
233 "fcntl.h" => "3",
234 "fcvt" => "3",
235 "fdopen" => "3",
236 "feof" => "3",
237 "ferror" => "3",
238 "fflush" => "3",
239 "fgetc" => "3",
240 "fgetchar" => "3",
241 "fgetpos" => "3",
242 "fgets" => "3",
243 "filelength" => "3",
244 "fileno" => "3",
245 "fillellipse" => "3",
246 "fillpoly" => "3",
247 "findfirst" => "3",
248 "findnext" => "3",
249 "float.h" => "3",
250 "floodfill" => "3",
251 "floor" => "3",
252 "flushall" => "3",
253 "fnmerge" => "3",
254 "fnsplit" => "3",
255 "fopen" => "3",
256 "fprintf" => "3",
257 "fputc" => "3",
258 "fputchar" => "3",
259 "fputs" => "3",
260 "fread" => "3",
261 "free" => "3",
262 "freemem" => "3",
263 "freopen" => "3",
264 "frexp" => "3",
265 "fscanf" => "3",
266 "fseek" => "3",
267 "fsetpos" => "3",
268 "fstat" => "3",
269 "fstream.h" => "3",
270 "ftell" => "3",
271 "ftime" => "3",
272 "fwrite" => "3",
273 "gcvt" => "3",
274 "generic.h" => "3",
275 "geninterrupt" => "3",
276 "getarccoords" => "3",
277 "getaspectratio" => "3",
278 "getbkcolor" => "3",
279 "getc" => "3",
280 "getcbrk" => "3",
281 "getch" => "3",
282 "getchar" => "3",
283 "getche" => "3",
284 "getcolor" => "3",
285 "getcurdir" => "3",
286 "getcwd" => "3",
287 "getdate" => "3",
288 "getdefaultpalette" => "3",
289 "getdfree" => "3",
290 "getdisk" => "3",
291 "getdrivername" => "3",
292 "getdta" => "3",
293 "getenv" => "3",
294 "getfat" => "3",
295 "getfatd" => "3",
296 "getfillpattern" => "3",
297 "getfillsettings" => "3",
298 "getmasy" => "3",
299 "getmaxcolor" => "3",
300 "getmaxmode" => "3",
301 "getmaxx" => "3",
302 "getmodename" => "3",
303 "getmoderange" => "3",
304 "getpalette" => "3",
305 "getpalettesize" => "3",
306 "getpass" => "3",
307 "getpid" => "3",
308 "getpixel" => "3",
309 "getpsp" => "3",
310 "gets" => "3",
311 "gettestinfo" => "3",
312 "gettext" => "3",
313 "gettextsettings" => "3",
314 "gettime" => "3",
315 "getvect" => "3",
316 "getverify" => "3",
317 "getviewsettings" => "3",
318 "getw" => "3",
319 "getx" => "3",
320 "gety" => "3",
321 "gmtime" => "3",
322 "gotoxy" => "3",
323 "graphdefaults" => "3",
324 "grapherrormsg" => "3",
325 "graphics.h" => "3",
326 "graphresult" => "3",
327 "harderr" => "3",
328 "hardresume" => "3",
329 "hardretn" => "3",
330 "heapcheck" => "3",
331 "heapcheckfree" => "3",
332 "heapchecknode" => "3",
333 "heapfillfree" => "3",
334 "heapwalk" => "3",
335 "highvideo" => "3",
336 "hypot" => "3",
337 "imag" => "3",
338 "imagesize" => "3",
339 "initgraph" => "3",
340 "inp" => "3",
341 "inport" => "3",
342 "inportb" => "3",
343 "insline" => "3",
344 "installuserdriver" => "3",
345 "installuserfont" => "3",
346 "int86" => "3",
347 "int86x" => "3",
348 "intdos" => "3",
349 "intdosx" => "3",
350 "intr" => "3",
351 "io.h" => "3",
352 "ioctl" => "3",
353 "iomanip.h" => "3",
354 "iostream.h" => "3",
355 "isalnum" => "3",
356 "isalpha" => "3",
357 "isascii" => "3",
358 "isatty" => "3",
359 "iscntrl" => "3",
360 "isdigit" => "3",
361 "isgraph" => "3",
362 "islower" => "3",
363 "isprint" => "3",
364 "ispunct" => "3",
365 "isspace" => "3",
366 "isupper" => "3",
367 "isxdigit" => "3",
368 "itoa" => "3",
369 "kbhit" => "3",
370 "keep" => "3",
371 "labs" => "3",
372 "ldexp" => "3",
373 "ldiv" => "3",
374 "lfind" => "3",
375 "limits.h" => "3",
376 "line" => "3",
377 "linerel" => "3",
378 "lineto" => "3",
379 "locale.h" => "3",
380 "localeconv" => "3",
381 "localtime" => "3",
382 "lock" => "3",
383 "log" => "3",
384 "log10" => "3",
385 "longjmp" => "3",
386 "lowvideo" => "3",
387 "lsearch" => "3",
388 "lseek" => "3",
389 "ltoa" => "3",
390 "malloc" => "3",
391 "math.h" => "3",
392 "matherr" => "3",
393 "max" => "3",
394 "mem.h" => "3",
395 "memccpy" => "3",
396 "memchr" => "3",
397 "memcmp" => "3",
398 "memcpy" => "3",
399 "memicmp" => "3",
400 "memmove" => "3",
401 "memset" => "3",
402 "min" => "3",
403 "mkdir" => "3",
404 "mktemp" => "3",
405 "mktime" => "3",
406 "modf" => "3",
407 "movedata" => "3",
408 "movemem" => "3",
409 "moverel" => "3",
410 "movetext" => "3",
411 "moveto" => "3",
412 "norm" => "3",
413 "normvideo" => "3",
414 "nosound" => "3",
415 "open" => "3",
416 "outp" => "3",
417 "outport" => "3",
418 "outportb" => "3",
419 "outtext" => "3",
420 "outtextxy" => "3",
421 "parsfnm" => "3",
422 "peek" => "3",
423 "peekb" => "3",
424 "perror" => "3",
425 "pieslice" => "3",
426 "poke" => "3",
427 "pokeb" => "3",
428 "polar" => "3",
429 "poly" => "3",
430 "pow" => "3",
431 "pow10" => "3",
432 "printf" => "3",
433 "process.h" => "3",
434 "putc" => "3",
435 "putch" => "3",
436 "putchar" => "3",
437 "putenv" => "3",
438 "putimage" => "3",
439 "putpixel" => "3",
440 "puts" => "3",
441 "puttext" => "3",
442 "putw" => "3",
443 "qsort" => "3",
444 "raise" => "3",
445 "rand" => "3",
446 "randbrd" => "3",
447 "randbwr" => "3",
448 "random" => "3",
449 "randomsize" => "3",
450 "read" => "3",
451 "real" => "3",
452 "realloc" => "3",
453 "rectangle" => "3",
454 "registerbgidriver" => "3",
455 "registerbgifont" => "3",
456 "remove" => "3",
457 "rename" => "3",
458 "restorecrtmode" => "3",
459 "rewind" => "3",
460 "rmdir" => "3",
461 "sbrk" => "3",
462 "scanf" => "3",
463 "searchpath" => "3",
464 "sector" => "3",
465 "segread" => "3",
466 "setactivepage" => "3",
467 "setallpalette" => "3",
468 "setaspectratio" => "3",
469 "setbkcolor" => "3",
470 "setblock" => "3",
471 "setbuf" => "3",
472 "setcbrk" => "3",
473 "setcolor" => "3",
474 "setdate" => "3",
475 "setdisk" => "3",
476 "setdta" => "3",
477 "setfillpattern" => "3",
478 "setfillstyle" => "3",
479 "setftime" => "3",
480 "setgraphbufsize" => "3",
481 "setgraphmode" => "3",
482 "setjmp" => "3",
483 "setjmp.h" => "3",
484 "setlinestyle" => "3",
485 "setlocale" => "3",
486 "setmem" => "3",
487 "setmode" => "3",
488 "setpalette" => "3",
489 "setrgbpalette" => "3",
490 "settextjustify" => "3",
491 "settextstyle" => "3",
492 "settime" => "3",
493 "setusercharsize" => "3",
494 "setvbuf" => "3",
495 "setvect" => "3",
496 "setverify" => "3",
497 "setviewport" => "3",
498 "setvisualpage" => "3",
499 "setwritemode" => "3",
500 "share.h" => "3",
501 "signal" => "3",
502 "signal.h" => "3",
503 "sin" => "3",
504 "sinh" => "3",
505 "sleep" => "3",
506 "sopen" => "3",
507 "spawn" => "3",
508 "spawnl" => "3",
509 "spawnle" => "3",
510 "spawnlp" => "3",
511 "spawnlpe" => "3",
512 "spawnv" => "3",
513 "spawnve" => "3",
514 "spawnvp" => "3",
515 "spawnvpe" => "3",
516 "sprintf" => "3",
517 "sqrt" => "3",
518 "srand" => "3",
519 "sscanf" => "3",
520 "stat" => "3",
521 "stat.h" => "3",
522 "stdarg.h" => "3",
523 "stddef.h" => "3",
524 "stdio.h" => "3",
525 "stdiostr.h" => "3",
526 "stdlib.h" => "3",
527 "stime" => "3",
528 "stpcpy" => "3",
529 "strcat" => "3",
530 "strchr" => "3",
531 "strcmp" => "3",
532 "strcmpi" => "3",
533 "strcoll" => "3",
534 "strcpy" => "3",
535 "strcspn" => "3",
536 "strdup" => "3",
537 "stream.h" => "3",
538 "strerror" => "3",
539 "strftime" => "3",
540 "stricmp" => "3",
541 "string.h" => "3",
542 "strlen" => "3",
543 "strlwr" => "3",
544 "strncat" => "3",
545 "strncmp" => "3",
546 "strncmpi" => "3",
547 "strncpy" => "3",
548 "strnicmp" => "3",
549 "strnset" => "3",
550 "strpbrk" => "3",
551 "strrchr" => "3",
552 "strrev" => "3",
553 "strset" => "3",
554 "strspn" => "3",
555 "strstr" => "3",
556 "strstrea.h" => "3",
557 "strtod" => "3",
558 "strtok" => "3",
559 "strtol" => "3",
560 "strtoul" => "3",
561 "strupr" => "3",
562 "strxfrm" => "3",
563 "swab" => "3",
564 "system" => "3",
565 "tan" => "3",
566 "tanh" => "3",
567 "tell" => "3",
568 "textattr" => "3",
569 "textbackground" => "3",
570 "textcolor" => "3",
571 "textheight" => "3",
572 "textmode" => "3",
573 "textwidth" => "3",
574 "time" => "3",
575 "time.h" => "3",
576 "timeb.h" => "3",
577 "tmpfile" => "3",
578 "tmpnam" => "3",
579 "toascii" => "3",
580 "tolower" => "3",
581 "toupper" => "3",
582 "types.h" => "3",
583 "tzset" => "3",
584 "ultoa" => "3",
585 "umask" => "3",
586 "ungetc" => "3",
587 "ungetch" => "3",
588 "unixtodos" => "3",
589 "unlink" => "3",
590 "unlock" => "3",
591 "va_arg" => "3",
592 "va_end" => "3",
593 "va_start" => "3",
594 "values.h" => "3",
595 "vfprintf" => "3",
596 "vfscanf" => "3",
597 "vprintf" => "3",
598 "vscanf" => "3",
599 "vsprintf" => "3",
600 "vsscanf" => "3",
601 "wherex" => "3",
602 "wherey" => "3",
603 "window" => "3",
604 "write" => "3",
605 "EOF" => "4",
606 "FILE" => "4",
607 "NULL" => "4",
608 "SEEK_CUR" => "4",
609 "SEEK_END" => "4",
610 "SEEK_SET" => "4",
611 "size_t" => "4",
612 "!" => "5",
613 "$" => "5",
614 "&" => "5",
615 "(" => "5",
616 ")" => "5",
617 "*" => "5",
618 "+" => "5",
619 "," => "5",
620 "-" => "5",
621 "." => "5",
622 "//" => "5",
623 "/" => "5",
624 ":" => "5",
625 ";" => "5",
626 "<" => "5",
627 "=" => "5",
628 ">" => "5",
629 "[" => "5",
630 "]" => "5",
631 "{" => "5",
632 "|" => "5",
633 "}" => "5",
634 "~" => "5");
635
636 // Special extensions
637
638 // Each category can specify a PHP function that returns an altered
639 // version of the keyword.
640
641
642
643 $this->linkscripts = array(
644 "1" => "donothing",
645 "2" => "donothing",
646 "3" => "donothing",
647 "4" => "donothing",
648 "5" => "donothing");
649 }
650
651
652 public function donothing($keywordin)
653 {
654 return $keywordin;
655 }
656 }
$BEAUT_PATH
Definition: HFile_turboc.php:2
An exception for terminatinating execution or to throw for unit testing.
donothing($keywordin)