summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: acb7014)
raw | patch | inline | side by side (parent: acb7014)
author | Timo Hirvonen <tihirvon@gmail.com> | |
Sat, 24 Jun 2006 17:20:32 +0000 (20:20 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 25 Jun 2006 03:16:55 +0000 (20:16 -0700) |
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c | patch | blob | history |
index f89224f75f54bbedffd4f9f9d8d975dfe73507ad..834b166064bc503c8c4a16222e9b05c3ada8f457 100644 (file)
--- a/diff.c
+++ b/diff.c
static int fill_mmfile(mmfile_t *mf, struct diff_filespec *one)
{
if (!DIFF_FILE_VALID(one)) {
- mf->ptr = ""; /* does not matter */
+ mf->ptr = (char *)""; /* does not matter */
mf->size = 0;
return 0;
}
}
for (i = 0; i < data->nr; i++) {
- char *prefix = "";
+ const char *prefix = "";
char *name = data->files[i]->name;
int added = data->files[i]->added;
int deleted = data->files[i]->deleted;
err_empty:
err = -1;
empty:
- s->data = "";
+ s->data = (char *)"";
s->size = 0;
return err;
}
return 0;
}
-int opt_arg(const char *arg, int arg_short, const char *arg_long, int *val)
+static int opt_arg(const char *arg, int arg_short, const char *arg_long, int *val)
{
char c, *eq;
int len;
free((void*)path_two);
}
-static void diff_flush_name(struct diff_filepair *p,
- int inter_name_termination,
- int line_termination)
+static void diff_flush_name(struct diff_filepair *p, int line_termination)
{
char *path = p->two->path;
if (line_termination)
path = quote_one(p->two->path);
- else
- path = p->two->path;
printf("%s%c", path, line_termination);
if (p->two->path != path)
free(path);
options, diff_output_format);
break;
case DIFF_FORMAT_NAME:
- diff_flush_name(p,
- inter_name_termination,
- line_termination);
+ diff_flush_name(p, line_termination);
break;
case DIFF_FORMAT_NO_OUTPUT:
break;