[PATCH] Various comments and typo fixes
Chris Shoemaker
c.shoemaker at cox.net
Thu Feb 10 17:13:23 EST 2005
* Comments and typo fixes
Index: README
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/README,v
retrieving revision 1.177.2.2
diff -u -r1.177.2.2 README
--- README 30 Dec 2004 21:37:17 -0000 1.177.2.2
+++ README 10 Feb 2005 02:10:25 -0000
@@ -359,9 +359,9 @@
The second style is the FSSTND, opt-style install. In this style,
all of the files are installed under a common subdirectory, often
in /usr/local/opt, with the binaries going to
- /usr/local/opt/foo/bin, the libs going to /usr/local/opt/foo/lib,
- etc. To request this style of install, just use the
- --enable-opt-style-install option to ./configure.
+ /usr/local/opt/'packagename'/bin, the libs going to
+ /usr/local/opt/'packagename'/lib, etc. To request this style of
+ install, just use the --enable-opt-style-install option to ./configure.
If you only want a particular language installed, you can set the
LINGUAS environment variable before you run configure. For example,
Index: src/app-utils/gnc-ui-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.c,v
retrieving revision 1.39.2.4
diff -u -r1.39.2.4 gnc-ui-util.c
--- src/app-utils/gnc-ui-util.c 17 Jan 2004 02:17:28 -0000 1.39.2.4
+++ src/app-utils/gnc-ui-util.c 10 Feb 2005 02:10:29 -0000
@@ -329,6 +329,7 @@
* Wrapper around gnc_ui_account_get_balance_full that converts
* the resulting number to a character string. The number is
* formatted according to the specification of the account currency.
+ * The caller is responsible for g_free'ing the returned memory.
*
* @param fn The underlying function in Account.c to call to retrieve
* a specific balance from the account.
@@ -429,6 +430,7 @@
return balance;
}
+/* Caller is responsible for g_free'ing returned memory */
char *
gnc_ui_account_get_tax_info_string (Account *account)
{
@@ -1730,7 +1732,7 @@
continue;
}
- /* Note we never need to check for then end of 'in_str' explicitly.
+ /* Note we never need to check for the end of 'in_str' explicitly.
* The 'else' clauses on all the state transitions will handle that. */
switch (state)
{
Index: src/app-utils/gnc-ui-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.h,v
retrieving revision 1.22.2.5
diff -u -r1.22.2.5 gnc-ui-util.h
--- src/app-utils/gnc-ui-util.h 17 Jan 2004 02:17:29 -0000 1.22.2.5
+++ src/app-utils/gnc-ui-util.h 10 Feb 2005 02:10:29 -0000
@@ -333,8 +333,9 @@
* caller must provide all the locale-specific information.
*
* Note: if group is NULL, no group-size verification will take place.
- * ignore_list is a list of characters that are completely ignored
- * while processing the input string. If NULL, nothing is ignored.
+ * ignore_list is a list of characters that are completely ignored
+ * while processing the input string. If ignore_list is NULL, nothing
+ * is ignored.
*/
gboolean
xaccParseAmountExtended (const char * in_str, gboolean monetary,
Index: src/app-utils/option-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/option-util.c,v
retrieving revision 1.19.4.4
diff -u -r1.19.4.4 option-util.c
--- src/app-utils/option-util.c 30 Dec 2004 21:37:20 -0000 1.19.4.4
+++ src/app-utils/option-util.c 10 Feb 2005 02:10:31 -0000
@@ -37,6 +37,16 @@
#include <g-wrap-wct.h>
+/* TODO:
+
+ - even though there is a make-text-option on the scheme side,
+ gnc_option_db_lookup_string_option() doesn't seem to work for
+ those, so I guess there's no way to use make-text-option
+ - for make-date-option, there seems to be only support for getting,
+ not for setting.
+*/
+
+
/****** Structures *************************************************/
struct gnc_option
@@ -2102,10 +2112,10 @@
* looks up a date option. If present, returns the absolute date *
* represented in the set_ab_value argument provided, otherwise *
* copies the default_value argument (if non-NULL) to the *
- * set_value argument. If the default_value argument is NULL, *
+ * set_ab_value argument. If the default_value argument is NULL, *
* copies the current date to set_ab_value. Whatever value is *
- * stored in set_value is return as an approximate (no *
- * nanoseconds) time_t value. set_value may be NULL, in which *
+ * stored in set_ab_value is returned as an approximate (no *
+ * nanoseconds) time_t value. set_ab_value may be NULL, in which *
* case only the return value can be used. If is_relative is *
* non-NULL, it is set to whether the date option is currently *
* storing a relative date. If it is, and set_rel_value *
@@ -2115,6 +2125,7 @@
* Args: odb - option database to search in *
* section - section name of option *
* name - name of option *
+ * is_relative - location to store boolean value *
* set_ab_value - location to store absolute option value *
* set_rel_value - location to store relative option value *
* default - default value if not found *
Index: src/app-utils/options.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/options.scm,v
retrieving revision 1.11.4.2
diff -u -r1.11.4.2 options.scm
--- src/app-utils/options.scm 17 Jan 2004 02:17:30 -0000 1.11.4.2
+++ src/app-utils/options.scm 10 Feb 2005 02:10:32 -0000
@@ -427,7 +427,9 @@
(list #f "pixmap-option: not a string"))))
#f #f #f #f)))
-;; subtype should be on of 'relative 'absolute or 'both
+;; show-time is boolean
+;; subtype should be one of 'relative 'absolute or 'both
+;; if subtype is 'absolute then relative-date-list should be #f
;; relative-date-list should be the list of relative dates permitted
;; gnc:all-relative-dates contains a list of all relative dates.
Index: src/bin/Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/Makefile.am,v
retrieving revision 1.8.4.1
diff -u -r1.8.4.1 Makefile.am
--- src/bin/Makefile.am 14 Dec 2003 08:50:16 -0000 1.8.4.1
+++ src/bin/Makefile.am 10 Feb 2005 02:10:33 -0000
@@ -8,7 +8,7 @@
# directories in their path can still invoke these commands via their
# full path, say /some/dir/not/in/path/gnucash and still have the
# right thing happen (i.e. they'll still get the right guile, and the
-# right scripts if the sub-exec anything from their scripts). If you
+# right scripts if they sub-exec anything from their scripts). If you
# want to add another gnucash script, please add the name here (which
# will cause the bindir wrapper to be created, and then put the actual
# code in a script of the same name in ./overrides. Oh, and don't
Index: src/doc/engine.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/engine.txt,v
retrieving revision 1.2
diff -u -r1.2 engine.txt
--- src/doc/engine.txt 13 Apr 2003 03:09:11 -0000 1.2
+++ src/doc/engine.txt 10 Feb 2005 02:10:33 -0000
@@ -11,7 +11,8 @@
Suppose you have a neat idea for a new feature for the GnuCash engine.
Should you create a C structure (a "first class object") and all
of the required machinery for it (e.g. an SQL backend), or should you
-just put all of the data in a suitable KVP frame somewhere?
+just put all of the data in a suitable KVP (Key Value Pair) frame
+somewhere?
The answer depends on whether the concept requires extensive
pointer chasing between different types of existing C structs,
@@ -20,7 +21,7 @@
If it seems to be an independent concept, it can still be placed
in the KVP tree of the book, which gives it a 'top-level' existance.
-If the concept is used only infreqeuntly, then it probably belongs
+If the concept is used only infrequently, then it probably belongs
in a KVP tree. If the concept has performance-critical requriements,
then it is better to implement it as a C struct, and similarly
design an appropriate SQL table around it, so that the database
@@ -29,7 +30,7 @@
Terminology:
First-class object: something that has a C struct associated with it,
-nad has its own specialized backend infrastructure for storing/quering
+and has its own specialized backend infrastructure for storing/quering
it.
Second-class object: something that lives entirely in a KVP tree.
Index: src/engine/Account.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.h,v
retrieving revision 1.110.4.8
diff -u -r1.110.4.8 Account.h
--- src/engine/Account.h 30 Dec 2004 21:37:22 -0000 1.110.4.8
+++ src/engine/Account.h 10 Feb 2005 02:10:34 -0000
@@ -290,7 +290,7 @@
* Note that when we say that a 'split' holds an 'amount', that amount
* is denominated in the account commodity. Do not confuse 'amount'
* and 'value'. The 'value' of a split is the value of the amount
- * expressed in the currency fo the transaction. Thus, for example,
+ * expressed in the currency of the transaction. Thus, for example,
* the 'amount' may be 12 apples, where the account commodity is
* 'apples'. The value of these 12 apples may be 12 dollars, where
* the transaction currency is 'dollars'.
Index: src/engine/Transaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Transaction.h,v
retrieving revision 1.141.4.7
diff -u -r1.141.4.7 Transaction.h
--- src/engine/Transaction.h 25 Aug 2004 22:46:42 -0000 1.141.4.7
+++ src/engine/Transaction.h 10 Feb 2005 02:10:35 -0000
@@ -40,7 +40,7 @@
are zero. If there are only two splits, then the value of one must be
positive, the other negative: this denotes that one account is debited,
and another is credited by an equal amount. By forcing the value of the
-splits to always 'add up' to zero, we can gaurentee that the balances
+splits to always 'add up' to zero, we can guarantee that the balances
of the accounts are always correctly balanced.
The engine does not enforce double-entry accounting, but provides an API
Index: src/engine/gnc-date.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-date.h,v
retrieving revision 1.6.2.4
diff -u -r1.6.2.4 gnc-date.h
--- src/engine/gnc-date.h 7 Jul 2004 04:10:29 -0000 1.6.2.4
+++ src/engine/gnc-date.h 10 Feb 2005 02:10:37 -0000
@@ -124,16 +124,15 @@
/** Datatypes *******************************************************/
-/** struct timespec64 is just like the unix 'struct timespec' except
- * that we use a 64-bit
- * signed int to store the seconds. This should adequately cover
- * dates in the distant future as well as the distant past, as long as
- * they're not more than a couple dozen times the age of the universe.
- * Note that both gcc and the IBM Toronto xlC compiler (aka CSet,
- * VisualAge, etc) correctly handle long long as a 64 bit quantity,
- * even on the 32-bit Intel x86 and PowerPC architectures. I'm
- * assuming that all the other modern compilers are clean on this
- * issue too. */
+/** struct timespec64 is just like the unix 'struct timespec' except
+ * that we use a 64-bit signed int to store the seconds. This should
+ * adequately cover dates in the distant future as well as the distant
+ * past, as long as they're not more than a couple dozen times the age
+ * of the universe. Note that both gcc and the IBM Toronto xlC
+ * compiler (aka CSet, VisualAge, etc) correctly handle long long as a
+ * 64 bit quantity, even on the 32-bit Intel x86 and PowerPC
+ * architectures. I'm assuming that all the other modern compilers
+ * are clean on this issue too. */
#ifndef SWIG /* swig 1.1p5 can't hack the long long type */
struct timespec64
@@ -143,15 +142,15 @@
};
#endif /* SWIG */
-/** The Timespec is just like the unix 'struct timespec'
- * except that we use a 64-bit signed int to
- * store the seconds. This should adequately cover dates in the
- * distant future as well as the distant past, as long as they're not
- * more than a couple dozen times the age of the universe. Note that
- * both gcc and the IBM Toronto xlC compiler (aka CSet, VisualAge,
- * etc) correctly handle long long as a 64 bit quantity, even on the
- * 32-bit Intel x86 and PowerPC architectures. I'm assuming that all
- * the other modern compilers are clean on this issue too. */
+/** The Timespec is just like the unix 'struct timespec' except that
+ * we use a 64-bit signed int to store the seconds. This should
+ * adequately cover dates in the distant future as well as the distant
+ * past, as long as they're not more than a couple dozen times the age
+ * of the universe. Note that both gcc and the IBM Toronto xlC
+ * compiler (aka CSet, VisualAge, etc) correctly handle long long as a
+ * 64 bit quantity, even on the 32-bit Intel x86 and PowerPC
+ * architectures. I'm assuming that all the other modern compilers
+ * are clean on this issue too. */
typedef struct timespec64 Timespec;
@@ -449,7 +448,7 @@
void gnc_tm_get_day_end(struct tm *tm, time_t time_val);
/** The gnc_timet_get_day_start() routine will take the given time in
- * seconds and adjust it to the last second of that day. */
+ * seconds and adjust it to the first second of that day. */
time_t gnc_timet_get_day_start(time_t time_val);
/** The gnc_timet_get_day_end() routine will take the given time in
@@ -457,7 +456,7 @@
time_t gnc_timet_get_day_end(time_t time_val);
/** The gnc_timet_get_day_start() routine will take the given time in
- * GLib GDate format and adjust it to the last second of that day. */
+ * GLib GDate format and adjust it to the first second of that day. */
time_t gnc_timet_get_day_start_gdate (GDate *date);
/** The gnc_timet_get_day_end() routine will take the given time in
Index: src/engine/gnc-pricedb.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-pricedb.c,v
retrieving revision 1.48.4.7
diff -u -r1.48.4.7 gnc-pricedb.c
--- src/engine/gnc-pricedb.c 30 Dec 2004 21:37:22 -0000 1.48.4.7
+++ src/engine/gnc-pricedb.c 10 Feb 2005 02:10:38 -0000
@@ -610,6 +610,9 @@
result = g_new0(GNCPriceDB, 1);
qof_instance_init (&result->inst, GNC_ID_PRICEDB, book);
+ /* This leaks result when the collection is destroyed. When
+ qofcollection is fixed to allow a destroy notifier, we'll need to
+ provide one here. */
qof_collection_set_data (col, result);
result->commodity_hash = g_hash_table_new(commodity_hash, commodity_equal);
Index: src/engine/guid.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/guid.h,v
retrieving revision 1.15.6.5
diff -u -r1.15.6.5 guid.h
--- src/engine/guid.h 7 Jul 2004 04:10:29 -0000 1.15.6.5
+++ src/engine/guid.h 10 Feb 2005 02:10:39 -0000
@@ -118,7 +118,7 @@
* Note that while guid's are generated randomly, the odds of this
* routine returning a non-unique id are astronomically small.
* (Literally astronomically: If you had Cray's on every solar
- * system in the universe running for the entire age of teh universe,
+ * system in the universe running for the entire age of the universe,
* you'd still have less than a one-in-a-million chance of coming up
* with a duplicate id. 2^128 == 10^38 is a really really big number.)
*/
@@ -127,13 +127,19 @@
/** Generate a new id. If no initialization function has been called,
* guid_init() will be called before the id is created.
*
- * @return guid A pointer to a data structure contaiing a new GUID.
+ * @return guid A pointer to a data structure containing a new GUID.
* The memory pointed to is owned by this routine and the guid must
- * be copied out.
+ * be copied out.
+ *
+ * CAS: huh? make that: @return guid A data structure containing a newly
+ * allocated GUID. Caller is responsible for calling guid_free().
*/
const GUID guid_new_return(void);
/** Returns a GUID which is guaranteed to never reference any entity. */
+/* CAS: AFAICT: this isn't really guaranteed, but it's only as likely
+ as any other md5 collision. This could be guaranteed if GUID
+ contained a validity flag. */
const GUID * guid_null (void);
/** Efficiently allocate & free memory for GUIDs */
Index: src/engine/qofbook.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbook.h,v
retrieving revision 1.5.2.5
diff -u -r1.5.2.5 qofbook.h
--- src/engine/qofbook.h 25 Aug 2004 22:46:42 -0000 1.5.2.5
+++ src/engine/qofbook.h 10 Feb 2005 02:10:40 -0000
@@ -81,7 +81,14 @@
associated with it. */
void qof_book_destroy (QofBook *book);
-/** \return The table of entities of the given type.
+/** \return The table of entities of the given type.
+ *
+ * When an object's constructor calls qof_instance_init(), a
+ * reference to the object is stored in the book. The book stores
+ * all the references to initialized instances, sorted by type. This
+ * function returns a collection of the references for the specified
+ * type.
+ *
* If the collection doesn't yet exist for the indicated type,
* it is created. Thus, this routine is gaurenteed to return
* a non-NULL value. (Unless the system malloc failed (out of
@@ -94,11 +101,11 @@
void qof_book_foreach_collection (QofBook *, QofCollectionForeachCB, gpointer);
/** \return The kvp data for the book.
- * Note that the boom KVP data is persistant, and is stored/retrevied
+ * Note that the book KVP data is persistant, and is stored/retrieved
* from the file/database. Thus, the book KVP is the correct place to
* store data that needs to be persistant accross sessions (or shared
* between multiple users). To store application runtime data, use
- * qof_book_set_data() isntead.
+ * qof_book_set_data() instead.
*/
#define qof_book_get_slots(book) qof_instance_get_slots(QOF_INSTANCE(book))
@@ -120,7 +127,7 @@
*/
void qof_book_set_data_fin (QofBook *book, const char *key, gpointer data, QofBookFinalCB);
-/** Retreives arbitrary pointers to structs stored by qof_book_set_data. */
+/** Retrieves arbitrary pointers to structs stored by qof_book_set_data. */
gpointer qof_book_get_data (QofBook *book, const char *key);
/** DOCUMENT ME! */
@@ -137,7 +144,7 @@
* anything about saving. Its just that whenever data is modified,
* the 'dirty' flag is set. This routine returns the value of the
* 'dirty' flag. Its up to the backend to periodically reset this
- * flag, when it acutally does save the data.)
+ * flag, when it actually does save the data.)
*/
gboolean qof_book_not_saved (QofBook *book);
Index: src/engine/qofclass.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofclass.h,v
retrieving revision 1.1.6.2
diff -u -r1.1.6.2 qofclass.h
--- src/engine/qofclass.h 7 Jul 2004 04:10:29 -0000 1.1.6.2
+++ src/engine/qofclass.h 10 Feb 2005 02:10:40 -0000
@@ -1,5 +1,5 @@
/********************************************************************\
- * qofclass.h -- API for registering paramters on objects *
+ * qofclass.h -- API for registering parameters on objects *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
Index: src/engine/qofid.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofid.c,v
retrieving revision 1.3.2.5
diff -u -r1.3.2.5 qofid.c
--- src/engine/qofid.c 25 Aug 2004 22:46:42 -0000 1.3.2.5
+++ src/engine/qofid.c 10 Feb 2005 02:10:40 -0000
@@ -43,7 +43,7 @@
gboolean is_dirty;
GHashTable * hash_of_entities;
- gpointer data; /* place where object class can hang arbitrari data */
+ gpointer data; /* place where object class can hang arbitrary data */
};
/* =============================================================== */
Index: src/gnome-utils/gnc-tree-model-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-model-account.c,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 gnc-tree-model-account.c
--- src/gnome-utils/gnc-tree-model-account.c 3 May 2004 07:33:24 -0000 1.1.2.13
+++ src/gnome-utils/gnc-tree-model-account.c 10 Feb 2005 02:10:57 -0000
@@ -49,6 +49,7 @@
static void gnc_tree_model_account_finalize (GObject *object);
static void gnc_tree_model_account_destroy (GtkObject *object);
+/** Implementation of GtkTreeModel **************************************/
static void gnc_tree_model_account_tree_model_init (GtkTreeModelIface *iface);
static guint gnc_tree_model_account_get_flags (GtkTreeModel *tree_model);
static int gnc_tree_model_account_get_n_columns (GtkTreeModel *tree_model);
@@ -80,9 +81,11 @@
GtkTreeIter *iter,
GtkTreeIter *child);
+/** Helper Functions ****************************************************/
static void gnc_tree_model_account_set_toplevel (GncTreeModelAccount *model,
Account *toplevel);
+/** Component Manager Callback ******************************************/
static void gnc_tree_model_account_event_handler (GUID *entity, QofIdType type,
GNCEngineEventType event_type,
gpointer user_data);
Index: src/gnome-utils/gnc-tree-model-commodity.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-model-commodity.h,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 gnc-tree-model-commodity.h
--- src/gnome-utils/gnc-tree-model-commodity.h 30 Nov 2003 23:38:30 -0000 1.1.2.5
+++ src/gnome-utils/gnc-tree-model-commodity.h 10 Feb 2005 02:10:57 -0000
@@ -25,7 +25,7 @@
/** @addtogroup Engine
@{ */
-/** @file gnc-tree-model-account.h
+/** @file gnc-tree-model-commodity.h
@brief GtkTreeModel implementation for gnucash commodities.
@author Jan Arne Petersen <jpetersen at uni-bonn.de>
@author David Hampton <hampton at employees.org>
Index: src/gnome-utils/gnc-tree-view-common.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-view-common.h,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 gnc-tree-view-common.h
--- src/gnome-utils/gnc-tree-view-common.h 30 Nov 2003 22:24:48 -0000 1.1.2.1
+++ src/gnome-utils/gnc-tree-view-common.h 10 Feb 2005 02:10:58 -0000
@@ -72,7 +72,7 @@
* @param stock_icon The name of the stock icon to use in the first
* column of the tree. If null, no icon will be included.
*
- * @param defaults A pointer to the data structure destribing the
+ * @param defaults A pointer to the data structure describing the
* tree view. */
void gnc_tree_view_common_create_columns (GtkTreeView *view,
const gchar *tree_name,
@@ -96,7 +96,7 @@
* @param section The name of a gconf section where the tree
* information should be saved.
*
- * @param defaults A pointer to the data structure destribing the
+ * @param defaults A pointer to the data structure describing the
* tree view. */
void gnc_tree_view_common_save_settings (GtkTreeView *view,
const gchar *section,
@@ -115,7 +115,7 @@
* @param section The name of a gconf section where the tree
* information should be restored from.
*
- * @param defaults A pointer to the data structure destribing the
+ * @param defaults A pointer to the data structure describing the
* tree view. */
void gnc_tree_view_common_restore_settings (GtkTreeView *view,
const gchar *section,
Index: src/gnome-utils/gnc-frequency.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-frequency.h,v
retrieving revision 1.4.4.4
diff -u -r1.4.4.4 gnc-frequency.h
--- src/gnome-utils/gnc-frequency.h 8 Aug 2003 23:26:54 -0000 1.4.4.4
+++ src/gnome-utils/gnc-frequency.h 10 Feb 2005 02:10:55 -0000
@@ -70,7 +70,7 @@
/**
* Create a new freq spec widget.
- * The menus and panaels will be initialized to correspond to the
+ * The menus and panels will be initialized to correspond to the
* settings in the FreqSpec, and the date window will show the
* indicated date. Either or both may be NULL.
* For the default freq spec widget, use 'NULL'.
@@ -97,6 +97,7 @@
* implementation, the default label text is "Frequency:"
*/
void gnc_frequency_set_frequency_label_text (GNCFrequency *gf, const gchar *txt);
+
/**
* Set the label text for the date entry widget. In the current
* impelmentation, the default label text is "Start Date:"
More information about the gnucash-patches
mailing list