X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/19c31231fac828bb336db67b8cccc871bea1500e..09a28d761e1776329ec844916b72b8ae8c030e4b:/ui-ssdiff.c diff --git a/ui-ssdiff.c b/ui-ssdiff.c index 45770b1..08cf513 100644 --- a/ui-ssdiff.c +++ b/ui-ssdiff.c @@ -1,8 +1,8 @@ #include "cgit.h" +#include "ui-ssdiff.h" #include "html.h" #include "ui-shared.h" #include "ui-diff.h" -#include "ui-ssdiff.h" extern int use_ssdiff; @@ -23,7 +23,7 @@ static void create_or_reset_lcs_table() int i; if (L != NULL) { - memset(*L, 0, sizeof(*L) * MAX_SSDIFF_SIZE); + memset(*L, 0, sizeof(int) * MAX_SSDIFF_SIZE); return; } @@ -138,9 +138,8 @@ static char *replace_tabs(char *line) strcat(result, prev_buf); break; } else { - strcat(result, " "); - strncat(result, spaces, 8 - (strlen(result) % 8)); strncat(result, prev_buf, cur_buf - prev_buf); + strncat(result, spaces, 8 - (strlen(result) % 8)); } prev_buf = cur_buf + 1; } @@ -230,10 +229,10 @@ static void print_ssdiff_line(char *class, if (old_line_no > 0) { struct diff_filespec *old_file = cgit_get_current_old_file(); char *lineno_str = fmt("n%d", old_line_no); - char *id_str = fmt("%s#%s", is_null_sha1(old_file->sha1)?"HEAD":sha1_to_hex(old_rev_sha1), lineno_str); - html("