summaryrefslogtreecommitdiff
path: root/examples/common.h
diff options
context:
space:
mode:
authorLinquize <linquize@yahoo.com.hk>2014-10-12 15:52:53 +0800
committerLinquize <linquize@yahoo.com.hk>2014-10-12 19:25:20 +0800
commitd6bbcefce3a6daf6ee2ece329e9708ca44409252 (patch)
tree65ee4d2273924a1d8e1e3561fb71077de4c4f816 /examples/common.h
parent9e49cb7a4ba4f6961e3681cb59421cec04a50893 (diff)
downloadlibgit2-d6bbcefce3a6daf6ee2ece329e9708ca44409252.tar.gz
describe: add example
Diffstat (limited to 'examples/common.h')
-rw-r--r--examples/common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/common.h b/examples/common.h
index 2fd7d579f..b9fa37ce9 100644
--- a/examples/common.h
+++ b/examples/common.h
@@ -49,6 +49,15 @@ struct args_info {
/**
* Check current `args` entry against `opt` string. If it matches
* exactly, take the next arg as a string; if it matches as a prefix with
+ * an equal sign, take the remainder as a string; if value not supplied,
+ * default value `def` will be given. otherwise return 0.
+ */
+extern int optional_str_arg(
+ const char **out, struct args_info *args, const char *opt, const char *def);
+
+/**
+ * Check current `args` entry against `opt` string. If it matches
+ * exactly, take the next arg as a string; if it matches as a prefix with
* an equal sign, take the remainder as a string; otherwise return 0.
*/
extern int match_str_arg(