travis-ci: run previously failed tests first, then slowest to fastest
[gitweb.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index 5a9e94bee62fd2ed62dcbc82aee12bfc6d75e254..7930b44f19c701cc671d9639289782abb1812034 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -55,4 +55,19 @@ int mbs_chrlen(const char **text, size_t *remainder_p, const char *encoding);
  */
 int is_hfs_dotgit(const char *path);
 
+typedef enum {
+       ALIGN_LEFT,
+       ALIGN_MIDDLE,
+       ALIGN_RIGHT
+} align_type;
+
+/*
+ * Align the string given and store it into a strbuf as per the
+ * 'position' and 'width'. If the given string length is larger than
+ * 'width' than then the input string is not truncated and no
+ * alignment is done.
+ */
+void strbuf_utf8_align(struct strbuf *buf, align_type position, unsigned int width,
+                      const char *s);
+
 #endif