If the return value of pow is not saved in a double but rather used for
other calculations or casts, results can be bad, like pow(10, 2) being
99 instead of 100. Wrap pow and store the return value first before
continuing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15484 57a11ea4-9604-0410-9ed3-97b8803252fd
Mkstemp is unavailable on Windows and g_rename is preferred. Completes
r15435 on trunk and must not be backported.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15449 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove empty directory lib/glib26. Add lib/glib28 instead with the
necessary sources and headers to have the following functions even on a
GLib 2.6 system (!defined(HAVE_GLIB_2_8))
- g_access, g_chmod,
- g_file_set_contents,
- g_win32_locale_filename_from_utf8.
Make use of them, improving r15429 and r15430.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15445 57a11ea4-9604-0410-9ed3-97b8803252fd
This could be a security issue if someone else, say, makes a symlink
to somewhere else. Instead, create a tempfile and then rename it
into place which is safe against the symlink attack.
Patch by Bill Nottingham <notting@redhat.com>
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15435 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace open, fopen, stat and unlink by their GLib wrappers so that
files on Windows will be handled with the wide character api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15407 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace opendir, readdir and closedir by their GLib wrappers so that
files on Windows will be retrieved with the wide character api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15403 57a11ea4-9604-0410-9ed3-97b8803252fd
Ask for GLib 2.6 and GTK+ 2.6. Let the included GOffice 0.0.4 and LibGSF
1.12.3 use their native base dependencies. Remove all #ifdefs and
compatibility code that were necessary to make GnuCash, GOffice and
LibGSF compile on an older setup (GLib 2.4, Pango 1.6, GTK+ 2.4).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15400 57a11ea4-9604-0410-9ed3-97b8803252fd
Rename libcore-utils to libgnc-core-utils
Rename libgncgnome to libgnc-gnome
Rename libgncmodule to libgnc-module
Rename libgncqof to libgnc-qof
Rename libgnc-backend-file to libgncmod-backend-file
Move libgnc-business-ledger to $prefix/lib
Move libgncqof-backend-qsf to $prefix/lib/gnucash
Move libgncmod-backend-file to $prefix/lib/gnucash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15321 57a11ea4-9604-0410-9ed3-97b8803252fd
If the GncModule system finds a QofBackendProvider module M before that
has been initialized by QOF, M will register itself with QOF but does
not mark itself as resident, so the module system will unload it again,
leaving bogus pointers in QOF. Now it does.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15320 57a11ea4-9604-0410-9ed3-97b8803252fd
Change it to check_PROGRAMS
use <prog>_CPPFLAGS instead of DEFS -- this works great!
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15302 57a11ea4-9604-0410-9ed3-97b8803252fd
Add a lock to the QofSession object, and use it in qof_session_save() to
protect against re-entrance.
The lock always starts at 1 and is 0 while inside qof_session_save().
If another call is made to qof_session_save() while one is in progress,
the lock will momentarily drop below 0 before returning to zero.
Note: The per-session nature of the lock would make it appear that we support
concurrent saving of different sessions. In fact, we do not, because the
file backend blocks the main process until the forked gzip process is
finished, and it only knows how to keep track of one child pid at a time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15168 57a11ea4-9604-0410-9ed3-97b8803252fd
g-wrap is gone. I, for one, welcome our new swig overlords.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15024 57a11ea4-9604-0410-9ed3-97b8803252fd
Override the Transaction Number to sort numerically.
* lib/libqof/qof/qofclass.h:
* lib/libqof/qof/qofquery.c:
* lib/libqof/qof/qofquerycore-p.h:
* lib/libqof/qof/qofquerycore.[ch]:
- Publish the QofCompareFunc prototype.
- Add a new QofParam param_compfcn parameter
- Change QofQuery to use the param_compfcn over the
default type compare function.
- create (and publish) a qof API to compare strings
as numbers: qof_string_number_compare_func()
* src/engine/Transaction.c:
Assign TRANS_NUM to use qof_string_numer_compare_func()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14903 57a11ea4-9604-0410-9ed3-97b8803252fd
Now you can run one query off of the results of another query.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14901 57a11ea4-9604-0410-9ed3-97b8803252fd
This new type is like QOF_TYPE_STRING but it sorts numerically
(first) and then sorts alphanumerically (by the tail of the
number). Added the QOF Type, the gnome-search support, and
modified TRANS_NUM to use the new type.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14892 57a11ea4-9604-0410-9ed3-97b8803252fd
Reference that gave me this hint: http://acm.pku.edu.cn/JudgeOnline/faq.htm
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14806 57a11ea4-9604-0410-9ed3-97b8803252fd
of no read permission and give appropriate user feedback if yes.
Feel free to adjust the wording.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14791 57a11ea4-9604-0410-9ed3-97b8803252fd
Scheme files are now symlinked or copied into subdirectories gnucash/ and g-wrapped/. This will work on a platform without symlinks just fine.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14746 57a11ea4-9604-0410-9ed3-97b8803252fd
Removes an often regenerated dependency from qof.h.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14688 57a11ea4-9604-0410-9ed3-97b8803252fd
- Don't distribute (most) generated files.
- Be (more) consistent about when generated files are cleaned.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14555 57a11ea4-9604-0410-9ed3-97b8803252fd
Just modify GLIB_LIBS and GLIB_CFLAGS so everyone properly
links against the glib26 compatibility library when necessary.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14330 57a11ea4-9604-0410-9ed3-97b8803252fd
Hopefully this will solve the problem Macs are having dlopen'ing them.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14210 57a11ea4-9604-0410-9ed3-97b8803252fd