aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorLuca Venturini <luca@yepa.com>2015-02-04 00:11:49 -0800
committerLuca Venturini <luca@yepa.com>2015-03-10 22:07:17 -0700
commit1fdb9fa3f905df956ed61dbf6ae086c963fd1793 (patch)
treee41a28ea27ed9d6a43a0ce375f7c251c0de40e5d /src/util.h
parent8cbe1f4f5870a165be729cabb9b55dcbf0f85e09 (diff)
downloadbitcoin-1fdb9fa3f905df956ed61dbf6ae086c963fd1793.tar.xz
Help messages correctly formatted (79 chars)
Help messages are formatted programmatically with FormatParagraph in order not to break existing strings in Transifex. The new format works even if the translation of the strings modifies the lenght of the message. Sqashed 6 commits in a single one. Help messages correctly formatted for SVGA text mode (132 chars) Help messages are formatted programmatically with FormatParagraph in order not to break existing strings in Transifex. The new format should work even if the translation of the strings modifies the lenght of the message. Fix - syntax error Correct formatting for 79 chars Correctly based on C++ functions Removed spare spaces from option strings Fix - syntax error
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 4d0cb7136e..9b5a4153dd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -162,6 +162,23 @@ bool SoftSetArg(const std::string& strArg, const std::string& strValue);
*/
bool SoftSetBoolArg(const std::string& strArg, bool fValue);
+/**
+ * Format a string to be used as group of options in help messages
+ *
+ * @param message Group name (e.g. "RPC server options:")
+ * @return the formatted string
+ */
+std::string HelpMessageGroup(const std::string& message);
+
+/**
+ * Format a string to be used as option description in help messages
+ *
+ * @param option Option message (e.g. "-rpcuser=<user>")
+ * @param message Option description (e.g. "Username for JSON-RPC connections")
+ * @return the formatted string
+ */
+std::string HelpMessageOpt(const std::string& option, const std::string& message);
+
void SetThreadPriority(int nPriority);
void RenameThread(const char* name);