if (skip_prefix(format, "%", &format))
strbuf_addch(&sb, '%');
- else if ((len = strbuf_expand_literal_cb(&sb, format, NULL)))
+ else if ((len = strbuf_expand_literal(&sb, format)))
format += len;
else if (*format != '(')
die(_("bad ls-files format: element '%s' "
if (skip_prefix(format, "%", &format))
strbuf_addch(&sb, '%');
- else if ((len = strbuf_expand_literal_cb(&sb, format, NULL)))
+ else if ((len = strbuf_expand_literal(&sb, format)))
format += len;
else if (*format != '(')
die(_("bad ls-tree format: element '%s' "
if (skip_prefix(format, "%", &format))
strbuf_addch(sb, '%');
- else if ((len = strbuf_expand_literal_cb(sb, format, NULL)))
+ else if ((len = strbuf_expand_literal(sb, format)))
format += len;
else
strbuf_addch(sb, '%');
char **slot;
/* these are independent of the commit */
- res = strbuf_expand_literal_cb(sb, placeholder, NULL);
+ res = strbuf_expand_literal(sb, placeholder);
if (res)
return res;
return 1;
}
-size_t strbuf_expand_literal_cb(struct strbuf *sb,
- const char *placeholder,
- void *context UNUSED)
+size_t strbuf_expand_literal(struct strbuf *sb, const char *placeholder)
{
int ch;
/**
* Used with `strbuf_expand_step` to expand the literals %n and %x
* followed by two hexadecimal digits. Returns the number of recognized
- * characters. The context argument is ignored.
+ * characters.
*/
-size_t strbuf_expand_literal_cb(struct strbuf *sb,
- const char *placeholder,
- void *context);
+size_t strbuf_expand_literal(struct strbuf *sb, const char *placeholder);
/**
* If the string pointed to by `formatp` contains a percent sign ("%"),