blob: a82adda992aede9fe0e27c96e2a903cc322a6847 [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
13 Optional hook specifying a string to be included before
14 the source of every compiled LPC object.
15 Hook setting can be a string or a closure.
16
17 If the setting is a string, it will be automatically included before
18 the source of every compiled LPC object.
19
20 If the setting is a closure, it is called for every file
21 opened by the compiler. <base_file> will be the filename of
22 the compiled object, <current_file> the name of a file
23 included directly or indirectly by the <base_file>. When the
24 <base_file> itself is opened, <current_file> will be 0. For an
25 included file, <sys_include> will be TRUE if it is a <>-type
26 include.
27
28 If the result from the call is a string, it will be included
29 before the actual text of the file.
30
31 In both cases, the string will be included as-is; in
32 particular no terminating '\n' will be added.
33
34HISTORY
35
36SEE ALSO
37 hooks(C), include_dirs(H)