Project configuration and defaults.
Reads watcher configuration from:
- Built-in defaults (set_watch_defaults)
- fpm.toml under [extra.fpm-watch] (apply_watch_from_manifest)
Also provides helper routines used by the supervisor (watch_restart) for
auto-restart defaults (delay, max restarts, self path).
Apply configuration overrides from fpm.toml [extra.fpm-watch].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(watch_opts_t), | intent(inout) | :: | w |
Read supervisor defaults from the manifest (when present).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(out) | :: | auto_restart | |||
| real, | intent(out) | :: | restart_delay | |||
| integer, | intent(out) | :: | restart_max | |||
| character(len=:), | intent(out), | allocatable | :: | self_exe |
Normalize watcher options and clamp to safe bounds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(watch_opts_t), | intent(inout) | :: | w |
Append a feature name to a string_t array if not already present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_t), | intent(inout), | allocatable | :: | features(:) | ||
| character(len=*), | intent(in) | :: | name |
Apply built-in defaults to watcher options.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(watch_opts_t), | intent(inout) | :: | w |
Locate and return the [extra.fpm-watch] table from fpm.toml.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(out), | allocatable | :: | root | ||
| type(toml_table), | intent(out), | pointer | :: | wt | ||
| logical, | intent(out) | :: | ok |
Read a TOML integer value if present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(inout) | :: | v |
Read a TOML string list into an allocatable string_t array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| character(len=*), | intent(in) | :: | key | |||
| type(string_t), | intent(inout), | allocatable | :: | list(:) |
Read a TOML logical value if present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(inout) | :: | v |
Read a TOML real value if present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| character(len=*), | intent(in) | :: | key | |||
| real, | intent(inout) | :: | v |
Read a TOML string value if present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=:), | intent(inout), | allocatable | :: | v |