source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Remove unused function.
@ 2011-07-17 15:24 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-07-17 15:24 UTC (permalink / raw)
  To: source

Log Message:
-----------
Remove unused function.

Modified Files:
--------------
    mdocml:
        out.c
        out.h

Revision Data
-------------
Index: out.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/out.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -Lout.c -Lout.c -u -p -r1.40 -r1.41
--- out.c
+++ out.c
@@ -132,48 +132,6 @@ a2roffsu(const char *src, struct roffsu 
 	return(1);
 }
 
-
-/*
- * Correctly writes the time in nroff form, which differs from standard
- * form in that a space isn't printed in lieu of the extra %e field for
- * single-digit dates.
- */
-void
-time2a(time_t t, char *dst, size_t sz)
-{
-	struct tm	 tm;
-	char		 buf[5];
-	char		*p;
-	size_t		 nsz;
-
-	assert(sz > 1);
-	localtime_r(&t, &tm);
-
-	p = dst;
-	nsz = 0;
-
-	dst[0] = '\0';
-
-	if (0 == (nsz = strftime(p, sz, "%B ", &tm)))
-		return;
-
-	p += (int)nsz;
-	sz -= nsz;
-
-	if (0 == strftime(buf, sizeof(buf), "%e, ", &tm))
-		return;
-
-	nsz = strlcat(p, buf + (' ' == buf[0] ? 1 : 0), sz);
-
-	if (nsz >= sz)
-		return;
-
-	p += (int)nsz;
-	sz -= nsz;
-
-	(void)strftime(p, sz, "%Y", &tm);
-}
-
 /*
  * Calculate the abstract widths and decimal positions of columns in a
  * table.  This routine allocates the columns structures then runs over
Index: out.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/out.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lout.h -Lout.h -u -p -r1.20 -r1.21
--- out.h
+++ out.h
@@ -64,7 +64,6 @@ __BEGIN_DECLS
 	while (/* CONSTCOND */ 0)
 
 int	  	  a2roffsu(const char *, struct roffsu *, enum roffscale);
-void	  	  time2a(time_t, char *, size_t);
 void	  	  tblcalc(struct rofftbl *tbl, const struct tbl_span *);
 
 __END_DECLS
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-17 15:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-17 15:24 mdocml: Remove unused function kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).