about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-tree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui-tree.c b/ui-tree.c
index ef44d61..15d1f5a 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -17,6 +17,7 @@ static void print_object(const unsigned char *sha1, char *path)
 	enum object_type type;
 	unsigned char *buf;
 	unsigned long size, lineno, start, idx;
+	const char *linefmt = "<tr><td class='no'><a name='%1$d'>%1$d</a></td><td class='txt'>";
 
 	type = sha1_object_info(sha1, &size);
 	if (type == OBJ_BAD) {
@@ -43,14 +44,16 @@ static void print_object(const unsigned char *sha1, char *path)
 	while(idx < size) {
 		if (buf[idx] == '\n') {
 			buf[idx] = '\0';
-			htmlf("<tr><td class='no'><a name='%1$d'>%1$d</a></td><td class='txt'>",
-			      ++lineno);
+			htmlf(linefmt, ++lineno);
 			html_txt(buf + start);
 			html("</td></tr>\n");
 			start = idx + 1;
 		}
 		idx++;
 	}
+	htmlf(linefmt, ++lineno);
+	html_txt(buf + start);
+	html("</td></tr>\n");
 	html("</table>\n");
 }
 
0658d8422f30c0cce7bd9af0fb183a2fa&follow=1'>Add xx -p optionJune McEnroe 2019-05-27Add FrontierJune McEnroe 2019-05-27Break nicks with ZWNJJune McEnroe This should prevent bad wrapping. 2019-05-26Add DawnJune McEnroe 2019-05-20Declare vasprintf(3) for GNUJune McEnroe who the fuck is scraeming "#define _GNU_SOURCE" at my house. show yourself, coward. i will never #define _GNU_SOURCE 2019-05-20Fix comparison warning in ttpreJune McEnroe 2019-05-20Add AuthorityJune McEnroe 2019-05-19Specify precedence of unary versions of operatorsJune McEnroe 2019-05-18Add compound assignment operators to orderJune McEnroe 2019-05-15Support simple assignment in orderJune McEnroe 2019-05-15Implement sizeof in orderJune McEnroe 2019-05-15Add orderJune McEnroe 2019-05-12Add T suffix in bitJune McEnroe 2019-05-10Highlight yacc and lex files as CJune McEnroe Their %-prefixed directives should probably be highlighted Macro. 2019-05-10Use val instead of suboptargJune McEnroe suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on failure? 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe Need to do some stuff in the Makefile for lex and yacc and generating HTML pages for it. 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe