Zesstra | 7ea4a03 | 2019-11-26 20:11:40 +0100 | [diff] [blame] | 1 | SYNOPSIS |
| 2 | #include <sys/driver_hooks.h> |
| 3 | |
| 4 | set_driver_hook(H_FILE_ENCODING, value) |
| 5 | |
| 6 | <value> being: |
| 7 | |
| 8 | string <text> |
| 9 | string <closure>(string filename) |
| 10 | |
| 11 | DESCRIPTION |
| 12 | Optonal hook specifying the name of the encoding to be used |
| 13 | for decoding a file. Hook setting can be a string or a closure. |
| 14 | |
| 15 | If no hook was specified or the closure returns 0, then the |
| 16 | default "ascii" is used (and thus will throw an error upon |
| 17 | chars greater than 0x7f in the file). |
| 18 | |
| 19 | If the settings is a closure, it will be called for every file |
| 20 | opened by the compiler or by read_file() and write_file() |
| 21 | (unless an explicit encoding was given). |
| 22 | |
| 23 | HISTORY |
| 24 | Introduced in LDMud 3.5.1 |
| 25 | |
| 26 | SEE ALSO |
| 27 | hooks(C) |