diff options
author | Lars Hjemli <hjemli@gmail.com> | 2008-02-24 06:45:33 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-03-18 16:13:10 (JST) |
commit | b1f9b9c1459cb9a30ebf80721aff6ef788d1f891 (patch) | |
tree | 05796a741faef90c12aadd3a5c92b702ec870c48 /ui-commit.c | |
parent | b88fb016d0209f7041ac7d3b4d2c077318407a4d (diff) | |
download | cgit-b1f9b9c1459cb9a30ebf80721aff6ef788d1f891.zip cgit-b1f9b9c1459cb9a30ebf80721aff6ef788d1f891.tar.gz |
Introduce html.h
All html-functions can be quite easily separated from the rest of cgit, so
lets do it; the only issue was html_filemode which uses some git-defined
macros so the function is moved into ui-shared.c::cgit_print_filemode().
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-commit.c')
-rw-r--r-- | ui-commit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c index 25721ca..ed25824 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | #include "html.h" | ||
10 | 11 | ||
11 | static int files, slots; | 12 | static int files, slots; |
12 | static int total_adds, total_rems, max_changes; | 13 | static int total_adds, total_rems, max_changes; |
@@ -62,16 +63,16 @@ void print_fileinfo(struct fileinfo *info) | |||
62 | html("<tr>"); | 63 | html("<tr>"); |
63 | htmlf("<td class='mode'>"); | 64 | htmlf("<td class='mode'>"); |
64 | if (is_null_sha1(info->new_sha1)) { | 65 | if (is_null_sha1(info->new_sha1)) { |
65 | html_filemode(info->old_mode); | 66 | cgit_print_filemode(info->old_mode); |
66 | } else { | 67 | } else { |
67 | html_filemode(info->new_mode); | 68 | cgit_print_filemode(info->new_mode); |
68 | } | 69 | } |
69 | 70 | ||
70 | if (info->old_mode != info->new_mode && | 71 | if (info->old_mode != info->new_mode && |
71 | !is_null_sha1(info->old_sha1) && | 72 | !is_null_sha1(info->old_sha1) && |
72 | !is_null_sha1(info->new_sha1)) { | 73 | !is_null_sha1(info->new_sha1)) { |
73 | html("<span class='modechange'>["); | 74 | html("<span class='modechange'>["); |
74 | html_filemode(info->old_mode); | 75 | cgit_print_filemode(info->old_mode); |
75 | html("]</span>"); | 76 | html("]</span>"); |
76 | } | 77 | } |
77 | htmlf("</td><td class='%s'>", class); | 78 | htmlf("</td><td class='%s'>", class); |