Browse Source

strbuf.c: mark a private file-scope symbol as static

Also remove an unused function.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 13 years ago
parent
commit
ea03a8e181
  1. 13
      strbuf.c
  2. 4
      strbuf.h

13
strbuf.c

@ -445,8 +445,8 @@ static int is_rfc3986_unreserved(char ch) @@ -445,8 +445,8 @@ static int is_rfc3986_unreserved(char ch)
ch == '-' || ch == '_' || ch == '.' || ch == '~';
}

void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len,
int reserved)
static void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len,
int reserved)
{
strbuf_grow(sb, len);
while (len--) {
@ -465,15 +465,6 @@ void strbuf_addstr_urlencode(struct strbuf *sb, const char *s, @@ -465,15 +465,6 @@ void strbuf_addstr_urlencode(struct strbuf *sb, const char *s,
strbuf_add_urlencode(sb, s, strlen(s), reserved);
}

void strbuf_addf_ln(struct strbuf *sb, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
strbuf_vaddf(sb, fmt, ap);
va_end(ap);
strbuf_addch(sb, '\n');
}

int printf_ln(const char *fmt, ...)
{
int ret;

4
strbuf.h

@ -99,8 +99,6 @@ __attribute__((format (printf,2,3))) @@ -99,8 +99,6 @@ __attribute__((format (printf,2,3)))
extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
__attribute__((format (printf,2,0)))
extern void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap);
__attribute__((format (printf,2,3)))
extern void strbuf_addf_ln(struct strbuf *sb, const char *fmt, ...);

extern void strbuf_add_lines(struct strbuf *sb, const char *prefix, const char *buf, size_t size);

@ -126,8 +124,6 @@ extern int launch_editor(const char *path, struct strbuf *buffer, const char *co @@ -126,8 +124,6 @@ extern int launch_editor(const char *path, struct strbuf *buffer, const char *co
extern int strbuf_branchname(struct strbuf *sb, const char *name);
extern int strbuf_check_branch_ref(struct strbuf *sb, const char *name);

extern void strbuf_add_urlencode(struct strbuf *, const char *, size_t,
int reserved);
extern void strbuf_addstr_urlencode(struct strbuf *, const char *,
int reserved);


Loading…
Cancel
Save