mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 04:04:07 -06:00
e19df01f5f
* HACKING: Added instructions about running under valgrind. * lib/gnucash_valgrind.supp: Added a large set of valgrind suppressions for both guile and gnucash. * src/register/ledger-core/gnc-ledger-display.c (gnc_ledger_display_template_gl): Change the reg_type to SEARCH_LEDGER so all the 'action' types appear. Bug#108833. * src/gnome/glade/sched-xact.glade: Remove unused 'ledger_status' widget. Bug#102269. * src/gnome-utils/gnc-dense-cal.c (gnc_dense_cal_draw_to_buffer): At least be consistent about the background coloring of the month labels, even if we're still not using GTK themeage correctly. * src/gnome-utils/gnc-dense-cal.c (gnc_dense_cal_destroy): Destroy the transient window when the widget is destroyed. Bug#103910. * src/gnome/dialog-scheduledxaction.c (gnc_ui_scheduled_xaction_editor_dialog_create): Make the advance and remind spin-buttons editable [Bug#94963]. * src/gnome/glade/sched-xact.glade: Change the upper bound on the advance and remind spins to 365 [days], with a page-size of 30 [days]. * src/gnome/dialog-sx-from-trans.c (gnc_sx_create_from_trans): Disallow the Scheduling of being-editing transactions in the Register, preventing a class of unbalacned SX template transactions from being entered and propogated through the system. See Bug#130330. * src/engine/FreqSpec.c (xaccFreqSpecGetFreqStr): Fix nasty memory-corruption issue; insufficent bounds checking on array index. Bug#125600. * src/gnome/dialog-sxsincelast.c (create_each_transaction_helper): Better handling of various error cases in transaction-creation. Bug#120311; Bug#130330. 2004-03-01 Joshua Sled <jsled@asynchronous.org> * src/gnome/dialog-scheduledxaction.c (gnc_sxed_check_consistent): Fix for part of Bug#121740 -- only allow auto-create SXes which have splits to be created. 2004-02-07 Joshua Sled <jsled@asynchronous.org> * src/gnome/dialog-scheduledxaction.c (editor_ok_button_clicked): * src/gnome-utils/gnc-frequency.c (gnc_frequency_save_state): * src/backend/file/gnc-freqspec-xml-v2.c (fs_none_handler): * src/engine/FreqSpec.c (xaccFreqSpecGetFreqStr): Adding "NONE" as an allowable FreqSpec [Bug#103968]. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9858 57a11ea4-9604-0410-9ed3-97b8803252fd
143 lines
4.4 KiB
Plaintext
143 lines
4.4 KiB
Plaintext
Hacking Guidelines
|
|
==================
|
|
|
|
This document is an introduction to hacking on GnuCash.
|
|
|
|
Related Documents
|
|
-----------------
|
|
|
|
In addition to this file, you should read the README file, which
|
|
explains the details of getting the CVS source, building GnuCash,
|
|
and creating patches for submission.
|
|
|
|
The src/doc/design directory contains a preliminary design document
|
|
which you should read as well. You should also feel free to hack on
|
|
the design document.
|
|
|
|
|
|
Coding Style Conventions
|
|
------------------------
|
|
|
|
General:
|
|
|
|
* When modifying a file, the style convention in that file should be
|
|
followed.
|
|
|
|
* When creating a new file, the style of existing files should be
|
|
followed.
|
|
|
|
* When creating lots of new files in a new directory, you may use
|
|
your own coding standards, but please try to stick as closely as
|
|
possible to the GNU coding standards.
|
|
|
|
* Do not submit patches that consist of (gratuitous) stylistic changes.
|
|
|
|
|
|
C:
|
|
|
|
* Use ISO C.
|
|
|
|
* Use glib memory routines where possible. This means you should be
|
|
using g_malloc(), g_new(), g_free(), etc., instead of malloc(),
|
|
free(), etc. Do not mix glib memory calls with libc calls!
|
|
|
|
* Where possible, use glib data abstractions instead of rolling your
|
|
own. Glib linked lists and pointer arrays are very convenient and
|
|
have been extensively used and tested.
|
|
|
|
* All gnucash functions and global variables are prefixed with gnc_
|
|
|
|
* Use static functions whenever possible
|
|
|
|
* Use const whenever possible
|
|
|
|
|
|
Scheme:
|
|
|
|
* All gnucash functions and global variables are prefixed with gnc:
|
|
|
|
* All global variables are enclosed in ** (i.e. gnc:*load-path*)
|
|
|
|
* All private functions are enclosed in __ (i.e. gnc:_do-not-call_)
|
|
|
|
* All C functions wrapped with g-wrap have dashes in place of underscores.
|
|
(xaccSplitGetBalance --> gnc:split-get-balance).
|
|
|
|
|
|
Dave Peticolas <dave@krondo.com>
|
|
August 22, 2000
|
|
|
|
=====================================================================
|
|
TIPS AND HINTS
|
|
=====================================================================
|
|
|
|
Starting Gnucash from the build tree:
|
|
-------------------------------------
|
|
|
|
To run gnucash from your build tree:
|
|
-- edit ./src/bin/overrides/gnucash and replace gnucash-env with
|
|
gnucash-build-env
|
|
-- then start gnucash by saying ./src/bin/overrides/gnucash
|
|
-- Make sure you undo this change before installing gnucash
|
|
|
|
|
|
Getting Trace Messages From GnuCash:
|
|
------------------------------------
|
|
Note that piping stdout from gnucash to a file causes gnucash to crash.
|
|
Don't know why, this is a bug that needs to be fixed. Here's another
|
|
way to get trace messages into a file:
|
|
|
|
-- edit src/engine/gnc-trace.c, adjust values in the array
|
|
gnc_log_modules[] to what you want to have for a given module.
|
|
-- edit gnc_log_init() to fopen() the log file where you want
|
|
messages to go to.
|
|
|
|
|
|
Starting GnuCash in GDB
|
|
-----------------------
|
|
To run gdb on an installed version of gnucash (installed in /usr/local/bin:)
|
|
|
|
% gnucash-env gdb /usr/bin/guile
|
|
[gdb output]
|
|
% gdb> run -e main -s /usr/local/libexec/gnucash/overrides/gnucash --g-fatal-warnings
|
|
|
|
To run gdb on the version in your build tree:
|
|
|
|
% ./src/bin/overrides/gnucash-build-env gdb /usr/bin/guile
|
|
[gdb output]
|
|
% gdb> run -e main -s ./src/bin/overrides/gnucash --g-fatal-warnings
|
|
|
|
|
|
Using Electric Fence with GnuCash
|
|
---------------------------------
|
|
% configure --enable-efence
|
|
(except this doesn't actually enable efence :-( need to hack
|
|
configure.in and add $LIBS = -lefence and re-run ./autogen.sh)
|
|
|
|
Don't know why, efence does not currently work with gnucash:
|
|
I get a bunch of errors:
|
|
warning: Cannot initialize thread debugging library: unknown thread_db error '22'
|
|
|
|
If you know how to fix this, please update tehse instructions.
|
|
|
|
|
|
Using Valgrind with GnuCash
|
|
---------------------------
|
|
-- run ./src/bin/overrides/gnucash-valgrind
|
|
|
|
However, I did not find valgrind to be useful. It reported a bunch of
|
|
guile bugs, some g_has_table bugs, and then the program exited prematurely
|
|
for no appearenet reason. :-(
|
|
|
|
For the moment, use the supressions in lib/gnucash_valgrind.supp.
|
|
|
|
This file needs to be cleaned up in two ways:
|
|
|
|
1/ There are a bunch of duplicate supressions in the file.
|
|
* The supressions in place were auto-generated by valgrind itself
|
|
[--gen-suppressions=yes], and it makes no effort to output the
|
|
suppression only once.
|
|
|
|
2/ There are a bunch of suppressions which need to not be supressions, but
|
|
instead just not be generated by valgrind.
|