blob: 655735966c8f7cc06d9a8e386d9bfe650e25715d [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <sys/driver_hooks.h>
3
4 set_driver_hook(H_INCLUDE_DIRS, value)
5
6 <value> being:
7
8 string *<dirs>
9 string <closure>(string include_name, string current_file)
10
11DESCRIPTION
12 Semi-mandatory hook specifying the directories where <>-type
13 include files are searched (this includes ""-includes not
14 found as specified). Hook setting may be any closure or a
15 string array. If not set, only ""-type includes may be used in LPC
16 programs.
17
18 The hook is called only if a call to master::include_file()
19 does not return a usable filename.
20
21 If the hook setting is a string array, it has to contain the
22 path names of those directories where <>-type includes are to
23 be searched. The directories are searched in the order they
24 appear in the array. The directory name and the name of the
25 actual include file are concatenated, therefore the directory
26 names have to end in '/'. Leading slashes may be omitted.
27
28 If the setting is a closure, it is called with the name of the
29 desired include file as first, and the name of the compiled
30 LPC file as second argument. Result has to be the complete
31 path name of the include file to use. Leading slashes may be
32 omitted. If the closure is a lambda closure, it is bound to
33 this_object() prior to execution.
34
35HISTORY
36
37SEE ALSO
38 hooks(C), auto_include(H), include_file(M)