summaryrefslogtreecommitdiffstats
path: root/m_property.h
diff options
context:
space:
mode:
Diffstat (limited to 'm_property.h')
-rw-r--r--m_property.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/m_property.h b/m_property.h
index b5b8af26ee..94dd36f050 100644
--- a/m_property.h
+++ b/m_property.h
@@ -110,12 +110,18 @@ int m_property_do(const struct m_option* prop_list, const char* property_name,
void m_properties_print_help_list(const struct m_option* list);
// Expand a property string.
-/* This function allows to print strings containing property values.
- * ${NAME} is expanded to the value of property NAME or an empty
- * string in case of error. $(NAME:STR) expand STR only if the property
- * NAME is available.
- */
-char* m_properties_expand_string(const struct m_option* prop_list, char* str,
+// This function allows to print strings containing property values.
+// ${NAME} is expanded to the value of property NAME.
+// If NAME starts with '=', use the raw value of the property.
+// ${NAME:STR} expands to the property, or STR if the property is not
+// available.
+// ${?NAME:STR} expands to STR if the property is available.
+// ${!NAME:STR} expands to STR if the property is not available.
+// General syntax: "${" ["?" | "!"] ["="] NAME ":" STR "}"
+// STR is recursively expanded using the same rules.
+// "$$" can be used to escape "$", and "$}" to escape "}".
+// "$>" disables parsing of "$" for the rest of the string.
+char* m_properties_expand_string(const struct m_option* prop_list, char *str,
void *ctx);
// Trivial helpers for implementing properties.