MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
| 2 | #include <sys/driver_hooks.h> |
| 3 | |
| 4 | set_driver_hook(H_AUTO_INCLUDE, value) |
| 5 | |
| 6 | <value> being: |
| 7 | |
| 8 | string <text> |
| 9 | string <closure>(string base_file, string current_file |
| 10 | , int sys_include) |
| 11 | |
| 12 | DESCRIPTION |
Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 13 | Optional hook specifying a string to be included before the source of |
| 14 | every compiled LPC object. Hook setting can be a string or a closure. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 15 | |
| 16 | If the setting is a string, it will be automatically included before |
| 17 | the source of every compiled LPC object. |
| 18 | |
| 19 | If the setting is a closure, it is called for every file |
| 20 | opened by the compiler. <base_file> will be the filename of |
| 21 | the compiled object, <current_file> the name of a file |
| 22 | included directly or indirectly by the <base_file>. When the |
| 23 | <base_file> itself is opened, <current_file> will be 0. For an |
| 24 | included file, <sys_include> will be TRUE if it is a <>-type |
| 25 | include. |
| 26 | |
| 27 | If the result from the call is a string, it will be included |
| 28 | before the actual text of the file. |
| 29 | |
| 30 | In both cases, the string will be included as-is; in |
| 31 | particular no terminating '\n' will be added. |
| 32 | |
| 33 | HISTORY |
| 34 | |
| 35 | SEE ALSO |
| 36 | hooks(C), include_dirs(H) |