summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
Unidiff
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 20a7cb2..b6a106f 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -1,47 +1,47 @@
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 10
11int files = 0, slots = 0; 11static int files, slots;
12int total_adds = 0, total_rems = 0, max_changes = 0; 12static int total_adds, total_rems, max_changes;
13int lines_added, lines_removed; 13static int lines_added, lines_removed;
14 14
15struct fileinfo { 15static struct fileinfo {
16 char status; 16 char status;
17 unsigned char old_sha1[20]; 17 unsigned char old_sha1[20];
18 unsigned char new_sha1[20]; 18 unsigned char new_sha1[20];
19 unsigned short old_mode; 19 unsigned short old_mode;
20 unsigned short new_mode; 20 unsigned short new_mode;
21 char *old_path; 21 char *old_path;
22 char *new_path; 22 char *new_path;
23 unsigned int added; 23 unsigned int added;
24 unsigned int removed; 24 unsigned int removed;
25} *items; 25} *items;
26 26
27 27
28void print_fileinfo(struct fileinfo *info) 28void print_fileinfo(struct fileinfo *info)
29{ 29{
30 char *query, *query2; 30 char *query, *query2;
31 char *class; 31 char *class;
32 double width; 32 double width;
33 33
34 switch (info->status) { 34 switch (info->status) {
35 case DIFF_STATUS_ADDED: 35 case DIFF_STATUS_ADDED:
36 class = "add"; 36 class = "add";
37 break; 37 break;
38 case DIFF_STATUS_COPIED: 38 case DIFF_STATUS_COPIED:
39 class = "cpy"; 39 class = "cpy";
40 break; 40 break;
41 case DIFF_STATUS_DELETED: 41 case DIFF_STATUS_DELETED:
42 class = "del"; 42 class = "del";
43 break; 43 break;
44 case DIFF_STATUS_MODIFIED: 44 case DIFF_STATUS_MODIFIED:
45 class = "upd"; 45 class = "upd";
46 break; 46 break;
47 case DIFF_STATUS_RENAMED: 47 case DIFF_STATUS_RENAMED: