UI_construct_prompt

The following function helps construct a prompt. object_desc is a textual short description of the object, for example "pass phrase", and object_name is the name of the object \(might be a card name or a file name. The returned string shall always be allocated on the heap with malloc(), and need to be free'd with free().

If the ui_method doesn't contain a pointer to a user-defined prompt constructor, a default string is built, looking like this:

"Enter {object_desc} for {object_name}:"

So, if object_desc has the value "pass phrase" and object_name has the value "foo.key", the resulting string is:

"Enter pass phrase for foo.key:"

extern (C) nothrow @nogc
char*
UI_construct_prompt

Meta