summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/strbuf.h b/strbuf.h
index c8d98dfb95..84cf969721 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -373,6 +373,12 @@ void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src);
void strbuf_humanise_bytes(struct strbuf *buf, off_t bytes);
/**
+ * Append the given byte rate as a human-readable string (i.e. 12.23 KiB/s,
+ * 3.50 MiB/s).
+ */
+void strbuf_humanise_rate(struct strbuf *buf, off_t bytes);
+
+/**
* Add a formatted string to the buffer.
*/
__attribute__((format (printf,2,3)))
@@ -666,8 +672,13 @@ void strbuf_branchname(struct strbuf *sb, const char *name,
*/
int strbuf_check_branch_ref(struct strbuf *sb, const char *name);
+typedef int (*char_predicate)(char ch);
+
+int is_rfc3986_unreserved(char ch);
+int is_rfc3986_reserved_or_unreserved(char ch);
+
void strbuf_addstr_urlencode(struct strbuf *sb, const char *name,
- int reserved);
+ char_predicate allow_unencoded_fn);
__attribute__((format (printf,1,2)))
int printf_ln(const char *fmt, ...);