r15845 - gnucash/trunk/lib/libqof/qof - Remove unused functions qof_print_{hours, minutes}_elapsed_buff().

Andreas Köhler andi5 at cvs.gnucash.org
Fri Apr 6 19:29:57 EDT 2007


Author: andi5
Date: 2007-04-06 19:29:56 -0400 (Fri, 06 Apr 2007)
New Revision: 15845
Trac: http://svn.gnucash.org/trac/changeset/15845

Modified:
   gnucash/trunk/lib/libqof/qof/gnc-date.c
   gnucash/trunk/lib/libqof/qof/gnc-date.h
Log:
Remove unused functions qof_print_{hours,minutes}_elapsed_buff().


Modified: gnucash/trunk/lib/libqof/qof/gnc-date.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/gnc-date.c	2007-04-06 22:59:34 UTC (rev 15844)
+++ gnucash/trunk/lib/libqof/qof/gnc-date.c	2007-04-06 23:29:56 UTC (rev 15845)
@@ -505,81 +505,6 @@
 /* ============================================================== */
 
 size_t
-qof_print_hours_elapsed_buff (char * buff, size_t len, int secs, gboolean show_secs)
-{
-	size_t flen;
-	if (0 <= secs)
-	{
-		if (show_secs)
-		{
-			flen = g_snprintf(buff, len,
-			   "%02d:%02d:%02d", (int)(secs / 3600),
-			   (int)((secs % 3600) / 60), (int)(secs % 60));
-		}
-		else
-		{
-			flen = g_snprintf(buff, len, 
-			   "%02d:%02d", (int)(secs / 3600),
-			   (int)((secs % 3600) / 60));
-		}
-	} 
-	else 
-	{
-		if (show_secs)
-		{
-			flen = g_snprintf(buff, len,
-			   "-%02d:%02d:%02d", (int)(-secs / 3600),
-			   (int)((-secs % 3600) / 60), (int)(-secs % 60));
-		}
-		else
-		{
-			flen = g_snprintf(buff, len,
-			   "-%02d:%02d", (int)(-secs / 3600),
-			   (int)((-secs % 3600) / 60));
-		}
-	}
-	return flen;
-}
-
-/* ============================================================== */
-
-size_t
-qof_print_minutes_elapsed_buff (char * buff, size_t len, int secs, gboolean show_secs)
-{
-	size_t flen;
-	if (0 <= secs)
-	{
-		if (show_secs)
-		{
-			flen = g_snprintf(buff, len,
-			   "%02d:%02d", 
-				(int)(secs / 60), (int)(secs % 60));
-		}
-		else
-		{
-			flen = g_snprintf(buff, len, 
-			   "%02d", (int)(secs / 60));
-		}
-	} 
-	else 
-	{
-		if (show_secs)
-		{
-			flen = g_snprintf(buff, len,
-			   "-%02d:%02d", (int)(-secs / 60), (int)(-secs % 60));
-		}
-		else
-		{
-			flen = g_snprintf(buff, len,
-			   "-%02d", (int)(-secs / 60));
-		}
-	}
-	return flen;
-}
-
-/* ============================================================== */
-
-size_t
 qof_print_date_time_buff (char * buff, size_t len, time_t secs)
 {
   int flen;

Modified: gnucash/trunk/lib/libqof/qof/gnc-date.h
===================================================================
--- gnucash/trunk/lib/libqof/qof/gnc-date.h	2007-04-06 22:59:34 UTC (rev 15844)
+++ gnucash/trunk/lib/libqof/qof/gnc-date.h	2007-04-06 23:29:56 UTC (rev 15845)
@@ -396,14 +396,6 @@
 /* ------------------------------------------------------------------ */
 /* time printing utilities */
 
-/** The qof_print_hours_elapsed_buff() routine will print the 'secs' argument
- *    as HH:MM, and will print the seconds if show_secs is true.  
- *    Thus, for example, secs=3599 will print as 0:59
- *    Returns the number of bytes copied.
- */
-size_t qof_print_hours_elapsed_buff (char * buff, size_t len, int secs, gboolean show_secs);
-size_t qof_print_minutes_elapsed_buff (char * buff, size_t len, int secs, gboolean show_secs);
-
 /** The qof_print_time_buff() routine prints only the hour-part of the date.
  *    Thus, if secs is  ...
  *    Returns the number of bytes printed.



More information about the gnucash-changes mailing list