URI: 
       Right align numbers in tables - stagit-gopher - A git gopher frontend. (mirror)
  HTML git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
   DIR LICENSE
       ---
   DIR commit 57d70b0a2d945470402b9a9a61ce72289025a36c
   DIR parent 0a4451bc150154cfb0390f242860d4b66930e1bd
  HTML Author: Eivind Uggedal <eivind@uggedal.com>
       Date:   Thu, 10 Dec 2015 22:35:39 +0000
       
       Right align numbers in tables
       
       Diffstat:
         M urmoms.c                            |      13 +++++++------
       
       1 file changed, 7 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/urmoms.c b/urmoms.c
       @@ -413,8 +413,9 @@ writelog(FILE *fp)
                git_revwalk_simplify_first_parent(w);
        
                /* TODO: also make "expanded" log ? (with message body) */
       -        fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</td><td>Author</td>"
       -              "<td>Files</td><td>+</td><td>-</td></tr>\n</thead><tbody>\n", fp);
       +        fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</td>"
       +                  "<td>Author</td><td>Files</td><td class=\"num\">+</td>"
       +                  "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
                while (!git_revwalk_next(&id, w)) {
                        relpath = "";
        
       @@ -438,11 +439,11 @@ writelog(FILE *fp)
                        fputs("</td><td>", fp);
                        if (ci->author)
                                xmlencode(fp, ci->author->name, strlen(ci->author->name));
       -                fputs("</td><td>", fp);
       +                fputs("</td><td class=\"num\">", fp);
                        fprintf(fp, "%zu", ci->filecount);
       -                fputs("</td><td>", fp);
       +                fputs("</td><td class=\"num\">", fp);
                        fprintf(fp, "+%zu", ci->addcount);
       -                fputs("</td><td>", fp);
       +                fputs("</td><td class=\"num\">", fp);
                        fprintf(fp, "-%zu", ci->delcount);
                        fputs("</td></tr>\n", fp);
        
       @@ -610,7 +611,7 @@ writefiles(FILE *fp)
                        xmlencode(fp, entry->path, strlen(entry->path));
                        fputs(".html\">", fp);
                        xmlencode(fp, entry->path, strlen(entry->path));
       -                fputs("</a></td><td>", fp);
       +                fputs("</a></td><td class=\"num\">", fp);
                        fprintf(fp, "%" PRIu64, entry->file_size);
                        fputs("</td></tr>\n", fp);