summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
Unidiff
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-commit.c b/ui-commit.c
index ed25824..8019e36 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -1,42 +1,43 @@
1/* ui-commit.c: generate commit view 1/* ui-commit.c: generate commit view
2 * 2 *
3 * Copyright (C) 2006 Lars Hjemli 3 * Copyright (C) 2006 Lars Hjemli
4 * 4 *
5 * Licensed under GNU General Public License v2 5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include "html.h" 10#include "html.h"
11#include "ui-shared.h"
11 12
12static int files, slots; 13static int files, slots;
13static int total_adds, total_rems, max_changes; 14static int total_adds, total_rems, max_changes;
14static int lines_added, lines_removed; 15static int lines_added, lines_removed;
15static char *curr_rev; 16static char *curr_rev;
16 17
17static struct fileinfo { 18static struct fileinfo {
18 char status; 19 char status;
19 unsigned char old_sha1[20]; 20 unsigned char old_sha1[20];
20 unsigned char new_sha1[20]; 21 unsigned char new_sha1[20];
21 unsigned short old_mode; 22 unsigned short old_mode;
22 unsigned short new_mode; 23 unsigned short new_mode;
23 char *old_path; 24 char *old_path;
24 char *new_path; 25 char *new_path;
25 unsigned int added; 26 unsigned int added;
26 unsigned int removed; 27 unsigned int removed;
27} *items; 28} *items;
28 29
29 30
30void print_fileinfo(struct fileinfo *info) 31void print_fileinfo(struct fileinfo *info)
31{ 32{
32 char *class; 33 char *class;
33 34
34 switch (info->status) { 35 switch (info->status) {
35 case DIFF_STATUS_ADDED: 36 case DIFF_STATUS_ADDED:
36 class = "add"; 37 class = "add";
37 break; 38 break;
38 case DIFF_STATUS_COPIED: 39 case DIFF_STATUS_COPIED:
39 class = "cpy"; 40 class = "cpy";
40 break; 41 break;
41 case DIFF_STATUS_DELETED: 42 case DIFF_STATUS_DELETED:
42 class = "del"; 43 class = "del";