blob: 14683f593c25ae5ac19f138349f65c18bfd07c16 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
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
12DESCRIPTION
Zesstra7ea4a032019-11-26 20:11:40 +010013 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 User88f12472016-06-24 23:31:02 +020015
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
33HISTORY
34
35SEE ALSO
36 hooks(C), include_dirs(H)