r20513 - gnucash/trunk/src/libqof/qof - Make some functions static which are used only inside libqof.

Christian Stimming cstim at code.gnucash.org
Sat Apr 2 15:59:07 EDT 2011


Author: cstim
Date: 2011-04-02 15:59:06 -0400 (Sat, 02 Apr 2011)
New Revision: 20513
Trac: http://svn.gnucash.org/trac/changeset/20513

Modified:
   gnucash/trunk/src/libqof/qof/gnc-date.c
   gnucash/trunk/src/libqof/qof/gnc-date.h
   gnucash/trunk/src/libqof/qof/qofreference-p.h
   gnucash/trunk/src/libqof/qof/qofsession.c
Log:
Make some functions static which are used only inside libqof.

Modified: gnucash/trunk/src/libqof/qof/gnc-date.c
===================================================================
--- gnucash/trunk/src/libqof/qof/gnc-date.c	2011-04-02 19:58:56 UTC (rev 20512)
+++ gnucash/trunk/src/libqof/qof/gnc-date.c	2011-04-02 19:59:06 UTC (rev 20513)
@@ -94,6 +94,8 @@
 /********************************************************************\
 \********************************************************************/
 
+static time_t xaccDMYToSec (gint day, gint month, gint year);
+
 const char*
 gnc_date_dateformat_to_string(QofDateFormat format)
 {
@@ -1009,7 +1011,7 @@
 }
 #endif /* G_OS_WIN32 */
 
-gchar *
+static gchar *
 qof_format_time(const gchar *format, const struct tm *tm)
 {
     gchar *locale_format, *tmpbuf, *retval;
@@ -1115,7 +1117,7 @@
 return A pointer to the generated string.
 The caller owns this buffer and must free it when done.
 */
-char *
+static char *
 xaccDateUtilGetStamp (time_t thyme)
 {
     struct tm *stm;
@@ -1423,7 +1425,7 @@
 /* hack alert -- this routine returns incorrect values for
  * dates before 1970 */
 
-time_t
+static time_t
 xaccDMYToSec (int day, int month, int year)
 {
     struct tm stm;

Modified: gnucash/trunk/src/libqof/qof/gnc-date.h
===================================================================
--- gnucash/trunk/src/libqof/qof/gnc-date.h	2011-04-02 19:58:56 UTC (rev 20512)
+++ gnucash/trunk/src/libqof/qof/gnc-date.h	2011-04-02 19:59:06 UTC (rev 20513)
@@ -273,7 +273,7 @@
  * routine might return incorrect values for dates before 1970.  */
 void gnc_timespec2dmy (Timespec ts, gint *day, gint *month, gint *year);
 
-/** \warning hack alert XXX FIXME -- these date routines return incorrect
+/* \warning hack alert XXX FIXME -- these date routines return incorrect
  * values for dates before 1970.  Most of them are good only up
  * till 2038.  This needs fixing ...
  *
@@ -281,7 +281,7 @@
  * the user wanted the time at noon, localtime.  The returned
  * time_t should be seconds (at GMT) of the local noon-time.
 */
-time_t xaccDMYToSec (gint day, gint month, gint year);
+/* time_t xaccDMYToSec (gint day, gint month, gint year); */
 
 /** The gnc_timezone function returns the number of seconds *west*
  * of UTC represented by the tm argument, adjusted for daylight
@@ -366,7 +366,7 @@
  * itself, instead of depending on the routines here.
  */
 
-/** qof_format_time takes a format specification in UTF-8 and a broken-down time,
+/* qof_format_time takes a format specification in UTF-8 and a broken-down time,
  *  tries to call strftime with a sufficiently large buffer and, if successful,
  *  return a newly allocated string in UTF-8 for the printing result.
  *
@@ -376,7 +376,7 @@
  *
  *  @return A newly allocated string on success, or NULL otherwise.
  */
-gchar *qof_format_time(const gchar *format, const struct tm *tm);
+/* gchar *qof_format_time(const gchar *format, const struct tm *tm); */
 
 /** qof_strftime calls qof_format_time to print a given time and afterwards tries
  *  to put the result into a buffer of fixed size.
@@ -443,12 +443,12 @@
 size_t qof_print_date_time_buff (char * buff, size_t len, time_t secs);
 
 /* ------------------------------------------------------------------ */
-/** The xaccDateUtilGetStamp() routine will take the given time in
+/* The xaccDateUtilGetStamp() routine will take the given time in
  *  seconds and return a buffer containing a textual for the date.
  *  @param thyme The time in seconds to convert.
  *  @return A pointer to the generated string.
  *  @note The caller owns this buffer and must free it when done. */
-char * xaccDateUtilGetStamp (time_t thyme);
+/* char * xaccDateUtilGetStamp (time_t thyme); */
 
 /** qof_scan_date
  *    Convert a string into  day / month / year integers according to

Modified: gnucash/trunk/src/libqof/qof/qofreference-p.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofreference-p.h	2011-04-02 19:58:56 UTC (rev 20512)
+++ gnucash/trunk/src/libqof/qof/qofreference-p.h	2011-04-02 19:59:06 UTC (rev 20513)
@@ -115,16 +115,6 @@
     const GncGUID      *ent_guid;   /**< The GncGUID of the original entity. */
 } QofInstanceReference;
 
-/** \brief Adds a new reference to the partial book data hash.
-
-Retrieves any existing reference list and appends the new reference.
-
-If the book is not already marked as partial, it will be marked as
-partial.
-*/
-void
-qof_session_update_reference_list(QofSession *session, QofInstanceReference *reference);
-
 /** Used as the key value for the QofBook data hash.
  *
  * Retrieved later by QSF (or any other suitable backend) to

Modified: gnucash/trunk/src/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofsession.c	2011-04-02 19:58:56 UTC (rev 20512)
+++ gnucash/trunk/src/libqof/qof/qofsession.c	2011-04-02 19:59:06 UTC (rev 20513)
@@ -341,7 +341,14 @@
     }
 }
 
-void
+/** \brief Adds a new reference to the partial book data hash.
+
+Retrieves any existing reference list and appends the new reference.
+
+If the book is not already marked as partial, it will be marked as
+partial.
+*/
+static void
 qof_session_update_reference_list(QofSession *session, QofInstanceReference *reference)
 {
     QofBook  *book;



More information about the gnucash-changes mailing list