stagit

static git page generator  https://git.ce9e.org
git clone https://git.ce9e.org/stagit.git

commit
da7dd53f107b35057ec7c883f05c902af1949b30
parent
c40e435cebc4d94258cccd1a26328c1069fc5855
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-03-28 08:01
rm printtime

Diffstat

M stagit.c 23 ++---------------------

1 files changed, 2 insertions, 21 deletions


diff --git a/stagit.c b/stagit.c

@@ -304,25 +304,6 @@ printtimez(FILE *fp, const git_time *intime)
  304   304 }
  305   305 
  306   306 void
  307    -1 printtime(FILE *fp, const git_time *intime)
  308    -1 {
  309    -1 	struct tm *intm;
  310    -1 	time_t t;
  311    -1 	char out[32];
  312    -1 
  313    -1 	t = (time_t)intime->time + (intime->offset * 60);
  314    -1 	if (!(intm = gmtime(&t)))
  315    -1 		return;
  316    -1 	strftime(out, sizeof(out), "%a, %e %b %Y %H:%M:%S", intm);
  317    -1 	if (intime->offset < 0)
  318    -1 		fprintf(fp, "%s -%02d%02d", out,
  319    -1 		            -(intime->offset) / 60, -(intime->offset) % 60);
  320    -1 	else
  321    -1 		fprintf(fp, "%s +%02d%02d", out,
  322    -1 		            intime->offset / 60, intime->offset % 60);
  323    -1 }
  324    -1 
  325    -1 void
  326   307 printtimeshort(FILE *fp, const git_time *intime)
  327   308 {
  328   309 	struct tm *intm;
@@ -418,7 +399,7 @@ printcommit(FILE *fp, struct commitinfo *ci)
  418   399 		fputs("\">", fp);
  419   400 		xmlencode(fp, ci->author->email, strlen(ci->author->email));
  420   401 		fputs("</a>&gt;\n<b>Date:</b>   ", fp);
  421    -1 		printtime(fp, &(ci->author->when));
   -1   402 		printtimeshort(fp, &(ci->author->when));
  422   403 		fputc('\n', fp);
  423   404 	}
  424   405 	if (ci->msg) {
@@ -690,7 +671,7 @@ printcommitatom(FILE *fp, struct commitinfo *ci)
  690   671 		fputs(" &lt;", fp);
  691   672 		xmlencode(fp, ci->author->email, strlen(ci->author->email));
  692   673 		fputs("&gt;\nDate:   ", fp);
  693    -1 		printtime(fp, &(ci->author->when));
   -1   674 		printtimeshort(fp, &(ci->author->when));
  694   675 		fputc('\n', fp);
  695   676 	}
  696   677 	if (ci->msg) {