blob: 65715ca0cd0cb50ff51ec664cf4f0836f5340b3d [file] [log] [blame]
Zesstradaf2c672025-08-02 15:59:17 +02001SYNOPSIS
2 #include <sys/driver_hooks.h>
3
4 set_driver_hook(H_AUTO_INCLUDE_EXPRESSION, value)
5
6 <value> being:
7
8 string <text>
9 string <closure>(object current_object, string current_file
10 , int sys_include)
11
12DESCRIPTION
13 Optional hook specifying a string to be included before the
14 code of a compile_string() call for an LPC expression.
15 Hook setting can be a string or a closure.
16
17 If the setting is a string, it will be automatically included
18 in the compilation for every compile_string() call.
19
20 If the setting is a closure, it is called for the original
21 string and for every file opened by the compiler.
22 <current_object> is the object the string is compiled for.
23 <base_file> will be zero for the string itself and the name
24 of a file included directly or indirectly by the string.
25 For an included file, <sys_include> will be TRUE if it is
26 a <>-type include.
27
28 If the result from the call is a string, it will be included
29 before the actual text.
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), auto_include_block(H), compile_string(E)